Skip to content

Commit

Permalink
Merge pull request #27 from mitelg/update-dependencies
Browse files Browse the repository at this point in the history
Update dependencies and tools
  • Loading branch information
mitelg authored Oct 2, 2020
2 parents 936684e + ece9b2c commit 1301e81
Show file tree
Hide file tree
Showing 20 changed files with 3,457 additions and 912 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
run: composer install --prefer-dist --no-progress --no-suggest

- name: Check code style
run: vendor/bin/ecs check src public
run: make fix-cs

- name: Static code analysis with PHPStan
run: vendor/bin/phpstan analyse src
run: make phpstan

- name: Static code analysis with Psalm
run: vendor/bin/psalm --threads=max --diff --diff-methods --show-info=false
run: make psalm

- name: Check for insecure libs
run: vendor/bin/security-checker security:check
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
composer install --prefer-dist --no-progress --no-suggest
bin/console doctrine:database:create
bin/console doctrine:schema:create
bin/phpunit
make phpunit
env:
APP_ENV: test
DATABASE_URL: mysql://root:root@127.0.0.1:3306/doko_app
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
.php_cs
.php_cs.cache
###< friendsofphp/php-cs-fixer ###
###> phpunit/phpunit ###
/phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###

###> symfony/phpunit-bridge ###
.phpunit
Expand Down
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.DEFAULT_GOAL := help

help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: help

fix-cs: ## Run easy coding style in fix mode
- vendor/bin/ecs check --fix
.PHONY: fix-cs

phpstan: ## Run PHPStan
- vendor/bin/phpstan analyse
.PHONY: phpstan

psalm: ## Run Psalm
- vendor/bin/psalm --threads=max --diff --diff-methods --show-info=false
.PHONY: psalm

phpunit: ## Run unit tests
- vendor/bin/phpunit
.PHONY: phpunit
15 changes: 0 additions & 15 deletions bin/phpunit

This file was deleted.

4 changes: 2 additions & 2 deletions bin/pre-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ for FILE in $SFILES
if [ "$FILES" != "" ]
then
echo "fix code style and update the commit"
vendor/bin/ecs check --fix src public
vendor/bin/ecs check --fix
git add $FILES
fi

if [ "$FILES" != "" ]
then
echo "Static code analysis with PHPStan..."
vendor/bin/phpstan analyse src
vendor/bin/phpstan analyse
if [ $? != 0 ]
then
echo "Static code analysis failed. Fix the error before commit."
Expand Down
3 changes: 3 additions & 0 deletions bin/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

ln -sf $PWD/bin/pre-commit.sh .git/hooks/pre-commit
77 changes: 40 additions & 37 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,52 @@
"php": "^7.3.0",
"ext-iconv": "*",
"doctrine/collections": "1.6.7",
"doctrine/dbal": "2.10.2",
"doctrine/doctrine-bundle": "2.1.0",
"doctrine/dbal": "2.11.1",
"doctrine/doctrine-bundle": "2.1.2",
"doctrine/doctrine-migrations-bundle": "2.2.0",
"doctrine/orm": "2.7.3",
"knplabs/knp-paginator-bundle": "5.3.0",
"knplabs/knp-components": "2.4.0",
"symfony/asset": "5.1.3",
"symfony/config": "5.1.3",
"symfony/console": "5.1.3",
"symfony/dependency-injection": "5.1.3",
"symfony/doctrine-bridge": "5.1.3",
"symfony/dotenv": "5.1.3",
"symfony/flex": "1.9.1",
"symfony/form": "5.1.3",
"symfony/framework-bundle": "5.1.3",
"symfony/http-foundation": "5.1.3",
"symfony/http-kernel": "5.1.5",
"symfony/routing": "5.1.3",
"symfony/translation": "5.1.3",
"symfony/translation-contracts": "2.1.3",
"symfony/twig-bundle": "5.1.3",
"symfony/validator": "5.1.3",
"symfony/yaml": "5.1.3"
"knplabs/knp-components": "2.4.2",
"symfony/asset": "5.1.6",
"symfony/config": "5.1.6",
"symfony/console": "5.1.6",
"symfony/dependency-injection": "5.1.6",
"symfony/doctrine-bridge": "5.1.6",
"symfony/dotenv": "5.1.6",
"symfony/flex": "1.9.4",
"symfony/form": "5.1.6",
"symfony/framework-bundle": "5.1.6",
"symfony/http-foundation": "5.1.6",
"symfony/http-kernel": "5.1.6",
"symfony/routing": "5.1.6",
"symfony/translation": "5.1.6",
"symfony/translation-contracts": "2.2.0",
"symfony/twig-bundle": "5.1.6",
"symfony/validator": "5.1.6",
"symfony/yaml": "5.1.6"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "2.16.4",
"jakub-onderka/php-parallel-lint": "1.0.0",
"jakub-onderka/php-var-dump-check": "0.3.0",
"kubawerlos/php-cs-fixer-custom-fixers": "2.3.0",
"phpstan/phpstan": "0.12.36",
"phpstan/extension-installer": "1.0.5",
"phpstan/phpstan": "0.12.48",
"phpstan/phpstan-doctrine": "0.12.20",
"phpstan/phpstan-phpunit": "0.12.16",
"phpstan/phpstan-symfony": "0.12.8",
"phpunit/phpunit": "9.4.0",
"psalm/plugin-symfony": "1.4.4",
"sensiolabs/security-checker": "^6.0",
"symfony/browser-kit": "5.1.3",
"symfony/css-selector": "5.1.3",
"symfony/error-handler": "5.1.3",
"symfony/phpunit-bridge": "5.1.3",
"symfony/stopwatch": "5.1.3",
"symfony/web-profiler-bundle": "5.1.3",
"symplify/easy-coding-standard": "8.1.19",
"vimeo/psalm": "3.13.1"
"symfony/browser-kit": "5.1.6",
"symfony/css-selector": "5.1.6",
"symfony/error-handler": "5.1.6",
"symfony/phpunit-bridge": "5.1.6",
"symfony/stopwatch": "5.1.6",
"symfony/web-profiler-bundle": "5.1.6",
"symplify/coding-standard": "8.3.26",
"symplify/easy-coding-standard": "8.3.26",
"vimeo/psalm": "3.16"
},
"config": {
"preferred-install": {
Expand Down Expand Up @@ -75,19 +83,14 @@
},
"post-install-cmd": [
"@auto-scripts",
"ln -sf ../../bin/pre-commit.sh .git/hooks/pre-commit"
"bin/setup.sh"
],
"post-update-cmd": [
"@auto-scripts"
"@auto-scripts",
"bin/setup.sh"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"id": "01C50GDEDXDFSYH6FBWZCZYHPB",
"allow-contrib": false
}
}
}
Loading

0 comments on commit 1301e81

Please sign in to comment.