Skip to content

Commit

Permalink
Normalize composer, lint PHP files
Browse files Browse the repository at this point in the history
  • Loading branch information
OndraM committed Feb 17, 2020
1 parent a409414 commit 3b96a97
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ matrix:
php: '7.1'
env: DEPENDENCIES="--prefer-lowest"
- name: 'Static analysis and codestyle check'
php: '7.3'
php: '7.4'
env: CHECK_CODESTYLE=1
before_install:
- phpenv config-rm xdebug.ini
Expand All @@ -21,6 +21,7 @@ matrix:
- travis_retry wget -q https://github.com/Roave/BackwardCompatibilityCheck/releases/download/4.1.0/roave-backward-compatibility-check.phar -O ./roave-backward-compatibility-check.phar
- travis_retry yarn add danger
script:
- composer lint
- composer analyze
- if [ `git tag | wc -l` -gt 0 ]; then php ./roave-backward-compatibility-check.phar --format=markdown >bc-changes.md; fi
- yarn danger ci
Expand Down
44 changes: 26 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
{
"name": "lmc/matej-client",
"description": "API Client for Matej recommendation engine",
"type": "library",
"description": "API Client for Matej recommendation engine",
"license": "MIT",
"minimum-stability": "stable",
"authors": [
{
"name": "LMC s.r.o.",
"homepage": "https://github.com/lmc-eu"
}
],
"autoload": {
"psr-4": {
"Lmc\\Matej\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Lmc\\Matej\\": "tests/unit/",
"Lmc\\Matej\\IntegrationTests\\": "tests/integration/"
}
},
"require": {
"php": "^7.1",
"ext-hash": "*",
Expand All @@ -39,28 +27,48 @@
"ramsey/uuid": "^3.7"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.2",
"jakub-onderka/php-parallel-lint": "^1.0",
"lmc/coding-standard": "^1.2",
"php-coveralls/php-coveralls": "^2.0",
"php-http/guzzle6-adapter": "^1.1 || ^2.0",
"php-http/mock-client": "^1.0",
"php-mock/php-mock-phpunit": "^1.0 || ^2.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan-phpunit": "^0.12.1",
"phpstan/phpstan": "^0.12.0",
"phpstan/phpstan-phpunit": "^0.12.1",
"phpunit/phpunit": "^6.4 || ^7.0 || ^8.0",
"symfony/var-dumper": "^3.3 || ^4.0 || ^5.0"
},
"config": {
"sort-packages": true
},
"autoload": {
"psr-4": {
"Lmc\\Matej\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Lmc\\Matej\\": "tests/unit/",
"Lmc\\Matej\\IntegrationTests\\": "tests/integration/"
}
},
"minimum-stability": "stable",
"scripts": {
"all": [
"@lint",
"@analyze",
"./vendor/bin/phpunit --colors=always"
],
"analyze": [
"vendor/bin/ecs check src/ tests/ --ansi",
"vendor/bin/phpstan.phar analyze -c phpstan.neon --ansi"
"vendor/bin/phpstan analyze -c phpstan.neon --ansi"
],
"lint": [
"vendor/bin/parallel-lint -j 10 ./src ./tests",
"@composer validate",
"@composer normalize --dry-run"
]
},
"config": {
"sort-packages": true
}
}
1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ parameters:
- message: '#parameter \$factoryArguments with no typehint specified#'
path: tests/unit/RequestBuilder/RequestBuilderFactoryTest.php

checkGenericClassInNonGenericObjectType: false
checkMissingIterableValueType: false
level: 7
paths:
Expand Down

0 comments on commit 3b96a97

Please sign in to comment.