Skip to content

Commit

Permalink
Preparing 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsizemore committed Apr 29, 2024
1 parent 4392059 commit a25f83f
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 13 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ 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.1.0] - 2024-04-29

Tagging as non-patch release due to a change in the interfaces namespace. See [UPGRADING](UPGRADING.md).

### Added

Expand All @@ -25,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Updated dev dependencies.
* `Generator::generatePhpEnum()` can now throw a `RuntimeException` if `generateMapping` returns an empty array.
* Refactored `Generator::generateMapping()` make use of a helper function to reduce function complexity.
* Renamed `Esi\Mimey\Interface` namespace to `Esi\Mimey\Interfaces`

### Fixed

Expand Down Expand Up @@ -120,6 +123,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.1.0]: https://github.com/ericsizemore/mimey/releases/tag/v2.1.0
[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
Expand Down
8 changes: 8 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# UPGRADING

## 2.0.0 to 2.1.0

Unfortunately, when deciding to use the `Esi\Mimey\Interface` namespace to hold all library interfaces, while it has not caused any issues, `Interface` is technically a reserved keyword. To potentially prevent any issues, 2.1.0 changes this to `Esi\Mimey\Interfaces`.

This should have no affect on most users. If you are using any of the interfaces directly, just update the call to that interface. For example:

* `Esi\Mimey\Interface\MimeTypeInterface` -> `Esi\Mimey\Interfaces\MimeTypeInterface`

## 1.x to 2.x

* `dist/MimeType.php` remains the same.
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@
"cs:fix": "vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php",
"cs:check": "vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php --dry-run --diff",
"phpstan": "vendor/bin/phpstan analyse -c phpstan.neon",
"psalm": "vendor/bin/psalm --no-diff --use-baseline=psalm-baseline.xml",
"psalm:ci": "vendor/bin/psalm --no-diff --long-progress --output-format=github --use-baseline=psalm-baseline.xml",
"psalm:stats": "vendor/bin/psalm --no-diff --stats --use-baseline=psalm-baseline.xml",
"psalm": "vendor/bin/psalm --no-diff",
"psalm:ci": "vendor/bin/psalm --no-diff --long-progress --output-format=github",
"psalm:stats": "vendor/bin/psalm --no-diff --stats",
"test": "phpunit",
"update-types": "@php bin/update.php"
}
Expand Down
2 changes: 1 addition & 1 deletion dist/MimeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Esi\Mimey;

use InvalidArgumentException;
use Esi\Mimey\Interface\MimeTypeInterface;
use Esi\Mimey\Interfaces\MimeTypeInterface;

enum MimeType: string implements MimeTypeInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Copyright (c) 2016 Ralph Khattar
*/

namespace Esi\Mimey\Interface;
namespace Esi\Mimey\Interfaces;

use JsonException;
use RuntimeException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Copyright (c) 2016 Ralph Khattar
*/

namespace Esi\Mimey\Interface;
namespace Esi\Mimey\Interfaces;

/**
* MimeType Enum Interface.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Copyright (c) 2016 Ralph Khattar
*/

namespace Esi\Mimey\Interface;
namespace Esi\Mimey\Interfaces;

/**
* An interface for converting between MIME types and file extensions.
Expand Down
2 changes: 1 addition & 1 deletion src/Mapping/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

namespace Esi\Mimey\Mapping;

use Esi\Mimey\Interface\BuilderInterface;
use Esi\Mimey\Interfaces\BuilderInterface;
use RuntimeException;
use Throwable;

Expand Down
2 changes: 1 addition & 1 deletion src/Mapping/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

namespace Esi\Mimey\Mapping;

use Esi\Mimey\Interface\MimeTypeInterface;
use Esi\Mimey\Interfaces\MimeTypeInterface;
use JsonException;
use RuntimeException;

Expand Down
2 changes: 1 addition & 1 deletion src/MimeTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

namespace Esi\Mimey;

use Esi\Mimey\Interface\MimeTypesInterface;
use Esi\Mimey\Interfaces\MimeTypesInterface;
use RuntimeException;
use Throwable;

Expand Down
4 changes: 2 additions & 2 deletions tests/src/GeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function testGeneratePhpEnum(): void
namespace TestMimeNamespace;
use InvalidArgumentException;
use Esi\Mimey\Interface\MimeTypeInterface;
use Esi\Mimey\Interfaces\MimeTypeInterface;
enum TestMimeClass: string implements MimeTypeInterface
{
Expand Down Expand Up @@ -229,7 +229,7 @@ public function testGeneratePhpEnumDefault(): void
namespace Esi\Mimey;
use InvalidArgumentException;
use Esi\Mimey\Interface\MimeTypeInterface;
use Esi\Mimey\Interfaces\MimeTypeInterface;
enum MimeType: string implements MimeTypeInterface
{
Expand Down

0 comments on commit a25f83f

Please sign in to comment.