Skip to content

Commit

Permalink
Merge pull request #34 from Ener-Getick/SF3
Browse files Browse the repository at this point in the history
Add symfony 3.0 support
  • Loading branch information
schmittjoh committed Dec 9, 2015
2 parents 6628774 + c6f027d commit 78000d0
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vendor
composer.lock
31 changes: 31 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
language: php

php:
- 5.3
- 5.4
- 5.5
- 5.6

sudo: false

cache:
directories:
- $HOME/.composer/cache/files

matrix:
fast_finish: true
include:
- php: 5.3
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_DEPRECATIONS_HELPER=weak
- php: 5.6
env: SYMFONY_VERSION='2.7.*'
- php: 5.6
env: SYMFONY_VERSION='2.8.*'

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

install: composer update $COMPOSER_FLAGS

script: phpunit
7 changes: 6 additions & 1 deletion DependencyInjection/Compiler/PointcutMatchingPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ private function processDefinition(Definition $definition, $pointcuts, &$interce
return;
}

if ($definition->getFactoryService() || $definition->getFactoryClass()) {
// Symfony 2.6 getFactory method
// TODO: Use only getFactory when bumping require to Symfony >= 2.6
if (method_exists($definition, 'getFactory') && $definition->getFactory()) {
return;
}
if (!method_exists($definition, 'getFactory') && ($definition->getFactoryService() || $definition->getFactoryClass())) {
return;
}

Expand Down
11 changes: 7 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,19 @@
}
],
"require": {
"symfony/framework-bundle": "2.*",
"php": ">=5.3.9",
"symfony/framework-bundle": "^2.3|^3.0",
"jms/cg": "^1.1"
},
"require-dev": {
"symfony/phpunit-bridge": "^2.7"
},
"autoload": {
"psr-0": { "JMS\\AopBundle": "" }
"psr-4": { "JMS\\AopBundle\\": "" }
},
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
}
},
"target-dir": "JMS/AopBundle"
}
}
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="./../../../../../app/bootstrap.php.cache"
bootstrap="vendor/autoload.php"
>

<testsuites>
Expand Down

0 comments on commit 78000d0

Please sign in to comment.