8000 minor #13594 added deprecation notice for HttpCache::createEsi() (fab… · guilhermeblanco/symfony@c9d76d6 · GitHub
[go: up one dir, main page]

Skip to content

Commit c9d76d6

Browse files
committed
minor symfony#13594 added deprecation notice for HttpCache::createEsi() (fabpot)
This PR was merged into the 2.7 branch. Discussion ---------- added deprecation notice for HttpCache::createEsi() | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Commits ------- f109f95 added deprecation notice for HttpCache::createEsi()
2 parents 23253c4 + f109f95 commit c9d76d6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ protected function getOptions()
7272

7373
protected function createSurrogate()
7474
{
75-
return $this->createEsi();
75+
return new Esi();
7676
}
7777

7878
/**
@@ -84,7 +84,9 @@ protected function createSurrogate()
8484
*/
8585
protected function createEsi()
8686
{
87-
return new Esi();
87+
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use createSurrogate() instead.', E_USER_DEPRECATED);
88+
89+
return $this->createSurrogate();
8890
}
8991

9092
protected function createStore()

0 commit comments

Comments
 (0)
0