Skip to content

Commit a09f9f2

Browse files
[6.x] Remove deprecated function calls (#14457)
Co-authored-by: Jason Varga <jason@pixelfear.com>
1 parent 8d7357a commit a09f9f2

File tree

12 files changed

+0
-21
lines changed

12 files changed

+0
-21
lines changed

src/View/Antlers/Language/Runtime/RuntimeParser.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,6 @@ private function addAntlersErrorDetails($exception, $text, $data)
510510
$rebuiltTrace = array_merge($rebuiltTrace, $exception->getTrace());
511511

512512
$traceProperty = new ReflectionProperty('Exception', 'trace');
513-
$traceProperty->setAccessible(true);
514513
$traceProperty->setValue($newException, $rebuiltTrace);
515514

516515
$this->cleanUpTempFiles();
@@ -606,7 +605,6 @@ private function buildAntlersExceptionError(AntlersException $antlersException,
606605

607606
$ignitionException = new $exceptionClass($newMessage, 0, 1, $exceptionView, $exceptionLine, $antlersException);
608607
$traceProperty = new ReflectionProperty('Exception', 'trace');
609-
$traceProperty->setAccessible(true);
610608
$traceProperty->setValue($ignitionException, $rebuiltTrace);
611609

612610
$ignitionException->setViewData($data);

src/Yaml/Yaml.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ protected function viewException($e, $str, $line = null)
136136
'args' => $args,
137137
]);
138138
$traceProperty = new ReflectionProperty('Exception', 'trace');
139-
$traceProperty->setAccessible(true);
140139
$traceProperty->setValue($exception, $trace);
141140

142141
return $exception;

tests/Assets/AssetTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,6 @@ public function when_saving_quietly_the_cached_assets_withEvents_flag_will_be_se
953953

954954
$reflection = new ReflectionClass($asset);
955955
$property = $reflection->getProperty('withEvents');
956-
$property->setAccessible(true);
957956
$withEvents = $property->getValue($asset);
958957
$this->assertTrue($withEvents);
959958
}

tests/Auth/ElevatedSessionTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,6 @@ public function it_returns_passkey_method_when_config_is_false_and_user_has_pass
437437
// Use reflection to set the passkeys property
438438
$reflection = new \ReflectionClass($user);
439439
$property = $reflection->getProperty('passkeys');
440-
$property->setAccessible(true);
441440
$property->setValue($user, $mockCollection);
442441

443442
$this->assertEquals('passkey', $user->getElevatedSessionMethod());
@@ -456,7 +455,6 @@ public function it_returns_password_confirmation_method_when_config_is_true_even
456455
// Use reflection to set the passkeys property
457456
$reflection = new \ReflectionClass($user);
458457
$property = $reflection->getProperty('passkeys');
459-
$property->setAccessible(true);
460458
$property->setValue($user, $mockCollection);
461459

462460
$this->assertEquals('password_confirmation', $user->getElevatedSessionMethod());
@@ -493,7 +491,6 @@ public function it_can_get_passkey_options_for_elevated_session()
493491
// Use reflection to set the passkeys property
494492
$reflection = new \ReflectionClass($user);
495493
$property = $reflection->getProperty('passkeys');
496-
$property->setAccessible(true);
497494
$property->setValue($user, $mockCollection);
498495

499496
$response = $this
@@ -520,7 +517,6 @@ public function it_can_start_elevated_session_with_passkey()
520517
// Use reflection to set the passkeys property
521518
$reflection = new \ReflectionClass($user);
522519
$property = $reflection->getProperty('passkeys');
523-
$property->setAccessible(true);
524520
$property->setValue($user, $mockCollection);
525521

526522
$credentials = [
@@ -556,7 +552,6 @@ public function status_endpoint_returns_passkey_method()
556552
// Use reflection to set the passkeys property
557553
$reflection = new \ReflectionClass($user);
558554
$property = $reflection->getProperty('passkeys');
559-
$property->setAccessible(true);
560555
$property->setValue($user, $mockCollection);
561556

562557
$this

tests/Data/Entries/EntryTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,6 @@ public function when_saving_quietly_the_cached_entrys_withEvents_flag_will_be_se
14301430
$cached = Cache::get('stache::items::entries::blog::1');
14311431
$reflection = new ReflectionClass($cached);
14321432
$property = $reflection->getProperty('withEvents');
1433-
$property->setAccessible(true);
14341433
$withEvents = $property->getValue($cached);
14351434
$this->assertTrue($withEvents);
14361435
}

tests/Feature/GraphQL/Fieldtypes/DateFieldtypeTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ public function setUp(): void
1919
$reflection = new ReflectionClass(self::this());
2020

2121
$factory = $reflection->getMethod('getFactory');
22-
$factory->setAccessible(true);
2322

2423
return Arr::get($factory->invoke(self::this())->getSettings(), 'toStringFormat');
2524
});

tests/Fieldtypes/UsersTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ private function cpUserWithPermissions(array $permissions)
164164
private function getColumns(Users $fieldtype): array
165165
{
166166
$method = new \ReflectionMethod($fieldtype, 'getColumns');
167-
$method->setAccessible(true);
168167

169168
return $method->invoke($fieldtype);
170169
}

tests/Imaging/GlideTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,10 @@ private function defaultFolderVisibility($filesystem)
174174

175175
$reflection = new \ReflectionClass($adapter);
176176
$visibilityConverter = $reflection->getProperty('visibility');
177-
$visibilityConverter->setAccessible(true);
178177
$visibilityConverter = $visibilityConverter->getValue($adapter);
179178

180179
$reflection = new \ReflectionClass($visibilityConverter);
181180
$visibility = $reflection->getProperty('defaultForDirectories');
182-
$visibility->setAccessible(true);
183181

184182
return $visibility->getValue($visibilityConverter);
185183
}
@@ -188,7 +186,6 @@ private function getAdapterFromFilesystem($filesystem)
188186
{
189187
$reflection = new \ReflectionClass($filesystem);
190188
$property = $reflection->getProperty('adapter');
191-
$property->setAccessible(true);
192189

193190
return $property->getValue($filesystem);
194191
}
@@ -197,7 +194,6 @@ private function getRootFromLocalAdapter($adapter)
197194
{
198195
$reflection = new \ReflectionClass($adapter);
199196
$property = $reflection->getProperty('prefixer');
200-
$property->setAccessible(true);
201197
$prefixer = $property->getValue($adapter);
202198

203199
return $prefixer->prefixPath('');

tests/Imaging/ImageGeneratorTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,6 @@ private function getRootFromLocalAdapter($adapter)
445445
{
446446
$reflection = new \ReflectionClass($adapter);
447447
$property = $reflection->getProperty('prefixer');
448-
$property->setAccessible(true);
449448
$prefixer = $property->getValue($adapter);
450449

451450
return $prefixer->prefixPath('');
@@ -455,7 +454,6 @@ private function getAdapterFromFilesystem($filesystem)
455454
{
456455
$reflection = new \ReflectionClass($filesystem);
457456
$property = $reflection->getProperty('adapter');
458-
$property->setAccessible(true);
459457

460458
return $property->getValue($filesystem);
461459
}

tests/Stache/StoreTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ public function it_forces_a_trailing_slash_when_setting_the_directory()
3838
// Check the value of the property to make sure the property was set with
3939
// the slash, and that ->directory() isn't just appending it.
4040
$property = (new \ReflectionClass($this->store))->getProperty('directory');
41-
$property->setAccessible(true);
4241
$this->assertEquals('/path/to/directory/', $property->getValue($this->store));
4342
}
4443

0 commit comments

Comments
 (0)