MNT Add support for symphony 4 and switch to shared travis config (#199)

* MNT Add support for symphony 4 and switch to shared travis config

* Specify DB

* Update phpunit config

* Don't test php 8

* Pleasing PHP8

* Use correct syntax for composer OR constraints

* Doing the constraint right ... maybe

Co-authored-by: Steve Boyd <emteknetnz@gmail.com>

Co-authored-by: Steve Boyd <emteknetnz@gmail.com>
This commit is contained in:
Maxime Rainville 2021-03-16 15:31:47 +13:00 committed by GitHub
parent bc581dc248
commit efdd90b197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 39 deletions

View File

@ -1,34 +1,10 @@
language: php version: ~> 1.0
dist: xenial import:
- silverstripe/silverstripe-travis-shared:config/provision/standard-jobs-fixed.yml
sudo: false env:
global:
cache: - COMPOSER_ROOT_VERSION="1.x-dev"
directories: - REQUIRE_RECIPE="4.x-dev"
- $HOME/.composer/cache/files - PHPUNIT_TEST=1
matrix:
include:
- php: 7.1
env: PHPUNIT_TEST=1
- php: 7.2
env: PHPUNIT_TEST=1
- php: 7.3
env: PHPUNIT_TEST=1 PHPCS_TEST=1
- php: 7.4
env: PHPUNIT_TEST=1
before_script:
- export PATH=~/.composer/vendor/bin:$PATH
- composer validate
- composer install --prefer-dist
- composer require --prefer-dist --no-update silverstripe/recipe-core:^4
- composer update
- if [[ $PHPCS_TEST ]]; then composer global require squizlabs/php_codesniffer:^3 --prefer-dist --no-interaction --no-progress --no-suggest -o; fi
- phpenv rehash
script:
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit tests/php; fi
- if [[ $PHPCS_TEST ]]; then composer run-script lint; fi

View File

@ -27,10 +27,10 @@
"behat/mink": "^1.7", "behat/mink": "^1.7",
"behat/mink-extension": "^2.1", "behat/mink-extension": "^2.1",
"silverstripe/mink-facebook-web-driver": "^1", "silverstripe/mink-facebook-web-driver": "^1",
"symfony/dom-crawler": "^3", "symfony/dom-crawler": "^3 || ^4",
"silverstripe/testsession": "^2.2", "silverstripe/testsession": "^2.2",
"silverstripe/framework": "^4", "silverstripe/framework": "^4",
"symfony/finder": "^3.2" "symfony/finder": "^3.2 || ^4"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

View File

@ -1,5 +1,6 @@
<phpunit colors="true"> <?xml version="1.0" encoding="UTF-8"?>
<testsuite name="Default"> <phpunit bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true">
<directory>tests/php</directory> <testsuite name="Default">
</testsuite> <directory>tests/php</directory>
</testsuite>
</phpunit> </phpunit>

View File

@ -87,7 +87,7 @@ abstract class SilverStripeContext extends MinkContext implements SilverStripeAw
*/ */
public function __construct(array $parameters = null) public function __construct(array $parameters = null)
{ {
if (!preg_match('/\\FeatureContext$/', get_class($this))) { if (!preg_match('/\\\FeatureContext$/', get_class($this))) {
throw new InvalidArgumentException( throw new InvalidArgumentException(
'Subclasses of SilverStripeContext must be named FeatureContext. Found "' . get_class($this) . '""' 'Subclasses of SilverStripeContext must be named FeatureContext. Found "' . get_class($this) . '""'
); );