code-lts / doctum

A php API documentation generator, fork of Sami
https://doctum.long-term.support/
MIT License
300 stars 32 forks source link

Symfony v7 support #71

Open mtvbrianking opened 3 months ago

mtvbrianking commented 3 months ago

https://github.com/code-lts/doctum/issues/70

williamdes commented 3 months ago

PHP Fatal error: Declaration of Doctum\Console\Application::getLongVersion() must be compatible with Symfony\Component\Console\Application::getLongVersion(): string in /home/runner/work/doctum/doctum/src/Console/Application.php on line 40

Well, this is quite an issue. I will see how to workaround it

mtvbrianking commented 3 months ago

@williamdes I wanted to bring the phpparser issue to your attention as well

php doctum.phar update doctum.php

PHP Fatal error:  Uncaught Error: Call to undefined method PhpParser\ParserFactory::create() in phar:///.../doctum.phar/src/Doctum.php:526
Stack trace:
#0 phar:///.../doctum.phar/src/Doctum.php(349): Doctum\Doctum->getPhpParser()
#1 phar:///.../doctum.phar/src/Doctum.php(516): Doctum\Doctum->offsetGet()
#2 phar:///.../doctum.phar/src/Doctum.php(343): Doctum\Doctum->getCodeParser()
#3 phar:///.../doctum.phar/src/Doctum.php(481): Doctum\Doctum->offsetGet()
#4 phar:///.../doctum.phar/src/Doctum.php(322): Doctum\Doctum->getParser()
#5 phar:///.../doctum.phar/src/Doctum.php(429): Doctum\Doctum->offsetGet()
#6 phar:///.../doctum.phar/src/Doctum.php(304): Doctum\Doctum->getBuiltProject()
#7 phar:///.../doctum.phar/src/Doctum.php(257): Doctum\Doctum->offsetGet()
#8 phar:///.../doctum.phar/src/Console/Command/UpdateCommand.php(58): Doctum\Doctum->getProject()
#9 phar:///.../doctum.phar/vendor/symfony/console/Command/Command.php(298): Doctum\Console\Command\UpdateCommand->execute()
#10 phar:///.../doctum.phar/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run()
#11 phar:///.../doctum.phar/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#12 phar:///.../doctum.phar/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#13 phar:///.../doctum.phar/bin/doctum-binary.php(26): Symfony\Component\Console\Application->run()
#14 /.../doctum.phar(16): include('...')
#15 {main}
thrown in phar:///.../doctum.phar/src/Doctum.php on line 526

You might need to support phpparser v5 because most packages require only v5 leading to conflicts

- "nikic/php-parser": "^4.10",
+ "nikic/php-parser": "^4.1|^5.0",
williamdes commented 1 month ago

Indeed, sorry for the delay Ref: https://github.com/code-lts/doctum/issues/72