Skip to content

Commit

Permalink
Merge pull request #45 from BgdB/symfony-beta
Browse files Browse the repository at this point in the history
Added support for Symfony 4. #SymfonyConHackday2017
  • Loading branch information
schmittjoh authored Jan 16, 2018
2 parents 78000d0 + 40cb856 commit 4ee2089
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
15 changes: 13 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
language: php

php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1

sudo: false

Expand All @@ -16,16 +17,26 @@ matrix:
fast_finish: true
include:
- php: 5.3
dist: precise
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_DEPRECATIONS_HELPER=weak
# test 2.7 LTS
- php: 5.6
env: SYMFONY_VERSION='2.7.*'
# test 2.8 LTS
- php: 5.6
env: SYMFONY_VERSION='2.8.*'
# test the latest stable 3.x release
- php: 5.6
env: SYMFONY_VERSION=^3.0
# test the latest release (including beta releases)
- php: 7.1
env: DEPENDENCIES=beta

before_install:
- if [ "$DEPENDENCIES" = "beta" ]; then composer config minimum-stability beta; fi;
- composer self-update
- if [ "$SYMFONY_VERSION" != "" ]; then composer require --dev --no-update symfony/symfony=$SYMFONY_VERSION; fi

install: composer update $COMPOSER_FLAGS

script: phpunit
script: ./vendor/bin/phpunit
6 changes: 3 additions & 3 deletions Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
</parameters>

<services>
<service id="jms_aop.pointcut_container" class="JMS\AopBundle\Aop\PointcutContainer" />
<service id="jms_aop.interceptor_loader" class="%jms_aop.interceptor_loader.class%">
<service id="jms_aop.pointcut_container" class="JMS\AopBundle\Aop\PointcutContainer" public="true" />

<service id="jms_aop.interceptor_loader" class="%jms_aop.interceptor_loader.class%" public="true" >
<argument type="service" id="service_container" />
</service>
</services>
Expand Down
7 changes: 4 additions & 3 deletions Tests/Aop/InterceptorLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
namespace JMS\AopBundle\Tests\Aop;

use JMS\AopBundle\Aop\InterceptorLoader;
use PHPUnit\Framework\TestCase;

class InterceptorLoaderTest extends \PHPUnit_Framework_TestCase
class InterceptorLoaderTest extends TestCase
{
public function testLoadInterceptors()
{
$interceptor = $this->getMock('CG\Proxy\MethodInterceptorInterface');
$interceptor = $this->getMockBuilder('CG\Proxy\MethodInterceptorInterface')->getMock();

list($loader, $container) = $this->getLoader(array(
'JMS\AopBundle\Tests\Aop\InterceptorLoaderTestClass' => array(
Expand All @@ -48,7 +49,7 @@ public function testLoadInterceptors()

private function getLoader(array $interceptors = array())
{
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
$container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerInterface')->getMock();

return array(new InterceptorLoader($container, $interceptors), $container);
}
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
],
"require": {
"php": ">=5.3.9",
"symfony/framework-bundle": "^2.3|^3.0",
"symfony/framework-bundle": "^2.3 || ^3.0 || ^4.0",
"jms/cg": "^1.1"
},
"require-dev": {
"symfony/phpunit-bridge": "^2.7"
"symfony/phpunit-bridge": "^2.7 || ^4.0",
"phpunit/phpunit": "^4.8.36 | ^5.0"
},
"autoload": {
"psr-4": { "JMS\\AopBundle\\": "" }
Expand Down

0 comments on commit 4ee2089

Please sign in to comment.