Skip to content

Commit 0d94ce0

Browse files
committed
minor #20801 Update micro_kernel_trait.rst (lmlsna)
This PR was merged into the 7.2 branch. Discussion ---------- Update micro_kernel_trait.rst Yielded classes in registerBundles() function example code require "new" keyword to work. Also removed getLogDir() and getCacheDir() functions in example code (these functions are already defined in an identical way by the parent class). <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `7.x` for features of unreleased versions). --> Commits ------- 78eaf0d Update micro_kernel_trait.rst
2 parents e276d41 + 78eaf0d commit 0d94ce0

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

configuration/micro_kernel_trait.rst

+3-15
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,11 @@ Now it looks like this::
260260

261261
public function registerBundles(): iterable
262262
{
263-
yield FrameworkBundle();
264-
yield TwigBundle();
263+
yield new FrameworkBundle();
264+
yield new TwigBundle();
265265

266266
if ('dev' === $this->getEnvironment()) {
267-
yield WebProfilerBundle();
267+
yield new WebProfilerBundle();
268268
}
269269
}
270270

@@ -305,18 +305,6 @@ Now it looks like this::
305305
// (use 'annotation' as the second argument if you define routes as annotations)
306306
$routes->import(__DIR__.'/Controller/', 'attribute');
307307
}
308-
309-
// optional, to use the standard Symfony cache directory
310-
public function getCacheDir(): string
311-
{
312-
return __DIR__.'/../var/cache/'.$this->getEnvironment();
313-
}
314-
315-
// optional, to use the standard Symfony logs directory
316-
public function getLogDir(): string
317-
{
318-
return __DIR__.'/../var/log';
319-
}
320308
}
321309

322310
Before continuing, run this command to add support for the new dependencies:

0 commit comments

Comments
 (0)