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
cache:
directories:
- $HOME/.composer/cache/files
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
env:
global:
- COMPOSER_ROOT_VERSION="1.x-dev"
- REQUIRE_RECIPE="4.x-dev"
- PHPUNIT_TEST=1

View File

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

View File

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

View File

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