Reputation: 79
Use: symfony new my_project_nasdame --version=lts
[OR]
composer create-project symfony/website-skeleton my_project_name
[OR]
symfony new test_project332
php7.4
Everywhere a mistake
lexcodfh@artek:~/tmp [130] $ ~/.symfony/bin/symfony new test_new_project
* Creating a new Symfony project with Composer
[KO]
Script cache:clear returned with error code 255
!!
!! Fatal error: Declaration of Symfony\Component\DependencyInjection\ServiceLocator::has(string $id) must be compatible with Psr\Container\ContainerInterface::has($id) in /home/l/lexcodfh/tmp/test_new_project/vendor/symfony/dependency-injection/ServiceLocator.php on line 46
!! Symfony\Component\ErrorHandler\Error\FatalError {#89
!! -error: array:4 [
!! "type" => 64
!! "message" => "Declaration of Symfony\Component\DependencyInjection\ServiceLocator::has(string $id) must be compatible with Psr\Container\ContainerInterface::has($id)"
!! "file" => "/home/l/lexcodfh/tmp/test_new_project/vendor/symfony/dependency-injection/ServiceLocator.php"
!! "line" => 46
!! ]
!! #message: "Compile Error: Declaration of Symfony\Component\DependencyInjection\ServiceLocator::has(string $id) must be compatible with Psr\Container\ContainerInterface::has($id)"
!! #code: 0
!! #file: "./vendor/symfony/dependency-injection/ServiceLocator.php"
!! #line: 46
!! }
!!
Script @auto-scripts was called via post-update-cmd
unable to run /home/l/lexcodfh/.local/bin/composer create-project symfony/skeleton /home/l/lexcodfh/tmp/test_new_project --no-interaction: exit status 255
lexcodfh@artek:~/tmp [1] $
Solution that is not applicable on hosting: https://github.com/symfony/symfony/issues/40393
Need help
Upvotes: 6
Views: 6711
Reputation: 95
Use the apt remove php7.4-psr php-psr
command for Debian-based distributions
Upvotes: 6