Closed tabcontao closed 1 week ago
The return type in the contao-manager method is void
, however in the newest symfony version (^7.0
), it's more strict:
https://github.com/symfony/symfony/blob/68a5704edace3371b649e779fc31ee860a19bd01/src/Symfony/Component/Console/Command/Command.php#L183
According to the phpdocs, it always wanted an integer as a return type tho: https://github.com/symfony/console/blob/6473d441a913cb997123b59ff2dbe3d1cf9e11ba/Command/Command.php#L192-L209
We might want to check on the return values on every execute()
in the available manager commands and return int 0
But why does this occur in the first place? The Contao Manager requires "symfony/console": "^5.4"
.
But why does this occur in the first place? The Contao Manager requires
"symfony/console": "^5.4"
.
Neither the Symfony\Command
nor the AboutCommand
class in the current contao-manager.phar.php
have a forced return value.
I'd love to know this as well but maybe going with the standard approach and fixing this bug (since every other command in the manager does return an integer) may still be the best solution.
The PR should be fine, since the constants are available in Symfony 5.4+.
When I use the command
php contao-manager.phar.php about
with Contao-Manager 1.8.6 in the CLI, I get the error message below at the bottom of the output below the "Server" info section:
See also: Corresponding Thread in the Contao community forum