framework: "symfony/translation"-bug returned when upgrading from 4.3.8 to v5 for Laravel 7

  • Laravel Version: v7.1.0
  • PHP Version: 7.2.24

Description:

2020/03/10 19:52:04 [error] 13590#13590: *18393 FastCGI sent in stderr: "PHP message: PHP Warning:  include(/home/forge/my.app/vendor/composer/../symfony/translation/TranslatorInterface.php): failed to open stream: No such file or directory in /home/forge/my.app/vendor/composer/ClassLoader.php on line 444
PHP message: PHP Warning:  include(): Failed opening '/home/forge/my.app/vendor/composer/../symfony/translation/TranslatorInterface.php' for inclusion (include_path='.:/usr/share/php') in /home/forge/my.app/vendor/composer/ClassLoader.php on line 444
PHP message: PHP Fatal error:  Uncaught RuntimeException: A facade root has not been set. in /home/forge/my.app/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:258
2020/03/10 20:44:24 [error] 12467#12467: *18679 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Declaration of Carbon\Translator::setLocale($locale) must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::setLocale(string $locale) in /home/forge/my.app/vendor/nesbot/carbon/src/Carbon/Translator.php on line 18
PHP message: PHP Fatal error:  Uncaught ErrorException: Declaration of Illuminate\Http\Response::setContent($content) should be compatible with Symfony\Component\HttpFoundation\Response::setContent(?string $content) in /home/forge/my.app/vendor/laravel/framework/src/Illuminate/Http/Response.php:14

Steps To Reproduce:

Upgrade an existing project to the latest version of Laravel v7.1.0. Install this on a server with PHP Version: 7.2.24.

I found out that it is because of the package "symfony/translation". For Laravel 6 you can fix this by setting the package to version 4.3.8. This is not an option for Laravel 7, because that uses version 5 of that package.

It should work with my PHP-version, because my composer.lock tells me that this is the highest required PHP-version: "php": "^7.2.5",. I have 7.2.24 which is higher as 7.2.5.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 23 (11 by maintainers)

Most upvoted comments

Probably due to global dependency conflicts.