BonBonSlick
@BonBonSlick
Vanilla Web Architect

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


Похоже на проблему из Гит Ишус но в проекте флекса нет.
Почему тогда похожа? Потому что отдельно команда выполняется без ошибок, но стоит добавить пост хуки, вылетает ошибка

"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"
    ],


Подозреваю что дело где-то в РнР 7.4 или 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
  • Вопрос задан
  • 79 просмотров
Решения вопроса 1
BoShurik
@BoShurik
Symfony developer
Checking composer.json: WARNING

от этого и ненулевой код ответа, а из-за него как раз откатываются изменения
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы