From 6dc287cb3c3b8d055a0a4889661ef2aeb0bbdfa8 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Wed, 15 Mar 2023 20:52:06 +0100 Subject: [PATCH] Add test against PHP 8.2 and exclude tests directories from autolaoder (#11) --- .gitattributes | 7 +++++++ .github/workflows/test.yaml | 1 + .travis.yml | 28 ---------------------------- composer.json | 15 ++++++++++++++- 4 files changed, 22 insertions(+), 29 deletions(-) create mode 100644 .gitattributes delete mode 100644 .travis.yml diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..0df9d23 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,7 @@ +/src/Goodby/CSV/Export/Tests export-ignore +/src/Goodby/CSV/Import/Tests export-ignore +/src/Goodby/CSV/TestHelper export-ignore +/php-cs-fixer.dist.php export-ignore +/phpunit.xml.dist export-ignore +/phpunit-bootstrap.php export-ignore +/rector.php export-ignore diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6e14b9d..5a3d061 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -28,6 +28,7 @@ jobs: - php-version: '7.4' - php-version: '8.0' - php-version: '8.1' + - php-version: '8.2' services: mysql: image: mysql:5.7 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d764e88..0000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: php - -matrix: - include: - - php: 5.3 - dist: precise - - php: 5.4 - dist: trusty - - php: 5.5 - dist: trusty - - php: 5.6 - dist: trusty - - php: 7.0 - dist: trusty - - php: 7.1 - dist: trusty -# PHP 7.2 can currently not been tested because of incompatibility with PHPUnit 3 -# atleast PHPUnit 7.0 would be needed which don't support 5.3 -# - php: 7.2 -# dist: trusty - -before_script: - - ./scripts/bundle-devtools.sh . - - export GOODBY_CSV_TEST_DB_HOST=127.0.0.1 - - export GOODBY_CSV_TEST_DB_USER=root - - export GOODBY_CSV_TEST_DB_PASS="" - - mysql -e 'create database goodby_csv_test' -script: ./vendor/bin/phpunit --coverage-text --configuration phpunit.xml.dist diff --git a/composer.json b/composer.json index 1a3dd34..db2d98b 100644 --- a/composer.json +++ b/composer.json @@ -33,11 +33,24 @@ "mockery/mockery": "^1.0", "suin/php-expose": "^1.0", "mikey179/vfsstream": "^1.1", - "rector/rector": "^0.12.5" + "rector/rector": "^0.12.5", + "phpspec/prophecy": "^1.14" }, "autoload": { "psr-0": { "Goodby\\CSV": "src/" + }, + "exclude-from-classmap": [ + "/src/Goodby/CSV/Export/Tests/", + "/src/Goodby/CSV/Import/Tests/", + "/src/Goodby/CSV/TestHelper/" + ] + }, + "autoload-dev": { + "psr-4": { + "Goodby\\CSV\\Export\\Tests\\": "src/Goodby/CSV/Export/Tests/", + "Goodby\\CSV\\Import\\Tests\\": "src/Goodby/CSV/Import/Tests/", + "Goodby\\CSV\\TestHelper\\": "src/Goodby/CSV/TestHelper/" } }, "replace": {