Author Topic: Problem with composer  (Read 6515 times)

Offline scldad

  • Newbie
  • *
  • Posts: 4
Problem with composer
« on: April 02, 2017, 02:45:36 AM »
I am a newbie to Roundcube and to composer.
My new Roundcube 1.2.4 installation on Centos 7.3.1611 seems to be working well despite an issue with composer but I can't add anything with composer.

Here is the output from my composer run:

[scldad@server roundcubemail]$ php composer.phar install --no-dev
Loading composer repositories with package information
Initializing PEAR repository https://pear.php.net
PEAR repository from https://pear.php.net could not be loaded. The "https://pear.php.net/rest/c/Date+and+Time/packagesinfo.xml" file could not be downloaded: failed to open stream: Connection timed out
Reading composer.json of roundcube/net_sieve (RELEASE_1_1_6)                                                                                                                   Updating dependencies                                         
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package pear-pear.php.net/net_socket could not be found in any version, there may be a typo in the package name.
  Problem 2
    - The requested package pear-pear.php.net/auth_sasl could not be found in any version, there may be a typo in the package name.
  Problem 3
    - The requested package pear-pear.php.net/net_idna2 could not be found in any version, there may be a typo in the package name.
  Problem 4
    - The requested package pear-pear.php.net/mail_mime could not be found in any version, there may be a typo in the package name.
  Problem 5
    - The requested package pear-pear.php.net/net_smtp could not be found in any version, there may be a typo in the package name.
  Problem 6
    - The requested package pear-pear.php.net/crypt_gpg 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://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Here is my composer.json. It is the release version with automatic-addressbook added and secure-http turned off in an attempt to fix the issue:

{
    "name": "roundcube/roundcubemail",
    "description": "The Roundcube Webmail suite",
    "license": "GPL-3.0+",
    "repositories": [
        {
            "type": "pear",
            "url": "https://pear.php.net/"
        },
        {
            "type": "composer",
            "url": "https://plugins.roundcube.net/"
        },
        {
            "type": "vcs",
            "url": "https://github.com/roundcube/Net_Sieve.git"
        },
        {
            "type": "vcs",
            "url": "https://git.kolab.org/diffusion/PNL/php-net_ldap.git"
        }
    ],
    "require": {
        "php": ">=5.3.7",
        "pear/pear-core-minimal": "~1.10.1",
        "roundcube/plugin-installer": "~0.1.6",
        "pear-pear.php.net/net_socket": "~1.0.12",
        "pear-pear.php.net/auth_sasl": "~1.0.6",
        "pear-pear.php.net/net_idna2": "~0.1.1",
        "pear-pear.php.net/mail_mime": "~1.10.0",
        "pear-pear.php.net/net_smtp": "~1.7.1",
        "pear-pear.php.net/crypt_gpg": "~1.4.2",
        "roundcube/net_sieve": "~1.5.0",
        "sblaisot/automatic_addressbook": "~0.4.2"
    },
    "require-dev": {
        "phpunit/phpunit": "*"
    },
    "suggest": {
        "pear-pear.php.net/net_ldap2": "~2.2.0 required for connecting to LDAP address books",
        "kolab/Net_LDAP3": "dev-master required for connecting to LDAP address books"
    },
    "minimum-stability": "dev",
    "config":{
        "secure-http" : false
    }
}

TIA,
Stephen

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
Re: Problem with composer
« Reply #1 on: April 02, 2017, 03:38:44 AM »
PEAR repository from https://pear.php.net could not be loaded. The "https://pear.php.net/rest/c/Date+and+Time/packagesinfo.xml" file could not be downloaded: failed to open stream: Connection timed out

Connection issue. Check you firewall.

Offline scldad

  • Newbie
  • *
  • Posts: 4
Re: Problem with composer
« Reply #2 on: April 02, 2017, 04:36:44 AM »
No! Not a firewall issue as I can access that page with lynx.

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
Re: Problem with composer
« Reply #3 on: April 02, 2017, 06:52:28 AM »
Then I don't know. You may try switching to use packagist instead of pear as we did in git-master. https://github.com/roundcube/roundcubemail/commit/91e36f2ffe247d98c62145cad8e10f037061d604

Offline scldad

  • Newbie
  • *
  • Posts: 4
Re: Problem with composer
« Reply #4 on: April 02, 2017, 07:12:35 AM »
I've looked at your suggested link and at packagist but cannot see how to actually do the switch.
Could you please provide more detail.

Offline scldad

  • Newbie
  • *
  • Posts: 4
Re: Problem with composer
« Reply #5 on: April 02, 2017, 09:41:41 PM »
In the light of a new day I can see how to do the switch.
With the amended composer.json I got a deal further but still had:

Problem 1
    - The requested package pear/auth_sasl ~1.0.6 exists as pear/auth_sasl[dev-master, v1.1.0] but these are rejected by your constraint.
  Problem 2
    - The requested package pear/net_idna2 ~0.1.1 exists as pear/net_idna2[dev-tags/Net_IDNA2-0.1.1, dev-tags/RELEASE_0_1_0, dev-tags/RELEASE_0_7_2, dev-tags/RELEASE_0_7_2@255779, dev-tags/RELEASE_0_7_2@300124, dev-topics/composer-for-pear, dev-trunk, dev-trunk@300124, v0.2.0] but these are rejected by your constraint.

On investigation, I found that these two modules were already installed so I deleted the two lines from composer.json and the installation completed successfully but with:

pear/net_smtp suggests installing pear/auth_sasl (Install optionally via your project's composer.json)
roundcube/net_sieve suggests installing pear/auth_sasl (Install optionally via your project's composer.json)
symfony/yaml suggests installing symfony/console (For validating YAML files using the lint command)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit-mock-objects suggests installing ext-soap (*)
phpunit/php-code-coverage suggests installing ext-xdebug (^2.5.1)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
phpunit/phpunit suggests installing ext-xdebug (*)

As these are only suggestions, I think/hope that my issue is resolved.

However, I would like to know how to overcome the above dev-related errors.

Cheers and thanks,
Stephen

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
Re: Problem with composer
« Reply #6 on: April 03, 2017, 02:27:55 AM »
Try to remove minimum-stability.