Context
I am new to websockets, and trying to implement a notifications pusher on Symfony with the help of the WebsocketBundle, following this tutorial.
The bundle is implementing 3 different pushers :
I tried using the zmq pusher and it just does not seem to fit with Windows (I am getting the exact same symptoms as in the linked post)
I then tried WebSocketPusher and when I run the WSServer the port I configured in config.yml is not even opening. Same symptom as this open issue
So, finally, I tried to use AMQP pusher and this time I cannot even install it, but as my google searches do not end up in github open issues, I think that I'm probably the one missing something here, and thus I'm posting here.
Problem
I installed the php extension and it does seem to work as it appears in my php extensions and does not give any errors.
When I run the following command from the tutorial : composer require gos/react-amqp I am getting the following response :
$ composer require gos/react-amqp
Using version ^0.1.2 for gos/react-amqp
./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
- Can only install one of: evenement/evenement[v2.0.0, v2.1.0].
- Can only install one of: evenement/evenement[v2.1.0, v2.0.0].
- Can only install one of: evenement/evenement[v2.0.0, v2.1.0].
- gos/react-amqp v0.1.2 requires evenement/evenement ~2.0.0 -> satisfiable by evenement/evenement[v2.0.0].
- Installation request for gos/react-amqp ^0.1.2 -> satisfiable by gos/react-amqp[v0.1.2].
- Installation request for evenement/evenement (locked at v2.1.0) -> satisfiable by evenement/evenement[v2.1.0].
Installation failed, reverting ./composer.json to its original content.
I don't fully understand the composer error message, but it seems that he is trying to install evenement/evenement ~2.0.0 and for some reason, it fails.
So I tried to add it manually in the composer.json, and composer install ran fine, and evenement/evenement: ~2.0.0 ended up in my composer.lock file.
But the composer require gos/react-amqp command still gave me the same error message.
Same results after a composer update attempt.
Could anyone explain me what is going on ?
I am running PHP 5.5 on a WAMP Server
Alright, so I finally got it working.
For some reason composer would keep using the 2.1.0 version when it was never required.
For those running into the same kind of composer error, here is what I did :
rm composer.lock
explicitely ask for the exact minimum required version, in my case : composer require evenement/evenement:2.0 You should see something like Updating evenement/evenement (v2.1.0 => v2.0.0) Downloading: 100% in the console
composer install
Related
I have a fresh Drupal 10 Installation und would like to install some modules with more ore less simple patches. I tried it in different ways and get allways the same errors with composer require.
This are my steps:
manual changed files for exampe in superfish for this patch:
https://www.drupal.org/files/issues/2022-08-01/superfish-%233.patch and manually put the module in module/contrib folder. Than I tried composer require drupal/superfish:~1.4 with different versions and with and without parameter -W.
I wrote patch in composer.json and tried composer install. There comes the message nothing to install or update. I used also composer update --lock
I downloaded last dev-Version and patch and tried with git apply.
The result with composer require is more ore less the same error like this:
Problem 1 - drupal/block_content_permissions[1.0.0, ..., 1.8.0]
require drupal/core ^8 -> found drupal/core[8.0.0, ..., 8.9.20] but
these were not loaded, likely because it conflicts with another
require. - drupal/block_content_permissions[1.9.0, ..., 1.10.0]
require drupal/core ^8 || ^9 -> found drupal/core[8.0.0, ..., 8.9.20,
9.0.0, ..., 9.5.0] but these were not loaded, likely because it conflicts with another require. - Root composer.json requires
drupal/block_content_permissions * -> satisfiable by
drupal/block_content_permissions[1.0.0, ..., 1.10.0].
You can also try re-running composer require with an explicit version
constraint, e.g. "composer require drupal/block_content_permissions:*"
to figure out if any version is installable, or "composer require
drupal/block_content_permissions:^2.1" if you know which you need.
If I enable the patched modules manualy in backend, they work normaly. But they are not under composer controll.
How to do in the right way?
Drupal.org has a documented process for allowing a lenient composer install.
For Drupal 10:
Try the Lenient Composer Plugin
The lenient composer plugin lets you specify an allowlist of packages
where you are willing to break the version constraint, using a command
like:
composer config --merge --json extra.drupal-lenient.allowed-list '["drupal/token"]'
Together with the Composer Patches Plugin, this allows you to install
any Drupal extension, even if the version constraint hasn't been
officially updated yet. Of course the code may still need to be
patched for deprecations.
In a Symfony 4 project, I'm getting problems after a composer selfupdate to 2.1 (from 1.x). One of the error messages when hitting
composer update nothing
is:
Root composer.json requires ocramius/package-versions == 1.3.0.0 -> satisfiable by ocramius/package-versions[1.3.0].
What is really strange in my opinion is that my composer.json does not contain any references to "ocramius/package-versions" and somehow I don't manage to trace where it comes from. Even stranger: When I try
composer show ocramius/package-versions --tree
I get
[InvalidArgumentException]
Package ocramius/package-versions not found
The only references to "ocramius/package-versions" in my project come from
composer.lock
vendor/composer/package-versions-deprecated/composer.json
vendor/composer/installed.json
It seems it is stuck in the composer.lock, but I dont want to run a real composer update on the whole project because of side effects. Any ideas what I could do?
EDIT:
After getting poked into the direction of composer why I managed to find out why ocramius/package-versions is included at all, but still 1.3.0:
$ composer why ocramius/package-versions
composer/package-versions-deprecated 1.11.99.2 replaces ocramius/package-versions (1.11.99)
ocramius/package-versions 2.3.0 replaces composer/package-versions-deprecated (*)
$ composer why composer/package-versions-deprecated
composer/package-versions-deprecated 1.11.99.2 replaces ocramius/package-versions (1.11.99)
doctrine/migrations 3.2.0 requires composer/package-versions-deprecated (^1.8)
doctrine/orm 2.7.5 requires composer/package-versions-deprecated (^1.8)
symfony/proxy-manager-bridge v4.4.25 requires composer/package-versions-deprecated (^1.8)
Ok, so I finally found why the packages is included. But why the wrong version?
Then the scales fell from my eyes: Why not just update it instead of trying to find out why this version is chosen...???
A simple
composer update ocramius/package-versions
did the trick. D'oh!
As you can see on the packagist page of that package, v1.3.0 is not compatible with Composer v2, as it requires composer-plugin-api: ^1.0.0. You need to update that package if you want to use Composer v2.
If you want to check which package requires this one, you can use composer why
I'm in the process of upgrading my website from Drupal 7 to 8 and one of my tasks is to ensure that all modules are copied over and installed.
I've been able to install every 'Commerce' module apart from the checkout.
Unable to install Commerce Checkout due to unmet dependencies:
core.entity_view_display.commerce_product_variation.default.summary
(commerce_product.commerce_product_variation_type.default)
This question was asked and answered here: Can't install drupal 8 commerce checkout module
However, it does not help me because I've already used Composer to install the commerce module but I still cant enable it.
$ composer require drupal/commerce
Using version ^2.5 for drupal/commerce
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
> Drupal\Core\Composer\Composer::ensureHtaccess
$ composer require drupal/commerce_checkout
Using version ^2.5 for drupal/commerce_checkout
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
> Drupal\Core\Composer\Composer::ensureHtaccess
$ composer require drupal/commerce_product
Using version ^2.5 for drupal/commerce_product
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Writing lock file
Generating autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
> Drupal\Core\Composer\Composer::ensureHtaccess
I appreciate any solutions that you may have and look forward to discussing this issue with you further.
Thanks!
I guess you already fixed the issue yourself simply by "installing" drupal/commerce first.
The three snippets you provided at the end of your question look fine and actually just says they are already "installed". Composer downloaded everything for you and now you just have to enable them via drush or from the UI.
Now I got it. This error message occurs when installing Commerce Checkout via drush/drupal console (or maybe even via the UI). And it says it requires a display or view mode from the Commerce Product entity type. Then I guess the second answer in the linked question is right: install Commerce Product first as that may provide the missing display upon installation.
Even if that doesn't work you may circumvent the issue by creating the display or view mode manually yourself.
Here I show my problem in image file
Can any one help me how to solve this problem?
Show This Error:
Check Component Dependency
We found conflicting component dependencies. Hide detail
Command "update" failed: 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 magento/product-community-edition 2.1.1 -> satisfiable by magento/product-community-edition[2.1.1].
- magevision/module-free-shipping-admin 2.1.0 requires magento/framework 100.0.* -> satisfiable by magento/framework[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.0.6, 100.0.7, 100.0.8, 100.0.9, 100.0.10, 100.0.11].
- Can only install one of: magento/framework[100.1.1, 100.0.2].
- Can only install one of: magento/framework[100.1.1, 100.0.3].
- Can only install one of: magento/framework[100.1.1, 100.0.4].
- Can only install one of: magento/framework[100.1.1, 100.0.5].
- Can only install one of: magento/framework[100.1.1, 100.0.6].
- Can only install one of: magento/framework[100.1.1, 100.0.7].
- Can only install one of: magento/framework[100.1.1, 100.0.8].
- Can only install one of: magento/framework[100.1.1, 100.0.9].
- Can only install one of: magento/framework[100.1.1, 100.0.10].
- Can only install one of: magento/framework[100.1.1, 100.0.11].
- magento/product-community-edition 2.1.1 requires magento/framework 100.1.1 -> satisfiable by magento/framework[100.1.1].
- Installation request for magevision/module-free-shipping-admin 2.1.0 -> satisfiable by magevision/module-free-shipping-admin[2.1.0].
For additional assistance, see component dependency help .
Solved this issue.
You need to update php memory limits in .htaccess and .user.ini files in Magento root directory from 765MB to 2G as they override system php limits.
Your problem is that the extension you're installing expects Magento 2.0.x but you're using 2.1.x.
This leads me to believe that either the extension authors either:
Aren't ready to support Magento 2.1
or
They have erroneously constrained their packages requirements by accident, not understanding Composer's versioning scheme.
Referencing the extension you're installing on Github we can see it specifies some requirements:
"require": {
"php": "~5.5.0|~5.6.0|~7.0.0",
"magento/module-config": "100.0.*",
"magento/module-store": "100.0.*",
"magento/module-shipping": "100.0.*",
"magento/module-backend": "100.0.*",
"magento/module-quote": "100.0.*",
"magento/framework": "100.0.*"
}
Let's take a look at one of the modules required by the extension: magento/module-config with a version constraint of 100.0.*.
I can see that Magento 2.0.10 would supply a compatible version 100.0.5.
Whereas you have Magento 2.1.1 installed, which requires version 100.1.1.
100.1.1 does not satisfy the 100.0.* requirement.
There are roughly two solutions to your problem
Use Magento 2.0 (not ideal but could unblock you to play around with the extension)
Get in touch with the extension developer and see if they intend to support Magento 2.1 (either by updating their code to be compatible or fixing their package to allow installation under 2.1)
You may see require-dev tag in composer.json file.
Run composer install or update with --no-dev flag. This will not install developer dependency packages.
composer install --no-dev
OR
composer update --no-dev
I'm new to the symfony2 and I was following http://symfony.com/doc/current/book/installation.html for installation using Composer now
It gives me a Fatal Error after some time:
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
Writing lock file
Generating autoload files
Fatal error: Call to undefined method Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::defineDirectoryStructure() in /Users/app/SymfonyStandard/RootPackageInstallSubscriber.php on line 28
#hap absolutely right on Debian/Ubuntu
sudo apt-get install php5-curl
is solving this issue. I think on another platform php5-curl will help too.
RESOLVED:
Got the same problem. Deleted the file composer.phar, installed again via curl -s https://getcomposer.org/installer | php - problem persists
/path/to/webroot/project/vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/ScriptHandler.php file does not have the method defineDirectoryStructure() in it
symfony/framework-standard-edition (v2.6.1)
PHP 5.5.9-1ubuntu4.5 (cli) (built: Oct 29 2014 11:59:10)
problem here
sensio/distribution-bundle (v3.0.11)
Thanks #hap, this helped
sudo apt-get install php5-curl
Just had this problem on Debian. For me the problem was that sensio/distribution-bundle in its last version (v3.0.12, the one introducing the defineDirectoryStructure function) requires the cURL PHP extension, which was not installed, so it installed v3.0.11 (which don't contain the required method).
After installing php5-curl, Composer finaly installed the last version of sensio/distribution-bundle and everything was fine.
Got the same problem too ... Works on a debian distrib, but doesn't work on my wamp on windows 7 !
So tried to update my wamp, to get PHP5.5, reconfigure composer to use this PHP, still didn't work ..
Then I tried to launch the Console in Administrator mode, and launch :
"composer create-project symfony/framework-standard-edition sfproject/"
And guess what .... That finally worked !! With administrator rights ... Just give it a try ;)
I have same problem. I just added in composer.json string "symfony/symfony": "2.3.*", And its working for me.
Also, i deleted my composer.phar and composer.lock files.
The problem, if you have in your project symfony 2.3 it installing dependencies for v 2.7 .
I got this error from a install into a new vagrant VM, it would appear that something done recently has broken this as I managed to install a 2.6.0 version last week whilst testing, now it doesn't work.
After a bit of trial and error, it appears that the 2.6x and 2.5x branches are both affected and will not install, but 2.3x and 2.4x do install without the error.
incase anyone doesn't know how to install a specific version, just add it onto the end of the composer command, i.e.
composer create-project symfony/framework-standard-edition . 2.4.x
VM: Ubuntu 14.01 / PHP 5.5.9
I had the same problem in an Ubuntu 14.04 VM set up with PuPHPet and Vagrant/VirtualBox.
I've noticed that when I had the same problem, the DistributionBundle was severely out of date. Trying to upgrade it manually from composer.json (changing the version to 3.0.12, which was the las one available at the time I had the problem) produced a more verbose error, stating I hadn't installed php5-curl.
After updating the PuPHPet config file to include the cURL module for PHP and reprovisioning my VM, Symfony installed just fine, having installed the last version of Sensio Distribution Bundle, which contained the defineDirectoryStructure() method.