add dependencies

This commit is contained in:
2021-04-20 23:07:03 +02:00
parent 124cd52cc1
commit 891d8acf20
3 changed files with 10 additions and 37 deletions

View File

@@ -13,9 +13,7 @@
"require": { "require": {
"php": "^7.2 || ^8.0", "php": "^7.2 || ^8.0",
"contao/core-bundle": "^4.9", "contao/core-bundle": "^4.9",
"symfony/config": "^4.4 || ^5.1", "contao/news-bundle": "^4.9"
"symfony/dependency-injection": "^4.4 || ^5.1",
"symfony/http-kernel": "^4.4 || ^5.1"
}, },
"conflict": { "conflict": {
"contao/manager-plugin": "<2.0 || >=3.0" "contao/manager-plugin": "<2.0 || >=3.0"
@@ -24,5 +22,8 @@
"psr-4": { "psr-4": {
"Jr\\FalsBundle\\": "src/" "Jr\\FalsBundle\\": "src/"
} }
},
"extra": {
"contao-manager-plugin": "Jr\\FalsBundle\\ContaoManager\\Plugin"
} }
} }

View File

@@ -12,19 +12,22 @@ declare(strict_types=1);
namespace Jr\FalsBundle\ContaoManager; namespace Jr\FalsBundle\ContaoManager;
use Jr\FalsBundle\JrFalsBundle;
use Contao\CoreBundle\ContaoCoreBundle; use Contao\CoreBundle\ContaoCoreBundle;
use Contao\ManagerPlugin\Bundle\BundlePluginInterface; use Contao\ManagerPlugin\Bundle\BundlePluginInterface;
use Contao\ManagerPlugin\Bundle\Config\BundleConfig; use Contao\ManagerPlugin\Bundle\Config\BundleConfig;
use Contao\ManagerPlugin\Bundle\Parser\ParserInterface; use Contao\ManagerPlugin\Bundle\Parser\ParserInterface;
use Jr\FalsBundle\JrFalsBundle; use Contao\NewsBundle\ContaoNewsBundle;
class Plugin implements BundlePluginInterface class Plugin implements BundlePluginInterface
{ {
public function getBundles(ParserInterface $parser) public function getBundles(ParserInterface $parser)
{ {
return [ return [
BundleConfig::create(JrFalsBundle::class) BundleConfig::create(JrFalsBundle::class)->setLoadAfter([
->setLoadAfter([ContaoCoreBundle::class]), ContaoCoreBundle::class,
ContaoNewsBundle::class
]),
]; ];
} }
} }

View File

@@ -1,31 +0,0 @@
<?php
declare(strict_types=1);
/*
* This file is part of [package name].
*
* (c) John Doe
*
* @license LGPL-3.0-or-later
*/
namespace Jr\FalsBundle\DependencyInjection;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
class JrFalsExtension extends Extension
{
public function load(array $mergedConfig, ContainerBuilder $container): void
{
$loader = new YamlFileLoader(
$container,
new FileLocator(__DIR__.'/../Resources/config')
);
$loader->load('services.yml');
}
}