запуск composer установки для проекта symfony 3.1 - PullRequest
0 голосов
/ 08 февраля 2020

Я пытаюсь установить на виртуальной машине устаревший проект, написанный на symfony 3.1.

Проект не имеет версий, папка проекта была скопирована с рабочего сервера, на котором не было файл composer. json. Файл был восстановлен с введенного в эксплуатацию компьютера.

После устранения некоторых проблем с файлом composer. json проблема возникает, когда я запускаю composer install, процесс завершается с этим сообщением.

Generating autoload files


  [RuntimeException]                                                                                                                                              
  Could not scan for classes inside "/vagrant/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs" which does not appear to be a file nor a folder  

Это полный вывод

vagrant@vagrant:/vagrant$ composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 46 installs, 0 updates, 0 removals
  - Installing symfony/polyfill-ctype (v1.13.1): Downloading (100%)         
  - Installing symfony/polyfill-mbstring (v1.13.1): Downloading (100%)         
  - Installing twig/twig (v2.12.3): Downloading (100%)         
  - Installing symfony/polyfill-util (v1.13.1): Downloading (100%)         
  - Installing paragonie/random_compat (v9.99.99): Downloading (100%)         
  - Installing symfony/polyfill-php70 (v1.13.1): Downloading (100%)         
  - Installing symfony/polyfill-php56 (v1.13.1): Downloading (100%)         
  - Installing symfony/symfony (v3.1.10): Downloading (100%)         
  - Installing symfony/polyfill-intl-icu (v1.13.1): Downloading (100%)         
  - Installing psr/log (1.1.2): Downloading (100%)         
  - Installing psr/cache (1.0.1): Downloading (100%)         
  - Installing doctrine/lexer (1.2.0): Downloading (100%)         
  - Installing doctrine/annotations (v1.8.0): Downloading (100%)         
  - Installing doctrine/reflection (v1.1.0): Downloading (100%)         
  - Installing doctrine/event-manager (1.1.0): Downloading (100%)         
  - Installing doctrine/collections (1.6.4): Downloading (100%)         
  - Installing doctrine/cache (1.10.0): Downloading (100%)         
  - Installing doctrine/persistence (1.3.6): Downloading (100%)         
  - Installing doctrine/inflector (1.3.1): Downloading (100%)         
  - Installing doctrine/common (2.12.0): Downloading (100%)         
  - Installing symfony/polyfill-apcu (v1.13.1): Downloading (100%)         
  - Installing evence/soft-deleteable-extension-bundle (1.1): Downloading (100%)         
  - Installing behat/transliterator (v1.3.0): Downloading (100%)         
  - Installing gedmo/doctrine-extensions (v2.4.39): Downloading (100%)         
  - Installing stof/doctrine-extensions-bundle (v1.2.2): Downloading (100%)         
  - Installing doctrine/instantiator (1.3.0): Downloading (100%)         
  - Installing doctrine/dbal (v2.10.1): Downloading (100%)         
    Skipped installation of bin bin/doctrine-dbal for package doctrine/dbal: file not found in package
  - Installing doctrine/orm (v2.7.0): Downloading (100%)         
    Skipped installation of bin bin/doctrine for package doctrine/orm: file not found in package
  - Installing doctrine/doctrine-cache-bundle (1.3.2): Downloading (100%)         
  - Installing jdorn/sql-formatter (v1.2.17): Downloading (100%)         
  - Installing doctrine/doctrine-bundle (1.10.3): Downloading (100%)         
  - Installing swiftmailer/swiftmailer (v5.4.12): Downloading (100%)         
  - Installing symfony/swiftmailer-bundle (v2.6.7): Downloading (100%)         
  - Installing monolog/monolog (1.25.3): Downloading (100%)         
  - Installing symfony/monolog-bundle (v2.12.1): Downloading (100%)         
  - Installing composer/ca-bundle (1.2.6): Downloading (100%)         
  - Installing sensiolabs/security-checker (v5.0.3): Downloading (100%)         
    Skipped installation of bin security-checker for package sensiolabs/security-checker: file not found in package
  - Installing sensio/distribution-bundle (v5.0.25): Downloading (100%)         
  - Installing sensio/framework-extra-bundle (v3.0.29): Downloading (100%)         
  - Installing incenteev/composer-parameter-handler (v2.1.3): Downloading (100%)         
  - Installing knplabs/knp-snappy (v1.0.4): Downloading (100%)         
  - Installing knplabs/knp-snappy-bundle (v1.6.0): Downloading (100%)         
  - Installing jms/metadata (1.7.0): Downloading (100%)         
  - Installing vich/uploader-bundle (1.6.2): Downloading (100%)         
  - Installing sensio/generator-bundle (v3.1.7): Downloading (100%)         
  - Installing symfony/phpunit-bridge (v3.4.37): Downloading (100%)         
    Skipped installation of bin bin/simple-phpunit for package symfony/phpunit-bridge: file not found in package
