Installation via Composer receives an error with certain dependencies - composer-php

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?

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.

Related

Failing to install flutterwave with composer

Good day, i am trying to install flutterwave in my laravel project 9.0 and i have followed the instruction on the Github section https://github.com/kingflamez/laravelrave of flutterwave but i keep getting the following errors
Problem 1
- Root composer.json requires kingflamez/laravelrave ^4.2 -> satisfiable by kingflamez/laravelrave[v4.2.0].
- kingflamez/laravelrave v4.2.0 requires illuminate/support ^5.0|^6.0|^7.0|^8.0 -> found illuminate/support[v5.0.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require kingflamez/laravelrave:*" to figure out if any version is installable, or "composer require kingflamez/laravelrave:^2.1" if you know which you need.
i have tried to change my composer.json but still no success.
"require": {
"php": "^7.2|^8.0.2",
"guzzlehttp/guzzle": "^6.3|^7.0.1|^7.2",
"illuminate/support": "^5.0|^6.0|^7.0|^8.0|^9.21",
"laravel/framework": "^9.11",
"laravel/sanctum": "^2.14.1",
"laravel/socialite": "^5.5",
"laravel/tinker": "^2.7",
"livewire/livewire": "^2.10",
"socialiteproviders/apple": "^5.2",
"socialiteproviders/facebook": "^4.1",
"socialiteproviders/google": "^4.1",
"kingflamez/laravelrave": "^4.2.0"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"laravel/breeze": "^1.9",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.5.10",
"spatie/laravel-ignition": "^1.0"
},
the package is not updated to work with laravel 9 for now. I am having the same issue. i will try and raise the issue soon

composer requires laravel/framework 5.5.32 -> satisfiable by laravel/framework[v5.5.32]

I'm trying to update my composers on my server.
Locally, I managed to update my composers without any problems, but on my server when I run my command for update
composer update
this gives me the following error:
Problem 1
- Root composer.json requires laravel/framework 5.5.32 -> satisfiable by laravel/framework[v5.5.32].
- laracasts/generators dev-master requires illuminate/support ~6.0|~7.0|~8.0 -> satisfiable by illuminate/support[v6.0.0, ..., v6.20.16, v7.0.0, ..., v7.30.4, v8.0.0, ..., v8.28.1].
- Only one of these can be installed: illuminate/support[v4.0.0, ..., v4.2.17, v5.0.0, ..., v5.8.36, v6.0.0, ..., v6.20.16, v7.0.0, ..., v7.30.4, v8.0.0, ..., v8.28.1], laravel/framework[v5.5.32]. laravel/framework replaces illuminate/support and thus cannot coexist with it.
- Root composer.json requires laracasts/generators dev-master as 1.1.4 -> satisfiable by laracasts/generators[dev-master].
And here is my composer.json :
{
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.5.32",
...
"spatie/laravel-newsletter": "^4.2.1",
"spatie/laravel-cookie-consent": "2.11.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~6.0",
"symfony/css-selector": "3.1.*",
"symfony/dom-crawler": "3.1.*",
"laracasts/generators": "dev-master as 1.1.4",
"backpack/generators": "^1.1",
"filp/whoops": "~2.0",
"barryvdh/laravel-debugbar": "^3.1"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
},
"files": [
"app/Http/helpers.php"
]
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"config": {
"preferred-install": "dist"
}
}
You have an error in your packages. Some packages require Laravel 5.5

updating composer / installing a new package conflicting packages

