Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the new composer installed.json format #13

Closed
sixcare opened this issue Jan 27, 2021 · 0 comments
Closed

Add support for the new composer installed.json format #13

sixcare opened this issue Jan 27, 2021 · 0 comments

Comments

@sixcare
Copy link
Contributor

sixcare commented Jan 27, 2021

Composer has release version 2.0 and with it follows a new format for installed.json.

vendor/composer/installed.json format changed:

packages are now wrapped into a "packages" top level key instead of the whole file being the package array
packages now contain an "installed-path" key which lists where they were installed
there is a top level "dev" key which stores whether dev requirements were installed or not

This new format breaks project kernel:

PHP Warning:  Uncaught TypeError: Argument 4 passed to Aura\Project_Kernel\Project::__construct() must be of the type array, object given, called in /var/www/test/vendor/aura/project-kernel/src/Factory.php on line 122 and defined in /var/www/test/vendor/aura/project-kernel/src/Project.php:79
Stack trace:
#0 /var/www/test/vendor/aura/project-kernel/src/Factory.php(122): Aura\Project_Kernel\Project->__construct()
#1 /var/www/test/vendor/aura/project-kernel/src/Factory.php(82): Aura\Project_Kernel\Factory->newProject()
#2 /var/www/test/vendor/aura/project-kernel/src/Factory.php(48): Aura\Project_Kernel\Factory->newContainer()
#3 /var/www/test/web/index.php(15): Aura\Project_Kernel\Factory->newKernel()
#4 php shell code(1): include('/var/www/test...')
#5 {main}
  thrown in /var/www/test/vendor/aura/project-kernel/src/Project.php on line 79

https://github.com/auraphp/Aura.Project_Kernel/blob/2.x/src/Project.php#L79

Composer version 2.0.8 2020-12-03 17:20:38

Steps To Reproduce

Update composer via: composer selfupdate --snapshot
Run composer update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants