Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F584988
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
10 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/autoload.php b/autoload.php
index 3109ec44d5e..22b630f6a03 100644
--- a/autoload.php
+++ b/autoload.php
@@ -1292,8 +1292,6 @@ $wgAutoloadLocalClasses = [
'MediaWiki\\DomainEvent\\DomainEventSource' => __DIR__ . '/includes/DomainEvent/DomainEventSource.php',
'MediaWiki\\DomainEvent\\DomainEventSubscriber' => __DIR__ . '/includes/DomainEvent/DomainEventSubscriber.php',
'MediaWiki\\DomainEvent\\EventDispatchEngine' => __DIR__ . '/includes/DomainEvent/EventDispatchEngine.php',
- 'MediaWiki\\DomainEvent\\EventIngressBase' => __DIR__ . '/includes/DomainEvent/DomainEventIngress.php',
- 'MediaWiki\\DomainEvent\\EventSubscriberBase' => __DIR__ . '/includes/DomainEvent/DomainEventIngress.php',
'MediaWiki\\DomainEvent\\InitializableDomainEventSubscriber' => __DIR__ . '/includes/DomainEvent/InitializableDomainEventSubscriber.php',
'MediaWiki\\EditPage\\Constraint\\AccidentalRecreationConstraint' => __DIR__ . '/includes/editpage/Constraint/AccidentalRecreationConstraint.php',
'MediaWiki\\EditPage\\Constraint\\AuthorizationConstraint' => __DIR__ . '/includes/editpage/Constraint/AuthorizationConstraint.php',
@@ -2107,7 +2105,6 @@ $wgAutoloadLocalClasses = [
'MediaWiki\\Page\\Event\\PageRevisionUpdatedListener' => __DIR__ . '/includes/page/Event/PageRevisionUpdatedListener.php',
'MediaWiki\\Page\\Event\\PageStateEvent' => __DIR__ . '/includes/page/Event/PageStateEvent.php',
'MediaWiki\\Page\\Event\\PageStateListener' => __DIR__ . '/includes/page/Event/PageStateListener.php',
- 'MediaWiki\\Page\\Event\\PageUpdatedEvent' => __DIR__ . '/includes/page/Event/PageRevisionUpdatedEvent.php',
'MediaWiki\\Page\\ExistingPageRecord' => __DIR__ . '/includes/page/ExistingPageRecord.php',
'MediaWiki\\Page\\File\\BadFileLookup' => __DIR__ . '/includes/page/File/BadFileLookup.php',
'MediaWiki\\Page\\File\\FileDeleteForm' => __DIR__ . '/includes/page/File/FileDeleteForm.php',
@@ -2886,7 +2883,6 @@ $wgAutoloadLocalClasses = [
'MediaWiki\\Storage\\PageUpdateCauses' => __DIR__ . '/includes/Storage/PageUpdateCauses.php',
'MediaWiki\\Storage\\PageUpdateException' => __DIR__ . '/includes/Storage/PageUpdateException.php',
'MediaWiki\\Storage\\PageUpdateStatus' => __DIR__ . '/includes/Storage/PageUpdateStatus.php',
- 'MediaWiki\\Storage\\PageUpdatedEvent' => __DIR__ . '/includes/page/Event/PageRevisionUpdatedEvent.php',
'MediaWiki\\Storage\\PageUpdater' => __DIR__ . '/includes/Storage/PageUpdater.php',
'MediaWiki\\Storage\\PageUpdaterFactory' => __DIR__ . '/includes/Storage/PageUpdaterFactory.php',
'MediaWiki\\Storage\\PreparedUpdate' => __DIR__ . '/includes/Storage/PreparedUpdate.php',
diff --git a/includes/DomainEvent/DomainEventIngress.php b/includes/DomainEvent/DomainEventIngress.php
index a938bfa9753..e967a136563 100644
--- a/includes/DomainEvent/DomainEventIngress.php
+++ b/includes/DomainEvent/DomainEventIngress.php
@@ -17,7 +17,7 @@ use LogicException;
* registered with and initialized by a DomainEventSource. Registration is
* typically done in the form of an object spec for lazy instantiation. For
* extensions' ingress objects that object spec can be provided in the
- * DomainEventSubscribers section of extension.json.
+ * DomainEventIngresses section of extension.json.
*
* After instantiating a subscriber (typically a subclass of DomainEventIngress),
* the event source will call initSubscriber() to initialize the subscriber and
@@ -167,8 +167,3 @@ abstract class DomainEventIngress implements InitializableDomainEventSubscriber
}
}
-
-/** @deprecated temporary alias, remove before 1.44 release (T389033) */
-class_alias( DomainEventIngress::class, 'MediaWiki\DomainEvent\EventSubscriberBase' );
-/** @deprecated temporary alias, remove before 1.44 release (T389033) */
-class_alias( DomainEventIngress::class, 'MediaWiki\DomainEvent\EventIngressBase' );
diff --git a/includes/Storage/DerivedPageDataUpdater.php b/includes/Storage/DerivedPageDataUpdater.php
index 83d68b30966..a2d3f980c50 100644
--- a/includes/Storage/DerivedPageDataUpdater.php
+++ b/includes/Storage/DerivedPageDataUpdater.php
@@ -230,7 +230,7 @@ class DerivedPageDataUpdater implements LoggerAwareInterface, PreparedUpdate {
private $renderedRevision = null;
/** @var ?PageRevisionUpdatedEvent */
- private $pageUpdatedEvent = null;
+ private $pageRevisionUpdatedEvent = null;
/**
* @var RevisionRenderer
@@ -1537,8 +1537,8 @@ class DerivedPageDataUpdater implements LoggerAwareInterface, PreparedUpdate {
* With a 10% chance, triggers pruning the recent changes table.
*
* Further updates may be triggered by core components and extensions
- * that listen to the PageRevisionUpdated event. Search for method names starting
- * with "handlePageUpdatedEvent" to find listeners.
+ * that listen to the PageRevisionUpdated event. Search for method names
+ * starting with "handlePageRevisionUpdatedEvent" to find listeners.
*
* @note prepareUpdate() must be called before calling this method!
*
@@ -1670,8 +1670,8 @@ class DerivedPageDataUpdater implements LoggerAwareInterface, PreparedUpdate {
}
private function getPageRevisionUpdatedEvent(): PageRevisionUpdatedEvent {
- if ( $this->pageUpdatedEvent ) {
- return $this->pageUpdatedEvent;
+ if ( $this->pageRevisionUpdatedEvent ) {
+ return $this->pageRevisionUpdatedEvent;
}
$this->assertHasRevision( __METHOD__ );
@@ -1721,7 +1721,7 @@ class DerivedPageDataUpdater implements LoggerAwareInterface, PreparedUpdate {
$performer = $this->options['triggeringUser'] ?? $this->user;
'@phan-var UserIdentity $performer';
- $this->pageUpdatedEvent = new PageRevisionUpdatedEvent(
+ $this->pageRevisionUpdatedEvent = new PageRevisionUpdatedEvent(
$this->options['cause'] ?? PageUpdateCauses::CAUSE_EDIT,
$pageRecordBefore,
$pageRecordAfter,
@@ -1735,7 +1735,7 @@ class DerivedPageDataUpdater implements LoggerAwareInterface, PreparedUpdate {
$this->options['rcPatrolStatus'] ?? 0,
);
- return $this->pageUpdatedEvent;
+ return $this->pageRevisionUpdatedEvent;
}
private function triggerParserCacheUpdate() {
diff --git a/includes/page/Event/PageRevisionUpdatedEvent.php b/includes/page/Event/PageRevisionUpdatedEvent.php
index 7d8cab6ec4f..ef1c2c35272 100644
--- a/includes/page/Event/PageRevisionUpdatedEvent.php
+++ b/includes/page/Event/PageRevisionUpdatedEvent.php
@@ -327,20 +327,6 @@ class PageRevisionUpdatedEvent extends PageStateEvent implements PageUpdateCause
return $this->latestRevisionAfter;
}
- /**
- * @deprecated since 1.44
- */
- public function getOldRevision(): ?RevisionRecord {
- return $this->getLatestRevisionBefore();
- }
-
- /**
- * @deprecated since 1.44
- */
- public function getNewRevision(): RevisionRecord {
- return $this->getLatestRevisionAfter();
- }
-
/**
* Returns the page update's initial patrol status.
* @see PageUpdater::setRcPatrolStatus()
@@ -386,9 +372,3 @@ class PageRevisionUpdatedEvent extends PageStateEvent implements PageUpdateCause
}
}
-
-/** @deprecated temporary alias, remove before 1.44 release */
-class_alias( PageRevisionUpdatedEvent::class, 'MediaWiki\Storage\PageUpdatedEvent' );
-
-/** @deprecated temporary alias, remove before 1.44 release */
-class_alias( PageRevisionUpdatedEvent::class, 'MediaWiki\Page\Event\PageUpdatedEvent' );
diff --git a/includes/registration/ExtensionProcessor.php b/includes/registration/ExtensionProcessor.php
index 70023a82e87..9f26083431f 100644
--- a/includes/registration/ExtensionProcessor.php
+++ b/includes/registration/ExtensionProcessor.php
@@ -151,7 +151,6 @@ class ExtensionProcessor implements Processor {
'TranslationAliasesDirs',
'ForeignResourcesDir',
'Hooks',
- 'DomainEventSubscribers', // Deprecated (T389033)
'DomainEventIngresses',
'MessagePosterModule',
'MessagesDirs',
@@ -588,12 +587,6 @@ class ExtensionProcessor implements Processor {
$subscriber['extensionPath'] = $path;
$this->attributes['DomainEventIngresses'][] = $subscriber;
}
-
- // Deprecated (T389033)
- foreach ( $info['DomainEventSubscribers'] ?? [] as $subscriber ) {
- $subscriber['extensionPath'] = $path;
- $this->attributes['DomainEventIngresses'][] = $subscriber;
- }
}
/**
diff --git a/tests/phpunit/includes/Storage/DerivedPageDataUpdaterTest.php b/tests/phpunit/includes/Storage/DerivedPageDataUpdaterTest.php
index 4ed90c11947..4ddd3d7f3a5 100644
--- a/tests/phpunit/includes/Storage/DerivedPageDataUpdaterTest.php
+++ b/tests/phpunit/includes/Storage/DerivedPageDataUpdaterTest.php
@@ -1291,7 +1291,7 @@ class DerivedPageDataUpdaterTest extends MediaWikiIntegrationTestCase {
/**
* @covers \MediaWiki\Storage\DerivedPageDataUpdater::emitEvents()
*/
- public function testDispatchPageUpdatedEvent() {
+ public function testDispatchPageRevisionUpdatedEvent() {
$page = $this->getPage( __METHOD__ );
$content = [ SlotRecord::MAIN => new WikitextContent( 'first [[main]]' ) ];
$rev = $this->createRevision( $page, 'first', $content );
diff --git a/tests/phpunit/structure/EventSubscriptionTest.php b/tests/phpunit/structure/EventSubscriptionTest.php
index dbd6799b7ce..ee99cc4fc88 100644
--- a/tests/phpunit/structure/EventSubscriptionTest.php
+++ b/tests/phpunit/structure/EventSubscriptionTest.php
@@ -46,9 +46,9 @@ class EventSubscriptionTest extends MediaWikiIntegrationTestCase {
return $dispatcher;
}
- public static function provideEventSubscriberSpecs() {
+ public static function provideEventIngressesSpecs() {
$subscriberSpecs = ExtensionRegistry::getInstance()
- ->getAttribute( 'DomainEventSubscribers' );
+ ->getAttribute( 'DomainEventIngresses' );
foreach ( $subscriberSpecs as $spec ) {
yield [ $spec ];
@@ -58,7 +58,7 @@ class EventSubscriptionTest extends MediaWikiIntegrationTestCase {
/**
* This checks that domain event subscribers actually subscriber for the
* events that they declare in the extension registration.
- * @dataProvider provideEventSubscriberSpecs
+ * @dataProvider provideEventIngressesSpecs
*/
public function testPassesValidation( $spec ) {
$this->assertArrayHasKey( 'events', $spec );
diff --git a/tests/phpunit/unit/includes/registration/ExtensionProcessorTest.php b/tests/phpunit/unit/includes/registration/ExtensionProcessorTest.php
index a85e07a7ed0..71a136e53da 100644
--- a/tests/phpunit/unit/includes/registration/ExtensionProcessorTest.php
+++ b/tests/phpunit/unit/includes/registration/ExtensionProcessorTest.php
@@ -627,31 +627,6 @@ class ExtensionProcessorTest extends MediaWikiUnitTestCase {
]
]
],
- 'DomainEventSubscriber (deprecated, T389033)' => [
- [
- 'DomainEventIngresses' => [
- [ 'events' => [ 'FooDone' ], 'factory' => 'PriorCallback' ]
- ]
- ],
- [
- 'DomainEventSubscribers' => [
- [
- 'events' => [ 'FooDone', 'BarDone', ],
- 'class' => 'FooClass',
- 'services' => [],
- ],
- ]
- ] + self::$default,
- [
- [ 'events' => [ 'FooDone' ], 'factory' => 'PriorCallback' ],
- [
- 'events' => [ 'FooDone', 'BarDone', ],
- 'class' => 'FooClass',
- 'services' => [],
- 'extensionPath' => $this->getExtensionPath()
- ]
- ]
- ],
];
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Jul 5, 5:31 AM (11 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
227451
Default Alt Text
(10 KB)
Attached To
Mode
rMW mediawiki
Attached
Detach File
Event Timeline
Log In to Comment