diff --git a/.gitattributes b/.gitattributes index 9cbc09ba..f290ce9b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,5 @@ # Exclude files that don't need to be present in packages (so they're not downloaded by Composer) /.gitattributes export-ignore /.gitignore export-ignore -/Robofile.php export-ignore /*.md export-ignore /*.yml export-ignore diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4f41c60c..3a1f381d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,31 +22,15 @@ jobs: strategy: matrix: - php: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4] - symfony: [2.8, 3.4, 4, 5] + php: [7.0, 7.1, 7.2, 7.3, 7.4] + symfony: [3.4, 4, 5] exclude: - - php: 7.0 - symfony: 2.8 - - php: 7.1 - symfony: 2.8 - - php: 7.2 - symfony: 2.8 - - php: 7.3 - symfony: 2.8 - - php: 7.4 - symfony: 2.8 - - php: 5.6 - symfony: 3.4 - php: 7.3 symfony: 3.4 - php: 7.4 symfony: 3.4 - - php: 5.6 - symfony: 4 - php: 7.0 symfony: 4 - - php: 5.6 - symfony: 5 - php: 7.0 symfony: 5 - php: 7.1 @@ -63,14 +47,6 @@ jobs: extensions: pdo, mysql, sqlite coverage: none - - name: Checkout Symfony 2.8 Sample - if: matrix.symfony == 2.8 - uses: actions/checkout@v2 - with: - repository: Codeception/symfony-demo - path: framework-tests - ref: 2.1 - - name: Checkout Symfony 3.4 Sample if: matrix.symfony == 3.4 uses: actions/checkout@v2 @@ -113,13 +89,6 @@ jobs: composer require "symfony/browser-kit=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs composer install --prefer-dist --no-progress --no-interaction --no-suggest - - name: Database Symfony 2.8 - if: matrix.symfony == 2.8 - run: | - php app/console doctrine:schema:create -n --env test - php app/console doctrine:fixtures:load -n --env test - working-directory: framework-tests - - name: Database Symfony 3.4 if: matrix.symfony == 3.4 run: | @@ -131,11 +100,5 @@ jobs: php bin/console doctrine:schema:update --force -n working-directory: framework-tests - - name: Run test suite Symfony > 2.8 - if: matrix.symfony != 2.8 + - name: Run test suite Symfony run: php vendor/bin/codecept run functional -c framework-tests - - - name: Run test suite Symfony 2.8 - if: matrix.symfony == 2.8 - run: php vendor/bin/codecept run functional -c framework-tests/src/AppBundle - diff --git a/.travis.yml b/.travis.yml index d987ccfa..0f7cfcdc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,42 +1,27 @@ language: php php: - - 5.6 - 7.0 - 7.1 - 7.2 - 7.3 + - 7.4 env: global: - TEST_PATH='framework-tests' - SYMFONY_DEPRECATIONS_HELPER=weak matrix: - - VERSION=2.8 TEST_REPO='-b 2.1 https://github.com/Codeception/symfony-demo.git' SUITES=functional TEST_PATH=framework-tests/src/AppBundle - VERSION=3.4 TEST_REPO='--recurse-submodules https://github.com/Naktibalda/codeception-symfony-tests' - VERSION=4 TEST_REPO='https://github.com/Codeception/symfony-demo.git' SUITES=functional,unit - VERSION=5 TEST_REPO='-b symfony5 https://github.com/Codeception/symfony-demo.git' SUITES=functional,unit matrix: exclude: - - php: 7.0 - env: VERSION=2.8 TEST_REPO='-b 2.1 https://github.com/Codeception/symfony-demo.git' SUITES=functional TEST_PATH=framework-tests/src/AppBundle - - php: 7.1 - env: VERSION=2.8 TEST_REPO='-b 2.1 https://github.com/Codeception/symfony-demo.git' SUITES=functional TEST_PATH=framework-tests/src/AppBundle - - php: 7.2 - env: VERSION=2.8 TEST_REPO='-b 2.1 https://github.com/Codeception/symfony-demo.git' SUITES=functional TEST_PATH=framework-tests/src/AppBundle - php: 7.3 - env: VERSION=2.8 TEST_REPO='-b 2.1 https://github.com/Codeception/symfony-demo.git' SUITES=functional TEST_PATH=framework-tests/src/AppBundle - - php: 5.6 env: VERSION=3.4 TEST_REPO='--recurse-submodules https://github.com/Naktibalda/codeception-symfony-tests' - - php: 7.0 + - php: 7.4 env: VERSION=3.4 TEST_REPO='--recurse-submodules https://github.com/Naktibalda/codeception-symfony-tests' - - php: 7.3 - env: VERSION=3.4 TEST_REPO='--recurse-submodules https://github.com/Naktibalda/codeception-symfony-tests' - - php: 5.6 - env: VERSION=4 TEST_REPO='https://github.com/Codeception/symfony-demo.git' SUITES=functional,unit - php: 7.0 env: VERSION=4 TEST_REPO='https://github.com/Codeception/symfony-demo.git' SUITES=functional,unit - - php: 5.6 - env: VERSION=5 TEST_REPO='-b symfony5 https://github.com/Codeception/symfony-demo.git' SUITES=functional,unit - php: 7.0 env: VERSION=5 TEST_REPO='-b symfony5 https://github.com/Codeception/symfony-demo.git' SUITES=functional,unit - php: 7.1 @@ -62,8 +47,6 @@ install: - COMPOSER_MEMORY_LIMIT=-1 composer update -d framework-tests --no-dev --prefer-dist --no-interaction before_script: - mysql -e "create database symfony_test;" - - '[[ "$VERSION" != "2.8" ]] || php framework-tests/app/console doctrine:schema:create -n --env test' - - '[[ "$VERSION" != "2.8" ]] || php framework-tests/app/console doctrine:fixtures:load -n --env test' - '[[ "$VERSION" != "3.4" ]] || php framework-tests/bin/console doctrine:schema:update --force -n' - php ./vendor/bin/codecept build -c $TEST_PATH script: diff --git a/composer.json b/composer.json index c7927da1..cb311b3a 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ ], "minimum-stability": "RC", "require": { - "php": ">=5.6.0 <8.0", + "php": ">=7.0.8 <8.0", "codeception/lib-innerbrowser": "^1.3", "codeception/codeception": "^4.0" }, diff --git a/readme.md b/readme.md index be9236ed..baadf7bd 100644 --- a/readme.md +++ b/readme.md @@ -2,6 +2,7 @@ A Codeception module for Symfony framework. +[![Actions Status](https://github.com/Codeception/module-symfony/workflows/CI/badge.svg)](https://github.com/Codeception/module-symfony/actions) [![Build Status](https://travis-ci.org/Codeception/module-symfony.svg?branch=master)](https://travis-ci.org/Codeception/module-symfony) ## Installation diff --git a/src/Codeception/Module/Symfony.php b/src/Codeception/Module/Symfony.php index 37fb938a..73be23eb 100644 --- a/src/Codeception/Module/Symfony.php +++ b/src/Codeception/Module/Symfony.php @@ -29,7 +29,7 @@ * * ## Config * - * ### Symfony 4.x + * ### Symfony 5.x or 4.x * * * app_path: 'src' - in Symfony 4 Kernel is located inside `src` * * environment: 'local' - environment used for load kernel @@ -71,26 +71,6 @@ * environment: 'local_test' * * - * ### Symfony 2.x - * - * * app_path: 'app' - specify custom path to your app dir, where bootstrap cache and kernel interface is located. - * * environment: 'local' - environment used for load kernel - * * kernel_class: 'AppKernel' - kernel class name - * * debug: true - turn on/off debug mode - * * em_service: 'doctrine.orm.entity_manager' - use the stated EntityManager to pair with Doctrine Module. - * * cache_router: 'false' - enable router caching between tests in order to [increase performance](http://lakion.com/blog/how-did-we-speed-up-sylius-behat-suite-with-blackfire) - * * rebootable_client: 'true' - reboot client's kernel before each request - * * mailer: 'swiftmailer' - choose the mailer used by your application - * - * ### Example (`functional.suite.yml`) - Symfony 2.x Directory Structure - * - * ``` - * modules: - * - Symfony: - * app_path: 'app/front' - * environment: 'local_test' - * ``` - * * ## Public Properties * * * kernel - HttpKernel instance @@ -250,7 +230,7 @@ protected function onReconfigure($settings = []) public function _getEntityManager() { if ($this->kernel === null) { - $this->fail('Symfony2 platform module is not loaded'); + $this->fail('Symfony module is not loaded'); } if (!isset($this->permanentServices[$this->config['em_service']])) { // try to persist configured EM