diff --git a/LICENSE b/LICENSE index 0083704..0138f8f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2023 Fabien Potencier +Copyright (c) 2004-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Tests/PackageTest.php b/Tests/PackageTest.php index 8d7f7b8..45b0982 100644 --- a/Tests/PackageTest.php +++ b/Tests/PackageTest.php @@ -27,7 +27,7 @@ public function testGetUrl($version, $format, $path, $expected) $this->assertSame($expected, $package->getUrl($path)); } - public function getConfigs() + public static function getConfigs() { return [ ['v1', '', 'http://example.com/foo', 'http://example.com/foo'], diff --git a/Tests/PathPackageTest.php b/Tests/PathPackageTest.php index 57bb80b..0784ac6 100644 --- a/Tests/PathPackageTest.php +++ b/Tests/PathPackageTest.php @@ -28,7 +28,7 @@ public function testGetUrl($basePath, $format, $path, $expected) $this->assertSame($expected, $package->getUrl($path)); } - public function getConfigs() + public static function getConfigs() { return [ ['/foo', '', 'http://example.com/foo', 'http://example.com/foo'], @@ -60,7 +60,7 @@ public function testGetUrlWithContext($basePathRequest, $basePath, $format, $pat $this->assertSame($expected, $package->getUrl($path)); } - public function getContextConfigs() + public static function getContextConfigs() { return [ ['', '/foo', '', '/baz', '/baz?v1'], diff --git a/Tests/UrlPackageTest.php b/Tests/UrlPackageTest.php index 6384b45..682cf6a 100644 --- a/Tests/UrlPackageTest.php +++ b/Tests/UrlPackageTest.php @@ -31,7 +31,7 @@ public function testGetUrl($baseUrls, $format, $path, $expected) $this->assertSame($expected, $package->getUrl($path)); } - public function getConfigs() + public static function getConfigs() { return [ ['http://example.net', '', 'http://example.com/foo', 'http://example.com/foo'], @@ -72,7 +72,7 @@ public function testGetUrlWithContext($secure, $baseUrls, $format, $path, $expec $this->assertSame($expected, $package->getUrl($path)); } - public function getContextConfigs() + public static function getContextConfigs() { return [ [false, 'http://example.com', '', 'foo', 'http://example.com/foo?v1'], @@ -116,7 +116,7 @@ public function testWrongBaseUrl($baseUrls) new UrlPackage($baseUrls, new EmptyVersionStrategy()); } - public function getWrongBaseUrlConfig() + public static function getWrongBaseUrlConfig() { return [ ['not-a-url'], diff --git a/Tests/VersionStrategy/JsonManifestVersionStrategyTest.php b/Tests/VersionStrategy/JsonManifestVersionStrategyTest.php index d3748bb..46c7d05 100644 --- a/Tests/VersionStrategy/JsonManifestVersionStrategyTest.php +++ b/Tests/VersionStrategy/JsonManifestVersionStrategyTest.php @@ -82,22 +82,22 @@ public function testRemoteManifestFileWithoutHttpClient() new JsonManifestVersionStrategy('https://cdn.example.com/manifest.json'); } - public function provideValidStrategies() + public static function provideValidStrategies(): \Generator { - yield from $this->provideStrategies('manifest-valid.json'); + yield from static::provideStrategies('manifest-valid.json'); } - public function provideInvalidStrategies() + public static function provideInvalidStrategies(): \Generator { - yield from $this->provideStrategies('manifest-invalid.json'); + yield from static::provideStrategies('manifest-invalid.json'); } - public function provideMissingStrategies() + public static function provideMissingStrategies(): \Generator { - yield from $this->provideStrategies('non-existent-file.json'); + yield from static::provideStrategies('non-existent-file.json'); } - public function provideStrategies(string $manifestPath) + public static function provideStrategies(string $manifestPath): \Generator { $httpClient = new MockHttpClient(function ($method, $url, $options) { $filename = __DIR__.'/../fixtures/'.basename($url); @@ -114,7 +114,7 @@ public function provideStrategies(string $manifestPath) yield [new JsonManifestVersionStrategy(__DIR__.'/../fixtures/'.$manifestPath)]; } - public function provideStrictStrategies() + public static function provideStrictStrategies(): \Generator { $strategy = new JsonManifestVersionStrategy(__DIR__.'/../fixtures/manifest-valid.json', null, true); diff --git a/Tests/VersionStrategy/StaticVersionStrategyTest.php b/Tests/VersionStrategy/StaticVersionStrategyTest.php index d054e84..ec06ba6 100644 --- a/Tests/VersionStrategy/StaticVersionStrategyTest.php +++ b/Tests/VersionStrategy/StaticVersionStrategyTest.php @@ -34,7 +34,7 @@ public function testApplyVersion($path, $version, $format) $this->assertSame($formatted, $staticVersionStrategy->applyVersion($path)); } - public function getConfigs() + public static function getConfigs() { return [ ['test-path', 'v1', null],