The instructions for manual installation on the website are incomplete/incorrect the first line:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
results in this error message:
Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
Warning: copy(https://getcomposer.org/installer): Failed to open stream: No such file or directory in Command line code on line 1
It would be nice if I could ask composer to give me a list of all dependencies and their version constraint, including system packages.
This would allow me for example quickly find out what the minimum PHP version is based on what every package needs.
This can be either considered a feature request or a support question =)
My composer.json
:
not needed
Output of composer diagnose
:
PHP Fatal error: Uncaught Error: Call to undefined function Composer\Console\getmypid() in phar:///bin/composer/src/Composer/Console/Application.php:342
Stack trace:
#0 phar:///bin/composer/src/Composer/Util/Silencer.php(67): Composer\Console\Application::Composer\Console\{closure}()
#1 phar:///bin/composer/src/Composer/Console/Application.php(346): Composer\Util\Silencer::call()
#2 phar:///bin/composer/vendor/symfony/console/Application.php(171): Composer\Console\Application->doRun()
#3 phar:///bin/composer/src/Composer/Console/Application.php(141): Symfony\Component\Console\Application->run()
#4 phar:///bin/composer/bin/composer(88): Composer\Console\Application->run()
#5 /bin/composer(29): require('...')
#6 {main}
thrown in phar:///bin/composer/src/Composer/Console/Application.php on line 342
Fatal error: Uncaught Error: Call to undefined function Composer\Console\getmypid() in phar:///bin/composer/src/Composer/Console/Application.php:342
Stack trace:
#0 phar:///bin/composer/src/Composer/Util/Silencer.php(67): Composer\Console\Application::Composer\Console\{closure}()
#1 phar:///bin/composer/src/Composer/Console/Application.php(346): Composer\Util\Silencer::call()
#2 phar:///bin/composer/vendor/symfony/console/Application.php(171): Composer\Console\Application->doRun()
#3 phar:///bin/composer/src/Composer/Console/Application.php(141): Symfony\Component\Console\Application->run()
#4 phar:///bin/composer/bin/composer(88): Composer\Console\Application->run()
#5 /bin/composer(29): require('...')
#6 {main}
thrown in phar:///bin/composer/src/Composer/Console/Application.php on line 342
When I run this command:
composer -vvv diagnose
I get the following output:
Running 2.5.5 (2023-03-21 11:50:05) with PHP 8.1.17 on Linux / 4.15.0-206-generic
PHP Fatal error: Uncaught Error: Call to undefined function Composer\Console\getmypid() in phar:///bin/composer/src/Composer/Console/Application.php:342
Stack trace:
#0 phar:///bin/composer/src/Composer/Util/Silencer.php(67): Composer\Console\Application::Composer\Console\{closure}()
#1 phar:///bin/composer/src/Composer/Console/Application.php(346): Composer\Util\Silencer::call()
#2 phar:///bin/composer/vendor/symfony/console/Application.php(171): Composer\Console\Application->doRun()
#3 phar:///bin/composer/src/Composer/Console/Application.php(141): Symfony\Component\Console\Application->run()
#4 phar:///bin/composer/bin/composer(88): Composer\Console\Application->run()
#5 /bin/composer(29): require('...')
#6 {main}
thrown in phar:///bin/composer/src/Composer/Console/Application.php on line 342
Fatal error: Uncaught Error: Call to undefined function Composer\Console\getmypid() in phar:///bin/composer/src/Composer/Console/Application.php:342
Stack trace:
#0 phar:///bin/composer/src/Composer/Util/Silencer.php(67): Composer\Console\Application::Composer\Console\{closure}()
#1 phar:///bin/composer/src/Composer/Console/Application.php(346): Composer\Util\Silencer::call()
#2 phar:///bin/composer/vendor/symfony/console/Application.php(171): Composer\Console\Application->doRun()
#3 phar:///bin/composer/src/Composer/Console/Application.php(141): Symfony\Component\Console\Application->run()
#4 phar:///bin/composer/bin/composer(88): Composer\Console\Application->run()
#5 /bin/composer(29): require('...')
#6 {main}
thrown in phar:///bin/composer/src/Composer/Console/Application.php on line 342
Not all hostings allow the function getmypid(), I guess it should be checked whether this function is available or not.
To replicate, please add getmypid to disabled_functions in php.ini.
It seems that it was introduced here.
ty,
Marlon
Since I updated from version 1 to version 2.0.3 I can not connect to packagist anymore.
Output of composer diagnose
:
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: [Composer\Downloader\TransportException] Resolving timed out after 10002 milliseconds
Checking https connectivity to packagist: [Composer\Downloader\TransportException] Resolving timed out after 10006 milliseconds
Checking github.com rate limit: FAIL
[Composer\Downloader\TransportException] Resolving timed out after 10004 milliseconds
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: FAIL
[Composer\Downloader\TransportException] Resolving timed out after 10003 milliseconds
Composer version: 2.0.3
PHP version: 7.4.11
PHP binary path: /usr/local/Cellar/php/7.4.11/bin/php
OpenSSL version: OpenSSL 1.1.1g 21 Apr 2020
cURL version: 7.73.0 libz 1.2.11 ssl OpenSSL/1.1.1h
zip extension: OK
When I run this command:
composer create-project symfony/skeleton test
I get the following output:
Creating a "symfony/skeleton" project at "./test"
[Composer\Downloader\TransportException]
Resolving timed out after 10002 milliseconds
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [<package>] [<directory>] [<version>]
My composer.json
:
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"enlightn/enlightn": "^1.18",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"inertiajs/inertia-laravel": "^0.3.5",
"lab404/laravel-impersonate": "^1.7",
"laravel-notification-channels/pusher-push-notifications": "^2.3",
"laravel/framework": "8.37",
"laravel/nexmo-notification-channel": "^2.5",
"laravel/sanctum": "^2.6",
"laravel/tinker": "^2.5",
"propaganistas/laravel-phone": "^4.3",
"pusher/pusher-php-server": "^6.1",
"spatie/laravel-disable-floc": "^1.0",
"tightenco/ziggy": "^1.0",
"twilio/sdk": "6.24.0",
"vonage/client": "^2.4",
"wildbit/swiftmailer-postmark": "^3.3"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/breeze": "^1.1",
"laravel/sail": "^1.0.1",
"laravel/telescope": "^4.5",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": [
"laravel/telescope"
]
}
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
],
"post-update-cmd": [
"@php artisan telescope:publish --ansi"
]
}
}
Output of composer diagnose
:
Checking composer.json: WARNING
require.laravel/framework : exact version constraints (8.37) should be avoided if the package follows semantic versioning
require.twilio/sdk : exact version constraints (6.24.0) should be avoided if the package follows semantic versioning
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com oauth access: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 2.2.5
PHP version: 8.1.1
OpenSSL version: OpenSSL 1.1.1l 24 Aug 2021
cURL version: 7.77.0 libz 1.2.11 ssl OpenSSL/1.1.1l
zip: extension present, unzip not available, 7-Zip present (7z)
When I run this command:
composer update
I get the following output:
Loading composer repositories with package information
Updating dependencies
Lock file operations: 3 installs, 96 updates, 4 removals
- Removing laminas/laminas-zendframework-bridge (1.2.0)
- Removing spatie/laravel-personal-data-export (1.3.2)
- Removing spatie/temporary-directory (1.3.0)
- Removing symfony/http-client-contracts (v2.4.0)
- Upgrading asm89/stack-cors (v2.0.3 => v2.1.1)
- Upgrading brick/math (0.9.2 => 0.9.3)
- Upgrading composer/ca-bundle (1.2.9 => 1.3.1)
- Upgrading composer/composer (2.0.13 => 2.2.5)
- Upgrading composer/package-versions-deprecated (1.11.99.2 => 1.11.99.5)
- Locking composer/pcre (1.0.1)
- Upgrading composer/semver (3.2.4 => 3.2.7)
- Upgrading composer/spdx-licenses (1.5.5 => 1.5.6)
- Upgrading composer/xdebug-handler (1.4.6 => 2.0.4)
- Upgrading doctrine/inflector (2.0.3 => 2.0.4)
- Upgrading doctrine/lexer (1.2.1 => 1.2.2)
- Upgrading dragonmantank/cron-expression (v3.1.0 => v3.3.1)
- Upgrading facade/flare-client-php (1.8.0 => 1.9.1)
- Upgrading facade/ignition (2.9.0 => 2.17.4)
- Upgrading fakerphp/faker (v1.14.1 => v1.17.0)
- Upgrading filp/whoops (2.12.1 => 2.14.5)
- Upgrading firebase/php-jwt (v5.4.0 => v5.5.1)
- Upgrading fruitcake/laravel-cors (v2.0.4 => v2.0.5)
- Upgrading giggsey/libphonenumber-for-php (8.12.23 => 8.12.41)
- Upgrading giggsey/locale (1.9 => 2.1)
- Upgrading graham-campbell/result-type (v1.0.1 => v1.0.4)
- Upgrading guzzlehttp/guzzle (7.3.0 => 7.4.1)
- Upgrading guzzlehttp/promises (1.4.1 => 1.5.1)
- Upgrading guzzlehttp/psr7 (1.8.2 => 2.1.0)
- Upgrading justinrainbow/json-schema (5.2.10 => 5.2.11)
- Upgrading lab404/laravel-impersonate (1.7.2 => 1.7.3)
- Upgrading laminas/laminas-diactoros (2.6.0 => 2.8.0)
- Upgrading laravel/sail (v1.5.0 => v1.13.1)
- Upgrading laravel/sanctum (v2.10.0 => v2.14.0)
- Upgrading laravel/telescope (v4.5.0 => v4.7.0)
- Upgrading laravel/tinker (v2.6.1 => v2.7.0)
- Locking lcobucci/clock (2.1.0)
- Upgrading lcobucci/jwt (3.4.5 => 4.0.4)
- Upgrading league/commonmark (1.6.0 => 1.6.7)
- Upgrading league/flysystem (1.1.3 => 1.1.9)
- Upgrading league/iso3166 (3.0.0 => 4.0.0)
- Upgrading league/mime-type-detection (1.7.0 => 1.9.0)
- Upgrading mockery/mockery (1.4.3 => 1.5.0)
- Upgrading monolog/monolog (2.2.0 => 2.3.5)
- Upgrading nesbot/carbon (2.47.0 => 2.55.2)
- Upgrading nikic/php-parser (v4.10.5 => v4.13.2)
- Upgrading nunomaduro/collision (v5.4.0 => v5.11.0)
- Upgrading nunomaduro/larastan (v0.7.5 => v0.7.15)
- Upgrading paragonie/sodium_compat (v1.15.4 => v1.17.0)
- Upgrading phar-io/manifest (2.0.1 => 2.0.3)
- Upgrading phpdocumentor/reflection-docblock (5.2.2 => 5.3.0)
- Upgrading phpdocumentor/type-resolver (1.4.0 => 1.6.0)
- Upgrading phpoption/phpoption (1.7.5 => 1.8.1)
- Upgrading phpspec/prophecy (1.13.0 => v1.15.0)
- Upgrading phpstan/phpstan (0.12.85 => 0.12.99)
- Upgrading phpunit/php-code-coverage (9.2.6 => 9.2.10)
- Upgrading phpunit/php-file-iterator (3.0.5 => 3.0.6)
- Upgrading phpunit/phpunit (9.5.4 => 9.5.12)
- Upgrading propaganistas/laravel-phone (4.3.0 => 4.3.6)
- Upgrading psr/container (1.1.1 => 1.1.2)
- Upgrading psy/psysh (v0.10.8 => v0.11.1)
- Upgrading ramsey/collection (1.1.3 => 1.2.2)
- Upgrading ramsey/uuid (4.1.1 => 4.2.3)
- Upgrading sebastian/exporter (4.0.3 => 4.0.4)
- Upgrading sebastian/global-state (5.0.2 => 5.0.3)
- Upgrading sebastian/type (2.3.1 => 2.3.4)
- Upgrading seld/phar-utils (1.1.1 => 1.2.0)
- Upgrading spatie/laravel-disable-floc (1.0.0 => 1.0.1)
- Upgrading swiftmailer/swiftmailer (v6.2.7 => v6.3.0)
- Upgrading symfony/console (v5.2.7 => v5.4.2)
- Upgrading symfony/css-selector (v5.2.7 => v6.0.2)
- Upgrading symfony/deprecation-contracts (v2.4.0 => v3.0.0)
- Upgrading symfony/error-handler (v5.2.7 => v5.4.2)
- Upgrading symfony/event-dispatcher (v5.2.4 => v6.0.2)
- Upgrading symfony/event-dispatcher-contracts (v2.4.0 => v3.0.0)
- Upgrading symfony/filesystem (v5.2.7 => v6.0.0)
- Upgrading symfony/finder (v5.2.4 => v5.4.2)
- Upgrading symfony/http-foundation (v5.2.7 => v5.4.2)
- Upgrading symfony/http-kernel (v5.2.7 => v5.4.2)
- Upgrading symfony/mime (v5.2.7 => v5.4.2)
- Upgrading symfony/polyfill-ctype (v1.22.1 => v1.24.0)
- Upgrading symfony/polyfill-iconv (v1.22.1 => v1.24.0)
- Upgrading symfony/polyfill-intl-grapheme (v1.22.1 => v1.24.0)
- Upgrading symfony/polyfill-intl-idn (v1.22.1 => v1.24.0)
- Upgrading symfony/polyfill-intl-normalizer (v1.22.1 => v1.24.0)
- Upgrading symfony/polyfill-mbstring (v1.22.1 => v1.24.0)
- Upgrading symfony/polyfill-php72 (v1.22.1 => v1.24.0)
- Upgrading symfony/polyfill-php73 (v1.22.1 => v1.24.0)
- Upgrading symfony/polyfill-php80 (v1.22.1 => v1.24.0)
- Locking symfony/polyfill-php81 (v1.24.0)
- Upgrading symfony/process (v5.2.7 => v5.4.2)
- Upgrading symfony/routing (v5.2.7 => v5.4.0)
- Upgrading symfony/service-contracts (v2.4.0 => v2.4.1)
- Upgrading symfony/string (v5.2.6 => v6.0.2)
- Upgrading symfony/translation (v5.2.7 => v6.0.2)
- Upgrading symfony/translation-contracts (v2.4.0 => v3.0.0)
- Upgrading symfony/var-dumper (v5.2.7 => v5.4.2)
- Upgrading symfony/yaml (v5.2.7 => v5.4.2)
- Upgrading theseer/tokenizer (1.2.0 => 1.2.1)
- Upgrading tightenco/ziggy (v1.1.0 => v1.4.2)
- Upgrading tijsverkoyen/css-to-inline-styles (2.2.3 => 2.2.4)
- Upgrading vlucas/phpdotenv (v5.3.0 => v5.4.1)
- Upgrading vonage/client-core (2.9.2 => 2.10.0)
- Upgrading vonage/nexmo-bridge (0.1.0 => 0.1.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 3 installs, 96 updates, 4 removals
- Downloading composer/package-versions-deprecated (1.11.99.5)
- Downloading composer/ca-bundle (1.3.1)
- Downloading composer/semver (3.2.7)
- Downloading composer/spdx-licenses (1.5.6)
- Downloading composer/pcre (1.0.1)
- Downloading composer/xdebug-handler (2.0.4)
- Downloading phpstan/phpstan (0.12.99)
- Downloading league/commonmark (1.6.7)
- Downloading symfony/filesystem (v6.0.0)
- Downloading seld/phar-utils (1.2.0)
- Downloading composer/composer (2.2.5)
- Downloading nunomaduro/larastan (v0.7.15)
- Downloading symfony/yaml (v5.4.2)
- Downloading lab404/laravel-impersonate (1.7.3)
- Downloading firebase/php-jwt (v5.5.1)
- Downloading vonage/nexmo-bridge (0.1.1)
- Downloading lcobucci/clock (2.1.0)
- Downloading lcobucci/jwt (4.0.4)
- Downloading vonage/client-core (2.10.0)
- Downloading phpunit/phpunit (9.5.12)
- Downloading giggsey/libphonenumber-for-php (8.12.41)
- Downloading propaganistas/laravel-phone (4.3.6)
- Removing symfony/http-client-contracts (v2.4.0)
- Removing spatie/temporary-directory (1.3.0)
- Removing spatie/laravel-personal-data-export (1.3.2)
- Removing laminas/laminas-zendframework-bridge (1.2.0)
- Upgrading composer/package-versions-deprecated (1.11.99.2 => 1.11.99.5): Extracting archive
- Upgrading composer/ca-bundle (1.2.9 => 1.3.1): Extracting archive
- Upgrading composer/semver (3.2.4 => 3.2.7): Extracting archive
- Upgrading composer/spdx-licenses (1.5.5 => 1.5.6): Extracting archive
- Installing composer/pcre (1.0.1): Extracting archive
- Upgrading composer/xdebug-handler (1.4.6 => 2.0.4): Extracting archive
- Upgrading doctrine/inflector (2.0.3 => 2.0.4): Extracting archive
- Upgrading symfony/polyfill-ctype (v1.22.1 => v1.24.0): Extracting archive
- Upgrading dragonmantank/cron-expression (v3.1.0 => v3.3.1): Extracting archive
- Upgrading symfony/polyfill-php72 (v1.22.1 => v1.24.0): Extracting archive
- Upgrading symfony/polyfill-intl-normalizer (v1.22.1 => v1.24.0): Extracting archive
- Upgrading symfony/polyfill-intl-idn (v1.22.1 => v1.24.0): Extracting archive
- Upgrading doctrine/lexer (1.2.1 => 1.2.2): Extracting archive
- Upgrading symfony/polyfill-php80 (v1.22.1 => v1.24.0): Extracting archive
- Upgrading symfony/deprecation-contracts (v2.4.0 => v3.0.0): Extracting archive
- Upgrading symfony/finder (v5.2.4 => v5.4.2): Extracting archive
- Upgrading phpstan/phpstan (0.12.85 => 0.12.99): Extracting archive
- Upgrading symfony/process (v5.2.7 => v5.4.2): Extracting archive
- Upgrading mockery/mockery (1.4.3 => 1.5.0): Extracting archive
- Upgrading symfony/polyfill-mbstring (v1.22.1 => v1.24.0): Extracting archive
- Upgrading phpoption/phpoption (1.7.5 => 1.8.1): Extracting archive
- Upgrading graham-campbell/result-type (v1.0.1 => v1.0.4): Extracting archive
- Upgrading vlucas/phpdotenv (v5.3.0 => v5.4.1): Extracting archive
- Upgrading symfony/css-selector (v5.2.7 => v6.0.2): Extracting archive
- Upgrading tijsverkoyen/css-to-inline-styles (2.2.3 => 2.2.4): Extracting archive
- Upgrading symfony/var-dumper (v5.2.7 => v5.4.2): Extracting archive
- Upgrading symfony/routing (v5.2.7 => v5.4.0): Extracting archive
- Upgrading symfony/mime (v5.2.7 => v5.4.2): Extracting archive
- Upgrading symfony/polyfill-php73 (v1.22.1 => v1.24.0): Extracting archive
- Upgrading symfony/http-foundation (v5.2.7 => v5.4.2): Extracting archive
- Upgrading symfony/event-dispatcher-contracts (v2.4.0 => v3.0.0): Extracting archive
- Upgrading symfony/event-dispatcher (v5.2.4 => v6.0.2): Extracting archive
- Upgrading symfony/error-handler (v5.2.7 => v5.4.2): Extracting archive
- Upgrading symfony/http-kernel (v5.2.7 => v5.4.2): Extracting archive
- Upgrading symfony/polyfill-intl-grapheme (v1.22.1 => v1.24.0): Extracting archive
- Upgrading symfony/string (v5.2.6 => v6.0.2): Extracting archive
- Upgrading psr/container (1.1.1 => 1.1.2): Extracting archive
- Upgrading symfony/service-contracts (v2.4.0 => v2.4.1): Extracting archive
- Upgrading symfony/console (v5.2.7 => v5.4.2): Extracting archive
- Upgrading symfony/polyfill-iconv (v1.22.1 => v1.24.0): Extracting archive
- Upgrading swiftmailer/swiftmailer (v6.2.7 => v6.3.0): Extracting archive
- Installing symfony/polyfill-php81 (v1.24.0): Extracting archive
- Upgrading ramsey/collection (1.1.3 => 1.2.2): Extracting archive
- Upgrading brick/math (0.9.2 => 0.9.3): Extracting archive
- Upgrading ramsey/uuid (4.1.1 => 4.2.3): Extracting archive
- Upgrading symfony/translation-contracts (v2.4.0 => v3.0.0): Extracting archive
- Upgrading symfony/translation (v5.2.7 => v6.0.2): Extracting archive
- Upgrading nesbot/carbon (2.47.0 => 2.55.2): Extracting archive
- Upgrading monolog/monolog (2.2.0 => 2.3.5): Extracting archive
- Upgrading league/mime-type-detection (1.7.0 => 1.9.0): Extracting archive
- Upgrading league/flysystem (1.1.3 => 1.1.9): Extracting archive
- Upgrading league/commonmark (1.6.0 => 1.6.7): Extracting archive
- Upgrading symfony/filesystem (v5.2.7 => v6.0.0): Extracting archive
- Upgrading seld/phar-utils (1.1.1 => 1.2.0): Extracting archive
- Upgrading justinrainbow/json-schema (5.2.10 => 5.2.11): Extracting archive
- Upgrading composer/composer (2.0.13 => 2.2.5): Extracting archive
- Upgrading nunomaduro/larastan (v0.7.5 => v0.7.15): Extracting archive
- Upgrading nikic/php-parser (v4.10.5 => v4.13.2): Extracting archive
- Upgrading guzzlehttp/psr7 (1.8.2 => 2.1.0): Extracting archive
- Upgrading guzzlehttp/promises (1.4.1 => 1.5.1): Extracting archive
- Upgrading guzzlehttp/guzzle (7.3.0 => 7.4.1): Extracting archive
- Upgrading symfony/yaml (v5.2.7 => v5.4.2): Extracting archive
- Upgrading facade/flare-client-php (1.8.0 => 1.9.1): Extracting archive
- Upgrading facade/ignition (2.9.0 => 2.17.4): Extracting archive
- Upgrading fakerphp/faker (v1.14.1 => v1.17.0): Extracting archive
- Upgrading asm89/stack-cors (v2.0.3 => v2.1.1): Extracting archive
- Upgrading fruitcake/laravel-cors (v2.0.4 => v2.0.5): Extracting archive
- Upgrading giggsey/locale (1.9 => 2.1): Extracting archive
- Upgrading lab404/laravel-impersonate (1.7.2 => 1.7.3): Extracting archive
- Upgrading firebase/php-jwt (v5.4.0 => v5.5.1): Extracting archive
- Upgrading vonage/nexmo-bridge (0.1.0 => 0.1.1): Extracting archive
- Installing lcobucci/clock (2.1.0): Extracting archive
- Upgrading lcobucci/jwt (3.4.5 => 4.0.4): Extracting archive
- Upgrading laminas/laminas-diactoros (2.6.0 => 2.8.0): Extracting archive
- Upgrading vonage/client-core (2.9.2 => 2.10.0): Extracting archive
- Upgrading laravel/sail (v1.5.0 => v1.13.1): Extracting archive
- Upgrading laravel/sanctum (v2.10.0 => v2.14.0): Extracting archive
- Upgrading laravel/telescope (v4.5.0 => v4.7.0): Extracting archive
- Upgrading psy/psysh (v0.10.8 => v0.11.1): Extracting archive
- Upgrading laravel/tinker (v2.6.1 => v2.7.0): Extracting archive
- Upgrading filp/whoops (2.12.1 => 2.14.5): Extracting archive
- Upgrading nunomaduro/collision (v5.4.0 => v5.11.0): Extracting archive
- Upgrading phpdocumentor/type-resolver (1.4.0 => 1.6.0): Extracting archive
- Upgrading phpdocumentor/reflection-docblock (5.2.2 => 5.3.0): Extracting archive
- Upgrading sebastian/type (2.3.1 => 2.3.4): Extracting archive
- Upgrading sebastian/global-state (5.0.2 => 5.0.3): Extracting archive
- Upgrading sebastian/exporter (4.0.3 => 4.0.4): Extracting archive
- Upgrading phpunit/php-file-iterator (3.0.5 => 3.0.6): Extracting archive
- Upgrading theseer/tokenizer (1.2.0 => 1.2.1): Extracting archive
- Upgrading phpunit/php-code-coverage (9.2.6 => 9.2.10): Extracting archive
- Upgrading phpspec/prophecy (1.13.0 => v1.15.0): Extracting archive
- Upgrading phar-io/manifest (2.0.1 => 2.0.3): Extracting archive
- Upgrading phpunit/phpunit (9.5.4 => 9.5.12): Extracting archive
- Upgrading league/iso3166 (3.0.0 => 4.0.0): Extracting archive
- Upgrading giggsey/libphonenumber-for-php (8.12.23 => 8.12.41): Extracting archive
- Upgrading propaganistas/laravel-phone (4.3.0 => 4.3.6): Extracting archive
- Upgrading paragonie/sodium_compat (v1.15.4 => v1.17.0): Extracting archive
- Upgrading spatie/laravel-disable-floc (1.0.0 => 1.0.1): Extracting archive
- Upgrading tightenco/ziggy (v1.1.0 => v1.4.2): Extracting archive
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Generating optimized autoload files
Deprecation Notice: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:251
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
Deprecation Notice: Return type of Illuminate\Container\Container::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Container\Container.php:1352
Deprecation Notice: Return type of Illuminate\Container\Container::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Container\Container.php:1363
Deprecation Notice: Return type of Illuminate\Container\Container::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Container\Container.php:1375
Deprecation Notice: Return type of Illuminate\Container\Container::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Container\Container.php:1388
> @php artisan package:discover --ansi
PHP Fatal error: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
in C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Collections\Collection.php:1411
Stack trace:
#0 C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Collections\Collection.php(11): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8192, 'Return type of ...', 'C:\\xampp\\htdocs...', 1411)
#1 C:\xampp\htdocs\spa\vendor\composer\ClassLoader.php(480): include('C:\\xampp\\htdocs...')
#2 C:\xampp\htdocs\spa\vendor\composer\ClassLoader.php(346): Composer\Autoload\includeFile('C:\\xampp\\htdocs...')
#3 C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Collections\helpers.php(15): Composer\Autoload\ClassLoader->loadClass('Illuminate\\Supp...')
#4 C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(130): collect(Array)
#5 C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(106): Illuminate\Foundation\PackageManifest->build()
#6 C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(89): Illuminate\Foundation\PackageManifest->getManifest()
#7 C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(78): Illuminate\Foundation\PackageManifest->config('aliases')
#8 C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\RegisterFacades.php(26): Illuminate\Foundation\PackageManifest->aliases()
#9 C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(237): Illuminate\Foundation\Bootstrap\RegisterFacades->bootstrap(Object(Illuminate\Foundation\Application))
#10 C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(310): Illuminate\Foundation\Application->bootstrapWith(Array)
#11 C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(127): Illuminate\Foundation\Console\Kernel->bootstrap()
#12 C:\xampp\htdocs\spa\artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 {main} in C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Collections\Collection.php on line 11
PHP Fatal error: Uncaught Error: Class "Illuminate\Support\Collection" not found in C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Collections\helpers.php:15
Stack trace:
#0 C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Support\Traits\ReflectsClosures.php(24): collect(Array)
#1 C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Support\Traits\ReflectsClosures.php(43): Illuminate\Foundation\Exceptions\ReportableHandler->closureParameterTypes(Object(Closure))
#2 C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\ReportableHandler.php(62): Illuminate\Foundation\Exceptions\ReportableHandler->firstClosureParameterType(Object(Closure))
#3 C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\Handler.php(232): Illuminate\Foundation\Exceptions\ReportableHandler->handles(Object(Symfony\Component\ErrorHandler\Error\FatalError))
#4 C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(88): Illuminate\Foundation\Exceptions\Handler->report(Object(Symfony\Component\ErrorHandler\Error\FatalError))
#5 C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(130): Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(Object(Symfony\Component\ErrorHandler\Error\FatalError))
#6 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown()
#7 {main}
thrown in C:\xampp\htdocs\spa\vendor\laravel\framework\src\Illuminate\Collections\helpers.php on line 15
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255
And I expected this to happen:
Generate optimised files and complete step, but instead, I can't run any artisan command.
My composer.json
:
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "^8.0.2",
"ext-bcmath": "*",
"ext-filter": "*",
"ext-gd": "*",
"ext-intl": "*",
"ext-json": "*",
"ext-memcached": "*",
"ext-mysqli": "*",
"ext-pcov": "*",
"ext-pdo_mysql": "*",
"ext-zip": "*",
"cknow/laravel-money": "^6.4.0",
"components/bootstrap": "^4.7",
"components/jquery": "^3.6",
"guzzlehttp/guzzle": "^7.2",
"infyomlabs/laravel-ui-adminlte": "^4.0",
"laravel/framework": "^9.19",
"laravel/passport": "^11.0",
"laravel/pint": "^1.0",
"laravel/sanctum": "^2.14.1",
"laravel/tinker": "^2.7",
"laravelcollective/html": "^6.3",
"league/flysystem-aws-s3-v3": "^3.1",
"mikemclin/laravel-wp-password": "^2.0",
"nesbot/carbon": "^2.58",
"spatie/laravel-cookie-consent": "^3.2",
"spatie/laravel-permission": "^5.5",
"spatie/laravel-schedule-monitor": "^3.0",
"staudenmeir/laravel-adjacency-list": "^1.0",
"vlucas/phpdotenv": "^5.4",
"zoha/laravel-meta": "^2.0"
},
"require-dev": {
"ext-gmp": "*",
"ext-xdebug": "^3.1",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.15",
"laravel/telescope": "^4.9",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.5.10",
"spatie/laravel-ignition": "^1.0",
"reliese/laravel": "^1.1"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
},
"files": [
"app/Helpers/NetworkPointsHelper.php",
"app/Helpers/PaginationHelper.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
Output of composer diagnose
:
www@95468bef18fe:/var/www$ composer diagnose
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: WARNING
Your git version (2.17.1) is too old and possibly will cause issues. Please upgrade to git 2.24 or above
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 2.4.2
PHP version: 8.1.10
PHP binary path: /usr/bin/php8.1
OpenSSL version: OpenSSL 1.1.1 11 Sep 2018
cURL version: 7.58.0 libz 1.2.11 ssl OpenSSL/1.1.1
zip: extension present, unzip present, 7-Zip not available
When I run this command:
composer update -vvv
I get the following output:
output trimmed to the maximum allowed number of lines in vsc console history and maximum github post length!
Reading /.composer/cache/repo/https---repo.packagist.org/provider-nette~utils~dev.json from cache
Downloading https://repo.packagist.org/p2/nette/utils~dev.json if modified
[304] https://repo.packagist.org/p2/symfony/inflector.json
[304] https://repo.packagist.org/p2/nette/utils.json
[304] https://repo.packagist.org/p2/symfony/inflector~dev.json
[304] https://repo.packagist.org/p2/nette/utils~dev.json
Reading /.composer/cache/repo/https---repo.packagist.org/provider-phpdocumentor~reflection-common.json from cache
Reading /.composer/cache/repo/https---repo.packagist.org/provider-illuminate~pipeline.json from cache
Reading /.composer/cache/repo/https---repo.packagist.org/provider-phpdocumentor~reflection-common~dev.json from cache
Reading /.composer/cache/repo/https---repo.packagist.org/provider-illuminate~pipeline~dev.json from cache
Built pool.
Running pool optimizer.
Pool optimizer completed in 1.961 seconds
Found 14,581 package versions referenced in your dependency graph. 13,335 (91%) were optimized away.
Updating dependencies
Generating rules
Resolving dependencies through SAT
Looking at all rules.
Something's changed, looking at all rules again (pass #1)
Dependency resolution completed in 0.022 seconds
Analyzed 1246 packages to resolve dependencies
Analyzed 9102 rules to resolve dependencies
Nothing to modify in lock file
Generating rules
Resolving dependencies through SAT
Looking at all rules.
Dependency resolution completed in 0.001 seconds
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating optimized autoload files
> post-autoload-dump: Illuminate\Foundation\ComposerScripts::postAutoloadDump
> post-autoload-dump: @php artisan package:discover --ansi
Executing command (CWD): '/usr/bin/php8.1' -d allow_url_fopen='1' -d disable_functions='' -d memory_limit='-1' artisan package:discover --ansi
<comment>In LoadConfiguration.php line 66:</comment>
<error> </error>
<error> </error>
<error> </error>
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
And I expected this to happen:
php artisan package:discover --ansi
should list my packages and the another php artisan something
should run to complete the process. Please note that php artisan package:discover --ansi
runs successfully if called alone.
Thank you guys for this amazing software. Cheers
My composer.json
:
{
"name": "acp3/cms",
"description": "ACP3 is a highly customizable and easy to use web content management system based on PHP5 and MySQL.",
"type": "project",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "Tino Goratsch",
"email": "mail@acp3-cms.net"
}
],
"support": {
"email": "mail@acp3-cms.net",
"issues": "https://gitlab.com/ACP3/cms/issues"
},
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^8.1",
"wikimedia/composer-merge-plugin": "^2.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.13",
"phpstan/phpstan": "^1.9.4",
"phpstan/phpstan-phpunit": "^1.3.2",
"phpstan/extension-installer": "^1.2",
"rector/rector": "^0.15.12"
},
"replace": {
"acp3/core": "*",
"acp3/setup": "*",
"acp3/tests": "*",
"acp3/module-acp": "*",
"acp3/module-articles": "*",
"acp3/module-articles-menus": "*",
"acp3/module-articles-search": "*",
"acp3/module-articles-seo": "*",
"acp3/module-articles-share": "*",
"acp3/module-audit-log": "*",
"acp3/module-captcha": "*",
"acp3/module-categories": "*",
"acp3/module-comments": "*",
"acp3/module-contact": "*",
"acp3/module-contact-seo": "*",
"acp3/module-cookie-consent": "*",
"acp3/module-emoticons": "*",
"acp3/module-errors": "*",
"acp3/module-feeds": "*",
"acp3/module-filemanager": "*",
"acp3/module-files": "*",
"acp3/module-files-comments": "*",
"acp3/module-files-feed": "*",
"acp3/module-files-search": "*",
"acp3/module-files-seo": "*",
"acp3/module-files-share": "*",
"acp3/module-gallery": "*",
"acp3/module-gallery-comments": "*",
"acp3/module-gallery-seo": "*",
"acp3/module-gallery-share": "*",
"acp3/module-guestbook": "*",
"acp3/module-guestbook-newsletter": "*",
"acp3/module-installer": "*",
"acp3/module-menus": "*",
"acp3/module-news": "*",
"acp3/module-newsletter": "*",
"acp3/module-news-comments": "*",
"acp3/module-news-feed": "*",
"acp3/module-news-search": "*",
"acp3/module-news-seo": "*",
"acp3/module-news-share": "*",
"acp3/module-permissions": "*",
"acp3/module-polls": "*",
"acp3/module-search": "*",
"acp3/module-seo": "*",
"acp3/module-social-sharing": "*",
"acp3/module-system": "*",
"acp3/module-users": "*",
"acp3/module-wysiwyg-ckeditor": "*",
"acp3/module-wysiwyg-tinymce": "*",
"acp3/theme-default": "*",
"acp3/theme-installer": "*"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/tinogo/RichFilemanager-PHP"
},
{
"type": "vcs",
"url": "https://github.com/tinogo/shariff-backend-php"
}
],
"scripts": {
"test": "./vendor/bin/phpunit -c ./tests/phpunit.dist.xml",
"test-windows": ".\\vendor\\bin\\phpunit.bat -c .\\tests\\phpunit.dist.xml",
"test-with-coverage": "phpdbg -qrr -d memory_limit=-1 ./vendor/bin/phpunit -c ./tests/phpunit.dist.xml --coverage-text --colors=never --log-junit junit-report.xml",
"lint": "./vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php --dry-run --show-progress=dots -v",
"lint-windows": ".\\vendor\\bin\\php-cs-fixer.bat fix --config=.php-cs-fixer.dist.php --dry-run --show-progress=dots -v",
"php-cs-fixer": "./vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php --show-progress=dots -v",
"php-cs-fixer-windows": ".\\vendor\\bin\\php-cs-fixer.bat fix --config=.php-cs-fixer.dist.php --show-progress=dots -v",
"phpstan": "php -d memory_limit=-1 ./vendor/bin/phpstan analyse --xdebug",
"phpstan-windows": ".\\vendor\\bin\\phpstan.bat analyse --xdebug",
"rector": "php -d memory_limit=-1 ./vendor/bin/rector process"
},
"extra": {
"merge-plugin": {
"include": [
"composer.local.json"
],
"require": [
"./ACP3/Core/composer.json",
"./ACP3/Modules/*/*/composer.json",
"./designs/*/composer.json",
"./installation/composer.json",
"./tests/composer.json"
],
"recurse": true,
"replace": false,
"ignore-duplicates": false,
"merge-dev": true,
"merge-extra": false,
"merge-extra-deep": false,
"merge-scripts": false
}
},
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": true,
"phpstan/extension-installer": true,
"acp3/composer-installer": true,
"wikimedia/composer-merge-plugin": true,
"php-http/discovery": true
}
}
}
When I run this command:
composer install -n --prefer-dist --ignore-platform-reqs
I get the following output:
- Required package "acp3/core" is not present in the lock file.
- Required package "acp3/module-permissions" is not present in the lock file.
- [..]
See also: https://gitlab.com/ACP3/cms/-/jobs/3918038851#L32. This only happens when the CI-pipeline has a "warm"-cache for Composer. When there is no cache yet, the mentioned composer install
-command works (https://gitlab.com/ACP3/cms/-/jobs/3918034957). Furthermore, this error only occurs with Composer 2.5.x, Composer 2.4.x works flawlessly in both cases.
And I expected this to happen:
The composer install
-command works with warm cache and without cache in the CI-pipeline (as it did before with Composer 2.4).
hours go to waste. remove curl and use something that isn't as broken. I update curl and now nothing works anymore.
curl error 6 while downloading https://repo.packagist.org/packages.json: getaddrinfo() thread failed to start
boohoooo, reinstalled it via scoop, via choco, manually, my network is totally fine!! and i want that crap to work no matter if I have special configs. And if every other app can reach the destination, so should curl.
i added the curl certificate file, checked my dns (nothing in there), removed IPv6 networking, disabled my firewall, disabled vmware network adapters, hardcoded the ip and domain into my hosts file, i tried literally everything. That problem is everywhere as google also makes very clear. isn't there anything else than curl that could be used????
in the end i wanna learn symfony today FFS, not debug asshole curl crap.. this shit problem is YEARS OLD as it looks like!!!!!!!!! how about you move on from this... just look at the damn hours spent by people simply in the last thread that was about this problem which went on from 2020 to 2022 -.- unbelievable
#9376
bye bye composer -.-
Hi,
npm "recently" added the new npx binary to run packages directly from node_modules. Would it be possible to have something similar with composer without the need of run-script, like composerx ?
Example: To run a testsuite with PHPUnit we need to add an entry in "script" and do something like composer run-script phpunit -- --testsuite xxx
or directly via ./vendor/bin/phpunit --testsuite x
. With composerx it would just be composerx phpunit --testsuite x
.
Thanks in advance
Hi,
I’m trying to run a composer update
, and am hitting the following error:
Could not fetch https://api.github.com/repos/kinglozzer/silverstripe-importexport, please create a GitHub OAuth token to go over the API rate limit
Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+loz.local+2017-08-16+1558
I’ve tried:
composer config --global --auth github-oauth.github.com <token>
;~/.composer/auth.json
manually;composer.json
directly.I’ve had no luck with any of the above. The repo definitely exists, and the URL it’s failing to fetch seems to be fine too.
Any suggestions?
{
"require": {
"burnbright/silverstripe-importexport": "dev-misc-additions#4f7318d",
"... other deps"
},
"repositories": [
{
"type": "vcs",
"url": "git@github.com:kinglozzer/silverstripe-importexport.git"
}
],
"config": {
"github-oauth": {
"github.com": "<token>"
}
}
}
During composer update I am asked for my github credentials repeatedly. What may be causing this?
An existing OAuth token for Composer is present and will be reused
Could not fetch https://api.github.com/authorizations, enter your GitHub credentials to go over the API >rate limit
The credentials will be swapped for an OAuth token stored in /Users/[USER]/.composer/auth.json, your >password will not be stored
To revoke access to this token you can visit https://github.com/settings/applications
Yes, I am entering my password correct, I have tried several different accounts and I can get authorization from Github if I use curl from cmdline.
I tyring to install Laravel
Output of composer diagnose
:
d:\web>composer diag
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking HTTP proxy: OK
Checking HTTP proxy support for request_fulluri: OK
Checking HTTPS proxy support for request_fulluri: OK
Checking github.com oauth access: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 ****
723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B ****
8C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 1.6.2
PHP version: 7.2.1
PHP binary path: D:\php-7.2.1-nts-Win32-VC15-x86\php.exe
When I run this command:
composer global require "laravel/installer"
I get the following output:
[Composer\Downloader\TransportException]
The "https://packagist.org/p/symfony/console%2433f24f3dbe55cff57fe06a5fa93b
a0bbe3ae3b259e2c5b7d051da0238769fa0f.json" file could not be downloaded (HT
TP/1.1 404 Not Found)
I have no explanation for the following behavior. When running the same command under Docker, the generated classmap misses a few hundred mappings:
marvin /c/foo/bar> composer dump-autoload --no-scripts -vvv
Reading ./composer.json
Loading config file ./composer.json
Checked CA file /etc/ssl/certs/ca-certificates.crt: valid
Executing command (/c/foo/bar): git branch --no-color --no-abbrev -v
Failed to initialize global composer: Composer could not find the config file: /home/marvin/.composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Reading /c/foo/bar/vendor/composer/installed.json
Running 1.10.5 (2020-04-10 11:44:22) with PHP 7.3.14-1~deb10u1 on Linux / 4.19.84-microsoft-standard
Generating optimized autoload files
Generated optimized autoload files containing 6709 classes
marvin /c/foo/bar> docker run --rm -v /c/foo/bar:/app -w /app composer dump-autoload --no-scripts -vvv
Reading ./composer.json
Loading config file ./composer.json
Checked CA file /etc/ssl/certs/ca-certificates.crt: valid
Executing command (/app): git branch --no-color --no-abbrev -v
Failed to initialize global composer: Composer could not find the config file: /tmp/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Reading /app/vendor/composer/installed.json
Running 1.10.5 (2020-04-10 11:44:22) with PHP 7.4.5 on Linux / 4.19.84-microsoft-standard
Generating optimized autoload files
Generated optimized autoload files containing 6283 classes
Both commands are run under WSL 2. Running the Docker command from a Windows PowerShell doesn't change the output. (Installing PHP and composer under Windows I have not tried - it normally is a mess.)
I specifically miss class mappings of files defined in autoload.classmap
(Laravel project):
{
"autoload": {
"classmap": [
"database/seeds",
"database/factories",
"database/migrations"
]
}
}
In total there are 310 (+2 .gitignore) files in this three directories, which is less than the difference mentioned. The vendor/composer/autoload_classmap.php
contains some of the classes in those directories though, just not all of them as I'd expect.
The only difference composer diagnose
gives, besides the fact that everything seems ok, is the PHP version: 7.3.14 under WSL2 vs. 7.4.5 under Docker.
Has anyone ever noticed something similar? I appreciate any valuable hint.
Update: 2020-04-22 14:26
After some diggin', tryin' and swearin' I'm now at the point where I know it must be related to WSL 2. If I use the old Docker for Windows backend (Hyper-V VM), it works fine. Also within the WSL 2, if I copy my project from the /c/foo/bar
path to an internal path like /home/marvin/foo/bar
and run the Docker container to dump-autoload
, the results are fine as well. So it must be an issue with the combination of WSL 2 as Docker backend and the mounted Windows drive.
Interestingly enough, when running docker run --rm -v /c/foo/bar:/app -w /app --entrypoint /bin/bash composer
using the WSL 2 Docker backend, the scandir()
PHP function for example returns all the files for which I'm missing the mapping within the classmap. So the files are there and permissions are fine, they just don't seem to be handled correctly.
My composer.json
:
{
"name": "root/dummy",
"autoload": {
"psr-4": {
"Root\\Dummy\\": "src/"
}
},
"require": {}
}
Output of composer diagnose
:
Checking composer.json: WARNING
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
Checking platform settings: OK
Checking git settings: WARNING
Your git version (2.17.1) is too old and possibly will cause issues. Please upgrade to git 2.24 or above
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 2.5.5
PHP version: 7.4.33
PHP binary path: /usr/bin/php7.4
OpenSSL version: OpenSSL 1.1.1 11 Sep 2018
cURL version: 7.58.0 libz 1.2.11 ssl OpenSSL/1.1.1
zip: extension present, unzip present, 7-Zip not available
When I run this command:
composer require aws/aws-sdk-php
I get the following output:
In CurlDownloader.php line 365: curl error 51 while downloading https://repo-eu-uk-1.packagist.org/packages.json: SSL: no alternative certificate subject name matches target host name 'repo-eu-uk-1.packagist.org'
And I expected this to happen: the composer package to be installed in the project.
My composer.json
:
Complex monorepository setup main parts can be found here:
Output of composer diagnose
:
Checking platform settings: OK
Checking git settings: OK git version 2.38.1
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com oauth access: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 2.5.4
PHP version: 8.1.14
PHP binary path: /opt/homebrew/Cellar/php@8.1/8.1.14_1/bin/php
OpenSSL version: OpenSSL 1.1.1s 1 Nov 2022
cURL version: 7.87.0 libz 1.2.11 ssl (SecureTransport) OpenSSL/1.1.1s
zip: extension present, unzip present, 7-Zip not available
When I run this command:
# get repo in GITHUB CI similar state without other branches and just a commit in it
git clone git@github.com:schranz-search/schranz-search.git
cd schranz-search/
git checkout origin/0.1
git branch -D 0.1
git remote remove origin
cd integrations/_examples/symfony
composer update
I get the following output:
Problem 1
- Root composer.json requires schranz-search/seal ^0.1, it is satisfiable by schranz-search/seal[0.1.x-dev] from composer repo (https://repo.packagist.org) but schranz-search/seal[dev-596c67162141090f8c39dfa9cb82b35895b6023b] from path repo (./../../../packages/seal) has higher repository priority. The packages from the higher priority repository do not match your constraint and are therefore not installable. That repository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.
Problem 2
- Root composer.json requires schranz-search/symfony-integration ^0.1, found schranz-search/symfony-integration[dev-596c67162141090f8c39dfa9cb82b35895b6023b] but it does not match your constraint and is therefore not installable. Make sure you fix the constraint as packages installed from symlinked path repos are updated even in partial updates and the one from the lock file can thus not be used.
Problem 3
- Root composer.json requires schranz-search/seal-algolia-adapter ^0.1, it is satisfiable by schranz-search/seal-algolia-adapter[0.1.x-dev] from composer repo (https://repo.packagist.org) but schranz-search/seal-algolia-adapter[dev-596c67162141090f8c39dfa9cb82b35895b6023b] from path repo (./../../../packages/seal-algolia-adapter) has higher repository priority. The packages from the higher priority repository do not match your constraint and are therefore not installable. That repository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.
Problem 4
- Root composer.json requires schranz-search/seal-elasticsearch-adapter ^0.1, it is satisfiable by schranz-search/seal-elasticsearch-adapter[0.1.x-dev] from composer repo (https://repo.packagist.org) but schranz-search/seal-elasticsearch-adapter[dev-596c67162141090f8c39dfa9cb82b35895b6023b] from path repo (./../../../packages/seal-elasticsearch-adapter) has higher repository priority. The packages from the higher priority repository do not match your constraint and are therefore not installable. That repository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.
Problem 5
- Root composer.json requires schranz-search/seal-meilisearch-adapter ^0.1, it is satisfiable by schranz-search/seal-meilisearch-adapter[0.1.x-dev] from composer repo (https://repo.packagist.org) but schranz-search/seal-meilisearch-adapter[dev-596c67162141090f8c39dfa9cb82b35895b6023b] from path repo (./../../../packages/seal-meilisearch-adapter) has higher repository priority. The packages from the higher priority repository do not match your constraint and are therefore not installable. That repository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.
Problem 6
- Root composer.json requires schranz-search/seal-memory-adapter ^0.1, it is satisfiable by schranz-search/seal-memory-adapter[0.1.x-dev] from composer repo (https://repo.packagist.org) but schranz-search/seal-memory-adapter[dev-596c67162141090f8c39dfa9cb82b35895b6023b] from path repo (./../../../packages/seal-memory-adapter) has higher repository priority. The packages from the higher priority repository do not match your constraint and are therefore not installable. That repository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.
Problem 7
- Root composer.json requires schranz-search/seal-multi-adapter ^0.1, it is satisfiable by schranz-search/seal-multi-adapter[0.1.x-dev] from composer repo (https://repo.packagist.org) but schranz-search/seal-multi-adapter[dev-596c67162141090f8c39dfa9cb82b35895b6023b] from path repo (./../../../packages/seal-multi-adapter) has higher repository priority. The packages from the higher priority repository do not match your constraint and are therefore not installable. That repository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.
Problem 8
- Root composer.json requires schranz-search/seal-opensearch-adapter ^0.1, it is satisfiable by schranz-search/seal-opensearch-adapter[0.1.x-dev] from composer repo (https://repo.packagist.org) but schranz-search/seal-opensearch-adapter[dev-596c67162141090f8c39dfa9cb82b35895b6023b] from path repo (./../../../packages/seal-opensearch-adapter) has higher repository priority. The packages from the higher priority repository do not match your constraint and are therefore not installable. That repository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.
Problem 9
- Root composer.json requires schranz-search/seal-read-write-adapter ^0.1, it is satisfiable by schranz-search/seal-read-write-adapter[0.1.x-dev] from composer repo (https://repo.packagist.org) but schranz-search/seal-read-write-adapter[dev-596c67162141090f8c39dfa9cb82b35895b6023b] from path repo (./../../../packages/seal-read-write-adapter) has higher repository priority. The packages from the higher priority repository do not match your constraint and are therefore not installable. That repository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.
Problem 10
- Root composer.json requires schranz-search/seal-redisearch-adapter ^0.1, it is satisfiable by schranz-search/seal-redisearch-adapter[0.1.x-dev] from composer repo (https://repo.packagist.org) but schranz-search/seal-redisearch-adapter[dev-596c67162141090f8c39dfa9cb82b35895b6023b] from path repo (./../../../packages/seal-redisearch-adapter) has higher repository priority. The packages from the higher priority repository do not match your constraint and are therefore not installable. That repository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.
Problem 11
- Root composer.json requires schranz-search/seal-solr-adapter ^0.1, it is satisfiable by schranz-search/seal-solr-adapter[0.1.x-dev] from composer repo (https://repo.packagist.org) but schranz-search/seal-solr-adapter[dev-596c67162141090f8c39dfa9cb82b35895b6023b] from path repo (./../../../packages/seal-solr-adapter) has higher repository priority. The packages from the higher priority repository do not match your constraint and are therefore not installable. That repository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.
Problem 12
- Root composer.json requires schranz-search/seal-typesense-adapter ^0.1, it is satisfiable by schranz-search/seal-typesense-adapter[0.1.x-dev] from composer repo (https://repo.packagist.org) but schranz-search/seal-typesense-adapter[dev-596c67162141090f8c39dfa9cb82b35895b6023b] from path repo (./../../../packages/seal-typesense-adapter) has higher repository priority. The packages from the higher priority repository do not match your constraint and are therefore not installable. That repository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.
And I expected this to happen:
Install dependencies and ignore version matching for local path on commit?
Currently my workaround around this problem is:
git checkout -b 0.1 # target version name
composer update
Looks like this:
# avoid problem with composer dependency resolving by using the target branch name
# e.g.: git switch --create 0.1
- name: Fix composer dependency resolving
if: ${{ github.event_name == 'pull_request' }}
run: |
git switch --create ${{ github.event.pull_request.base.ref }}
Interesting is if I even do:
git checkout -b 0.1 # target version name
git checkout -b any-branch-name
composer update
It also works the problem is so not the current branch it just requires that the ^0.1
is there in any version. Maybe it would be possible that composer does not fail here with local path repositories to avoid a workaround here.
My composer.json
:
{
"name": "drupal/recommended-project",
"description": "Project template for Drupal 9 projects with a relocated document root",
"type": "project",
"license": "GPL-2.0-or-later",
"homepage": "https://www.drupal.org/project/drupal",
"support": {
"docs": "https://www.drupal.org/docs/user_guide/en/index.html",
"chat": "https://www.drupal.org/node/314178"
},
"repositories": {
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8"
},
"packagist": {
"type": "composer",
"url": "https://packagist.org"
},
"assets": {
"type": "composer",
"url": "https://asset-packagist.org"
},
"github": {
"type": "vcs",
"url": "https://github.com/ossobuffo/drupal-console-extend-plugin.git"
},
"Google": {
"type": "package",
"package": {
"name": "google/charts",
"version": "45",
"type": "drupal-library",
"extra": {
"installer-name": "google_charts"
},
"dist": {
"url": "https://www.gstatic.com/charts/loader.js",
"type": "file"
}
}
}
},
"require": {
"bower-asset/algolia-places": "^1.19",
"bower-asset/colorbox": "^1.6",
"bower-asset/dompdf": "^1.0",
"bower-asset/elevatezoom": "^2.2",
"bower-asset/fonticonpicker": "^2.0",
"bower-asset/jquery-colorpicker": "^1.0",
"bower-asset/jquery-simple-color": "^1.2",
"bower-asset/jquery-ui-slider-pips": "^1.11",
"bower-asset/jquery-zoom": "^1.7",
"bower-asset/jquery.cycle": "dev-master",
"bower-asset/jquery.hoverintent": "dev-master",
"bower-asset/json2": "dev-master",
"bower-asset/leaflet": "^1.6",
"bower-asset/smartmenus": "^1.1",
"bower-asset/spectrum": "^1.8",
"bower-asset/stacktable.js": "^1.0",
"composer/installers": "^1.9",
"cweagans/composer-patches": "^1.6.5",
"dompdf/dompdf": "^2.0",
"drupal/addtoany": "^1.14",
"drupal/addtocal": "^2.0@beta",
"drupal/addtocalendar": "^3.2",
"drupal/admin_toolbar": "^3.0",
"drupal/admin_toolbar_tools": "^2.4",
"drupal/advanced_text_formatter": "^2.0",
"drupal/advban": "^1.3",
"drupal/allowed_formats": "^1.3",
"drupal/ape": "^1.5",
"drupal/autoban": "^1.7",
"drupal/autosave_form": "^1.2",
"drupal/backup_migrate": "^5.0",
"drupal/bee": "^1.2",
"drupal/better_search": "^1.4",
"drupal/better_social_sharing_buttons": "3.x-dev@dev",
"drupal/blazy": "^2.1",
"drupal/block_class": "^1.3",
"drupal/block_classes": "^1.0",
"drupal/block_scheduler": "^2.0",
"drupal/bootstrap": "^3.23",
"drupal/bootstrap_layouts": "^5.2",
"drupal/bootstrap_library": "^1.14",
"drupal/business_rules": "^2.0@beta",
"drupal/captcha": "^1.1",
"drupal/charts": "^5.0@alpha",
"drupal/chosen": "^3.0",
"drupal/coder": "^8.3",
"drupal/color": "^1.0",
"drupal/color_field": "^2.4",
"drupal/colorbox": "^1.6",
"drupal/colorbox_inline": "^1.2",
"drupal/colorbutton": "^1.2",
"drupal/comment_approver": "^2.0@alpha",
"drupal/commerce": "^2.27",
"drupal/commerce_add_to_cart_link": "^2.0",
"drupal/commerce_add_to_wishlist_link": "^2.0",
"drupal/commerce_ajax_atc": "^1.0@alpha",
"drupal/commerce_ajax_cart_message": "^1.1",
"drupal/commerce_bulk": "^1.0@beta",
"drupal/commerce_cart": "^2.13",
"drupal/commerce_cart_advanced": "1.x-dev@dev",
"drupal/commerce_cart_api": "^1.5",
"drupal/commerce_cart_flyout": "1.x-dev@dev",
"drupal/commerce_cart_popup": "^1.0",
"drupal/commerce_checkout": "^2.13",
"drupal/commerce_combine_carts": "1.x-dev@dev",
"drupal/commerce_fee": "1.0.x-dev@dev",
"drupal/commerce_generate": "^1.0@beta",
"drupal/commerce_giftcard": "1.0.x-dev@dev",
"drupal/commerce_ingenico": "^1.0@beta",
"drupal/commerce_invoice": "^2.0@beta",
"drupal/commerce_invoice_payment": "1.0.x-dev@dev",
"drupal/commerce_log": "^2.21",
"drupal/commerce_mollie": "^1.6",
"drupal/commerce_order": "^2.13",
"drupal/commerce_order_autovalidate": "^2.0",
"drupal/commerce_payment": "^2.13",
"drupal/commerce_payment_example": "^2.13",
"drupal/commerce_paypal": "^1.0@RC",
"drupal/commerce_price": "^2.21",
"drupal/commerce_product": "^2.13",
"drupal/commerce_product_limits": "^1.0",
"drupal/commerce_product_tax": "^1.0@RC",
"drupal/commerce_promotion": "^2.13",
"drupal/commerce_reports": "1.x-dev@dev",
"drupal/commerce_shipping": "^2.0@RC",
"drupal/commerce_simple_stock": "1.x-dev",
"drupal/commerce_stock": "^1.0@alpha",
"drupal/commerce_stock_enforcement": "^1.0@alpha",
"drupal/commerce_stock_field": "^1.0@alpha",
"drupal/commerce_store": "^2.13",
"drupal/commerce_tax": "^2.13",
"drupal/commerce_variation_add_to_cart": "^1.5",
"drupal/commerce_variation_cart_form": "^1.2",
"drupal/commerce_wishlist": "3.x-dev@dev",
"drupal/commerce_xattributes": "^1.0@beta",
"drupal/condition_plugins_commerce": "^1.0@beta",
"drupal/conditional_fields": "1.x-dev",
"drupal/config_perms": "^2.0",
"drupal/console": "^1.0.2",
"drupal/console-extend-plugin": "dev-master as 0.9.4",
"drupal/contact_storage": "^1.2",
"drupal/context": "^4.0@beta",
"drupal/cookieconsent": "^1.6",
"drupal/cool_message": "^3.0",
"drupal/core-composer-scaffold": "^9",
"drupal/core-project-message": "^9",
"drupal/core-recommended": "^9",
"drupal/css_editor": "^1.2",
"drupal/ctools": "^3.4",
"drupal/d8w3css": "^1.15",
"drupal/devel": "^4.1",
"drupal/devel_entity_updates": "^3.0",
"drupal/devel_generate": "^4.0",
"drupal/direct_checkout_by_url": "^1.1",
"drupal/disable_messages": "^2.1@alpha",
"drupal/download_all_files": "^2.0",
"drupal/dropdown_language": "^2.6",
"drupal/dynamic_entity_reference": "^1.12",
"drupal/easy_install": "^10.4",
"drupal/editor_advanced_link": "^1.8",
"drupal/elevate_image_zoom": "9.1.x-dev",
"drupal/embed": "^1.5",
"drupal/endroid_qr_code": "^3.0",
"drupal/entity_clone": "^2.0@beta",
"drupal/entity_embed": "^1.2",
"drupal/entity_print": "^2.9",
"drupal/entity_type_clone": "^2.2",
"drupal/entity_update": "^3.0@RC",
"drupal/eu_cookie_compliance": "^1.14",
"drupal/extlink": "^1.6",
"drupal/facets": "^2.0",
"drupal/field_formatter_class": "^1.5",
"drupal/field_permissions": "^1.1",
"drupal/fillpdf": "^5.0@alpha",
"drupal/filter_perms": "^1.0@alpha",
"drupal/fitvids": "^1.1",
"drupal/fivestar": "^1.0@alpha",
"drupal/flag": "^4.0@beta",
"drupal/fontawesome": "^2.19",
"drupal/fpa": "^3.0",
"drupal/gdpr_compliance": "^1.18",
"drupal/geocoder": "^3.15",
"drupal/geolocation": "^3.7",
"drupal/geotimezone": "^3.0",
"drupal/hal-hal": "^1.0",
"drupal/imageapi_optimize": "^4.0",
"drupal/imce": "^2.4",
"drupal/inline_entity_form": "^1.0@RC",
"drupal/ip2country": "^1.10",
"drupal/jquery_colorpicker": "^3.0",
"drupal/jquery_ui": "^1.4",
"drupal/layout_builder_at": "^2.12",
"drupal/layout_builder_modal": "^1.1",
"drupal/layout_builder_styles": "^1.0@alpha",
"drupal/layout_library": "^1.0@beta",
"drupal/leaflet": "^2.2",
"drupal/leaflet_more_maps": "^2.1",
"drupal/legal": "^2.0",
"drupal/linkit": "^6.0@beta",
"drupal/media_entity_browser": "^2.0@alpha",
"drupal/menu_item_role_access": "^2.0",
"drupal/module_filter": "^3.1",
"drupal/module_missing_message_fixer": "^2.0",
"drupal/mollie": "^2.1",
"drupal/node_layout_builder": "^3.0",
"drupal/page_manager": "^4.0@beta",
"drupal/panels": "^4.6",
"drupal/pathauto": "^1.8",
"drupal/pdf": "^1.1",
"drupal/permissions_by_term": "^3.1",
"drupal/permissions_filter": "^1.2",
"drupal/pfm": "^2.0",
"drupal/photos": "^6.0",
"drupal/php": "^1.1",
"drupal/plupload": "^2.0@beta",
"drupal/profile": "1.x-dev",
"drupal/qrfield": "^1.0@alpha",
"drupal/quick_node_clone": "^1.12",
"drupal/quicktabs": "dev-3.x",
"drupal/readonly_field_widget": "^1.4",
"drupal/recaptcha": "^3.0",
"drupal/recreate_block_content": "^2.0",
"drupal/redirect": "^1.6",
"drupal/redis": "^1.5",
"drupal/reg_confirm_email": "^1.2",
"drupal/roleassign": "^1.0@beta",
"drupal/rules": "^3.0@alpha",
"drupal/scheduler": "^2.0@RC",
"drupal/search_api": "^1.18",
"drupal/search_api_autocomplete": "^1.4",
"drupal/serial": "^1.0@alpha",
"drupal/simple_gmap": "^3.0",
"drupal/slick": "^2.2",
"drupal/smart_date": "^3.1",
"drupal/smart_ip": "^4.0",
"drupal/sshop": "^1.12",
"drupal/status_messages": "^4.2",
"drupal/svg_image": "^1.16",
"drupal/swiftmailer": "^2.0@beta",
"drupal/symfony_mailer": "^1.0@alpha",
"drupal/taxonomy_menu": "^3.4",
"drupal/telephone_validation": "^2.3",
"drupal/term_csv_export_import": "^3.0@alpha",
"drupal/tmgmt": "^1.12",
"drupal/tmgmt_deepl": "^2.1",
"drupal/token": "^1.7",
"drupal/token_filter": "^1.3",
"drupal/tvi": "^1.0@RC",
"drupal/typed_data": "^1.0@beta",
"drupal/user_csv_import": "^2.0",
"drupal/views_autosubmit": "^1.4",
"drupal/views_bootstrap": "^4.3",
"drupal/views_bulk_edit": "2.x-dev@dev",
"drupal/views_bulk_operations": "^4.0",
"drupal/views_data_export": "^1.0",
"drupal/views_slideshow": "^4.8",
"drupal/votingapi": "^3.0@beta",
"drupal/webform": "^6.0",
"drupal/wkhtmltopdf": "^1.3",
"drupal/x_frame_options": "^1.2",
"drupal/xmlrpc": "^1.0@beta",
"drush/drush": "^10.6",
"endroid/qr-code-bundle": "^3.0",
"enshrined/svg-sanitize": "^0.15.4",
"geocoder-php/google-maps-provider": "^4.6",
"geocoder-php/maxmind-provider": "^4.3",
"geoip2/geoip2": "^2.11",
"google/charts": "45",
"kint-php/kint": "^3.3",
"kint-php/kint-js": "^2.0",
"kint-php/kint-twig": "^3.0",
"mikehaertl/phpwkhtmltopdf": "~2.1",
"npm-asset/bootstrap": "^4.3",
"npm-asset/chosen-js": "^1.8",
"npm-asset/color-button": "^1.1",
"npm-asset/geolite2": "^3.4",
"npm-asset/toastr": "^2.1",
"npm-asset/wkhtmltopdf": "^0.3.4",
"onlyextart/colorbutton": "dev-master",
"onlyextart/panelbutton": "dev-master",
"oomphinc/composer-installers-extender": "^2.0",
"predis/predis": "^1.1",
"psr/container": "^1.0",
"psr/http-factory-implementation": "*",
"tecnickcom/tcpdf": "~6",
"true/punycode": "^2.1",
"vlucas/phpdotenv": "^4.0",
"webflo/drupal-finder": "^1.0.0",
"webmozart/path-util": "^2.3",
"willdurand/geocoder": "^4.4",
"zaporylie/composer-drupal-optimizations": "^1.2"
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"sort-packages": true,
"allow-plugins": {
"composer/installers": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"endroid/installer": true,
"php-http/discovery": true,
"drupal/console-extend-plugin": true,
"cweagans/composer-patches": true,
"drupal/core-composer-scaffold": true,
"drupal/core-project-message": true,
"oomphinc/composer-installers-extender": true,
"zaporylie/composer-drupal-optimizations": true
}
},
"extra": {
"drupal-scaffold": {
"locations": {
"web-root": "web/"
}
},
"installer-paths": {
"web/core": [
"type:drupal-core"
],
"web/libraries/{$name}": [
"type:drupal-library"
],
"web/modules/contrib/{$name}": [
"type:drupal-module"
],
"web/profiles/contrib/{$name}": [
"type:drupal-profile"
],
"web/themes/contrib/{$name}": [
"type:drupal-theme"
],
"drush/Commands/contrib/{$name}": [
"type:drupal-drush"
],
"web/modules/custom/{$name}": [
"type:drupal-custom-module"
],
"web/themes/custom/{$name}": [
"type:drupal-custom-theme"
]
},
"drupal-core-project-message": {
"include-keys": [
"homepage",
"support"
],
"post-create-project-cmd-message": [
"<bg=blue;fg=white> </>",
"<bg=blue;fg=white> Congratulations, you’ve installed the Drupal codebase </>",
"<bg=blue;fg=white> from the drupal/recommended-project template! </>",
"<bg=blue;fg=white> </>",
"",
"<bg=yellow;fg=black>Next steps</>:",
" * Install the site: https://www.drupal.org/docs/8/install",
" * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
" * Get support: https://www.drupal.org/support",
" * Get involved with the Drupal community:",
" https://www.drupal.org/getting-involved",
" * Remove the plugin that prints this message:",
" composer remove drupal/core-project-message"
]
}
}
}
Output of composer diagnose
:
...replace me...
When I run this command:
composer update -vw
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? y
Warning: You should avoid overwriting already defined auth settings for github.com.
zaporylie/composer-drupal-optimizations is disabled for Composer 2
> command: Drupal\Composer\Plugin\Scaffold\Plugin->onCommand
> pre-update-cmd: cweagans\Composer\Patches->checkPatches
Loading composer repositories with package information
Your GitHub credentials are required to fetch private repository metadata (https://github.com/ossobuffo/drupal-console-extend-plugin.git)
When working with _public_ GitHub repositories only, head to https://github.com/settings/tokens/new?scopes=&description=Composer+on+ubuntu.ingiardino.net+2023-03-22+1612 to retrieve a token.
This token will have read-only permission for public information only.
When you need to access _private_ GitHub repositories as well, go to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+ubuntu.ingiardino.net+2023-03-22+1612
Note that such tokens have broad read/write permissions on your behalf, even if not needed by Composer.
Tokens will be stored in plain text in "/data/vhosts/wwwroot/html/java-kitchen-d9/auth.json OR /root/.composer/auth.json" for future use by Composer.
For additional information, check https://getcomposer.org/doc/articles/authentication-for-private-packages.md#github-oauth
A local auth config source was found, do you want to store the token there?
Token (hidden):
Token stored successfully.
In CurlDownloader.php line 623:
[Composer\Downloader\TransportException (404)]
The "https://api.github.com/repos/ossobuffo/drupal-console-extend-plugin" file could not be downloaded (HTTP/2 404 ):
{"message":"Not Found","documentation_url":"https://docs.github.com/rest/reference/repos#get-a-repository"}
Exception trace:
at phar:///usr/local/bin/composer/src/Composer/Util/Http/CurlDownloader.php:623
Composer\Util\Http\CurlDownloader->failResponse() at phar:///usr/local/bin/composer/src/Composer/Util/Http/CurlDownloader.php:435
Composer\Util\Http\CurlDownloader->tick() at phar:///usr/local/bin/composer/src/Composer/Util/HttpDownloader.php:386
Composer\Util\HttpDownloader->countActiveJobs() at phar:///usr/local/bin/composer/src/Composer/Util/HttpDownloader.php:357
Composer\Util\HttpDownloader->wait() at phar:///usr/local/bin/composer/src/Composer/Util/HttpDownloader.php:111
Composer\Util\HttpDownloader->get() at phar:///usr/local/bin/composer/src/Composer/Repository/Vcs/VcsDriver.php:170
Composer\Repository\Vcs\VcsDriver->getContents() at phar:///usr/local/bin/composer/src/Composer/Repository/Vcs/GitHubDriver.php:483
Composer\Repository\Vcs\GitHubDriver->getContents() at phar:///usr/local/bin/composer/src/Composer/Repository/Vcs/GitHubDriver.php:540
Composer\Repository\Vcs\GitHubDriver->fetchRootIdentifier() at phar:///usr/local/bin/composer/src/Composer/Repository/Vcs/GitHubDriver.php:83
Composer\Repository\Vcs\GitHubDriver->initialize() at phar:///usr/local/bin/composer/src/Composer/Repository/VcsRepository.php:143
Composer\Repository\VcsRepository->getDriver() at phar:///usr/local/bin/composer/src/Composer/Repository/VcsRepository.php:189
Composer\Repository\VcsRepository->initialize() at phar:///usr/local/bin/composer/src/Composer/Repository/ArrayRepository.php:308
Composer\Repository\ArrayRepository->getPackages() at phar:///usr/local/bin/composer/src/Composer/Repository/ArrayRepository.php:62
Composer\Repository\ArrayRepository->loadPackages() at phar:///usr/local/bin/composer/src/Composer/DependencyResolver/PoolBuilder.php:385
Composer\DependencyResolver\PoolBuilder->loadPackagesMarkedForLoading() at phar:///usr/local/bin/composer/src/Composer/DependencyResolver/PoolBuilder.php:239
Composer\DependencyResolver\PoolBuilder->buildPool() at phar:///usr/local/bin/composer/src/Composer/Repository/RepositorySet.php:319
Composer\Repository\RepositorySet->createPool() at phar:///usr/local/bin/composer/src/Composer/Installer.php:468
Composer\Installer->doUpdate() at phar:///usr/local/bin/composer/src/Composer/Installer.php:287
Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/UpdateCommand.php:247
Composer\Command\UpdateCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:298
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:1040
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:301
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:377
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:171
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:141
Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:88
require() at /usr/local/bin/composer:29
I get the following output: <!-- FULL OUTPUT please, not just what you think is relevant -->
composer update -vw
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? y
Warning: You should avoid overwriting already defined auth settings for github.com.
zaporylie/composer-drupal-optimizations is disabled for Composer 2
command: Drupal\Composer\Plugin\Scaffold\Plugin->onCommand
pre-update-cmd: cweagans\Composer\Patches->checkPatches
Loading composer repositories with package information
Your GitHub credentials are required to fetch private repository metadata (https://github.com/ossobuffo/drupal-console-extend-plugin.git)
When working with public GitHub repositories only, head to https://github.com/settings/tokens/new?scopes=&description=Composer+on+ubuntu.ingiardino.net+2023-03-22+1612 to retrieve a token.
This token will have read-only permission for public information only.
When you need to access private GitHub repositories as well, go to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+ubuntu.ingiardino.net+2023-03-22+1612
Note that such tokens have broad read/write permissions on your behalf, even if not needed by Composer.
Tokens will be stored in plain text in "/data/vhosts/wwwroot/html/java-kitchen-d9/auth.json OR /root/.composer/auth.json" for future use by Composer.
For additional information, check https://getcomposer.org/doc/articles/authentication-for-private-packages.md#github-oauth
A local auth config source was found, do you want to store the token there?
Token (hidden):
Token stored successfully.
In CurlDownloader.php line 623:
[Composer\Downloader\TransportException (404)]
The "https://api.github.com/repos/ossobuffo/drupal-console-extend-plugin" file could not be downloaded (HTTP/2 404 ):
{"message":"Not Found","documentation_url":"https://docs.github.com/rest/reference/repos#get-a-repository"}
Exception trace:
at phar:///usr/local/bin/composer/src/Composer/Util/Http/CurlDownloader.php:623
Composer\Util\Http\CurlDownloader->failResponse() at phar:///usr/local/bin/composer/src/Composer/Util/Http/CurlDownloader.php:435
Composer\Util\Http\CurlDownloader->tick() at phar:///usr/local/bin/composer/src/Composer/Util/HttpDownloader.php:386
Composer\Util\HttpDownloader->countActiveJobs() at phar:///usr/local/bin/composer/src/Composer/Util/HttpDownloader.php:357
Composer\Util\HttpDownloader->wait() at phar:///usr/local/bin/composer/src/Composer/Util/HttpDownloader.php:111
Composer\Util\HttpDownloader->get() at phar:///usr/local/bin/composer/src/Composer/Repository/Vcs/VcsDriver.php:170
Composer\Repository\Vcs\VcsDriver->getContents() at phar:///usr/local/bin/composer/src/Composer/Repository/Vcs/GitHubDriver.php:483
Composer\Repository\Vcs\GitHubDriver->getContents() at phar:///usr/local/bin/composer/src/Composer/Repository/Vcs/GitHubDriver.php:540
Composer\Repository\Vcs\GitHubDriver->fetchRootIdentifier() at phar:///usr/local/bin/composer/src/Composer/Repository/Vcs/GitHubDriver.php:83
Composer\Repository\Vcs\GitHubDriver->initialize() at phar:///usr/local/bin/composer/src/Composer/Repository/VcsRepository.php:143
Composer\Repository\VcsRepository->getDriver() at phar:///usr/local/bin/composer/src/Composer/Repository/VcsRepository.php:189
Composer\Repository\VcsRepository->initialize() at phar:///usr/local/bin/composer/src/Composer/Repository/ArrayRepository.php:308
Composer\Repository\ArrayRepository->getPackages() at phar:///usr/local/bin/composer/src/Composer/Repository/ArrayRepository.php:62
Composer\Repository\ArrayRepository->loadPackages() at phar:///usr/local/bin/composer/src/Composer/DependencyResolver/PoolBuilder.php:385
Composer\DependencyResolver\PoolBuilder->loadPackagesMarkedForLoading() at phar:///usr/local/bin/composer/src/Composer/DependencyResolver/PoolBuilder.php:239
Composer\DependencyResolver\PoolBuilder->buildPool() at phar:///usr/local/bin/composer/src/Composer/Repository/RepositorySet.php:319
Composer\Repository\RepositorySet->createPool() at phar:///usr/local/bin/composer/src/Composer/Installer.php:468
Composer\Installer->doUpdate() at phar:///usr/local/bin/composer/src/Composer/Installer.php:287
Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/UpdateCommand.php:247
Composer\Command\UpdateCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:298
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:1040
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:301
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:377
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:171
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:141
Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:88
require() at /usr/local/bin/composer:29
And I expected this to happen:
Drupal security fixes and dependencies updated as done previously without any issue. Last successful update 07/03/2023
Hey,
I'm trying to use composer from inside a docker image due to php version differences between host and container. Sadly it doesn't seem to work correctly since it just quits after a while of using a lot of CPU power.
When I run it from the host with --ignore-platform-reqs it runs just fine but that's really not my preferred choice.
My composer.json
:
{
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-iconv": "*",
"ext-json": "*",
"a2lix/translation-form-bundle": "^3.0",
"alterphp/easyadmin-extension-bundle": "^2.1",
"aws/aws-sdk-php-symfony": "^2.0",
"beberlei/doctrineextensions": "^1.1",
"easycorp/easyadmin-bundle": "^2.0",
"eightpoints/guzzle-bundle": "^7.3",
"endyjasmi/cuid": "^2.0",
"enqueue/enqueue-bundle": "^0.9.8",
"enqueue/job-queue": "^0.9.7",
"enqueue/null": "^0.9.2",
"enqueue/sqs": "^0.9.8",
"friendsofsymfony/elastica-bundle": "^5.1",
"gesdinet/jwt-refresh-token-bundle": "^0.7.1",
"guzzlehttp/guzzle": "^6.3",
"happyr/doctrine-specification": "^0.8.0",
"hautelook/alice-bundle": "^2.4",
"hshn/base64-encoded-file": "dev-master#319221d9f764f075ca238c8e305863ecad6b5a6d",
"hwi/oauth-bundle": "^0.6.3",
"jms/serializer-bundle": "^3.2",
"knplabs/doctrine-behaviors": "^1.6",
"laupifrpar/pusher-bundle": "^3.0",
"league/flysystem": "^1.0",
"lexik/jwt-authentication-bundle": "^2.6",
"misd/phone-number-bundle": "^1.3",
"nelmio/api-doc-bundle": "^3.4",
"nesbot/carbon": "^2.16",
"norkunas/onesignal-php-api": "^1.1",
"noxlogic/ratelimit-bundle": "^1.14",
"ocramius/proxy-manager": "^2.2",
"oneup/uploader-bundle": "^2.0",
"php-http/guzzle6-adapter": "^1.1",
"php-http/httplug-bundle": "^1.7",
"pusher/pusher-php-server": "^3.0",
"ramsey/uuid": "^3.7",
"rector/rector": "^0.4.4",
"scienta/doctrine-json-functions": "^4.0",
"sensio/framework-extra-bundle": "^5.1",
"snc/redis-bundle": "^2.1",
"symfony/apache-pack": "^1.0",
"symfony/asset": "^4.0",
"symfony/browser-kit": "^4.0",
"symfony/console": "^4.0",
"symfony/flex": "^1.0",
"symfony/framework-bundle": "^4.0",
"symfony/monolog-bundle": "^3.3",
"symfony/orm-pack": "^1.0",
"symfony/proxy-manager-bridge": "^4.0",
"symfony/templating": "^4.0",
"symfony/translation": "^4.0",
"symfony/webpack-encore-bundle": "^1.6",
"symfony/yaml": "^4.0",
"white-october/pagerfanta-bundle": "^1.2"
},
"require-dev": {
"codedungeon/phpunit-result-printer": "^0.23.3",
"composer/xdebug-handler": "^1.3",
"doctrine/data-fixtures": "^1.3",
"doctrine/orm": "^2.5",
"mockery/mockery": "^1.1",
"symfony/dotenv": "^4.0",
"symfony/phpunit-bridge": "^4.0",
"symfony/profiler-pack": "^1.0",
"symfony/web-server-bundle": "^4.0",
"theofidry/alice-data-fixtures": "^1.0"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false
}
},
"name": "my/project",
"description": "That I'm working on"
}
Output of composer diagnose
:
Checking composer.json: WARNING
The package "hshn/base64-encoded-file" is pointing to a commit-ref, this is bad practice and can cause unforeseen issues.
require.hshn/base64-encoded-file : unbound version constraints (dev-master#319221d9f764f075ca238c8e305863ecad6b5a6d) should be avoided
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0 87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B 0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 1.8.6
PHP version: 7.3.7
PHP binary path: /usr/local/bin/php
When I run this command:
composer upgrade norkunas/onesignal-php-api
I get the following output:
Loading composer repositories with package information
Updating dependencies (including require-dev)
With -vvv it gets to:
Writing /tmp/cache/repo/https---repo.packagist.org/provider-alterphp$easyadmin-extension-bundle.json into cache
Writing /tmp/cache/repo/https---repo.packagist.org/provider-a2lix$translation-form-bundle.json into cache
Downloading http://repo.packagist.org/p/symfony/polyfill-php54%24e1cfb0d269975d282d9f73db5bbec5d9d47694fb1d81b24b2dc03bf4d420b6b1.json
Writing /tmp/cache/repo/https---repo.packagist.org/provider-symfony$polyfill-php54.json into cache
Downloading http://repo.packagist.org/p/symfony/polyfill-php70%24f367b2a4d4ebe32f4e6acea21db0799f87008205bc158650aa83886d71de1f45.json
Writing /tmp/cache/repo/https---repo.packagist.org/provider-symfony$polyfill-php70.json into cache
Downloading http://repo.packagist.org/p/symfony/icu%24ad6a209ccbeabcddebd24a46cfd90341e76fbeb638bb2c2b0ef8bdadd3faedea.json
Writing /tmp/cache/repo/https---repo.packagist.org/provider-symfony$icu.json into cache
Downloading http://repo.packagist.org/p/symfony/security-acl%2453b561d34bccce228aa8437a5de773a45478ba60dbaaba967de3b3d8e43153bb.json
Writing /tmp/cache/repo/https---repo.packagist.org/provider-symfony$security-acl.json into cache
Downloading http://repo.packagist.org/p/symfony/security%2471f42e017991030356cf4fcff76967a5bede692f5fa055806d1f257d4093a207.json
Writing /tmp/cache/repo/https---repo.packagist.org/provider-symfony$security.json into cache
Downloading http://repo.packagist.org/p/symfony/polyfill-apcu%243d7e016cc7df2aa692b4691d27b9a09840a9796b9e28f3da77ca7183b48a4d00.json
Writing /tmp/cache/repo/https---repo.packagist.org/provider-symfony$polyfill-apcu.json into cache
Downloading http://repo.packagist.org/p/symfony/polyfill-php55%2461eda4afa214228ec49079f030e955a3650d3d8b7e45ff9bbc27cf0780300674.json
Writing /tmp/cache/repo/https---repo.packagist.org/provider-symfony$polyfill-php55.json into cache
Downloading http://repo.packagist.org/p/ircmaxell/password-compat%243ca6819e6c523b50099d0f775a42570164ceaa5c9989e08c3690f4baf2aa6541.json
Writing /tmp/cache/repo/https---repo.packagist.org/provider-ircmaxell$password-compat.json into cache
Downloading http://repo.packagist.org/p/zendframework/zend-stdlib%24375111b57f84275a1f441ccae88d94378edcd27c3ebe9f7a163080d0df6cc4f5.json
Writing /tmp/cache/repo/https---repo.packagist.org/provider-zendframework$zend-stdlib.json into cache
Downloading http://repo.packagist.org/p/athletic/athletic%24fd99123e5ebd25284a5f7593423b118401a9c8268f2769376af665c7189cc155.json
Writing /tmp/cache/repo/https---repo.packagist.org/provider-athletic$athletic.json into cache
Downloading http://repo.packagist.org/p/zendframework/zend-hydrator%247b8c2e51c34a53d31b0081a71956cf60ebe7661708c3b980c2d21a1921fb0db0.json
Writing /tmp/cache/repo/https---repo.packagist.org/provider-zendframework$zend-hydrator.json into cache
Downloading http://repo.packagist.org/p/hoa/core%246d59ecf5a7c7fc75300fe66f981dd75e9ecba2427ed33de1474993be3b92f834.json
Writing /tmp/cache/repo/https---repo.packagist.org/provider-hoa$core.json into cache
Downloading http://repo.packagist.org/p/hoa/string%24268f2dfb67f945e74bc19d6d005eb4f3de1d6741bb1a70b1b785de739ef7a19a.json
Writing /tmp/cache/repo/https---repo.packagist.org/provider-hoa$string.json into cache
Downloading http://repo.packagist.org/p/psr/http-client%248bbd82960b4e514f918ebb29f54446239dc9a04d3d7c178beb4b53349cc1e47f.json
Writing /tmp/cache/repo/https---repo.packagist.org/provider-psr$http-client.json into cache
Downloading http://repo.packagist.org/p/nette/schema%24074badd45e40aed7ced9241b19a7fe8e1b5ace57c0ff7498e8e9e7b06426f273.json
Writing /tmp/cache/repo/https---repo.packagist.org/provider-nette$schema.json into cache
After that last line it just stops, no error nothing.
And I expected this to happen:
It should correctly upgrade/install packages (or at least give some sort of indication why it does not)
Let's consider the following composer.json
:
{
"require-dev": {
"phpstan/extension-installer": "*"
}
}
If you happen to remove the directory vendor/phpstan/extension-installer
, the all commands will no longer work. The problem being the plugin cannot be loaded (since it is missing its files). Your only choice left is to remove vendor
for Composer to be able to work again.
IMO it's a weird edge case, because this can only be the result of a user or a software tempering with the vendor
directory directly. But I still think it is not great that you can get into a state where even composer diagnose
will just straight up fail.
The above is I think the root of the issue, but what I was checking was originally a bit different. Indeed I was trying to run composer dump-autoload --no-dev
where dev packages had been removed (manually, not via composer install --no-dev
).
I expected that the --no-dev
flag would result in dev packages to not be loaded at all, but as shown before, it looks at the very least that dev plugins are.
To give a bit of context as to why this happens, in Box a feature that is present since 3.0.0-alpha.0 (so ~5 years ago) is to exclude dev dependencies as well as some extra unnecessary files (e.g. GitHub workflows or test directories), which was done by checking the composer.json
or composer.lock
.
As a result, although no dev dependency is installed, the installed.json
and installed.php
are not touched and still contain references of the dev packages.
I like the way NPM handles lock files indentation: if package.json
uses tabs then package-lock.json
also will be indented using tabs, if the former has spaces then the latter will have spaces.
Maybe it would be semantically correct to implement the similar behavior in Composer, so that composer.lock
was indented the way composer.json
is.
Also, this issue is linked to #3192
I've reported an issue in composer/satis (composer/satis#715), but as far as I can tell the issue originates here. Composer's ArchiveManager::archive() doesn't seem to preserve the file modification timestamps from the source when creating an archive.
In Satis, when a package is re-archived, the unzipped files have a modified time of 1 January 1980 at 00:00
. Its important (for caching purposes at least) that the file modified timestamps match the timestamp of the tag/release.