Skip to content

Commit 1d22d54

Browse files
committed
minor #8057 fix variable being overwritten (xabbuh)
This PR was merged into the 2.8 branch. Discussion ---------- fix variable being overwritten This fixes #7887. Commits ------- a08a8c4 fix variable being overwritten
2 parents 9539ca9 + a08a8c4 commit 1d22d54

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

performance.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,15 @@ If you're using the Standard Distribution, make the following changes::
138138
139139
use Symfony\Component\ClassLoader\ApcClassLoader;
140140

141-
$loader = require __DIR__.'/../app/autoload.php';
141+
// do not use $loader as a variable name here as it would
142+
// be overwritten when loading the bootstrap.php.cache file
143+
$classLoader = require __DIR__.'/../app/autoload.php';
142144
include_once __DIR__.'/../app/bootstrap.php.cache';
143145

144146
// Use APC for autoloading to improve performance
145147
// Change 'sf2' by the prefix you want in order
146148
// to prevent key conflict with another application
147-
$loader = new ApcClassLoader('sf2', $loader);
149+
$loader = new ApcClassLoader('sf2', $classLoader);
148150
$loader->register(true);
149151

150152
// ...

0 commit comments

Comments
 (0)