Symfony - ORM Pack conflict with symfony/dependency-injection on installation - php

I am using Symfony for the first time and I have created a new project using the following command listed in their documentation:
symfony new my_project_directory
Everything works fine up to this point and the project is created without problems, the problem occurs when I try to install the ORM Pack. I use the following command, that are listed in the Symfony documentation:
composer require symfony/orm-pack
But I have this error:
Using version ^2.3 for symfony/orm-pack
./composer.json has been updated
Running composer update symfony/orm-pack
Loading composer repositories with package information
Restricting packages listed in "symfony/symfony" to "6.1.*"
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- symfony/framework-bundle is locked to version v6.1.4 and an update of this package was not requested.
- symfony/orm-pack v2.3.0 conflicts with symfony/dependency-injection <6.2.
- symfony/framework-bundle v6.1.4 requires symfony/dependency-injection ^6.1 -> satisfiable by symfony/dependency-injection[v6.1.3].
- Root composer.json requires symfony/orm-pack ^2.3 -> satisfiable by symfony/orm-pack[v2.3.0].
You can also try re-running composer require with an explicit version constraint, e.g. "composer require symfony/orm-pack:*" to figure out if any version is installable, or "composer require symfony/orm-pack:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
My composer.json is the basic one that Symfony installs, without any new libraries added:
{
"type": "project",
"license": "proprietary",
"minimum-stability": "stable",
"prefer-stable": true,
"require": {
"php": ">=8.1",
"ext-ctype": "*",
"ext-iconv": "*",
"symfony/console": "6.1.*",
"symfony/dotenv": "6.1.*",
"symfony/flex": "^2",
"symfony/framework-bundle": "6.1.*",
"symfony/runtime": "6.1.*",
"symfony/yaml": "6.1.*"
},
"require-dev": {
},
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": true,
"symfony/flex": true,
"symfony/runtime": true
},
"optimize-autoloader": true,
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php72": "*",
"symfony/polyfill-php73": "*",
"symfony/polyfill-php74": "*",
"symfony/polyfill-php80": "*",
"symfony/polyfill-php81": "*"
},
"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": false,
"require": "6.1.*"
}
}
}
I am using Symfony 6.1 on Windows in the WSL2. What could be the problem? I have only used the steps listed in the Symfony documentation.
Thanks in advance!

Use command:
composer require symfony/orm-pack:^2.1

Related

Issues trying to install sylius/product-bundle to my Symfony 5.3 project with composer

