Skip to content

Commit

Permalink
[TASK] Add PHPStan baseline
Browse files Browse the repository at this point in the history
Here we collect errors related to different TYPO3 versions. These will
be dropped with support of the oldest TYPO3 version.
  • Loading branch information
mbrodala committed May 31, 2023
1 parent cd52fba commit 5b2d200
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 8 deletions.
46 changes: 46 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
parameters:
ignoreErrors:
-
message: "#^Method TYPO3\\\\CMS\\\\Extbase\\\\Persistence\\\\QueryInterface\\<Pagemachine\\\\Formlog\\\\Domain\\\\Model\\\\FormLogEntry\\>\\:\\:logicalAnd\\(\\) invoked with 2 parameters, 1 required\\.$#"
count: 1
path: Classes/Domain/Repository/FormLogEntryRepository.php

-
message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Extbase\\\\Mvc\\\\RequestInterface\\:\\:setArgument\\(\\)\\.$#"
count: 1
path: Classes/Controller/Backend/FormLogController.php

-
message: "#^Access to constant Extend on an unknown class TYPO3\\\\CMS\\\\Core\\\\Security\\\\ContentSecurityPolicy\\\\MutationMode\\.$#"
count: 1
path: Configuration/ContentSecurityPolicies.php

-
message: "#^Access to constant ScriptSrc on an unknown class TYPO3\\\\CMS\\\\Core\\\\Security\\\\ContentSecurityPolicy\\\\Directive\\.$#"
count: 1
path: Configuration/ContentSecurityPolicies.php

-
message: "#^Call to static method backend\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\Security\\\\ContentSecurityPolicy\\\\Scope\\.$#"
count: 1
path: Configuration/ContentSecurityPolicies.php

-
message: "#^Call to static method fromEntries\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\Type\\\\Map\\.$#"
count: 1
path: Configuration/ContentSecurityPolicies.php

-
message: "#^Instantiated class TYPO3\\\\CMS\\\\Core\\\\Security\\\\ContentSecurityPolicy\\\\Mutation not found\\.$#"
count: 1
path: Configuration/ContentSecurityPolicies.php

-
message: "#^Instantiated class TYPO3\\\\CMS\\\\Core\\\\Security\\\\ContentSecurityPolicy\\\\MutationCollection not found\\.$#"
count: 1
path: Configuration/ContentSecurityPolicies.php

-
message: "#^Instantiated class TYPO3\\\\CMS\\\\Core\\\\Security\\\\ContentSecurityPolicy\\\\UriValue not found\\.$#"
count: 1
path: Configuration/ContentSecurityPolicies.php
9 changes: 1 addition & 8 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
includes:
- vendor/jangregor/phpstan-prophecy/extension.neon
- vendor/saschaegerer/phpstan-typo3/extension.neon
- phpstan-baseline.neon

parameters:
level: 5
Expand Down Expand Up @@ -28,12 +29,4 @@ parameters:
path: '*/PaginateViewHelperTest.php'
- message: '#Access to protected property .+TypoScriptFrontendController::\$sys_language_uid#'
path: '*LoggerFinisher*'
- message: "#^Method TYPO3\\\\CMS\\\\Extbase\\\\Persistence\\\\QueryInterface\\<Pagemachine\\\\Formlog\\\\Domain\\\\Model\\\\FormLogEntry\\>\\:\\:logicalAnd\\(\\) invoked with 2 parameters, 1 required\\.$#"
count: 1
path: Classes/Domain/Repository/FormLogEntryRepository.php
- message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Extbase\\\\Mvc\\\\RequestInterface\\:\\:setArgument\\(\\)\\.$#"
count: 1
path: Classes/Controller/Backend/FormLogController.php
- message: '#Call to static method .+ on an unknown class .+#'
path: Configuration/ContentSecurityPolicies.php
reportUnmatchedIgnoredErrors: false

0 comments on commit 5b2d200

Please sign in to comment.