0

Got this error. I am not sure why. I guess some files got deleted maybe?

I tried to run a composer update to fix it. Did not work. Then I deleted composer.lock and the vendor folder and ran composer install. Still the same.

What would be the next step to try?

   Error

  Class "Symfony\Component\Translation\Loader\ArrayLoader" not found

  at C:\DSRack\gt-launcher\vendor\nesbot\carbon\src\Carbon\Translator.php:80
    76|     public function __construct($locale, Translation\Formatter\MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false)
    77|     {
    78|         $this->initializing = true;
    79|         $this->directories = [__DIR__.'/Lang'];
  > 80|         $this->addLoader('array', new Translation\Loader\ArrayLoader());
    81|         parent::__construct($locale, $formatter, $cacheDir, $debug);
    82|         $this->initializing = false;
    83|     }
    84|

  1   C:\DSRack\gt-launcher\vendor\nesbot\carbon\src\Carbon\Translator.php:70
      Carbon\Translator::__construct("en")

  2   C:\DSRack\gt-launcher\vendor\nesbot\carbon\src\Carbon\Traits\Localization.php:691
      Carbon\Translator::get()

I'm running

  • PHP 8.0.7 (cli)
  • Locking laravel/framework (v7.30.4)
  • Locking symfony/translation (v5.3.8)
Hjalte J.
  • 87
  • 1
  • 8
  • Maybe check this thread out, seems to be the same problem https://stackoverflow.com/questions/65273978/corrupted-composer-json-file-in-laravel-8 – Collin Sep 28 '21 at 09:48
  • @Collin I tried those steps but no cigar. I do have the maatwebsite/excel package tho. But i see no identication of it being the problem. – Hjalte J. Sep 28 '21 at 09:51

1 Answers1

0

Temporary solution :

You can quick fix it by adding temporarily this line to your composer.json

"symfony/translation": "v5.3.7",

It's due to a "minor" release of the package this morning

Jeremy B.
  • 32
  • 4