diff --git a/.gitignore b/.gitignore index 524bca1..c01624f 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,5 @@ yarn-error.log /.php-cs-fixer.cache /config/reference.php /tests/bootstrap.php +/dast_scan/ +/make/security.mk diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 7027d60..0fa0802 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -18,7 +18,6 @@ ; return (new PhpCsFixer\Config()) - ->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect()) ->setRiskyAllowed(true) ->setRules([ '@Symfony' => true, diff --git a/CHANGELOG.md b/CHANGELOG.md index 7af4974..1067d1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ CHANGELOG =================== +## v2.12.3 - (2026-09-18) +### Fixed +- `templates/standard_layout.html.twig` Add missing `integrity`/`crossorigin` attributes on the Iconify CDN script to fix CWE-345 / CWE-693 + ## v2.12.2 - (2026-08-05) ### BC BREAK - The login form now submits a CSRF token. You must enable `enable_csrf: true` on the `form_login` of the admin firewall in your `security.yaml` config, otherwise authentication will fail. diff --git a/phpcs.xml b/phpcs.xml deleted file mode 100644 index 194b34c..0000000 --- a/phpcs.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - bin/ - config/ - config/reference.php - public/ - src/ - tests/ - - diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 0000000..dec8798 --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,1087 @@ +parameters: + ignoreErrors: + - + message: '#^Class Smart\\SonataBundle\\Admin\\AbstractAdmin extends generic class Sonata\\AdminBundle\\Admin\\AbstractAdmin but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Admin/AbstractAdmin.php + + - + message: '#^Method Smart\\SonataBundle\\Admin\\AbstractAdmin\:\:getHistoryConfig\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Admin/AbstractAdmin.php + + - + message: '#^Method Smart\\SonataBundle\\Admin\\AbstractAdmin\:\:trans\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Admin/AbstractAdmin.php + + - + message: '#^Method Smart\\SonataBundle\\Admin\\BatchLogAdmin\:\:getChoicesValues\(\) has parameter \$values with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Admin/BatchLogAdmin.php + + - + message: '#^Method Smart\\SonataBundle\\Admin\\BatchLogAdmin\:\:getChoicesValues\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Admin/BatchLogAdmin.php + + - + message: '#^PHPDoc tag @var for variable \$modelManager contains generic class Sonata\\DoctrineORMAdminBundle\\Model\\ModelManager but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Admin/BatchLogAdmin.php + + - + message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(mixed\)\: mixed\)\|null, Closure\(string\)\: string given\.$#' + identifier: argument.type + count: 1 + path: src/Admin/BatchLogAdmin.php + + - + message: '#^Class Smart\\SonataBundle\\Admin\\Extension\\ActionExtension extends generic class Sonata\\AdminBundle\\Admin\\AbstractAdminExtension but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Admin/Extension/ActionExtension.php + + - + message: '#^Method Smart\\SonataBundle\\Admin\\Extension\\ActionExtension\:\:configureListFields\(\) has parameter \$list with generic class Sonata\\AdminBundle\\Datagrid\\ListMapper but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Admin/Extension/ActionExtension.php + + - + message: '#^Method Smart\\SonataBundle\\Admin\\Extension\\ActionExtension\:\:createActionField\(\) has parameter \$list with generic class Sonata\\AdminBundle\\Datagrid\\ListMapper but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Admin/Extension/ActionExtension.php + + - + message: '#^Parameter \#1 \.\.\.\$arrays of function array_merge expects array, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Admin/Extension/ActionExtension.php + + - + message: '#^Class Smart\\SonataBundle\\Admin\\Extension\\EncodePasswordExtension extends generic class Sonata\\AdminBundle\\Admin\\AbstractAdminExtension but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Admin/Extension/EncodePasswordExtension.php + + - + message: '#^Parameter \#1 \$string of function trim expects string, string\|null given\.$#' + identifier: argument.type + count: 1 + path: src/Admin/Extension/EncodePasswordExtension.php + + - + message: '#^Parameter \#2 \$plainPassword of method Symfony\\Component\\PasswordHasher\\Hasher\\UserPasswordHasherInterface\:\:hashPassword\(\) expects string, string\|null given\.$#' + identifier: argument.type + count: 1 + path: src/Admin/Extension/EncodePasswordExtension.php + + - + message: '#^Class Smart\\SonataBundle\\Admin\\Extension\\HistoryExtension extends generic class Sonata\\AdminBundle\\Admin\\AbstractAdminExtension but does not specify its types\: T$#' + identifier: missingType.generics + count: 1 + path: src/Admin/Extension/HistoryExtension.php + + - + message: '#^Method Smart\\SonataBundle\\Admin\\Monitoring\\AbstractApiCallAdmin\:\:getApiRestartAllowedRoutes\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Admin/Monitoring/AbstractApiCallAdmin.php + + - + message: '#^Method Smart\\SonataBundle\\Admin\\Monitoring\\AbstractApiCallAdmin\:\:getOriginChoices\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Admin/Monitoring/AbstractApiCallAdmin.php + + - + message: '#^Method Smart\\SonataBundle\\Admin\\Monitoring\\AbstractApiCallAdmin\:\:getRouteChoices\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Admin/Monitoring/AbstractApiCallAdmin.php + + - + message: '#^Method Smart\\SonataBundle\\Admin\\Monitoring\\AbstractApiCallAdmin\:\:getStatusChoices\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Admin/Monitoring/AbstractApiCallAdmin.php + + - + message: '#^Parameter \#1 \$array of function array_flip expects array\, array given\.$#' + identifier: argument.type + count: 4 + path: src/Admin/Monitoring/AbstractApiCallAdmin.php + + - + message: '#^Method Smart\\SonataBundle\\Admin\\Monitoring\\AbstractCronAdmin\:\:getStatusChoices\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Admin/Monitoring/AbstractCronAdmin.php + + - + message: '#^Parameter \#1 \$array of function array_flip expects array\, array given\.$#' + identifier: argument.type + count: 2 + path: src/Admin/Monitoring/AbstractCronAdmin.php + + - + message: '#^Parameter \#1 \$array of function array_flip expects array\, array\ given\.$#' + identifier: argument.type + count: 2 + path: src/Admin/ParameterAdmin.php + + - + message: '#^Method Smart\\SonataBundle\\Admin\\SmartAdminInterface\:\:trans\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Admin/SmartAdminInterface.php + + - + message: '#^Parameter \#1 \$dryRun of method Smart\\SonataBundle\\Loader\\ParameterLoader\:\:load\(\) expects bool, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Command/ParameterLoadCommand.php + + - + message: '#^Part \$logs\[''nb_deleted''\] \(mixed\) of encapsed string cannot be cast to string\.$#' + identifier: encapsedStringPart.nonString + count: 1 + path: src/Command/ParameterLoadCommand.php + + - + message: '#^Part \$logs\[''nb_inserted''\] \(mixed\) of encapsed string cannot be cast to string\.$#' + identifier: encapsedStringPart.nonString + count: 1 + path: src/Command/ParameterLoadCommand.php + + - + message: '#^Part \$logs\[''nb_skipped''\] \(mixed\) of encapsed string cannot be cast to string\.$#' + identifier: encapsedStringPart.nonString + count: 1 + path: src/Command/ParameterLoadCommand.php + + - + message: '#^Part \$logs\[''nb_updated''\] \(mixed\) of encapsed string cannot be cast to string\.$#' + identifier: encapsedStringPart.nonString + count: 1 + path: src/Command/ParameterLoadCommand.php + + - + message: '#^Cannot access offset ''dependencies'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: src/Composer/InstalledVersions.php + + - + message: '#^Cannot access offset ''devDependencies'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: src/Composer/InstalledVersions.php + + - + message: '#^Cannot access offset string on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 2 + path: src/Composer/InstalledVersions.php + + - + message: '#^Method Smart\\SonataBundle\\Composer\\InstalledVersions\:\:getFormattedVersion\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Composer/InstalledVersions.php + + - + message: '#^Parameter \#1 \$haystack of function str_starts_with expects string, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Composer/InstalledVersions.php + + - + message: '#^Parameter \#1 \$string of function substr expects string, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Composer/InstalledVersions.php + + - + message: '#^Parameter \#2 \$string of function explode expects string, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Composer/InstalledVersions.php + + - + message: '#^Parameter \#3 \$subject of function str_replace expects array\\|string, string\|null given\.$#' + identifier: argument.type + count: 1 + path: src/Composer/InstalledVersions.php + + - + message: '#^Method Smart\\SonataBundle\\Controller\\AbstractSecurityController\:\:getUserProvider\(\) return type with generic interface Symfony\\Component\\Security\\Core\\User\\UserProviderInterface does not specify its types\: TUser$#' + identifier: missingType.generics + count: 1 + path: src/Controller/AbstractSecurityController.php + + - + message: '#^Method Smart\\SonataBundle\\Controller\\AbstractSecurityController\:\:setUserProvider\(\) has parameter \$userProvider with generic interface Symfony\\Component\\Security\\Core\\User\\UserProviderInterface but does not specify its types\: TUser$#' + identifier: missingType.generics + count: 1 + path: src/Controller/AbstractSecurityController.php + + - + message: '#^Method Smart\\SonataBundle\\Controller\\AbstractSecurityController\:\:translate\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Controller/AbstractSecurityController.php + + - + message: '#^Parameter \#1 \$identifier of method Symfony\\Component\\Security\\Core\\User\\UserProviderInterface\\:\:loadUserByIdentifier\(\) expects string, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Controller/AbstractSecurityController.php + + - + message: '#^Parameter \#2 \$value of method Yokai\\SecurityTokenBundle\\Manager\\TokenManagerInterface\:\:get\(\) expects string, string\|null given\.$#' + identifier: argument.type + count: 1 + path: src/Controller/AbstractSecurityController.php + + - + message: '#^Property Smart\\SonataBundle\\Controller\\AbstractSecurityController\:\:\$userProvider with generic interface Symfony\\Component\\Security\\Core\\User\\UserProviderInterface does not specify its types\: TUser$#' + identifier: missingType.generics + count: 1 + path: src/Controller/AbstractSecurityController.php + + - + message: '#^Parameter \#1 \$subject of method Symfony\\Component\\Mime\\Email\:\:subject\(\) expects string, string\|null given\.$#' + identifier: argument.type + count: 1 + path: src/Controller/Admin/DocumentationController.php + + - + message: '#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable + count: 3 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Cannot access offset ''advisories'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Cannot access offset ''advisory'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Cannot access offset ''current'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Cannot access offset ''current_description'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Cannot access offset ''data'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Cannot access offset ''description'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Cannot access offset ''findings'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Cannot access offset ''last'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Cannot access offset ''module_name'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Cannot access offset ''patched_versions'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Cannot access offset ''paths'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Cannot access offset ''release'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 2 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Cannot access offset ''releases'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Cannot access offset ''severity'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 4 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Cannot access offset ''status'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 2 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Cannot access offset ''type'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Cannot access offset ''value'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 2 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Cannot access offset ''version'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Cannot access offset 0 on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 5 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Cannot access offset mixed on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 2 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Method Smart\\SonataBundle\\Controller\\Admin\\Monitoring\\HealthCheckController\:\:formatVulnerabilitiesData\(\) has parameter \$severityCount with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Method Smart\\SonataBundle\\Controller\\Admin\\Monitoring\\HealthCheckController\:\:formatVulnerabilitiesData\(\) has parameter \$vulnerabilities with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Method Smart\\SonataBundle\\Controller\\Admin\\Monitoring\\HealthCheckController\:\:formatVulnerabilitiesData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Method Smart\\SonataBundle\\Controller\\Admin\\Monitoring\\HealthCheckController\:\:getAdvisoryVulnerability\(\) has parameter \$advisory with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Method Smart\\SonataBundle\\Controller\\Admin\\Monitoring\\HealthCheckController\:\:getAdvisoryVulnerability\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Method Smart\\SonataBundle\\Controller\\Admin\\Monitoring\\HealthCheckController\:\:getJsVulnerabilities\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Method Smart\\SonataBundle\\Controller\\Admin\\Monitoring\\HealthCheckController\:\:getPackageVersion\(\) should return string\|null but returns mixed\.$#' + identifier: return.type + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Method Smart\\SonataBundle\\Controller\\Admin\\Monitoring\\HealthCheckController\:\:getPhpVulnerabilities\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Method Smart\\SonataBundle\\Controller\\Admin\\Monitoring\\HealthCheckController\:\:setCurrentVersions\(\) has parameter \$currentVersions with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Parameter \#1 \$advisory of method Smart\\SonataBundle\\Controller\\Admin\\Monitoring\\HealthCheckController\:\:getAdvisoryVulnerability\(\) expects array, mixed given\.$#' + identifier: argument.type + count: 2 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Parameter \#1 \$haystack of function str_contains expects string, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Parameter \#1 \$haystack of function strpos expects string, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Parameter \#1 \$haystack of function strrpos expects string, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Parameter \#1 \$string of function strtolower expects string, mixed given\.$#' + identifier: argument.type + count: 4 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Parameter \#1 \$string of function substr expects string, mixed given\.$#' + identifier: argument.type + count: 2 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Parameter \#2 \$packageName of method Smart\\SonataBundle\\Controller\\Admin\\Monitoring\\HealthCheckController\:\:getAdvisoryVulnerability\(\) expects string, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Parameter \#2 \$string of function explode expects string, mixed given\.$#' + identifier: argument.type + count: 2 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Possibly invalid array key type mixed\.$#' + identifier: offsetAccess.invalidOffset + count: 2 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Property Smart\\SonataBundle\\Controller\\Admin\\Monitoring\\HealthCheckController\:\:\$currentVersions type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Controller/Admin/Monitoring/HealthCheckController.php + + - + message: '#^Trait Smart\\SonataBundle\\Controller\\CRUD\\Monitoring\\RestartApiCallTrait is used zero times and is not analysed\.$#' + identifier: trait.unused + count: 1 + path: src/Controller/CRUD/Monitoring/RestartApiCallTrait.php + + - + message: '#^Trait Smart\\SonataBundle\\Controller\\CRUD\\SendAccountCreationEmailTrait is used zero times and is not analysed\.$#' + identifier: trait.unused + count: 1 + path: src/Controller/CRUD/SendAccountCreationEmailTrait.php + + - + message: '#^Parameter \#1 \$class of function class_exists expects string, string\|null given\.$#' + identifier: argument.type + count: 1 + path: src/DependencyInjection/Compiler/AdminCompilerPass.php + + - + message: '#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable + count: 1 + path: src/DependencyInjection/SmartSonataExtension.php + + - + message: '#^Parameter \#1 \$name of method Symfony\\Component\\DependencyInjection\\ContainerBuilder\:\:prependExtensionConfig\(\) expects string, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/DependencyInjection/SmartSonataExtension.php + + - + message: '#^Parameter \#2 \$config of method Symfony\\Component\\DependencyInjection\\ContainerBuilder\:\:prependExtensionConfig\(\) expects array\, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/DependencyInjection/SmartSonataExtension.php + + - + message: '#^Method Smart\\SonataBundle\\Entity\\Log\\BatchLog\:\:getContext\(\) should return string but returns string\|null\.$#' + identifier: return.type + count: 1 + path: src/Entity/Log/BatchLog.php + + - + message: '#^Method Smart\\SonataBundle\\Entity\\Log\\BatchLog\:\:getData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Entity/Log/BatchLog.php + + - + message: '#^Method Smart\\SonataBundle\\Entity\\Log\\BatchLog\:\:getName\(\) should return string but returns string\|null\.$#' + identifier: return.type + count: 1 + path: src/Entity/Log/BatchLog.php + + - + message: '#^Method Smart\\SonataBundle\\Entity\\Log\\BatchLog\:\:setData\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Entity/Log/BatchLog.php + + - + message: '#^Property Smart\\SonataBundle\\Entity\\Log\\BatchLog\:\:\$data type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Entity/Log/BatchLog.php + + - + message: '#^Method Smart\\SonataBundle\\Entity\\Log\\HistorizableInterface\:\:addHistory\(\) has parameter \$history with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Entity/Log/HistorizableInterface.php + + - + message: '#^Method Smart\\SonataBundle\\Entity\\Log\\HistorizableInterface\:\:getAttributsForHistoryDiff\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Entity/Log/HistorizableInterface.php + + - + message: '#^Method Smart\\SonataBundle\\Entity\\Log\\HistorizableInterface\:\:getDataForHistoryDiff\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Entity/Log/HistorizableInterface.php + + - + message: '#^Method Smart\\SonataBundle\\Entity\\Log\\HistorizableInterface\:\:getHistory\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Entity/Log/HistorizableInterface.php + + - + message: '#^Method Smart\\SonataBundle\\Entity\\Log\\HistorizableInterface\:\:setHistory\(\) has parameter \$history with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Entity/Log/HistorizableInterface.php + + - + message: '#^Trait Smart\\SonataBundle\\Entity\\Log\\HistorizableTrait is used zero times and is not analysed\.$#' + identifier: trait.unused + count: 1 + path: src/Entity/Log/HistorizableTrait.php + + - + message: '#^Cannot cast mixed to string\.$#' + identifier: cast.string + count: 1 + path: src/Entity/Parameter.php + + - + message: '#^Method Smart\\SonataBundle\\Entity\\Parameter\:\:getArrayValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Entity/Parameter.php + + - + message: '#^Method Smart\\SonataBundle\\Entity\\Parameter\:\:getAttributsForHistoryDiff\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Entity/Parameter.php + + - + message: '#^Parameter \#2 \$array of function implode expects array\, list given\.$#' + identifier: argument.type + count: 1 + path: src/Entity/Parameter.php + + - + message: '#^Method Smart\\SonataBundle\\Entity\\ParameterInterface\:\:getArrayValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Entity/ParameterInterface.php + + - + message: '#^Trait Smart\\SonataBundle\\Entity\\User\\PasswordSafeableTrait is used zero times and is not analysed\.$#' + identifier: trait.unused + count: 1 + path: src/Entity/User/PasswordSafeableTrait.php + + - + message: '#^Class Smart\\SonataBundle\\Form\\Type\\Security\\ForgotPasswordType extends generic class Symfony\\Component\\Form\\AbstractType but does not specify its types\: TData$#' + identifier: missingType.generics + count: 1 + path: src/Form/Type/Security/ForgotPasswordType.php + + - + message: '#^Cannot access offset ''help'' on mixed\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: src/Loader/ParameterLoader.php + + - + message: '#^Cannot use \+\+ on mixed\.$#' + identifier: postInc.type + count: 4 + path: src/Loader/ParameterLoader.php + + - + message: '#^Method Smart\\SonataBundle\\Loader\\ParameterLoader\:\:addParameter\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Loader/ParameterLoader.php + + - + message: '#^Method Smart\\SonataBundle\\Loader\\ParameterLoader\:\:handleParametersToInsert\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Loader/ParameterLoader.php + + - + message: '#^Method Smart\\SonataBundle\\Loader\\ParameterLoader\:\:load\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Loader/ParameterLoader.php + + - + message: '#^Parameter \#1 \$help of method Smart\\SonataBundle\\Entity\\Parameter\:\:setHelp\(\) expects string\|null, mixed given\.$#' + identifier: argument.type + count: 2 + path: src/Loader/ParameterLoader.php + + - + message: '#^Parameter \#1 \$regex of method Smart\\SonataBundle\\Entity\\Parameter\:\:setRegex\(\) expects string\|null, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Loader/ParameterLoader.php + + - + message: '#^Parameter \#1 \$type of method Smart\\SonataBundle\\Entity\\Parameter\:\:setType\(\) expects string, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Loader/ParameterLoader.php + + - + message: '#^Parameter \#1 \$value of method Smart\\SonataBundle\\Entity\\Parameter\:\:setValue\(\) expects bool\|string\|null, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Loader/ParameterLoader.php + + - + message: '#^Parameter \#2 \$data of method Smart\\SonataBundle\\Loader\\ParameterLoader\:\:handleParametersToInsert\(\) expects array, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Loader/ParameterLoader.php + + - + message: '#^Property Smart\\SonataBundle\\Loader\\ParameterLoader\:\:\$logs type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Loader/ParameterLoader.php + + - + message: '#^Property Smart\\SonataBundle\\Loader\\ParameterLoader\:\:\$parameters type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Loader/ParameterLoader.php + + - + message: '#^Method Smart\\SonataBundle\\Logger\\BatchLogger\:\:log\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Logger/BatchLogger.php + + - + message: '#^Parameter \#1 \$comment of method Smart\\SonataBundle\\Entity\\Log\\BatchLog\:\:setComment\(\) expects string\|null, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Logger/BatchLogger.php + + - + message: '#^Parameter \#1 \$context of method Smart\\SonataBundle\\Entity\\Log\\BatchLog\:\:setContext\(\) expects string, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Logger/BatchLogger.php + + - + message: '#^Parameter \#1 \$data of method Smart\\SonataBundle\\Entity\\Log\\BatchLog\:\:setData\(\) expects array\|null, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Logger/BatchLogger.php + + - + message: '#^Parameter \#1 \$exception of method Sentry\\ClientInterface\:\:captureException\(\) expects Throwable, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Logger/BatchLogger.php + + - + message: '#^Parameter \#1 \$name of method Smart\\SonataBundle\\Entity\\Log\\BatchLog\:\:setName\(\) expects string, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Logger/BatchLogger.php + + - + message: '#^Parameter \#1 \$success of method Smart\\SonataBundle\\Entity\\Log\\BatchLog\:\:setSuccess\(\) expects bool\|null, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Logger/BatchLogger.php + + - + message: '#^Parameter \#1 \$summary of method Smart\\SonataBundle\\Entity\\Log\\BatchLog\:\:setSummary\(\) expects string\|null, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Logger/BatchLogger.php + + - + message: '#^Method Smart\\SonataBundle\\Logger\\HistoryLogger\:\:hasDiff\(\) has parameter \$entityData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Logger/HistoryLogger.php + + - + message: '#^Method Smart\\SonataBundle\\Logger\\HistoryLogger\:\:init\(\) has parameter \$entityData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Logger/HistoryLogger.php + + - + message: '#^Method Smart\\SonataBundle\\Logger\\HistoryLogger\:\:log\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Logger/HistoryLogger.php + + - + message: '#^Method Smart\\SonataBundle\\Logger\\HistoryLogger\:\:logDiff\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Logger/HistoryLogger.php + + - + message: '#^Method Smart\\SonataBundle\\Logger\\HistoryLogger\:\:logDiff\(\) has parameter \$initialData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Logger/HistoryLogger.php + + - + message: '#^Property Smart\\SonataBundle\\Logger\\HistoryLogger\:\:\$afterHandleEntityData type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Logger/HistoryLogger.php + + - + message: '#^Property Smart\\SonataBundle\\Logger\\HistoryLogger\:\:\$beforeHandleEntityData type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Logger/HistoryLogger.php + + - + message: '#^Method Smart\\SonataBundle\\Mailer\\BaseMailer\:\:extractEmailFromString\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Mailer/BaseMailer.php + + - + message: '#^Parameter \#1 \$context of method Symfony\\Bridge\\Twig\\Mime\\TemplatedEmail\:\:context\(\) expects array, array\\|null given\.$#' + identifier: argument.type + count: 1 + path: src/Mailer/BaseMailer.php + + - + message: '#^Parameter \#1 \$id of method Symfony\\Contracts\\Translation\\TranslatorInterface\:\:trans\(\) expects string, string\|null given\.$#' + identifier: argument.type + count: 1 + path: src/Mailer/BaseMailer.php + + - + message: '#^Parameter \#1 \$string of method Smart\\SonataBundle\\Mailer\\BaseMailer\:\:extractEmailFromString\(\) expects string\|null, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Mailer/BaseMailer.php + + - + message: '#^Parameter \#1 \.\.\.\$addresses of method Symfony\\Component\\Mime\\Email\:\:addBcc\(\) expects string\|Symfony\\Component\\Mime\\Address, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Mailer/BaseMailer.php + + - + message: '#^Parameter \#1 \.\.\.\$addresses of method Symfony\\Component\\Mime\\Email\:\:addCc\(\) expects string\|Symfony\\Component\\Mime\\Address, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Mailer/BaseMailer.php + + - + message: '#^Parameter \#1 \.\.\.\$addresses of method Symfony\\Component\\Mime\\Email\:\:addTo\(\) expects string\|Symfony\\Component\\Mime\\Address, mixed given\.$#' + identifier: argument.type + count: 2 + path: src/Mailer/BaseMailer.php + + - + message: '#^Parameter \#1 \.\.\.\$addresses of method Symfony\\Component\\Mime\\Email\:\:to\(\) expects string\|Symfony\\Component\\Mime\\Address, mixed given\.$#' + identifier: argument.type + count: 1 + path: src/Mailer/BaseMailer.php + + - + message: '#^Parameter \#2 \$array of function implode expects array\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/Mailer/BaseMailer.php + + - + message: '#^Property Smart\\SonataBundle\\Mailer\\BaseMailer\:\:\$recipientToString \(string\|null\) does not accept mixed\.$#' + identifier: assign.propertyType + count: 1 + path: src/Mailer/BaseMailer.php + + - + message: '#^Method Smart\\SonataBundle\\Mailer\\EmailProvider\:\:getEmailCodes\(\) should return array\ but returns array\\|null\.$#' + identifier: return.type + count: 1 + path: src/Mailer/EmailProvider.php + + - + message: '#^Parameter \#2 \$subject of function preg_match expects string, string\|null given\.$#' + identifier: argument.type + count: 1 + path: src/Mailer/EmailProvider.php + + - + message: '#^Method Smart\\SonataBundle\\Provider\\ParameterProvider\:\:get\(\) should return Smart\\SonataBundle\\Entity\\ParameterInterface but returns mixed\.$#' + identifier: return.type + count: 1 + path: src/Provider/ParameterProvider.php + + - + message: '#^Method Smart\\SonataBundle\\Provider\\ParameterProvider\:\:getValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Provider/ParameterProvider.php + + - + message: '#^Method Smart\\SonataBundle\\Provider\\ParameterProvider\:\:getValue\(\) should return array\|bool\|float\|int\|string but returns bool\|float\|int\|string\|null\.$#' + identifier: return.type + count: 1 + path: src/Provider/ParameterProvider.php + + - + message: '#^Property Smart\\SonataBundle\\Provider\\ParameterProvider\:\:\$parameters type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Provider/ParameterProvider.php + + - + message: '#^Method Smart\\SonataBundle\\Repository\\Log\\BatchLogRepository\:\:getAllContexts\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Repository/Log/BatchLogRepository.php + + - + message: '#^Method Smart\\SonataBundle\\Repository\\Log\\BatchLogRepository\:\:getAllNames\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Repository/Log/BatchLogRepository.php + + - + message: '#^Method Smart\\SonataBundle\\Repository\\ParameterRepository\:\:findAllByCode\(\) should return array\ but returns mixed\.$#' + identifier: return.type + count: 1 + path: src/Repository/ParameterRepository.php + + - + message: '#^Class Smart\\SonataBundle\\Security\\Form\\Type\\ResetPasswordType extends generic class Symfony\\Component\\Form\\AbstractType but does not specify its types\: TData$#' + identifier: missingType.generics + count: 1 + path: src/Security/Form/Type/ResetPasswordType.php + + - + message: '#^Class Smart\\SonataBundle\\Security\\Form\\Type\\UserProfileType extends generic class Symfony\\Component\\Form\\AbstractType but does not specify its types\: TData$#' + identifier: missingType.generics + count: 1 + path: src/Security/Form/Type/UserProfileType.php + + - + message: '#^Method Smart\\SonataBundle\\Twig\\Extension\\FormatExtension\:\:isIso8601Datetime\(\) has parameter \$date with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Twig/Extension/FormatExtension.php + + - + message: '#^Binary operation "\." between '' \: '' and mixed results in an error\.$#' + identifier: binaryOp.invalid + count: 1 + path: src/Twig/Extension/HistoryExtension.php + + - + message: '#^Binary operation "\." between ''history\.'' and mixed results in an error\.$#' + identifier: binaryOp.invalid + count: 1 + path: src/Twig/Extension/HistoryExtension.php + + - + message: '#^Method Smart\\SonataBundle\\Twig\\Extension\\HistoryExtension\:\:getRowIconClass\(\) has parameter \$row with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Twig/Extension/HistoryExtension.php + + - + message: '#^Method Smart\\SonataBundle\\Twig\\Extension\\HistoryExtension\:\:getRowIconName\(\) has parameter \$row with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Twig/Extension/HistoryExtension.php + + - + message: '#^Method Smart\\SonataBundle\\Twig\\Extension\\HistoryExtension\:\:getRowIconPrefix\(\) has parameter \$row with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Twig/Extension/HistoryExtension.php + + - + message: '#^Method Smart\\SonataBundle\\Twig\\Extension\\HistoryExtension\:\:getRowTitle\(\) has parameter \$row with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/Twig/Extension/HistoryExtension.php + + - + message: '#^Method Smart\\SonataBundle\\Twig\\Extension\\HistoryExtension\:\:getRowTitle\(\) should return string\|null but returns mixed\.$#' + identifier: return.type + count: 2 + path: src/Twig/Extension/HistoryExtension.php + + - + message: '#^Method Smart\\SonataBundle\\Tests\\DependencyInjection\\DependencyInjectionTest\:\:configurationProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/DependencyInjection/DependencyInjectionTest.php + + - + message: '#^Method Smart\\SonataBundle\\Tests\\DependencyInjection\\DependencyInjectionTest\:\:invalidConfigurationProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/DependencyInjection/DependencyInjectionTest.php + + - + message: '#^Parameter \#1 \$extension of method Symfony\\Component\\DependencyInjection\\ContainerBuilder\:\:registerExtension\(\) expects Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface, Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface\|null given\.$#' + identifier: argument.type + count: 1 + path: tests/DependencyInjection/DependencyInjectionTest.php + + - + message: '#^Method Smart\\SonataBundle\\Tests\\Entity\\User\\User\:\:__unserialize\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/Entity/User/User.php + + - + message: '#^Method Smart\\SonataBundle\\Tests\\Entity\\User\\User\:\:getFirstName\(\) should return string but returns string\|null\.$#' + identifier: return.type + count: 1 + path: tests/Entity/User/User.php + + - + message: '#^Method Smart\\SonataBundle\\Tests\\Entity\\User\\User\:\:getFullNameAndEmail\(\) should return string but returns string\|null\.$#' + identifier: return.type + count: 1 + path: tests/Entity/User/User.php + + - + message: '#^Method Smart\\SonataBundle\\Tests\\Entity\\User\\User\:\:getLastName\(\) should return string but returns string\|null\.$#' + identifier: return.type + count: 1 + path: tests/Entity/User/User.php + + - + message: '#^Method Smart\\SonataBundle\\Tests\\Entity\\User\\User\:\:getPlainPassword\(\) should return string but returns string\|null\.$#' + identifier: return.type + count: 1 + path: tests/Entity/User/User.php + + - + message: '#^Method Smart\\SonataBundle\\Tests\\Entity\\User\\User\:\:getUserIdentifier\(\) should return non\-empty\-string but returns string\.$#' + identifier: return.type + count: 1 + path: tests/Entity/User/User.php + + - + message: '#^Method Smart\\SonataBundle\\Tests\\Entity\\User\\User\:\:getUsername\(\) should return string but returns string\|null\.$#' + identifier: return.type + count: 1 + path: tests/Entity/User/User.php + + - + message: '#^Property Smart\\SonataBundle\\Tests\\Entity\\User\\User\:\:\$email \(string\|null\) does not accept mixed\.$#' + identifier: assign.propertyType + count: 1 + path: tests/Entity/User/User.php + + - + message: '#^Property Smart\\SonataBundle\\Tests\\Entity\\User\\User\:\:\$id \(int\|null\) does not accept mixed\.$#' + identifier: assign.propertyType + count: 1 + path: tests/Entity/User/User.php + + - + message: '#^Property Smart\\SonataBundle\\Tests\\Entity\\User\\User\:\:\$password \(string\|null\) does not accept mixed\.$#' + identifier: assign.propertyType + count: 1 + path: tests/Entity/User/User.php + + - + message: '#^Call to function method_exists\(\) with ''Symfony\\\\Component\\\\Dotenv\\\\Dotenv'' and ''bootEnv'' will always evaluate to false\.$#' + identifier: function.impossibleType + count: 1 + path: tests/bootstrap.php + + - + message: '#^Call to method bootEnv\(\) on an unknown class Symfony\\Component\\Dotenv\\Dotenv\.$#' + identifier: class.notFound + count: 1 + path: tests/bootstrap.php + + - + message: '#^Class Symfony\\Component\\Dotenv\\Dotenv not found\.$#' + identifier: class.notFound + count: 1 + path: tests/bootstrap.php + + - + message: '#^Instantiated class Symfony\\Component\\Dotenv\\Dotenv not found\.$#' + identifier: class.notFound + count: 1 + path: tests/bootstrap.php \ No newline at end of file diff --git a/phpstan.neon b/phpstan.neon index 590f35e..0b8ba37 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,10 +1,13 @@ includes: - vendor/phpstan/phpstan-doctrine/extension.neon - vendor/phpstan/phpstan-doctrine/rules.neon + - vendor/phpstan/phpstan-phpunit/extension.neon + - vendor/phpstan/phpstan-phpunit/rules.neon - vendor/phpstan/phpstan-symfony/extension.neon - vendor/phpstan/phpstan-symfony/rules.neon - ./vendor/yamadashy/phpstan-friendly-formatter/extension.neon - vendor/spaze/phpstan-disallowed-calls/extension.neon + - phpstan-baseline.neon parameters: disallowedFunctionCalls: @@ -23,43 +26,45 @@ parameters: - function: 'shell_exec()' message: 'for security reasons.' + - + function: 'phpinfo()' + message: 'for security reasons.' - function: 'popen()' message: 'is risky. Ensure you are handling the process handle correctly.' + - + function: 'md5()' + message: 'md5 is cryptographically broken. Use hash() with a strong algorithm, or password_hash() for passwords.' + - + function: 'sha1()' + message: 'sha1 is cryptographically broken. Use hash() with a strong algorithm, or password_hash() for passwords.' + - + function: 'assert()' + message: 'assert() can evaluate a string as PHP code. Avoid it for security reasons.' + - + function: 'error_reporting()' + message: 'configure error reporting through the environment, not at runtime.' + - + function: 'ini_set()' + message: 'configure PHP through php.ini / the environment, not at runtime.' + doctrine: + allowNullablePropertyForRequiredField: true friendly: lineBefore: 0 # Number of lines to display before error line (default: 2) lineAfter: 0 # Number of lines to display after error line (default: 2) errorFormat: friendly - reportUnmatchedIgnoredErrors: false - treatPhpDocTypesAsCertain: false + reportUnmatchedIgnoredErrors: true symfony: containerXmlPath: var/cache/dev/Smart_SonataBundle_KernelDevDebugContainer.xml ignoreErrors: - # Ignore error by identifier - - identifier: doctrine.columnType - - identifier: doctrine.associationType - - identifier: missingType.generics - - identifier: missingType.iterableValue - # Règles Niveau 8 à dépiler - - identifier: argument.type #10 - - identifier: return.type #9 - - identifier: trait.unused #4 - - identifier: class.notFound #3 - - identifier: function.impossibleType #1 - # Règles Niveau 9 à dépiler - - identifier: offsetAccess.nonOffsetAccessible #28 - - identifier: foreach.nonIterable #4 - - identifier: offsetAccess.invalidOffset #2 - - identifier: assign.propertyType #1 - # Règles Niveau 10 à dépiler - - identifier: encapsedStringPart.nonString #4 - - identifier: postInc.type #4 - - identifier: binaryOp.invalid #2 - - identifier: cast.string #1 - + # method.nonObject ignoré dans tests/ : les fixtures initialisent des objets partiels + # dont certaines methodes peuvent retourner null avant d'etre completement renseignes. + #- + # identifier: method.nonObject + # path: tests/ + # https://github.com/symfony/symfony/issues/36202#issuecomment-769226149 bootstrapFiles: - vendor/bin/.phpunit/phpunit/vendor/autoload.php - # définit le répertoire temporaire où PHPStan stocke ses fichiers de cache et de travail pendant l'analyse. - # Par défaut: PHPStan utilise le répertoire temporaire système sys_get_temp_dir() . '/phpstan' + # Temporary directory where PHPStan stores its cache and working files during analysis. tmpDir: var/cache/phpstan diff --git a/psalm-taint-baseline.xml b/psalm-taint-baseline.xml new file mode 100644 index 0000000..c67b56a --- /dev/null +++ b/psalm-taint-baseline.xml @@ -0,0 +1,2 @@ + + diff --git a/psalm-taint-stubs.php b/psalm-taint-stubs.php new file mode 100644 index 0000000..0710599 --- /dev/null +++ b/psalm-taint-stubs.php @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + var/cache/dev/Smart_SonataBundle_KernelDevDebugContainer.xml + + + diff --git a/templates/standard_layout.html.twig b/templates/standard_layout.html.twig index ab8834d..c4af3c8 100644 --- a/templates/standard_layout.html.twig +++ b/templates/standard_layout.html.twig @@ -78,5 +78,5 @@ {{ parent() }} {# https://iconify.design/docs/iconify-icon/#registering-the-web-component #} - + {% endblock %}