代码之家  ›  专栏  ›  技术社区  ›  Tsounabe

composer使用80s和2go读取sonata项目/媒体包json文件

  •  0
  • Tsounabe  · 技术社区  · 6 年前

    composer需要很长时间(~80)和大量内存(~2g)才能从缓存中读取sonata project$media-bundle.json文件。

    以下是 composer update --profile -vvv:

    ...
    [453.5MB/19.15s] Reading C:/Users/me/AppData/Local/Composer/repo/https---repo.packagist.org/provider-symfony$messenger.json from cache
    
    [2362.9MB/103.15s] Reading C:/Users/me/AppData/Local/Composer/repo/https---repo.packagist.org/provider-sonata-project$media-bundle.json from cache
    
    [2390.0MB/103.62s] Reading C:/Users/me/AppData/Local/Composer/repo/https---repo.packagist.org/provider-friendsofsymfony$rest-bundle.json from cache
    ...
    

    在composer.lock中,Sonata管理包的冲突部分中只有一个Sonata项目/媒体包:

    ...
    ,{
                "name": "sonata-project/admin-bundle",
                "version": "3.40.2",
                "source": {
                    "type": "git",
                    "url": "https://github.com/sonata-project/SonataAdminBundle.git",
                    "reference": "0994f416bf85de1f83f9d657f9e578dd1eb0ca81"
                },
                "dist": {
                    "type": "zip",
                    "url": "https://api.github.com/repos/sonata-project/SonataAdminBundle/zipball/0994f416bf85de1f83f9d657f9e578dd1eb0ca81",
                    "reference": "0994f416bf85de1f83f9d657f9e578dd1eb0ca81",
                    "shasum": ""
                },
                "require": {
                    "doctrine/common": "^2.7",
                    "doctrine/inflector": "^1.1",
                    "knplabs/knp-menu-bundle": "^2.2",
                    "php": "^5.6 || ^7.0",
                    "sonata-project/block-bundle": "^3.11",
                    "sonata-project/core-bundle": "^3.9",
                    "sonata-project/exporter": "^1.8",
                    "symfony/asset": "^2.8 || ^3.2 || ^4.0",
                    "symfony/config": "^2.8 || ^3.2 || ^4.0",
                    "symfony/console": "^2.8 || ^3.2 || ^4.0",
                    "symfony/dependency-injection": "^2.8 || ^3.2 || ^4.0",
                    "symfony/event-dispatcher": "^2.8 || ^3.2 || ^4.0",
                    "symfony/expression-language": "^2.8 || ^3.2 || ^4.0",
                    "symfony/form": "^2.8 || ^3.2 || ^4.0",
                    "symfony/framework-bundle": "^2.8 || ^3.2 || ^4.0",
                    "symfony/http-foundation": "^2.8 || ^3.2 || ^4.0",
                    "symfony/http-kernel": "^2.8 || ^3.2 || ^4.0",
                    "symfony/options-resolver": "^2.8 || ^3.2 || ^4.0",
                    "symfony/property-access": "^2.8 || ^3.2 || ^4.0",
                    "symfony/routing": "^2.8 || ^3.2 || ^4.0",
                    "symfony/security-acl": "^2.8 || ^3.0",
                    "symfony/security-bundle": "^2.8 || ^3.2 || ^4.0",
                    "symfony/security-core": "^2.8 || ^3.2 || ^4.0",
                    "symfony/security-csrf": "^2.8 || ^3.2 || ^4.0",
                    "symfony/templating": "^2.8 || ^3.2 || ^4.0",
                    "symfony/translation": "^2.8 || ^3.2 || ^4.0",
                    "symfony/twig-bridge": "^2.8 || ^3.2 || ^4.0",
                    "symfony/twig-bundle": "^2.8 || ^3.2 || ^4.0",
                    "symfony/validator": "^2.8 || ^3.2 || ^4.0",
                    "twig/extensions": "^1.5",
                    "twig/twig": "^1.34 || ^2.0"
                },
                "conflict": {
                    "jms/di-extra-bundle": "<1.9",
                    "sonata-project/media-bundle": "<3.7",
                    "sonata-project/user-bundle": "<3.3"
                },
                "require-dev": {
                    "jms/di-extra-bundle": "^1.9",
                    "jms/translation-bundle": "^1.4",
                    "matthiasnoback/symfony-dependency-injection-test": "^1.1",
                    "sensio/generator-bundle": "^3.1",
                    "sonata-project/intl-bundle": "^2.4",
                    "symfony/class-loader": "^2.8 || ^3.2",
                    "symfony/filesystem": "^2.8 || ^3.2 || ^4.0",
                    "symfony/phpunit-bridge": "^4.0",
                    "symfony/yaml": "^2.8 || ^3.2 || ^4.0"
                },
                "suggest": {
                    "jms/di-extra-bundle": "Annotations for Admin definition",
                    "jms/translation-bundle": "Extract message keys from Admins",
                    "sensio/generator-bundle": "Add sonata:admin:generate command",
                    "sonata-project/intl-bundle": "Add localized date and number into the list"
                },
                "type": "symfony-bundle",
                "extra": {
                    "branch-alias": {
                        "dev-master": "3.x-dev"
                    }
                },
                "autoload": {
                    "psr-4": {
                        "Sonata\\AdminBundle\\": "src/"
                    }
                },
                "notification-url": "https://packagist.org/downloads/",
                "license": [
                    "MIT"
                ],
                "authors": [
                    {
                        "name": "Sonata Community",
                        "homepage": "https://github.com/sonata-project/SonataAdminBundle/contributors"
                    },
                    {
                        "name": "Thomas Rabaix",
                        "email": "thomas.rabaix@sonata-project.org",
                        "homepage": "https://sonata-project.org"
                    }
                ],
                "description": "The missing Symfony Admin Generator",
                "homepage": "https://sonata-project.org/bundles/admin",
                "keywords": [
                    "Admin Generator",
                    "admin",
                    "bootstrap",
                    "sonata"
                ],
                "time": "2018-10-17T08:36:10+00:00"
            },
    ...
    

    有人能解释原因和解决方法吗?

    谢谢!

    0 回复  |  直到 6 年前
    推荐文章