I wanted to install a new package in a Laravel 7 application. I have tried direct composer require command and tried manually entering package name and updating composer command but both times it returns error as follows.
while using command 'composer require simplesoftwareio/simple-qrcode'
Problem 1
- chumper/zipper v1.0.0 requires illuminate/support 5.x -> found illuminate/support[v5.0.0, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.
- chumper/zipper[v1.0.1, ..., v1.0.3] require illuminate/support ^5.0 -> found illuminate/support[v5.0.0, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires chumper/zipper ^1.0 -> satisfiable by chumper/zipper[v1.0.0, v1.0.1, v1.0.2, v1.0.3].
while using command 'composer update'(with or without writing the new package details)
Problem 1
- Root composer.json requires robincsamuel/laravel-msg91 dev-master -> satisfiable by robincsamuel/laravel-msg91[dev-master].
- robincsamuel/laravel-msg91 dev-master requires guzzlehttp/guzzle ^7.0.1 -> found guzzlehttp/guzzle[dev-master, 7.0.1, ..., 7.2.0] but it conflicts with your root composer.json require (~6.0)
Problem 2
- Conclusion: don't install chumper/zipper v1.0.1 (conflict analysis result)
- Conclusion: don't install chumper/zipper v1.0.2 (conflict analysis result)
- Conclusion: don't install chumper/zipper v1.0.3 (conflict analysis result)
- Root composer.json requires chumper/zipper ^1.0 -> satisfiable by chumper/zipper[v1.0.0, v1.0.1, v1.0.2, v1.0.3].
- Conclusion: don't install laravel/framework v7.0.1 (conflict analysis result)
- Conclusion: don't install laravel/framework v7.0.2 (conflict analysis result)
.........
- Conclusion: don't install laravel/framework v7.30.1 (conflict analysis result)
- Conclusion: don't install laravel/framework v7.30.2 (conflict analysis result)
- Conclusion: don't install laravel/framework v7.30.3 (conflict analysis result)
- Conclusion: don't install laravel/framework v7.0.0 (conflict analysis result)
- chumper/zipper v1.0.0 requires illuminate/support 5.x -> satisfiable by illuminate/support[v5.0.0, ..., 5.8.x-dev].
- Only one of these can be installed: illuminate/support[dev-master, v5.0.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev], laravel/framework[v7.0.0, ..., 7.x-dev]. laravel/framework replaces illuminate/support and thus cannot coexist with it.
- Root composer.json requires laravel/framework ^7.0 -> satisfiable by laravel/framework[v7.0.0, ..., 7.x-dev].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
my composer.json file is as followed:
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.4.5",
"africastalking/africastalking": "^2.3",
"anhskohbo/no-captcha": "^3.2",
"barryvdh/laravel-dompdf": "^0.8.6",
"bigbharatjain/laravel-clickatell": "^1.0",
"brian2694/laravel-toastr": "^5.53",
"simplesoftwareio/simple-qrcode": "^4.1",
"chumper/zipper": "^1.0",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^1.0",
"fzaninotto/faker": "^1.9",
"guzzlehttp/guzzle": "~6.0",
"intervention/image": "^2.5",
"jenssegers/agent": "^2.6",
"laravel/framework": "^7.0",
"laravel/passport": "^9.3.2",
"laravel/tinker": "^2.0",
"laravelcollective/html": "^6.1",
"maatwebsite/excel": "^3.1",
"macsidigital/laravel-api-client": "^3.0",
"macsidigital/laravel-zoom": "^4.0",
"macsidigital/zoom": "^0.0.5",
"nwidart/laravel-modules": "^7.1",
"paypal/rest-api-sdk-php": "^1.14",
"phpmailer/phpmailer": "^6.0",
"rahulreghunath/textlocal": "^1.0",
"renatomarinho/laravel-page-speed": "^1.8",
"robincsamuel/laravel-msg91": "dev-master",
"stripe/stripe-php": "^7.37",
"symfony/polyfill-php70": "^1.18.1",
"twilio/sdk": "^5.31",
"unicodeveloper/laravel-paystack": "^1.0"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.3",
"facade/ignition": "^2.0",
"laravel/ui": "~2.0",
"mockery/mockery": "^1.3.1",
"mpociot/laravel-apidoc-generator": "^4.8",
"nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^8.5"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": [
"laravel/telescope"
]
}
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Modules\\": "Modules/"
},
"classmap": [
"database/seeds",
"database/factories"
],
"files": [
"app/Helpers/Helper.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover --ansi"
],
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate --ansi"
]
}
}
Please help me resolve this problem I am hard stuck here for hours with no proper solution I could find on internet.
chumper/zipper v1.0.0 requires illuminate/support 5.x is the most important part of that output: the given package is only compatibel with Laravel v5, while your composer.json contains the requirement "laravel/framework": "^7.0"

Composer conflicts when installingstof/doctrine-extensions-bundle on symfony 5

