Repository navigation
Releases: datasage/api-tools-content-negotiation
Release list
2.0.1
Declares PHP 8.6 support. The php constraint gains ~8.6.0; the floor is unchanged. CI now runs 8.6 with PHP platform requirements ignored there, because upstream laminas packages still cap PHP at ~8.5.0.
No src/ changes. Under 8.6.0RC2 no deprecation originates in this package.
2.0.0
First major of this fork line. BC breaks relative to 1.11.1.
Removed the file-upload surface — Filter\RenameUpload, Validator\UploadFile and their factories, plus the filters/validators config sections. Note these overrode the factories for Laminas\Filter\File\RenameUpload and Laminas\Validator\File\UploadFile, so anything resolving those names previously received the api-tools subclass that tolerated PUT/PATCH uploads.
Removed the direct laminas/laminas-json dependency. Json::encode() is not a json_encode() alias — it gives objects exposing toJson()/toArray() precedence — so JsonModel now implements both branches explicitly to keep output byte-identical.
Removed the deprecated Factory\RequestFactory (deprecated since 1.6.0, referenced by nothing, and its fallback branch instantiated ConsoleRequest precisely when that class was absent).
Removed the ServiceManager v2 shims and migrated to Psr\Container.
Constraints on sibling forks widened to accept their new majors.
1.11.1
Retired phpunit 10 and added a monthly dependabot configuration. Removed the tracked .coveralls.yml.
34 doc-comment annotations converted to attributes across nine files, 22 of them in ContentTypeListenerTest. The non-HTTP request double is now a stub.
Note: phpcs still fails on PHP 8.5 in ContentTypeListenerTest — a phpcs 3.x tokenizer problem, pre-existing and invisible to CI, which runs phpcs only on the lowest PHP. It needs phpcs 4, which laminas-coding-standard currently pins away.
Development tooling now at phpunit ^11.0 || ^12.0 || ^13.0, psalm ^6.14, laminas-coding-standard ^3.1.
No runtime behaviour changes. The only src/ edits are #[Override] attributes and their imports, so this is a patch release.
1.11.0
Supported PHP
~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0 — adds 8.5, drops 8.1.
Dependency declarations fixed
| dependency | evidence |
|---|---|
container-interop/container-interop ^1.2 |
Interop\Container imported by 8 src/ factory classes. Supplied via laminas-servicemanager's replace, so nothing extra installs. |
laminas/laminas-json ^3.8 |
Laminas\Json\Json::encode called unguarded at src/JsonModel.php:99 and :102. Was present only transitively. |
Two namespaces used in src/ were deliberately not promoted to require:
Laminas\ApiTools\Halis referenced only throughinstanceof, which isfalsewhen the class is absent — a genuine optional dependency, so it stays inrequire-dev.Laminas\Consoleis used insrc/Factory/RequestFactory.php, a class marked@deprecated since 1.6.0and documented as no longer used within the module, with aclass_exists()guard.laminas-consoleis abandoned; removing the dead factory is the better fix.
Other changes
- Dependency floors raised to releases covering the whole supported range, dropping two stale laminas 2.x alternatives (
laminas-eventmanager ^2.6.3 || ^3.0.1,laminas-stdlib ^2.7.8 || ^3.2.1). laminas-mvc^3.0.2→^3.8plus adatasage/laminas-mvcVCS repository entry;api-tools-api-problem→^1.10;api-tools-hal(dev) →^1.13.vimeo/psalm^5→^6.0. Baseline regenerated and three suppression blocks psalm 6 reports as unused removed:InternalMethod,InvalidArgumentfortest/Factory/RenameUploadFilterFactoryTest.php,UndefinedDocblockClassforsrc/Filter/RenameUpload.php.- Removed 4 no-op
setAccessible()calls fromtest/, deprecated in 8.5. config.platform.php8.1.99 → 8.2.99.- CI:
.laminas-ci.jsonnow excludes doc linting instead of ignoring platform requirements; removedrelease-on-milestone-closed.yml.
No src/ changes.
CI green on 8.2, 8.3, 8.4 and 8.5 across locked, lowest and latest. 158 tests, 371 assertions.
Known tooling limitation
phpcs 3.13.5 aborts on test/ContentTypeListenerTest.php when run on PHP 8.5, reporting 51 spurious errors. This is pre-existing and reproduces with the unmodified file; phpcs passes on 8.2, 8.3 and 8.4, and CI runs PHPCodeSniffer on 8.2. A phpcs 4.x bump is the fix.
1.10.0
What's Changed
New Contributors
Full Changelog: https://github.com/datasage/api-tools-content-negotiation/commits/1.10.0