Skip to content

fix(metadata): _format broken bc promise on #5080 #5187

Merged
soyuka merged 3 commits into
api-platform:3.0from
soyuka:fix/format-breaking-change
Nov 15, 2022
Merged

fix(metadata): _format broken bc promise on #5080 #5187
soyuka merged 3 commits into
api-platform:3.0from
soyuka:fix/format-breaking-change

Conversation

@soyuka

@soyuka soyuka commented Nov 15, 2022

Copy link
Copy Markdown
Member

See #5080 for details


if ($legacyFormat && ($this->triggerLegacyFormatOnce[$operation->getClass()] ?? true)) {
$this->triggerLegacyFormatOnce[$operation->getClass()] = false;
trigger_deprecation('api-platform/core', '3.0', sprintf('The special Symfony parameter ".{_format}" in your URI Template is deprecated, use an RFC6570 variable "{.format}" on the class "%s" instead. We will only use the RFC6570 compatible variable in 4.0.', $operation->getClass()));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we using trigger_deprecation now? We need to make sure it's not a dev dep then.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its a dependency of http-foundation

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure but it should be a direct dependency now.


if ($legacyFormat && ($this->triggerLegacyFormatOnce[$operation->getClass()] ?? true)) {
$this->triggerLegacyFormatOnce[$operation->getClass()] = false;
trigger_deprecation('api-platform/core', '3.0', sprintf('The special Symfony parameter ".{_format}" in your URI Template is deprecated, use an RFC6570 variable "{.format}" on the class "%s" instead. We will only use the RFC6570 compatible variable in 4.0.', $operation->getClass()));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
trigger_deprecation('api-platform/core', '3.0', sprintf('The special Symfony parameter ".{_format}" in your URI Template is deprecated, use an RFC6570 variable "{.format}" on the class "%s" instead. We will only use the RFC6570 compatible variable in 4.0.', $operation->getClass()));
trigger_deprecation('api-platform/core', '3.0', sprintf('The special Symfony parameter ".{_format}" in your URI Template is deprecated, use an RFC6570 variable "{._format}" on the class "%s" instead. We will only use the RFC6570 compatible variable in 4.0.', $operation->getClass()));

@soyuka
soyuka force-pushed the fix/format-breaking-change branch from 906cd74 to cc074be Compare November 15, 2022 09:55
@soyuka
soyuka force-pushed the fix/format-breaking-change branch from cc074be to f880edd Compare November 15, 2022 09:58
@soyuka
soyuka merged commit 45b5526 into api-platform:3.0 Nov 15, 2022
@soyuka
soyuka deleted the fix/format-breaking-change branch November 15, 2022 14:07
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