8000 Use symfony/deprecation-contracts instead of trigger_error by andrew-demb · Pull Request #40643 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Use symfony/deprecation-contracts instead of trigger_error #40643

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ private function addFormSection(ArrayNodeDefinition $rootNode, callable $enableI
->validate()
->ifTrue()
->then(function ($v) {
@trigger_error('Since symfony/framework-bundle 5.2: Setting the "framework.form.legacy_error_messages" option to "true" is deprecated. It will have no effect as of Symfony 6.0.', \E_USER_DEPRECATED);
trigger_deprecation('symfony/framework-bundle', '5.2', 'Setting the "framework.form.legacy_error_messages" option to "true" is deprecated. It will have no effect as of Symfony 6.0.');

return $v;
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ private function getPayload(Email $email, Envelope $envelope): array
} else {
// fallback to prefix with "h:" to not break BC
$headerName = 'h:'.$name;
@trigger_error(sprintf('Not prefixing the Mailgun header name with "h:" is deprecated since Symfony 5.1. Use header name "%s" instead.', $headerName), \E_USER_DEPRECATED);
trigger_deprecation('symfony/mailer', '5.1', 'Not prefixing the Mailgun header name with "h:" is deprecated. Use header name "%s" instead.', $headerName);
}

$payload[$headerName] = $header->getBodyAsString();
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Component/Mailer/Bridge/Mailgun/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
],
"require": {
"php": ">=7.2.5",
"symfony/deprecation-contracts": "^2.1",
"symfony/mailer": "^5.2.6"
},
"require-dev": {
Expand Down
0