-
Notifications
You must be signed in to change notification settings - Fork 12
refactor: upgrade for cake4 #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
05725d1
refactor: upgrade for cake4
josegonzalez fb647ee
chore: update readme
josegonzalez 1adf3c8
fix: use correct parent class for new phpunit
josegonzalez c563f3a
fix: drop empty test
josegonzalez 6437673
fix: correct expected exception
josegonzalez c0fb6b7
fix: a ton of test updates
josegonzalez 3a8ba3f
fix: correct phpcs issue
josegonzalez 9602c2b
fix: correct psalm and phpstan issues
josegonzalez 5d9667c
chore: remove ignored rule
josegonzalez 53f0a86
hack: do not convert errors to exceptions
josegonzalez 5a1632e
hack: more falsitudes
josegonzalez 73fbb7f
hack: try this one
josegonzalez abba62f
fix: only ignore php deprecations
josegonzalez b82a107
fix: drop bad use call
josegonzalez 42351e7
fix: drop extra require
josegonzalez d6d2260
fix: correct a few review comments
josegonzalez 9501f33
Delete .scrutinizer.yml
ADmad 158a81e
Fix stickler config
ADmad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,8 +1,11 @@ | ||
| # Remove files for archives generated using `git archive` | ||
| CONTRIBUTING.md export-ignore | ||
| .editorconfig export-ignore | ||
| .gitattributes export-ignore | ||
| .gitignore export-ignore | ||
| .semver export-ignore | ||
| phpunit.xml.dist export-ignore | ||
| .travis.yml export-ignore | ||
| .scrutinizer.yml export-ignore | ||
| tests export-ignore | ||
| docs export-ignore | ||
| .github export-ignore |
This file contains hidden or 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,7 @@ | ||
| /composer.lock | ||
| /plugins | ||
| /vendor | ||
| *.pyc | ||
| docs/_build | ||
| phpunit.xml | ||
| vendor/ | ||
| composer.lock | ||
| tmp | ||
| .phpunit.result.cache |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,11 @@ | ||
| linters: | ||
| phpcs: | ||
| standard: CakePHP | ||
| extensions: 'php,ctp' | ||
|
ADmad marked this conversation as resolved.
Outdated
|
||
| fixer: true | ||
| files: | ||
| ignore: | ||
| - 'vendor/*' | ||
| fixers: | ||
| enable: true | ||
| workflow: commit | ||
This file contains hidden or 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,52 +1,65 @@ | ||
| language: php | ||
|
|
||
| php: | ||
| - 5.6 | ||
| - 7.2 | ||
| - 7.3 | ||
|
|
||
| services: | ||
| - mysql | ||
| - postgresql | ||
| - 7.4 | ||
|
|
||
| env: | ||
| matrix: | ||
| - DB=sqlite db_dsn='sqlite:///:memory:' | ||
| - DB=mysql db_dsn='mysql://[email protected]/cakephp_test?init[]=SET sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"' | ||
| - DB=mysql db_dsn='mysql://[email protected]/cakephp_test' | ||
| - DB=pgsql db_dsn='postgres://[email protected]/cakephp_test' | ||
| - DB=sqlite db_dsn='sqlite:///:memory:' | ||
|
|
||
| global: | ||
| - DEFAULT=1 | ||
|
|
||
| services: | ||
| - mysql | ||
| - postgresql | ||
|
|
||
| matrix: | ||
| fast_finish: true | ||
|
|
||
| include: | ||
| - php: 7.3 | ||
| - php: 7.2 | ||
| env: PHPCS=1 DEFAULT=0 | ||
|
|
||
| - php: 5.6 | ||
| env: PREFER_LOWEST=1 | ||
| - php: 7.2 | ||
| env: STATIC_ANALYSIS=1 DEFAULT=0 | ||
|
|
||
| before_script: | ||
| - if [[ $TRAVIS_PHP_VERSION != 7.2 ]]; then phpenv config-rm xdebug.ini; fi | ||
|
|
||
| - if [[ $PREFER_LOWEST != 1 ]]; then composer install --no-interaction; fi | ||
| - if [[ $PREFER_LOWEST != 1 ]]; then composer update --no-interaction; fi | ||
| - if [[ $PREFER_LOWEST == 1 ]]; then composer update --no-interaction --prefer-lowest --prefer-stable; fi | ||
|
|
||
| - if [[ $DB == 'mysql' ]]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi | ||
| - if [[ $DB == 'pgsql' ]]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; 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 | ||
|
|
||
| - if [[ $PHPCS == '1' ]]; then composer require cakephp/cakephp-codesniffer:^3.0; fi | ||
| - if [[ $PHPCS = 1 ]]; then composer require cakephp/cakephp-codesniffer:^4.0; fi | ||
| - if [[ $STATIC_ANALYSIS = 1 ]]; then composer require --dev phpstan/phpstan:^0.12 psalm/phar:^3.7; fi | ||
|
|
||
| script: | ||
| - if [[ $DEFAULT == 1 && $TRAVIS_PHP_VERSION == 7.2 ]]; then vendor/bin/phpunit --coverage-clover=clover.xml; fi | ||
| - if [[ $DEFAULT == 1 && $TRAVIS_PHP_VERSION != 7.2 ]]; then vendor/bin/phpunit; fi | ||
| - | | ||
| if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION = 7.2 ]]; then | ||
| mkdir -p build/logs | ||
| vendor/bin/phpunit --coverage-clover=build/logs/clover.xml | ||
| fi | ||
|
|
||
| - if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION != 7.2 ]]; then vendor/bin/phpunit; fi | ||
|
|
||
| - if [[ $PHPCS = 1 ]]; then vendor/bin/phpcs -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi | ||
|
|
||
| - if [[ $PHPCS == 1 ]]; then vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi | ||
| - if [[ $STATIC_ANALYSIS = 1 ]]; then vendor/bin/phpstan.phar analyse src && vendor/bin/psalm.phar --show-info=false; fi | ||
|
|
||
| after_success: | ||
| - if [[ $DEFAULT == 1 && $TRAVIS_PHP_VERSION == 7.2 ]]; then bash <(curl -s https://codecov.io/bash); fi | ||
| - | | ||
| if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION = 7.2 ]]; then | ||
| wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar | ||
| chmod +x php-coveralls.phar | ||
| ./php-coveralls.phar | ||
| fi | ||
|
|
||
| notifications: | ||
| email: false |
This file contains hidden or 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 hidden or 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 hidden or 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,2 @@ | ||
| parameters: | ||
| ignoreErrors: [] |
This file contains hidden or 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,7 @@ | ||
| includes: | ||
| - phpstan-baseline.neon | ||
|
|
||
| parameters: | ||
| level: 6 | ||
| checkGenericClassInNonGenericObjectType: false | ||
| checkMissingIterableValueType: false |
This file contains hidden or 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 hidden or 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,29 @@ | ||
| <?xml version="1.0"?> | ||
| <psalm | ||
| totallyTyped="false" | ||
| resolveFromConfigFile="true" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xmlns="https://getpsalm.org/schema/config" | ||
| xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"> | ||
| <projectFiles> | ||
| <directory name="src" /> | ||
| <ignoreFiles> | ||
| <directory name="vendor" /> | ||
| </ignoreFiles> | ||
| </projectFiles> | ||
|
|
||
| <issueHandlers> | ||
| <MissingClosureReturnType errorLevel="info" /> | ||
|
|
||
| <PropertyNotSetInConstructor errorLevel="info" /> | ||
| <MissingConstructor errorLevel="info" /> | ||
| <MissingClosureParamType errorLevel="info" /> | ||
|
|
||
| <DocblockTypeContradiction errorLevel="info" /> | ||
| <RedundantConditionGivenDocblockType errorLevel="info" /> | ||
|
|
||
| <UndefinedPropertyFetch errorLevel="info" /> | ||
| <UndefinedThisPropertyFetch errorLevel="info" /> | ||
| <UndefinedPropertyAssignment errorLevel="info" /> | ||
| </issueHandlers> | ||
| </psalm> |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.