Skip to content

Commit

Permalink
Merge pull request #38 from weierophinney/feature/zf3-compatibility
Browse files Browse the repository at this point in the history
Allow usage with v2 or v3 ZF components
  • Loading branch information
bakura10 authored Aug 17, 2016
2 parents 413e02f + 2c554b5 commit d6ce360
Show file tree
Hide file tree
Showing 20 changed files with 3,200 additions and 133 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ phpunit.xml
tmp/
vendor/
build/
composer.lock
composer.phar
65 changes: 54 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,68 @@
sudo: false

language: php

php:
- 5.5
- 5.6
- 7
- hhvm
cache:
directories:
- $HOME/.composer/cache
- vendor

env:
global:
- COMPOSER_ARGS="--no-interaction --ignore-platform-reqs"

matrix:
fast_finish: true
include:
- php: 5.6
env:
- DEPS=lowest
- php: 5.6
env:
- DEPS=locked
- TEST_COVERAGE=true
- php: 5.6
env:
- DEPS=latest
- php: 7
env:
- DEPS=lowest
- php: 7
env:
- DEPS=locked
- CS_CHECK=true
- php: 7
env:
- DEPS=latest
- php: hhvm
env:
- DEPS=lowest
- php: hhvm
env:
- DEPS=locked
- php: hhvm
env:
- DEPS=latest
allow_failures:
- php: hhvm

before_script:
- composer self-update
- composer update --prefer-source
before_install:
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
- travis_retry composer self-update

install:
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
- travis_retry composer install $COMPOSER_ARGS
- composer show

script:
- ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml
- ./vendor/bin/phpcs --standard=PSR2 ./src/ ./tests/
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; fi
- if [[ $TEST_COVERAGE != 'true' ]]; then composer test ; fi
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi

after_script:
- php vendor/bin/coveralls -v
- if [[ $TEST_COVERAGE == 'true' ]]; then composer upload-coverage ; fi

notifications:
irc: "irc.freenode.org#zftalk.modules"
Expand Down
8 changes: 0 additions & 8 deletions Module.php

This file was deleted.

39 changes: 25 additions & 14 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,37 @@
}
],
"require": {
"php": "^5.5 || ^7.0",
"zendframework/zend-eventmanager": "^2.6 || ^3.0",
"zendframework/zend-http": "^2.5.2",
"zendframework/zend-mvc": "^2.5.2",
"zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3"
"php": "^5.6 || ^7.0",
"zendframework/zend-eventmanager": "^2.6.3 || ^3.0.1",
"zendframework/zend-http": "^2.5.5",
"zendframework/zend-mvc": "^2.7.9 || ^3.0.2",
"zendframework/zend-servicemanager": "^2.7.6 || ^3.1.1"
},
"require-dev": {
"zendframework/zend-modulemanager": "^2.6.1",
"zendframework/zend-config": "^2.6",
"zendframework/zend-view": "^2.5.2",
"zendframework/zend-serializer": "^2.6",
"zendframework/zend-log": "^2.5.2",
"zendframework/zend-i18n": "^2.6",
"phpunit/phpunit": "^4.8",
"squizlabs/php_codesniffer": "1.4.*",
"satooshi/php-coveralls": "~0.6"
"zendframework/zend-i18n": "^2.7.3",
"zendframework/zend-log": "^2.9.1",
"zendframework/zend-modulemanager": "^2.7.2",
"zendframework/zend-serializer": "^2.8",
"zendframework/zend-view": "^2.8.1",
"phpunit/phpunit": "^4.8 || ^5.0",
"squizlabs/php_codesniffer": "^2.6.2",
"satooshi/php-coveralls": "^1.0.1"
},
"autoload": {
"psr-0": {
"ZfrCors\\": "src/"
}
},
"autoload-dev": {
"psr-0": {
"ZfrCorsTest\\": "tests/"
}
},
"scripts": {
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"test": "phpunit",
"test-coverage": "phpunit --coverage-clover build/logs/clover.xml",
"upload-coverage": "coveralls -v"
}
}
Loading

0 comments on commit d6ce360

Please sign in to comment.