Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Symfony 4 components, and test on all three versions of Symfony. #11

Merged
merged 6 commits into from Dec 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -47,4 +47,4 @@
# Backup entities generated with doctrine:generate:entities command
*/Entity/*~

.idea
.idea
33 changes: 18 additions & 15 deletions .travis.yml
@@ -1,36 +1,39 @@
language: php

branches:
# Only test the master branch and SemVer tags.
only:
- master
- /^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+.*$/

matrix:
fast_finish: true
include:
- php: 7.2
env: 'SCENARIO=symfony4 HIGHEST_LOWEST="update"'
- php: 7.1
env: dependencies=highest
- php: 7.1
- php: 7.0
env: 'SCENARIO=symfony4'
- php: 7.0.11
env: 'HIGHEST_LOWEST="update"'
- php: 7.0.11
- php: 5.6
- php: 5.5
env: dependencies=lowest
- php: 5.4
env: dependencies=lowest
env: 'SCENARIO=symfony2 HIGHEST_LOWEST="update --prefer-lowest'

sudo: false

cache:
apt: true
directories:
- "$HOME/.composer/cache"
- "vendor"

before_install:
- composer selfupdate

install:
# Load composer dependencies.
- composer validate --no-check-all --ansi
- if [ -z "$dependencies" ]; then composer install --prefer-dist --optimize-autoloader -n; fi;
- if [ "$dependencies" = "lowest" ]; then composer update --prefer-dist --prefer-lowest --optimize-autoloader -n; fi;
- if [ "$dependencies" = "highest" ]; then composer update --prefer-dist --optimize-autoloader -n; fi;
- 'composer scenario "${SCENARIO}" "${HIGHEST_LOWEST-install}"'

script:
- ./scripts/run-tests.sh
- composer test

after_success:
- ./vendor/bin/coveralls -vvv
- travis_retry php vendor/bin/coveralls -v
38 changes: 32 additions & 6 deletions composer.json
Expand Up @@ -4,7 +4,7 @@
"type": "library",
"require": {
"php": ">=5.4",
"symfony/yaml": "^2.8.11|^3",
"symfony/yaml": "^2.8.11|^3|^4",
"dflydev/dot-access-data": "^1.1.0"
},
"license": "MIT",
Expand All @@ -13,17 +13,43 @@
"name": "Matthew Grasmick"
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"minimum-stability": "stable",
"autoload": {
"psr-4": {
"Grasmash\\YamlExpander\\": "src/"
}
},
"require-dev": {
"squizlabs/php_codesniffer": "^2.7",
"phpunit/phpunit": "^4.8|^5.5.4",
"satooshi/php-coveralls": "^1.0"
"phpunit/phpunit": "^4.8|^5.5.4",
"satooshi/php-coveralls": "^1.0.2|dev-master",
"greg-1-anderson/composer-test-scenarios": "^1",
"squizlabs/php_codesniffer": "^2.7"
},
"scripts": {
"cs": "phpcs -n --standard=PSR2 src tests --exclude=Generic.Files.LineLength",
"cbf": "phpcbf -n --standard=PSR2 src tests --exclude=Generic.Files.LineLength",
"unit": "phpunit",
"lint": [
"find src -name '*.php' -print0 | xargs -0 -n1 php -l",
"find tests -name '*.php' -print0 | xargs -0 -n1 php -l"
],
"test": [
"@lint",
"@unit",
"@cs"
],
"scenario": "scenarios/install",
"post-update-cmd": [
"create-scenario symfony4 'symfony/console:^4.0'",
"create-scenario symfony2 'symfony/console:^2.8' --platform-php '5.4' --no-lockfile"
]
},
"config": {
"optimize-autoloader": true,
"sort-packages": true,
"platform": {
"php": "5.5.9"
}
},
"extra": {
"branch-alias": {
Expand Down