Skip to content

Commit

Permalink
Merge pull request #130 from FriendsOfCake/cake-4.x
Browse files Browse the repository at this point in the history
Cake 4.x
  • Loading branch information
ADmad authored Aug 6, 2020
2 parents 3b105f4 + 63bdf30 commit a46b677
Show file tree
Hide file tree
Showing 19 changed files with 559 additions and 449 deletions.
22 changes: 22 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Define the line ending behavior of the different file extensions
# Set default behavior, in case users don't have core.autocrlf set.
* text=auto eol=lf

# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.php text

# Remove files for archives generated using `git archive`
.github export-ignore
tests export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.stickler.yml export-ignore
.travis.yml export-ignore
phpcs.xml.dist export-ignore
phpstan.neon export-ignore
phpstan-baseline.neon export-ignore
phpunit.xml.dist export-ignore
psalm.xml export-ignore
psalm-baseline.xml export-ignore
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/composer.lock
/phpunit.xml
/vendor
.phpunit.result.cache

## IntelliJ project files
.idea
*.iml
*.iml
4 changes: 2 additions & 2 deletions .stickler.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
linters:
phpcs:
standard: CakePHP
extensions: 'php,ctp'
standard: CakePHP4
extensions: 'php'
fixer: true

fixers:
Expand Down
19 changes: 11 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: php

php:
- 5.6
- 7.2
- 7.4

env:
Expand All @@ -12,17 +12,17 @@ matrix:
fast_finish: true

include:
- php: 5.6
- php: 7.2
env: PREFER_LOWEST=1

- php: 7.3
env: PHPCS=1 DEFAULT=0
- php: 7.2
env: CHECKS=1 DEFAULT=0

- php: 7.3
env: CODECOVERAGE=1 DEFAULT=0

before_install:
- if [[ ${TRAVIS_PHP_VERSION} != "7.4" && $CODECOVERAGE != 1 ]]; then phpenv config-rm xdebug.ini ; fi
- if [[ $CODECOVERAGE != 1 ]]; then phpenv config-rm xdebug.ini ; fi

before_script:
- if [[ $PREFER_LOWEST != 1 ]]; then composer install --prefer-source --no-interaction ; fi
Expand All @@ -31,13 +31,16 @@ before_script:
script:
- if [[ $DEFAULT == 1 ]]; then vendor/bin/phpunit ; fi

- if [[ $PHPSTAN == 1 ]]; then composer require --dev phpstan/phpstan && vendor/bin/phpstan analyse -c tests/phpstan.neon -l 3 src/ ; fi

- if [[ $PHPCS = 1 ]]; then composer cs-check; fi
- if [[ $CHECKS == 1 ]]; then composer stan-setup && composer stan ; fi
- if [[ $CHECKS == 1 ]]; then composer cs-check ; fi

- if [[ $CODECOVERAGE == 1 ]]; then vendor/bin/phpunit --coverage-clover=clover.xml ; fi
- if [[ $CODECOVERAGE == 1 ]]; then wget -O codecov.sh https://codecov.io/bash ; fi
- if [[ $CODECOVERAGE == 1 ]]; then bash codecov.sh ; fi

notifications:
email: false

cache:
directories:
- $HOME/.composer/cache
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ chance of keeping on top of things.
## Testcases and codesniffer

CsvView tests requires [PHPUnit](http://www.phpunit.de/manual/current/en/installation.html)
3.5 or higher. To run the testcases locally use the following command:
8.5 or higher. To run the testcases locally use the following command:

./lib/Cake/Console/cake test CsvView AllCsvView
composer test

To run the sniffs for CakePHP coding standards

phpcs -p --extensions=php --standard=CakePHP ./app/Plugin/CsvView
composer cs-check

Check the [cakephp-codesniffer](https://github.com/cakephp/cakephp-codesniffer)
repository to setup the CakePHP standard. The README contains installation info
Expand All @@ -62,7 +62,7 @@ for the sniff and phpcs.

# Additional Resources

* [CakePHP coding standards](http://book.cakephp.org/2.0/en/contributing/cakephp-coding-conventions.html)
* [CakePHP coding standards](http://book.cakephp.org/4/en/contributing/cakephp-coding-conventions.html)
* [Bug tracker](https://github.com/friendsofcake/cakephp-csvview/issues)
* [General GitHub documentation](https://help.github.com/)
* [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
Expand Down
Loading

0 comments on commit a46b677

Please sign in to comment.