Hello. I am trying to upgrade an Elgg 2.2.2 installation by using composer (which previously was upgraded using zip files). But I the following error message:
-sh-4.2$ composer update --ignore-platform-reqs
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 19 updates, 0 removals
- Removing symfony/yaml (v3.1.4)
- Installing symfony/yaml (v3.2.0)
Downloading: 100%
Script \Elgg\Composer\PostUpdate::execute handling the post-package-update event terminated with an exception
[ReflectionException]
Class Elgg\Composer\Event does not exist
I searched around but didn't find any solution. Any idea why this error is caused?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Juho Jaakkola@juho.jaakkola
Juho Jaakkola - 0 likes
- nikos@nlyberakis
nikos - 0 likes
You must log in to post replies.The 'Elgg\Composer\Event' class has been replaced by 'Elgg\Composer\PackageEvent': https://github.com/Elgg/Elgg/commit/be4235a0a75d6bbb8f95f823dd5eff52ed27c2d6
The problem is that the post update hook is trying to use a version of a Elgg core that hasn't been installed yet.
I'm not sure what would be the correct fix for this, but a workaround is to remove vendor directory completely, as this forces composer to re-install everything.
Thanks Juho, it worked by removing the vendor directory