Skip to content

Commit 18fcf37

Browse files
authored
[5.4] Plugin and events: extend deprecation to 7 (joomla#45818)
* Extend deprecation for events to 7 and updated phpstan
1 parent 4db0b99 commit 18fcf37

File tree

108 files changed

+378
-378
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+378
-378
lines changed

libraries/src/Application/EventAware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function registerEvent($event, callable $handler)
8484
* @since 4.0.0
8585
* @throws \InvalidArgumentException
8686
*
87-
* @deprecated 4.0 will be removed in 6.0
87+
* @deprecated 4.0 will be removed in 7.0
8888
* Use the Dispatcher method instead
8989
* Example: Factory::getApplication()->getDispatcher()->dispatch($eventName, $event);
9090
*

libraries/src/Application/EventAwareInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* Interface defining application that can trigger Joomla 3.x style events
2222
*
2323
* @since 4.0.0
24-
* @deprecated 4.3 will be removed in 6.0
24+
* @deprecated 4.3 will be removed in 7.0
2525
* This interface will be removed without replacement as the Joomla 3.x compatibility layer will be removed
2626
* @todo Move to compat plugin
2727
*/
@@ -54,7 +54,7 @@ public function getDispatcher();
5454
* @since 4.0.0
5555
* @throws \InvalidArgumentException
5656
*
57-
* @deprecated 4.0 will be removed in 6.0
57+
* @deprecated 4.0 will be removed in 7.0
5858
* Use the Dispatcher method instead
5959
* Example: Factory::getApplication()->getDispatcher()->dispatch($eventName, $event);
6060
*/

libraries/src/Document/Renderer/Html/ModulesRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function render($position, $params = [], $content = null)
6060

6161
// Dispatch onAfterRenderModules event
6262
$event = new Module\AfterRenderModulesEvent('onAfterRenderModules', [
63-
'content' => &$buffer, // @todo: Remove reference in Joomla 6, see AfterRenderModulesEvent::__constructor()
63+
'content' => &$buffer, // @todo: Remove reference in Joomla 7, see AfterRenderModulesEvent::__constructor()
6464
'attributes' => $params,
6565
]);
6666
$app->getDispatcher()->dispatch('onAfterRenderModules', $event);

libraries/src/Event/AbstractEvent.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public function getArgument($name, $default = null)
145145

146146
@trigger_error(
147147
\sprintf(
148-
'Numeric access to named event arguments is deprecated, and will not work in Joomla 6. Event %s argument %s',
148+
'Numeric access to named event arguments is deprecated, and will not work in Joomla 7. Event %s argument %s',
149149
\get_class($this),
150150
$name
151151
),
@@ -167,7 +167,7 @@ public function getArgument($name, $default = null)
167167
if (method_exists($this, $methodName2)) {
168168
@trigger_error(
169169
\sprintf(
170-
'Use method "%s" for value pre-processing is deprecated, and will not work in Joomla 6. Use "%s" instead. Event %s',
170+
'Use method "%s" for value pre-processing is deprecated, and will not work in Joomla 7. Use "%s" instead. Event %s',
171171
$methodName2,
172172
$methodName1,
173173
\get_class($this)
@@ -210,7 +210,7 @@ public function setArgument($name, $value)
210210

211211
@trigger_error(
212212
\sprintf(
213-
'Numeric access to named event arguments is deprecated, and will not work in Joomla 6. Event %s argument %s',
213+
'Numeric access to named event arguments is deprecated, and will not work in Joomla 7. Event %s argument %s',
214214
\get_class($this),
215215
$name
216216
),
@@ -228,7 +228,7 @@ public function setArgument($name, $value)
228228
} elseif (method_exists($this, $methodName2)) {
229229
@trigger_error(
230230
\sprintf(
231-
'Use method "%s" for value pre-processing is deprecated, and will not work in Joomla 6. Use "%s" instead. Event %s',
231+
'Use method "%s" for value pre-processing is deprecated, and will not work in Joomla 7. Use "%s" instead. Event %s',
232232
$methodName2,
233233
$methodName1,
234234
\get_class($this)

libraries/src/Event/AbstractImmutableEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function offsetSet($name, $value)
6969
parent::offsetSet($name, $value);
7070

7171
@trigger_error(
72-
'Setting a result in an immutable event is deprecated, and will not work in Joomla 6. Event ' . $this->getName(),
72+
'Setting a result in an immutable event is deprecated, and will not work in Joomla 7. Event ' . $this->getName(),
7373
E_USER_DEPRECATED
7474
);
7575

libraries/src/Event/Cache/AfterPurgeEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class AfterPurgeEvent extends AbstractImmutableEvent
3131
* @var array
3232
*
3333
* @since 5.0.0
34-
* @deprecated 5.0 will be removed in 6.0
34+
* @deprecated 5.0 will be removed in 7.0
3535
*/
3636
protected $legacyArgumentsOrder = ['subject'];
3737

libraries/src/Event/Checkin/AfterCheckinEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class AfterCheckinEvent extends AbstractImmutableEvent
3131
* @var array
3232
*
3333
* @since 5.0.0
34-
* @deprecated 5.0 will be removed in 6.0
34+
* @deprecated 5.0 will be removed in 7.0
3535
*/
3636
protected $legacyArgumentsOrder = ['subject'];
3737

libraries/src/Event/Contact/SubmitContactEvent.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class SubmitContactEvent extends AbstractImmutableEvent
3131
* @var array
3232
*
3333
* @since 5.0.0
34-
* @deprecated 5.0 will be removed in 6.0
34+
* @deprecated 5.0 will be removed in 7.0
3535
*/
3636
protected $legacyArgumentsOrder = ['subject', 'data'];
3737

@@ -63,8 +63,8 @@ public function __construct($name, array $arguments = [])
6363
}
6464

6565
// For backward compatibility make sure the content is referenced
66-
// @todo: Remove in Joomla 6
67-
// @deprecated: Passing argument by reference is deprecated, and will not work in Joomla 6
66+
// @todo: Remove in Joomla 7
67+
// @deprecated: Passing argument by reference is deprecated, and will not work in Joomla 7
6868
if (key($arguments) === 0) {
6969
$this->arguments['data'] = &$arguments[1];
7070
} elseif (\array_key_exists('data', $arguments)) {

libraries/src/Event/Contact/ValidateContactEvent.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ValidateContactEvent extends AbstractImmutableEvent implements ResultAware
3636
* @var array
3737
*
3838
* @since 5.0.0
39-
* @deprecated 5.0 will be removed in 6.0
39+
* @deprecated 5.0 will be removed in 7.0
4040
*/
4141
protected $legacyArgumentsOrder = ['subject', 'data'];
4242

@@ -68,8 +68,8 @@ public function __construct($name, array $arguments = [])
6868
}
6969

7070
// For backward compatibility make sure the content is referenced
71-
// @todo: Remove in Joomla 6
72-
// @deprecated: Passing argument by reference is deprecated, and will not work in Joomla 6
71+
// @todo: Remove in Joomla 7
72+
// @deprecated: Passing argument by reference is deprecated, and will not work in Joomla 7
7373
if (key($arguments) === 0) {
7474
$this->arguments['data'] = &$arguments[1];
7575
} elseif (\array_key_exists('data', $arguments)) {

libraries/src/Event/Content/ContentEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ abstract class ContentEvent extends AbstractImmutableEvent
3131
* @var array
3232
*
3333
* @since 5.0.0
34-
* @deprecated 5.0 will be removed in 6.0
34+
* @deprecated 5.0 will be removed in 7.0
3535
*/
3636
protected $legacyArgumentsOrder = [];
3737

0 commit comments

Comments
 (0)