-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[5.4] Implement autoupdate plugin events #45696
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
Merged
richard67
merged 19 commits into
joomla:5.4-dev
from
SniperSister:54-autoupdate-plugin-hook
Aug 25, 2025
Merged
Changes from 4 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
f0c47a0
Implement plugin event
SniperSister 7e2d0bd
move app call
SniperSister 65ba63c
add line break
SniperSister 78f8637
update argument and method name
SniperSister 880d001
Update administrator/language/en-GB/com_joomlaupdate.ini
SniperSister b4db17b
Update administrator/language/en-GB/com_joomlaupdate.ini
SniperSister 11f86f8
adjust exception type
SniperSister 6ad83ae
Merge branch '54-autoupdate-plugin-hook' of https://github.com/Sniper…
SniperSister bed87e0
Merge branch '5.4-dev' into 54-autoupdate-plugin-hook
richard67 116e432
Merge branch '5.4-dev' into 54-autoupdate-plugin-hook
richard67 233164f
fix stan issue
SniperSister aaa698a
Merge branch '5.4-dev' into 54-autoupdate-plugin-hook
muhme be5d2c9
Write reason to log file
SniperSister 34d46d7
Merge branch '5.4-dev' into 54-autoupdate-plugin-hook
muhme 045b87b
Merge branch '5.4-dev' into 54-autoupdate-plugin-hook
richard67 8478861
fix version number in error notitications
SniperSister 5a6662f
cs fix
SniperSister 63998ca
Merge branch '5.4-dev' into 54-autoupdate-plugin-hook
muhme 012d44f
Merge branch '5.4-dev' into 54-autoupdate-plugin-hook
muhme File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
libraries/src/Event/Extension/BeforeJoomlaAutoupdateEvent.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| <?php | ||
|
|
||
| /** | ||
| * Joomla! Content Management System | ||
| * | ||
| * @copyright (C) 2025 Open Source Matters, Inc. <https://www.joomla.org> | ||
| * @license GNU General Public License version 2 or later; see LICENSE.txt | ||
| */ | ||
|
|
||
| namespace Joomla\CMS\Event\Extension; | ||
|
|
||
| // phpcs:disable PSR1.Files.SideEffects | ||
| \defined('_JEXEC') or die; | ||
| // phpcs:enable PSR1.Files.SideEffects | ||
|
|
||
| /** | ||
| * Class for Joomla Auto Update events | ||
| * | ||
| * @since __DEPLOY_VERSION__ | ||
| */ | ||
| class BeforeJoomlaAutoupdateEvent extends AbstractJoomlaUpdateEvent | ||
| { | ||
| /** | ||
| * Constructor. | ||
| * | ||
| * @param string $name The event name. | ||
| * @param array $arguments The event arguments. | ||
| * | ||
| * @throws \BadMethodCallException | ||
| * | ||
| * @since __DEPLOY_VERSION__ | ||
| */ | ||
| public function __construct($name, array $arguments = []) | ||
| { | ||
| $arguments['stoppedUpdate'] = false; | ||
|
|
||
| parent::__construct($name, $arguments); | ||
| } | ||
|
|
||
| /** | ||
| * Set stop parameter to true | ||
| * | ||
| * @return void | ||
| * | ||
| * @since __DEPLOY_VERSION__ | ||
| */ | ||
| public function stopUpdate() | ||
| { | ||
| $this->arguments['stoppedUpdate'] = true; | ||
| $this->stopPropagation(); | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.