Forums › Forums › OroCRM › OroCRM – How do I? Questions › Third Party Packages … Composer Require
This topic contains 11 replies, has 2 voices, and was last updated by ballisticpain 8 years, 1 month ago.
Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
- CreatorTopic
- March 23, 2016 at 4:15 am #28862
So I’m trying to add customizations to my CRM installation… Currently trying to notify when I get a lead created via an incoming call through Twilio. I want to send a text message when done. Fortunately I can do all the call handling via TwiML, but for sending messages it does seem that I need to use the Twilio API. There’s a Symfony Bundle that wraps the API into services… https://github.com/fridolin-koch/VreshTwilioBundle
My problem is that when I do a
Shell1composer require vresh/twilio-bundle:dev-masterit adds the proper information to the composer.json file, but it does not install anything.
Looking deeper I notice that orocrm is running it’s own “packagist”, and this package is NOT one they are keeping in their repository of packages.
How am I supposed to add third party bundles/libraries if they aren’t in the orocrm packagist repository?
Thanks in advance!
Jarvis - CreatorTopic
- AuthorReplies
- March 23, 2016 at 4:20 am #28863
I do see that I could manually specify the particular details and have it download the repository, but I feel this should not be the case. Am I mistaken or doing something wrong?
Here’s where it explains how I could manually add the “package”: https://getcomposer.org/doc/05-repositories.md#packagist
All the best,
JarvisMarch 23, 2016 at 8:37 am #28864Hello, Jarvis.
I’ve tried to use specified command and I’ve managed to install this package successfully:
Shell12345678910111213141516171819202122$ composer require vresh/twilio-bundle:dev-master./composer.json has been updatedLoading composer repositories with package informationUpdating dependencies (including require-dev)- Installing twilio/sdk (4.10.0)Downloading: 100%- Installing vresh/twilio-bundle (dev-master 9fe3db7)Cloning 9fe3db7097ef5eb23bf1520acbb682605b1fcbe1Writing lock fileGenerating autoload files> ComponentInstaller\Installer::postAutoloadDumpCompiling component files> Incenteev\ParameterHandler\ScriptHandler::buildParametersUpdating the "app/config/parameters.yml" file> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile> Oro\Bundle\InstallerBundle\Composer\ScriptHandler::setPermissions> Oro\Bundle\InstallerBundle\Composer\ScriptHandler::installAssets> Oro\Bundle\InstallerBundle\Composer\ScriptHandler::setAssetsVersionUpdating the "assets_version" parameterNow you just need to enable this bundle via bundles.yml file (e.g. in your custom bundle).
orocrm is running it’s own “packagist”, and this package is NOT one they are keeping in their repository of packages.
Correct, but this is just an additional repository used to search packages, so basic packagist is used to find all other packages too.
If you can explain how to reproduce this issue – we will be happy to help you and find a solution.
March 23, 2016 at 6:24 pm #28865@Yehven,
I will try again, and report back. After further reading I assumed it was supposed to also check packagist… It does turn out I do need it. I can’t use TwiML to send messages without first receiving one.
Thanks!
JarvisMarch 23, 2016 at 6:28 pm #28866Ah… (I stayed up all night so I failed to report the issue fully)
(First off my composer is a bit out of date so going to update that…)
Second I get…
[RuntimeException]
The lock file does not contain require-dev information, run install with the –no-dev option or run update to install those packages.It’s the Exception that’s stopping me… though running a composer install –no-dev afterwards doesn’t do anything even though I can verify the library is added to my composer.json.
Thoughts?
Thanks!
JarvisMarch 23, 2016 at 6:30 pm #28867Wow … I just ran a install –no-dev AFTER doing the self update. It uninstalled the new stuff and re-installed older stuff. Guess I need to do an update locally and commit a new lock file.
Thoughts?
JarvisMarch 23, 2016 at 10:05 pm #28868All is well… thanks!
How do I mark as resolved?
All the best,
JarvisMarch 23, 2016 at 11:52 pm #28869I have re-opened this issue as I’m having trouble working on my Slack integration.
When I did this:
composer require cleentfaar/slack ~0.14
I get an error:
Shell1234567891011121314151617$ composer require cleentfaar/slack ~0.17./composer.json has been updatedLoading composer repositories with package informationUpdating dependencies (including require-dev)Your requirements could not be resolved to an installable set of packages.Problem 1- Conclusion: don't install cleentfaar/slack 0.18.1- Can only install one of: jms/serializer[0.16.0, 0.14.0].- Can only install one of: jms/serializer[0.16.0, 0.14.0].- Can only install one of: jms/serializer[0.16.0, 0.14.0].- cleentfaar/slack 0.17.1 requires jms/serializer ~0.16 -> satisfiable by jms/serializer[0.16.0].- Installation request for cleentfaar/slack ~0.17 -> satisfiable by cleentfaar/slack[0.17.1, 0.18.1].- Installation request for jms/serializer == 0.14.0.0 -> satisfiable by jms/serializer[0.14.0].Installation failed, reverting ./composer.json to its original content.I have proceeded to attempt to update the jms/serializer and jms/serializer-bundle dependencies but both of those fail with similar errors.
Not sure how to proceed.
Thanks,
JarvisMarch 24, 2016 at 3:34 am #28870You have to choose one of these versions and handle version conflicts. How to do that – up to you to decide because cleentfaar/slack does not included into OroCRM package. I’d suggest to use higher version because usually highest version includes functionality from the older version.
March 24, 2016 at 9:09 am #28871Yevhen,
As I stated above I attempted to update those specific libraries, but I get more errors about versions…
Here’s what I ran:
composer require jms/serializer
Here’s what I get back from that:
Shell1234567891011121314151617181920Using version ^1.1 for jms/serializer./composer.json has been updatedLoading composer repositories with package informationUpdating dependencies (including require-dev)Your requirements could not be resolved to an installable set of packages.Problem 1- jms/serializer-bundle 0.13.0 requires jms/serializer ~0.11 -> no matching package found.- jms/serializer-bundle 0.13.0 requires jms/serializer ~0.11 -> no matching package found.- jms/serializer-bundle 0.13.0 requires jms/serializer ~0.11 -> no matching package found.- Installation request for jms/serializer-bundle == 0.13.0.0 -> satisfiable by jms/serializer-bundle[0.13.0].Potential causes:- A typo in the package name- The package is not available in a stable-enough version according to your minimum-stability settingsee <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.Installation failed, reverting ./composer.json to its original content.Here’s another attempt:
composer require jms/serializer jms/serializer-bundle
Here’s what I get back from that:
Shell12345678910111213141516171819202122Using version ^1.1 for jms/serializerUsing version ^1.1 for jms/serializer-bundle./composer.json has been updatedLoading composer repositories with package informationUpdating dependencies (including require-dev)Your requirements could not be resolved to an installable set of packages.Problem 1- oro/platform 1.x-dev requires jms/serializer 0.14.0 -> no matching package found.- oro/platform 1.x-dev requires jms/serializer 0.14.0 -> no matching package found.- oro/platform 1.x-dev requires jms/serializer 0.14.0 -> no matching package found.- oro/platform 1.x-dev requires jms/serializer 0.14.0 -> no matching package found.- Installation request for oro/platform 1.x-dev -> satisfiable by oro/platform[1.x-dev].Potential causes:- A typo in the package name- The package is not available in a stable-enough version according to your minimum-stability settingsee <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.Installation failed, reverting ./composer.json to its original content.Thoughts?
Thanks,
JarvisMarch 24, 2016 at 9:21 am #28872Unfortunately, you can’t handle this conflict just by adding new modules with required versions – you should remember about platform dependencies that have strict versions too (that’s why you have this issue).
So, possible solution is either using of older version of cleentfaar/slack (e.g. 0.9.4), or fixing of dependency versions of OroPlatform. I’d like to warn you that if you’ll choose fixing of platform dependencies then application might become unstable because it wasn’t tested with higher versions of JMS serializer. We already have improvement to use higher version of JMS serializer, but I can’t tell you when it will be done.
March 24, 2016 at 3:03 pm #28873So I resolved by using alias’. I knew it was a locked in platform dependency… Here’s what I manually put into my composer.json (as I don’t know the command line equivalent).
YAML12"jms/serializer": "1.1 as 0.14.0","jms/serializer-bundle": "1.1 as 0.13.0",I’ll let you know if I experience any difficulties.
Thanks for your continued assistance!
All the best,
Jarvis - AuthorReplies
The forum ‘OroCRM – How do I? Questions’ is closed to new topics and replies.