I am trying to develop a project and I'm having trouble installing a Sylius with composer.
Here is my composer.json
{
"type": "project",
"license": "proprietary",
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=7.0",
"ext-ctype": "*",
"ext-iconv": "*",
"composer/package-versions-deprecated": "1.11.99.2",
"doctrine/annotations": "^1.0",
"doctrine/doctrine-bundle": "^2.4",
"doctrine/doctrine-migrations-bundle": "^3.1",
"doctrine/orm": "^2.9",
"phpdocumentor/reflection-docblock": "^5.2",
"sensio/framework-extra-bundle": "^6.1",
"symfony/apache-pack": "^1.0",
"symfony/asset": "5.3.*",
"symfony/console": "5.3.*",
"symfony/dotenv": "5.3.*",
"symfony/expression-language": "5.3.*",
"symfony/flex": "^1.3.1",
"symfony/form": "5.3.*",
"symfony/framework-bundle": "5.3.*",
"symfony/http-client": "5.3.*",
"symfony/intl": "5.3.*",
"symfony/mailer": "5.3.*",
"symfony/mime": "5.3.*",
"symfony/monolog-bundle": "^3.1",
"symfony/notifier": "5.3.*",
"symfony/process": "5.3.*",
"symfony/property-access": "5.3.*",
"symfony/property-info": "5.3.*",
"symfony/proxy-manager-bridge": "5.3.*",
"symfony/runtime": "5.3.*",
"symfony/security-bundle": "5.3.*",
"symfony/serializer": "5.3.*",
"symfony/string": "5.3.*",
"symfony/translation": "5.3.*",
"symfony/twig-bundle": "^5.3",
"symfony/validator": "5.3.*",
"symfony/web-link": "5.3.*",
"symfony/webpack-encore-bundle": "^1.11",
"symfony/yaml": "5.3.*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"symfony/browser-kit": "^5.3",
"symfony/css-selector": "^5.3",
"symfony/debug-bundle": "^5.3",
"symfony/maker-bundle": "^1.0",
"symfony/phpunit-bridge": "^5.3",
"symfony/stopwatch": "^5.3",
"symfony/var-dumper": "^5.3",
"symfony/web-profiler-bundle": "^5.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php72": "*"
},
"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": false,
"require": "5.3.*"
}
}
}
When I type composer require sylius/product-bundle I get this error
Using version ^0.15.0 for sylius/product-bundle
./composer.json has been updated
Running composer update sylius/product-bundle
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires sylius/product-bundle ^0.15.0 -> satisfiable by sylius/product-bundle[v0.15.0].
- sylius/product-bundle v0.15.0 requires symfony/framework-bundle ~2.3 -> found symfony/framework-bundle[v2.3.0, ..., 2.8.x-dev] but it conflicts with your root composer.json require (5.3.*).
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
So from what I understand, composer tries to fetch the version 0.15.0 of sylius/product-bundle, which obviously won't work with my configuration because it requires older versions of its dependencies, as shown below.
Only when I try to require a newer version with composer require sylius/product-bundle:1.9.4, I also get an error
[InvalidArgumentException]
Package sylius/product-bundle at version 1.9.4 has a PHP requirement incompatible with your PHP version, PHP extensions and Composer version
This one should have done the trick, given the required versions of its dependencies
I finally tried with composer require sylius/product-bundle:1.9.4 --ignore-platform-reqs, which once again gives me an error, but a different one
./composer.json has been updated
Running composer update sylius/product-bundle
Loading composer repositories with package information
Restricting packages listed in "symfony/symfony" to "5.3.*"
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- gedmo/doctrine-extensions[v2.3.10, ..., v2.4.x-dev, v3.0.0-beta, ..., v3.0.1] require doctrine/common ~2.4 -> found doctrine/common[2.4.0-RC1, ..., 2.13.x-dev] but the package is fixed to 3.1.2 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- gedmo/doctrine-extensions[v2.3.4, ..., v2.3.9] require doctrine/common >=2.2,<2.5-dev -> found doctrine/common[2.2.0BETA1, ..., 2.4.x-dev] but the package is fixed to 3.1.2 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- gedmo/doctrine-extensions[v3.0.0-beta2, ..., v3.0.5] require doctrine/cache ^1.0 -> found doctrine/cache[v1.0, ..., 1.11.x-dev] but the package is fixed to 2.0.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- sylius/product-bundle v1.9.4 requires stof/doctrine-extensions-bundle ^1.4 -> satisfiable by stof/doctrine-extensions-bundle[v1.4.0, v1.5.0, v1.6.0, 1.6.x-dev (alias of dev-master)].
- stof/doctrine-extensions-bundle 1.6.x-dev is an alias of stof/doctrine-extensions-bundle dev-master and thus requires it to be installed too.
- stof/doctrine-extensions-bundle v1.4.0 requires gedmo/doctrine-extensions ^2.3.4 -> satisfiable by gedmo/doctrine-extensions[v2.3.4, ..., v2.4.x-dev].
- stof/doctrine-extensions-bundle[dev-master, v1.5.0, ..., v1.6.0] require gedmo/doctrine-extensions ^2.3.4 || ^3.0.0 -> satisfiable by gedmo/doctrine-extensions[v2.3.4, ..., v2.4.x-dev, v3.0.0-beta, ..., v3.0.5].
- Root composer.json requires sylius/product-bundle 1.9.4 -> satisfiable by sylius/product-bundle[v1.9.4].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
I got PHP cli v8.0.6, Composer v2.0.12 and Symfony cli v4.25.2
You have two problems:
You have Symfony '5.3' installed, which was released just one day ago.
You are using PHP 8, which is not supported by Sylius. By using PHP 8, you end up installing versions of dependencies that are not compatible with Sylius.
Since the current version of Sylius supports up to 5.2, and PHP ^7.3, you'll have to either downgrade to Sf 5.2 and PHP >= 7.3 && PHP < 8, or wait a some time so support for Sf 5.3 and PHP >= 8 is baked in.
I would recommend using the standard Sylius installation, but trying to install Sylius with the recommended docs way (composer create-project sylius/sylius-standard acme) when using PHP 8 also fails. But downgrading to
PHP 7.4 and running the create-project command does work.
The project seems to have entered the dependency hell stage of development.

