Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Merge tools/composer.json into composer.json #579

Merged
merged 1 commit into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 2 additions & 32 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,6 @@ jobs:
with:
dependencies: "${{ matrix.dependencies }}"

- name: "Install lowest dependencies from composer.json in tools/"
if: "matrix.dependencies == 'lowest'"
run: "composer update --no-interaction --no-progress --no-suggest --prefer-lowest"
working-directory: "tools/"

- name: "Install locked dependencies from composer.lock in tools/"
if: "matrix.dependencies == 'locked'"
run: "composer install --no-interaction --no-progress --no-suggest"
working-directory: "tools/"

- name: "Install highest dependencies from composer.json in tools/"
if: "matrix.dependencies == 'highest'"
run: "composer update --no-interaction --no-progress --no-suggest"
working-directory: "tools/"

- name: "Run ergebnis/composer-normalize"
run: "tools/composer-normalize --dry-run"

Expand All @@ -94,7 +79,7 @@ jobs:
restore-keys: "php-${{ matrix.php-version }}-php-cs-fixer-"

- name: "Run friendsofphp/php-cs-fixer"
run: "tools/vendor/bin/php-cs-fixer fix --config=.php_cs --diff --diff-format=udiff --dry-run --verbose"
run: "vendor/bin/php-cs-fixer fix --config=.php_cs --diff --diff-format=udiff --dry-run --verbose"

dependency-analysis:
name: "Dependency Analysis"
Expand Down Expand Up @@ -178,21 +163,6 @@ jobs:
with:
dependencies: "${{ matrix.dependencies }}"

- name: "Install lowest dependencies from composer.json in tools/"
if: "matrix.dependencies == 'lowest'"
run: "composer update --no-interaction --no-progress --no-suggest --prefer-lowest"
working-directory: "tools/"

- name: "Install locked dependencies from composer.lock in tools/"
if: "matrix.dependencies == 'locked'"
run: "composer install --no-interaction --no-progress --no-suggest"
working-directory: "tools/"

- name: "Install highest dependencies from composer.json in tools/"
if: "matrix.dependencies == 'highest'"
run: "composer update --no-interaction --no-progress --no-suggest"
working-directory: "tools/"

- name: "Create cache directory for phpstan/phpstan"
run: "mkdir -p .build/phpstan"

Expand All @@ -217,7 +187,7 @@ jobs:
restore-keys: "php-${{ matrix.php-version }}-psalm-"

- name: "Run vimeo/psalm"
run: "tools/vendor/bin/psalm --config=psalm.xml --diff --diff-methods --shepherd --show-info=false --stats --threads=4"
run: "vendor/bin/psalm --config=psalm.xml --diff --diff-methods --shepherd --show-info=false --stats --threads=4"

tests:
name: "Tests"
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
/phar/resource/
/phar/src/
/phar/vendor/
/tools/vendor/
/vendor/
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ coding-standards: vendor ## Normalizes composer.json with ergebnis/composer-norm
tools/composer-normalize
yamllint -c .yamllint.yaml --strict .
mkdir -p .build/php-cs-fixer
tools/vendor/bin/php-cs-fixer fix --config=.php_cs --diff --diff-format=udiff --verbose
vendor/bin/php-cs-fixer fix --config=.php_cs --diff --diff-format=udiff --verbose

.PHONY: dependency-analysis
dependency-analysis: vendor ## Runs a dependency analysis with maglnet/composer-require-checker
Expand Down Expand Up @@ -43,14 +43,14 @@ static-code-analysis: vendor ## Runs a static code analysis with phpstan/phpstan
mkdir -p .build/phpstan
vendor/bin/phpstan analyse --configuration=phpstan.neon --memory-limit=-1
mkdir -p .build/psalm
tools/vendor/bin/psalm --config=psalm.xml --diff --diff-methods --show-info=false --stats --threads=4
vendor/bin/psalm --config=psalm.xml --diff --diff-methods --show-info=false --stats --threads=4

.PHONY: static-code-analysis-baseline
static-code-analysis-baseline: vendor ## Generates a baseline for static code analysis with phpstan/phpstan and vimeo/psalm
mkdir -p .build/phpstan
vendor/bin/phpstan analyze --configuration=phpstan.neon --generate-baseline=phpstan-baseline.neon --memory-limit=-1
mkdir -p .build/psalm
tools/vendor/bin/psalm --config=psalm.xml --set-baseline=psalm-baseline.xml
vendor/bin/psalm --config=psalm.xml --set-baseline=psalm-baseline.xml

.PHONY: tests
tests: vendor ## Runs auto-review, unit, and integration tests with phpunit/phpunit
Expand All @@ -59,7 +59,6 @@ tests: vendor ## Runs auto-review, unit, and integration tests with phpunit/phpu
vendor/bin/phpunit --configuration=test/Unit/phpunit.xml
vendor/bin/phpunit --configuration=test/Integration/phpunit.xml

vendor: composer.json composer.lock tools/composer.json tools/composer.lock
vendor: composer.json composer.lock
composer validate --strict
composer install --no-interaction --no-progress --no-suggest
composer install --no-interaction --no-progress --no-suggest --working-dir=tools
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
"require-dev": {
"composer/composer": "^1.10.13 || ^2.0.0",
"composer/package-versions-deprecated": "^1.11.99",
"ergebnis/license": "^1.1.0",
"ergebnis/php-cs-fixer-config": "^2.3.0",
"ergebnis/phpstan-rules": "~0.15.2",
"ergebnis/test-util": "^1.3.0",
"jangregor/phpstan-prophecy": "~0.8.0",
Expand All @@ -36,7 +38,9 @@
"phpstan/phpstan-phpunit": "~0.12.16",
"phpstan/phpstan-strict-rules": "~0.12.5",
"phpunit/phpunit": "^8.5.8",
"symfony/filesystem": "^5.1.7"
"psalm/plugin-phpunit": "~0.12.2",
"symfony/filesystem": "^5.1.7",
"vimeo/psalm": "^3.18.2"
},
"config": {
"platform": {
Expand Down
Loading