diff --git a/composer.json b/composer.json index 0d88319..5dc1b13 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "composer-plugin-api": "^1.1.0 || ^2.0" }, "require-dev": { - "phpunit/phpunit": "^9.0.1", + "phpunit/phpunit": "^9.1.1", "infection/infection": "^0.15.3", "composer/composer": "^1.9.3 || ^2.0@dev", "ext-zip": "^1.15.0", diff --git a/composer.lock b/composer.lock index 441f250..ecd7708 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": "fa52c743ac5a28fa6363539d99bcc984", + "content-hash": "f7e2fa4d441e1c438df565494427dfbf", "packages": [], "packages-dev": [ { @@ -1328,16 +1328,16 @@ }, { "name": "phpspec/prophecy", - "version": "v1.10.2", + "version": "v1.10.3", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9" + "reference": "451c3cd1418cf640de218914901e51b064abb093" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b4400efc9d206e83138e2bb97ed7f5b14b831cd9", - "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", + "reference": "451c3cd1418cf640de218914901e51b064abb093", "shasum": "" }, "require": { @@ -1387,7 +1387,7 @@ "spy", "stub" ], - "time": "2020-01-20T15:57:02+00:00" + "time": "2020-03-05T15:02:03+00:00" }, { "name": "phpstan/phpdoc-parser", @@ -1751,16 +1751,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.0.1", + "version": "9.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "68d7e5b17a6b9461e17c00446caa409863154f76" + "reference": "848f6521c906500e66229668768576d35de0227e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/68d7e5b17a6b9461e17c00446caa409863154f76", - "reference": "68d7e5b17a6b9461e17c00446caa409863154f76", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/848f6521c906500e66229668768576d35de0227e", + "reference": "848f6521c906500e66229668768576d35de0227e", "shasum": "" }, "require": { @@ -1776,14 +1776,15 @@ "phar-io/version": "^2.0.1", "php": "^7.3", "phpspec/prophecy": "^1.8.1", - "phpunit/php-code-coverage": "^8.0", + "phpunit/php-code-coverage": "^8.0.1", "phpunit/php-file-iterator": "^3.0", "phpunit/php-invoker": "^3.0", "phpunit/php-text-template": "^2.0", "phpunit/php-timer": "^3.0", + "sebastian/code-unit": "^1.0", "sebastian/comparator": "^4.0", "sebastian/diff": "^4.0", - "sebastian/environment": "^5.0", + "sebastian/environment": "^5.0.1", "sebastian/exporter": "^4.0", "sebastian/global-state": "^4.0", "sebastian/object-enumerator": "^4.0", @@ -1804,7 +1805,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.0-dev" + "dev-master": "9.1-dev" } }, "autoload": { @@ -1833,7 +1834,17 @@ "testing", "xunit" ], - "time": "2020-02-13T07:30:12+00:00" + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-04-03T14:40:04+00:00" }, { "name": "pimple/pimple", @@ -1981,6 +1992,58 @@ ], "time": "2019-11-01T11:05:21+00:00" }, + { + "name": "sebastian/code-unit", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "8d8f09bd47c75159921e6e84fdef146343962866" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/8d8f09bd47c75159921e6e84fdef146343962866", + "reference": "8d8f09bd47c75159921e6e84fdef146343962866", + "shasum": "" + }, + "require": { + "php": "^7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-03-30T11:59:20+00:00" + }, { "name": "sebastian/code-unit-reverse-lookup", "version": "2.0.0", @@ -2148,16 +2211,16 @@ }, { "name": "sebastian/environment", - "version": "5.0.1", + "version": "5.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "9bffdefa7810031a165ddd6275da6a2c1f6f2dfb" + "reference": "c39c1db0a5cffc98173f3de5a17d489d1043fd7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/9bffdefa7810031a165ddd6275da6a2c1f6f2dfb", - "reference": "9bffdefa7810031a165ddd6275da6a2c1f6f2dfb", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/c39c1db0a5cffc98173f3de5a17d489d1043fd7b", + "reference": "c39c1db0a5cffc98173f3de5a17d489d1043fd7b", "shasum": "" }, "require": { @@ -2197,7 +2260,13 @@ "environment", "hhvm" ], - "time": "2020-02-19T13:40:20+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-03-31T12:14:15+00:00" }, { "name": "sebastian/exporter", @@ -2961,16 +3030,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38" + "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", - "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14", + "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14", "shasum": "" }, "require": { @@ -2982,7 +3051,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.14-dev" + "dev-master": "1.15-dev" } }, "autoload": { @@ -3015,7 +3084,21 @@ "polyfill", "portable" ], - "time": "2020-01-13T11:15:53+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-02-27T09:26:54+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -3711,14 +3794,17 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "composer/composer": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { "php": "^7.4.0", - "composer-plugin-api": "^1.1.0" + "composer-plugin-api": "^1.1.0 || ^2.0" }, "platform-dev": { "ext-zip": "^1.15.0" - } + }, + "plugin-api-version": "1.1.0" } diff --git a/test/PackageVersionsTest/E2EInstallerTest.php b/test/PackageVersionsTest/E2EInstallerTest.php index e31a243..8afa4dc 100644 --- a/test/PackageVersionsTest/E2EInstallerTest.php +++ b/test/PackageVersionsTest/E2EInstallerTest.php @@ -49,7 +49,7 @@ class E2EInstallerTest extends TestCase private string $tempArtifact; - public function setUp() : void + protected function setUp() : void { $this->tempGlobalComposerHome = sys_get_temp_dir() . '/' . uniqid('InstallerTest', true) . '/global'; $this->tempLocalComposerHome = sys_get_temp_dir() . '/' . uniqid('InstallerTest', true) . '/local'; @@ -61,7 +61,7 @@ public function setUp() : void putenv('COMPOSER_HOME=' . $this->tempGlobalComposerHome); } - public function tearDown() : void + protected function tearDown() : void { $this->rmDir($this->tempGlobalComposerHome); $this->rmDir($this->tempLocalComposerHome); @@ -108,7 +108,7 @@ public function testGloballyInstalledPluginDoesNotGenerateVersionsForLocalProjec ); $this->execComposerInDir('update', $this->tempLocalComposerHome); - $this->assertFileNotExists( + self::assertFileDoesNotExist( $this->tempLocalComposerHome . '/vendor/ocramius/package-versions/src/PackageVersions/Versions.php' ); } @@ -137,13 +137,13 @@ public function testRemovingPluginDoesNotAttemptToGenerateVersions() : void ); $this->execComposerInDir('update', $this->tempLocalComposerHome); - $this->assertFileExists( + self::assertFileExists( $this->tempLocalComposerHome . '/vendor/ocramius/package-versions/src/PackageVersions/Versions.php' ); $this->execComposerInDir('remove ocramius/package-versions', $this->tempLocalComposerHome); - $this->assertFileNotExists( + self::assertFileDoesNotExist( $this->tempLocalComposerHome . '/vendor/ocramius/package-versions/src/PackageVersions/Versions.php' ); } @@ -173,13 +173,13 @@ public function testRemovingPluginWithNoDevDoesNotAttemptToGenerateVersions() : ); $this->execComposerInDir('update', $this->tempLocalComposerHome); - $this->assertFileExists( + self::assertFileExists( $this->tempLocalComposerHome . '/vendor/ocramius/package-versions/src/PackageVersions/Versions.php' ); $this->execComposerInDir('install --no-dev', $this->tempLocalComposerHome); - $this->assertFileNotExists( + self::assertFileDoesNotExist( $this->tempLocalComposerHome . '/vendor/ocramius/package-versions/src/PackageVersions/Versions.php' ); } @@ -208,12 +208,12 @@ public function testInstallingPluginWithNoScriptsLeadsToUsableVersionsClass() : ); $this->execComposerInDir('install --no-scripts', $this->tempLocalComposerHome); - $this->assertFileExists( + self::assertFileExists( $this->tempLocalComposerHome . '/vendor/ocramius/package-versions/src/PackageVersions/Versions.php' ); $this->writePackageVersionUsingFile($this->tempLocalComposerHome); - $this->assertPackageVersionsIsUsable($this->tempLocalComposerHome); + self::assertPackageVersionsIsUsable($this->tempLocalComposerHome); } private function createPackageVersionsArtifact() : void @@ -306,7 +306,7 @@ private function assertPackageVersionsIsUsable(string $directory) : void self::assertSame(0, $exitCode); self::assertCount(1, $output); - self::assertRegExp('/^1\\..*\\@[a-f0-9]*$/', $output[0]); + self::assertMatchesRegularExpression('/^1\\..*\\@[a-f0-9]*$/', $output[0]); } /** @@ -317,7 +317,7 @@ private function execComposerInDir(string $command, string $dir) : array $currentDir = getcwd(); chdir($dir); exec(__DIR__ . '/../../vendor/bin/composer ' . $command . ' 2> /dev/null', $output, $exitCode); - $this->assertEquals(0, $exitCode); + self::assertEquals(0, $exitCode); chdir($currentDir); return $output; diff --git a/test/PackageVersionsTest/InstallerTest.php b/test/PackageVersionsTest/InstallerTest.php index 1c3186d..00db3f8 100644 --- a/test/PackageVersionsTest/InstallerTest.php +++ b/test/PackageVersionsTest/InstallerTest.php @@ -661,7 +661,7 @@ public function testVersionsAreNotDumpedIfPackageVersionsNotExplicitlyRequired() $this->io )); - self::assertFileNotExists($expectedPath . '/Versions.php'); + self::assertFileDoesNotExist($expectedPath . '/Versions.php'); $this->rmDir($vendorDir); } @@ -705,8 +705,8 @@ public function testVersionsAreNotDumpedIfPackageIsScheduledForRemoval() : void $this->io )); - self::assertFileNotExists($expectedPath . '/Versions.php'); - self::assertFileNotExists($expectedPath . '/Versions.php'); + self::assertFileDoesNotExist($expectedPath . '/Versions.php'); + self::assertFileDoesNotExist($expectedPath . '/Versions.php'); } public function testGeneratedVersionFileAccessRights() : void