Ability to override Zend library #3462
Replies: 8 comments 34 replies
-
It would be nice, I don't know at the moment ho we could achieve it tho, any ideas? |
Beta Was this translation helpful? Give feedback.
-
Like I proposed in Discord, maybe the composer feature to autoload a file can be used. Not sure if that invalidates PSR0 but I dont see how. You simply come first, and the autoloader finds your file first, before zf1future comes along.
where this package requires (How we would do that in non-composer setups however.. I dont know) |
Beta Was this translation helpful? Give feedback.
-
Otherwise we put this in the Mage.php to allow special overwrites for Zend, which can be extended in the future?
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@henrykbrzoska Did you continue to work on a solution for this? |
Beta Was this translation helpful? Give feedback.
-
The best thing would be for zf1-future to make use of the composer autoloader and remove all the |
Beta Was this translation helpful? Give feedback.
-
I think I found a working solution, please check #3989. |
Beta Was this translation helpful? Give feedback.
-
Note: before zf1-future, with the included zend files, there were a script to comment all |
Beta Was this translation helpful? Give feedback.
-
Description (*)
I would like to request an enhancement to be able override classes from
shardj/zf1-future
library.Expected behavior (*)
Not getting
Fatal error: Cannot declare class Zend_XXX_YYY_ZZZ, because the name is already in use in /var/www/html/htdocs/vendor/shardj/zf1-future/library/Zend/XXX/YYY/ZZZ.php
Benefits
Save the world.
Additional information
as an example:
create app/code/local/Zend/Locale/Format.php
Comment out all require_once in file(because this classes are loaded). So was in lib/Zend before taking it from composer
change some item qty in cart
this will use Zend_Filter_LocalizedToNormalized
vendor/shardj/zf1-future/library/Zend/Filter/LocalizedToNormalized.php:30 throws
Fatal error: Cannot declare class Zend_Locale_Format, because the name is already in use in /var/www/html/htdocs/vendor/shardj/zf1-future/library/Zend/Locale/Format.php
Beta Was this translation helpful? Give feedback.
All reactions