Skip to content

add use statement for the needed extension class #13607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions bundles/extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,13 @@ I/O operations and increases the application performance.
Your bundles can also add their own classes into this file thanks to the
``addClassesToCompile()`` and ``addAnnotatedClassesToCompile()`` methods (both
work in the same way, but the second one is for classes that contain PHP
annotations). Define the classes to compile as an array of their fully qualified
class names::
annotations). These methods are provied by the ``Extension`` class from the
HttpKernel component. Define the classes to compile as an array of their
fully qualified class names::

use AppBundle\Manager\UserManager;
use AppBundle\Utils\Slugger;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

// ...
public function load(array $configs, ContainerBuilder $container)
Expand Down Expand Up @@ -182,6 +184,8 @@ class names::

The classes to compile can also be added using file path patterns::

use Symfony\Component\HttpKernel\DependencyInjection\Extension;

// ...
public function load(array $configs, ContainerBuilder $container)
{
Expand Down