@@ -25,6 +25,11 @@ |
||
| 25 | 25 | $this->addTagged($container, 'pomm.model_layer', 'pomm.pooler.model_layer', 'getModelLayer'); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | + /** |
|
| 29 | + * @param string $tag |
|
| 30 | + * @param string $defaultServiceId |
|
| 31 | + * @param string $method |
|
| 32 | + */ |
|
| 28 | 33 | private function addTagged(DI\ContainerBuilder $container, $tag, $defaultServiceId, $method) |
| 29 | 34 | { |
| 30 | 35 | /** @var DI\Definition[] $definitions */ |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | public function configure(Pomm $pomm) |
| 40 | 40 | { |
| 41 | 41 | foreach ($pomm->getSessionBuilders() as $name => $builder) { |
| 42 | - $pomm->addPostConfiguration($name, function (Session $session) { |
|
| 42 | + $pomm->addPostConfiguration($name, function(Session $session) { |
|
| 43 | 43 | foreach ($this->poolers as $pooler) { |
| 44 | 44 | $session->registerClientPooler($pooler); |
| 45 | 45 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function load(array $configs, ContainerBuilder $container) |
| 37 | 37 | { |
| 38 | - $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 38 | + $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 39 | 39 | $loader->load('services/pomm.yml'); |
| 40 | 40 | |
| 41 | 41 | $loader->load('services/profiler.yml'); |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | ->defaultNull() |
| 47 | 47 | ->beforeNormalization() |
| 48 | 48 | ->always() |
| 49 | - ->then(function ($v) { |
|
| 49 | + ->then(function($v) { |
|
| 50 | 50 | @trigger_error('class:session_builder is deprecated since version 2.3 and will be removed in 3.0. Use session_builder config key instead with a service id.', E_USER_DEPRECATED); |
| 51 | 51 | return $v; |
| 52 | 52 | }) |
@@ -56,14 +56,14 @@ discard block |
||
| 56 | 56 | ->scalarNode('pomm:default')->end() |
| 57 | 57 | ->end() |
| 58 | 58 | ->validate() |
| 59 | - ->ifTrue(function ($v) { |
|
| 59 | + ->ifTrue(function($v) { |
|
| 60 | 60 | return isset($v['session_builder']) && isset($v['class:session_builder']); |
| 61 | 61 | }) |
| 62 | 62 | ->thenInvalid('You cannot use both "session_builder" and "class:session_builder" at the same time.') |
| 63 | 63 | ->end() |
| 64 | 64 | ->beforeNormalization() |
| 65 | 65 | ->always() |
| 66 | - ->then(function ($v) { |
|
| 66 | + ->then(function($v) { |
|
| 67 | 67 | if (!isset($v['session_builder']) && !isset($v['class:session_builder'])) { |
| 68 | 68 | $v['session_builder'] = 'pomm.model_manager.session_builder'; |
| 69 | 69 | } |
@@ -11,7 +11,6 @@ |
||
| 11 | 11 | |
| 12 | 12 | use Symfony\Component\HttpKernel\Bundle\Bundle; |
| 13 | 13 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
| 14 | -use Symfony\Component\DependencyInjection\Compiler\PassConfig; |
|
| 15 | 14 | |
| 16 | 15 | /** |
| 17 | 16 | * PommBundle |
@@ -14,7 +14,6 @@ |
||
| 14 | 14 | use Symfony\Component\Routing\Generator\UrlGeneratorInterface; |
| 15 | 15 | use Symfony\Component\HttpKernel\Profiler\Profiler; |
| 16 | 16 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
| 17 | - |
|
| 18 | 17 | use PommProject\Foundation\Pomm; |
| 19 | 18 | |
| 20 | 19 | /** |
@@ -70,6 +70,9 @@ |
||
| 70 | 70 | $this->watch($name); |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | + /** |
|
| 74 | + * @param string $name |
|
| 75 | + */ |
|
| 73 | 76 | private function watch($name) |
| 74 | 77 | { |
| 75 | 78 | if ($this->stopwatch !== null) { |
@@ -11,9 +11,7 @@ |
||
| 11 | 11 | namespace PommProject\PommBundle; |
| 12 | 12 | |
| 13 | 13 | use PommProject\Foundation\Exception\SqlException; |
| 14 | -use PommProject\Foundation\Listener\Listener; |
|
| 15 | 14 | use PommProject\Foundation\Session\Session; |
| 16 | - |
|
| 17 | 15 | use Symfony\Component\Stopwatch\Stopwatch; |
| 18 | 16 | use Symfony\Component\HttpFoundation\Request; |
| 19 | 17 | use Symfony\Component\HttpFoundation\Response; |
@@ -10,6 +10,6 @@ |
||
| 10 | 10 | |
| 11 | 11 | namespace PommProject\PommBundle\PropertyInfo\Extractor; |
| 12 | 12 | |
| 13 | -@trigger_error('The '.__NAMESPACE__.'\PommExtractor class is deprecated since version 2.3 and will be removed in 3.0. Use the '.__NAMESPACE__.'\TypeExtractor class instead.', E_USER_DEPRECATED); |
|
| 13 | +@trigger_error('The ' . __NAMESPACE__ . '\PommExtractor class is deprecated since version 2.3 and will be removed in 3.0. Use the ' . __NAMESPACE__ . '\TypeExtractor class instead.', E_USER_DEPRECATED); |
|
| 14 | 14 | |
| 15 | 15 | class_alias(__NAMESPACE__ . '\TypeExtractor', __NAMESPACE__ . '\PommExtractor'); |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | $callable = [$this->datacollector, 'execute']; |
| 41 | 41 | |
| 42 | 42 | foreach ($pomm->getSessionBuilders() as $name => $builder) { |
| 43 | - $pomm->addPostConfiguration($name, function ($session) use ($callable) { |
|
| 43 | + $pomm->addPostConfiguration($name, function($session) use ($callable) { |
|
| 44 | 44 | $session |
| 45 | 45 | ->getClientUsingPooler('listener', 'query') |
| 46 | 46 | ->attachAction($callable) |