Есть проект на
Silex который достался мне от одного разработчика, я его дорабатываю и понадобилось прикрутить языковую локализацию, имею такую структуру папки
vendor
загружаю репозиторий
composer require symfony/translation
, в итоге получаю следующее:
composer require symfony/translation
Using version ^3.2 for symfony/translation
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing emberlabs/gravatarlib (dev-master)
- Removing phpunit/phpunit (3.7.x-dev)
- Removing phpunit/php-code-coverage (1.2.x-dev)
- Removing phpunit/php-token-stream (dev-master)
- Removing phpunit/phpunit-mock-objects (1.2.x-dev)
- Removing doctrine/dbal (dev-master)
- Removing doctrine/common (2.4.x-dev)
- Removing doctrine/inflector (dev-master)
- Removing doctrine/cache (dev-master)
- Removing doctrine/collections (dev-master)
- Removing doctrine/annotations (dev-master)
- Removing doctrine/lexer (dev-master)
- Removing symfony/validator (dev-master)
- Removing symfony/serializer (dev-master)
- Removing symfony/process (dev-master)
- Removing symfony/monolog-bridge (dev-master)
- Removing monolog/monolog (dev-master)
- Removing symfony/finder (dev-master)
- Removing symfony/css-selector (dev-master)
- Removing symfony/browser-kit (dev-master)
- Removing symfony/dom-crawler (dev-master)
- Removing symfony/form (dev-master)
- Removing symfony/options-resolver (dev-master)
- Removing symfony/property-access (dev-master)
- Removing symfony/locale (dev-master)
- Removing symfony/intl (dev-master)
- Removing symfony/icu (1.0.x-dev)
- Removing symfony/security (dev-master)
- Removing symfony/filesystem (dev-master)
- Installing symfony/filesystem (v3.0.9)
Loading from cache
- Removing symfony/config (dev-master)
- Installing symfony/config (v2.8.14)
Loading from cache
- Removing symfony/yaml (dev-master)
- Installing symfony/yaml (v2.8.14)
Loading from cache
- Installing symfony/polyfill-mbstring (v1.3.0)
Loading from cache
- Removing symfony/translation (dev-master)
- Installing symfony/translation (v3.2.0)
Loading from cache
- Removing swiftmailer/swiftmailer (dev-master)
- Installing swiftmailer/swiftmailer (v5.4.4)
Loading from cache
- Removing symfony/stopwatch (dev-master)
- Installing symfony/stopwatch (v2.8.14)
Loading from cache
- Removing symfony/twig-bridge (dev-master)
- Installing symfony/twig-bridge (v2.8.14)
Loading from cache
- Removing symfony/routing (dev-master)
- Installing symfony/routing (v3.0.9)
Loading from cache
- Removing symfony/http-foundation (dev-master)
- Installing symfony/http-foundation (v3.0.9)
Loading from cache
- Removing symfony/event-dispatcher (dev-master)
- Installing symfony/event-dispatcher (v3.0.9)
Loading from cache
- Removing symfony/debug (dev-master)
- Installing symfony/debug (v3.2.0)
Loading from cache
- Removing symfony/http-kernel (dev-master)
- Installing symfony/http-kernel (v3.0.9)
Loading from cache
- Removing symfony/web-profiler-bundle (dev-master)
- Installing symfony/web-profiler-bundle (v2.8.14)
Loading from cache
- Updating pimple/pimple (1.1.x-dev bc2fc12 => v1.1.1)
Checking out 2019c145fe393923f3441b23f29bbdfaa5c58c4d
- Installing silex/silex (v1.3.5)
Loading from cache
Package kilte/silex-captcha is abandoned, you should avoid using it. Use amstaffix/silex-captcha instead.
Generating autoload files
При открытии приложения естественно возникает ошибка:
Fatal error: Uncaught exception 'ReflectionException' with message 'Class Symfony\Component\Security\Http\Firewall\ContextListener does not exist' in \vendor\silex\silex\src\Silex\Provider\SecurityServiceProvider.php:78 Stack trace: #0 \vendor\silex\silex\src\Silex\Provider\SecurityServiceProvider.php(78): ReflectionMethod->__construct('Symfony\\Compone...', '__construct') #1 \vendor\silex\silex\src\Silex\Application.php(178): Silex\Provider\SecurityServiceProvider->register(Object(Silex\Application)) #2 \src\app.php(138): Silex\Application->register(Object(Silex\Provider\SecurityServiceProvider), Array) #3 \site.ru\index.php(12): require('C:\\OpenServer\\g...') #4 {main} thrown in \vendor\silex\silex\src\Silex\Provider\SecurityServiceProvider.php on line 78
Нашел несколько решений этой проблемы
- Использовать --prefer-dist - не помогло.
- Добавить vendor в .gitignore - результат тот же.
- Удалить все .git из директории - безрезультатно.