无法在 Symfony 4.1 上安装奏鸣曲/电子商务

Posted

技术标签:

【中文标题】无法在 Symfony 4.1 上安装奏鸣曲/电子商务【英文标题】:Unable to install sonata/ecommerse on Symfony 4.1 【发布时间】:2019-04-05 15:18:03 【问题描述】:

composer require sonata-project/ecommerce:dev-master
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.1.*"
Your requirements could not be resolved to an installable set of packages.

Problem 1
- egeloen/ckeditor-bundle 6.0.x-dev requires symfony/dependency-injection ^2.7|^3.0 -> no matching package found.
- egeloen/ckeditor-bundle 6.0.1 requires symfony/dependency-injection ^2.7|^3.0 -> no matching package found.
- egeloen/ckeditor-bundle 6.0.0 requires symfony/dependency-injection ^2.7|^3.0 -> no matching package found.
- egeloen/ckeditor-bundle 5.0.3 requires symfony/dependency-injection ^2.7|^3.0 -> no matching package found.
- egeloen/ckeditor-bundle 5.0.2 requires symfony/dependency-injection ^2.7|^3.0 -> no matching package found.
- egeloen/ckeditor-bundle 5.0.1 requires symfony/dependency-injection ^2.7|^3.0 -> no matching package found.
- egeloen/ckeditor-bundle 5.0.0 requires symfony/dependency-injection ^2.7|^3.0 -> no matching package found.
- egeloen/ckeditor-bundle 4.0.6 requires symfony/dependency-injection ^2.2|^3.0 -> no matching package found.
- egeloen/ckeditor-bundle 4.0.5 requires symfony/dependency-injection ^2.2|^3.0 -> no matching package found.
- egeloen/ckeditor-bundle 4.0.4 requires symfony/dependency-injection ^2.2|^3.0 -> no matching package found.
- egeloen/ckeditor-bundle 4.0.3 requires symfony/dependency-injection ~2.2|~3.0 -> no matching package found.
- egeloen/ckeditor-bundle 4.0.2 requires symfony/dependency-injection ~2.2|~3.0 -> no matching package found.
- egeloen/ckeditor-bundle 4.0.1 requires symfony/dependency-injection ~2.2|~3.0 -> no matching package found.
- egeloen/ckeditor-bundle 4.0.0 requires symfony/dependency-injection ~2.2|~3.0 -> no matching package found.
- sonata-project/ecommerce dev-master requires sonata-project/formatter-bundle ^3.4 -> satisfiable by sonata-project/formatter-bundle[3.4.0, 3.4.1,     3.5.0, 3.x-dev].
- sonata-project/formatter-bundle 3.4.0 requires egeloen/ckeditor-bundle ^4.0 || ^5.0 -> satisfiable by egeloen/ckeditor-bundle[4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.0.5, 4.0.6, 5.0.0, 5.0.1, 5.0.2, 5.0.3].
- sonata-project/formatter-bundle 3.4.1 requires egeloen/ckeditor-bundle ^4.0 || ^5.0 -> satisfiable by egeloen/ckeditor-bundle[4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.0.5, 4.0.6, 5.0.0, 5.0.1, 5.0.2, 5.0.3].
- sonata-project/formatter-bundle 3.5.0 requires egeloen/ckeditor-bundle ^4.0 || ^5.0 || ^6.0 -> satisfiable by egeloen/ckeditor-bundle[4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.0.5, 4.0.6, 5.0.0, 5.0.1, 5.0.2, 5.0.3, 6.0.0, 6.0.1, 6.0.x-dev].
- sonata-project/formatter-bundle 3.x-dev requires egeloen/ckeditor-bundle ^4.0 || ^5.0 || ^6.0 -> satisfiable by egeloen/ckeditor-bundle[4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.0.5, 4.0.6, 5.0.0, 5.0.1, 5.0.2, 5.0.3, 6.0.0, 6.0.1, 6.0.x-dev].
- Installation request for sonata-project/ecommerce dev-master -> satisfiable by sonata-project/ecommerce[dev-master].

Potential causes:

A typo in the package name
The package is not available in a stable-enough version according to your minimum-stability setting
see https://getcomposer.org/doc/04-schema.md#minimum-stability for more details.
    It's a private package and you forgot to add a custom repository to find it
Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

