Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

fbc's avatar
Level 2

PHP Fatal error: Interface 'Symfony\Contracts\Translation\LocaleAwareInterface' not found in

I moved my project from a Linux computer to a MACOS computer and getting all sorts of errors.

I get these strange errors I can't figure out. I do also remember there being a warning that symlinks would not be copied onto my exfat formatted portable drive that I used to transport the code to my MAC.

So the folder I copied to my mac came from that exfat formatted drive.

I was originally getting this:

$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating optimized autoload files
Warning: Ambiguous class resolution, "Symfony\Component\Mime\Header\IdentificationHeader" was found in both "/Users/fbc/LaravelProjects/estimator/vendor/symfony/mime/Encoder/Base64MimeHeaderEncoder.php" and "/Users/fbc/LaravelProjects/estimator/vendor/symfony/mime/Header/IdentificationHeader.php", the first will be used.
Warning: Ambiguous class resolution, "Symfony\Component\HttpKernel\DependencyInjection\AddAnnotatedClassesToCachePass" was found in both "/Users/fbc/LaravelProjects/estimator/vendor/symfony/http-kernel/Controller/TraceableArgumentResolver.php" and "/Users/fbc/LaravelProjects/estimator/vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php", the first will be used.
Warning: Ambiguous class resolution, "Symfony\Component\HttpKernel\DependencyInjection\ConfigurableExtension" was found in both "/Users/fbc/LaravelProjects/estimator/vendor/symfony/http-kernel/Controller/TraceableControllerResolver.php" and "/Users/fbc/LaravelProjects/estimator/vendor/symfony/http-kernel/DependencyInjection/ConfigurableExtension.php", the first will be used.
Warning: Ambiguous class resolution, "Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher" was found in both "/Users/fbc/LaravelProjects/estimator/vendor/symfony/http-kernel/Controller/ControllerResolverInterface.php" and "/Users/fbc/LaravelProjects/estimator/vendor/symfony/http-kernel/Debug/TraceableEventDispatcher.php", the first will be used.
Warning: Ambiguous class resolution, "Symfony\Component\HttpKernel\Debug\FileLinkFormatter" was found in both "/Users/fbc/LaravelProjects/estimator/vendor/symfony/http-kernel/Controller/ControllerResolver.php" and "/Users/fbc/LaravelProjects/estimator/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php", the first will be used.
Warning: Ambiguous class resolution, "Symfony\Component\CssSelector\XPath\Extension\PseudoClassExtension" was found in both "/Users/fbc/LaravelProjects/estimator/vendor/symfony/css-selector/XPath/Extension/PseudoClassExtension.php" and "/Users/fbc/LaravelProjects/estimator/vendor/symfony/css-selector/Parser/Parser.php", the first will be used.
Warning: Ambiguous class resolution, "Symfony\Component\Console\Exception\CommandNotFoundException" was found in both "/Users/fbc/LaravelProjects/estimator/vendor/symfony/console/Command/ListCommand.php" and "/Users/fbc/LaravelProjects/estimator/vendor/symfony/console/Exception/CommandNotFoundException.php", the first will be used.
Warning: Ambiguous class resolution, "Illuminate\Routing\RouteGroup" was found in both "/Users/fbc/LaravelProjects/estimator/vendor/laravel/framework/src/Illuminate/Routing/RouteGroup.php" and "/Users/fbc/LaravelProjects/estimator/vendor/laravel/framework/src/Illuminate/Routing/RedirectController.php", the first will be used.
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Copyright (c) 2004-2020 Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
In Finder.php line 101:
                                                                              
  Class 'Symfony\Component\Finder\Iterator\FileTypeFilterIterator' not found  
                                                                              

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

but then I did a COMPOSER UPDATE and it all went away.

Now I only get this error:

$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating optimized autoload files
Deprecation Notice: Class Sabberworm\CSS\Value\Value located in ./vendor/sabberworm/php-css-parser/lib/Sabberworm/CSS/Parsing/UnexpectedTokenException.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
PHP Fatal error:  Interface 'Symfony\Contracts\Translation\LocaleAwareInterface' not found in /Users/fbc/LaravelProjects/estimator/vendor/symfony/translation/TranslatorInterface.php on line 24

   Symfony\Component\Debug\Exception\FatalErrorException  : Interface 'Symfony\Contracts\Translation\LocaleAwareInterface' not found

  at /Users/fbc/LaravelProjects/estimator/vendor/symfony/translation/TranslatorInterface.php:24
    20|  * @author Fabien Potencier <[email protected]>
    21|  *
    22|  * @deprecated since Symfony 4.2, use Symfony\Contracts\Translation\TranslatorInterface instead
    23|  */
  > 24| interface TranslatorInterface extends LocaleAwareInterface
    25| {
    26|     /**
    27|      * Translates the given message.
    28|      *


   Whoops\Exception\ErrorException  : Interface 'Symfony\Contracts\Translation\LocaleAwareInterface' not found

  at /Users/fbc/LaravelProjects/estimator/vendor/symfony/translation/TranslatorInterface.php:24
    20|  * @author Fabien Potencier <[email protected]>
    21|  *
    22|  * @deprecated since Symfony 4.2, use Symfony\Contracts\Translation\TranslatorInterface instead
    23|  */
  > 24| interface TranslatorInterface extends LocaleAwareInterface
    25| {
    26|     /**
    27|      * Translates the given message.
    28|      *

  Exception trace:

  1   Whoops\Run::handleError("Interface 'Symfony\Contracts\Translation\LocaleAwareInterface' not found", "/Users/fbc/LaravelProjects/estimator/vendor/symfony/translation/TranslatorInterface.php")
      /Users/fbc/LaravelProjects/estimator/vendor/filp/whoops/src/Whoops/Run.php:408

  2   Whoops\Run::handleShutdown()
      [internal]:0
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255

Any Ideas?

0 likes
6 replies
Nakov's avatar

@fbc have you tried composer dump-autoload to clear the cache?

And why transferring using USB.. there are free private repositories on GitHub, or BitBucket, much easier, less pain.

1 like
fbc's avatar
Level 2

it doesn't work for some reason.

What did work was deleting the Vendors sub folders and running composer install again.

Sinnbeck's avatar

Never copy the vendor or node_modules folder around. Always install them

fbc's avatar
Level 2

What command reinstalls your node_modules?

Please or to participate in this conversation.