PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, January 4, 2022

[FIXED] Laravel Symfony ArrayLoader not found

 January 04, 2022     composer-php, laravel, laravel-artisan, php     No comments   

Issue

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)

Solution

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



Answered By - Jeremy B.
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing