0

I'm trying to initialize my symfony project via composer. But I obtain the following error:

Problem 1
    - Installation request for pugx/shortid-php 1.* -> satisfiable by pugx/shortid-php[1.0.x-dev].
    - pugx/shortid-php 1.0.x-dev requires php ^7.1 -> your PHP version (5.4.45) does not satisfy that requirement.
Problem 2
    - Installation request for pugx/shortid-doctrine 1.* -> satisfiable by pugx/shortid-doctrine[1.0.x-dev].
    - pugx/shortid-doctrine 1.0.x-dev requires pugx/shortid-php ^0.5 -> satisfiable by pugx/shortid-php[v0.5.0] but these conflict with your requirements or minimum-stability.
Problem 3
    - Installation request for pugx/shortid-doctrine-bundle 1.* -> satisfiable by pugx/shortid-doctrine-bundle[1.0.x-dev].
    - pugx/shortid-doctrine-bundle 1.0.x-dev requires pugx/shortid-doctrine ^0.4 -> satisfiable by pugx/shortid-doctrine[v0.4.0] but these conflict with your requirements or minimum-stability.

I'm working with PHP 5.4

Below I show an excerpt of my composer.json:

{
    ...

    "autoload": {
        "psr-4": { "": "src/" }
    },
    "require": {
        "php": "^5.4",
        "symfony/symfony": "~2.7",
        "doctrine/orm": "~2.5",
        "doctrine/doctrine-bundle": "~1.4",
        "twig/extensions": "~1.0",
        "pugx/shortid-php": "1.*@dev",
        "pugx/shortid-doctrine": "1.*@dev",
        "pugx/shortid-doctrine-bundle": "1.*@dev",
        "symfony/swiftmailer-bundle": "~2.3",
        "symfony/monolog-bundle": "~2.4",
        "sensio/framework-extra-bundle": "~3.0",
        "sensio/distribution-bundle": "~4.0",
        "sensio/generator-bundle": "~2.3",
        "jms/serializer": "0.16.0",
        "justinrainbow/json-schema": "^5.2"
    },
    "require-dev": {
        "beelab/test-bundle": "~1.0",
        "doctrine/doctrine-fixtures-bundle": "2.2.*",
        "incenteev/composer-parameter-handler": "~2.0",
        "phpunit/phpunit": "4.*",
        "fabpot/php-cs-fixer": "~1.5"
    },
    "config": {
        "bin-dir": "bin"
    },
    ...
}

How can I resolve these errors?

1 Answers1

0

The error message says it all: pugx/shortid-php 1.0.x-dev requires php ^7.1

You will need to either upgrade your project to PHP 7.1 or replace the dependency with a version compatible with PHP 5.4.

Edi Modrić
  • 2,240
  • 1
  • 15
  • 18