Installation issue sylius 1.11.0 PHP version 8.1.4
I am trying to install the plugin however I got the following error:
Using version ^3.2 for bitbag/cms-plugin
./composer.json has been updated
Running composer update bitbag/cms-plugin
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- bitbag/cms-plugin v3.2.1 conflicts with bitbag/cms-plugin v3.2.1.
- bitbag/cms-plugin v3.2.0 conflicts with bitbag/cms-plugin v3.2.0.
- sylius/sylius v1.11.0 requires doctrine/orm ^2.7 -> satisfiable by doctrine/orm[2.11.2].
- sylius/sylius is locked to version v1.11.0 and an update of this package was not requested.
- Root composer.json requires bitbag/cms-plugin ^3.2 -> satisfiable by bitbag/cms-plugin[v3.2.0, v3.2.1].
I also tried a specific version 3.2.1
composer require bitbag/cms-plugin:^3.2.1
Info from https://repo.packagist.org: #StandWithUkraine
./composer.json has been updated
Running composer update bitbag/cms-plugin
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires bitbag/cms-plugin 3.2.1 -> satisfiable by bitbag/cms-plugin[v3.2.1].
- sylius/sylius v1.11.0 requires doctrine/orm ^2.7 -> satisfiable by doctrine/orm[2.11.2].
- bitbag/cms-plugin v3.2.1 conflicts with bitbag/cms-plugin v3.2.1.
- sylius/sylius is locked to version v1.11.0 and an update of this package was not requested.
Composer.json
{
"type": "project",
"keywords": [
"symfony",
"sylius",
"distribution",
"ecommerce",
"cart",
"shopping"
],
"homepage": "https://sylius.com",
"license": "proprietary",
"authors": [
{
"name": "Paweł Jędrzejewski"
},
{
"name": "Sylius project"
},
{
"name": "Community contributions"
}
],
"require": {
"php": "^8.0",
"sylius/paypal-plugin": "^1.2.1",
"sylius/sylius": "^1.11",
"symfony/dotenv": "^4.4 || ^5.4",
"symfony/flex": "^1.11"
},
"conflict": {
"symfony/form": "4.4.11 || 4.4.12",
"doctrine/dbal": "^3.0"
},
"require-dev": {
"behat/behat": "^3.7",
"behat/mink-selenium2-driver": "^1.4",
"dmore/behat-chrome-extension": "^1.3",
"dmore/chrome-mink-driver": "^2.7",
"friends-of-behat/mink": "^1.8",
"friends-of-behat/mink-browserkit-driver": "^1.4",
"friends-of-behat/mink-debug-extension": "^2.0",
"friends-of-behat/mink-extension": "^2.4",
"friends-of-behat/page-object-extension": "^0.3",
"friends-of-behat/suite-settings-extension": "^1.0",
"friends-of-behat/symfony-extension": "^2.1",
"friends-of-behat/variadic-extension": "^1.3",
"lchrusciel/api-test-case": "^5.0",
"phpspec/phpspec": "^7.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "0.12.94",
"phpstan/phpstan-doctrine": "0.12.42",
"phpstan/phpstan-webmozart-assert": "0.12.12",
"phpunit/phpunit": "^8.5",
"stripe/stripe-php": "^6.43",
"sylius-labs/coding-standard": "^4.0",
"symfony/browser-kit": "^4.4 || ^5.4",
"symfony/debug-bundle": "^4.4 || ^5.4",
"symfony/intl": "^4.4 || ^5.4",
"symfony/web-profiler-bundle": "^4.4 || ^5.4",
"polishsymfonycommunity/symfony-mocker-container": "^1.0"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"extra": {
"symfony": {
"allow-contrib": false
}
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
},
"classmap": [
"src/Kernel.php"
]
},
"prefer-stable": true,
"scripts": {
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
],
"post-create-project-cmd": [
"@php bin/console sylius:inform-about-gus --ansi",
"@php bin/console sylius:show-available-plugins --ansi"
],
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
}
}
}
PHP version:8.1.4 Sylius version 1.11.0 Symfony version: 5.4
Can you paste your composer.json file? Maybe "conflict": { "doctrine/dbal": "^3.0" }, will fix your problem? I just install it on some project and there was no problems by my side.
I updated the question with the composer.json file
Can you paste your composer.json file? Maybe
"conflict": { "doctrine/dbal": "^3.0" },will fix your problem? I just install it on some project and there was no problems by my side.
This doesn't solve the problem sadly.
I had to do the following to get this working:
Add the following to composer.json:
"conflict": { "doctrine/orm": "^2.10" }
Then:
composer update
Then:
composer req bitbag/cms-plugin
I had to do the following to get this working:
Add the following to composer.json:
"conflict": { "doctrine/orm": "^2.10" }Then:composer updateThen:composer req bitbag/cms-plugin
Same issue here, and after I tried this :
!! In App_KernelProdContainer.php line 2493:
!!
!! Attempted to call an undefined method named "setQueryCache" of class "Doctr
!! ine\ORM\Configuration".
!! Did you mean to call "setQueryCacheImpl"?
!!
Everything broken
That looks like your cache needs clearing
This is exactly on what it fails.
Executing script cache:clear [KO] [KO] Script cache:clear returned with error code 255 !! PHP Warning: include_once(/opt/sylius/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/SQLResultCasing.php): Failed to open stream: No such file or directory in /opt/sylius/var/cache/prod/ContainerX3zFqAp/App_KernelProdContainer.php on line 2477 !! PHP Warning: include_once(): Failed opening '/opt/sylius/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/SQLResultCasing.php' for inclusion (include_path='.:/usr/share/php') in /opt/sylius/var/cache/prod/ContainerX3zFqAp/App_KernelProdContainer.php on line 2477 !! PHP Warning: include_once(/opt/sylius/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/SQLResultCasing.php): Failed to open stream: No such file or directory in /opt/sylius/var/cache/prod/ContainerX3zFqAp/App_KernelProdContainer.php on line 2477 !! PHP Warning: include_once(): Failed opening '/opt/sylius/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/SQLResultCasing.php' for inclusion (include_path='.:/usr/share/php') in /opt/sylius/var/cache/prod/ContainerX3zFqAp/App_KernelProdContainer.php on line 2477 !!
!!
!! [WARNING] Some commands could not be registered:
!!
!!
!! In App_KernelProdContainer.php line 2493: !!
!! Call to undefined method Doctrine\ORM\Configuration::setQueryCache()
!!
!!
!! In App_KernelProdContainer.php line 2493: !!
!! Call to undefined method Doctrine\ORM\Configuration::setQueryCache()
!!
!!
!!
!!
!! [WARNING] Some commands could not be registered:
!!
!!
!! In App_KernelProdContainer.php line 2493: !!
!! Call to undefined method Doctrine\ORM\Configuration::setQueryCache()
!!
!!
!! In App_KernelProdContainer.php line 2493: !!
!! Call to undefined method Doctrine\ORM\Configuration::setQueryCache()
!!
!!
!!
!! // Clearing the cache for the prod environment with debug
!! // false
!!
!! PHP Warning: include_once(/opt/sylius/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/SQLResultCasing.php): Failed to open stream: No such file or directory in /opt/sylius/var/cache/prod/ContainerX3zFqAp/App_KernelProdContainer.php on line 2477 !! PHP Warning: include_once(): Failed opening '/opt/sylius/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/SQLResultCasing.php' for inclusion (include_path='.:/usr/share/php') in /opt/sylius/var/cache/prod/ContainerX3zFqAp/App_KernelProdContainer.php on line 2477 !!
!! In App_KernelProdContainer.php line 2493: !!
!! Attempted to call an undefined method named "setQueryCache" of class "Doctr
!! ine\ORM\Configuration".
!! Did you mean to call "setQueryCacheImpl"?
!!
!!
!! cache:clear [--no-warmup] [--no-optional-warmers] !!
!!
Script @auto-scripts was called via post-install-cmd
I'm also having issues with my installation. In my case after adding the conflict line to my composer.json file, some requests fail with Attempted to call an undefined method named "getObjectManager" of class "Doctrine\ORM\Event\OnFlushEventArgs".
I can run many other commands and access routes, but in some of them it's just broken now.
I've just tried it on a freshly-created sylius standard project (using composer create), and after properly applying the webpack-encore changes as described on sylius documentation, and the issue is exactly the same, fails with some dependencies while installing, and trying to define that conflict line in the composer.json file just messes things up:
> composer require bitbag/cms-plugin
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^3.2 for bitbag/cms-plugin
./composer.json has been updated
Running composer update bitbag/cms-plugin
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 bitbag/cms-plugin ^3.2 -> satisfiable by bitbag/cms-plugin[v3.2.0, v3.2.1, v3.2.2, v3.2.3].
- sylius/sylius v1.11.0 requires doctrine/orm ^2.7 -> satisfiable by doctrine/orm[2.13.2].
- bitbag/cms-plugin[v3.2.0, ..., v3.2.3] conflict with doctrine/orm ^2.10.
- sylius/sylius is locked to version v1.11.0 and an update of this package was not requested.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require bitbag/cms-plugin:*" to figure out if any version is installable, or "composer require bitbag/cms-plugin:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
I guess it just cannot be properly installed in this version due to #436
Hi! we have removed the doctrine/orm and doctrine/dbal conflict in #452