@@ -179,7 +179,7 @@ public function testCollectReasonsFor(
179179 array $ expectedExtensions ,
180180 ): void
181181 {
182- $ reasons = ExtensionRegistry ::collectReasonsFor ($ loadedExtensions , $ iniSettings , $ turboExtensionPath , $ allowXdebug );
182+ $ reasons = RestartExtensionRegistry ::collectReasonsFor ($ loadedExtensions , $ iniSettings , $ turboExtensionPath , $ allowXdebug );
183183
184184 $ this ->assertSame (
185185 $ expectedExtensions ,
@@ -191,7 +191,7 @@ public function testXdebugIsFlaggedRatherThanStripped(): void
191191 {
192192 // stripping would take xdebug_*() out of reflection and so change what
193193 // PHPStan knows about code calling them; the flag measures the same
194- $ reasons = ExtensionRegistry ::collectReasonsFor (['xdebug ' ], ['xdebug.mode ' => 'debug ' ], null , false );
194+ $ reasons = RestartExtensionRegistry ::collectReasonsFor (['xdebug ' ], ['xdebug.mode ' => 'debug ' ], null , false );
195195
196196 $ this ->assertCount (1 , $ reasons );
197197 $ this ->assertSame ([], $ reasons [0 ]->getStrippedExtensions ());
@@ -203,7 +203,7 @@ public function testXdebugIsFlaggedRatherThanStripped(): void
203203
204204 public function testPcovIsFlaggedRatherThanStripped (): void
205205 {
206- $ reasons = ExtensionRegistry ::collectReasonsFor (['pcov ' ], ['pcov.enabled ' => '1 ' ], null , false );
206+ $ reasons = RestartExtensionRegistry ::collectReasonsFor (['pcov ' ], ['pcov.enabled ' => '1 ' ], null , false );
207207
208208 $ this ->assertCount (1 , $ reasons );
209209 $ this ->assertSame ([], $ reasons [0 ]->getStrippedExtensions ());
@@ -214,7 +214,7 @@ public function testPcovIsFlaggedRatherThanStripped(): void
214214
215215 public function testTidewaysIsStrippedRatherThanFlagged (): void
216216 {
217- $ reasons = ExtensionRegistry ::collectReasonsFor (['tideways ' , 'phpstan_turbo ' ], [], null , false );
217+ $ reasons = RestartExtensionRegistry ::collectReasonsFor (['tideways ' , 'phpstan_turbo ' ], [], null , false );
218218
219219 $ this ->assertCount (1 , $ reasons );
220220 $ this ->assertSame (['tideways ' ], $ reasons [0 ]->getStrippedExtensions ());
@@ -225,7 +225,7 @@ public function testTidewaysIsStrippedRatherThanFlagged(): void
225225
226226 public function testTurboIsAppendedToTheCommandLineTogetherWithItsMarker (): void
227227 {
228- $ reasons = ExtensionRegistry ::collectReasonsFor ([], [], self ::TURBO_BINARY , false );
228+ $ reasons = RestartExtensionRegistry ::collectReasonsFor ([], [], self ::TURBO_BINARY , false );
229229
230230 $ this ->assertCount (1 , $ reasons );
231231 $ this ->assertSame ([], $ reasons [0 ]->getStrippedExtensions ());
@@ -241,7 +241,7 @@ public function testTurboIsAppendedToTheCommandLineTogetherWithItsMarker(): void
241241 public function testOpcacheIsActivatedWhenDormant (): void
242242 {
243243 $ entries = ['opcache.enable_cli=1 ' , 'opcache.jit=disable ' , 'opcache.file_cache= ' ];
244- $ reasons = ExtensionRegistry ::collectReasonsFor ([], [], null , false , $ entries , [
244+ $ reasons = RestartExtensionRegistry ::collectReasonsFor ([], [], null , false , $ entries , [
245245 'opcache.enable_cli ' => '' ,
246246 'opcache.jit ' => 'disable ' ,
247247 'opcache.file_cache ' => '' ,
@@ -260,24 +260,24 @@ public function testOpcacheAlreadyConfiguredIsNotAReason(): void
260260 {
261261 $ entries = ['opcache.enable_cli=1 ' , 'opcache.jit=disable ' ];
262262
263- $ this ->assertSame ([], ExtensionRegistry ::collectReasonsFor ([], [], null , false , $ entries , [
263+ $ this ->assertSame ([], RestartExtensionRegistry ::collectReasonsFor ([], [], null , false , $ entries , [
264264 'opcache.enable_cli ' => '1 ' ,
265265 'opcache.jit ' => 'disable ' ,
266266 ]));
267267 // no entries means OPcache is to be left alone - not loaded, preloading, or not fork-capable
268- $ this ->assertSame ([], ExtensionRegistry ::collectReasonsFor ([], [], null , false , [], []));
268+ $ this ->assertSame ([], RestartExtensionRegistry ::collectReasonsFor ([], [], null , false , [], []));
269269 }
270270
271271 public function testCollectReasonsDescribesTheCurrentProcess (): void
272272 {
273273 // the test suite runs with coverage off and without the turbo binary of
274274 // a phar installation, so this only asserts that the real-process entry
275275 // point agrees with what the process actually has loaded
276- foreach (ExtensionRegistry ::collectReasons (false ) as $ reason ) {
276+ foreach (RestartExtensionRegistry ::collectReasons (false ) as $ reason ) {
277277 $ this ->assertContains ($ reason ->getExtension (), ['xdebug ' , 'pcov ' , 'uopz ' , 'phpstan_turbo ' , 'tideways ' , 'opcache ' ]);
278278 }
279279
280- $ this ->assertSame ([], ExtensionRegistry ::collectReasonsFor ([], [], null , false ));
280+ $ this ->assertSame ([], RestartExtensionRegistry ::collectReasonsFor ([], [], null , false ));
281281 }
282282
283283 public function testIsXdebugActiveRequiresTheExtension (): void
@@ -286,8 +286,8 @@ public function testIsXdebugActiveRequiresTheExtension(): void
286286 $ this ->markTestSkipped ('xdebug is loaded in this process. ' );
287287 }
288288
289- $ this ->assertFalse (ExtensionRegistry ::isXdebugActive ());
290- foreach (ExtensionRegistry ::describeDetectedExtensions () as $ description ) {
289+ $ this ->assertFalse (RestartExtensionRegistry ::isXdebugActive ());
290+ foreach (RestartExtensionRegistry ::describeDetectedExtensions () as $ description ) {
291291 $ this ->assertStringNotContainsString ('xdebug ' , $ description );
292292 }
293293 }
0 commit comments