-
-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix + add module names to helper #2617
Conversation
I understand the bug fix, but is it really necessary to set the module name explicitly in every helper? |
exactly what I was thinking :-( |
I think it is bit faster to get module name from property, instead of retrieve it from classname. |
This method is called on nearly every page for at least ten times (or more often) ...
Why to not set |
Why I agree with @sreichel:
3 reasons:
|
because most helper classes should not need to know their module name. It also goes further away on how the Block classes do it, which do it fully dynamically. anyway, this optimization saves around 0.02ms per request according to my abstracted benchmark, if all of these classes are loaded and used. |
* Fixed "should return string but returns false" * Fixed "should return XYZ but returns false" * Fixed "should return array but returns null" * Fixed "should return string but returns null" * Fixed "should return int but returns null" * Fixed "should return bool but returns" * Fixed docs (see comments) * Fixed "should return array" * Update app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php Co-authored-by: Ng Kiat Siong <[email protected]> * Update app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api.php Co-authored-by: Ng Kiat Siong <[email protected]> * Update app/code/core/Mage/Tag/Model/Resource/Tag.php Co-authored-by: Ng Kiat Siong <[email protected]> * Update app/code/core/Mage/Customer/Block/Form/Register.php Co-authored-by: Ng Kiat Siong <[email protected]> * Added module names to helper(#2617) * Get catalog search result collection from engine (#2634) * Add PHP dependencies security check workflow (#2639) * [security-workflow] Fixed cron syntax (#2640) * Added OpenMage Contributors Copyright (#2295) * Added ddev snippets to docs (#2575) * Improve dev/openmage/install.sh script for newer versions of Docker - no longer requires separate compose. * Only run workflows when relevant files change (#2641) * Add back notification popup severity icons URL (#2633) * Reduce reprocessed jpeg file size by defaulting quality to 85% (#2629) * Fixed issue #475. * Removed <frontend_type>text</frontend_type> as it is the default. * Fixed bug on users not able to modify image quality in backend if deprecated config exists. * Fixed bug on incorrect check if image quality was not set in backend. * Improved note in system.xml. * Prevented editing of a non-editable order (#2632) * Fix dev/openmage/install.sh script setting permissions on var directory. * Allowed automatic full invoice from API (#2393) * Add check if array key isset before using it (#2649) * Fixed phpstan-baseline.neon * Fixed phpstan-baseline.neon (updated dev tools) * Revert "Fixed phpstan-baseline.neon" This reverts commit 3c82e76. * Fixed getRegion() Co-authored-by: Ng Kiat Siong <[email protected]> Co-authored-by: Mohamed ELIDRISSI <[email protected]> Co-authored-by: Justin Beaty <[email protected]> Co-authored-by: Colin Mollenhour <[email protected]> Co-authored-by: luigifab <[email protected]> Co-authored-by: Przemysław Piotrowski <[email protected]>
Description (*)
Read: https://magento.stackexchange.com/questions/46255/ecomdev-phpunit-translation-not-working-with-mocked-helper/46256#46256
To test you can set a debug breakpoint at
Mage_Core_Helper_Abstract::_getModuleName()
Contribution checklist (*)