Skip to content

Commit

Permalink
adjust phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
solverat committed Apr 27, 2020
1 parent 1136de1 commit 8a02af7
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 15 deletions.
27 changes: 16 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ env:
- PIMCORE_PHP_ERROR_REPORTING=32767 # E_ALL
matrix:
include:
- name: "PHPStan Static Analysis (Pimcore 6.5.x, Symfony ^4.0, PHP 7.4)"
- name: "PHPStan Static Analysis (Pimcore 6.6.x, Symfony ^4.0, PHP 7.3)"
sudo: required
php: 7.4
php: 7.3
env:
- PIMCORE_SKELETON_BRANCH="tags/v2.5.0"
- PIMCORE_SKELETON_BRANCH="tags/v2.6.0"
- DACHCOM_TEST_SECTION=phpstan
- name: "PHP ECS (Pimcore 6.5.x, Symfony ^4.0, PHP 7.4)"
- name: "PHP ECS (Pimcore 6.6.x, Symfony ^4.0, PHP 7.3)"
sudo: required
php: 7.4
php: 7.3
env:
- PIMCORE_SKELETON_BRANCH="tags/v2.5.0"
- PIMCORE_SKELETON_BRANCH="tags/v2.6.0"
- DACHCOM_TEST_SECTION=ecs
- name: "Codeception Tests (Pimcore 6.0.x, Symfony ^4.3, PHP 7.3)"
sudo: required
Expand Down Expand Up @@ -62,20 +62,25 @@ matrix:
php: 7.3
env:
- PIMCORE_SKELETON_BRANCH="tags/v2.5.0"
- name: "Codeception Tests (Pimcore 6.5.x, Symfony ^3.4, PHP 7.3)"
- name: "Codeception Tests (Pimcore 6.6.x, Symfony ^4.0, PHP 7.3)"
sudo: required
php: 7.3
env:
- PIMCORE_SKELETON_BRANCH="tags/v2.6.0"
- name: "Codeception Tests (Pimcore 6.6.x, Symfony ^3.4, PHP 7.3)"
sudo: required
php: 7.3
env:
- SYMFONY_VERSION=^3.4
- PIMCORE_SKELETON_BRANCH="tags/v2.5.0"
- name: "Codeception Tests (Pimcore 6.5.x, Symfony ^4.0, PHP 7.4)"
- PIMCORE_SKELETON_BRANCH="tags/v2.6.0"
- name: "Codeception Tests (Pimcore 6.6.x, Symfony ^4.0, PHP 7.4)"
sudo: required
php: 7.4
env:
- PIMCORE_SKELETON_BRANCH="tags/v2.5.0"
- PIMCORE_SKELETON_BRANCH="tags/v2.6.0"
allow_failures:
- env:
- PIMCORE_SKELETON_BRANCH="tags/v2.5.0"
- PIMCORE_SKELETON_BRANCH="tags/v2.6.0"
- DACHCOM_TEST_SECTION=ecs
fast_finish: true

Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@
}
},
"require": {
"pimcore/pimcore": "^6.0.0",
"pimcore/pimcore": "^6.0",
"spatie/schema-org": "^2.6"
},
"require-dev": {
"codeception/codeception": "~2.3.0",
"phpstan/phpstan": "^0.11.1",
"phpstan/phpstan-symfony": "^0.11.0",
"symplify/easy-coding-standard": "^5.4"
},
"suggest": {
"dachcom-digital/seo": "^1.0"
}
}
3 changes: 3 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ parameters:
reportUnmatchedIgnoredErrors: false
symfony:
container_xml_path: var/cache/dev/appAppKernelDevDebugContainer.xml
excludes_analyse:
# as long we don't install the dependencies :(
- '*SchemaBundle/Seo/Middleware/SchemaGraphAdapter.php'
ignoreErrors:
# There is no global constants definition file we could include, ignore it:
- '#Constant PIMCORE_[A-Z\\_]+ not found\.#'
Expand Down
2 changes: 1 addition & 1 deletion src/SchemaBundle/Processor/SchemaRequestProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function process(Request $request): void

$schemaBlocks = [];

foreach ($this->generatorRegistry->all() as $generator) {
foreach ($this->generatorRegistry->allGenerators() as $generator) {
if ($generator->supportsRequest($request, $request->attributes->get('_route')) === false) {
continue;
}
Expand Down
4 changes: 2 additions & 2 deletions src/SchemaBundle/Registry/SchemaGeneratorRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class SchemaGeneratorRegistry implements SchemaGeneratorRegistryInterface
protected $fragmentGeneratorInterface;

/**
* @param $generatorInterface
* @param $fragmentGeneratorInterface
* @param string $generatorInterface
* @param string $fragmentGeneratorInterface
*/
public function __construct($generatorInterface, $fragmentGeneratorInterface)
{
Expand Down

0 comments on commit 8a02af7

Please sign in to comment.