| Recommend this page to a friend! |
| PHP OAuth Library | > | All threads | > | 1.0.81 not installable via composer | > | (Un) Subscribe thread alerts |
| |||||||||||||
seems like the dependency try is no valid
[CODE] $ composer update phpclasses/oauth-api 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: phpclasses/httpclient[1.0.5, 1.0.2]. - Can only install one of: phpclasses/httpclient[1.0.2, 1.0.5]. - phpclasses/oauth-api 1.0.81 requires phpclasses/httpclient 1.0.5 -> satisfiable by phpclasses/httpclient[1.0.5]. - Installation request for phpclasses/oauth-api ~1.0.81 -> satisfiable by phpclasses/oauth-api[1.0.81]. - Installation request for phpclasses/httpclient (locked at 1.0.2) -> satisfiable by phpclasses/httpclient[1.0.2]. [CODE] PHP, 5.4.4
Isn't that because you locked the dependency to HTTP client 1.0.2 and it was updated? The site only keeps the latest version.
Try removing composer.lock and let me know if it works.
thx for your reply.
I did not explicitly lock something, but it seems the way the dependencies are declared between the packages I need to update boht in t tandem (as you cannot update one without updating the other): composer update phpclasses/oauth-api phpclasses/httpclient this does not longer error the way I posted above, but it instead errors out as it looks that the downloaded ZIP file is corrupt? $ composer update phpclasses/oauth-api phpclasses/httpclient Package "phpclasses/httpclient" listed for update is not installed. Ignoring. Loading composer repositories with package information Updating dependencies (including require-dev) - Installing phpclasses/httpclient (1.0.5) Downloading: 100% [RuntimeException] Failed to execute unzip '/xxx/vendor/phpclasses/httpclient/07256155800cf60a30154e5cc8a409af.zip' -d '/xxx/vendor/composer/d07e152b' && chmod -R u+w '/xxx/rocket/vendor/composer /d07e152b' warning [/xxx/rocket/vendor/phpclasses/httpclient/07256155800cf60a30154e5cc8a409af.zip]: 2303 extra by tes at beginning or within zipfile (attempting to process anyway) file #1: bad zipfile offset (local header sig): 2303 (attempting to re-compensate) update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authori tative] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]... this error might also be related to a other problem: composer update phpclasses/oauth-api Loading composer repositories with package information Updating dependencies (including require-dev) - Installing phpclasses/httpclient (1.0.2) [Composer\Downloader\TransportException] Your configuration does not allow connections to http://www.phpclasses.org/install/package/httpclient.zip. See https://getcomposer.org/doc/06-config.md#secure-http for details. update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]... should phpclasses.org provide the packages via HTTPS? HTTP does not longer work as of the latest composer release (at least not per default settings)
sorry for the spamming... just to make it clear:
I was able to update phpclasses/oauth-api after allowing non-secure http. Update of phpclasses/httpclient still fails with the zip error though.
PHPClasses Composer repository works with either SSL or not. Just change your composer.json file to use https://www.phpclasses.org/ .
I tried to install the httpclient package and it works for me. It is possible that you may have a broken Zip extension or even it is missing. Try checking that.
composer works with packages provided by packagist, only phpclasses.org runs into errors.
I am already using a https urls to phpclasses and it still doesnt work. sometimes I get errors like Failed to decode response: Failed to decode zlib stream Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info I am using php7 maybe this is the problem in combination with some sort of server side error. php -v PHP 7.0.9-1+deb.sury.org~trusty+1 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.9-1+deb.sury.org~trusty+1, Copyright (c) 1999-2016, by Zend Technologies
sometimes I get errors like
Analyzed 956 rules to resolve dependencies - Installing phpclasses/sasl (1.0.0) Downloading https://www.phpclasses.org/install/package/sasl.zip Downloading: 100% Writing /.composer/cache/files/phpclasses/sasl/37f1adb8d50818fc9cc2d0de90419eff76473cc7.zip into cache from /xxx/vendor/phpclasses/sasl/63c2deba455798a8833ec0aead5baaa6.zip Extracting archive Executing command (CWD): unzip '/xxx/phpclasses/sasl/63c2deba455798a8833ec0aead5baaa6.zip' -d '/xxx/vendor/composer/f989f0fc' && chmod -R u+w '/xxx/vendor/composer/f989f0fc' Installation failed, reverting ./composer.json to its original content. [RuntimeException] Failed to execute unzip '/xxx/vendor/phpclasses/sasl/63c2deba455798a8833ec0aead5baaa6.zip' -d '/cluster/www/www/www/rocket/vendor/composer/f989f0fc' && c hmod -R u+w '/xxx/vendor/composer/f989f0fc' warning [/xxx/vendor/phpclasses/sasl/63c2deba455798a8833ec0aead5baaa6.zip]: 5706 extra bytes at beginning or within zipfile (attempting to process anyway) file #1: bad zipfile offset (local header sig): 5706 (attempting to re-compensate)
It seems you do not have the zlib library and the zip extension enabled. For some reason the unzip fallback is not working. Maybe it is a bug in composer or the cache is corrupted.
If you can enable the PHP zip extension it is better. Otherwise try removing the cache. I suspect that packagist works because it falls back to retrieving packages from the Git repository when all else fails.
Hello Markus,
I don't know if this is still relevant for you. There was a bug in the Zip Archive generation for Composer. The bug was fixed now. If you still would like to use Composer to install this package can you please try again now? |
info at phpclasses dot org.
