Skip to content
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

PHP fatal error when running "generate" #444

Closed
bretrzaun opened this issue Sep 2, 2024 · 4 comments
Closed

PHP fatal error when running "generate" #444

bretrzaun opened this issue Sep 2, 2024 · 4 comments

Comments

@bretrzaun
Copy link

bretrzaun commented Sep 2, 2024

Describe the bug
Running 'generate' reports:

Fatal error: Declaration of Todaymade\Daux\Console\Generate::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Symfony\Component\Console\Command\Command::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int in /app/vendor/daux/daux.io/libs/Console/Generate.php on line 53
Script daux generate handling the doc event returned with error code 255

To Reproduce
Steps to reproduce the behavior:

  1. Create project with dependencies
  • symfony/console (v7.1.4)
  • daux/daux.io (0.22.2)
  1. run 'daux generate'
@bretrzaun
Copy link
Author

This has been unnoted because according to the composer.json "symfony/console" ^7 is allowed, but composer.lock sticks the version to 6, which is why the tests will work.

@axelhahn
Copy link
Contributor

axelhahn commented Oct 15, 2024

I had the same problem on a fresh installation on debian 11 and php 8.2 when calling dauxonly.

composer global require daux/daux.io installed symfonie v7.1.5.

When I grep a bit then there the variable type of the return value is new:
vendor/symfony/console/Command/CompleteCommand.php:71: protected function execute(InputInterface $input, OutputInterface $output): int
vendor/daux/daux.io/libs/Console/Generate.php:53: protected function execute(InputInterface $input, OutputInterface $output)

The execute() methods need to be updated (add : int) in
vendor/daux/daux.io/libs/Console/ClearCache.php:17
vendor/daux/daux.io/libs/Console/Generate.php:53
vendor/daux/daux.io/libs/Console/Serve.php:24

axelhahn added a commit to axelhahn/daux.io_fork that referenced this issue Oct 15, 2024
@axelhahn
Copy link
Contributor

Named 3 modifications are in the pull request #446

onigoetz pushed a commit that referenced this issue Oct 22, 2024
@onigoetz
Copy link
Contributor

Fixed by #444

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants