All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- New unit tests to increase code coverage by testing
builtIn
mapping data. - Added
rector/rector
as a dev-dependency.
- in
src/Mapping/Generator.php
the$mimeTypesText
property is now readonly. - in
src/MimeTypes.php
the$mapping
property converted to constructor property promotion. - The
update.yml
andgenerate.yml
workflows within.github/workflows
were updated:EndBug/add-and-commit
action replaced withstefanzweifel/git-auto-commit-action
.- Added
crazy-max/ghaction-import-gpg
to import a GPG key for signing any commits made when updating/generating types.
- Some small refactoring within
Mapping\Generator
. - Updated
composer.json
, specifically the 'scripts' section, to bring it more inline with my other repos/libraries:
Instead of: | Run: |
---|---|
composer run-script coverage-check | composer run-script code-coverage |
composer run-script cs:check | composer run-script phpcs:check |
composer run-script cs:fix | composer run-script phpcs:fix |
composer run-script test | composer run-script phpunit |
- Merged several workflows into one
continuous-integration.yml
. - Updated dev-dependencies.
- FIX: invalid links in docs
- Removed the following
.github/workflows
files, in favor of merging them as noted above in theChanged
section:- ci.yml
- psalm.yml
- tests.yml
2.1.0 - 2024-04-29
Tagging as non-patch release due to a change in the interfaces namespace. See UPGRADING.
- New dev dependencies:
phpstan/extension-installer
phpstan/phpstan-deprecation-rules
.psalm/plugin-phpunit
vimeo/psalm
- Added issue templates and a pull request template.
- Added
CONTRIBUTING.md
for additional contributing information. - Added
backward-compatibility.md
for my backward compatibility promise. - Added
CODE_OF_CONDUCT.md
for a Contributor Code of Conduct.
- Updated dev dependencies.
Generator::generatePhpEnum()
can now throw aRuntimeException
ifgenerateMapping
returns an empty array.- Refactored
Generator::generateMapping()
make use of a helper function to reduce function complexity. - Renamed
Esi\Mimey\Interface
namespace toEsi\Mimey\Interfaces
- Implemented fixes throughout based on Psalm.
2.0.0 - 2024-04-07
Mostly a 'restructuring' release, to set the foundation going forward. See UPGRADING.md for upgrade instructions/overview.
- Added a new interface for
Mapping\Builder
->Interface\BuilderInterface
. - Added the
Override
attribute. to theMimeType
enum functionsgetExtension
andgetValue
.- Not importing the attribute, as
#[\Override]
should not cause issues in PHP < 8.3
- Not importing the attribute, as
MimeMappingBuilder
andMimeMappingGenerator
are nowMapping\Builder
andMapping\Generator
.MimeTypeInterface
andMimeTypesInterface
are nowInterface\MimeTypeInterface
andInterface\MimeTypesInterface
.- Updated PHPUnit to 11.1 along with unit tests as a result.
- Set PHP-CS-Fixer dev dependency to
^3.52
. - Updated the
psalm
workflow to use the latestpsalm/psalm-github-security-scan
andgithub/codeql-action/upload-sarif
. - Changed the header of all PHP files to be more compact.
- Updated CHANGELOG.md to be more in line with the
Keep a Changelog
format.
- Fix
Mapping\Generator::generateMapping()
's use ofarray_filter
to not rely on loose comparison.
- Removed
jetbrains/phpstorm-attributes
as a dependency. - Removed Rector from dev-dependencies.
1.2.0 - 2024-01-30
- Added PHP-CS-Fixer to dev dependencies.
- Added RectorPHP/Rector to dev dependencies.
- Fixes throughout per PHPCS (PER, PSR-2, PSR-12).
- Changes throughout based on Rector fixes/suggestions.
- Updated copyright/license docblocks to reduce their size, and reduce to only one.
- Normalized composer.json and added .gitattributes.
- Updated Mime Types.
- Bumped minimum PHP version to 8.2.
1.1.1 - 2023-12-20
- Added Scrutinizer to workflow
- Updating codebase based on PHPStan level 9, strict w/bleeding edge. A work in progress
- Updated docs throughout
- First pass and attempt at adhering to PSR-12, PSR-5, and PSR-19
- Updated tests to use the PHPUnit CoversClass and DataProvider attributes.
- Update composer.json and github workflows to allow PHP 8.4 into the mix.
- Updated unit tests to use
self::
instead of$this->
when calling PHPUnit methods - Pass through to add function, exception, and constant imports
1.1.0 - 2023-11-27
- Updated composer.json to remove the restriction on PHP 8.3
- Still a minimum of PHP 8.1
- composer.lock updated
- data/mime.types and dist/* data updated with latest mime type data
- Updated all calls to global PHP functions and classes, that aren't imported, with the \ prefix
- Updated tests/src/MimeTypesTest.php to use ReflectionClass instead of ReflectionProperty to resolve a deprecation issue introduced in PHP 8.3
1.0.0 - 2023-07-08
Initial fork from elephox-dev/mimey
- Updated/changed project Namespace
- Updated tests and workflows to use PHPUnit 10.2
- Updated workflows to use newer GitHub actions (cachev3, checkoutv3, EndBug/add-and-commit@v9)
- Small updates here and there to code/documentation formatting/etc.
- So essentially, this is not a new feature/update release. More of just bringing it inline with my preferences.