Skip to content

Commit

Permalink
🔧 Initial development environment setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfnl committed Aug 14, 2019
1 parent d8cbc49 commit 5d29b83
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vendor/
composer.lock
32 changes: 32 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
37 changes: 37 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
}

0 comments on commit 5d29b83

Please sign in to comment.