Installation failed, reverting ./composer.json to its original content.

【问题讨论】:

能否请您显示您的composer.json 文件的内容和composer show 的输出? 【参考方案1】:

@xabbuh composer.json


"type": "project",
"license": "proprietary",
"require": 
    "php": "^7.1.3",
    "ext-ctype": "*",
    "ext-iconv": "*",
    "sensio/framework-extra-bundle": "^5.1",
    "sonata-project/admin-bundle": "^3.40",
    "sonata-project/datagrid-bundle": "^2.4",
    "sonata-project/doctrine-orm-admin-bundle": "^3.6",
    "sonata-project/easy-extends-bundle": "^2.5",
    "sonata-project/notification-orm-pack": "^1.0",
    "sonata-project/page-bundle": "^3.9",
    "sonata-project/seo-bundle": "^2.6",
    "sonata-project/user-bundle": "^4.2",
    "symfony/asset": "*",
    "symfony/console": "*",
    "symfony/expression-language": "*",
    "symfony/flex": "^1.1",
    "symfony/form": "*",
    "symfony/framework-bundle": "*",
    "symfony/monolog-bundle": "^3.1",
    "symfony/orm-pack": "*",
    "symfony/process": "*",
    "symfony/security-bundle": "*",
    "symfony/serializer-pack": "*",
    "symfony/swiftmailer-bundle": "^3.1",
    "symfony/twig-bundle": "*",
    "symfony/validator": "*",
    "symfony/web-link": "*",
    "symfony/yaml": "*"
,
"require-dev": 
    "symfony/debug-pack": "*",
    "symfony/dotenv": "*",
    "symfony/maker-bundle": "^1.0",
    "symfony/profiler-pack": "*",
    "symfony/test-pack": "*",
    "symfony/web-server-bundle": "*"
,
"config": 
    "preferred-install": 
        "*": "dist"
    ,
    "sort-packages": true
,
"autoload": 
    "psr-4": 
        "App\\": "src/"
    
,
"autoload-dev": 
    "psr-4": 
        "App\\Tests\\": "tests/"
    
,
"replace": 
    "paragonie/random_compat": "2.*",
    "symfony/polyfill-ctype": "*",
    "symfony/polyfill-iconv": "*",
    "symfony/polyfill-php71": "*",
    "symfony/polyfill-php70": "*",
    "symfony/polyfill-php56": "*"
,
"scripts": 
    "auto-scripts": 
        "cache:clear": "symfony-cmd",
        "assets:install %PUBLIC_DIR%": "symfony-cmd"
    ,
    "post-install-cmd": [
        "@auto-scripts"
    ],
    "post-update-cmd": [
        "@auto-scripts"
    ]
,
"conflict": 
    "symfony/symfony": "*"
,
"extra": 
    "symfony": 
        "allow-contrib": true,
        "require": "4.1.*"
    

composer show

