Dependency Manager for PHP
MIT License
26962
597
6436

Composer from version 2.3.0 can be application runtime afflicted by unpredicted Composer's platform check.

// autoload.php @generated by Composer
if (PHP_VERSION_ID < 50600) {
echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
exit(1);
}

It is understandable and justified, but completely poorly implemented. This is same problem as I reported formerly at #9411 and fixed at #9410, #9414 and #9418.

Problems:

  • Web application is stopped and replaced with the some error message, but presented with HTTP 200 OK status code. This can ruin SEO reputation!
  • In CLI is error message presented simply to standard output instead of error output.
  • Developer is not notified because is not any standard error mechanism triggered.

It's now shutdowns websites across the world.
Trust me its't very serious problem, try to search -echo "Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running" for proof.

Please fix that with same way as another platform check (see above to previous PR references):

// platform_check.php @generated by Composer
\$issues = array();
{$requiredPhp}{$requiredExtensions}
if (\$issues) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, \$issues) . PHP_EOL.PHP_EOL);
} elseif (!headers_sent()) {
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, \$issues)) . PHP_EOL.PHP_EOL;
}
}
trigger_error(
'Composer detected issues in your platform: ' . implode(' ', \$issues),
E_USER_ERROR
);
}

Please be always very very careful when you adding any check/error message which is fired at autoload runtime! Composer have enormous power, they should also have enormous responsibility.

My composer.json:

  "require": {
    "php": "^7.3.0",
    "repository/project": "^3.1"
  }

Output of composer diagnose:

Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK git version 2.34.1
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: 1111111...
Dev Public Key Fingerprint: 222222....
OK
Checking composer version: OK
Composer version: 2.4.2
PHP version: 7.3.33
PHP binary path: /usr/bin/php7.3
OpenSSL version: OpenSSL 3.0.2 15 Mar 2022
cURL version: 7.81.0 libz 1.2.11 ssl OpenSSL/3.0.2
zip: extension present, unzip present, 7-Zip present (7z)

When I run this command: composer require -vvv "repository/project:^3.1"

Running 2.4.2 (2022-09-14 16:11:15) with PHP 7.3.33-6+ubuntu22.04.1+deb.sury.org+1 on Linux / 5.15.0-48-generic
Reading ./composer.json (/my-dev-path/composer.json)
Loading config file /home/ivan/.config/composer/auth.json
Loading config file ./composer.json (/my-dev-path/business-partner/composer.json)
Checked CA file /etc/pki/tls/certs/ca-bundle.crt does not exist or it is not a file.
Checked directory /etc/pki/tls/certs/ca-bundle.crt does not exist or it is not a directory.
Checked CA file /etc/ssl/certs/ca-certificates.crt: valid
Executing command (/my-dev-path/business-partner): 'git' 'branch' '-a' '--no-color' '--no-abbrev' '-v'
Executing async command (/my-dev-path/business-partner): git rev-list master..insurance-engine-2-pagamenti-ricorrenti
Executing async command (/my-dev-path/business-partner): git rev-list remotes/origin/master..insurance-engine-2-pagamenti-ricorrenti
Executing async command (/my-dev-path/business-partner): git rev-list remotes/origin/develop..insurance-engine-2-pagamenti-ricorrenti
Failed to initialize global composer: Composer could not find the config file: /home/ivan/.config/composer/composer.json

Reading /my-dev-path/business-partner/vendor/composer/installed.json
Loading plugin PackageVersions\Installer (from composer/package-versions-deprecated)
Reading /home/ivan/.cache/composer/repo/https---gitlab.com-api-v4-group-00000000---packages-composer/packages.json from cache
Using GitLab private token authentication
Downloading https://gitlab.com/api/v4/group/00000000/-/packages/composer/packages.json
[200] https://gitlab.com/api/v4/group/00000000/-/packages/composer/packages.json
Writing /home/ivan/.cache/composer/repo/https---gitlab.com-api-v4-group-00000000---packages-composer/packages.json into cache
Reading /home/ivan/.cache/composer/repo/https---gitlab.com-api-v4-group-00000000---packages-composer/provider-repository~project.json from cache
Downloading https://gitlab.com/api/v4/group/00000000/-/packages/composer/p2/repository/project.json
Downloading https://gitlab.com/api/v4/group/00000000/-/packages/composer/p2/repository/project~dev.json
[404] https://gitlab.com/api/v4/group/00000000/-/packages/composer/p2/repository/project~dev.json
[200] https://gitlab.com/api/v4/group/00000000/-/packages/composer/p2/repository/project.json
Writing /home/.cache/composer/repo/https---gitlab.com-api-v4-group-00000000--packages-composer/provider-repository~project.json into cache

In VersionParser.php line 186:
                                          
  [UnexpectedValueException]              
  Invalid version string "3.1.2-develop"  
                                          