Please resolve my problem of the package in laravel [duplicate]

I am new to Symfony, I tried to install symfony/maker-bundle, but it gives me the following error:
Using version ^1.22 for symfony/maker-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.4.*"
Your requirements could not be resolved to an installable set of packages.
Problem 1
- ocramius/proxy-manager 2.9.0 requires composer-runtime-api ^2.0.0 -> no matching package found.
- ocramius/proxy-manager 2.9.0 requires composer-runtime-api ^2.0.0 -> no matching package found.
- ocramius/proxy-manager 2.9.0 requires composer-runtime-api ^2.0.0 -> no matching package found.
- Installation request for ocramius/proxy-manager (locked at 2.9.0) -> satisfiable by
ocramius/proxy-manager[2.9.0].
I searched for similar problems, and often they change a package version in composer.json as the solution, but I can't find neither ocramius/proxy-manager nor composer-runtime-api in it:
{
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"ext-simplexml": "*",
"bluetel-solutions/twig-truncate-extension": "^0.1.3",
"friendsofsymfony/rest-bundle": "^2.7",
"jms/serializer-bundle": "^3.5",
"liip/imagine-bundle": "^2.2",
"sensio/framework-extra-bundle": "^5.4",
"symfony/apache-pack": "^1.0",
"symfony/asset": "4.4.*",
"symfony/console": "4.4.*",
"symfony/dotenv": "4.4.*",
"symfony/flex": "^1.3",
"symfony/form": "4.4.*",
"symfony/framework-bundle": "4.4.*",
"symfony/mailer": "4.4.*",
"symfony/monolog-bundle": "^3.4",
"symfony/orm-pack": "^1.0",
"symfony/security-bundle": "4.4.*",
"symfony/security-csrf": "4.4.*",
"symfony/serializer": "4.4.*",
"symfony/swiftmailer-bundle": "^3.4",
"symfony/translation": "4.4.*",
"symfony/twig-bundle": "4.4.*",
"symfony/validator": "4.4.*",
"symfony/webpack-encore-bundle": "^1.7",
"symfony/yaml": "4.4.*",
"twig/extensions": "^1.5",
"vich/uploader-bundle": "^1.12",
"whatwedo/core-bundle": "dev-symfony5",
"whatwedo/search-bundle": "dev-symfony5"
},
"require-dev": {
"symfony/maker-bundle": "^1.12",
"symfony/web-server-bundle": "4.4.*"
},
"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": false,
"require": "4.4.*"
}
}
May be I need an other version of symfony/maker-bundle?
Ocramius is well known for his harsh stance in maintaining backward compatibility.
On this case, release 2.9.0 says:
This release upgrades ocramius/proxy-manager to use composer-runtime-api:^2: this
means that you will need composer:^2 to install this version of ProxyManager.
In order to upgrade to composer v2, you can run composer self-update --2 on your
development or CI/CD system.
So your options are:
either upgrade composer to version 2 (composer self-update --2), which is really the recommended way to go unless you have some specific composer plugin that you really need and hasn't been updated to account for the new release.
Find which package you are installing is the one that requires the proxy-manager (composer why ocramius/proxy-manager), and see if you can adjust your version constraints on that package so that it depends on an older (< 2.9) version of ocramius/proxy-manager. (I mention this option only for completeness sake, but upgrading composer is really the way to go).

Symfony 5 can't install sensio/generator-bundle

