You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #6714 Added some missing deprecations related to referrer URLs (javiereguiluz)
This PR was squashed before being merged into the 4.x branch.
Discussion
----------
Added some missing deprecations related to referrer URLs
While removing these features in 5.x branch (see #6712) I realized that we were missing some deprecation messages related to referrer URLs.
Commits
-------
cfd639c Added some missing deprecations related to referrer URLs
'Passing the referrer URL to the "%s" constructor is deprecated. The referrer URL will now be determined automatically based on the current request.',
33
+
self::class
34
+
);
35
+
}
36
+
37
+
$this->referrerUrl = $referrerUrl;
38
+
$this->csrfToken = $csrfToken;
39
+
} else {
40
+
$this->csrfToken = $referrerUrl;
41
+
}
23
42
}
24
43
25
44
publicfunctiongetName(): string
@@ -39,6 +58,12 @@ public function getEntityFqcn(): string
39
58
40
59
publicfunctiongetReferrerUrl(): string
41
60
{
61
+
trigger_deprecation(
62
+
'easycorp/easyadmin-bundle',
63
+
'4.22.0',
64
+
'The referrer of batch action DTOs is deprecated and it will be removed in 5.0.0. Use $adminContext->getRequest()->headers->get(\'referer\') or redirect to some specific URL.',
Copy file name to clipboardExpand all lines: src/Provider/AdminContextProvider.php
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,13 @@ public function getRequest(): Request
55
55
56
56
publicfunctiongetReferrer(): ?string
57
57
{
58
+
trigger_deprecation(
59
+
'easycorp/easyadmin-bundle',
60
+
'4.8.11',
61
+
'EasyAdmin URLs no longer include the referrer URL. If you still need it, you can get the referrer provided by browsers via $context->getRequest()->headers->get(\'referer\').',
'Removing the referrer argument in the admin URLs via the AdminUrlGenerator::removeReferrer() method is deprecated and it will be removed in 5.0.0. The referrer will now be determined automatically based on the current request.',
0 commit comments