Composer update not updating bundled plugins?

Hi,

I already said this once after the RC came out, but got no reaction, so I suppose I'm not understanding the proces properly.

I used to just run 'composer update egg/elgg' from terminal to get an update.
I'm running 2.1 on a dev server and wanted to go to 2.2, but when I run the upgrade in composer it updates Elgg as usual, but it seems the bundled plugins aren't updated, only core. Is this true? And what should I do to get the other updates as well?

I never had problems before. 
After going to 2.2 I got a: : Call to undefined function Elgg\Likes\_elgg_retrieve_cached_entity() in /mypath/public_html/mod/likes/classes/Elgg/Likes/Preloader.php

Which seems correct since on my server, there is a functioncall on that line in the likes plugin on 155 using: _elgg_retrieve_cached_entity()
Where on the github latest version it's been replaced by _elgg_services()->entityCache-get($guid)

So it seems to me the likes plugin (and maybe others) are not updated with the rest.

Am I doing it wrong or is this expected behavior?

  • I don't think that you can upgrade Elgg with the core plugins not updated automatically.

    What happens if you do

    composer update

    (in the root folder of your installation), i.e. without the "Elgg/Elgg"?

    The composer update also does only update the files. You still need to run the upgrade of Elgg itself in the admin section of your site (or calling yoursite.url/upgrade.php in the browser). This will run the upgrade scripts of Elgg including updating the database and also flushes the cache.

  • Nope, doesn't work as well. My Elgg installation goes to 2.2 without a problem, but for some reason I still have the old likes plugin in my installation (and that gives me an error). 
    I know about running the upgrade script.

  • Are you trying to update an installation that has been set up with composer originally or have you installed it with the zip archive originally?

    The difference is that the bundled plugins are also "physically" in the mod directory when installed by zip file whereas there are symbolic links created for the bundled plugins located in vendor/elgg/elgg/mod when installing with composer.

    When you do a composer update the bundled plugins in the mod folder in the root directory of your installation are not modified because there would be no need to do so being only links for the bundled plugins there. And the content of vendor/elgg/elgg is updated to the new version of Elgg resulting the symbolic links pointing also to the new versions of the bundled plugins.

    I don't know if you can switch from a zip installation to a composer installation for a running site. Quite likely it's possible. The first step would then by possibly to delete the bundled plugins's folder in the mod directory and then doing a

    composer install

    which might create the symbolic links then. A following

    composer upgrade

    would make sure that the latest version of Elgg is installed.

    But I can't say for sure if this works as I've never tried such a switch myself.

  • That was it!
    Thanks a lot iionly. Wasn't aware of the symlinks.
    I removed the bundled plugins from the mod directory, updated to 2.2 and the symlinks were there. 

    So if anyone is wondering if they can change from a zip install to a composer install. Yep, that's possible.

    Thanks again.