-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from chimeraphp/initialise-repo
Initialise repo
- Loading branch information
Showing
11 changed files
with
244 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/tests export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.scrutinizer.yml export-ignore | ||
/.travis.yml export-ignore | ||
/infection.json.dist export-ignore | ||
/phpcs.xml.dist export-ignore | ||
/phpstan.neon.dist export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/README.md export-ignore |
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,6 @@ | ||
/vendor | ||
/phpunit.xml | ||
/phpcs.xml | ||
/.phpcs.cache | ||
/composer.lock | ||
/infection-log.txt |
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,37 @@ | ||
build: | ||
nodes: | ||
analysis: | ||
environment: | ||
mysql: false | ||
postgresql: false | ||
redis: false | ||
rabbitmq: false | ||
mongodb: false | ||
php: | ||
version: 7.2 | ||
cache: | ||
disabled: false | ||
directories: | ||
- ~/.composer/cache | ||
|
||
project_setup: | ||
override: true | ||
tests: | ||
override: | ||
- php-scrutinizer-run | ||
- phpcs-run | ||
|
||
dependencies: | ||
override: | ||
- composer install --no-interaction --prefer-dist | ||
|
||
checks: | ||
php: true | ||
|
||
tools: | ||
external_code_coverage: true | ||
|
||
build_failure_conditions: | ||
- 'elements.rating(<= C).new.exists' | ||
- 'issues.severity(>= MAJOR).new.exists' | ||
- 'project.metric_change("scrutinizer.test_coverage", < -0.01)' |
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,55 @@ | ||
dist: trusty | ||
sudo: false | ||
language: php | ||
|
||
php: | ||
- 7.2 | ||
- nightly | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
before_install: | ||
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available" | ||
- composer self-update | ||
|
||
install: travis_retry composer install | ||
|
||
script: | ||
- ./vendor/bin/phpunit | ||
|
||
jobs: | ||
allow_failures: | ||
- php: nightly | ||
- env: STATIC_ANALYSIS=1 | ||
|
||
include: | ||
- stage: Code Quality | ||
env: TEST_COVERAGE=1 | ||
before_script: | ||
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,} | ||
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi | ||
script: | ||
- ./vendor/bin/phpunit --testsuite unit --coverage-clover ./clover.xml | ||
after_script: | ||
- wget https://scrutinizer-ci.com/ocular.phar | ||
- php ocular.phar code-coverage:upload --format=php-clover ./clover.xml | ||
|
||
- stage: Code Quality | ||
env: CODE_STANDARD=1 | ||
script: | ||
- ./vendor/bin/phpcs | ||
|
||
- stage: Code Quality | ||
env: STATIC_ANALYSIS=1 | ||
script: | ||
- ./vendor/bin/phpstan analyse | ||
|
||
- stage: Code Quality | ||
env: MUTATION_TESTS=1 | ||
before_script: | ||
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,} | ||
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for mutation tests"; exit 1; fi | ||
script: | ||
- ./vendor/bin/infection --test-framework-options='--testsuite unit' --threads=4 --min-msi=100 --min-covered-msi=100 |
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,43 @@ | ||
{ | ||
"name": "chimera/di-symfony", | ||
"description": "A set of compiler passes that connects all components together", | ||
"type": "library", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Luís Cobucci", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"config": { | ||
"preferred-install": "dist", | ||
"sort-packages": true | ||
}, | ||
"require": { | ||
"php": "^7.2" | ||
}, | ||
"require-dev": { | ||
"infection/infection": "^0.8", | ||
"phpstan/phpdoc-parser": "^0.3@dev", | ||
"phpstan/phpstan": "^0.10@dev", | ||
"phpstan/phpstan-phpunit": "^0.10@dev", | ||
"phpstan/phpstan-strict-rules": "^0.10@dev", | ||
"phpunit/phpunit": "^7.1", | ||
"squizlabs/php_codesniffer": "^3.2" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Chimera\\DependencyInjection\\": "src" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Chimera\\DependencyInjection\\Tests\\": "tests" | ||
} | ||
}, | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "0.1.x-dev" | ||
} | ||
} | ||
} |
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,11 @@ | ||
{ | ||
"timeout": 10, | ||
"source": { | ||
"directories": [ | ||
"src" | ||
] | ||
}, | ||
"logs": { | ||
"text": "infection-log.txt" | ||
} | ||
} |
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,43 @@ | ||
<?xml version="1.0"?> | ||
<ruleset | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd" | ||
> | ||
<arg name="basepath" value="." /> | ||
<arg name="extensions" value="php" /> | ||
<arg name="parallel" value="80" /> | ||
<arg name="colors" /> | ||
<arg name="cache" value=".phpcs.cache" /> | ||
<arg value="p" /> | ||
|
||
<file>src</file> | ||
<file>tests</file> | ||
|
||
<rule ref="Doctrine"> | ||
<exclude name="SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment" /> | ||
</rule> | ||
|
||
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"> | ||
<properties> | ||
<property name="newlinesCountBetweenOpenTagAndDeclare" value="1"/> | ||
<property name="spacesCountAroundEqualsSign" value="0"/> | ||
<property name="newlinesCountAfterDeclare" value="2"/> | ||
</properties> | ||
</rule> | ||
|
||
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing"> | ||
<properties> | ||
<property name="spacesCountBeforeColon" value="0"/> | ||
</properties> | ||
</rule> | ||
|
||
<rule ref="SlevomatCodingStandard.Commenting.DisallowOneLinePropertyDocComment" /> | ||
|
||
<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses"> | ||
<exclude-pattern>tests/Functional</exclude-pattern> | ||
</rule> | ||
|
||
<rule ref="Squiz.Classes.ClassFileName.NoMatch"> | ||
<exclude-pattern>tests/Functional</exclude-pattern> | ||
</rule> | ||
</ruleset> |
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,10 @@ | ||
includes: | ||
- vendor/phpstan/phpstan-phpunit/extension.neon | ||
- vendor/phpstan/phpstan-phpunit/rules.neon | ||
- vendor/phpstan/phpstan-strict-rules/rules.neon | ||
|
||
parameters: | ||
level: 7 | ||
paths: | ||
- src | ||
- tests |
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,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html --> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" | ||
colors="true" | ||
verbose="true" | ||
beStrictAboutOutputDuringTests="true" | ||
beStrictAboutTodoAnnotatedTests="true" | ||
beStrictAboutChangesToGlobalState="true" | ||
beStrictAboutCoversAnnotation="true" | ||
beStrictAboutResourceUsageDuringSmallTests="true" | ||
forceCoversAnnotation="true" | ||
> | ||
<testsuites> | ||
<testsuite name="unit"> | ||
<directory>tests/Unit</directory> | ||
</testsuite> | ||
|
||
<testsuite name="functional"> | ||
<directory>tests/Functional</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist> | ||
<directory>src</directory> | ||
</whitelist> | ||
</filter> | ||
</phpunit> |
Empty file.
Empty file.