From 427cca5126e352fb776f810befc0569ba42575ae Mon Sep 17 00:00:00 2001 From: Roger Campanera Date: Fri, 8 Dec 2017 19:50:03 +0000 Subject: [PATCH 1/4] Update travis config --- .travis.yml | 61 ++++++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/.travis.yml b/.travis.yml index bc06b36..a8348d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,45 +1,48 @@ language: php php: - - 5.3 - - 5.4 - - 5.5 + - 5.6 + - 7.0 + - 7.1 -env: - global: - - PLUGIN_NAME=Tags - - DB=mysql - - REQUIRE="phpunit/phpunit:3.7.31" +sudo: false +env: matrix: - - DB=mysql CAKE_VERSION=master + - DB=mysql db_dsn='mysql://travis@0.0.0.0/cakephp_test' + - DB=pgsql db_dsn='postgres://postgres@127.0.0.1/cakephp_test' + - DB=sqlite db_dsn='sqlite:///:memory:' + + global: + - DEFAULT=1 matrix: + fast_finish: true + include: - - php: 5.3 - env: - - CAKE_VERSION=master - - php: 5.4 - env: - - CAKE_VERSION=master - - php: 5.5 - env: - - CAKE_VERSION=master + - php: 5.6 + env: PHPCS=1 DEFAULT=0 + + - php: 5.6 + env: COVERALLS=1 DEFAULT=0 DB=mysql db_dsn='mysql://travis@0.0.0.0/cakephp_test' before_script: - - git clone https://github.com/burzum/travis.git --depth 1 ../travis - - ../travis/before_script.sh - - if [ "$PHPCS" != 1 ]; then - echo " - require_once APP . DS . 'vendor' . DS . 'phpunit' . DS . 'phpunit' . DS . 'PHPUnit' . DS . 'Autoload.php'; - " >> ../cakephp/app/Config/bootstrap.php; - fi + - composer self-update + - composer install --prefer-dist --no-interaction -script: - - ../travis/script.sh + - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test; GRANT ALL PRIVILEGES ON cakephp_test.* TO travis@localhost;'; fi" + - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi" + + - sh -c "if [ '$PHPCS' = '1' ]; then composer require 'cakephp/cakephp-codesniffer:@stable'; fi" -after_success: - - ../travis/after_success.sh + - sh -c "if [ '$COVERALLS' = '1' ]; then composer require --dev 'satooshi/php-coveralls:@stable'; fi" + - sh -c "if [ '$COVERALLS' = '1' ]; then mkdir -p build/logs; fi" + +script: + - sh -c "if [ '$DEFAULT' = '1' ]; then ./vendor/bin/phpunit --stderr; fi" + - sh -c "if [ '$PHPCS' = '1' ]; then ./vendor/bin/phpcs -p -n --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi" + - sh -c "if [ '$COVERALLS' = '1' ]; then ./vendor/bin/phpunit --stderr --coverage-clover build/logs/clover.xml; fi" + - sh -c "if [ '$COVERALLS' = '1' ]; then php vendor/bin/coveralls -c .coveralls.yml -v; fi" notifications: email: false From 701d42494fbe197c3043495336b8cc67dda5ed35 Mon Sep 17 00:00:00 2001 From: Roger Campanera Date: Fri, 8 Dec 2017 20:05:09 +0000 Subject: [PATCH 2/4] Update travis config --- .travis.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index a8348d5..52187c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,10 +39,6 @@ before_script: - sh -c "if [ '$COVERALLS' = '1' ]; then mkdir -p build/logs; fi" script: - - sh -c "if [ '$DEFAULT' = '1' ]; then ./vendor/bin/phpunit --stderr; fi" - - sh -c "if [ '$PHPCS' = '1' ]; then ./vendor/bin/phpcs -p -n --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi" - - sh -c "if [ '$COVERALLS' = '1' ]; then ./vendor/bin/phpunit --stderr --coverage-clover build/logs/clover.xml; fi" - - sh -c "if [ '$COVERALLS' = '1' ]; then php vendor/bin/coveralls -c .coveralls.yml -v; fi" notifications: email: false From 1c8ae8c5d279009f17d2fee28fa9d7063e1eb90a Mon Sep 17 00:00:00 2001 From: Roger Campanera Date: Fri, 8 Dec 2017 20:43:33 +0000 Subject: [PATCH 3/4] Update require & require-dev --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index a5bf1d5..529d9d0 100644 --- a/composer.json +++ b/composer.json @@ -15,10 +15,10 @@ "require": { "php": ">=5.4", "cakephp/plugin-installer": "*", - "cakephp/cakephp": "~3.2" + "cakephp/cakephp": "^3.4.0" }, "require-dev": { - "phpunit/phpunit": "*" + "phpunit/phpunit": "^5.0" }, "autoload": { "psr-4": { From bc6b4e8ddb15dbb95d08988b1919be31d1829048 Mon Sep 17 00:00:00 2001 From: Roger Campanera Date: Fri, 8 Dec 2017 20:56:03 +0000 Subject: [PATCH 4/4] Update require --- composer.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 529d9d0..273fe62 100644 --- a/composer.json +++ b/composer.json @@ -13,9 +13,7 @@ } ], "require": { - "php": ">=5.4", - "cakephp/plugin-installer": "*", - "cakephp/cakephp": "^3.4.0" + "cakephp/cakephp": "^3.5.0" }, "require-dev": { "phpunit/phpunit": "^5.0"