I need to install a new dependency in one old symfony 2.3 application. But seems that the previous installed packages are to old that I get the next error: "Your requirements could not be resolved to an installable set of packages."
This are my current dependencies:
"php": ">=5.3.
"symfony/symfony": "2.3.*",
"doctrine/orm": ">=2.2.3,<2.4-dev",
"doctrine/doctrine-bundle": "1.2.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.3.*",
"symfony/swiftmailer-bundle": "2.3.*",
"symfony/monolog-bundle": "2.3.*",
"sensio/distribution-bundle": "2.3.*",
"sensio/framework-extra-bundle": "2.3.*",
"sensio/generator-bundle": "2.3.*",
"incenteev/composer-parameter-handler": "~2.0",
"doctrine/doctrine-fixtures-bundle": "dev-master",
"doctrine/data-fixtures": "dev-master",
"knplabs/knp-menu":"dev-master",
"knplabs/knp-menu-bundle":"dev-master",
"liuggio/excelbundle": ">=1.0.4",
"tecnick.com/tcpdf": "6.0.023"
I need to add: "phpoffice/phpword": "v0.13.*" that require zend framework's packages.
There is any way of install my new dependencie without affect the already installed packages?
If you run composer why-not "phpoffice/phpword", you may get additional clarity as to what the problem is, and start to work around it by updating some packages to newer versions that can work together.
Related
Guzzle is outdated and so I installed instead via composer the recommended replacement
"guzzlehttp/guzzle": "^6.3",
I checked in the vendor directory and there is my guzzlehttp lib:
guzzlehttp, although I also still see the old guzzle even after deleting the whole vendor directory and doing composer update again.
However in my Appkernel.php I want to include now guzzlehttp instead of the old eightpoint guzzle as a Bundle and wonder how to do that.
The old syntax was like this:
new EightPoints\Bundle\GuzzleBundle\GuzzleBundle(),
I tried with
new GuzzleHttp\GuzzleBundle(),
But it isn't found. Do I miss another step? If yes which one?
Edit:
original composer.json where I want to replace guzzle with the guzzleHttp since this guzzle package seems to be abandoned:
"require": {
"php": ">=7.0",
"symfony/symfony": "2.8.*",
"doctrine/orm": "^2.4.8",
"doctrine/dbal": "<2.5",
"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",
"eightpoints/guzzle-bundle": "4.5.*",
"symfony/finder": "^2.8",
"jms/serializer-bundle": "^1.1",
"jms/di-extra-bundle": "~1.3",
"jms/aop-bundle": "~1.1",
"jms/cg": "~1.1",
"psr/cache": "~1.0",
"predis/predis": "1.*",
"snc/redis-bundle": "2.*",
"cache/predis-adapter": "*",
"willdurand/hateoas-bundle": "^1.0",
"hautelook/templated-uri-bundle": "^2.0",
"willdurand/rest-extra-bundle": "^1.0",
"friendsofsymfony/rest-bundle": "^1.7",
"friendsofsymfony/http-cache-bundle": "^1.0",
"avtonom/semaphore-bundle": "dev-master",
"symfony/stopwatch": "*"
},
"require-dev": {
"sensio/generator-bundle": "*",
"phpunit/phpunit": "*",
"phpunit/php-invoker": "*",
"squizlabs/php_codesniffer": "*",
"friendsofphp/php-cs-fixer": "*",
"diablomedia/phpunit-pretty-printer": "*"
},
....
The Guzzle lib does not provide any Symfony integration. Seems like you are using an old version of EightPointsGuzzleBundle.
Instead of requiring guzzlehttp/guzzle which is just a lib, do composer require eightpoints/guzzle-bundle and then in your AppKernel add
new EightPoints\Bundle\GuzzleBundle\EightPointsGuzzleBundle()
Maybe you should just update your bundle to a newer version.
I added the docrtine-fixtures and the doctrine-fixtures-bundle to my dependencies in the composer.json, as follow:
{
"require": {
"php": ">=5.3.3",
"symfony/finder": "2.3.*",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "~1.2",
"incenteev/composer-parameter-handler": "~2.0",
"doctrine/data-fixtures": "~1.1",
"doctrine/doctrine-fixtures-bundle": "~2.2",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~2.3",
"sensio/framework-extra-bundle": "~3.0"
}
}
And then I did php-cli composer.phar update, which worked and displayed the right message on my terminal:
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Updating doctrine/data-fixtures (dev-master bd44f6b => v1.1.1)
Checking out bd44f6b6e40247b6530bc8abe802e4e4d914976a
Writing lock file
Generating autoload files
Bu when I go to the folder vendor/doctrine, I cannot find any data-fixtures repository. What is the issue? Why does composer not load it and why does it display success messages?
(PS: My solution was to add the doctrine-fixture repository manually but it doesn't solve the composer issue).
It could be a Composer caching issue. Try removing Composer's cache directory:
rm -rf ~/.composer/cache
When I use this command in cmd
php composer.phar update friendsofsymfony/user-bundle
I get this message
Please provide a version constraint for the
friendsofsymfony/user-bundle requirement: 2.0.*#dev 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 friendsofsymfony/user-bundle could not be found in any version, there may be a typo in the package name.
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://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion
for more details.
Read http://getcomposer.org/doc/articles/troubleshooting.md for
further common problems.
Installation failed, reverting composer.json to its original content.
I've already added "minimum-stability": "dev", in my composer.json
It's the first time that I head this problem I installed fosuserbundle manytimes and it worked before.
I just Advice you just use this to configure all the sonata admin + fos user bundle without any dependencies or version conflicts
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.5.*",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "~1.2",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~3.0",
"sensio/framework-extra-bundle": "~3.0",
"incenteev/composer-parameter-handler": "~2.0",
"sonata-project/admin-bundle": "~2.3#dev",
"sonata-project/doctrine-orm-admin-bundle": "~2.3#dev",
"sonata-project/core-bundle": "~2.2#dev",
"sonata-project/user-bundle": "2.2.x-dev",
"friendsofsymfony/user-bundle": "~1.3#dev",
"sonata-project/easy-extends-bundle": "~2.1#dev",
"sonata-project/intl-bundle": "2.2.x-dev",
"knplabs/knp-paginator-bundle": "dev-master",
"knplabs/knp-time-bundle": "dev-master",
"knplabs/knp-menu-bundle": "1.1.*",
"jms/serializer-bundle": "0.13.*#dev"
},
So I fixed, it should be:
"friendsofsymfony/user-bundle": "~2.0#dev"
not
"friendsofsymfony/user-bundle ": "~2.0#dev"
I have used sylius as e-commerce platform and working on it by creating my own website.
After 4 months of job I want to extend my system with one more bundle using composer.json.
But there is problem when I want to update composer via json, sylius bundles makes problem like there is changes in sylius bundles, I can't update anymore old sylius composer, seems like my work in last 4 months by using sylius is gone?
Can anybody help is there any solution to continue my work with old sylius's composer.json?
There is problem with inventory bundle that was 0.1.* now is that version removed and there is 1.0 version which is not satisfailable for the rest of my bundles as omnipay , flow bundle etc... and when I resolve one of them that goes in next couple like there is no solution?
Error:
Problem 1
- The requested package sylius/installer-bundle 0.1.* could not be found.
Problem 2
- The requested package sylius/omnipay-bundle 0.9.*#dev could not be found.
Problem 3
- Installation request for sylius/flow-bundle 0.1.* -> satisfiable by sylius/flow-bundle[v0.1.0].
- sylius/flow-bundle v0.1.0 requires sylius/installer-bundle 0.1.* -> no matching package found.
"php": ">=5.3.3",
"symfony/symfony": ">=2.2,<2.3-dev",
"doctrine/orm": ">=2.2.3,<2.4-dev",
"doctrine/doctrine-bundle": "1.2.*",
"doctrine/doctrine-fixtures-bundle": "*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.3.*",
"symfony/swiftmailer-bundle": "2.2.*",
"symfony/monolog-bundle": "2.2.*",
"sensio/distribution-bundle": "2.2.*",
"sensio/generator-bundle": "2.2.*",
"incenteev/composer-parameter-handler": "~2.0",
"mathiasverraes/money": "dev-master#dev",
"jms/translation-bundle": "1.1.*",
"sylius/installer-bundle": "0.1.*",
"sylius/assortment-bundle": "0.1.*",
"sylius/cart-bundle": "0.3.*",
"sylius/money-bundle": "0.1.*",
"sylius/taxation-bundle": "0.1.*",
"sylius/shipping-bundle": "0.1.*",
"sylius/addressing-bundle": "0.1.*",
"sylius/sales-bundle": "0.1.*",
"sylius/promotions-bundle": "0.1.*",
"sylius/inventory-bundle": "0.1.*",
"sylius/taxonomies-bundle": "0.1.*",
"sylius/settings-bundle": "0.1.*",
"sylius/payments-bundle": "0.1.*",
"sylius/flow-bundle": "0.1.*",
"sylius/resource-bundle": "0.1.*",
"sylius/omnipay-bundle": "0.9.*#dev",
"jms/serializer-bundle": "0.11.*",
"friendsofsymfony/user-bundle": "1.3.1",
"fsc/hateoas-bundle": "0.3.x-dev",
"knplabs/knp-gaufrette-bundle": "0.2.*",
"fzaninotto/faker": "1.1.*",
"knplabs/knp-menu-bundle": "2.0.*",
"liip/imagine-bundle": "0.9.*",
"athari/yalinqo": "*",
"friendsofsymfony/facebook-bundle": "1.1.*",
"doctrine/migrations": "dev-master",
"doctrine/doctrine-migrations-bundle": "dev-master",
"friendsofsymfony/elastica-bundle": "3.0.*#dev",
"excelwebzone/recaptcha-bundle": "dev-master",
"knplabs/knp-paginator-bundle": "dev-master",
"knplabs/knp-snappy-bundle": "dev-master",
"paypal/adaptivepayments-sdk-php": "dev-master",
"mandrill/mandrill": "1.0.*"
You should require "1.0." or "1.0.#dev" depending on your minimum-stability setting. You can also lock on specific tags.
After last update SonataAdminBundle (Mar 01, 2013) I can not update components using composer
composer.json
...
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.1.*",
"doctrine/orm": ">=2.2.3,<2.4-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",
...
"sonata-project/admin-bundle": "dev-master",
"sonata-project/intl-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "dev-master",
"sonata-project/cache-bundle": "dev-master"
},
...
php composer.phar update symfony/symfony
Problem 1
- Installation request for sonata-project/admin-bundle dev-master -> satisfiable by sonata-project/admin-bundle dev-master.
- Can only install one of: sonata-project/admin-bundle dev-master, sonata-project/admin-bundle 2.1.x-dev.
- Installation request for sonata-project/admin-bundle == 2.1.9999999.9999999-dev -> satisfiable by sonata-project/admin-bundle 2.1.x-dev.
You have set the version of the sonata-project packages to dev-master. The master branch is in sync with the symfony's stable release. Since Symfony2.2 is released on 1 march, you need to update these versions to not require Symfony2.2, or update your project to symfony2.2 (shouldn't be that difficult).
Solution 1: Updating sonata-project versions
Change this:
"sonata-project/admin-bundle": "dev-master",
"sonata-project/intl-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "dev-master",
"sonata-project/cache-bundle": "dev-master"
to
"sonata-project/admin-bundle": "2.1.x",
"sonata-project/intl-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "2.1.x",
"sonata-project/cache-bundle": "dev-master"
Solution 2: Updating Symfony2.1 to 2.2
Read the news article on how to update your project from Symfony2.1 to 2.2. Basically, this means updating the composer.json according to the changes on the main repo, running php composer.phar update and reading the UPGRADE-2.2.md file on what has changed.
Try:
"sonata-project/admin-bundle": "2.1.*",
"sonata-project/doctrine-orm-admin-bundle": "2.1.*#dev",
"sonata-project/intl-bundle": "2.1.*",
"sonata-project/cache-bundle": "2.1.*"
It's work for me.