The composer does not see php-curl - drupal

Good afternoon at installation drupal 8 by use composer screenshot. I get the following dependency error. screenshot error
On my local machine installation was successful and without a problem. But I do not want to work on the server. At what on another user, the co-op is working like normal.
As far as I understood, he asks for the installation of a php-curl. But he is clever.
I was eating to reset the php-curl and php-cli and restart the server and also run from the user root but nothing helped.
Error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- webflo/drupal-core-require-dev 8.5.3 requires behat/mink-selenium2-driver 1.3.x-dev -> satisfiable by behat/mink-selenium2-driver[1.3.x-dev].
- webflo/drupal-core-require-dev 8.5.4 requires behat/mink-selenium2-driver 1.3.x-dev -> satisfiable by behat/mink-selenium2-driver[1.3.x-dev].
- webflo/drupal-core-require-dev 8.5.5 requires behat/mink-selenium2-driver 1.3.x-dev -> satisfiable by behat/mink-selenium2-driver[1.3.x-dev].
- webflo/drupal-core-require-dev 8.5.x-dev requires behat/mink-selenium2-driver 1.3.x-dev -> satisfiable by behat/mink-selenium2-driver[1.3.x-dev].
- behat/mink-selenium2-driver 1.3.x-dev requires instaclick/php-webdriver ~1.1 -> satisfiable by instaclick/php-webdriver[1.1, 1.1.1, 1.2, 1.2.1, 1.2.2, 1.3.0, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5].
- instaclick/php-webdriver 1.4.5 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- instaclick/php-webdriver 1.4.4 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- instaclick/php-webdriver 1.4.3 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- instaclick/php-webdriver 1.4.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- instaclick/php-webdriver 1.4.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- instaclick/php-webdriver 1.4.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- instaclick/php-webdriver 1.3.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- instaclick/php-webdriver 1.2.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- instaclick/php-webdriver 1.2.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- instaclick/php-webdriver 1.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- instaclick/php-webdriver 1.1.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- instaclick/php-webdriver 1.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- Installation request for webflo/drupal-core-require-dev ~8.5.3 -> satisfiable by webflo/drupal-core-require-dev[8.5.3, 8.5.4, 8.5.5, 8.5.x-dev].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.0/cli/php.ini
- /etc/php/7.0/cli/conf.d/10-mysqlnd.ini
- /etc/php/7.0/cli/conf.d/10-opcache.ini
- /etc/php/7.0/cli/conf.d/10-pdo.ini
- /etc/php/7.0/cli/conf.d/15-xml.ini
- /etc/php/7.0/cli/conf.d/20-calendar.ini
- /etc/php/7.0/cli/conf.d/20-ctype.ini
- /etc/php/7.0/cli/conf.d/20-curl.ini
- /etc/php/7.0/cli/conf.d/20-dom.ini
- /etc/php/7.0/cli/conf.d/20-exif.ini
- /etc/php/7.0/cli/conf.d/20-fileinfo.ini
- /etc/php/7.0/cli/conf.d/20-ftp.ini
- /etc/php/7.0/cli/conf.d/20-gd.ini
- /etc/php/7.0/cli/conf.d/20-gettext.ini
- /etc/php/7.0/cli/conf.d/20-iconv.ini
- /etc/php/7.0/cli/conf.d/20-imap.ini
- /etc/php/7.0/cli/conf.d/20-intl.ini
- /etc/php/7.0/cli/conf.d/20-json.ini
- /etc/php/7.0/cli/conf.d/20-ldap.ini
- /etc/php/7.0/cli/conf.d/20-mbstring.ini
- /etc/php/7.0/cli/conf.d/20-mcrypt.ini
- /etc/php/7.0/cli/conf.d/20-mysqli.ini
- /etc/php/7.0/cli/conf.d/20-pdo_mysql.ini
- /etc/php/7.0/cli/conf.d/20-phar.ini
- /etc/php/7.0/cli/conf.d/20-posix.ini
- /etc/php/7.0/cli/conf.d/20-pspell.ini
- /etc/php/7.0/cli/conf.d/20-readline.ini
- /etc/php/7.0/cli/conf.d/20-shmop.ini
- /etc/php/7.0/cli/conf.d/20-simplexml.ini
- /etc/php/7.0/cli/conf.d/20-soap.ini
- /etc/php/7.0/cli/conf.d/20-sockets.ini
- /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.0/cli/conf.d/20-sysvsem.ini
- /etc/php/7.0/cli/conf.d/20-sysvshm.ini
- /etc/php/7.0/cli/conf.d/20-tokenizer.ini
- /etc/php/7.0/cli/conf.d/20-wddx.ini
- /etc/php/7.0/cli/conf.d/20-xmlreader.ini
- /etc/php/7.0/cli/conf.d/20-xmlwriter.ini
- /etc/php/7.0/cli/conf.d/20-xsl.ini
- /etc/php/7.0/cli/conf.d/20-zip.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

