I have install sysmfony 3.4 and try to setup propel and get below error. below is my composer.json file
"require": {
"php": ">=5.5.9",
"symfony/symfony": "3.4.*",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3.10",
"symfony/monolog-bundle": "^3.0.2",
"symfony/polyfill-apcu": "^1.0",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"propel/propel": "2.0.*#dev",
"propel/propel-bundle": "~2.0#dev"
},
I have try to below command.
C:/> composer update
Get below error:
Installation request for propel/propel-bundle 2.0.0-alpha4 -> satisfiable by propel/propel-bundle[2.0.0-alpha4].
propel/propel-bundle 2.0.0-alpha4 requires symfony/symfony ~2.4 -> satisfiable by symfony/symfony[2.4.x-dev, 2.5.x-dev, 2.6.x-dev,
2.7.x-dev, 2.8.x-dev, v2.4.0, v2.4.0-BETA1, v2.4.0-BETA2, v2.4.0-RC1, v2.4.1, v2.4.10, v2.4.2, v2.4.3, v2.4.4, v2.4.5, v2.4.6, v2.4.7,
v2.4.8, v2.4.9, v2.5.0, v2.5.0-BETA1, v2.5.0-BETA2, v2.5.0-RC1,
v2.5.1, v2.5.10, v2.5.11, v2.5.12, v2.5.2, v2.5.3, v2.5.4, v2.5.5,
v2.5.6, v2.5.7, v2.5.8, v2.5.9, v2.6.0, v2.6.0-BETA1, v2.6.0-BETA2,
v2.6.1, v2.6.10, v2.6.11, v2.6.12, v2.6.13, v2.6.2, v2.6.3, v2.6.4,
v2.6.5, v2.6.6, v2.6.7, v2.6.8, v2.6.9, v2.7.0, v2.7.0-BETA1,
v2.7.0-BETA2, v2.7.1, v2.7.10, v2.7.11, v2.7.12, v2.7.13, v2.7.14,
v2.7.15, v2.7.16, v2.7.17, v2.7.18, v2.7.19, v2.7.2, v2.7.20, v2.7.21,
v2.7.22, v2.7.23, v2.7.24, v2.7.25, v2.7.26, v2.7.27, v2.7.28,
v2.7.29, v2.7.3, v2.7.30, v2.7.31, v2.7.32, v2.7.33, v2.7.34, v2.7.35,
v2.7.36, v2.7.37, v2.7.38, v2.7.39, v2.7.4, v2.7.5, v2.7.6, v2.7.7,
v2.7.8, v2.7.9, v2.8.0, v2.8.0-BETA1, v2.8.1, v2.8.10, v2.8.11,
v2.8.12, v2.8.13, v2.8.14, v2.8.15, v2.8.16, v2.8.17, v2.8.18,
v2.8.19, v2.8.2, v2.8.20, v2.8.21, v2.8.22, v2.8.23, v2.8.24, v2.8.25,
v2.8.26, v2.8.27, v2.8.28, v2.8.29, v2.8.3, v2.8.30, v2.8.31, v2.8.32,
v2.8.4, v2.8.5, v2.8.6, v2.8.7, v2.8.8, v2.8.9] but these conflict
with your requirements or minimum-stability.
Please help me for fixed issue.
Thanks
For Symfony 3.4 the below should sort the issue.
Add these lines to your composer.json
"propel/propel-bundle": "3.0.x-dev",
"propel/propel": "dev-master",
Related
PHP Symfony Sylius on Windows 11 with docker
I launch a sylius:install and the 2 steps of 5 stop this : warning error
Step 2 of 5. Setting up the database.
-------------------------------------
Creating Sylius database for environment dev.
It appears that your database already exists.
Warning! This action will erase your database.
Would you like to reset it? (y/N) y
1/4 [░░░░░░░░ ] 25%
In ImagesRemoveListener.php line 40:
Attempted to call an undefined method named "getObjectManager" of class "Doctrine\ORM\Event\OnFlushEventArgs".
doctrine:migrations:migrate [--write-sql [WRITE-SQL]] [--dry-run] [--query-time] [--allow-no-migration] [--all-or-nothing [ALL-OR-NOTHING]] [--configuration CONFIGURATION] [--em EM] [--conn CONN] [--] [<version>]
I confirm have the Doctrine\ORM\Event\OnFlushEventArgs Class.
But nothing getObjectManager method into this.
This is the require of the composer :
"require": {
"php": "^8.0",
"sylius/paypal-plugin": "^1.2.1",
"sylius/sylius": "^1.12#dev",
"symfony/dotenv": "^5.4",
"symfony/flex": "^2.1"
},
"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": "1.5.4",
"phpstan/phpstan-doctrine": "1.3.2",
"phpstan/phpstan-webmozart-assert": "^1.1",
"phpunit/phpunit": "^8.5",
"stripe/stripe-php": "^6.43",
"sylius-labs/coding-standard": "^4.0",
"symfony/browser-kit": "^5.4",
"symfony/debug-bundle": "^5.4",
"symfony/intl": "^5.4",
"symfony/web-profiler-bundle": "^5.4",
"polishsymfonycommunity/symfony-mocker-container": "^1.0"
},
The part dealing with doctrine into sylius/sylius vendor bundles composer.json file :
"doctrine/collections": "^1.6",
"doctrine/common": "^3.2",
"doctrine/dbal": "^2.7|^3.0",
"doctrine/doctrine-bundle": "^1.12 || ^2.0",
"doctrine/doctrine-migrations-bundle": "^3.0.1",
"doctrine/event-manager": "^1.1",
"doctrine/inflector": "^1.4 || ^2.0",
"doctrine/migrations": "^3.0",
"doctrine/orm": "^2.7",
"doctrine/persistence": "^2.3",
OnFlushEventArgs.php is part of doctrine/orm package. The 2.7 version.
Downgrade or update version of doctrine/orm ?
So I am trinyg to install twig extensions to use truncate() twig filter, and cannot do it for some dependencies incompatabilities
When I run composer require twig/extensions I get this message :
Your requirements could not be resolved to an installable set of packages.
Problem 1
- twig/extensions[v1.5.2, ..., 1.x-dev] require twig/twig ^1.27|^2.0 -> found twig/twig[v1.27.0, ..., 1.x-dev, v2.0.0, ..., 2.x-dev] but the package is fixed to v3.2.1 (lock file version) by a partial update and that version doe
s not match. Make sure you list it as an argument for the update command.
- twig/extensions[v1.5.0, ..., v1.5.1] require twig/twig ~1.27|~2.0 -> found twig/twig[v1.27.0, ..., 1.x-dev, v2.0.0, ..., 2.x-dev] but the package is fixed to v3.2.1 (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.
- Root composer.json requires twig/extensions ^1.5 -> satisfiable by twig/extensions[v1.5.0, ..., 1.x-dev].
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.
It suggest me to run it with -W option, when I run it composer require twig/extensions -W
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: don't install twig/extensions v1.5.4 (conflict analysis result)
- symfony/http-kernel v5.2.2 conflicts with twig/twig v2.12.0.
- sensio/framework-extra-bundle v5.6.1 requires symfony/http-kernel ^4.4|^5.0 -> satisfiable by symfony/http-kernel[v5.2.2].
- twig/extra-bundle is locked to version v3.2.1 and an update of this package was not requested.
- sensio/framework-extra-bundle is locked to version v5.6.1 and an update of this package was not requested.
- Root composer.json requires twig/extensions ^1.5 -> satisfiable by twig/extensions[v1.5.0, ..., 1.x-dev].
- twig/extensions 1.x-dev requires twig/twig ^1.27|^2.0 -> satisfiable by twig/twig[v2.12.0, ..., 2.x-dev].
- You can only install one version of a package, so only one of these can be installed: twig/twig[v2.12.0, ..., 2.x-dev, v3.0.0-BETA1, ..., 3.x-dev].
- twig/extra-bundle v3.2.1 requires twig/twig ^3.2 -> satisfiable by twig/twig[v3.2.1, 3.x-dev].
- Conclusion: don't install twig/twig v3.2.1 (conflict analysis result)
This is my composer.json files require and require-dev
{
"require": {
"php": ">=7.2.5",
"ext-ctype": "*",
"ext-iconv": "*",
"composer/package-versions-deprecated": "1.11.99.1",
"doctrine/doctrine-bundle": "^2.2",
"doctrine/doctrine-migrations-bundle": "^3.0",
"doctrine/orm": "^2.8",
"sensio/framework-extra-bundle": "^5.6",
"symfony/asset": "5.2.*",
"symfony/console": "5.2.*",
"symfony/dotenv": "5.2.*",
"symfony/flex": "^1.3.1",
"symfony/form": "5.2.*",
"symfony/framework-bundle": "5.2.*",
"symfony/proxy-manager-bridge": "5.2.*",
"symfony/security-bundle": "5.2.*",
"symfony/stopwatch": "5.2.*",
"symfony/twig-bundle": "5.2.*",
"symfony/validator": "5.2.*",
"symfony/webpack-encore-bundle": "^1.8",
"symfony/yaml": "5.2.*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.4",
"symfony/maker-bundle": "^1.26",
"symfony/web-profiler-bundle": "5.2.*"
}
}
I'm trying to update my Symfony 4.4.19 to Symfony 5.x but i've got two conflicts who are blocking the process:
symfony/monolog-bundle and roave/security-advisories
I'm running method composer update "symfony/*" --with-all-dependencies
In Symfony documentation about upgrading, it is clearly specified that "A few libraries starting with symfony/ follow their own versioning scheme. You do not need to update these versions: you can upgrade them independently whenever you want" and the example is...symfony/monolog-bundle
Updating dependencies
Problem 1
- Root composer.json requires symfony/monolog-bundle ^3.6 -> satisfiable by symfony/monolog-bundle[v3.6.0].
- symfony/monolog-bundle v3.6.0 requires symfony/http-kernel ~3.4 || ~4.0 || ^5.0 -> satisfiable by symfony/http-kernel[v5.0.0, ..., v5.0.11].
- roave/security-advisories dev-latest conflicts with symfony/http-kernel v5.0.11.
- roave/security-advisories dev-latest conflicts with symfony/http-kernel v5.0.10.
- roave/security-advisories dev-latest conflicts with symfony/http-kernel v5.0.9.
- roave/security-advisories dev-latest conflicts with symfony/http-kernel v5.0.8.
- roave/security-advisories dev-latest conflicts with symfony/http-kernel v5.0.7.
- roave/security-advisories dev-latest conflicts with symfony/http-kernel v5.0.6.
- roave/security-advisories dev-latest conflicts with symfony/http-kernel v5.0.5.
- roave/security-advisories dev-latest conflicts with symfony/http-kernel v5.0.4.
- roave/security-advisories dev-latest conflicts with symfony/http-kernel v5.0.3.
- roave/security-advisories dev-latest conflicts with symfony/http-kernel v5.0.2.
- roave/security-advisories dev-latest conflicts with symfony/http-kernel v5.0.1.
- roave/security-advisories dev-latest conflicts with symfony/http-kernel v5.0.0.
- roave/security-advisories is locked to version dev-latest and an update of this package was not requested.
Here's my composer.json where i've replaced all 4.4 to 5.0 :
{
"type": "project",
"version": "1.2.0",
"license": "proprietary",
"require": {
"php": "^7.4.0",
"ext-ctype": "*",
"ext-iconv": "*",
"ext-intl": "*",
"ext-json": "*",
"abraham/twitteroauth": "^1.1",
"excelwebzone/recaptcha-bundle": "^1.5",
"facebook/graph-sdk": "^5.7",
"friendsofsymfony/rest-bundle": "^3.0",
"gesdinet/jwt-refresh-token-bundle": "^0.9.1",
"hamhamfonfon/astrobin-ws": "^2.0",
"jms/serializer-bundle": "^3.3",
"lexik/jwt-authentication-bundle": "^2.6",
"ruflin/elastica": "^6.0",
"sensio/framework-extra-bundle": "^5.2",
"symfony/asset": "^5.0",
"symfony/console": "^5.0",
"symfony/dotenv": "^5.0",
"symfony/expression-language": "^5.0",
"symfony/flex": "^1.11",
"symfony/form": "^5.0",
"symfony/framework-bundle": "^5.0",
"symfony/google-mailer": "5.0",
"symfony/http-client": "5.0",
"symfony/intl": "^5.0",
"symfony/mailer": "5.0.*",
"symfony/monolog-bundle": "^3.6",
"symfony/orm-pack": "^1.2",
"symfony/process": "5.0.*",
"symfony/requirements-checker": "^1.1",
"symfony/security-bundle": "^5.0",
"symfony/serializer": "^5.0",
"symfony/stopwatch": "^5.0",
"symfony/templating": "^5.0",
"symfony/translation": "^5.0",
"symfony/twig-bundle": "^5.0",
"symfony/validator": "^5.0",
"symfony/webpack-encore-bundle": "^1.0",
"symfony/yaml": "^5.0",
"twig/extensions": "^1.5"
},
//...
"extra": {
"symfony": {
"allow-contrib": false,
"require": "5.0.*"
}
},
"require-dev": {
"roave/security-advisories": "dev-latest",
"symfony/maker-bundle": "^1.12",
"symfony/profiler-pack": "^1.0",
"symfony/var-dumper": "^5.0"
}
}
I've made a "composer update" just before replacing 4.4 by 5.0 to be sure to be on the lastest version on 4.4.x version.
The problem is not really in monolog-bundle but as follows:
monolog-bundle requires symfony/http-kernel ~3.4 || ~4.0 || ^5.0
You restricted all Symfony components to 5.0 (by setting "extra" -> "symfony" -> "require" to 5.0.*). So the only fulfillable requirement for monolog-bundle is http-kernel 5.0.*
roave/security-advisories works by purposely conflicting with lib versions that have known security issues. In this case, every 5.0.* release has vulnerability CVE-2020-15094 (see https://symfony.com/blog/cve-2020-15094-prevent-rce-when-calling-untrusted-remote-with-cachinghttpclient) and is therefore blocked. So there is no valid version left and Composer aborts.
My suggestion: Symfony 5.0 reached end of life, so use the current release Symfony 5.2.x (Composer constraint "^5.2"). As Symfony uses strict Semantic Versioning there is no disadvantage for going to 5.2 instead of 5.0 (i.e. all code that runs on 5.0 will also run on 5.2).
I'd like to add sonata-project/user-bundle to Symfony 3.4 project but i received the following error message, BTW, i already installed "sonata-project/doctrine-orm-admin-bundle" :
composer require "sonata-project/user-bundle"
-------------------------------
Using version ^4.7 for sonata-project/user-bundle
./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
- sonata-project/user-bundle 4.7.0 conflicts with sonata-project/core-bundle[3.17.2].
- sonata-project/user-bundle 4.7.0 conflicts with sonata-project/core-bundle[3.17.2].
- sonata-project/user-bundle 4.7.0 conflicts with sonata-project/core-bundle[3.17.2].
- Installation request for sonata-project/user-bundle ^4.7 -> satisfiable by sonata-project/user-bundle[4.7.0].
- Installation request for sonata-project/core-bundle (locked at 3.17.2) -> satisfiable by sonata-project/core-bundle[3.17.2].
For information, this the content of the composer.json file :
"require": {
"php": ">=5.5.9",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/orm": "^2.5",
"incenteev/composer-parameter-handler": "^2.0",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^5.0.0",
"sonata-project/doctrine-orm-admin-bundle": "^3.8",
"symfony/monolog-bundle": "^3.1.0",
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.6.4",
"symfony/symfony": "3.4.*",
"twig/twig": "^1.0||^2.0"
}
So what can i do please ?
When trying to add the FOSJsRoutingBundle to my new Symfony3 project by:
composer require friendsofsymfony/jsrouting-bundle
However, this given a stream of errors as below - is this bundle no longer supported? Is there an alternative we should be using?
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: remove symfony/symfony v3.0.0
- Conclusion: don't install symfony/symfony v3.0.0
- friendsofsymfony/jsrouting-bundle 1.5.0 requires symfony/serializer ~2.0 -> satisfiable by symfony/serializer[2.0.4, 2.0.5, 2.0.6, 2.0.7, v2.0.10, v2.0.12, v2.0.13, v2.0.14, v2.0.15, v2.0.16, v2.0.17, v2.0.18, v2.0.19, v2.0.20, v2.0.21, v2.0.22, v2.0.23, v2.0.24, v2.0.25, v2.0.9, v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9, v2.2.0, v2.2.1, v2.2.10, v2.2.11, v2.2.2, v2.2.3, v2.2.4, v2.2.5, v2.2.6, v2.2.7, v2.2.8, v2.2.9, v2.3.0, v2.3.1, v2.3.10, v2.3.11, v2.3.12, v2.3.13, v2.3.14, v2.3.15, v2.3.16, v2.3.17, v2.3.18, v2.3.19, v2.3.2, v2.3.20, v2.3.21, v2.3.22, v2.3.23, v2.3.24, v2.3.25, v2.3.26, v2.3.27, v2.3.28, v2.3.29, v2.3.3, v2.3.30, v2.3.31, v2.3.32, v2.3.33, v2.3.34, v2.3.35, 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.2, v2.4.3, v2.4.4, v2.4.5, v2.4.6, v2.4.7, v2.4.8, v2.4.9, v2.5.0, v2.5.1, v2.5.10, v2.5.11, v2.5.12, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5.8, v2.5.9, v2.6.0, v2.6.1, v2.6.10, v2.6.11, v2.6.12, v2.6.2, v2.6.3, v2.6.4, v2.6.5, v2.6.6, v2.6.7, v2.6.8, v2.6.9, v2.7.0, v2.7.1, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.8.0].
... [truncated]...
don't install symfony/serializer v2.8.0|don't install symfony/symfony v3.0.0
Installation request for symfony/symfony 3.0.* -> satisfiable by symfony/symfony[v3.0.0].
Installation request for friendsofsymfony/jsrouting-bundle ^1.5 -> satisfiable by friendsofsymfony/jsrouting-bundle[1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4].
Installation failed, reverting ./composer.json to its original content.
Symfony 3 was released just about a week ago, its a new major version that contains BC breaks with previous versions where depreciated code will not work.
Your issue is probably due to the fact that so many third party bundles have not updated their code base to be compatible with Symfony 3 and that is why the brilliance of composer has refused to install it for you.
If you plan on using many third party bundles, my advice is that you install Symfony 2.8 where everything should work and install and you will get warnings and notices of depreciated code.