mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-03-31 15:07:47 +01:00
update namespaces
This commit is contained in:
@@ -12,13 +12,13 @@ final class Configuration implements ConfigurationInterface
|
||||
*/
|
||||
public function getConfigTreeBuilder()
|
||||
{
|
||||
$treeBuilder = new TreeBuilder('notify_pnotify');
|
||||
$treeBuilder = new TreeBuilder('flasher_pnotify');
|
||||
|
||||
if (\method_exists($treeBuilder, 'getRootNode')) {
|
||||
$rootNode = $treeBuilder->getRootNode();
|
||||
} else {
|
||||
// BC layer for symfony/config 4.1 and older
|
||||
$rootNode = $treeBuilder->root('notify_pnotify');
|
||||
$rootNode = $treeBuilder->root('flasher_pnotify');
|
||||
}
|
||||
|
||||
$rootNode
|
||||
|
||||
+5
-5
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
|
||||
use Symfony\Component\DependencyInjection\Loader;
|
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
|
||||
final class NotifyPnotifyExtension extends Extension implements PrependExtensionInterface
|
||||
final class FlasherPnotifyExtension extends Extension implements PrependExtensionInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
@@ -18,7 +18,7 @@ final class NotifyPnotifyExtension extends Extension implements PrependExtension
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
||||
$loader->load('services.yaml');
|
||||
$loader->load('config.yaml');
|
||||
|
||||
$configuration = new Configuration();
|
||||
$this->processConfiguration($configuration, $configs);
|
||||
@@ -29,14 +29,14 @@ final class NotifyPnotifyExtension extends Extension implements PrependExtension
|
||||
*/
|
||||
public function prepend(ContainerBuilder $container)
|
||||
{
|
||||
if (!$container->hasExtension('notify')) {
|
||||
throw new \RuntimeException('[Flasher\SymfonyFlasher\PrimeBundle] is not registered');
|
||||
if (!$container->hasExtension('flasher')) {
|
||||
throw new \RuntimeException('[Flasher\Symfony\FlasherBundle] is not registered');
|
||||
}
|
||||
|
||||
$configs = $container->getExtensionConfig($this->getAlias());
|
||||
$config = $this->processConfiguration(new Configuration(), $configs);
|
||||
|
||||
$container->prependExtensionConfig('notify', array(
|
||||
$container->prependExtensionConfig('flasher', array(
|
||||
'adapters' => array(
|
||||
'pnotify' => $config,
|
||||
),
|
||||
@@ -4,6 +4,6 @@ namespace Flasher\Pnotify\Symfony;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class NotifyPnotifyBundle extends Bundle
|
||||
class FlasherPnotifyBundle extends Bundle
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
services:
|
||||
flasher.factory.pnotify:
|
||||
parent: 'flasher.abstract_factory'
|
||||
class: Flasher\Pnotify\Prime\PnotifyFactory
|
||||
tags:
|
||||
- { name: 'flasher.factory' }
|
||||
|
||||
flasher.renderer.pnotify:
|
||||
class: Flasher\PFlasher\Prime\PnotifyRenderer
|
||||
arguments:
|
||||
- '@flasher.config'
|
||||
tags:
|
||||
- { name: 'flasher.renderer' }
|
||||
|
||||
Flasher\PFlasher\Prime\PnotifyFactory: '@flasher.factory.pnotify'
|
||||
Flasher\PFlasher\Prime\PnotifyRenderer: '@flasher.renderer.pnotify'
|
||||
@@ -1,16 +0,0 @@
|
||||
services:
|
||||
flasher.factory.pnotify:
|
||||
parent: 'flasher.factory.abstract'
|
||||
class: Flasher\PFlasher\Prime\TestsProducer\PnotifyProducer
|
||||
tags:
|
||||
- { name: 'flasher.factory', alias: 'pnotify' }
|
||||
|
||||
flasher.renderer.pnotify:
|
||||
class: Flasher\PFlasher\Prime\Renderer\PnotifyRenderer
|
||||
arguments:
|
||||
- '@flasher.config'
|
||||
tags:
|
||||
- { name: 'flasher.renderer', alias: 'pnotify' }
|
||||
|
||||
Flasher\PFlasher\Prime\TestsProducer\PnotifyProducer: '@flasher.factory.pnotify'
|
||||
Flasher\PFlasher\Prime\Renderer\PnotifyRenderer: '@flasher.renderer.pnotify'
|
||||
+8
-8
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "php-flasher/flasher-symfony-pnotify",
|
||||
"name": "php-flasher/flasher-pnotify-symfony",
|
||||
"type": "symfony-bundle",
|
||||
"description": "Symfony Flasher adapter for pnotify.js library for php-flasher/flasher-symfony",
|
||||
"keywords": [
|
||||
@@ -29,20 +29,20 @@
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": ">=5.3",
|
||||
"php-flasher/flasher-symfony": "^1.0",
|
||||
"php-flasher/flasher-pnotify": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "4.8.36"
|
||||
"php-flasher/flasher-symfony": "dev-main",
|
||||
"php-flasher/flasher-pnotify": "dev-main"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Flasher\\Symfony\\Pnotify\\": "src/"
|
||||
"Flasher\\Pnotify\\Symfony\\": "",
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Flasher\\Symfony\\Pnotify\\Tests\\": "tests/"
|
||||
"Flasher\\Pnotify\\Symfony\\Tests\\": "Tests/"
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
|
||||
Reference in New Issue
Block a user