I'm totally new to composer and symfony, and i've started a symfony3 project. Things where going well, but now composer won't update my dependancies. I've been searching a solution for 3 hours.
Here is my console log:
Problem 1
- sonata-project/admin-bundle dev-master requires sonata-project/block-bundle 3.x-dev#dev -> satisfiable by sonata-project/block-bundle[3.x-dev] but these conflict with your requirements or minimum-stability.
- sonata-project/admin-bundle dev-master requires sonata-project/block-bundle 3.x-dev#dev -> satisfiable by sonata-project/block-bundle[3.x-dev] but these conflict with your requirements or minimum-stability.
- Installation request for sonata-project/admin-bundle dev-master -> satisfiable by sonata-project/admin-bundle[dev-master].
And my composer.json requirements:
"require": {
"php": ">=5.5.9",
"symfony/symfony": "3.0.*",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "^2.8",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"friendsofsymfony/user-bundle": "dev-master",
"sonata-project/admin-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "dev-master"
},
If you can find the problem, and explain it to me, you're going to be my hero!
By default, composer installs only stable versions of packages, even if you ask a dev version for one of them, by defining the minimum-stability to stable.
To tell composer that you allow installation of development versions (such as dev-master),
Add the following line after your requirements:
"minimum-stability": "dev"
Note: It's actually mandatory to work with last versions of sonata bundles.
Related
I'm mantaining an old project, started with laravel 5.4, and now lifted up to laravel 8.
It's all working.
Now I'm in need to install laravel-datatables.
Looking at doc, I discarded v10 because it requires Laravel 9+
For same reason, I discarded also v9
So I'm trying to install laravel-datatables v8
composer require yajra/laravel-datatables-oracle:^8.0
I got this
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires yajra/laravel-datatables-oracle 8.0 -> satisfiable by yajra/laravel-datatables-oracle[v8.0.0].
- yajra/laravel-datatables-oracle v8.0.0 requires illuminate/database 5.4.*|5.5.* -> found illuminate/database[v5.4.0, ..., 5.5.x-dev] but these were not loaded, likely because it conflicts with another require.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
I am not able to understand which package/require is conflicting with this package.
This my package.json
"require": {
"php": "^7.3|^8.0",
"ext-json": "*",
"barryvdh/laravel-dompdf": "^0.8.1",
"buzz/laravel-google-captcha": "^2.1",
"carlos-meneses/laravel-mpdf": "^2.1",
"davidepastore/codice-fiscale": "^0.7.1",
"doctrine/dbal": "^3.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.3",
"laravel/framework": "^8.12",
"laravel/tinker": "^2.5",
"laravel/ui": "^3.2",
"league/flysystem-sftp": "~1.0",
"maatwebsite/excel": "^3.1",
"nowakowskir/php-jwt": "^2.0",
"oriceon/toastr-5-laravel": "^1.0.0",
"pragmarx/google2fa-laravel": "^1.4",
"pragmarx/recovery": "^0.2.0",
"ramsey/uuid": "^4.1",
"sentry/sdk": "^3.1",
"sentry/sentry-laravel": "^2.4",
"shalvah/laravel-jsend": "^2.3",
"snowfire/beautymail": "^1.1"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
Same problem with v7
Please note: we cannot, for internal policy, use -dev branches
Trying to install v9 ...
Problem 1
- Root composer.json requires yajra/laravel-datatables-oracle 9 -> satisfiable by yajra/laravel-datatables-oracle[v9.0.0].
- yajra/laravel-datatables-oracle v9.0.0 requires illuminate/database 5.8.* -> found illuminate/database[v5.8.0, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.
As written in the error message: yajra/laravel-datatables-oracle in v8 is only compatible with Laravel v5, and you are using Laravel v8.
Try to use composer require yajra/laravel-datatables-oracle:^9.0 - this version is compatible with Laravel v5 to v8. Next time you are facing such a problem, have a look at the constraints of different versions of the package. Packagist has a pretty nice overview of the compatible versions, for example at https://packagist.org/packages/yajra/laravel-datatables-oracle#v9.21.2 where you can see the dependencies for the latest v9 version of that datatables package
I accepted answer from Nico Haase because it helped me found the solution, but this is the exact solution for my exact case
composer require yajra/laravel-datatables-oracle:^9.*
It installed the 9.21.x version and it's compatibile with my actual set of package
i would like update my symfony projet ( current 2.8 to sf 3.* )
this is my composer.json file ( requiere part )
"require": {
"php": ">=5.3.9",
"symfony/symfony": "2.8.*",
"doctrine/orm": "^2.4.8",
"doctrine/doctrine-bundle": "~1.4",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~4.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"sonata-project/media-bundle": "^2.3",
"sonata-project/user-bundle": "^2.2",
"sonata-project/formatter-bundle": "~2.3",
"sonata-project/doctrine-orm-admin-bundle": "~2.2",
"sonata-project/admin-bundle": "~2.2",
"sonata-project/timeline-bundle": "^2.2",
"sonata-project/intl-bundle": "^2.2",
"sonata-project/cache-bundle": "^2.2",
"liuggio/excelbundle": "^2.0",
"friendsofsymfony/elastica-bundle": "^3.1",
"liip/imagine-bundle": "^1.4",
"friendsofsymfony/jsrouting-bundle": "^1.6",
"gos/web-socket-bundle": "^1.8"
},
If i change
"symfony/symfony": "2.8.*",
to
"symfony/symfony": "~3.0",
and do
php composer.phar update symfony/symfony --with-dependencies
but i have this error
Problem 1
- sonata-project/media-bundle 2.3.4 requires symfony/symfony ~2.3 -> satisfiable by symfony/symfony
So i tried to update media-bundle to 3.10.1 but it give me an error in another sonata bundle ..
how should I do things right?
I have to update the modules one by one?
or update my composer.json with all modifications ?
thanks
Your sonata dependencies are very too old and does not support Symfony 3.
Sample: https://github.com/sonata-project/SonataMediaBundle/blob/2.x/composer.json
You must upgrade your dependencies to make it working.
Also, you can use the composer why-not command to get more help.
I also got stuck in this error a few times. The error message is kinda abstract.
To solve this error you need to update the version for sonata-project/media-bundle in your composer.json file.
So you can replace it with: "sonata-project/media-bundle": "^3.1",
Then run composer update command again. You might get the same error you got above but for another package. Update that as well. Repeat this until your composer update command is successful.
At that point, if you are lucky your application will work. If not you need to update the code to use the new package version code. Remember, updating the first number of a package (from 2.8 to 3.something) means that is a breaking compatibility update.
Later update: if you check the composer.json file of sonata-project/media-bundle version 2.3 here: https://github.com/sonata-project/SonataMediaBundle/blob/2.3.0/composer.json you will see that it requires symfony version: "symfony/symfony": "~2.3" and you want to update to symfony version 3.something. So they are incompatible. That's why you also need to update this package and so on. Composer will do this behind the scenes and throw that error when your packages or their dependencies are not compatible between them.
Hope that helps.
I need to use sonata e commerce capabilities in my project but I have't had any success so far. It seems that there is not a compatible version with my current setup.
Here is my composer file
"require": {
"php": ">=5.3",
"ext-soap": "*",
"ext-gd": "*",
"symfony/symfony": "2.8.*",
"doctrine/orm": "^2.4.8",
"doctrine/doctrine-bundle": "~1.4",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"knplabs/knp-last-tweets-bundle": "*",
"friendsofsymfony/rest-bundle":"^1.8",
"twig/extensions":"1.2",
"friendsofsymfony/oauth-server-bundle": "dev-master",
"hwi/oauth-bundle": "^0.4.2",
"sonata-project/admin-bundle": "2.x.dev",
"sonata-project/doctrine-orm-admin-bundle": "2.x.dev",
"sonata-project/media-bundle": "~2.3",
"sonata-project/classification-bundle": "2.x-dev",
"sonata-project/user-bundle": "2.x.dev",
"sonata-project/block-bundle": "2.2.*"
},
When I run composer require sonata-project/ecommerce-bundle composer cant find a version that works with my current setup.
The error message that I get is
Problem 1
- Installation request for sonata-project/ecommerce ^2.0 -> satisfiable by sonata-project/ecommerce[2.0.0].
- sonata-project/ecommerce 2.0.0 requires sonata-project/block-bundle ^3.0 -> satisfiable by sonata-project/block-bundle[3.0.0, 3.0.1, 3.1.0, 3.1.1, 3.x-dev] but these conflict with your requirements or minimum-stability.
Please help. I have more than 3 days trying to get this working.
Some issues are going to be fixed when this PR is merged: https://github.com/sonata-project/sandbox/pull/583
So just wait a few days, or patch some code ;)
G'day all, I'm afraid yet another newbie is stuck trying to glue all the bits together. It's rather frustrating, to say the least :(
I've searched these forums, and see countless possible solutions, but none have worked so far. Most also also quite old, and versions have moved on.
Here we go:
https://sonata-project.org/bundles/user/2-2/doc/reference/installation.html
When I try this: composer require sonata-project/easy-extends-bundle
I get this:
Using version ^2.1 for sonata-project/easy-extends-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
- The requested package sonata-project/admin-bundle == 2.3.7.0 could not be found. Problem 2
- Can only install one of: sonata-project/block-bundle[2.3.8, 2.2.13].
- Can only install one of: sonata-project/block-bundle[2.3.8, 2.2.13].
- Can only install one of: sonata-project/block-bundle[2.3.8, 2.2.13].
- sonata-project/admin-bundle dev-master requires sonata-project/block-bundle ^2.3.8 -> satisfiable by
sonata-project/block-bundle[2.3.8].
- Installation request for sonata-project/admin-bundle dev-master -> satisfiable by sonata-project/admin-bundle[dev-master].
- Installation request for sonata-project/block-bundle == 2.2.13.0 -> satisfiable by sonata-project/block-bundle[2.2.13].
Potential causes:- A typo in the package name - The
package is not available in a stable-enough version according to your
minimum-stability setting
Installation failed, reverting ./composer.json to its original
content.
I'm just following instructions, plain and simple! I read those articles, and tried a few solutions here, and via a Google search.
For what it's worth, I'm an old Unix hacker from way back, and I don't remember open source builds being this hard ...
Any clues? Many thanks in advance!
p.s. I'm using a Debian virtual box, as I thought it'd be easier than trying things on my Windows 8 PC.
Here is the only changed section from composer.json:
"require": {
"php": ">=5.3.9",
"symfony/symfony": "2.7.*",
"doctrine/orm": "~2.2,>=2.2.3,<2.5",
"doctrine/dbal": "<2.5",
"doctrine/doctrine-bundle": "~1.4",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~4.0",
"sensio/framework-extra-bundle": "~3.0,>=3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"friendsofsymfony/user-bundle": "~2.0#dev",
"sonata-project/admin-bundle": "2.3.*",
"sonata-project/doctrine-orm-admin-bundle": "^2.3",
"sonata-project/easy-extends-bundle": "^2.1",
"sonata-project/user-bundle": "^2.2",
"sonata-project/easy-extends-bundle": "dev-master"
},
1. Empty the vendor folder: Delete everything on it, but don't delete itself. Maybe a broken downloaded dependency is causing you issues.
2. Replace your require section of your composer.json with this one:
"require": {
"php": ">=5.3.9",
"symfony/symfony": "2.7.*",
"doctrine/orm": "~2.2,>=2.2.3,<2.5",
"doctrine/dbal": "<2.5",
"doctrine/doctrine-bundle": "~1.4",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~4.0",
"sensio/framework-extra-bundle": "~3.0,>=3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"friendsofsymfony/user-bundle": "~1.3",
"sonata-project/admin-bundle": "2.3.*",
"sonata-project/doctrine-orm-admin-bundle": "^2.3",
"sonata-project/easy-extends-bundle": "^2.1",
"sonata-project/user-bundle": "^2.2"
},
Notice the difference about "friendsofsymfony/user-bundle" version.
Now it should work! Let me know if it's still causing you issues.
I am trying to extend an existing Symfony application, but the composer.json doesn't make any sense.
"symfony/symfony": "2.1.*"
Results in an error because 2.1.* is not a resolvable version number this would indicate that the programmer hasn't bothered to update the file or use it.
Then I try it by changing it to:
"symfony/symfony": "2.1.12"
It then fails because:
mopa/bootstrap-bundle dev-master requires symfony/symfony ~2.3-dev
jms/di-extra-bundle 1.1.0-RC requires symfony/framework-bundle 2.1.*
This would suggest I can either install bootstrap or jms because one requires symfony 2.1 and the other 2.3 but in the composer.phar I see:
"jms/di-extra-bundle": "1.1.*",
"mopa/bootstrap-bundle": "dev-master",
In the production server I see that vendor has a jsm and mopa sub directory and under vendor/symfony/symfony the highest changelog I can find is CHANGELOG-2.1.md suggesting that some version of Symfony 2.1 is used (only have ftp access so can't run a command to check the version).
I wonder how I can get this installed because it just quits every time on the Symfony version not getting resolved.
The other thing is; should I resolve this. If one of these packages don't run because of a wrong Symfony version that what's the point of installing it in the first place?
If you are updating from a previous version of symfony you had to update all dependeciens. So looking https://github.com/symfony/symfony-standard/blob/v2.1.11/composer.json you have to set:
"php": ">=5.3.3",
"symfony/symfony": "2.1.*",
"doctrine/orm": ">=2.2.3,<2.5-dev",
"doctrine/doctrine-bundle": "1.1.*",
"twig/extensions": "1.0.*#dev",
"symfony/assetic-bundle": "2.1.*",
"symfony/swiftmailer-bundle": "2.1.*",
"symfony/monolog-bundle": "2.1.*",
"sensio/distribution-bundle": "2.1.*",
"sensio/framework-extra-bundle": "2.1.*",
"sensio/generator-bundle": "2.1.*",
"jms/security-extra-bundle": "1.2.*",
"jms/di-extra-bundle": "1.1.*",
"kriswallsmith/assetic": "1.1.*#dev"
and looking for MopaBootstrapBundle on packagist (https://packagist.org/packages/mopa/bootstrap-bundle) the last version that support Symfony 2.1 is:
"mopa/bootstrap-bundle": "2.2.*#dev"