Closed paulbalandan closed 3 years ago
The issue is running composer update
first. When you run selfupdate
it basically "snapshots" the vendor folder and then handles the Composer update itself, comparing the results afterwards. Running your exact workflow above without that command should give the desired result.
But if I will leave out composer update
I cannot run php spark
as the path is still on framework
Ah I understand the issue now. You would need to load the current version manually. This could be done by forcing the latest version (composer require codeigniter4/codeigniter4@v4.0.4
), then removing the version limitation and running selfupdate
. I don't think there is an easy way to handle this in the module in its current state. Maybe introducing a separate snapshot command? or an additional parameter to compare against? spark selfupdate --compare "v4.0.4"
Ok. I suppose this is a missing feature as of the moment. 🤔 Your temporary fix is sensible enough for me. I'll try that. Looking forward for this lib's development. Thanks.
Thanks! I will leave this as a reminder to look into the targeted version option. I actually would use that myself, especially in projects when I forget to use selfupdate
and have to mess with rolling things back via Composer. :)
Version 2 accomplishes this, but in a very different way. See the -c <current version>
flag for forcing a previous version.
I see this library to be useful in my project and tried it today. Having hiccups on getting the latest updates on other directories, though. I tried to confirm this with both my installer and Composer's native
create-project
and both failed in updating.Consider this installation process:
Since we have already used
composer update
to update the framework,selfupdate
will return that nothing to install or update. But, I want to automatically get also the updated files inapp
in thedevelop
version (Config\Encryption
,cli/error_exception.php
) and the updatedenv
file. But these weren't updated.I haven't seen the internals of this library but I think the checking of the files happen when there were installed? Not sure though.
Environment PHP 7.4.8 Win10