-
-
Notifications
You must be signed in to change notification settings - Fork 556
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
[console] PHP warning in DrupalServiceModifier when commands called on PHP8 #4310
Comments
The same problem are in drupal console v1.9.7, I have patched these files:
With this change work in php8 |
Is drupal/console with drush 10+ and drupal9.3 compatible with PHP8.x ? |
neclimdul
added a commit
to neclimdul/drupal-console
that referenced
this issue
Feb 10, 2022
Fix hechoendrupal#4310 Since the later arguments are required this should be all that's needed.
LOBsTerr
pushed a commit
that referenced
this issue
Sep 15, 2022
Fix #4310 Since the later arguments are required this should be all that's needed.
Thank for your contribution |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem/Motivation
PHP8 outputs a notice for methods that define optional arguments before required arguments (https://php.watch/versions/8.0/deprecate-required-param-after-optional).
In
Drupal\Console\Bootstrap\DrupalServiceModifier
, the first argument to the constructor defines a default value as null.How to reproduce
Run any console command on a php8 installation. E.g.
Solution
Remove the default value assignment for the first parameter.
The text was updated successfully, but these errors were encountered: