| Q | A
| ---------------- | -----
| Bug report? | yes
| Feature request? | no
| Library version | stable and dev-master
Hi, when i install symfony website skeleton composer create-project symfony/website-skeleton (5.0.8) i get an error when installing phpinsights.
I have the most recent composer version (1.10.6) and use php 7.4.
composer require nunomaduro/phpinsights --dev
Using version ^1.14 for nunomaduro/phpinsights
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "^5.0"
Package operations: 22 installs, 0 updates, 0 removals
- Installing squizlabs/php_codesniffer (3.5.5): Loading from cache
- Installing phpstan/phpdoc-parser (0.4.4): Loading from cache
- Installing slevomat/coding-standard (6.3.5): Loading from cache
- Installing sensiolabs/security-checker (v6.0.3): Loading from cache
- Installing sebastian/version (3.0.0): Loading from cache
- Installing theseer/fdomdocument (1.6.6): Loading from cache
- Installing sebastian/finder-facade (2.0.0): Loading from cache
- Installing phploc/phploc (6.0.2): Loading from cache
- Installing nette/utils (v3.1.1): Loading from cache
- Installing object-calisthenics/phpcs-calisthenics-rules (v3.7.0): Loading from cache
- Installing league/container (3.3.1): Loading from cache
- Installing justinrainbow/json-schema (5.2.9): Loading from cache
- Installing php-cs-fixer/diff (v1.3.0): Loading from cache
- Installing composer/xdebug-handler (1.4.1): Loading from cache
- Installing composer/semver (1.5.1): Loading from cache
- Installing friendsofphp/php-cs-fixer (v2.16.3): Loading from cache
- Installing seld/phar-utils (1.1.0): Loading from cache
- Installing seld/jsonlint (1.8.0): Loading from cache
- Installing composer/spdx-licenses (1.5.3): Loading from cache
- Installing composer/ca-bundle (1.2.7): Loading from cache
- Installing composer/composer (1.10.6): Loading from cache
- Installing nunomaduro/phpinsights (v1.14.0): Loading from cache
Writing lock file
Generating autoload files
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
77 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Symfony operations: 4 recipes (a3ef9a13616b5294de0155435989d573)
- WARNING squizlabs/php_codesniffer (>=3.0): From github.com/symfony/recipes-contrib:master
The recipe for this package comes from the "contrib" repository, which is open to community contributions.
Review the recipe at https://github.com/symfony/recipes-contrib/tree/master/squizlabs/php_codesniffer/3.0
Do you want to execute this recipe?
[y] Yes
[n] No
[a] Yes for all packages, only for the current installation session
[p] Yes permanently, never ask again for this project
(defaults to n): n
- Configuring sensiolabs/security-checker (>=4.0): From github.com/symfony/recipes:master
- Configuring friendsofphp/php-cs-fixer (>=2.2): From github.com/symfony/recipes:master
- Configuring composer/ca-bundle (>=1.2.7): From auto-generated recipe
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 255
!! Symfony\Component\ErrorHandler\Error\UndefinedMethodError {#49
!! #message: "Attempted to call an undefined method named "getName" of class "Composer\CaBundle\CaBundle"."
!! #code: 0
!! #file: "./vendor/symfony/http-kernel/Kernel.php"
!! #line: 370
!! trace: {
!! ./vendor/symfony/http-kernel/Kernel.php:370 { …}
!! ./vendor/symfony/http-kernel/Kernel.php:123 { …}
!! ./vendor/symfony/framework-bundle/Console/Application.php:168 { …}
!! ./vendor/symfony/framework-bundle/Console/Application.php:74 { …}
!! ./vendor/symfony/console/Application.php:140 { …}
!! ./bin/console:42 {
!! › $application = new Application($kernel);
!! › $application->run($input);
!! ›
!! arguments: {
!! $input: Symfony\Component\Console\Input\ArgvInput {#5 …}
!! }
!! }
!! }
!! }
!! 2020-05-21T14:05:22+00:00 [critical] Uncaught Error: Call to undefined method Composer\CaBundle\CaBundle::getName()
!!
Script @auto-scripts was called via post-update-cmd
Installation failed, reverting ./composer.json to its original content.
It's an issue with flex (cf https://github.com/symfony/flex/issues/622)
Two solutions for now:
add nunomaduro/phpinsights manually in your composer.json, launch composer update and manually remove Composer\CaBundle\CaBundle::class => ['dev' => true, 'test' => true] in config/bundles.php
or fix to a lower flex version: composer require symfony/flex:1.6.2
@Jibbarth Thanks! It works! (and again a flex issue..)