Exception trace:
  at phar:///my-dev-path/composer.phar/vendor/composer/semver/src/VersionParser.php:186
 Composer\Semver\VersionParser->normalize() at phar:///my-dev-path/composer.phar/src/Composer/Repository/ComposerRepository.php:1029
 Composer\Repository\ComposerRepository->Composer\Repository\{closure}() at phar:///my-dev-path/composer.phar/vendor/react/promise/src/FulfilledPromise.php:28
 React\Promise\FulfilledPromise->then() at phar:///my-dev-path/composer.phar/vendor/react/promise/src/Promise.php:134
 React\Promise\Promise::React\Promise\{closure}() at phar:///my-dev-path/composer.phar/vendor/react/promise/src/Promise.php:168
 React\Promise\Promise->settle() at phar:///my-dev-path/composer.phar/vendor/react/promise/src/Promise.php:231
 React\Promise\Promise::React\Promise\{closure}() at phar:///my-dev-path/composer.phar/vendor/react/promise/src/FulfilledPromise.php:42
 React\Promise\FulfilledPromise->done() at phar:///my-dev-path/composer.phar/vendor/react/promise/src/Promise.php:135
 React\Promise\Promise::React\Promise\{closure}() at phar:///my-dev-path/composer.phar/vendor/react/promise/src/Promise.php:168
 React\Promise\Promise->settle() at phar:///my-dev-path/composer.phar/vendor/react/promise/src/Promise.php:231
 React\Promise\Promise::React\Promise\{closure}() at phar:///my-dev-path/composer.phar/vendor/react/promise/src/FulfilledPromise.php:42
 React\Promise\FulfilledPromise->done() at phar:///my-dev-path/composer.phar/vendor/react/promise/src/Promise.php:135
 React\Promise\Promise::React\Promise\{closure}() at phar:///my-dev-path/composer.phar/vendor/react/promise/src/Promise.php:168
 React\Promise\Promise->settle() at phar:///my-dev-path/composer.phar/vendor/react/promise/src/Promise.php:231
 React\Promise\Promise::React\Promise\{closure}() at phar:///my-dev-path/composer.phar/vendor/react/promise/src/FulfilledPromise.php:42
 React\Promise\FulfilledPromise->done() at phar:///my-dev-path/composer.phar/vendor/react/promise/src/Promise.php:135
 React\Promise\Promise::React\Promise\{closure}() at phar:///my-dev-path/composer.phar/vendor/react/promise/src/Promise.php:168
 React\Promise\Promise->settle() at phar:///my-dev-path/composer.phar/vendor/react/promise/src/Promise.php:231
 React\Promise\Promise::React\Promise\{closure}() at phar:///my-dev-path/composer.phar/src/Composer/Util/Http/CurlDownloader.php:440
 Composer\Util\Http\CurlDownloader->tick() at phar:///my-dev-path/composer.phar/src/Composer/Util/HttpDownloader.php:371
 Composer\Util\HttpDownloader->countActiveJobs() at phar:///my-dev-path/composer.phar/src/Composer/Util/Loop.php:89
 Composer\Util\Loop->wait() at phar:///my-dev-path/composer.phar/src/Composer/Repository/ComposerRepository.php:1058
 Composer\Repository\ComposerRepository->loadAsyncPackages() at phar:///my-dev-path/composer.phar/src/Composer/Repository/ComposerRepository.php:531
 Composer\Repository\ComposerRepository->loadPackages() at phar:///my-dev-path/composer.phar/src/Composer/Repository/RepositorySet.php:197
 Composer\Repository\RepositorySet->findPackages() at phar:///my-dev-path/composer.phar/src/Composer/Package/Version/VersionSelector.php:85
 Composer\Package\Version\VersionSelector->findBestCandidate() at phar:///my-dev-path/composer.phar/src/Composer/Command/PackageDiscoveryTrait.php:286
 Composer\Command\RequireCommand->findBestVersionAndNameForPackage() at phar:///my-dev-path/composer.phar/src/Composer/Command/PackageDiscoveryTrait.php:103
 Composer\Command\RequireCommand->determineRequirements() at phar:///my-dev-path/composer.phar/src/Composer/Command/RequireCommand.php:211
 Composer\Command\RequireCommand->execute() at phar:///my-dev-path/composer.phar/vendor/symfony/console/Command/Command.php:298
 Symfony\Component\Console\Command\Command->run() at phar:///my-dev-path/composer.phar/vendor/symfony/console/Application.php:1028
 Symfony\Component\Console\Application->doRunCommand() at phar:///my-dev-path/composer.phar/vendor/symfony/console/Application.php:299
 Symfony\Component\Console\Application->doRun() at phar:///my-dev-path/composer.phar/src/Composer/Console/Application.php:370
 Composer\Console\Application->doRun() at phar:///my-dev-path/composer.phar/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///my-dev-path/composer.phar/src/Composer/Console/Application.php:138
 Composer\Console\Application->run() at phar:///my-dev-path/composer.phar/bin/composer:88
 require() at /my-dev-path/composer.phar:29

require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>...]

Premise

I've created a new tag (3.1.2-develop) on one of my (private) project that I require in another (private) project.
When I see the problem I removed the tag.
Unfortunately the json I download from gitlab keeps the wrong and deleted tag.

And I expected this to happen:

composer require "repository/project:^3.1"
....
download the new version of the package.

Sorry if I did not follow the message template. I am using Composer to manage a Drupal 9 website. I had to downgraded back to Composer version 2.1.5. in order to continue working. A problem started when I upgraded to version 2.2.7. If you run certain Composer commands like installing a Drupal module like this.
composer require 'drupal/rabbit_hole:^1.0@beta'
The symlinks inside /vendor/bin/ will be replaced with regular files which then breaks the Drush symlink. Then Drush will not work on the server. People say to delete the /vendor folder, than run composer install. But this just recreates normal files again and not symlinks inside vendor/bin. If I downgrade back to v 2.1.5 and run composer install, symlinks are then created inside vendor/bin.