I corrected this problem as follows.
1) Found the extension Curl file
ls /usr/lib/php/20151012/ | grep curl
- result:
curl.so
2) Change path in /etc/php/7.0/cli/php.ini
extension=php_curl.dll --> change on
extension=curl.so

Related

Can not update google/cloud-firestore [composer]

Now, I am using google/cloud-firestore ^0.8.1 and I want to update this library to latest version (0.14.0).
My composer.json now looks like:
"require": {
"grpc/grpc": "^1.10",
"google/protobuf": "^3.5",
"google/gax": "^0.31.3",
"google/cloud-firestore": "^0.8.1",
"firebase/php-jwt": "^5.0",
}
When I try to update firestore library with php composer.phar require google/cloud-firestore
, I got:
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for google/cloud-firestore ^0.14.0 -> satisfiable by google/cloud-firestore[v0.14.0].
- google/cloud-firestore v0.14.0 requires google/gax ^0.37 -> satisfiable by google/gax[0.37.0] but these conflict with your requirements or minimum-stability.
Installation failed, reverting ./composer.json to its original content.
After that, I tried with php composer.phar require google/gax and got:
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- google/cloud-firestore v0.8.1 requires google/gax ^0.31.1 -> satisfiable by google/gax[0.31.x-dev].
- google/cloud-firestore v0.8.1 requires google/gax ^0.31.1 -> satisfiable by google/gax[0.31.x-dev].
- google/cloud-firestore v0.8.1 requires google/gax ^0.31.1 -> satisfiable by google/gax[0.31.x-dev].
- Can only install one of: google/gax[0.37.0, 0.31.x-dev].
- Installation request for google/gax ^0.37 -> satisfiable by google/gax[0.37.0].
- Installation request for google/cloud-firestore ^0.8.1 -> satisfiable by google/cloud-firestore[v0.8.1].
Installation failed, reverting ./composer.json to its original content.
I added "minimum-stability": "dev" to composer.json but that didn't resolve problem.
How to properly update these libraries and fix dependencies between them?
The semantic versioning operator (^) behaves slightly different with pre-1.0 releases (see https://getcomposer.org/doc/articles/versions.md#caret-version-range-):
For pre-1.0 versions it also acts with safety in mind and treats ^0.3 as ?>=0.3.0 <0.4.0.
This means that you will have to update both packages like this:
composer require google/cloud-firestore:^0.14 google/gax:^0.37
With #xabbuh help, I find out solution.
There wasn't problem just in semantic versioning operator (^) but in packages I wanted to update.
I needed to install/update all packages that are needed for updating firestore on version 0.14. I called composer require google/cloud-firestore:^0.14 and after that composer require google/gax:^0.37 and after that tried with reverse order, but there were similar error messages.
When I included all packages needed into require command for updating firestore package it passed well.
So, here are working command:
composer require google/cloud-firestore:^0.14 google/gax:^0.37 google/auth:^1.3 google/grpc-gcp:^0.1.0 grpc/grpc:^1.13.0 google/cloud-core:^1.23

Symfony - FOSUserBundle Profile view does not work after update to Symfony 2.8

I have upgraded my Symfony project from version 2.6 to 2.8 and after that, I receive an error 500 when I request the profile view. The error is:
Error: Call to a member function has() on null
Stack Trace in vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php at line 350 -
*/
public function getUser()
{
if (!$this->container->has('security.token_storage')) {
throw new \LogicException('The SecurityBundle is not registered in your application.');
}
When I run composer show -i, I see the next list:
You are using the deprecated option "installed". Only installed packages are shown by default now. The --all option can be used to show all packages.
doctrine/annotations v1.4.0 Docblock Annotations Parser
doctrine/cache v1.6.2 Caching library offering a...
doctrine/collections v1.4.0 Collections Abstraction li...
doctrine/common v2.7.3 Common Library for Doctrin...
doctrine/dbal v2.5.13 Database Abstraction Layer
doctrine/doctrine-bundle 1.8.1 Symfony DoctrineBundle
doctrine/doctrine-cache-bundle 1.3.2 Symfony Bundle for Doctrin...
doctrine/inflector v1.1.0 Common String Manipulation...
doctrine/instantiator 1.0.5 A small, lightweight utili...
doctrine/lexer v1.0.1 Base library for a lexer t...
doctrine/orm v2.5.14 Object-Relational-Mapper f...
friendsofsymfony/jsrouting-bundle 1.5.3 A pretty nice way to expos...
friendsofsymfony/oauth-server-bundle 1.5.0 Symfony2 OAuth Server Bundle
friendsofsymfony/oauth2-php 1.2.2 OAuth2 library
friendsofsymfony/user-bundle dev-master 9b3be01 Symfony FOSUserBundle
incenteev/composer-parameter-handler v2.1.2 Composer script handling y...
ircmaxell/password-compat v1.0.4 A compatibility library fo...
jdorn/sql-formatter v1.2.17 a PHP SQL highlighting lib...
jms/aop-bundle 1.3.0 Adds AOP capabilities to S...
jms/cg 1.2.0 Toolset for generating PHP...
jms/di-extra-bundle 1.9.1 Allows to configure depend...
jms/metadata 1.6.0 Class/method/property meta...
jms/parser-lib 1.0.0 A library for easily creat...
jms/security-extra-bundle dev-master c4a5dda Enhances the Symfony2 Secu...
knplabs/knp-snappy v1.0.4 PHP5 library allowing thum...
knplabs/knp-snappy-bundle v1.5 Easily create PDF and imag...
kriswallsmith/assetic v1.4.0 Asset Management for PHP
liuggio/ExcelBundle v2.1.0 This is a Symfony2 Bundle ...
monolog/monolog 1.23.0 Sends your logs to files, ...
paragonie/random_compat v2.0.11 PHP 5.x polyfill for rando...
phpoffice/phpexcel 1.8.1 PHPExcel - OpenXML - Read,...
phpoption/phpoption 1.5.0 Option Type for PHP
phpunit/php-code-coverage 1.2.18 Library that provides coll...
phpunit/php-file-iterator 1.4.5 FilterIterator implementat...
phpunit/php-text-template 1.2.1 Simple template engine.
phpunit/php-timer 1.0.9 Utility class for timing
phpunit/php-token-stream 1.2.2 Wrapper around PHP's token...
phpunit/phpunit 3.7.38 The PHP Unit Testing frame...
phpunit/phpunit-mock-objects 1.2.3 Mock Object library for PH...
psr/log 1.0.2 Common interface for loggi...
sensio/distribution-bundle v2.3.22 The base bundle for the Sy...
sensio/framework-extra-bundle v3.0.29 This bundle provides a way...
sensio/generator-bundle v2.5.3 This bundle generates code...
stripe/stripe-php v3.23.0 Stripe PHP Library
swiftmailer/swiftmailer v5.4.9 Swiftmailer, free feature-...
symfony/assetic-bundle v2.8.2 Integrates Assetic into Sy...
symfony/monolog-bundle v2.12.1 Symfony MonologBundle
symfony/polyfill-intl-icu v1.7.0 Symfony polyfill for intl'...
symfony/polyfill-mbstring v1.7.0 Symfony polyfill for the M...
symfony/polyfill-php54 v1.7.0 Symfony polyfill backporti...
symfony/polyfill-php55 v1.7.0 Symfony polyfill backporti...
symfony/polyfill-php56 v1.7.0 Symfony polyfill backporti...
symfony/polyfill-php70 v1.7.0 Symfony polyfill backporti...
symfony/polyfill-util v1.7.0 Symfony utilities for port...
symfony/security-acl v2.8.0 Symfony Security Component...
symfony/swiftmailer-bundle v2.6.7 Symfony SwiftmailerBundle
symfony/symfony v2.8.0 The Symfony PHP framework
twig/extensions v1.5.1 Common additional features...
twig/twig v1.35.0 Twig, the flexible, fast, ...
willdurand/jsonp-callback-validator v1.1.0 JSONP callback validator.
I have been researching for hours and I havenĀ“t found useful information about this error.
Thanks in advance.
The issue is in your Controllers. Probably they extend Symfony\Component\ DependencyInjection\ContainerAware that is deprecated since version 2.8. Remove this and use Symfony\ Component\DependencyInjection\ ContainerAwareTrait.
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
class MyBundleController implements ContainerAwareInterface {
use ContainerAwareTrait;
/**
* #Route("/", name="_index")
* #Template()
*/
public function indexAction() {
var_dump($this->container);
return array();
}
}
Edit: Cerad was right in the comments:
there is is not need to rewrite your existing controllers that extend from Controller. The problem is in third party bundles like the FOSUserBundle which do not extend from Controller. However, even they should still work under 2.8 or at least give different errors.
It should work in either case.
References:
ref 1
Symfony 2.8 upgrade -> ContainerAwareTrait

Unable to update dompdf via Composer in Drupal 8

We are in the midst of trying to get all of our Drupal modules that were not installed using Composer to be managed within Composer.
Composer: 1.4.12
Drupal: 8.3.1
After clearing Composer's cache, we ran the following:
./composer require dompdf/dompdf;
This returns:
./composer.json has been updated
> DrupalProject\composer\ScriptHandler::checkComposerVersion
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: phenx/php-svg-lib[v0.2, 0.1].
- Can only install one of: phenx/php-svg-lib[v0.2, 0.1].
- Can only install one of: phenx/php-svg-lib[v0.2, 0.1].
- dompdf/dompdf v0.8.0 requires phenx/php-svg-lib 0.2.* -> satisfiable by phenx/php-svg-lib[v0.2].
- Installation request for dompdf/dompdf ^0.8.0 -> satisfiable by dompdf/dompdf[v0.8.0].
- Installation request for phenx/php-svg-lib (locked at 0.1) -> satisfiable by phenx/php-svg-lib[0.1].
Installation failed, reverting ./composer.json to its original content.
It seems like the proper thing to do would be to not lock "phenx/php-svg-lib" to version 0.1, then upgrade dompdf, however when we modified dompdf's composer.json file to require phenx/php-svg-lib version 0.2.*, clearcache, then try require again, we get the same error as above, which still references the lock at 0.1. I've also confirmed that dompdf is the only vendor module that is using phenx/php-svg-lib.
Also, is there a reason why "Can only install one of" is listed three times?
Thank you in advance for any advice.
It appears like this problem happens when updating dompdf from version 0.7.0 to 0.8.0. For some reason, the update works perfectly fine with composer 1.2.x, but does result with the above error with version 1.4.x.
The fix that did the job for me was to remove
"dompdf/dompdf": "^0.7.0"
from the composer.json file and then run:
composer update
The result should be something like:
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 0 updates, 3 removals
- Removing dompdf/dompdf (v0.7.0)
- Removing phenx/php-font-lib (0.4)
- Removing phenx/php-svg-lib (0.1)
Writing lock file
Generating autoload files
Then require a new version:
composer require dompdf/dompdf

FOSRestBundle & JMSSerializerBundle with symfony 2.7 and PHP 5.5.12

I'd like to add the 2 libraries FOSRestBundle & JMSSerializerBundle to my application built with symfony 2.7 but i encountred this response
Problem 1
- Installation request for friendsofsymfony/rest-bundle dev-master -> satisfiable by friendsofsymfony/rest-bundle[dev-master].
- friendsofsymfony/rest-bundle dev-master requires php ^5.5.9|~7.0 -> your PHP version (5.5.12) overriden by "config.platform.php" version (5.3.9) does not satisfy that requirement.
Problem 2
- Installation request for jms/serializer-bundle dev-master -> satisfiable by jms/serializer-bundle[dev-master].
- jms/serializer-bundle dev-master requires php >=5.4.0 -> your PHP version (5.5.12) overriden by "config.platform.php" version (5.3.9) does not satisfy that requirement.
Notice that PHP version is 5.5.12
I think the problem is the version of this 2 libraries. If yes, What are the versions of FOSRestBundle & JMSSerializerBundle ?
dev-master should never be used as version bound when requiring a package as dependency, except in some specific cases.
Go to https://packagist.org/ then search for the packages you are looking for and use their respective current stable version as version bound for your composer.json's requirement.
Also, in your composer.json, you have a config key containing a platform.php key with 5.3.9 as value. Remove or override this block according to your real PHP version. See Symfony2, composer, your PHP version (5.6.18) overriden by "config.platform.php" version (5.3.9) does not satisfy requirement.
Of course, if the last stable version of one of them isn't compatible with your environment (PHP >= 5.5.9 for friendsofsymfony/rest-bundle), you need to look for an older version supporting your environment (all is available on packagist, and surely on the official documentation of these packages).

mink-goutte-driver. Can't install fabpot/goutte on Symfony 2.0

I am using composer with Symfony 2.0.15 and migrating to latest Behat 2.4. This is in my composer.json:
"require-dev": {
"behat/behat": "2.4#stable",
"behat/mink-extension": "*",
"behat/symfony2-extension": "*",
"behat/mink-browserkit-driver": "*",
"behat/mink-goutte-driver": "dev-master",
"behat/common-contexts": "*",
"kriswallsmith/buzz": ">=0.5.0"
}
I run: php composer.phar update --dev
And there is an error:
Your requirements could not be solved to an installable set of packages.
Problem 1
- Installation request for behat/mink-goutte-driver dev-master -> satisfiable by behat/mink-goutte-driver dev-master.
- don't install fabpot/goutte 1.0.x-dev|install fabpot/goutte dev-master
- behat/mink-goutte-driver dev-master requires fabpot/goutte 1.0.* -> satisfiable by fabpot/goutte 1.0.x-dev.
- Conclusion: remove symfony/symfony v2.0.15
- fabpot/goutte dev-master requires symfony/dom-crawler 2.1.* -> satisfiable by symfony/symfony 2.1.x-dev, symfony/dom-crawler v2.1.0-BETA1, symfony/dom-crawler 2.1.x-dev, symfony/symfony v2.1.0-BETA1.
- Can only install one of: symfony/symfony v2.0.15, symfony/symfony 2.1.x-dev.
- Can only install one of: symfony/symfony v2.1.0-BETA1, symfony/symfony v2.0.15.
- don't install symfony/symfony v2.0.15|don't install symfony/dom-crawler v2.1.0-BETA1
- don't install symfony/dom-crawler 2.1.x-dev|don't install symfony/symfony v2.0.15
- Installation request for symfony/symfony == 2.0.15.0 -> satisfiable by symfony/symfony v2.0.15.
If I understand the error correctly, it is because fabpot/goutte package is dependent on Symfony 2.1 packages and not available for Symfony 2.0. Correct me, if I am wrong.
Here is my behat.yml:
default:
formatter:
parameters:
paths: false
context:
class: 'Site\PublicBundle\Features\Context\FeatureContext'
parameters:
base_url: 'http://test-anton.site.com'
extensions:
Behat\Symfony2Extension\Extension:
mink_driver: true
bundle: 'PublicBundle'
kernel:
env: test
debug: true
Behat\MinkExtension\Extension:
default_session: symfony2
base_url: 'http://test-anton.site.com'
And this is sample of my failing scenario:
Scenario: User can view homepage
When I go to "/"
Then the response code should be 200
"When I go to" - is a MinkContext step, but "Then the response code should be 200" - is a step from Behat\CommonContexts\WebApiContext. When I use only steps from MinkContext - "Then the response status code should be 200" it works just fine.
The final answer is that Behat\CommonContexts\WebApiContext is not compatible with Behat 2.4.
Might be a stupid question but do you use goutte? I went through a similar update recently and mink-browserkit-driver was all I needed.
I'm not sure why goutte has a dependency on 2.1 and it might be risky to use it with 2.0. If you really need it try defining a custom repository for goutte in your composer.json (and lie about requirements on Symfony).
Update
Notice that error message says "Call to a member function getUri()". It relates to getCurrentUri():
public function getCurrentUrl()
{
return $this->client->getRequest()->getUri();
}
It means that client is there but getRequest() returns null. That suggests request was not made yet.
Did you make a request before accessing its URL?
Installing Goutte won't solve your issue (you don't need it at all).

Resources