symfony/polyfill-mbstring suggests installing ext-mbstring (For best performance)
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
symfony/polyfill-intl-icu suggests installing ext-intl (For best performance)
doctrine/cache suggests installing alcaeus/mongo-php-adapter (Required to use legacy MongoDB driver)
gedmo/doctrine-extensions suggests installing doctrine/mongodb-odm (to use the extensions with the MongoDB ODM)
stof/doctrine-extensions-bundle suggests installing doctrine/mongodb-odm-bundle (to use the MongoDB ODM extensions)
doctrine/doctrine-cache-bundle suggests installing symfony/security-acl (For using this bundle to cache ACLs)
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing sentry/sentry (Allow sending log messages to a Sentry server)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
sensio/framework-extra-bundle suggests installing symfony/psr-http-message-bridge (To use the PSR-7 converters)
knplabs/knp-snappy suggests installing h4cc/wkhtmltopdf-amd64 (Provides wkhtmltopdf-amd64 binary for Linux-compatible machines, use version `~0.12` as dependency)
knplabs/knp-snappy suggests installing h4cc/wkhtmltopdf-i386 (Provides wkhtmltopdf-i386 binary for Linux-compatible machines, use version `~0.12` as dependency)
knplabs/knp-snappy suggests installing h4cc/wkhtmltoimage-amd64 (Provides wkhtmltoimage-amd64 binary for Linux-compatible machines, use version `~0.12` as dependency)
knplabs/knp-snappy suggests installing h4cc/wkhtmltoimage-i386 (Provides wkhtmltoimage-i386 binary for Linux-compatible machines, use version `~0.12` as dependency)
knplabs/knp-snappy suggests installing wemersonjanuario/wkhtmltopdf-windows (Provides wkhtmltopdf executable for Windows, use version `~0.12` as dependency)
vich/uploader-bundle suggests installing doctrine/phpcr-odm (^1.0)
vich/uploader-bundle suggests installing doctrine/mongodb-odm-bundle (*)
vich/uploader-bundle suggests installing knplabs/knp-gaufrette-bundle (^0.4)
vich/uploader-bundle suggests installing willdurand/propel-eventdispatcher-bundle (^1.2)
vich/uploader-bundle suggests installing liip/imagine-bundle (^1.7)
Package sensio/generator-bundle is abandoned, you should avoid using it. No replacement was suggested.
Writing lock file
Generating autoload files


  [RuntimeException]                                                                                                                                              
  Could not scan for classes inside "/vagrant/vendor/symfony/symfony/src/Symfony/Component/Intl/Resources/stubs" which does not appear to be a file nor a folder  


install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...

После сбоя процесса в папке /vendor есть только файл vendor/composer/installed.json.

Это мой composer.json

{
    "name": "xyz/abc",
    "license": "proprietary",
    "type": "project",
    "autoload": {
        "psr-4": {
            "": "src/"
        },
        "classmap": [
            "app/AppCache.php",
            "app/AppKernel.php",
            "app/BaseKernel.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "require": {
        "php": ">=5.5.9",
        "symfony/symfony": "3.1.*",
        "doctrine/orm": "^2.5",
        "doctrine/doctrine-bundle": "^1.6",
        "doctrine/doctrine-cache-bundle": "^1.2",
        "symfony/swiftmailer-bundle": "^2.3",
        "symfony/monolog-bundle": "^2.8",
        "symfony/polyfill-apcu": "^1.0",
        "sensio/distribution-bundle": "^5.0",
        "sensio/framework-extra-bundle": "^3.0.2",
        "incenteev/composer-parameter-handler": "^2.0",
        "stof/doctrine-extensions-bundle": "^1.2.2",
        "knplabs/knp-snappy-bundle": "~1.4",
        "vich/uploader-bundle": "^1.2",
        "evence/soft-deleteable-extension-bundle": "1.1"
    },
    "require-dev": {
        "sensio/generator-bundle": "^3.0",
        "symfony/phpunit-bridge": "^3.0"
    },
    "scripts": {
        "post-install-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
        ],
        "post-update-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
        ]
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-bin-dir": "bin",
        "symfony-var-dir": "var",
        "symfony-web-dir": "web",
        "symfony-tests-dir": "tests",
        "symfony-assets-install": "relative",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        }
    }
}

У вас есть идеи, как это исправить?

В качестве альтернативы, с рабочего сервера у меня уже есть весь файл vendor. Тем не менее, когда я пытаюсь получить доступ из браузера, я получаю

RuntimeException in ClassCollectionLoader.php line 285:
Failed to write cache file "/vagrant/var/cache/dev/classes.php".

Или у вас есть какие-либо идеи о том, как запустить этот проект?

...