Skip to content

Commit

Permalink
Merge pull request #118 from Ocramius/feature/upgrade-dependencies
Browse files Browse the repository at this point in the history
Upgrade dependencies, minimum PHP version upgraded to 7.4
  • Loading branch information
Ocramius authored Mar 5, 2020
2 parents c4b240d + b3901c0 commit e511a3f
Show file tree
Hide file tree
Showing 12 changed files with 812 additions and 706 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/vendor/
/src/PackageVersions/Versions.php
/clover.xml
/infection-log.txt
/phpcs.xml
/.phpcs-cache
30 changes: 19 additions & 11 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
before_commands:
- "composer install --no-dev --prefer-source"
- "git branch -D master || true"
- "git checkout -b master"
- "composer install"

build:
environment:
php:
version: 7.4
nodes:
analysis:
dependencies:
before:
- "git branch -D master || true"
- "git checkout -b master"
tests:
override:
- php-scrutinizer-run

tools:
external_code_coverage:
timeout: 1200
php_code_coverage:
enabled: true
php_code_sniffer:
enabled: true
config:
standard: PSR2
filter:
paths: ["src/*", "tests/*"]
enabled: false
php_cpd:
enabled: true
excluded_dirs: ["test", "vendor"]
php_cs_fixer:
enabled: true
config:
level: all
filter:
paths: ["src/*", "tests/*"]
enabled: false
php_loc:
enabled: true
excluded_dirs: ["test", "vendor"]
Expand Down
5 changes: 0 additions & 5 deletions .travis.coverage.sh

This file was deleted.

14 changes: 8 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ language: php
sudo: false

php:
- 7.3
- 7.4

env:
- LOCKED_DEPENDENCIES=1
- DEPENDENCIES=""
- DEPENDENCIES="--prefer-lowest --prefer-stable"
- DEPENDENCIES="--classmap-authoritative"
Expand All @@ -17,15 +17,17 @@ before_script:
- git branch -D master || true
- git checkout -b master
- composer self-update
- composer update --prefer-dist $DEPENDENCIES
- if [[ $LOCKED_DEPENDENCIES = '1' ]]; then composer install; fi
- if [[ $LOCKED_DEPENDENCIES = '' ]]; then composer update $DEPENDENCIES; fi

script:
- ./vendor/bin/psalm
# TODO see https://github.com/vimeo/psalm/issues/1881 https://github.com/Ocramius/PackageVersions/issues/90 :
# - ! ./vendor/bin/psalm test/static-analysis/unhappy-path/unexpected-package-name.php
- ./vendor/bin/phpunit --disallow-test-output --coverage-clover ./clover.xml
- if [[ $TRAVIS_PHP_VERSION = '7.3' && $DEPENDENCIES = '' ]]; then ./vendor/bin/phpcs; fi
- if [[ $TRAVIS_PHP_VERSION = '7.3' && $DEPENDENCIES = '' ]]; then ./vendor/bin/infection; fi
- ./vendor/bin/phpunit --disallow-test-output --coverage-clover=clover.xml
- if [[ $LOCKED_DEPENDENCIES = '1' ]]; then ./vendor/bin/phpcs; fi
- if [[ $LOCKED_DEPENDENCIES = '1' ]]; then ./vendor/bin/infection --min-msi=100 --min-covered-msi=100; fi

after_script:
- sh .travis.coverage.sh
- if [[ $LOCKED_DEPENDENCIES = '1' ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [[ $LOCKED_DEPENDENCIES = '1' ]]; then php ocular.phar code-coverage:upload --format=php-clover ./clover.xml; fi
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
}
],
"require": {
"php": "^7.3.0",
"composer-plugin-api": "^1.0.0"
"php": "^7.4.0",
"composer-plugin-api": "^1.1.0"
},
"require-dev": {
"phpunit/phpunit": "^8.2.5",
"infection/infection": "^0.13.4",
"composer/composer": "^1.8.6",
"ext-zip": "*",
"doctrine/coding-standard": "^6.0.0",
"vimeo/psalm": "^3.4.9"
"phpunit/phpunit": "^9.0.1",
"infection/infection": "^0.15.3",
"composer/composer": "^1.9.3",
"ext-zip": "^1.15.0",
"doctrine/coding-standard": "^7.0.2",
"vimeo/psalm": "^3.9.3"
},
"autoload": {
"psr-4": {
Expand All @@ -34,7 +34,7 @@
"extra": {
"class": "PackageVersions\\Installer",
"branch-alias": {
"dev-master": "1.6.x-dev"
"dev-master": "1.99.x-dev"
}
},
"scripts": {
Expand Down
Loading

0 comments on commit e511a3f

Please sign in to comment.