diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 9cfdf0a..b6b215e 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -23,6 +23,9 @@ filter: excluded_paths: - 'tests/*' - 'bin/*' + - 'dist/*' + - 'stubs/*' + - 'data/*' checks: php: true diff --git a/CHANGELOG.md b/CHANGELOG.md index e16d874..34faa57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [2.0.0] - 2024-04-07 Mostly a 'restructuring' release, to set the foundation going forward. See UPGRADING.md for upgrade instructions/overview. @@ -95,7 +95,7 @@ Initial fork from [elephox-dev/mimey](https://github.com/elephox-dev/mimey) * So essentially, this is not a new feature/update release. More of just bringing it inline with my preferences. -[unreleased]: https://github.com/ericsizemore/mimey/tree/develop +[2.0.0]: https://github.com/ericsizemore/mimey/releases/tag/v2.0.0 [1.2.0]: https://github.com/ericsizemore/mimey/releases/tag/v1.2.0 [1.1.1]: https://github.com/ericsizemore/mimey/releases/tag/v1.1.1 [1.1.0]: https://github.com/ericsizemore/mimey/releases/tag/v1.1.0 diff --git a/phpunit.xml b/phpunit.xml index 0ee1102..5542a34 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,9 +1,9 @@ tests - - - src - - + + + src + + - + diff --git a/tests/src/BuilderTest.php b/tests/src/BuilderTest.php index 2fd0846..d2439d3 100644 --- a/tests/src/BuilderTest.php +++ b/tests/src/BuilderTest.php @@ -22,20 +22,14 @@ namespace Esi\Mimey\Tests; -// Core classes use Esi\Mimey\Mapping\Builder; use Esi\Mimey\MimeTypes; - -// PHPUnit use JsonException; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\UsesClass; - -// Exceptions use PHPUnit\Framework\TestCase; use RuntimeException; -// Functions & constants use function file_get_contents; use function file_put_contents; use function json_decode; @@ -103,6 +97,7 @@ public function testFromBuiltIn(): void self::assertSame('mycustomjson', $mime3->getExtension('application/json')); self::assertSame('application/mycustomjson', $mime3->getMimeType('json')); } + /** * Test with a new mapping builder that has no types defined. */ diff --git a/tests/src/GeneratorTest.php b/tests/src/GeneratorTest.php index ae1a370..c290b7a 100644 --- a/tests/src/GeneratorTest.php +++ b/tests/src/GeneratorTest.php @@ -22,14 +22,9 @@ namespace Esi\Mimey\Tests; -// Core classes use Esi\Mimey\Mapping\Generator; - -// Exceptions use JsonException; use PHPUnit\Framework\Attributes\CoversClass; - -// PHPUnit use PHPUnit\Framework\TestCase; use ReflectionMethod; @@ -201,6 +196,7 @@ public static function tryFromExtension(string \$extension): ?MimeType $phpEnum ); } + public function testSpaceIndent(): void { $spaceIndent = new ReflectionMethod(Generator::class, 'spaceIndent'); diff --git a/tests/src/MimeTypesTest.php b/tests/src/MimeTypesTest.php index 0caeb48..488bc38 100644 --- a/tests/src/MimeTypesTest.php +++ b/tests/src/MimeTypesTest.php @@ -22,20 +22,14 @@ namespace Esi\Mimey\Tests; -// Core classes use Esi\Mimey\MimeTypes; use Iterator; use PHPUnit\Framework\Attributes\CoversClass; - -// Exceptions use PHPUnit\Framework\Attributes\DataProvider; - -// PHPUnit use PHPUnit\Framework\TestCase; use ReflectionClass; use RuntimeException; -// Functions use function file_put_contents; use function rename; use function unlink;