i tried a fresh new symfony 5 project, but i cannot install the generator bundle to ease everything with doctrine entities.
It seems that Symfony 5 is too new to install the generator bundle.
Here is the output of the composer command to add the sensio generator bundle:
composer require sensio/generator-bundle
Using version ^3.1 for sensio/generator-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "5.1.*"
Your requirements could not be resolved to an installable set of packages.
Problem 1
- sensio/generator-bundle v3.1.7 requires symfony/framework-bundle ~2.7|~3.0 -> no matching package found.
- sensio/generator-bundle v3.1.6 requires symfony/framework-bundle ~2.7|~3.0 -> no matching package found.
- sensio/generator-bundle v3.1.5 requires symfony/framework-bundle ~2.7|~3.0 -> no matching package found.
- sensio/generator-bundle v3.1.4 requires symfony/framework-bundle ~2.7|~3.0 -> no matching package found.
- sensio/generator-bundle v3.1.3 requires symfony/framework-bundle ~2.7|~3.0 -> no matching package found.
- sensio/generator-bundle v3.1.2 requires symfony/framework-bundle ~2.7|~3.0 -> no matching package found.
- sensio/generator-bundle v3.1.1 requires symfony/framework-bundle ~2.7|~3.0 -> no matching package found.
- sensio/generator-bundle 3.1.0 requires symfony/framework-bundle ~2.7|~3.0 -> no matching package found.
- Installation request for sensio/generator-bundle ^3.1 -> satisfiable by sensio/generator-bundle[3.1.0, v3.1.1, v3.1.2, v3.1.3, v3.1.4, v3.1.5, v3.1.6, v3.1.7].
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.
and here is my composer.json file
{
"type": "project",
"license": "proprietary",
"require": {
"php": ">=7.2.5",
"ext-ctype": "*",
"ext-iconv": "*",
"doctrine/doctrine-migrations-bundle": "^3.0",
"doctrine/orm": "^2.7",
"sensio/framework-extra-bundle": "^5.6",
"symfony/asset": "5.1.*",
"symfony/console": "5.1.*",
"symfony/dotenv": "5.1.*",
"symfony/flex": "^1.3.1",
"symfony/framework-bundle": "5.1.*",
"symfony/twig-bundle": "5.1.*",
"symfony/webpack-encore-bundle": "^1.7",
"symfony/yaml": "5.1.*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
},
"require-dev": {
"symfony/maker-bundle": "^1.22"
},
"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"
},
"post-install-cmd": [
"#auto-scripts"
],
"post-update-cmd": [
"#auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "5.1.*"
}
}
}
This bundle does not support Symfony 4 and 5.Use the Maker bundle instead.
maker bundle :
https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html

Can't install symfony/maker-bundle

