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
[4.2] Extension installer script enhancements #37091
Conversation
Co-authored-by: Brian Teeman <brian@teeman.net>
Co-authored-by: Brian Teeman <brian@teeman.net>
Co-authored-by: Brian Teeman <brian@teeman.net>
Thanks @brianteeman |
Co-authored-by: Brian Teeman <brian@teeman.net>
sorry drone errors are my fault |
@regularlabs can you test that pr also? |
I'll try to do that this week... How does this PR align with the TUF they are currently working on at the hackathon? |
Don't know what a TUF is 🤷♂️ |
"The Update Framework" |
TUF would kick in even before the extension package is extracted, so it’s unrelated to the extension installer script. |
I have tested this item ✅ successfully on 3e26ed8 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37091. |
1 similar comment
I have tested this item ✅ successfully on 3e26ed8 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37091. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37091. |
@laoneo Could you please update with the base branch? Thank you. |
Thank you everybody |
It's no longer possible to install any extension after this PR using the legacy script currently working on 4.1 |
It seems that there is a serious b/c break here. I've found that all functions of the legacy installer script must have an explicit 'return true' otherwise this error is the result. |
I can confirm this: fresh installed Joomla 4.2, no able to install extensions |
I'm on it, will come up with a pr soon. |
Can you guys test #37374? |
My best guess is that would affect core updates, not extension updates. Of course I’ve already talked about that in *checks notes* ah right 2017. Why does it take Joomla 5 years to act on something basic is beyond me but then again it’s Joomla so I’m not even surprised.
Anyway, can you check this PR Peter so maybe just maybe we can improve on the crappy, outdates extensions upgrade code since the JED doesn’t actually allow us to use our own update frameworks?
|
I have changed the way my installer works (now using more of Joomla's own manifest capability). So that could hopefully also deal with some issues the new installer ran into. |
I have no issues installing my packages on the current nightly build: 4.2.4-dev |
Summary of Changes
This pr adds an interface for the installer script to have a common way for installer actions for extensions. Additionally the extension can use the container for to get dependencies during install operation.
With this new approach the extension developer doesn't have to create a class with a special class name like
mod_installer_legacyInstallerScript
anymore and has more freedom and flexibility during the install routine. Using the old way is getting deprecated. It is one step further to use injected dependencies.Examples can be found here:
A script can look like:
Or return directly an instance of the installer script interface:
The legacy way is still supported for backwards compatibility.
Testing Instructions
Actual result BEFORE applying this Pull Request
Expected result AFTER applying this Pull Request
Documentation Changes Required
Needs to be documented in the docs.