diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..30f7d6a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +# +# Exclude these files from release archives. +# This will also make them unavailable when using Composer with `--prefer-dist`. +# If you develop for this repo using Composer, use `--prefer-source`. +# https://www.reddit.com/r/PHP/comments/2jzp6k/i_dont_need_your_tests_in_my_production +# https://blog.madewithlove.be/post/gitattributes/ +# +/.gitattributes export-ignore +/.gitignore export-ignore +/.travis.yml export-ignore + +# +# Auto detect text files and perform LF normalization +# http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/ +# +* text=auto + +# +# The above will handle all files NOT found below +# +*.md text +*.php text +*.inc text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d1502b0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +vendor/ +composer.lock diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5fc495a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,32 @@ +dist: trusty + +language: php + +## Cache composer and apt downloads. +cache: + directories: + # Cache directory for older Composer versions. + - $HOME/.composer/cache/files + # Cache directory for more recent Composer versions. + - $HOME/.cache/composer/files + +php: + - 5.4 + - 7.3 + +jobs: + fast_finish: true + + +before_install: + # Speed up build time by disabling Xdebug when its not needed. + - phpenv config-rm xdebug.ini || echo 'No xdebug config.' + + # --prefer-dist will allow for optimal use of the travis caching ability. + - composer install --prefer-dist --no-suggest + + +script: + # Validate the composer.json file on low/high PHP versions. + # @link https://getcomposer.org/doc/03-cli.md#validate + - composer validate --no-check-all --strict diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..ee18941 --- /dev/null +++ b/composer.json @@ -0,0 +1,37 @@ +{ + "name" : "phpcsstandards/phpcsdevtools", + "description" : "Tools for PHP_CodeSniffer sniff developers.", + "type" : "phpcodesniffer-standard", + "keywords" : [ "phpcs", "devtools", "php_codesniffer" ], + "license" : "LGPL-3.0-or-later", + "authors" : [ + { + "name" : "Juliette Reinders Folmer", + "role" : "lead", + "homepage" : "https://github.com/jrfnl" + }, + { + "name" : "Contributors", + "homepage" : "https://github.com/PHPCSStandards/PHPCSDevTools/graphs/contributors" + } + ], + "support" : { + "issues" : "https://github.com/PHPCSStandards/PHPCSDevTools/issues", + "source" : "https://github.com/PHPCSStandards/PHPCSDevTools" + }, + "require" : { + "php" : ">=5.4", + "squizlabs/php_codesniffer" : "^3.0.2", + "dealerdirect/phpcodesniffer-composer-installer" : "^0.5" + }, + "require-dev" : { + "roave/security-advisories" : "dev-master", + "jakub-onderka/php-parallel-lint": "^1.0", + "jakub-onderka/php-console-highlighter": "^0.4" + }, + "scripts" : { + "lint": [ + "@php ./vendor/jakub-onderka/php-parallel-lint/parallel-lint . -e php --exclude vendor" + ] + } +}