Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit92978ab

Browse files
Remove calls to reflection setAccessible()
1 parent5186e06 commit92978ab

File tree

118 files changed

+2
-207
lines changed

Some content is hidden

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

118 files changed

+2
-207
lines changed

‎src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ public function testFixManagersAutoMappingsWithTwoAutomappings()
7979

8080
$reflection =new \ReflectionClass(\get_class($this->extension));
8181
$method =$reflection->getMethod('fixManagersAutoMappings');
82-
$method->setAccessible(true);
8382

8483
$method->invoke($this->extension,$emConfigs,$bundles);
8584
}
@@ -168,7 +167,6 @@ public function testFixManagersAutoMappings(array $originalEm1, array $originalE
168167

169168
$reflection =new \ReflectionClass(\get_class($this->extension));
170169
$method =$reflection->getMethod('fixManagersAutoMappings');
171-
$method->setAccessible(true);
172170

173171
$newEmConfigs =$method->invoke($this->extension,$emConfigs,$bundles);
174172

@@ -186,7 +184,6 @@ public function testMappingTypeDetection()
186184

187185
$reflection =new \ReflectionClass(\get_class($this->extension));
188186
$method =$reflection->getMethod('detectMappingType');
189-
$method->setAccessible(true);
190187

191188
// The ordinary fixtures contain annotation
192189
$mappingType =$method->invoke($this->extension,__DIR__.'/../Fixtures',$container);
@@ -329,7 +326,6 @@ public function testBundleAutoMapping(string $bundle, string $expectedType, stri
329326

330327
$reflection =new \ReflectionClass(\get_class($this->extension));
331328
$method =$reflection->getMethod('getMappingDriverBundleConfigDefaults');
332-
$method->setAccessible(true);
333329

334330
$this->assertSame(
335331
[
@@ -347,8 +343,6 @@ protected function invokeLoadCacheDriver(array $objectManager, ContainerBuilder
347343
{
348344
$method =new \ReflectionMethod($this->extension,'loadObjectManagerCacheDriver');
349345

350-
$method->setAccessible(true);
351-
352346
$method->invokeArgs($this->extension, [$objectManager,$container,$cacheName]);
353347
}
354348

‎src/Symfony/Bridge/Twig/Tests/Translation/TwigExtractorTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ public function testExtract($template, $messages)
4141
$catalogue =newMessageCatalogue('en');
4242

4343
$m =new \ReflectionMethod($extractor,'extractTemplate');
44-
$m->setAccessible(true);
4544
$m->invoke($extractor,$template,$catalogue);
4645

4746
if (0 ===\count($messages)) {

‎src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ private function compileContainer(): ContainerBuilder
127127
$kernel->boot();
128128

129129
$method =new \ReflectionMethod($kernel,'buildContainer');
130-
$method->setAccessible(true);
131130
$container =$method->invoke($kernel);
132131
$container->getCompiler()->compile($container);
133132

‎src/Symfony/Bundle/FrameworkBundle/Command/ContainerLintCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ private function getContainerBuilder(): ContainerBuilder
104104
(newXmlFileLoader($container =newContainerBuilder($parameterBag =newEnvPlaceholderParameterBag()),newFileLocator()))->load($kernelContainer->getParameter('debug.container.dump'));
105105

106106
$refl =new \ReflectionProperty($parameterBag,'resolved');
107-
$refl->setAccessible(true);
108107
$refl->setValue($parameterBag,true);
109108

110109
$skippedIds = [];

‎src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ private function getContainerEnvVars(ContainerBuilder $container): array
326326
$getDefaultParameter =$getDefaultParameter->bindTo($bag,\get_class($bag));
327327

328328
$getEnvReflection =new \ReflectionMethod($container,'getEnv');
329-
$getEnvReflection->setAccessible(true);
330329

331330
$envs = [];
332331

‎src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolClearCommandTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ public function testClearFailed()
8686
$pool->save($item);
8787
$r =new \ReflectionObject($pool);
8888
$p =$r->getProperty('directory');
89-
$p->setAccessible(true);
9089
$poolDir =$p->getValue($pool);
9190

9291
/** @var SplFileInfo $entry */

‎src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/RememberMeBundle/Security/StaticTokenProvider.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,9 @@ public function updateToken(string $series, string $tokenValue, \DateTime $lastU
4949
$token =$this->loadTokenBySeries($series);
5050
$refl =new \ReflectionClass($token);
5151
$tokenValueProp =$refl->getProperty('tokenValue');
52-
$tokenValueProp->setAccessible(true);
5352
$tokenValueProp->setValue($token,$tokenValue);
5453

5554
$lastUsedProp =$refl->getProperty('lastUsed');
56-
$lastUsedProp->setAccessible(true);
5755
$lastUsedProp->setValue($token,$lastUsed);
5856

5957
self::$db[$series] =$token;

‎src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ public function testStopwatchExtensionAvailability($debug, $stopwatchEnabled, $e
225225

226226
$tokenParsers =$container->get('test.twig.extension.debug.stopwatch')->getTokenParsers();
227227
$stopwatchIsAvailable =new \ReflectionProperty($tokenParsers[0],'stopwatchIsAvailable');
228-
$stopwatchIsAvailable->setAccessible(true);
229228

230229
$this->assertSame($expected,$stopwatchIsAvailable->getValue($tokenParsers[0]));
231230
}

‎src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ public function testInjectToolbar($content, $expected)
3232
{
3333
$listener =newWebDebugToolbarListener($this->getTwigMock());
3434
$m =new \ReflectionMethod($listener,'injectToolbar');
35-
$m->setAccessible(true);
3635

3736
$response =newResponse($content);
3837

‎src/Symfony/Component/Cache/Tests/Adapter/ChainAdapterTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ public function testExpirationOnAllAdapters()
205205
$itemValidator =function (CacheItem$item) {
206206
$refl =new \ReflectionObject($item);
207207
$propExpiry =$refl->getProperty('expiry');
208-
$propExpiry->setAccessible(true);
209208
$expiry =$propExpiry->getValue($item);
210209
$this->assertGreaterThan(10,$expiry -time(),'Item should be saved with the given ttl, not the default for the adapter.');
211210

‎src/Symfony/Component/Cache/Tests/Adapter/DoctrineDbalAdapterTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ protected function isPruned(DoctrineDbalAdapter $cache, string $name): bool
136136
{
137137
$o =new \ReflectionObject($cache);
138138
$connProp =$o->getProperty('conn');
139-
$connProp->setAccessible(true);
140139

141140
/** @var Connection $conn */
142141
$conn =$connProp->getValue($cache);

‎src/Symfony/Component/Cache/Tests/Adapter/FilesystemAdapterTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ public static function tearDownAfterClass(): void
3333
protectedfunctionisPruned(CacheItemPoolInterface$cache,string$name):bool
3434
{
3535
$getFileMethod = (new \ReflectionObject($cache))->getMethod('getFile');
36-
$getFileMethod->setAccessible(true);
3736

3837
return !file_exists($getFileMethod->invoke($cache,$name));
3938
}

‎src/Symfony/Component/Cache/Tests/Adapter/MaxIdLengthAdapterTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public function testLongKeyVersioning()
4848
$reflectionClass =new \ReflectionClass(AbstractAdapter::class);
4949

5050
$reflectionMethod =$reflectionClass->getMethod('getId');
51-
$reflectionMethod->setAccessible(true);
5251

5352
// No versioning enabled
5453
$this->assertEquals('--------------------------:------------',$reflectionMethod->invokeArgs($cache, [str_repeat('-',12)]));
@@ -57,7 +56,6 @@ public function testLongKeyVersioning()
5756
$this->assertLessThanOrEqual(50,\strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-',40)])));
5857

5958
$reflectionProperty =$reflectionClass->getProperty('versioningIsEnabled');
60-
$reflectionProperty->setAccessible(true);
6159
$reflectionProperty->setValue($cache,true);
6260

6361
// Versioning enabled

‎src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ protected function isPruned(PdoAdapter $cache, string $name): bool
101101
$o =new \ReflectionObject($cache);
102102

103103
$getPdoConn =$o->getMethod('getConnection');
104-
$getPdoConn->setAccessible(true);
105104

106105
/** @var \PDOStatement $select */
107106
$select =$getPdoConn->invoke($cache)->prepare('SELECT 1 FROM cache_items WHERE item_id LIKE :id');

‎src/Symfony/Component/Cache/Tests/Adapter/PhpFilesAdapterTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public static function tearDownAfterClass(): void
3737
protectedfunctionisPruned(CacheItemPoolInterface$cache,string$name):bool
3838
{
3939
$getFileMethod = (new \ReflectionObject($cache))->getMethod('getFile');
40-
$getFileMethod->setAccessible(true);
4140

4241
return !file_exists($getFileMethod->invoke($cache,$name));
4342
}

‎src/Symfony/Component/Cache/Tests/CacheItemTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ public function testTag()
5959
{
6060
$item =newCacheItem();
6161
$r =new \ReflectionProperty($item,'isTaggable');
62-
$r->setAccessible(true);
6362
$r->setValue($item,true);
6463

6564
$this->assertSame($item,$item->tag('foo'));
@@ -81,7 +80,6 @@ public function testInvalidTag($tag)
8180
$this->expectExceptionMessage('Cache tag');
8281
$item =newCacheItem();
8382
$r =new \ReflectionProperty($item,'isTaggable');
84-
$r->setAccessible(true);
8583
$r->setValue($item,true);
8684

8785
$item->tag($tag);
@@ -93,7 +91,6 @@ public function testNonTaggableItem()
9391
$this->expectExceptionMessage('Cache item "foo" comes from a non tag-aware pool: you cannot tag it.');
9492
$item =newCacheItem();
9593
$r =new \ReflectionProperty($item,'key');
96-
$r->setAccessible(true);
9794
$r->setValue($item,'foo');
9895

9996
$item->tag([]);

‎src/Symfony/Component/Cache/Tests/Psr16CacheTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ protected function isPruned(CacheInterface $cache, string $name): bool
169169

170170
$pool = ((array)$cache)[sprintf("\0%s\0pool", Psr16Cache::class)];
171171
$getFileMethod = (new \ReflectionObject($pool))->getMethod('getFile');
172-
$getFileMethod->setAccessible(true);
173172

174173
return !file_exists($getFileMethod->invoke($pool,$name));
175174
}

‎src/Symfony/Component/Config/Resource/ClassExistenceResource.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ public static function throwOnRequiredClass(string $class, \Exception $previous
221221
foreach ($propsas$p =>$v) {
222222
if (null !==$v) {
223223
$r =new \ReflectionProperty(\Exception::class,$p);
224-
$r->setAccessible(true);
225224
$r->setValue($e,$v);
226225
}
227226
}

‎src/Symfony/Component/Config/Tests/ConfigCacheTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ public function testIsFreshWhenNoResourceProvided(bool $debug)
7171
publicfunctiontestFreshResourceInDebug()
7272
{
7373
$p = (new \ReflectionClass(SelfCheckingResourceChecker::class))->getProperty('cache');
74-
$p->setAccessible(true);
7574
$p->setValue(SelfCheckingResourceChecker::class, []);
7675

7776
$freshResource =newResourceStub();
@@ -86,7 +85,6 @@ public function testFreshResourceInDebug()
8685
publicfunctiontestStaleResourceInDebug()
8786
{
8887
$p = (new \ReflectionClass(SelfCheckingResourceChecker::class))->getProperty('cache');
89-
$p->setAccessible(true);
9088
$p->setValue(SelfCheckingResourceChecker::class, []);
9189

9290
$staleResource =newResourceStub();

‎src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ public function testPreNormalize(array $denormalized, array $normalized)
9090
$node =newArrayNode('foo');
9191

9292
$r =new \ReflectionMethod($node,'preNormalize');
93-
$r->setAccessible(true);
9493

9594
$this->assertSame($normalized,$r->invoke($node,$denormalized));
9695
}
@@ -132,7 +131,6 @@ public function testNodeNameCanBeZero(array $denormalized, array $normalized)
132131
$rootNode->addChild($fiveNode);
133132
$rootNode->addChild(newScalarNode('string_key'));
134133
$r =new \ReflectionMethod($rootNode,'normalizeValue');
135-
$r->setAccessible(true);
136134

137135
$this->assertSame($normalized,$r->invoke($rootNode,$denormalized));
138136
}
@@ -179,7 +177,6 @@ public function testChildrenOrderIsMaintainedOnNormalizeValue(array $prenormaliz
179177
$node->addChild($scalar2);
180178

181179
$r =new \ReflectionMethod($node,'normalizeValue');
182-
$r->setAccessible(true);
183180

184181
$this->assertSame($normalized,$r->invoke($node,$prenormalized));
185182
}
@@ -278,7 +275,6 @@ public function testMergeWithoutIgnoringExtraKeys(array $prenormalizeds)
278275
$node->setIgnoreExtraKeys(false);
279276

280277
$r =new \ReflectionMethod($node,'mergeValues');
281-
$r->setAccessible(true);
282278

283279
$r->invoke($node, ...$prenormalizeds);
284280
}
@@ -296,7 +292,6 @@ public function testMergeWithIgnoringAndRemovingExtraKeys(array $prenormalizeds)
296292
$node->setIgnoreExtraKeys(true);
297293

298294
$r =new \ReflectionMethod($node,'mergeValues');
299-
$r->setAccessible(true);
300295

301296
$r->invoke($node, ...$prenormalizeds);
302297
}
@@ -312,7 +307,6 @@ public function testMergeWithIgnoringExtraKeys(array $prenormalizeds, array $mer
312307
$node->setIgnoreExtraKeys(true,false);
313308

314309
$r =new \ReflectionMethod($node,'mergeValues');
315-
$r->setAccessible(true);
316310

317311
$this->assertEquals($merged,$r->invoke($node, ...$prenormalizeds));
318312
}

‎src/Symfony/Component/Config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,6 @@ protected function assertNode(string $expectedName, string $expectedType, NodeDe
438438
protectedfunctiongetField(object$object,string$field)
439439
{
440440
$reflection =new \ReflectionProperty($object,$field);
441-
$reflection->setAccessible(true);
442441

443442
return$reflection->getValue($object);
444443
}

‎src/Symfony/Component/Config/Tests/FileLocatorTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ public function testIsAbsolutePath(string $path)
2525
$loader =newFileLocator([]);
2626
$r =new \ReflectionObject($loader);
2727
$m =$r->getMethod('isAbsolutePath');
28-
$m->setAccessible(true);
2928

3029
$this->assertTrue($m->invoke($loader,$path),'->isAbsolutePath() returns true for an absolute path');
3130
}

‎src/Symfony/Component/Config/Tests/Resource/GlobResourceTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ public function testBraceFallback()
172172
$resource =newGlobResource($dir,'/*{/*/*.txt,.x{m,n}l}',true);
173173

174174
$p =new \ReflectionProperty($resource,'globBrace');
175-
$p->setAccessible(true);
176175
$p->setValue($resource,0);
177176

178177
$expected = [
@@ -190,7 +189,6 @@ public function testUnbalancedBraceFallback()
190189
$resource =newGlobResource($dir,'/*{/*/*.txt,.x{m,nl}',true);
191190

192191
$p =new \ReflectionProperty($resource,'globBrace');
193-
$p->setAccessible(true);
194192
$p->setValue($resource,0);
195193

196194
$this->assertSame([],array_keys(iterator_to_array($resource)));
@@ -204,7 +202,6 @@ public function testSerializeUnserialize()
204202
$newResource =unserialize(serialize($resource));
205203

206204
$p =new \ReflectionProperty($resource,'globBrace');
207-
$p->setAccessible(true);
208205

209206
$this->assertEquals($p->getValue($resource),$p->getValue($newResource));
210207
}

‎src/Symfony/Component/Config/Tests/Resource/ReflectionClassResourceTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ public function testHashedSignature(bool $changeExpected, int $changedLine, ?str
9898
eval(sprintf($code,$class ='Foo'.str_replace('.','_',uniqid('',true))));
9999
$r =new \ReflectionClass(ReflectionClassResource::class);
100100
$generateSignature =$r->getMethod('generateSignature');
101-
$generateSignature->setAccessible(true);
102101
$generateSignature =$generateSignature->getClosure($r->newInstanceWithoutConstructor());
103102
$expectedSignature =implode("\n",iterator_to_array($generateSignature(new \ReflectionClass($class))));
104103
}

‎src/Symfony/Component/Console/Event/ConsoleErrorEvent.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ public function setExitCode(int $exitCode): void
4747
$this->exitCode =$exitCode;
4848

4949
$r =new \ReflectionProperty($this->error,'code');
50-
$r->setAccessible(true);
5150
$r->setValue($this->error,$this->exitCode);
5251
}
5352

‎src/Symfony/Component/Console/Tester/TesterTrait.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,10 @@ private function initOutput(array $options)
152152

153153
$reflectedOutput =new \ReflectionObject($this->output);
154154
$strErrProperty =$reflectedOutput->getProperty('stderr');
155-
$strErrProperty->setAccessible(true);
156155
$strErrProperty->setValue($this->output,$errorOutput);
157156

158157
$reflectedParent =$reflectedOutput->getParentClass();
159158
$streamProperty =$reflectedParent->getProperty('stream');
160-
$streamProperty->setAccessible(true);
161159
$streamProperty->setValue($this->output,fopen('php://memory','w',false));
162160
}
163161
}

‎src/Symfony/Component/Console/Tests/ApplicationTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ public function testHasGet()
234234
// simulate --help
235235
$r =new \ReflectionObject($application);
236236
$p =$r->getProperty('wantHelps');
237-
$p->setAccessible(true);
238237
$p->setValue($application,true);
239238
$command =$application->get('foo:bar');
240239
$this->assertInstanceOf(HelpCommand::class,$command,'->get() returns the help command if --help is provided as the input');

‎src/Symfony/Component/Console/Tests/Command/CommandTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ public function testMergeApplicationDefinition()
230230

231231
$r =new \ReflectionObject($command);
232232
$m =$r->getMethod('mergeApplicationDefinition');
233-
$m->setAccessible(true);
234233
$m->invoke($command);
235234
$this->assertTrue($command->getDefinition()->hasArgument('foo'),'->mergeApplicationDefinition() merges the application arguments and the command arguments');
236235
$this->assertTrue($command->getDefinition()->hasArgument('bar'),'->mergeApplicationDefinition() merges the application arguments and the command arguments');
@@ -252,7 +251,6 @@ public function testMergeApplicationDefinitionWithoutArgsThenWithArgsAddsArgs()
252251

253252
$r =new \ReflectionObject($command);
254253
$m =$r->getMethod('mergeApplicationDefinition');
255-
$m->setAccessible(true);
256254
$m->invoke($command,false);
257255
$this->assertTrue($command->getDefinition()->hasOption('bar'),'->mergeApplicationDefinition(false) merges the application and the command options');
258256
$this->assertFalse($command->getDefinition()->hasArgument('foo'),'->mergeApplicationDefinition(false) does not merge the application arguments');
@@ -470,13 +468,11 @@ public function testDefaultCommand()
470468
$apl =newApplication();
471469
$apl->setDefaultCommand(Php8Command::getDefaultName());
472470
$property =new \ReflectionProperty($apl,'defaultCommand');
473-
$property->setAccessible(true);
474471

475472
$this->assertEquals('foo',$property->getValue($apl));
476473

477474
$apl->setDefaultCommand(Php8Command2::getDefaultName());
478475
$property =new \ReflectionProperty($apl,'defaultCommand');
479-
$property->setAccessible(true);
480476

481477
$this->assertEquals('foo2',$property->getValue($apl));
482478
}

‎src/Symfony/Component/Console/Tests/Completion/CompletionInputTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ public function testFromString($inputStr, array $expectedTokens)
119119
$input = CompletionInput::fromString($inputStr,1);
120120

121121
$tokensProperty = (new \ReflectionClass($input))->getProperty('tokens');
122-
$tokensProperty->setAccessible(true);
123122

124123
$this->assertEquals($expectedTokens,$tokensProperty->getValue($input));
125124
}

‎src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ public function testInlineStyleOptions(string $tag, string $expected = null, str
171171
$styleString =substr($tag,1, -1);
172172
$formatter =newOutputFormatter(true);
173173
$method =new \ReflectionMethod($formatter,'createStyleFromString');
174-
$method->setAccessible(true);
175174
$result =$method->invoke($formatter,$styleString);
176175
if (null ===$expected) {
177176
$this->assertNull($result);

‎src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,6 @@ public function testDisableStty()
872872
$dialog->ask($this->createStreamableInputInterfaceMock($inputStream),$this->createOutputInterface(),$question);
873873
}finally {
874874
$reflection =new \ReflectionProperty(QuestionHelper::class,'stty');
875-
$reflection->setAccessible(true);
876875
$reflection->setValue(null,true);
877876
}
878877
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp