Skip to content

feat: extract ApiTestCase in its own api-platform/test package - #7887

Open
Maxcastel wants to merge 6 commits into
api-platform:mainfrom
Maxcastel:extract-ApiTestCase-api-platform/test-package
Open

feat: extract ApiTestCase in its own api-platform/test package#7887
Maxcastel wants to merge 6 commits into
api-platform:mainfrom
Maxcastel:extract-ApiTestCase-api-platform/test-package

Conversation

@Maxcastel

@MaxcastelMaxcastel commented Mar 27, 2026

Copy link
Copy Markdown
Contributor
QA
Branch?main
TicketsCloses#6920
LicenseMIT
Doc PRapi-platform/docs#2276

@MaxcastelMaxcastel changed the title feat: extract ApiTestCase in it's own api-platform/test packagefeat: extract ApiTestCase in its own api-platform/test packageMar 30, 2026
@Maxcastel
Maxcastelforce-pushed the extract-ApiTestCase-api-platform/test-package branch from d83c7ed to 918239dCompareMarch 30, 2026 08:22
@Maxcastel
Maxcastel marked this pull request as ready for review March 30, 2026 08:23
soyukaand others added 2 commits May 13, 2026 16:04
Replaces 13 behat features (xml, issues, sub_resources, push_relations,
mercure, json, http_cache, filter) with functional ApiTestCase tests
under tests/Functional/. Scenarios map 1:1; sequential behat scenarios
(http_cache tags, m2m tag_collector) are consolidated into single test
methods that walk through the same sequence with NullPurger resets.
New PropertyFilterTest covers resource-relation sparse fieldsets through
both #[ApiFilter(PropertyFilter::class)] and #[QueryParameter(filter: ...)]
on a new isolated fixture pair (SparseFieldsetParent/Child); the non-
resource scenario is already covered by NonResourceTest.
TagCollectorTest installs the custom TagCollectorCustom via
\$container->set() + KernelBrowser::disableReboot() so the override
survives across requests — same pattern as Behat HttpCacheContext.
Doctrine, GraphQL, MongoDB, Main, Elasticsearch, Security and Serializer
feature sets are intentionally out of scope.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…hods
Auto-increment IDs in MongoDB ODM are tracked in a separate
doctrine_increment_ids collection that persisted across recreateSchema()
calls, causing IDs to leak between test methods. Drop it alongside the
document collections.
@Maxcastel
Maxcastelforce-pushed the extract-ApiTestCase-api-platform/test-package branch 2 times, most recently from cfe90e6 to 4a85e68CompareMay 15, 2026 20:32
soyukaand others added 4 commits May 15, 2026 22:52
…lizableValueException (api-platform#7967)
* fix(serializer): translate PropertyAccess type mismatches to NotNormalizableValueException
| Q | A
| ------------- | ---
| Branch? | 4.3
| Tickets | symfony/symfony#64159
| License | MIT
| Doc PR | ∅
AbstractItemNormalizer::setAttributeValue() now catches PropertyAccess\InvalidArgumentException
and rethrows as NotNormalizableValueException, mirroring the contract ObjectNormalizer implements
per symfony/symfony#64067. Without this, null on a non-nullable typed property bubbled up as
HTTP 500 instead of a 4xx denormalization error.
* chore(serializer): bump symfony/serializer minimum to require setAttributeValue contract
| Q | A
| ------------- | ---
| Branch? | 4.3
| Tickets | symfony/symfony#64067
| License | MIT
| Doc PR | ∅
The COLLECT_DENORMALIZATION_ERRORS aggregation in AbstractObjectNormalizer was reworked in
symfony/symfony#64067 (released in 6.4.37 / 7.4.9 / 8.0.9). Now that AbstractItemNormalizer
implements that contract, older Symfony parents would no longer aggregate our translated
exceptions and would respond with 400 instead of 422.
…ocator (api-platform#7968)
Symfony 8.1 split json_streamer.value_transformer into property_value_transformer
and value_object_transformer. The custom JSON-LD JsonStreamReader/Writer bypassed
Symfony's TransformerPass, so DateTimeInterface (and other value objects) were
missing from its locator — making the generator emit a Splitter::splitDict call
on date-time strings ("JSON is not valid").
…platform#7972)
| Q | A
| ------------- | ---
| Branch? | 4.3
| Tickets | refs api-platform#7966
| License | MIT
| Doc PR | ∅
FieldsBuilder called filterLocator->has() with whatever QueryParameter::$filter
returned, crashing on object-form filters (new SortFilter()) when the parameter
key contained '['. A resolveFilter() helper now handles both string service ids
and FilterInterface instances, applied at every locator site.
@Maxcastel
Maxcastelforce-pushed the extract-ApiTestCase-api-platform/test-package branch from 4a85e68 to 721fd65CompareMay 15, 2026 21:01
@Maxcastel

Copy link
Copy Markdown
ContributorAuthor

Rebased onto #7971, waiting for it to be merged into main. Will rebase onto main once it’s merged.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

extract ApiTestCase in it's own api-platform/test package

2 participants

@Maxcastel@soyuka