Comments (19)
We rolled this out to production now and monitoring on the autoloader shows the heavy effect, average autoloading time increases from 1 ms to 3ms on a 9ms average response time.
from laminas-zendframework-bridge.
@beberlei FYI, there's work in progress to completely phase out laminas/laminas-zendframework-bridge
.
For now, we're probing this on some individual packages, like we did in laminas/laminas-stdlib#33
If that proves to be successful, we will go on and implement this for all other packages.
from laminas-zendframework-bridge.
Most Laminas and Mezzio packages have been updated (and released) to remove the dependency on this package.
The only one left, and on which I cannot do anything anymore, are:
- mezzio/mezzio-authentication-oauth2#38
- laminas/laminas-xml2json#9
- laminas/laminas-mvc-plugin-fileprg#17
- laminas/laminas-barcode#13
from laminas-zendframework-bridge.
laminas/laminas-mvc-plugin-fileprg#17 (comment)
from laminas-zendframework-bridge.
@hostep send a patch
from laminas-zendframework-bridge.
I think this mostly needs documentation improvements:
- the fact that this package is included by default in
laminas/*
packages is intentional, and can only be mitigated by removal of the requirement in the next major release: this is because anyone requiringzendframework/*
packages (and packages in its ecosystem) will get compatiblelaminas/*
packages, and we cannot just break those until a new major release of thelaminas/*
packages is here. This is not clear, and multiple people have asked about it. - the package can be safely shadowed via
"replace": {"laminas/laminas-zendframework-bridge": "*"}
if you are running within an environment where you no longer rely onzendframework/*
packages. This needs to be better documented, or perhaps added to the output ofcomposer install
, as an additional plugin output that warns about the performance pitfalls. This has to remain an opt-in, until people stop havingzendframework/*
in their dependencies overall. - 2% overhead for something that is removed with a one-liner (where safe to do so) seems OK.
from laminas-zendframework-bridge.
@Ocramius I agree that 2% overhead is ok when it can be removed with a one liner, but as you mentioned this is not documented and i wasn't aware it was so easy to get around it. Thank you for mentioning it.
from laminas-zendframework-bridge.
Question is how to make this more visible now: do you think that adding it to the output of composer install
would suffice?
Seems like the cleanest approach to literally force people to know that this thing is actively doing something.
from laminas-zendframework-bridge.
@Ocramius Just realized for fast requests that are in the 10-20ms range the overhead becomes 10% though :-(
from laminas-zendframework-bridge.
For that, I think a perf optimization is valid.
Perhaps we can add a phpbench/phpbench
test to verify the impact long-term, and patch this stuff:
laminas-zendframework-bridge/src/Autoloader.php
Lines 124 to 171 in ff8e9a7
from laminas-zendframework-bridge.
from laminas-zendframework-bridge.
I am running into trouble getting it to work in combination with https://github.com/beberlei/composer-monorepo-plugin/ but hope to find a solution soon.
from laminas-zendframework-bridge.
@beberlei I've identified that laminas/laminas-code
no longer needs laminas/laminas-eventmanager
in its core, so I'm releasing a new minor today with the removed dependency (and therefore the performance hit should be gone, if you only need it for the proxying mechanisms)
from laminas-zendframework-bridge.
Two of the above left: we can then probably phase out this package completely, and call this dark chapter of ZendFramework "done" :|
from laminas-zendframework-bridge.
I think this issue can be closed because the very last PR to stop using this package is about to be merged and released.
from laminas-zendframework-bridge.
Which one is that? 🤔
from laminas-zendframework-bridge.
Awesome, released! 💪
I'd say that this package needs to be abandoned soon-ish then.
from laminas-zendframework-bridge.
I think this issue can be closed because the very last PR to stop using this package is about to be merged and released.
As far as I can see, the last released version of laminas/laminas-server
still includes this. It got removed as dependency about 2 years ago over here, but this didn't get released yet. Maybe that can happen as well soonish? Thanks! 🙂
from laminas-zendframework-bridge.
Closing here: this component is slowly being phased out anyway, so your focus should be to migrate.
from laminas-zendframework-bridge.
Related Issues (20)
- Dependency Dashboard
- Performance Issue with 1.6.0 HOT 17
- Unable to use with PHP 7.4 preload HOT 2
- `ConfigPostProcessor` replaces dependency service and therefore removes factory mapping HOT 3
- Tool should not rename classes using "Zend" or "ZF" in them
- Append rewrite delegator classes
- Abstract factories and lazy services "class_map" are not replaced with 1.0.2
- The bridge does not seem to work in all cases HOT 6
- Developer tools do not work for BjyAuthorize anymore
- Getting "failed to open stream: No such file or directory in /autoload.php on line 5" when loading package HOT 1
- Development mode response times have increased 10x after migration. HOT 4
- Psalm integration
- README does not mention which ZF versions are supported
- `ConfigPostProcessor::replaceDependencyAliases` does not prevent infinite loop
- Bridge does not work with zend i18 HOT 3
- ClassLoader type HOT 9
- Incompatibility with composer 2.2.0RC1 HOT 10
- "ZendForm" getting replaced in 3rd party module HOT 3
- Mark component feature-complete
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laminas-zendframework-bridge.