Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from challgren/cake-3.8
CakePHP 3.8 Support
- Loading branch information
Showing
19 changed files
with
374 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
/composer.lock | ||
/plugins | ||
/vendor | ||
/tmp | ||
/phpcs.xml | ||
/phpunit.phar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,70 @@ | ||
language: php | ||
|
||
php: | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
- 7 | ||
- 7.4 | ||
|
||
sudo: false | ||
|
||
env: | ||
matrix: | ||
- DB=mysql db_dsn='mysql://travis@0.0.0.0/cakephp_test' | ||
- DB=mysql db_dsn='mysql://root@127.0.0.1/cakephp_test' | ||
- DB=pgsql db_dsn='postgres://postgres@127.0.0.1/cakephp_test' | ||
- DB=sqlite db_dsn='sqlite:///:memory:' | ||
|
||
global: | ||
- DEFAULT=1 | ||
|
||
services: | ||
- postgresql | ||
- mysql | ||
|
||
matrix: | ||
fast_finish: true | ||
|
||
include: | ||
- php: 5.4 | ||
env: PHPCS=1 DEFAULT=0 | ||
- php: 7.1 | ||
env: DB=pgsql db_dsn='postgres://postgres@127.0.0.1/cakephp_test' | ||
|
||
- php: 5.4 | ||
env: COVERALLS=1 DEFAULT=0 DB=mysql db_dsn='mysql://travis@0.0.0.0/cakephp_test' | ||
- php: 7.2 | ||
env: DB=sqlite db_dsn='sqlite:///:memory:' | ||
|
||
before_script: | ||
- composer self-update | ||
- composer install --prefer-dist --no-interaction | ||
- php: 5.6 | ||
env: PREFER_LOWEST=1 | ||
|
||
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi" | ||
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi" | ||
- php: 7.3 | ||
env: CODECOVERAGE=1 DEFAULT=0 DB=mysql db_dsn='mysql://root@127.0.0.1/cakephp_test' | ||
|
||
- sh -c "if [ '$PHPCS' = '1' ]; then composer require cakephp/cakephp-codesniffer:dev-master; fi" | ||
- php: 7.3 | ||
env: CHECKS=1 DEFAULT=0 | ||
|
||
before_install: | ||
- phpenv config-rm xdebug.ini | ||
|
||
before_script: | ||
- if [[ $CHECKS != 1 ]]; then composer require --dev phpunit/phpunit:"^5.7.14|^6.0"; fi | ||
|
||
- sh -c "if [ '$COVERALLS' = '1' ]; then composer require --dev satooshi/php-coveralls:dev-master; fi" | ||
- sh -c "if [ '$COVERALLS' = '1' ]; then mkdir -p build/logs; fi" | ||
- if [[ $PREFER_LOWEST != 1 ]]; then composer install --prefer-source --no-interaction; fi | ||
- if [[ $PREFER_LOWEST == 1 ]]; then composer update --prefer-lowest --prefer-stable --prefer-dist --no-interaction; fi | ||
- if [[ $PREFER_LOWEST == 1 ]]; then composer require --dev dereuromark/composer-prefer-lowest:dev-master; fi | ||
|
||
- if [[ $DB == 'mysql' ]]; then mysql -u root -e 'CREATE DATABASE cakephp_test;'; fi | ||
- if [[ $DB == 'pgsql' ]]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi | ||
|
||
script: | ||
- sh -c "if [ '$DEFAULT' = '1' ]; then phpunit --stderr; fi" | ||
- sh -c "if [ '$PHPCS' = '1' ]; then ./vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi" | ||
- sh -c "if [ '$COVERALLS' = '1' ]; then phpunit --stderr --coverage-clover build/logs/clover.xml; fi" | ||
- sh -c "if [ '$COVERALLS' = '1' ]; then php vendor/bin/coveralls -c .coveralls.yml -v; fi" | ||
- if [[ $DEFAULT == 1 ]]; then vendor/bin/phpunit; fi | ||
- if [[ $PREFER_LOWEST == 1 ]]; then vendor/bin/validate-prefer-lowest; fi | ||
|
||
- if [[ $CHECKS == 1 ]]; then composer phpstan-setup && composer phpstan; fi | ||
- if [[ $CHECKS == 1 ]]; then composer cs-check; fi | ||
|
||
- if [[ $CODECOVERAGE == 1 ]]; then phpdbg -qrr vendor/bin/phpunit --stderr --coverage-clover build/logs/clover.xml; fi | ||
|
||
after_success: | ||
- if [[ $CODECOVERAGE == 1 ]]; then php vendor/bin/php-coveralls -c .coveralls.yml -v; fi | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
notifications: | ||
email: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="CakePHP Core"> | ||
<rule ref="./vendor/cakephp/cakephp-codesniffer/CakePHP/ruleset.xml"> | ||
<!-- Exclude unwanted sniffs --> | ||
<exclude name="Generic.Commenting.Todo.TaskFound"/> <!-- Excluded during 3.next development --> | ||
</rule> | ||
|
||
<!-- Necessary for class aliases used for backwards compat --> | ||
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols"> | ||
<severity>0</severity> | ||
</rule> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<phpunit | ||
bootstrap="tests/bootstrap.php" | ||
colors="true" | ||
> | ||
<php> | ||
<!-- E_ALL => 32767 --> | ||
<!-- E_ALL & ~E_USER_DEPRECATED => 16383 --> | ||
<ini name="error_reporting" value="16383"/> | ||
</php> | ||
<testsuites> | ||
<testsuite name="sti"> | ||
<directory>tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<listeners> | ||
<listener class="Cake\TestSuite\Fixture\FixtureInjector"> | ||
<arguments> | ||
<object class="Cake\TestSuite\Fixture\FixtureManager"/> | ||
</arguments> | ||
</listener> | ||
</listeners> | ||
|
||
<!-- Prevent coverage reports from looking in tests, vendors, config folders --> | ||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">src/</directory> | ||
</whitelist> | ||
</filter> | ||
|
||
</phpunit> |
Oops, something went wrong.