-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add activator for Phinject integration
- Loading branch information
Thibaud Fabre
committed
Feb 10, 2015
1 parent
5921711
commit d53fede
Showing
20 changed files
with
425 additions
and
82 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
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,18 @@ | ||
# .scrutinizer.yml | ||
|
||
filter: | ||
paths: [ src/* ] | ||
|
||
before_commands: | ||
- "composer install --prefer-source" | ||
|
||
tools: | ||
external_code_coverage: true | ||
php_cpd: true | ||
php_pdepend: true | ||
php_code_coverage: true | ||
php_analyzer: true | ||
|
||
changetracking: | ||
bug_patterns: ["\bfix(?:es|ed)?\b"] | ||
feature_patterns: ["\badd(?:s|ed)?\b", "\bimplement(?:s|ed)?\b"] |
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,33 @@ | ||
language: php | ||
|
||
php: | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
- hhvm | ||
|
||
env: | ||
- PHP_CURRENT='5.6' | ||
|
||
before_script: | ||
- composer selfupdate | ||
- composer install --dev | ||
|
||
script: | ||
- make phpunit | ||
- if [ $(phpenv version-name) = $PHP_CURRENT ]; then make test-upload; fi | ||
- if [ $(phpenv version-name) = $PHP_CURRENT ]; then make phpcs bugfree; fi | ||
|
||
after_script: | ||
- make clean | ||
|
||
matrix: | ||
fast_finish: true | ||
|
||
notifications: | ||
webhooks: | ||
urls: | ||
- http://derricks.io/repositories/buildhook/ | ||
on_success: always | ||
on_failure: always | ||
on_start: always |
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,70 @@ | ||
# If the first argument is one of the supported commands... | ||
SUPPORTED_COMMANDS := "install" | ||
SUPPORTS_MAKE_ARGS := $(findstring $(firstword $(MAKECMDGOALS)), $(SUPPORTED_COMMANDS)) | ||
ifneq "$(SUPPORTS_MAKE_ARGS)" "" | ||
# use the rest as arguments for the command | ||
COMMAND_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) | ||
# ...and turn them into do-nothing targets | ||
$(eval $(COMMAND_ARGS):;@:) | ||
endif | ||
|
||
test: phpunit phpcs bugfree phpmd | ||
test-analysis: phpcs bugfree phpmd | ||
test-upload: scrutinizer | ||
|
||
install: | ||
make -f Makefile.docker -- composer install $(COMMAND_ARGS) | ||
|
||
update: | ||
|
||
.PHONY: test test-analysis test-upload pretest phpunit phpcs phpmd bugfree ocular scrutinizer clean clean-env clean-deps | ||
|
||
pretest: | ||
composer install --dev | ||
|
||
phpunit: pretest | ||
[ ! -d tests/output ] || mkdir -p tests/output | ||
vendor/bin/phpunit --coverage-text --coverage-clover=tests/output/coverage.clover | ||
|
||
ifndef STRICT | ||
STRICT = 0 | ||
endif | ||
|
||
ifeq "$(STRICT)" "1" | ||
phpcs: pretest | ||
vendor/bin/phpcs --standard=PSR2 src | ||
else | ||
phpcs: pretest | ||
vendor/bin/phpcs --standard=PSR2 -n src | ||
endif | ||
|
||
phpcbf: pretest | ||
vendor/bin/phpcbf --standard=PSR2 src | ||
|
||
bugfree: pretest | ||
[ ! -f bugfree.json ] || vendor/bin/bugfree generateConfig | ||
vendor/bin/bugfree lint src -c bugfree.json | ||
|
||
phpmd: pretest | ||
vendor/bin/phpmd src/ text design,naming,cleancode,codesize,controversial,unusedcode | ||
|
||
ocular: | ||
[ ! -f ocular.phar ] && wget https://scrutinizer-ci.com/ocular.phar | ||
|
||
ifdef OCULAR_TOKEN | ||
scrutinizer: ocular | ||
@php ocular.phar code-coverage:upload --format=php-clover tests/output/coverage.clover --access-token=$(OCULAR_TOKEN); | ||
else | ||
scrutinizer: ocular | ||
php ocular.phar code-coverage:upload --format=php-clover tests/output/coverage.clover; | ||
endif | ||
|
||
clean: clean-env clean-deps | ||
|
||
clean-env: | ||
rm -rf coverage.clover | ||
rm -rf ocular.phar | ||
rm -rf tests/output/ | ||
|
||
clean-deps: | ||
rm -rf vendor/ |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<phpunit bootstrap="vendor/autoload.php" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
> | ||
<testsuites> | ||
<testsuite name="All tests"> | ||
<directory suffix=".php">tests/unit</directory> | ||
</testsuite> | ||
</testsuites> | ||
<logging> | ||
<log type="coverage-html" target="./tests/output/Coverage/" | ||
charset="UTF-8" yui="true" highlight="true" /> | ||
<log type="junit" target="./tests/output/Results/Results.xml" | ||
logIncompleteSkipped="true" /> | ||
</logging> | ||
<filter> | ||
<whitelist addUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">src/</directory> | ||
<exclude> | ||
|
||
</exclude> | ||
</whitelist> | ||
</filter> | ||
</phpunit> |
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 |
---|---|---|
|
@@ -26,4 +26,4 @@ public function __invoke(Request $request) | |
|
||
return $callable($request); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.