Two weeks ago I didn't have any problem, but today this appears when I put 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
Illuminate\Foundation\ComposerScripts::postAutoloadDump PHP Fatal error: Interface 'Psr\Container\ContainerInterface' not found in /opt/lampp/htdocs/nuevodirectorio/ClinicaLaravel/vendor/laravel/framework/src/Illuminate/Contracts/Container/Container.php on line 8
Fatal error: Interface 'Psr\Container\ContainerInterface' not found in /opt/lampp/htdocs/nuevodirectorio/ClinicaLaravel/vendor/laravel/framework/src/Illuminate/Contracts/Container/Container.php on line 8
Here is part of the code of Container.php:
<?php
namespace Illuminate\Container;
use Closure;
use Exception;
use ArrayAccess;
use LogicException;
use ReflectionClass;
use ReflectionParameter;
use Illuminate\Support\Arr;
use Illuminate\Contracts\Container\BindingResolutionException;
use Illuminate\Contracts\Container\Container as ContainerContract;
class Container implements ArrayAccess, ContainerContract
{
...
}
I had the same issue.
Still investigating, but what I discovered so far is that, running composer install --no-dev [...]
, I have the package psr/container
in vendor/psr/container
in vendors, but 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
line missing in vendor/composer/autoload_psr4.php
.
For the time being, I fixed it including dev dependencies, until I figure out the real fix.