-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
hasPRA Pull Request has already been submitted for this issue.A Pull Request has already been submitted for this issue.
Milestone
Description
In the documentation for Compiler Passes in Bundles, the example shows:
// src/MyBundle/MyBundle.php
namespace App\MyBundle;
use App\DependencyInjection\Compiler\CustomPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class MyBundle extends Bundle
{
public function build(ContainerBuilder $container): void
{
parent::build($container);
$container->addCompilerPass(new CustomPass());
}
}However, the call to the parent function is unnecessary because the Bundle class's implementation of the function is empty:
/**
* This method can be overridden to register compilation passes,
* other extensions, ...
*
* @return void
*/
public function build(ContainerBuilder $container)
{
}Also, shouldn't anything related to bundles in documentation of 6.1 and beyond be extending AbstractBundle?
Metadata
Metadata
Assignees
Labels
hasPRA Pull Request has already been submitted for this issue.A Pull Request has already been submitted for this issue.