when trying to install via composer require stof/doctrine-extensions-bundle I get a bunch of messages telling me that there is no way to install the package: Your requirements could not be resolved to an installable set of packages.
Part of the output is:
Problem 1
- Conclusion: remove doctrine/cache 1.10.2
- Conclusion: don't install doctrine/cache 1.10.2
- doctrine/common 2.2.1 conflicts with doctrine/cache[1.10.2].
- doctrine/common 2.2.2 conflicts with doctrine/cache[1.10.2].
- doctrine/common 2.2.3 conflicts with doctrine/cache[1.10.2].
- doctrine/common 2.3.0 conflicts with doctrine/cache[1.10.2].
- Installation request for doctrine/cache (locked at 1.10.2) -> satisfiable by doctrine/cache[1.10.2].
- Installation request for stof/doctrine-extensions-bundle ^1.4 -> satisfiable by stof/doctrine-extensions-bundle[v1.4.0].
- Conclusion: don't install doctrine/common 3.0.2|install doctrine/common 2.2.1|install doctrine/common 2.2.2|install doctrine/common 2.2.3|install doctrine/common 2.3.0
- Conclusion: remove doctrine/common 3.0.2|install doctrine/common 2.2.1|install doctrine/common 2.2.2|install doctrine/common 2.2.3|install doctrine/common 2.3.0
- stof/doctrine-extensions-bundle v1.4.0 requires gedmo/doctrine-extensions ^2.3.4 -> satisfiable by gedmo/doctrine-extensions[v2.3.10, v2.3.11, v2.3.12, v2.3.4, v2.3.5, v2.3.6, v2.3.7, v2.3.8, v2.3.9, v2.4.0, v2.4.1, v2.4.10, v2.4.11, v2.4.12, v2.4.13, v2.4.14, v2.4.15, v2.4.16, v2.4.17, v2.4.18, v2.4.19, v2.4.2, v2.4.20, v2.4.21, v2.4.22, v2.4.23, v2.4.24, v2.4.25, v2.4.26, v2.4.27, v2.4.28, v2.4.29, v2.4.3, v2.4.30, v2.4.31, v2.4.32, v2.4.33, v2.4.34, v2.4.35, v2.4.36, v2.4.37, v2.4.38, v2.4.39, v2.4.4, v2.4.40, v2.4.41, v2.4.42, v2.4.5, v2.4.6, v2.4.7, v2.4.8, v2.4.9].
- gedmo/doctrine-extensions v2.3.10 requires doctrine/common ~2.4 -> satisfiable by doctrine/common[2.12.0, 2.13.0, 2.13.1, 2.13.2, 2.13.3, v2.10.0, v2.11.0, v2.4.0, v2.4.1, v2.4.2, v2.4.3, v2.5.0, v2.5.1, v2.5.2, v2.5.3, v2.6.0, v2.6.1, v2.6.2, v2.7.0, v2.7.1, v2.7.2, v2.7.3, v2.8.0, v2.8.1, v2.9.0].
I have been installing, in this order:
composer require profiler --dev
composer require logger
composer require debug --dev
composer require annotations
composer require sec-checker --dev
composer require twig
composer require symfony/maker-bundle --dev
composer require doctrine
composer require form
composer require stof/doctrine-extensions-bundle
The latter is the first that threw an error
composer:json:
{
"type": "project",
"license": "proprietary",
"require": {
"php": ">=7.2.5",
"ext-ctype": "*",
"ext-iconv": "*",
"composer/package-versions-deprecated": "^1.11",
"doctrine/doctrine-bundle": "^2.1",
"doctrine/doctrine-migrations-bundle": "^3.0",
"doctrine/orm": "^2.7",
"sensio/framework-extra-bundle": "^5.6",
"symfony/console": "5.1.*",
"symfony/dotenv": "5.1.*",
"symfony/flex": "^1.9",
"symfony/form": "5.1.*",
"symfony/framework-bundle": "5.1.*",
"symfony/monolog-bundle": "^3.5",
"symfony/twig-bundle": "^5.1",
"symfony/yaml": "5.1.*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
},
"require-dev": {
"sensiolabs/security-checker": "^6.0",
"symfony/debug-bundle": "^5.1",
"symfony/maker-bundle": "^1.21",
"symfony/stopwatch": "^5.1",
"symfony/var-dumper": "^5.1",
"symfony/web-profiler-bundle": "^5.1"
},
"config": {
"optimize-autoloader": true,
"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-php72": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd",
"security-checker security:check": "script"
},
"post-install-cmd": [
"#auto-scripts"
],
"post-update-cmd": [
"#auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "5.1.*"
}
}
}
Through that list of requirements, you've installed doctrine/common in v3. The latest stable version of gedmo/doctrine-extensions is not yet compatible with that, which you can see in some issues.
You have two options: either wait for some more days or weeks until that package is made compatible, or downgrade doctrine/common before to v2. This is possible by using
composer require doctrine/common:"^2.11" doctrine/persistence:"^1.3"

Laravel Local Package Dependency Issues

In my main composer.json file in the root of my Laravel app I have the following:
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"guzzlehttp/guzzle": "~5.3|~6.0",
"company/package": "dev"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/",
"Company\\Package\\": "packages/company/package/src"
}
},
Then in my package's composer.json file I have this line:
"require": {
"zizaco/entrust": "5.2.x-dev"
},
"minimum-stability": "dev"
When I run composer update from the root directory, I get the following error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- company/package dev-feature/auth requires zizaco/entrust 5.2.x-dev -> satisfiable by zizaco/entrust[5.2.x-dev] but these conflict with your r
equirements or minimum-stability.
- company/package dev-feature/auth requires zizaco/entrust 5.2.x-dev -> satisfiable by zizaco/entrust[5.2.x-dev] but these conflict with your r
equirements or minimum-stability.
- Installation request for company/package dev-feature/auth -> satisfiable by company/package[dev-feature/auth].
I am not sure exactly what is happening? What exactly is the constraint or requirement that is the causing the problem?
I believe I found the issue. In my root composer.json file I changed the following and now it works:
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"guzzlehttp/guzzle": "~5.3|~6.0",
"company/package": "dev-auth"
},

Resources