I am new to Symfony, I tried to install symfony/maker-bundle, but it gives me the following error:
Using version ^1.22 for symfony/maker-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.4.*"
Your requirements could not be resolved to an installable set of packages.
Problem 1
- ocramius/proxy-manager 2.9.0 requires composer-runtime-api ^2.0.0 -> no matching package found.
- ocramius/proxy-manager 2.9.0 requires composer-runtime-api ^2.0.0 -> no matching package found.
- ocramius/proxy-manager 2.9.0 requires composer-runtime-api ^2.0.0 -> no matching package found.
- Installation request for ocramius/proxy-manager (locked at 2.9.0) -> satisfiable by
ocramius/proxy-manager[2.9.0].
I searched for similar problems, and often they change a package version in composer.json as the solution, but I can't find neither ocramius/proxy-manager nor composer-runtime-api in it:
{
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"ext-simplexml": "*",
"bluetel-solutions/twig-truncate-extension": "^0.1.3",
"friendsofsymfony/rest-bundle": "^2.7",
"jms/serializer-bundle": "^3.5",
"liip/imagine-bundle": "^2.2",
"sensio/framework-extra-bundle": "^5.4",
"symfony/apache-pack": "^1.0",
"symfony/asset": "4.4.*",
"symfony/console": "4.4.*",
"symfony/dotenv": "4.4.*",
"symfony/flex": "^1.3",
"symfony/form": "4.4.*",
"symfony/framework-bundle": "4.4.*",
"symfony/mailer": "4.4.*",
"symfony/monolog-bundle": "^3.4",
"symfony/orm-pack": "^1.0",
"symfony/security-bundle": "4.4.*",
"symfony/security-csrf": "4.4.*",
"symfony/serializer": "4.4.*",
"symfony/swiftmailer-bundle": "^3.4",
"symfony/translation": "4.4.*",
"symfony/twig-bundle": "4.4.*",
"symfony/validator": "4.4.*",
"symfony/webpack-encore-bundle": "^1.7",
"symfony/yaml": "4.4.*",
"twig/extensions": "^1.5",
"vich/uploader-bundle": "^1.12",
"whatwedo/core-bundle": "dev-symfony5",
"whatwedo/search-bundle": "dev-symfony5"
},
"require-dev": {
"symfony/maker-bundle": "^1.12",
"symfony/web-server-bundle": "4.4.*"
},
"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": false,
"require": "4.4.*"
}
}
May be I need an other version of symfony/maker-bundle?
Ocramius is well known for his harsh stance in maintaining backward compatibility.
On this case, release 2.9.0 says:
This release upgrades ocramius/proxy-manager to use composer-runtime-api:^2: this
means that you will need composer:^2 to install this version of ProxyManager.
In order to upgrade to composer v2, you can run composer self-update --2 on your
development or CI/CD system.
So your options are:
either upgrade composer to version 2 (composer self-update --2), which is really the recommended way to go unless you have some specific composer plugin that you really need and hasn't been updated to account for the new release.
Find which package you are installing is the one that requires the proxy-manager (composer why ocramius/proxy-manager), and see if you can adjust your version constraints on that package so that it depends on an older (< 2.9) version of ocramius/proxy-manager. (I mention this option only for completeness sake, but upgrading composer is really the way to go).

Your requirements could not be resolved to an installable set of packages in laravel 5.7

Unable to install package from laravel 5.7
Using version ^0.8.4 for barryvdh/laravel-dompdf ./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 laravel/passport == 7.2.1.0
-> satisfiable > by laravel/passport[v7.2.1].
- avored/ecommerce 2.0 requires laravel/passport 5.0.*
-> satisfiable by laravel/passport[5.0.x-dev].
- avored/ecommerce 2.0.1 requires laravel/passport 5.0.*
-> satisfiable by laravel/passport[5.0.x-dev].
- Conclusion: don't install laravel/passport 5.0.x-dev
- Installation request for avored/ecommerce 2.*
-> satisfiable by > avored/ecommerce[2.0, 2.0.1].
Installation failed, reverting ./composer.json to its original content.
My composer.json file:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.1.3",
"avored/ecommerce": "2.*",
"avored/module-installer": "1.*",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.7.*",
"laravel/passport": "^7.2",
"laravel/tinker": "^1.0",
"laravelcollective/html": "^5.7",
"unisharp/laravel-filemanager": "^1.8"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0",
"laravel/dusk": "^4.0"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": [
]
}
},
"scripts": {
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
Delete to this in your composer.json file:
"require": {
"avored/ecommerce": "2.*",
}
Then update composer: composer update
This package(avored/ecommerce) is not compatible with Laravel 5.7
For testing purpose I have try this command(composer require avored/ecommerce) in Laravel 5.5, 5.6 and 5.7
It's worked only Laravel5.5, other 5.6 and 5.7 I also got the same error as yours.
There is a dependency conflict specified on the composer.json file, you are stating that you want "laravel/passport": "^7.2" or later, but as you can seee on the avored composer file it requieres laravel/passport 5.0 so downgrade your dependency requirement.
Also I'm pretty sure passport 5.x is compatible with Laravel 5.6 so you need to downgrade laravel to ^5.6 as well.
Change:
"laravel/framework": "5.7.*",
"laravel/passport": "^7.2",
with:
"laravel/framework": "5.6.*",
"laravel/passport": "^5.0",
And then execute composer update

Categories