Skip to content

Conversation

soyuka
Copy link
Member

@soyuka soyuka commented May 16, 2022

link #4753

@soyuka soyuka mentioned this pull request May 16, 2022
@soyuka soyuka force-pushed the fix/schema-factory-bc-layer branch 3 times, most recently from e74e9b0 to ff45fd8 Compare May 17, 2022 08:13
@soyuka soyuka force-pushed the fix/schema-factory-bc-layer branch from b2fb737 to 9fa6940 Compare May 19, 2022 15:23
@soyuka soyuka merged commit a4489f9 into api-platform:2.7 May 20, 2022
@soyuka soyuka deleted the fix/schema-factory-bc-layer branch May 20, 2022 13:02
@bendavies
Copy link
Contributor

bendavies commented Jun 8, 2022

@soyuka this seems to cause a break between v2.6 and v2.7
specifically

$this->assertMatchesResourceItemJsonSchema(PolicyNotice::class);

works on 2.6 but breaks on 2.7 because 2.7 tries to "guess" the operation and can't find one, so creates a new one with the wrong (empty) serialization context.

// Guess the operation and use the first one that matches criterias

in 2.7 i have to do this to fix it:

$this->assertMatchesResourceItemJsonSchema(PolicyNotice::class, '_api_/policy-notices/{id}.{_format}_get');

this can't be intended, surely?
can you provide any info on what i should be doing, or is this a regression/bug?

soyuka added a commit to soyuka/core that referenced this pull request Jun 29, 2022
…4758)

* fix(json-schema): factory backward compatibility layer

link api-platform#4753

* sdkjhg

* php 7...

* php 7...

* php 7...

* php 7...

* fix

* tired

* come on

* come on
soyuka added a commit to soyuka/core that referenced this pull request Jun 29, 2022
…4758)

* fix(json-schema): factory backward compatibility layer

link api-platform#4753

* sdkjhg

* php 7...

* php 7...

* php 7...

* php 7...

* fix

* tired

* come on

* come on
soyuka added a commit to soyuka/core that referenced this pull request Jun 29, 2022
…4758)

* fix(json-schema): factory backward compatibility layer

link api-platform#4753

* sdkjhg

* php 7...

* php 7...

* php 7...

* php 7...

* fix

* tired

* come on

* come on
Sign up for free to 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.

2 participants