-
Notifications
You must be signed in to change notification settings - Fork 43
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 #101 from UseMuffin/cake-4.x
Cake 4.x
- Loading branch information
Showing
70 changed files
with
1,157 additions
and
1,733 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 |
---|---|---|
|
@@ -15,4 +15,7 @@ end_of_line = crlf | |
|
||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 | ||
indent_size = 2 | ||
|
||
[*.neon] | ||
indent_style = tab |
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,101 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
testsuite: | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: ['7.2', '7.4', '8.0'] | ||
db-type: ['mysql', 'pgsql'] | ||
prefer-lowest: [''] | ||
include: | ||
- php-version: '7.2' | ||
db-type: 'sqlite' | ||
prefer-lowest: 'prefer-lowest' | ||
|
||
services: | ||
postgres: | ||
image: postgres | ||
ports: | ||
- 5432:5432 | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Service | ||
if: matrix.db-type == 'mysql' | ||
run: | | ||
sudo service mysql start | ||
mysql -h 127.0.0.1 -u root -proot -e 'CREATE DATABASE cakephp;' | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: mbstring, intl, pdo_${{ matrix.db-type }} | ||
coverage: pcov | ||
|
||
- name: Composer install | ||
run: | | ||
composer --version | ||
if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then | ||
composer update --prefer-lowest --prefer-stable | ||
else | ||
composer install | ||
fi | ||
- name: Run PHPUnit | ||
run: | | ||
if [[ ${{ matrix.db-type }} == 'sqlite' ]]; then export DB_URL='sqlite:///:memory:'; fi | ||
if [[ ${{ matrix.db-type }} == 'mysql' ]]; then export DB_URL='mysql://root:[email protected]/cakephp'; fi | ||
if [[ ${{ matrix.db-type }} == 'pgsql' ]]; then export DB_URL='postgres://postgres:[email protected]/postgres'; fi | ||
if [[ ${{ matrix.php-version }} == '7.4' && ${{ matrix.db-type }} == 'mysql' ]]; then | ||
vendor/bin/phpunit --coverage-clover=coverage.xml | ||
else | ||
vendor/bin/phpunit | ||
fi | ||
- name: Code Coverage Report | ||
if: success() && matrix.php-version == '7.4' && matrix.db-type == 'mysql' | ||
uses: codecov/codecov-action@v1 | ||
|
||
cs-stan: | ||
name: Coding Standard & Static Analysis | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
extensions: mbstring, intl | ||
coverage: none | ||
tools: psalm:4.7, phpstan:0.12 | ||
|
||
- name: Composer Install | ||
run: composer require cakephp/cakephp-codesniffer:^4.2 | ||
|
||
- name: Run phpcs | ||
run: vendor/bin/phpcs --standard=CakePHP src/ tests/ | ||
|
||
- name: Run psalm | ||
if: success() || failure() | ||
run: psalm --output-format=github | ||
|
||
- name: Run phpstan | ||
if: success() || failure() | ||
run: phpstan analyse |
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,4 @@ | ||
/composer.lock | ||
/plugins | ||
/vendor | ||
.phpunit.result.cache |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,59 +1,21 @@ | ||
parameters: | ||
level: 6 | ||
checkMissingIterableValueType: false | ||
checkGenericClassInNonGenericObjectType: false | ||
ignoreErrors: | ||
- | ||
message: "#^Strict comparison using \\=\\=\\= between string and null will always evaluate to false\\.$#" | ||
count: 1 | ||
path: src/Marshaller.php | ||
|
||
- | ||
message: "#^Negated boolean expression is always false\\.$#" | ||
count: 3 | ||
path: src/Model/Endpoint.php | ||
|
||
- | ||
message: "#^Result of \\|\\| is always true\\.$#" | ||
count: 1 | ||
path: src/Model/Endpoint.php | ||
|
||
- | ||
message: "#^Unreachable statement \\- code above always terminates\\.$#" | ||
count: 1 | ||
path: src/Model/Endpoint.php | ||
|
||
- | ||
message: "#^Call to an undefined method Traversable\\:\\:count\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Model/Endpoint.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$connection of method Muffin\\\\Webservice\\\\Model\\\\Endpoint\\:\\:setConnection\\(\\) expects Muffin\\\\Webservice\\\\Connection, Muffin\\\\Webservice\\\\AbstractDriver given\\.$#" | ||
count: 1 | ||
path: src/Model/Endpoint.php | ||
|
||
- | ||
message: "#^Method Muffin\\\\Webservice\\\\Query\\:\\:endpoint\\(\\) should return \\$this\\(Muffin\\\\Webservice\\\\Query\\)\\|Muffin\\\\Webservice\\\\Model\\\\Endpoint but returns Cake\\\\Datasource\\\\RepositoryInterface\\.$#" | ||
count: 1 | ||
path: src/Query.php | ||
|
||
- | ||
message: "#^Call to an undefined method Cake\\\\Datasource\\\\RepositoryInterface\\:\\:callFinder\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Query.php | ||
|
||
- | ||
message: "#^Call to an undefined method Cake\\\\Datasource\\\\RepositoryInterface\\:\\:getName\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Query.php | ||
|
||
- | ||
message: "#^Return type \\(array\\) of method Muffin\\\\Webservice\\\\Query\\:\\:aliasField\\(\\) should be compatible with return type \\(string\\) of method Cake\\\\Datasource\\\\QueryInterface\\:\\:aliasField\\(\\)$#" | ||
count: 1 | ||
path: src/Query.php | ||
|
||
- | ||
message: "#^Call to an undefined method Cake\\\\Datasource\\\\RepositoryInterface\\:\\:dispatchEvent\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Query.php | ||
level: 6 | ||
checkMissingIterableValueType: false | ||
checkGenericClassInNonGenericObjectType: false | ||
paths: | ||
- src/ | ||
ignoreErrors: | ||
- | ||
message: "#^Call to an undefined method Cake\\\\Datasource\\\\RepositoryInterface\\:\\:callFinder\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Datasource/Query.php | ||
|
||
- | ||
message: "#^Call to an undefined method Cake\\\\Datasource\\\\RepositoryInterface\\:\\:getName\\(\\)\\.$#" | ||
count: 1 | ||
path: src/Datasource/Query.php | ||
|
||
- | ||
message: "#^Method Muffin\\\\Webservice\\\\Datasource\\\\Query\\:\\:execute\\(\\) should return bool\\|int\\|Muffin\\\\Webservice\\\\Datasource\\\\ResultSet\\|Muffin\\\\Webservice\\\\Model\\\\Resource but returns Cake\\\\Datasource\\\\ResultSetInterface\\.$#" | ||
count: 1 | ||
path: src/Datasource/Query.php |
Oops, something went wrong.