8000 minor #40643 Use symfony/deprecation-contracts instead of trigger_err… · symfony/symfony@11db9cd · GitHub
[go: up one dir, main page]

Skip to content

Commit 11db9cd

Browse files
minor #40643 Use symfony/deprecation-contracts instead of trigger_error (andrew-demb)
This PR was merged into the 5.3-dev branch. Discussion ---------- Use symfony/deprecation-contracts instead of trigger_error | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | - <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | - <!-- required for new features --> As `symfony/deprecation-contracts` added to requirements with PR #40468, we can update `trigger_error` call in favor reusing deprecation abstractions Commits ------- 1acc296 Use symfony/deprecation-contracts instead of trigger_error
2 parents f963ae4 + 1acc296 commit 11db9cd

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ private function addFormSection(ArrayNodeDefinition $rootNode, callable $enableI
214214
->validate()
215215
->ifTrue()
216216
->then(function ($v) {
217-
@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);
217+
trigger_deprecation('symfony/framework-bundle', '5.2', 'Setting 8000 the "framework.form.legacy_error_messages" option to "true" is deprecated. It will have no effect as of Symfony 6.0.');
218218

219219
return $v;
220220
})

src/Symfony/Component/Mailer/Bridge/Mailgun/Transport/MailgunApiTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ private function getPayload(Email $email, Envelope $envelope): array
137137
} else {
138138
// fallback to prefix with "h:" to not break BC
139139
$headerName = 'h:'.$name;
140-
@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);
140+
trigger_deprecation('symfony/mailer', '5.1', 'Not prefixing the Mailgun header name with "h:" is deprecated. Use header name "%s" instead.', $headerName);
141141
}
142142

143143
$payload[$headerName] = $header->getBodyAsString();

src/Symfony/Component/Mailer/Bridge/Mailgun/composer.json

Lines changed: 1 addition & 0 deletions
Original file line number 637B Diff line numberDiff line change
@@ -17,6 +17,7 @@
1717
],
1818
"require": {
1919
"php": ">=7.2.5",
20+
"symfony/deprecation-contracts": "^2.1",
2021
"symfony/mailer": "^5.2.6"
2122
},
2223
"require-dev": {

0 commit comments

Comments
 (0)
0