Symfony2: composer exception - symfony/framework-standard-edition 2.4.x-dev requires tobie/ua-parser dev- master -> no matching package found

StackOverflow https://stackoverflow.com//questions/22004189

  •  20-12-2019
  •  | 
  •  

Question

This is my composer.json

"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.4.1",
    "doctrine/orm": "2.4.1",
    "doctrine/doctrine-bundle": "1.2.0",
    "twig/extensions": "1.0.1",
    "symfony/assetic-bundle": "2.3.0",
    "symfony/dom-crawler": "2.3.10",
    "symfony/swiftmailer-bundle": "2.3.4",
    "symfony/monolog-bundle": "2.4.1",
    "sensio/distribution-bundle": "2.3.4",
    "sensio/framework-extra-bundle": "3.0",
    "sensio/generator-bundle": "2.3.4",
    "incenteev/composer-parameter-handler": "2.1.0",
    "tobie/ua-parser": "dev-master"
},
{
    ...
},
"config": {
    "bin-dir": "bin"
},
"minimum-stability": "dev",
"extra": {
    "symfony-app-dir": "app",
    "symfony-web-dir": "web",
    "incenteev-parameters": {
        "file": "app/config/parameters.yml"
    },
    "branch-alias": {
        "dev-master": "2.4-dev"
    }
}

However, when i run composer install, it is throwing the following errors:

Your requirements could not be resolved to an installable set of packages.

Problem 1 - Installation request for symfony/framework-standard-edition 2.4.x-dev -> s atisfiable by symfony/framework-standard-edition[2.4.x-dev]. - symfony/framework-standard-edition 2.4.x-dev requires tobie/ua-parser dev- master -> 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 min imum-stability setting see https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion f or more details.

Read http://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

Was it helpful?

Solution

solution:

The latest stable release (0.3.2) that uses semantic versioning for the tobie/ua-parser library was tagged a long time ago.

This old release didn't include a composer.json.

Therefore the package tobie/ua-parser doesn't have a stable version on packagist.

You can install the package by adding the @dev stability flag.

composer require 'tobie/ua-parser:*@dev'
composer update 'tobie/ua-parser'

tip:

You should change your global minimum-stability back to stable and only add stability-flags to certain packages that you really need in a bleeding-edge version!

Setting the global minimum stability to dev is a bad practice and can easily break your application.

Change it to:

"minimum-stability": "stable",

... or at least include the prefer-stable option in your composer.json.

"prefer-stable": true
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top