cocur/slugify v3.1 Converts a string into a slug. doctrine/annotations v1.6.0 Docblock Annotations Parser doctrine/cache v1.8.0 Caching library offering an object-oriented API for many cache backends doctrine/collections v1.5.0 Collections Abstraction library doctrine/common v2.9.0 Common Library for Doctrine projects doctrine/dbal v2.8.0 Database Abstraction Layer doctrine/doctrine-bundle 1.9.1 Symfony DoctrineBundle doctrine/doctrine-cache-bundle 1.3.3 Symfony Bundle for Doctrine Cache doctrine/doctrine-migrations-bundle v1.3.1 Symfony DoctrineMigrationsBundle doctrine/event-manager v1.0.0 Doctrine Event Manager component doctrine/inflector v1.3.0 Common String Manipulations with regard to casing and singular/plural rules. doctrine/instantiator 1.1.0 A small, lightweight utility to instantiate objects in PHP without invoking their constructors doctrine/lexer v1.0.1 Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers. doctrine/migrations v1.8.1 Database Schema migrations using Doctrine DBAL doctrine/orm v2.6.2 Object-Relational-Mapper for PHP doctrine/persistence v1.0.1 Doctrine Persistence abstractions. doctrine/reflection v1.0.0 Doctrine Reflection component easycorp/easy-log-handler v1.0.7 A handler for Monolog that optimizes log messages to be processed by humans instead of software. Improve your productivity with logs that are easy to understand. egulias/email-validator 2.1.6 A library for validating emails against several RFCs facebook/webdriver 1.6.0 A PHP client for Selenium WebDriver fig/link-util 1.0.0 Common utility implementations for HTTP links friendsofsymfony/user-bundle v2.1.2 Symfony FOSUserBundle jdorn/sql-formatter v1.2.17 a PHP SQL highlighting library knplabs/knp-menu 2.3.0 An object oriented menu library knplabs/knp-menu-bundle v2.2.1 This bundle provides an integration of the KnpMenu library monolog/monolog 1.23.0 Sends your logs to files, sockets, inboxes, databases and various web services nikic/php-parser v4.1.0 A PHP parser written in PHP ocramius/package-versions 1.3.0 Composer plugin that provides efficient querying for installed package versions (no runtime IO) ocramius/proxy-manager 2.1.1 A library providing utilities to generate, instantiate and generally operate with Object Proxies phpdocumentor/reflection-common 1.0.1 Common reflection classes used by phpdocumentor to reflect the code structure phpdocumentor/reflection-docblock 4.3.0 With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock. phpdocumentor/type-resolver 0.4.0 psr/cache 1.0.1 Common interface for caching libraries psr/container 1.0.0 Common Container Interface (PHP FIG PSR-11) psr/link 1.0.0 Common interfaces for HTTP links psr/log 1.0.2 Common interface for logging libraries psr/simple-cache 1.0.1 Common interfaces for simple caching sensio/framework-extra-bundle v5.2.2 This bundle provides a way to configure your controllers with annotations sonata-project/admin-bundle 3.40.2 The missing Symfony Admin Generator sonata-project/block-bundle 3.12.1 Symfony SonataBlockBundle sonata-project/cache 1.1.1 Cache library sonata-project/cache-bundle 2.4.2 This bundle provides caching services sonata-project/core-bundle 3.11.2 Symfony SonataCoreBundle sonata-project/datagrid-bundle 2.4.0 Symfony SonataDatagridBundle sonata-project/doctrine-extensions 1.1.0 Doctrine2 behavioral extensions sonata-project/doctrine-orm-admin-bundle 3.6.3 Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle sonata-project/easy-extends-bundle 2.5.0 Symfony SonataEasyExtendsBundle sonata-project/exporter 1.9.1 Lightweight Exporter library sonata-project/notification-bundle 3.5.1 Symfony SonataNotificationBundle sonata-project/notification-orm-pack 1.0.0 A pack for SonataNotificationBundle with ORM support sonata-project/page-bundle 3.9.0 This bundle provides a Site and Page management through container and block services sonata-project/seo-bundle 2.6.1 Symfony SonataSeoBundle sonata-project/user-bundle 4.2.3 Symfony SonataUserBundle swiftmailer/swiftmailer v6.1.3 Swiftmailer, free feature-rich PHP mailer symfony-cmf/routing 2.1.0 Extends the Symfony routing component for dynamic routes and chaining several routers symfony-cmf/routing-bundle 2.1.1 Symfony RoutingBundle symfony/asset v4.1.6 Symfony Asset Component symfony/browser-kit v4.1.6 Symfony BrowserKit Component symfony/cache v4.1.6 Symfony Cache component with PSR-6, PSR-16, and tags symfony/config v4.1.6 Symfony Config Component symfony/console v4.1.6 Symfony Console Component symfony/css-selector v4.1.6 Symfony CssSelector Component symfony/debug v4.1.6 Symfony Debug Component symfony/debug-bundle v4.1.6 Symfony DebugBundle symfony/debug-pack v1.0.6 A debug pack for Symfony projects symfony/dependency-injection v4.1.6 Symfony DependencyInjection Component symfony/doctrine-bridge v4.1.6 Symfony Doctrine Bridge symfony/dom-crawler v4.1.6 Symfony DomCrawler Component symfony/dotenv v4.1.6 Registers environment variables from a .env file symfony/event-dispatcher v4.1.6 Symfony EventDispatcher Component symfony/expression-language v4.1.6 Symfony ExpressionLanguage Component symfony/filesystem v4.1.6 Symfony Filesystem Component symfony/finder v4.1.6 Symfony Finder Component symfony/flex v1.1.1 Composer plugin for Symfony symfony/form v4.1.6 Symfony Form Component symfony/framework-bundle v4.1.6 Symfony FrameworkBundle symfony/http-foundation v4.1.6 Symfony HttpFoundation Component symfony/http-kernel v4.1.6 Symfony HttpKernel Component symfony/inflector v4.1.6 Symfony Inflector Component symfony/intl v4.1.6 A PHP replacement layer for the C intl extension that includes additional data from the ICU library. symfony/maker-bundle v1.8.0 Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code. symfony/monolog-bridge v4.1.6 Symfony Monolog Bridge symfony/monolog-bundle v3.3.0 Symfony MonologBundle symfony/options-resolver v4.1.6 Symfony OptionsResolver Component symfony/orm-pack v1.0.5 A pack for the Doctrine ORM symfony/panther v0.2.0 A browser testing and web scraping library for PHP and Symfony. symfony/phpunit-bridge v4.1.6 Symfony PHPUnit Bridge symfony/polyfill-intl-icu v1.10.0 Symfony polyfill for intl's ICU-related data and classes symfony/polyfill-mbstring v1.10.0 Symfony polyfill for the Mbstring extension symfony/polyfill-php72 v1.10.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions symfony/process v4.1.6 Symfony Process Component symfony/profiler-pack v1.0.3 A pack for the Symfony web profiler symfony/property-access v4.1.6 Symfony PropertyAccess Component symfony/property-info v4.1.6 Symfony Property Info Component symfony/routing v4.1.6 Symfony Routing Component symfony/security v4.1.6 Symfony Security Component symfony/security-acl v3.0.1 Symfony Security Component - ACL (Access Control List) symfony/security-bundle v4.1.6 Symfony SecurityBundle symfony/serializer v4.1.6 Symfony Serializer Component symfony/serializer-pack v1.0.1 A pack for the Symfony serializer symfony/stopwatch v4.1.6 Symfony Stopwatch Component symfony/swiftmailer-bundle v3.2.4 Symfony SwiftmailerBundle symfony/templating v4.1.6 Symfony Templating Component symfony/test-pack v1.0.4 A pack for functional and end-to-end testing within a Symfony app symfony/translation v4.1.6 Symfony Translation Component symfony/twig-bridge v4.1.6 Symfony Twig Bridge symfony/twig-bundle v4.1.6 Symfony TwigBundle symfony/validator v4.1.6 Symfony Validator Component symfony/var-dumper v4.1.6 Symfony mechanism for exploring and dumping PHP variables symfony/web-link v4.1.6 Symfony WebLink Component symfony/web-profiler-bundle v4.1.6 Symfony WebProfilerBundle symfony/web-server-bundle v4.1.6 Symfony WebServerBundle symfony/yaml v4.1.6 Symfony Yaml Component twig/extensions v1.5.2 Common additional features for Twig that do not directly belong in core twig/twig v2.5.0 Twig, the flexible, fast, and secure template language for PHP webmozart/assert 1.3.0 Assertions to validate method input/output with nice error messages. zendframework/zend-code 3.3.1 provides facilities to generate arbitrary code using an object oriented interface zendframework/zend-eventmanager 3.2.1 Trigger and listen to events within a PHP application zendframework/zenddiagnostics v1.3.1 A set of components for performing diagnostic tests in PHP applications

【讨论】:

以上是关于无法在 Symfony 4.1 上安装奏鸣曲/电子商务的主要内容,如果未能解决你的问题,请参考以下文章

无法使用 symfony 5 安装奏鸣曲管理员

Symfony 2 / Sonata / 电子商务路线问题

我无法使用 symfony 5 安装 sonataAdminBundle

Symfony 3.2.7 和奏鸣曲媒体包安装

无法扩展奏鸣曲 symfony 的 ProfileFOSUser1Controller

Symfony 4 为奏鸣曲管理包安装 sensio/generator-bundle 时出错