Skip to content

Commit 5c23557

Browse files
authored
Remove remaining usages of whitelist (#780)
1 parent 88d7294 commit 5c23557

File tree

9 files changed

+9
-130
lines changed

9 files changed

+9
-130
lines changed

fixtures/set027-laravel/phpunit.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@
1717
<directory suffix="Test.php">./tests/Unit</directory>
1818
</testsuite>
1919
</testsuites>
20-
<filter>
21-
<whitelist processUncoveredFilesFromWhitelist="true">
22-
<directory suffix=".php">./app</directory>
23-
</whitelist>
24-
</filter>
2520
<php>
2621
<env name="APP_ENV" value="testing"/>
2722
<env name="BCRYPT_ROUNDS" value="4"/>

phpstan.neon.dist

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ parameters:
4343
path: 'src/PhpParser/Node/FullyQualifiedFactory.php'
4444
- message: '#retrieveElements\(\) should return#'
4545
path: 'src/Configuration/SymbolsConfigurationFactory.php'
46-
- message: '#Scoper::scope\(\) expects string\, mixed given\.#'
47-
path: 'src/Scoper/FileWhitelistScoper.php'
4846
- message: '#Scoper::scope\(\) expects string\, mixed given\.#'
4947
path: 'src/Scoper/PatchScoper.php'
5048
- message: '#Scoper::scope\(\) expects string\, mixed given\.#'

src/Scoper/FileWhitelistScoper.php

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/scoper.inc.php.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ return [
6666
//
6767
// For more see: https://github.com/humbug/php-scoper/blob/master/docs/configuration.md#patchers
6868
'exclude-files' => [
69-
// 'src/a-whitelisted-file.php',
69+
// 'src/an-excluded-file.php',
7070
...$excludedFiles,
7171
],
7272

tests/Configuration/SymbolsConfigurationFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public static function configProvider(): iterable
193193
*
194194
* @param class-string<Throwable> $expectedExceptionClassName
195195
*/
196-
public function test_it_cannot_create_a_whitelist_from_an_invalid_config(
196+
public function test_it_cannot_create_a_symbols_config_from_an_invalid_config(
197197
array $config,
198198
string $expectedExceptionClassName,
199199
string $expectedExceptionMessage

tests/Scoper/FileWhitelistScoperTest.php

Lines changed: 0 additions & 74 deletions
This file was deleted.

tests/Scoper/Symfony/XmlScoperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public static function provideXmlFiles(): iterable
309309
[],
310310
];
311311

312-
yield 'PSR-4 service locator with whitelist' => [
312+
yield 'PSR-4 service locator with excluded namespace' => [
313313
<<<'XML'
314314
<!-- config/services.xml -->
315315
<?xml version="1.0" encoding="UTF-8" ?>

tests/Scoper/Symfony/YamlScoperTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public static function provideYamlFiles(): iterable
167167
[],
168168
];
169169

170-
yield 'not quoted service definitions with whitelist' => [
170+
yield 'not quoted service definitions with excluded namespace' => [
171171
<<<'YAML'
172172
services:
173173
Symfony\Component\Console\Style\SymfonyStyle: ~
@@ -212,7 +212,7 @@ public static function provideYamlFiles(): iterable
212212
[],
213213
];
214214

215-
yield 'quoted service definitions with whitelist' => [
215+
yield 'quoted service definitions with default config' => [
216216
<<<'YAML'
217217
services:
218218
"Symfony\\Component\\Console\\Style\\SymfonyStyle": ~
@@ -248,7 +248,7 @@ public static function provideYamlFiles(): iterable
248248
[],
249249
];
250250

251-
yield 'PSR-4 service locator with whitelist' => [
251+
yield 'PSR-4 service locator with excluded namespace' => [
252252
<<<'YAML'
253253
services:
254254
Acme\Controller\:
@@ -291,7 +291,7 @@ public static function provideYamlFiles(): iterable
291291
[],
292292
];
293293

294-
yield 'service as alias with whitelist' => [
294+
yield 'service as alias with excluded namespace' => [
295295
<<<'YAML'
296296
services:
297297
Acme\Foo\X: '@Acme\Foo\Bar'
@@ -328,7 +328,7 @@ public static function provideYamlFiles(): iterable
328328
[],
329329
];
330330

331-
yield 'service with class-name as argument with short-argument notation with whitelist' => [
331+
yield 'service with class-name as argument with short-argument notation with excluded namespace' => [
332332
<<<'YAML'
333333
services:
334334
Acme\Foo\X:
@@ -379,7 +379,7 @@ class: 'Humbug\Acme\Foo'
379379
[],
380380
];
381381

382-
yield 'service with class alias key, class as argument and class in tag attribute with whitelist' => [
382+
yield 'service with class alias key, class as argument and class in tag attribute with excluded namespace' => [
383383
<<<'YAML'
384384
services:
385385
foo:

0 commit comments

Comments
 (0)