You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm installing progpilot as a Composer-based dev dependency.
I'm trying to use it with a Drupal module codebase, experimentally, to try and evaluate progpilot. Drupal uses Symfony 6.
I can require progpilot, but I get this error when I run it:
$ ./vendor/bin/progpilot ./
PHP Fatal error: Declaration of progpilot\Console\Application::run(?Symfony\Component\Console\Input\InputInterface $input = null, ?Symfony\Component\Console\Output\OutputInterface $output = null) must be compatible with Symfony\Component\Console\Application::run(?Symfony\Component\Console\Input\InputInterface $input = null, ?Symfony\Component\Console\Output\OutputInterface $output = null): int in /var/www/html/vendor/designsecurity/progpilot/package/src/progpilot/Console/Application.php on line 27
This is because progpilot constrains it's symfony/console version to ^5.4.17, which allows for it to be used with Symfony 6, even though the signature for run() is incompatible.
I'd suggest changing the constraint to ^5.4 or otherwise tighten the constraint to disallow Symfony 6.
I'm also a little mystified how the CI doesn't fail due to this issue, since Composer should update symfony/console to 6+.
My workaround is to install globally with Composer: composer global require designsecurity/progpilot
Note that this still throws a lot of deprecation errors under PHP 8.3.
composer show drupal/core | grep versions
versions : * 10.3.1
This gives us:
PHP Fatal error: Declaration of progpilot\Console\Application::run(?Symfony\Component\Console\Input\InputInterface $input = null, ?Symfony\Component\Console\Output\OutputInterface $output = null) must be compatible with Symfony\Component\Console\Application::run(?Symfony\Component\Console\Input\InputInterface $input = null, ?Symfony\Component\Console\Output\OutputInterface $output = null): int in /Users/paul/test/recommended-project/vendor/designsecurity/progpilot/package/src/progpilot/Console/Application.php on line 27
The text was updated successfully, but these errors were encountered:
paul-m
changed the title
progpilot
Hard requirement on symfony/console 5
Jul 10, 2024
I'm installing progpilot as a Composer-based dev dependency.
I'm trying to use it with a Drupal module codebase, experimentally, to try and evaluate progpilot. Drupal uses Symfony 6.
I can require progpilot, but I get this error when I run it:
This is because progpilot constrains it's symfony/console version to
^5.4.17
, which allows for it to be used with Symfony 6, even though the signature forrun()
is incompatible.I'd suggest changing the constraint to
^5.4
or otherwise tighten the constraint to disallow Symfony 6.I'm also a little mystified how the CI doesn't fail due to this issue, since Composer should update symfony/console to 6+.
My workaround is to install globally with Composer:
composer global require designsecurity/progpilot
Note that this still throws a lot of deprecation errors under PHP 8.3.
To repro:
We installed Drupal 10.3.1:
This gives us:
The text was updated successfully, but these errors were encountered: