![]() FILE: /home/travis/build/joomla/joomla-cms/libraries/composer_autoload.phpġ5 | ERROR | Missing function doc commentĢ3 | ERROR | Missing function doc commentģ1 | ERROR | Instanciating new classes without parameters does not requireĦ8 | ERROR | Missing function doc commentįILE: /home/travis/build/joomla/joomla-cms/libraries/ClassLoader.phpģ8 | ERROR | tag comment indented incorrectly expected 2 spaces butģ9 | ERROR | tag comment indented incorrectly expected 2 spaces butĤ0 | ERROR | Missing tag in class commentĤ5 | ERROR | Expected 1 blank line before member var 0 foundĤ6 | ERROR | Expected 1 blank line before member var 0 foundĥ0 | ERROR | Expected 1 blank line before member var 0 foundĥ3 | ERROR | Expected 1 blank line before member var 0 foundĥ5 | ERROR | You must use "/**" style comments for a function commentĦ0 | ERROR | Missing function doc commentĦ5 | ERROR | Missing function doc commentħ0 | ERROR | Missing function doc commentħ5 | ERROR | Missing function doc commentĨ1 | ERROR | Expected 3 spaces before variable typeĨ1 | ERROR | Expected 2 spaces after the longest typeĨ1 | ERROR | Expected 2 spaces after the longest variable nameĨ1 | ERROR | There must be exactly one blank line before the tags in functionĨ2 | ERROR | Missing tag in function commentĩ9 | ERROR | Expected 3 spaces before variable typeġ00 | ERROR | Expected 3 spaces before variable typeġ00 | ERROR | Expected 2 spaces after the longest typeġ01 | ERROR | Expected 3 spaces before variable typeġ01 | ERROR | Expected 2 spaces after the longest variable nameġ02 | ERROR | Missing tag in function commentġ10 | ERROR | Cast statements must be followed by a single space expected Even with hundreds of classes the memory impact is miniscule compared to the core code memory you have a look into Travis? In layman's terms: it's so small you can't even separate it from the variance in page load times added by external factors such as filesystem caches, code caches, web server thread management etc.Īs for the memory impact, it is about 0.2Kb per aliased class. ![]() Therefore I conclude that the performance impact is statistically not important. I could not measure performance impact, not because of lack or try or incompetence but because of variance. This patch actually fixes backwards compatibility :) Performance impact ![]() This results in perfect backwards compatibility while we are proceeding with the namespacing of the core code. Moreover, the same trick is applied to all of the JLoader autoloaders. This allows us to register class aliases on the fly, when the new, namespaced class is being loaded. This patch uses a fork of the \Composer\Autoload\ClassLoader class which calls JLoader::applyAliasFor($class) when loading a class. Instead, we need a way to create the aliases on-the-fly, when either then old class is loaded (via the dynamic alias set in JLoader) or through the new namespaced class name (through Composer). We can't use static class_alias() calls because PHP needs to load the original class, causing memory and performance issues. Var_dump($foo instanceof JRegistry) // returns true now!!! Example:Ĭlass_exists('JRegistry', true) // Dummy line just to force the autoloader to run However, if you have forced the autoloader to run you have no problem. Var_dump($foo instanceof JRegistry) // returns false Var_dump($foo instanceof \Joomla\Registry\Registry) // returns true when the old class name is in the right hand side of instanceof. However, this causes an issue when PHP doesn't try to autoload a class, e.g. JRegistry) instead of the new class (e.g. This works fine when a developer creates an object using the old class name (e.g. The libraries/classmap.php file registers class aliases with JLoader.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |