AddAnnotatedClassesToCachePass.php
1 year ago
ConfigurableExtension.php
2 years ago
ControllerArgumentValueResolverPass.php
2 years ago
Extension.php
2 years ago
FragmentRendererPass.php
1 year ago
LazyLoadingFragmentHandler.php
1 year ago
LoggerPass.php
1 year ago
MergeExtensionConfigurationPass.php
2 years ago
RegisterControllerArgumentLocatorsPass.php
1 year ago
RegisterLocaleAwareServicesPass.php
2 years ago
RemoveEmptyControllerArgumentLocatorsPass.php
1 year ago
ResettableServicePass.php
1 year ago
ServicesResetter.php
2 years ago
LoggerPass.php
36 lines
| 1 | <?php |
| 2 | |
| 3 | /* |
| 4 | * This file is part of the Symfony package. |
| 5 | * |
| 6 | * (c) Fabien Potencier <fabien@symfony.com> |
| 7 | * |
| 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | * file that was distributed with this source code. |
| 10 | */ |
| 11 | namespace Matomo\Dependencies\Symfony\Component\HttpKernel\DependencyInjection; |
| 12 | |
| 13 | use Matomo\Dependencies\Psr\Log\LoggerInterface; |
| 14 | use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; |
| 15 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
| 16 | use Matomo\Dependencies\Symfony\Component\HttpKernel\Log\Logger; |
| 17 | /** |
| 18 | * Registers the default logger if necessary. |
| 19 | * |
| 20 | * @author Kévin Dunglas <dunglas@gmail.com> |
| 21 | */ |
| 22 | class LoggerPass implements CompilerPassInterface |
| 23 | { |
| 24 | /** |
| 25 | * {@inheritdoc} |
| 26 | */ |
| 27 | public function process(ContainerBuilder $container) |
| 28 | { |
| 29 | $container->setAlias(LoggerInterface::class, 'logger')->setPublic(\false); |
| 30 | if ($container->has('logger')) { |
| 31 | return; |
| 32 | } |
| 33 | $container->register('logger', Logger::class)->setPublic(\false); |
| 34 | } |
| 35 | } |
| 36 |