diff --git a/composer.json b/composer.json index 70cbe8b00..9f3199744 100644 --- a/composer.json +++ b/composer.json @@ -48,7 +48,7 @@ "composer/composer": "^1.6", "composer/xdebug-handler": "^1.1.0", "herrera-io/annotations": "~1.0", - "humbug/php-scoper": "dev-master#4f40b5a", + "humbug/php-scoper": "^0.8", "justinrainbow/json-schema": "^5.2", "nikic/iter": "^1.6", "ocramius/package-versions": "^1.3", diff --git a/composer.lock b/composer.lock index dc6704d28..ac18310b9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8ed956d436e7d0c7fdf852a469d8bd72", + "content-hash": "b39195aa414ba81ddb1d9c925068aa7d", "packages": [ { "name": "amphp/amp", @@ -947,16 +947,16 @@ }, { "name": "humbug/php-scoper", - "version": "dev-master", + "version": "0.8.0", "source": { "type": "git", "url": "https://github.com/humbug/php-scoper.git", - "reference": "4f40b5a" + "reference": "21bd501440454614dd0436b18e1049e0a581d205" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/humbug/php-scoper/zipball/4f40b5a", - "reference": "4f40b5a", + "url": "https://api.github.com/repos/humbug/php-scoper/zipball/21bd501440454614dd0436b18e1049e0a581d205", + "reference": "21bd501440454614dd0436b18e1049e0a581d205", "shasum": "" }, "require": { @@ -1015,7 +1015,7 @@ } ], "description": "Prefixes all PHP namespaces in a file or directory.", - "time": "2018-06-08T12:39:43+00:00" + "time": "2018-06-09T14:56:03+00:00" }, { "name": "justinrainbow/json-schema", @@ -4321,7 +4321,6 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { - "humbug/php-scoper": 20, "infection/infection": 20 }, "prefer-stable": false, diff --git a/src/PhpScoper/NullScoper.php b/src/PhpScoper/NullScoper.php index ddf0bc879..f98cb08b9 100644 --- a/src/PhpScoper/NullScoper.php +++ b/src/PhpScoper/NullScoper.php @@ -31,7 +31,7 @@ public function scope(string $filePath, string $contents): string */ public function getWhitelist(): Whitelist { - return Whitelist::create(); + return Whitelist::create(true); } public function getPrefix(): string diff --git a/tests/Composer/ComposerOrchestratorTest.php b/tests/Composer/ComposerOrchestratorTest.php index 2d1354f38..5e1b069e8 100644 --- a/tests/Composer/ComposerOrchestratorTest.php +++ b/tests/Composer/ComposerOrchestratorTest.php @@ -118,7 +118,7 @@ public function test_it_can_dump_the_autoloader_with_a_composer_json_with_a_depe { mirror(self::FIXTURES.'/dir000', $this->tmp); - ComposerOrchestrator::dumpAutoload(Whitelist::create(), ''); + ComposerOrchestrator::dumpAutoload(Whitelist::create(true), ''); $expectedPaths = [ 'composer.json', @@ -346,7 +346,7 @@ public function provideComposerAutoload() $composerAutoloaderName = self::COMPOSER_AUTOLOADER_NAME; yield [ - Whitelist::create(), + Whitelist::create(true), '', <<assertSame('', $scoper->getPrefix()); - $this->assertEquals(Whitelist::create(), $scoper->getWhitelist()); + $this->assertEquals(Whitelist::create(true), $scoper->getWhitelist()); } } diff --git a/tests/PhpScoper/SimpleScoperTest.php b/tests/PhpScoper/SimpleScoperTest.php index 54289c102..b4c618e6d 100644 --- a/tests/PhpScoper/SimpleScoperTest.php +++ b/tests/PhpScoper/SimpleScoperTest.php @@ -37,7 +37,7 @@ public function test_it_scopes_the_file_content(): void JSON; $prefix = 'HumbugBox'; - $whitelist = Whitelist::create('Whitelisted\Foo'); + $whitelist = Whitelist::create(true, 'Whitelisted\Foo'); $patchers = []; /** @var ObjectProphecy|PhpScoper $phpScoperProphecy */ @@ -63,7 +63,7 @@ public function test_it_scopes_the_file_content(): void public function test_it_exposes_some_elements_of_the_scoping_config(): void { $prefix = 'HumbugBox'; - $whitelist = Whitelist::create('Whitelisted\Foo'); + $whitelist = Whitelist::create(true, 'Whitelisted\Foo'); $patchers = []; $scoper = new SimpleScoper(new FakePhpScoper(), $prefix, $whitelist, $patchers);