-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
PHP8.1 support added #81
Conversation
@konarshankar07 I've added a few commits to get this working on latest deps and with 8.1; thanks for getting this started! |
c48082b
to
f8b2692
Compare
@weierophinney |
I've just pushed a fix for them here, as I'd already started before you commented. :-/ Not entirely sure why it ran those checks, TBH - there were no changes to the docs, so those should not have run. |
Use versions known to work with PHP 8.1 where possible. Update how package replaces zend-view: - Make a conflict with all versions of zend-view - Remove "replace" entry for zend-view - Remove requirement on laminas-zendframework-bridge Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
Restore pre-9.5.10 behavior of PHPUnit whereby it converted deprecations to exceptions, as we have tests that were expecting deprecation notices. Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
- Adds polyfill classes to provide PHP 8.1-compliant versions of classes where components are not yet updated: - `Laminas\Filter\FilterChain` - `Laminas\Mvc\Plugin\FlashMessenger` - `Laminas\Navigation\AbstractContainer` - Adds `ReturnTypeWillChange` attributes to interface method implementations. - Ensures that `md5()` is only ever passed strings. Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
add304c
to
1d7fb06
Compare
hi @weierophinney, thank you and @konarshankar07 for the implemented support of PHP 8.1 @weierophinney, could you explain the reason for Line 58 in 2b396ad
If project has laminas/laminas-zendframework-bridge as dependency, it does not allow this version to be installed, because conflicts with zendframework/zend-router * (laminas/laminas-router 3.4.5 replaces zendframework/zend-router ^3.3.0) You can check it with the latest available version of laminas/laminas-mvc
|
Oof - that was an incorrect line - it should be zend-view. I'll get that updated and issue a patch release. |
A bad cut-and-paste led to conflicting with zend-router, instead of zend-view, as a mechanism for replacing the zend-view package, as reported at: - laminas#81 (comment) Signed-off-by: Matthew Weier O'Phinney <matthew@weierophinney.net>
thank you, @weierophinney |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@weierophinney
Regarding 6c73cf8
Thanks for finishing the pending work but can you please explain why we need to add the polyfill classes and how you are able to reproduce the ReturnTypeWillChange error?
I'm new to the laminas so curious about this commit
Components like laminas-filter and laminas-navigation do not yet support PHP 8.1, so the polyfills were created. Otherwise we have to wait for 3 other components and the related updates.
Were you able to try the hint from the comments in laminas-crypt? |
Yes, I found that the test runs are executing with the php8.1.0RC4 and in my local I'm running the test using php8.1.0RC2 version |
@konarshankar07 Were you able to reproduce the errors in your local test environment? |
Nope, I'm not seeing any error in my local with the php8.1.0RC2 |
The trick is adding the Prior to PHPUnit 9.5.10, this was the default, which meant that any deprecations from the engine or other code would trigger an exception, which, unless you had an With 9.5.10, PHPUnit decided to toggle that off. We actually want it ON, because it allows us to identify deprecations we are relying on in our libraries early, and adapt the code to work for future versions. That was the change I made that caused tests to fail, and then required changes so that we could complete the patch. |
Description
PHP8.1 support added
Related ticket: magento/magento2#34214