B
B
BonBon Slick2020-10-22 14:07:32
PHP
BonBon Slick, 2020-10-22 14:07:32

Composer diagnose returned with error code 1?

composer update  --no-plugins
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating optimized autoload files
121 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> composer dump-autoload --optimize
Generating optimized autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
Generated optimized autoload files containing 8984 classes
> php bin/console cache:clear

 // Clearing the cache for the dev environment with debug true                                                          

                                                                                                                        
 [OK] Cache for the "dev" environment (debug=true) was successfully cleared.                                            
                                                                                                                        

> composer outdated
dama/doctrine-test-bundle     dev-master a364cfe 7.0.x-dev a364cfe   Symfony bundle to isolate doctrine database tests and improve test performance
....
symfony/lock                  5.1.x-dev 328d642  9999999-dev 369b65f Symfony Lock Component
symfony/mailer                5.1.x-dev 0c35d12  9999999-dev d5f5948 Symfony Mailer Component
symfony/requirements-checker  dev-master e3d5565 2.0.x-dev e3d5565   Check Symfony requirements and give recommendations
symfony/translation           5.1.x-dev e593500  9999999-dev e96fb12 Symfony Translation Component
> composer diagnose
Checking composer.json: WARNING
require.symfony/translation : exact version constraints (5.1.x-dev) 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 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: You are not running the latest snapshot version, run `composer self-update` to update (14ec957e96a24aefab22ba9eb1e0c6589d9a221c => 492bece6e28310901ea678cfe6f119d67d60b425)
Composer version: 2.0-dev+14ec957e96a24aefab22ba9eb1e0c6589d9a221c
PHP version: 7.4.11
PHP binary path: /usr/bin/php7.4
OpenSSL version: OpenSSL 1.1.1g  21 Apr 2020
cURL version: 7.64.0 libz 1.2.11 ssl OpenSSL/1.1.1g
zip extension: OK
Script composer diagnose handling the custom-common-scripts event returned with error code 1
Script @custom-common-scripts was called via post-update-cmd


It looks like a problem from Git Ishus but there is no flex in the project.
Why is it similar then? Because separately the command is executed without errors, but if you add a hook post, an error occurs

"scripts": {
    "custom-common-scripts": {
      "dump-autoload": "composer dump-autoload --optimize",
      "cache:clear": "php bin/console cache:clear",
      "cout": "composer outdated",
      "cdi": "composer diagnose"
    },
    "post-install-cmd": [
      "@custom-common-scripts"
    ],
    "post-update-cmd": [
      "@custom-common-scripts"
    ],


I suspect that the matter is somewhere in PHP 7.4 or composer 2
composer --version
Composer version 2.0-dev (2.0-dev+14ec957e96a24aefab22ba9eb1e0c6589d9a221c) 2020-10-20 15:34:07

php -vv
PHP 7.4.11 (cli) (built: Oct 18 2020 19:44:48) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.11, Copyright (c), by Zend Technologies

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
BoShurik, 2020-10-25
@BonBonSlick

Checking composer.json: WARNING

from this and a non-zero response code, and because of it, changes are just rolled back

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question