Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ttomdewit authored and gs-tdewit committed May 2, 2023
0 parents commit 6042339
Show file tree
Hide file tree
Showing 47 changed files with 9,958 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
HOST_UID=503
HOST_GID=20
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vendor/
.build
71 changes: 71 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
.PHONY: php-cs-fixer
php-cs-fixer:
docker-compose exec php time ./vendor/bin/php-cs-fixer fix --config="config/.php-cs-fixer.php"

.PHONY: rector
rector:
docker-compose exec php time ./vendor/bin/rector --config="config/rector.php"

.PHONY: phpstan
phpstan:
docker-compose exec php time ./vendor/bin/phpstan --configuration="config/phpstan.neon"

.PHONY: phan
phan:
docker-compose exec php time ./vendor/bin/phan --allow-polyfill-parser --config-file="config/phan.php"

.PHONY: psalm
psalm:
docker-compose exec php time ./vendor/bin/psalm --config="config/psalm.xml"

.PHONY: phpcs
phpcs:
docker-compose exec php time ./vendor/bin/phpcs src --standard="config/phpcs.xml"

.PHONY: phpmd
phpmd:
docker-compose exec php time ./vendor/bin/phpmd config ansi config/phpmd.xml
docker-compose exec php time ./vendor/bin/phpmd src ansi config/phpmd.xml
docker-compose exec php time ./vendor/bin/phpmd tests ansi config/phpmd.xml

.PHONY: phplint
phplint:
docker-compose exec php time ./vendor/bin/phplint --configuration="config/.phplint.yml"

.PHONY: deptrac
deptrac:
docker-compose exec php time ./vendor/bin/deptrac analyse --config-file="config/depfile.yaml" --report-uncovered --fail-on-uncovered --cache-file=".build/.deptrac.cache"

.PHONY: behat
behat:
docker-compose exec php time ./vendor/bin/behat

.PHONY: phpunit
phpunit:
docker-compose exec php time ./vendor/bin/phpunit --configuration="config/phpunit.xml"

.PHONY: infection
infection: phpunit
docker-compose exec php time ./vendor/bin/infection --configuration="./config/infection.json" --min-msi=100 --min-covered-msi=100 --coverage="../.build/.phpunit.cache/code-coverage"

.PHONY: phpunit-test-coverage
phpunit-test-coverage: phpunit
docker-compose exec php time ./vendor/bin/coverage-check .build/clover.xml 100

.PHONY: behat-test-coverage
behat-test-coverage: behat
docker-compose exec php time ./vendor/bin/coverage-check .build/behat/clover.xml 100

.PHONY: ci
ci: rector php-cs-fixer phplint deptrac phpstan phan psalm phpcs phpmd phpunit-test-coverage infection behat-test-coverage

.PHONY: cleanup
cleanup:
docker-compose down --rmi all -v --remove-orphans
rm -rf vendor

.PHONY: start
start: cleanup
docker-compose pull
docker-compose run --rm composer install
docker-compose up -d
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Extremely Defensive PHP

## Architecture

### Application
### Domain
### Infrastructure
### UserInterface

## Testing

We'll use PHPUnit and Behat to fully automate our software application testing.

PHPUnit tests will live under Unit, Integration and Functional namespaces whereas Behat will own the Feature namespace in our testsuite.

### Unit

### Integration

### Functional

### Features
57 changes: 57 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"name": "ttomdewit/extremely-defensive-php",
"description": "Extremely Defensive PHP",
"type": "project",
"license": "proprietary",
"autoload": {
"psr-4": {
"ExtremelyDefensivePhp\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"ExtremelyDefensivePhp\\Tests\\": "tests/",
"ExtremelyDefensivePhp\\Tests\\Feature\\": "tests/Feature/"
}
},
"authors": [
{
"name": "Tom de Wit",
"email": "[email protected]"
}
],
"require-dev": {
"friendsofphp/php-cs-fixer": "^v3.16.0",
"phpstan/phpstan": "^1.10.14",
"phan/phan": "^5.4.2",
"vimeo/psalm": "^4.30.0",
"behat/behat": "^v3.13.0",
"overtrue/phplint": "^4.5.0",
"phpunit/phpunit": "^9.6.7",
"malukenho/mcbumpface": "^1.2.0",
"infection/infection": "^0.26.21",
"rregeer/phpunit-coverage-check": "^0.3.1",
"dvdoug/behat-code-coverage": "^v5.3.0",
"phpmd/phpmd": "^2.13.0",
"squizlabs/php_codesniffer": "^3.7.2",
"rector/rector": "^0.15.25",
"qossmic/deptrac-shim": "^1.0.2",
"phpstan/extension-installer": "^1.3.0",
"phpstan/phpstan-strict-rules": "^1.5.1",
"thecodingmachine/phpstan-strict-rules": "^v1.0.0",
"symplify/phpstan-rules": "^10.3.3",
"phpstan/phpstan-deprecation-rules": "^1.1.3",
"ergebnis/phpstan-rules": "^1.0.0",
"psalm/plugin-phpunit": "^0.16.1"
},
"require": {
"ramsey/uuid": "^4.7.4"
},
"config": {
"allow-plugins": {
"infection/extension-installer": true,
"malukenho/mcbumpface": true,
"phpstan/extension-installer": true
}
}
}
Loading

0 comments on commit 6042339

Please sign in to comment.