-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Deprecation errors in php 8 #3327
Comments
@ondrejmirtes Does phpstan cover this case for php 8 ? (I think not 🤔 ) |
Would you mind sending a PR to fix this please? |
Should I start on a particular branch ? |
The fix is to use nullable types instead of null defaults. Since this syntax requires PHP 7.1 minimum, only branch 3.x is eligible. Please check the full source for similar cases. Thanks! |
Just adding |
The thing is, first parameters are not optional right now. The |
I understand, I think we will need to mark phpMyAdmin as not supporting php 8 at some time because of this. I will do a PR for 3.x ASAP |
you could also ignore the deprecation using a custom error handler |
Sure, this is a better idea |
Or you could migrate to Twig 3.x |
If we can have compatibility on 2.x or 3.x without major changes we will allow 3.x to be used if available. If it is not possible we will only migrate to twig 3.x on the development version. Anyway this is only a question to bring more php support to users or not. (This decision will have long term consequences on our Debian packaging)
For now, this solution is the best one. I know, this seems over complicated but I am very serious about the packaging teams having some difficulties or not to package the next version :) |
Supporting both is entirely possible, assuming you don't use any deprecated feature in 2.x (as they are gone in 3.0). Symfony does exactly that. |
Tests output
|
What should I change ? Twig/tests/Fixtures/tests/in.test Line 46 in 58296c9
|
Fixed by #3331 |
Ref: twigphp/Twig#3327 Upstream: twigphp/Twig#3331 Signed-off-by: William Desportes <williamdes@wdes.fr>
Ref: twigphp/Twig#3331 Ref: twigphp/Twig#3327 Signed-off-by: William Desportes <williamdes@wdes.fr>
Seems to be caused by https://php.watch/versions/8.0/deprecate-required-param-after-optional
Twig 2.x
https://travis-ci.org/github/phpmyadmin/phpmyadmin/jobs/686744942#L448
Errors
The text was updated successfully, but these errors were encountered: