Skip to content

Commit

Permalink
Merge branch 'deprecate-php5'
Browse files Browse the repository at this point in the history
  • Loading branch information
sanpii committed Jan 17, 2018
2 parents 9ab0513 + 44a6726 commit 22e98b5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions UPGRADE-3.0.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
UPGRADE FROM 2.x to 3.0
=======================

* PHP 5 is not yet supported, please upgrade to PHP 7

### Configuration

* `class:session_builder` has been removed in favour of defining session builder as a service, this is to support the
Expand Down
9 changes: 9 additions & 0 deletions sources/lib/PommBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,21 @@ public function build(ContainerBuilder $container)
{
parent::build($container);

$this->checkPhpVersion();

$container->addCompilerPass(new DependencyInjection\Compiler\ProfilerPass);
$container->addCompilerPass(new DependencyInjection\Compiler\PoolerPass);
$container->addCompilerPass(new DependencyInjection\Compiler\ModelPass);
$container->addCompilerPass(new DependencyInjection\Compiler\BuilderPass);
}

private function checkPhpVersion()
{
if (PHP_MAJOR_VERSION === 5) {
@trigger_error('The pomm bundle stop supporting PHP5 in version 3.0', E_USER_DEPRECATED);
}
}

/**
* getContainerExtension
*
Expand Down

0 comments on commit 22e98b5

Please sign in to comment.