Skip to content

[Bug] symfony/symfony (^3.1) does not "provides" psr/cache-implementation #19742

Closed
@alcohol

Description

@alcohol

One has to install symfony/cache twice (once stand-alone, once as part of symfony/symfony) to fulfil the requirement of packages that depend on psr/cache-implementation. This also means that one cannot have symfony/symfony 3.1.x installed as these replace symfony/cache 3.1.x

composer require symfony/symfony ^3.0

 % composer require symfony/symfony ^3.0
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing psr/log (1.0.0)
    Loading from cache

  - Installing doctrine/lexer (v1.0.1)
    Loading from cache

  - Installing doctrine/inflector (v1.1.0)
    Loading from cache

  - Installing doctrine/collections (v1.3.0)
    Loading from cache

  - Installing doctrine/cache (v1.6.0)
    Loading from cache

  - Installing doctrine/annotations (v1.2.7)
    Loading from cache

  - Installing doctrine/common (v2.6.1)
    Loading from cache

  - Installing psr/cache (1.0.1)
    Loading from cache

  - Installing twig/twig (v1.24.1)
    Loading from cache

  - Installing symfony/polyfill-util (v1.2.0)
    Loading from cache

  - Installing paragonie/random_compat (v2.0.2)
    Loading from cache

  - Installing symfony/polyfill-php70 (v1.2.0)
    Loading from cache

  - Installing symfony/polyfill-php56 (v1.2.0)
    Loading from cache

  - Installing symfony/polyfill-mbstring (v1.2.0)
    Loading from cache

  - Installing symfony/polyfill-intl-icu (v1.2.0)
    Loading from cache

  - Installing symfony/symfony (v3.1.3)
    Loading from cache

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)
Writing lock file
Generating autoload files

composer require cache/psr-6-doctrine-bridge (fails)

 % composer require cache/psr-6-doctrine-bridge
Using version ^2.2 for cache/psr-6-doctrine-bridge
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for cache/psr-6-doctrine-bridge ^2.2 -> satisfiable by cache/psr-6-doctrine-bridge[2.2.0].
    - cache/psr-6-doctrine-bridge 2.2.0 requires psr/cache-implementation ^1.0 -> no matching package found.

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.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

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

composer require symfony/cache cache/psr-6-doctrine-bridge (success, but downgrades symfony/symfony)

 % composer require symfony/cache cache/psr-6-doctrine-bridge
Using version ^3.1 for symfony/cache
Using version ^2.2 for cache/psr-6-doctrine-bridge
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Removing symfony/symfony (v3.1.3)
  - Installing symfony/symfony (v3.0.9)
    Loading from cache

  - Installing symfony/cache (v3.1.3)
    Loading from cache

  - Installing cache/psr-6-doctrine-bridge (2.2.0)
    Loading from cache

symfony/cache suggests installing symfony/polyfill-apcu (For using ApcuAdapter on HHVM)
Writing lock file
Generating autoload files

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions