mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/12620] Add a test using a custom DI extension in an extension
PHPBB3-12620
This commit is contained in:
31
tests/di/fixtures/ext/vendor/enabled_4/di/extension.php
vendored
Normal file
31
tests/di/fixtures/ext/vendor/enabled_4/di/extension.php
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace vendor\enabled_4\di;
|
||||
|
||||
use phpbb\extension\di\extension_base;
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
||||
|
||||
/**
|
||||
* Container core extension
|
||||
*/
|
||||
class extension extends extension_base
|
||||
{
|
||||
protected function load_services(ContainerBuilder $container)
|
||||
{
|
||||
$loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($this->ext_path)));
|
||||
$loader->load('environment.yml');
|
||||
}
|
||||
}
|
2
tests/di/fixtures/ext/vendor/enabled_4/environment.yml
vendored
Normal file
2
tests/di/fixtures/ext/vendor/enabled_4/environment.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
parameters:
|
||||
enabled_4: true
|
Reference in New Issue
Block a user