when i try to run composer update i keep getting curl error 60 while downloading https://composer.deliciousbrains.com/packages.json: SSL certificate problem: certificate has expired even though i can access that exact url fine via chrome and curl. i tried with both the stable and the latest snapshot.

My composer.json:

{
    "name": "test/test",
    "type": "project",
    "repositories": [
        {
            "type": "composer",
            "url": "https://composer.deliciousbrains.com"
        }
    ],
    "require": {
        "johnpbloch/wordpress": "*"
    }
}

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.
require.johnpbloch/wordpress : unbound version constraints (*) should be avoided
Checking platform settings: OK
Checking git settings: Your git color.ui setting is set to always, this is known to create issues. Use "git config --global color.ui true" to set it correctly.
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: You are not running the latest snapshot version, run `composer self-update` to update (2.4.2 => 5770fb027c3af5b29f1542bde0407c37961ee950)
Composer version: 2.4.2
PHP version: 8.0.8
PHP binary path: /Applications/MAMP/bin/php/php8.0.8/bin/php
OpenSSL version: OpenSSL 1.0.2u  20 Dec 2019
cURL version: 7.68.0 libz 1.2.11 ssl OpenSSL/1.0.2u
zip: extension present, unzip present, 7-Zip not available```

When I run this command:

composer update -vvv

I get the following output:

Running 2.4.2 (2022-09-14 16:11:15) with PHP 8.0.8 on Darwin / 20.6.0
Reading ./composer.json (/Users/maintenance/Sites/dbrainstest/composer.json)
Loading config file /Users/maintenance/.composer/config.json
Loading config file /Users/maintenance/.composer/auth.json
Loading config file ./composer.json (/Users/maintenance/Sites/dbrainstest/composer.json)
Checked CA file /etc/pki/tls/certs/ca-bundle.crt does not exist or it is not a file.
Checked directory /etc/pki/tls/certs/ca-bundle.crt does not exist or it is not a directory.
Checked CA file /etc/ssl/certs/ca-certificates.crt does not exist or it is not a file.
Checked directory /etc/ssl/certs/ca-certificates.crt does not exist or it is not a directory.
Checked CA file /etc/ssl/ca-bundle.pem does not exist or it is not a file.
Checked directory /etc/ssl/ca-bundle.pem does not exist or it is not a directory.
Checked CA file /usr/local/share/certs/ca-root-nss.crt does not exist or it is not a file.
Checked directory /usr/local/share/certs/ca-root-nss.crt does not exist or it is not a directory.
Checked CA file /usr/ssl/certs/ca-bundle.crt does not exist or it is not a file.
Checked directory /usr/ssl/certs/ca-bundle.crt does not exist or it is not a directory.
Checked CA file /opt/local/share/curl/curl-ca-bundle.crt does not exist or it is not a file.
Checked directory /opt/local/share/curl/curl-ca-bundle.crt does not exist or it is not a directory.
Checked CA file /usr/local/share/curl/curl-ca-bundle.crt does not exist or it is not a file.
Checked directory /usr/local/share/curl/curl-ca-bundle.crt does not exist or it is not a directory.
Checked CA file /usr/share/ssl/certs/ca-bundle.crt does not exist or it is not a file.
Checked directory /usr/share/ssl/certs/ca-bundle.crt does not exist or it is not a directory.
Checked CA file /private/etc/ssl/cert.pem: valid
Executing command (/Users/maintenance/Sites/dbrainstest): 'git' 'branch' '-a' '--no-color' '--no-abbrev' '-v'
Executing command (/Users/maintenance/Sites/dbrainstest): git describe --exact-match --tags
Executing command (CWD): git --version
Executing command (/Users/maintenance/Sites/dbrainstest): git log --pretty="%H" -n1 HEAD --no-show-signature
Executing command (/Users/maintenance/Sites/dbrainstest): hg branch
Executing command (/Users/maintenance/Sites/dbrainstest): fossil branch list
Executing command (/Users/maintenance/Sites/dbrainstest): fossil tag list
Executing command (/Users/maintenance/Sites/dbrainstest): svn info --xml
Failed to initialize global composer: Composer could not find the config file: /Users/maintenance/.composer/composer.json

Loading composer repositories with package information
Downloading https://composer.deliciousbrains.com/packages.json

In CurlDownloader.php line 358:

  [Composer\Downloader\TransportException]
  curl error 60 while downloading https://composer.deliciousbrains.com/packages.json: SSL certificate problem: certificate has expired


Exception trace:
  at phar:///usr/local/bin/composer/src/Composer/Util/Http/CurlDownloader.php:358
 Composer\Util\Http\CurlDownloader->tick() at phar:///usr/local/bin/composer/src/Composer/Util/HttpDownloader.php:371
 Composer\Util\HttpDownloader->countActiveJobs() at phar:///usr/local/bin/composer/src/Composer/Util/HttpDownloader.php:342
 Composer\Util\HttpDownloader->wait() at phar:///usr/local/bin/composer/src/Composer/Util/HttpDownloader.php:108
 Composer\Util\HttpDownloader->get() at phar:///usr/local/bin/composer/src/Composer/Repository/ComposerRepository.php:1441
 Composer\Repository\ComposerRepository->fetchFile() at phar:///usr/local/bin/composer/src/Composer/Repository/ComposerRepository.php:1164
 Composer\Repository\ComposerRepository->loadRootServerFile() at phar:///usr/local/bin/composer/src/Composer/Repository/ComposerRepository.php:795
 Composer\Repository\ComposerRepository->hasProviders() at phar:///usr/local/bin/composer/src/Composer/Repository/ComposerRepository.php:474
 Composer\Repository\ComposerRepository->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:462
 Composer\Installer->doUpdate() at phar:///usr/local/bin/composer/src/Composer/Installer.php:281
 Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/UpdateCommand.php:240
 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:1028
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:299
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:370
 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:138
 Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:88
 require() at /usr/local/bin/composer:29


update [--with WITH] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-dev] [--lock] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--no-autoloader] [--no-suggest] [--no-progress] [-w|--with-dependencies] [-W|--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>...]

Why, there's already $otherToolsDoingIt

  1. it's a valuable feature, there's a standalone implementation and Private Packagist also adds it as comments to PRs (which is a nice touch, but not a system seller IMO, so it wouldn't be lost revenue there), there's obviously interest
  2. composer.lock is owned by Composer, it's already being read and written by it, a similar feature (outdated) is already built in, makes sense this type of introspection is done by Composer itself
  3. if Composer did it, we could rely on it being available on the target system and use it like so
# .gitattributes
composer.lock -merge diff=composer

which would make Git diff show the semantic change, and not just the textual. The same can then be used in CI, wherever Composer is available, which is everywhere because you need it to install your deps anyway.

My composer.json:

{ }

(yes it's supposed to be empty, problem occurs even without a composer.json present in an otherwise empty directory)

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: 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: 2.3.10
PHP version: 8.0.13
PHP binary path: C:\Program Files\PHP\php.exe
OpenSSL version: OpenSSL 1.1.1l  24 Aug 2021
cURL version: 7.76.1 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 require "twig/twig:^3.0"

I get the following output:

./composer.json has been updated
Running composer update twig/twig
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires twig/twig 3.0 -> satisfiable by twig/twig[v3.0.0].
    - twig/twig v3.0.0 requires php ^7.2.9 -> your php version (8.0.13) does not satisfy that requirement.


Installation failed, reverting ./composer.json and ./composer.lock to their original content.

And I expected this to happen:

It to install a version higher than 3.0 but lower than 4.0 which is compatible with my version of PHP.

Specifying --version on the command line when installing doesn't install the specified version.

php -c /etc/php-cli.ini /tmp/composer --install-dir=/usr/local/bin --filename=composer --version=2.2.10

composer -V
Composer 2.3.0 2022-03-30 11:15:36

When I run composer update it hits me with the following error message :

Failed to clone http://github.com/symfony/Translation, git was not found, check that it is installed and in your PATH env.

But when I do git --version I do get git version 1.8.0.msysgit.0. Where could this come from ? I've read this might stem from git not being accessible for PHP ?

Windows 8 — x64
msysgit 1.8.0
PHP 5.4.3
Latest Composer

Running the commands from Git Bash.

As you can see on this image, Command classes have very poor coverage currently (16% of lines covered in total):

image

Here some examples of how to write sane integration tests for most commands:

public function testCanListScripts(): void
{
$this->initTempComposer([
'scripts' => [
'test' => '@php test',
'fix-cs' => 'php-cs-fixer fix',
],
'scripts-descriptions' => [
'fix-cs' => 'Run the codestyle fixer',
],
]);
$appTester = $this->getApplicationTester();
$appTester->run(['command' => 'run-script', '--list' => true]);
$appTester->assertCommandIsSuccessful();
$output = $appTester->getDisplay();
$this->assertStringContainsString('Runs the test script as defined in composer.json.', $output, 'The default description for the test script should be printed');
$this->assertStringContainsString('Run the codestyle fixer', $output, 'The custom description for the fix-cs script should be printed');
}

/**
* @dataProvider provideConfigUpdates
* @param array<mixed> $before
* @param array<mixed> $command
* @param array<mixed> $expected
*/
public function testConfigUpdates(array $before, array $command, array $expected): void
{
$this->initTempComposer($before);
$appTester = $this->getApplicationTester();
$appTester->run(array_merge(['command' => 'config'], $command));
$appTester->assertCommandIsSuccessful($appTester->getDisplay());
$this->assertSame($expected, json_decode((string) file_get_contents('composer.json'), true));
}
public function provideConfigUpdates(): \Generator
{
yield 'set scripts' => [
[],
['setting-key' => 'scripts.test', 'setting-value' => ['foo bar']],
['scripts' => ['test' => 'foo bar']],
];
yield 'unset scripts' => [
['scripts' => ['test' => 'foo bar', 'lala' => 'baz']],
['setting-key' => 'scripts.lala', '--unset' => true],
['scripts' => ['test' => 'foo bar']],
];

$this->initTempComposer($composerJson);
$packages = [
$this->getPackage('first/pkg', '2.3.4'),
$this->getPackage('second/pkg', '3.4.0'),
];
$devPackages = [
$this->getPackage('dev/pkg', '2.3.4.5'),
];
$this->createInstalledJson($packages, $devPackages);
if ($lock) {
$this->createComposerLock($packages, $devPackages);
}
$appTester = $this->getApplicationTester();
$appTester->run(array_merge(['command' => 'bump'], $command));
$json = new JsonFile('./composer.json');
$this->assertSame($expected, $json->read());

If you feel like helping, PRs are very much welcome, I don't think we absolutely need 100% coverage but having the most common use cases covered would already be very valuable. Please target the main branch if you want to contribute some, and feel free to announce it here if you start some larger chunk of work to avoid duplicating efforts.

My composer.json:

{
  "name": "pimcore/skeleton",
  "type": "project",
  "license": "GPL-3.0-or-later",
  "config": {
    "optimize-autoloader": true,
    "process-timeout": 0,
    "sort-packages": true,
  },
  "minimum-stability": "dev",
  "prefer-stable": true,
  "require": {
    "php": "^8.1",
    "twig/twig": "^3.4.0"
  },
}

Output of composer diagnose:

Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK git version 2.30.2
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: FAIL
Missing pubkey for tags verification
Missing pubkey for dev verification
Run composer self-update --update-keys to set them up
Checking composer version: OK
Composer version: 2.4.2
PHP version: 8.1.10
PHP binary path: /usr/local/bin/php
OpenSSL version: OpenSSL 1.1.1n  15 Mar 2022
cURL version: 7.74.0 libz 1.2.11 ssl OpenSSL/1.1.1n
zip: extension present, unzip present, 7-Zip not available

When I run this command:

composer audit --format=table

I get the following output:

+-------------------+----------------------------------------------------------------------------------+
| Package           | twig/twig                                                                        |
| CVE               | CVE-2022-39261                                                                   |
| Title             | Possibility to load a template outside a configured directory when using the fil |
|                   | esystem loader                                                                   |
| URL               | https://symfony.com/blog/twig-security-release-possibility-to-load-a-template-ou |
|                   | tside-a-configured-directory-when-using-the-filesystem-loader |
| Affected versions | >=1.0.0,<1.44.7|>=2.0.0,<2.15.3|>=3.0.0,<3.4.3                                   |
| Reported at       | 2022-09-28T10:36:08+00:00                                                        |
+-------------------+----------------------------------------------------------------------------------+

And I expected this to happen:
Note the part ...using-the-filesystem-loader | where the pipe does not position itself correctly with the other right-aligned pipes.

I am facing issue while cloning any repository or downloading/installing packages using composer. I think composer is installed properly.

image

I am using Corporate VPN and not aware about firewall settings.
Ubuntu - 20.04 and php - 7.4

curl https://github.com
curl: (35) OpenSSL SSL_connect: Connection reset by peer in connection to github.com:443

openssl s_client -connect github.com:443 -servername github.com
image

curl -v -I https://github.com
image

(unrelated context) we are in the process of normalizing our composer.json files using composer-normalize.

normalizing leads to a change within a version contraint.

composer.json before normalizing

{
    "require" : {
        "php": "^7.0 || ^8.0",
        "complex/rocket" : "dev-CLX6_2020R02_LTS|dev-CLX6_2020R03|dev-CLX6_2021R01|dev-CLX6_2021R01|dev-CLX6_2021R02|dev-CLX6_2022R01|dev-master as dev-CLX6_2022R02"
    },
    "config": {
        "allow-plugins": {
            "complex/library-installer-plugin": true,
            "bamarni/composer-bin-plugin": true
        }
    }
}

after normalizing (it just changed | to || and added spaces):

{
    "require" : {
        "php": "^7.0 || ^8.0",
        "complex/rocket": "dev-CLX6_2020R02_LTS || dev-CLX6_2020R03 || dev-CLX6_2021R01 || dev-CLX6_2021R01 || dev-CLX6_2021R02 || dev-CLX6_2022R01 || dev-master as dev-CLX6_2022R02"
    },
    "config": {
        "allow-plugins": {
            "complex/library-installer-plugin": true,
            "bamarni/composer-bin-plugin": true
        }
    }
}

running composer config scripts.post-install-cmd --unset with the before-composer.json works without problems.
running the same command with the after-composer.json leads to an error:

$ composer config scripts.post-install-cmd --unset

In RootPackageLoader.php line 204:

  Invalid alias definition in "complex/rocket": "dev-CLX6_2020R02_LTS || dev-CLX6_2020R03 || dev-CLX6_2021R01 || dev-CLX6_2021R01 || dev-CLX6_2021R02 || dev-CLX6_2022R01 || dev-master as dev-CLX6_2022R02". Aliases should be in the form "exact-version as other-exact-version".


config [-g|--global] [-e|--editor] [-a|--auth] [--unset] [-l|--list] [-f|--file FILE] [--absolute] [-j|--json] [-m|--merge] [--append] [--source] [--] [<setting-key> [<setting-value>...]]

I am wondering whether there is a bug in the normalizing or the composer validation process


When I run this command:

$ composer config scripts.post-install-cmd --unset -vvv
Running 2.4.2 (2022-09-14 16:11:15) with PHP 8.0.15 on Windows NT / 10.0
Reading ./composer.json (C:\dvl\Workspace\php-mobisapi\composer.json)
Loading config file C:/Users/mstaab/AppData/Roaming/Composer/config.json
Loading config file C:/Users/mstaab/AppData/Roaming/Composer/auth.json
Loading config file ./composer.json (C:\dvl\Workspace\php-mobisapi\composer.json)
Loading config file C:\dvl\Workspace\php-mobisapi/auth.json
Reading C:\dvl\Workspace\php-mobisapi/auth.json (C:\dvl\Workspace\php-mobisapi\auth.json)
Checked CA file /etc/pki/tls/certs/ca-bundle.crt does not exist or it is not a file.
Checked directory /etc/pki/tls/certs/ca-bundle.crt does not exist or it is not a directory.
Checked CA file /etc/ssl/certs/ca-certificates.crt does not exist or it is not a file.
Checked directory /etc/ssl/certs/ca-certificates.crt does not exist or it is not a directory.
Checked CA file /etc/ssl/ca-bundle.pem does not exist or it is not a file.
Checked directory /etc/ssl/ca-bundle.pem does not exist or it is not a directory.
Checked CA file /usr/local/share/certs/ca-root-nss.crt does not exist or it is not a file.
Checked directory /usr/local/share/certs/ca-root-nss.crt does not exist or it is not a directory.
Checked CA file /usr/ssl/certs/ca-bundle.crt does not exist or it is not a file.
Checked directory /usr/ssl/certs/ca-bundle.crt does not exist or it is not a directory.
Checked CA file /opt/local/share/curl/curl-ca-bundle.crt does not exist or it is not a file.
Checked directory /opt/local/share/curl/curl-ca-bundle.crt does not exist or it is not a directory.
Checked CA file /usr/local/share/curl/curl-ca-bundle.crt does not exist or it is not a file.
Checked directory /usr/local/share/curl/curl-ca-bundle.crt does not exist or it is not a directory.
Checked CA file /usr/share/ssl/certs/ca-bundle.crt does not exist or it is not a file.
Checked directory /usr/share/ssl/certs/ca-bundle.crt does not exist or it is not a directory.
Checked CA file /etc/ssl/cert.pem does not exist or it is not a file.
Checked directory /etc/ssl/cert.pem does not exist or it is not a directory.
Checked CA file /usr/local/etc/ssl/cert.pem does not exist or it is not a file.
Checked directory /usr/local/etc/ssl/cert.pem does not exist or it is not a directory.
Checked CA file /usr/local/etc/openssl/cert.pem does not exist or it is not a file.
Checked directory /usr/local/etc/openssl/cert.pem does not exist or it is not a directory.
Checked CA file /usr/local/etc/openssl@1.1/cert.pem does not exist or it is not a file.
Checked directory /usr/local/etc/openssl@1.1/cert.pem does not exist or it is not a directory.
Checked CA file /etc/pki/tls/certs does not exist or it is not a file.
Checked directory /etc/pki/tls/certs does not exist or it is not a directory.
Checked CA file /etc/ssl/certs does not exist or it is not a file.
Checked directory /etc/ssl/certs does not exist or it is not a directory.
Checked CA file /etc/ssl does not exist or it is not a file.
Checked directory /etc/ssl does not exist or it is not a directory.
Checked CA file /usr/local/share/certs does not exist or it is not a file.
Checked directory /usr/local/share/certs does not exist or it is not a directory.
Checked CA file /usr/ssl/certs does not exist or it is not a file.
Checked directory /usr/ssl/certs does not exist or it is not a directory.
Checked CA file /opt/local/share/curl does not exist or it is not a file.
Checked directory /opt/local/share/curl does not exist or it is not a directory.
Checked CA file /usr/local/share/curl does not exist or it is not a file.
Checked directory /usr/local/share/curl does not exist or it is not a directory.
Checked CA file /usr/share/ssl/certs does not exist or it is not a file.
Checked directory /usr/share/ssl/certs does not exist or it is not a directory.
Checked CA file /etc/ssl does not exist or it is not a file.
Checked directory /etc/ssl does not exist or it is not a directory.
Checked CA file /usr/local/etc/ssl does not exist or it is not a file.
Checked directory /usr/local/etc/ssl does not exist or it is not a directory.
Checked CA file /usr/local/etc/openssl does not exist or it is not a file.
Checked directory /usr/local/etc/openssl does not exist or it is not a directory.
Checked CA file /usr/local/etc/openssl@1.1 does not exist or it is not a file.
Checked directory /usr/local/etc/openssl@1.1 does not exist or it is not a directory.
Checked CA file C:\Users\mstaab\AppData\Local\Temp\ope3594.tmp: valid
Executing command (C:\dvl\Workspace\php-mobisapi): git branch -a --no-color --no-abbrev -v
Reading ./composer.json (C:\dvl\Workspace\php-mobisapi\composer.json)
Loading config file C:/Users/mstaab/AppData/Roaming/Composer/config.json
Loading config file C:/Users/mstaab/AppData/Roaming/Composer/auth.json
Loading config file ./composer.json (C:\dvl\Workspace\php-mobisapi\composer.json)
Loading config file C:\dvl\Workspace\php-mobisapi/auth.json
Reading C:\dvl\Workspace\php-mobisapi/auth.json (C:\dvl\Workspace\php-mobisapi\auth.json)
Executing command (C:\dvl\Workspace\php-mobisapi): git branch -a --no-color --no-abbrev -v

In RootPackageLoader.php line 204:

  [UnexpectedValueException]
  Invalid alias definition in "complex/rocket": "dev-CLX6_2020R02_LTS || dev-CLX6_2020R03 || dev-CLX6_2021R01 || dev-CLX6_2021R01 || dev-CLX6_2021R02 || dev-CLX6_2022R01 || dev-master as dev-CLX6_2022R02". Aliases should be in the form "exact-version as other-exact-version".


Exception trace:
  at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Package/Loader/RootPackageLoader.php:204
 Composer\Package\Loader\RootPackageLoader->extractAliases() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Package/Loader/RootPackageLoader.php:145
 Composer\Package\Loader\RootPackageLoader->load() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Factory.php:385
 Composer\Factory->createComposer() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Factory.php:625
 Composer\Factory::create() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:498
 Composer\Console\Application->getComposer() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/BaseCommand.php:127
 Composer\Command\BaseCommand->tryComposer() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/BaseCommand.php:231
 Composer\Command\BaseCommand->initialize() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/ConfigCommand.php:155
 Composer\Command\ConfigCommand->initialize() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Command/Command.php:264
 Symfony\Component\Console\Command\Command->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:1028
 Symfony\Component\Console\Application->doRunCommand() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:299
 Symfony\Component\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:370
 Composer\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:138
 Composer\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/bin/composer:88
 require() at C:\ProgramData\ComposerSetup\bin\composer.phar:29

config [-g|--global] [-e|--editor] [-a|--auth] [--unset] [-l|--list] [-f|--file FILE] [--absolute] [-j|--json] [-m|--merge] [--append] [--source] [--] [<setting-key> [<setting-value>...]]

Output of composer diagnose:

$ 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: OK git version 2.37.3
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.4.2
PHP version: 7.2.33 - Package overridden via config.platform, actual: 8.0.15
PHP binary path: C:\tools\php80\php.exe
OpenSSL version: OpenSSL 1.1.1m  14 Dec 2021
cURL version: 7.76.1 libz 1.2.11 ssl OpenSSL/1.1.1m
zip: extension present, unzip present, 7-Zip present (7z)

Hi,

There have been multiple when I stepped on this rake and got hit in the face: composer install does not work for private repos. And then I go debugging ssh connections, deployer scripts, docker configuration etc. only to find somewhere in the logs:

COMPOSER_AUTH environment variable is malformed, should be a valid JSON object

And then everything is obvious and the fix is around the corner.

This time I am thinking maybe there is a better way? One solution could be to make composer install (or maybe all composer commands?) to fail when COMPOSER_AUTH is malformed? O maybe add parameter to make it fail?
It would be nice if this never happens to me or my colleague again. If COMPOSER_AUTH is set, it should valid otherwise what's the point of setting it, right?

What do you think? 👨‍🎤

My composer.json:

N/A

Output of composer diagnose:

[1]    65767 segmentation fault  composer diagnose

When I run this command:

composer --version -vvv

I get the following output:

# With PHP8.0.17 or PHP7.4.28, it works fine
Running 2.2.10 (2022-03-29 21:55:35) with PHP 8.0.17 on Darwin / 21.4.0
Composer version 2.2.10 2022-03-29 21:55:35

Running 2.2.10 (2022-03-29 21:55:35) with PHP 7.4.28 on Darwin / 21.4.0
Composer version 2.2.10 2022-03-29 21:55:35

# With PHP8.1.4
[1]    65767 segmentation fault  composer diagnose

And I expected this to happen:

error message

The PHP exe file you specified did not run correctly:
C:\PHP7\php.exe

The php.ini used by your command-line PHP is: C:\PHP7\php.ini

A setting in your php.ini could be causing the problem: Either the 'extension_dir' value is incorrect or a dll does not exist.

Program Output:
PHP Warning: PHP Startup: Unable to load dynamic library 'php_pdo_oci' (tried: C:\PHP7\ext\php_pdo_oci (The specified module could not be found.), C:\PHP7\ext\php_php_pdo_oci.dll (The specified module could not be found.))
PHP Warning: Module 'ldap' already loaded

but C:\PHP7\ext\php_pdo_oci in ext directory

Any help will be appreciated

Thank you

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": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.4.6",
        "appstract/laravel-opcache": "^4.0",
        "aws/aws-sdk-php-laravel": "^3.6",
        "fideloper/proxy": "^4.2",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^6.3",
        "intervention/image": "^2.5",
        "laravel/framework": "^7.24",
        "laravel/sanctum": "^2.6",
        "laravel/socialite": "^4.4",
        "laravel/tinker": "^2.0",
        "socialiteproviders/microsoft": "^3.0",
        "socialiteproviders/yahoo": "^3.0",
        "twilio/sdk": "^6.22"
    },
    "require-dev": {
        "facade/ignition": "^2.0",
        "fzaninotto/faker": "^1.9.1",
        "kitloong/laravel-migrations-generator": "^4.4",
        "krlove/eloquent-model-generator": "^1.3",
        "mockery/mockery": "^1.3.1",
        "mpociot/laravel-test-factory-helper": "^2.1",
        "nunomaduro/collision": "^4.1",
        "nunomaduro/larastan": "^0.7.12",
        "phpunit/phpunit": "^8.5"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/"
        },
        "classmap": [
            "database/seeds",
            "database/factories"
        ]
    },
    "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"
        ]
    }
}

Output of composer diagnose:

Checking composer.json: OK
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: XXXXXXX XXXXXXX 7ECC7CC5 573090D0  87719BA6 8F3BB723 XXXXXXX XXXXXXX
Dev Public Key Fingerprint: XXXXXXX XXXXXXX XXXXXXX XXXXXXX 0C708369 153E328C XXXXXXX XXXXXXX
OK
Checking composer version: You are not running the latest stable version, run `composer self-update` to update (1.10.10 => 2.4.2)
Composer version: 1.10.10
PHP version: 7.4.13
PHP binary path: /usr/bin/php
OpenSSL version: OpenSSL 1.0.2k  26 Jan 2017

For the above setup, the following error is printed in logs:

[2022-09-26 09:51:00][development.ERROR][NULL]: Package "spatie/laravel-ray" is not installed {"exception":"[object] (OutOfBoundsException(code: 0): Package \"spatie/laravel-ray\" is not installed at /var/www/html/test/vendor/composer/composer/src/Composer/InstalledVersions.php:167)"}

spatie/laravel-ray package was being used earlier. However, since it was longer used it was removed from composer.json and composer install was run. With this the package was removed. However, post this, the above error is being printed.

Ran the following commands to clear the caches:

composer dump-autoload

Output:

Generating optimized autoload files
Deprecation Notice: Class League\OAuth1\Client\Tests\TrelloTest located in ./vendor/league/oauth1-client/tests/TrelloServerTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class League\OAuth1\Client\Tests\XingTest located in ./vendor/league/oauth1-client/tests/XingServerTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class League\OAuth1\Client\Tests\ServerStub located in ./vendor/league/oauth1-client/tests/stubs/ServerStub.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: appstract/laravel-opcache
Discovered Package: aws/aws-sdk-php-laravel
Discovered Package: facade/ignition
Discovered Package: fideloper/proxy
Discovered Package: fruitcake/laravel-cors
Discovered Package: intervention/image
Discovered Package: kitloong/laravel-migrations-generator
Discovered Package: krlove/eloquent-model-generator
Discovered Package: laravel/sanctum
Discovered Package: laravel/socialite
Discovered Package: laravel/tinker
Discovered Package: mpociot/laravel-test-factory-helper
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Discovered Package: socialiteproviders/manager
Package manifest generated successfully.
Generated optimized autoload files containing 8841 classes
composer cc

Output:

Cache directory does not exist (cache-vcs-dir):
Clearing cache (cache-repo-dir): /home/dev/.cache/composer/repo
Clearing cache (cache-files-dir): /home/dev/.cache/composer/files
Clearing cache (cache-dir): /home/dev/.cache/composer
All caches cleared.

Not certain what is going on here. Any help would be much appreciated here.

Now it's Iran's turn!
for Iranian women
for #مهسا_امینی
for ....
This message at the end of the commands :
Stay Strong Iran !

My composer.json:

{
    "name": "php-typo/php-typo",
    "description": "A command line tool to validate files do not have English typo in variables, methods, functions, ...",
    "type": "library",
    "license": "MIT",
    "autoload": {
        "psr-4": {
            "PhpTypo\\PhpTypo\\": "src/"
        }
    },
    "authors": [
        {
            "name": "Khalyomede",
            "email": "khalyomede@gmail.com"
        }
    ],
    "minimum-stability": "stable",
    "require": {
        "php": ">=8.1.0",
        "nikic/php-parser": "^4.0",
        "jawira/case-converter": "^3.0",
        "symfony/console": "^6.0"
    },
    "bin": [
        "bin/php-typo"
    ],
    "scripts": {
        "php-typo": "php-typo",
        "analyse": "phpstan",
        "test": "pest",
        "lint": "php-cs-fixer fix --diff --using-cache=no --allow-risky=yes --dry-run",
        "format": "php-cs-fixer --using-cache=no --allow-risky=yes fix",
        "check-updates": "composer outdated --strict --direct"
    },
    "require-dev": {
        "phpstan/phpstan": "1.8.2",
        "pestphp/pest": "1.21.3",
        "friendsofphp/php-cs-fixer": "3.10.0"
    },
    "config": {
        "allow-plugins": {
            "pestphp/pest-plugin": true
        }
    }
}

Output of composer diagnose:

Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK git version 2.25.1
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.1
PHP version: 8.1.9
PHP binary path: /usr/bin/php8.1
OpenSSL version: OpenSSL 1.1.1f  31 Mar 2020
cURL version: 7.68.0 libz 1.2.11 ssl OpenSSL/1.1.1f
zip: extension present, unzip present, 7-Zip not available

When I run this command:

composer outdated --strict --direct

// or

composer run check-updates

I get the following output:

> composer outdated --strict --direct
Info from https://repo.packagist.org: #StandWithUkraine
Color legend:
- patch or minor release available - update recommended
- major release available - update possible
jawira/case-converter v3.5.1 v1.0.0 Convert strings between 13 naming conventions: Snake case, Camel case, Pascal case, Kebab case, Ada case, Train case, Cobol case, Macro case, Uppe...
Script composer outdated --strict --direct handling the check-updates event returned with error code 1

And I expected this to happen:

No greater packages since I'm on the latest version of package "jawira/case-converter"

The output of this commands proves it

khalyomede@ubuntu:~/programming/php-typo$ composer info jawira/case-converter
name     : jawira/case-converter
descrip. : Convert strings between 13 naming conventions: Snake case, Camel case, Pascal case, Kebab case, Ada case, Train case, Cobol case, Macro case, Upper case, Lower case, Sentence case, Title case and Dot notation.
keywords : Ada case, Cobol case, Macro case, Train case, camel case, dot notation, kebab case, lower case, pascal case, sentence case, snake case, title case, upper case
versions : * v3.5.1
[...]

Side note

For the moment I will ignore this package, so this is not an urgent bug.

composer outdated --strict --direct --ignore jawira/case-converter