diff --git a/.github/workflows/test-application.yaml b/.github/workflows/test-application.yaml index 373ce692..366e09ea 100644 --- a/.github/workflows/test-application.yaml +++ b/.github/workflows/test-application.yaml @@ -27,6 +27,13 @@ jobs: SYMFONY_DEPRECATIONS_HELPER: disabled - php-version: '7.4' + lint: true + dependency-versions: 'highest' + tools: 'composer:v2' + env: + SYMFONY_DEPRECATIONS_HELPER: disabled + + - php-version: '8.0' lint: true dependency-versions: 'highest' tools: 'composer:v2' diff --git a/.gitignore b/.gitignore index 5990b792..d2e292e4 100644 --- a/.gitignore +++ b/.gitignore @@ -32,5 +32,5 @@ Tests/Application/var Tests/Application/.env.test.local # php-cs-fixer -.php_cs.cache +.php-cs-fixer.cache php-cs-fixer diff --git a/.php_cs.dist b/.php-cs-fixer.dist.php similarity index 81% rename from .php_cs.dist rename to .php-cs-fixer.dist.php index 0bf9e0c5..cf37c524 100644 --- a/.php_cs.dist +++ b/.php-cs-fixer.dist.php @@ -10,10 +10,11 @@ EOF; $finder = PhpCsFixer\Finder::create() - ->exclude(['var/cache']) + ->exclude(['var/cache', 'tests/Resources/cache', 'node_modules']) ->in(__DIR__); -return PhpCsFixer\Config::create() +$config = new PhpCsFixer\Config(); +$config->setRiskyAllowed(true) ->setRules([ '@Symfony' => true, 'array_syntax' => ['syntax' => 'short'], @@ -26,3 +27,5 @@ 'phpdoc_types_order' => false, ]) ->setFinder($finder); + +return $config; diff --git a/Admin/CommentAdmin.php b/Admin/CommentAdmin.php index 2652981f..5f231471 100644 --- a/Admin/CommentAdmin.php +++ b/Admin/CommentAdmin.php @@ -27,15 +27,15 @@ */ class CommentAdmin extends Admin { - const COMMENT_SECURITY_CONTEXT = 'sulu.comment.comments'; - const COMMENT_LIST_VIEW = 'sulu_comment.comments.list'; - const COMMENT_EDIT_FORM_VIEW = 'sulu_comment.comments.edit_form'; - const COMMENT_EDIT_FORM_DETAILS_VIEW = 'sulu_comment.comments.edit_form.details'; - - const THREAD_SECURITY_CONTEXT = 'sulu.comment.threads'; - const THREAD_LIST_VIEW = 'sulu_comment.threads.list'; - const THREAD_EDIT_FORM_VIEW = 'sulu_comment.threads.edit_form'; - const THREAD_EDIT_FORM_DETAILS_VIEW = 'sulu_comment.threads.edit_form.details'; + public const COMMENT_SECURITY_CONTEXT = 'sulu.comment.comments'; + public const COMMENT_LIST_VIEW = 'sulu_comment.comments.list'; + public const COMMENT_EDIT_FORM_VIEW = 'sulu_comment.comments.edit_form'; + public const COMMENT_EDIT_FORM_DETAILS_VIEW = 'sulu_comment.comments.edit_form.details'; + + public const THREAD_SECURITY_CONTEXT = 'sulu.comment.threads'; + public const THREAD_LIST_VIEW = 'sulu_comment.threads.list'; + public const THREAD_EDIT_FORM_VIEW = 'sulu_comment.threads.edit_form'; + public const THREAD_EDIT_FORM_DETAILS_VIEW = 'sulu_comment.threads.edit_form.details'; /** * @var ViewBuilderFactoryInterface diff --git a/Controller/CommentController.php b/Controller/CommentController.php index 32c2fa36..88dea03f 100644 --- a/Controller/CommentController.php +++ b/Controller/CommentController.php @@ -113,15 +113,17 @@ public function cgetAction(Request $request): Response foreach ($request->query->all() as $filterKey => $filterValue) { if (isset($fieldDescriptors[$filterKey])) { - $listBuilder->where($fieldDescriptors[$filterKey], $filterValue); + $listBuilder->where($fieldDescriptors[$filterKey], (string)$filterValue); } } + /** @var string $route */ + $route = $request->attributes->get('_route'); $results = $listBuilder->execute(); $list = new ListRepresentation( $results, 'comments', - $request->attributes->get('_route'), + $route, $request->query->all(), $listBuilder->getCurrentPage(), $listBuilder->getLimit(), diff --git a/Controller/ThreadController.php b/Controller/ThreadController.php index 2fa4e5a6..74b9d7e2 100644 --- a/Controller/ThreadController.php +++ b/Controller/ThreadController.php @@ -98,20 +98,23 @@ public function cgetAction(Request $request): Response foreach ($request->query->all() as $filterKey => $filterValue) { if (isset($fieldDescriptors[$filterKey])) { - $listBuilder->where($fieldDescriptors[$filterKey], $filterValue); + $listBuilder->where($fieldDescriptors[$filterKey], (string)$filterValue); } } + /** @var string $typeParameter */ $typeParameter = $request->get('types'); if ($typeParameter) { $listBuilder->in($fieldDescriptors['type'], array_filter(explode(',', $typeParameter))); } $items = $listBuilder->execute(); + /** @var string $route */ + $route = $request->attributes->get('_route'); $list = new ListRepresentation( $items, 'threads', - $request->attributes->get('_route'), + $route, $request->query->all(), $listBuilder->getCurrentPage(), $listBuilder->getLimit(), diff --git a/Controller/WebsiteCommentController.php b/Controller/WebsiteCommentController.php index a199cbae..8d970a09 100644 --- a/Controller/WebsiteCommentController.php +++ b/Controller/WebsiteCommentController.php @@ -118,8 +118,8 @@ public function cgetCommentsAction(string $threadId, Request $request): Response { list($type, $entityId) = $this->getThreadIdParts($threadId); - $limit = $request->query->getInt('limit') ?? 10; - $offset = $request->query->getInt('offset') ?? 0; + $limit = $request->query->getInt('limit', 10); + $offset = $request->query->getInt('offset', 0) ; $pageSize = $request->get('pageSize'); if ($pageSize) { diff --git a/Entity/CommentInterface.php b/Entity/CommentInterface.php index fd989de2..6ac11543 100644 --- a/Entity/CommentInterface.php +++ b/Entity/CommentInterface.php @@ -15,9 +15,9 @@ interface CommentInterface { - const STATE_UNPUBLISHED = 0; + public const STATE_UNPUBLISHED = 0; - const STATE_PUBLISHED = 1; + public const STATE_PUBLISHED = 1; public function getId(): int; diff --git a/Events/Events.php b/Events/Events.php index 1243dfe1..a1c922e4 100644 --- a/Events/Events.php +++ b/Events/Events.php @@ -13,25 +13,25 @@ final class Events { - const PRE_PERSIST_EVENT = 'sulu_comment.pre_persist'; + public const PRE_PERSIST_EVENT = 'sulu_comment.pre_persist'; - const POST_PERSIST_EVENT = 'sulu_comment.post_persist'; + public const POST_PERSIST_EVENT = 'sulu_comment.post_persist'; - const PRE_DELETE_EVENT = 'sulu_comment.pre_delete'; + public const PRE_DELETE_EVENT = 'sulu_comment.pre_delete'; - const POST_DELETE_EVENT = 'sulu_comment.post_delete'; + public const POST_DELETE_EVENT = 'sulu_comment.post_delete'; - const PRE_UPDATE_EVENT = 'sulu_comment.pre_update'; + public const PRE_UPDATE_EVENT = 'sulu_comment.pre_update'; - const PUBLISH_EVENT = 'sulu_comment.publish'; + public const PUBLISH_EVENT = 'sulu_comment.publish'; - const UNPUBLISH_EVENT = 'sulu_comment.unpublish'; + public const UNPUBLISH_EVENT = 'sulu_comment.unpublish'; - const THREAD_PRE_UPDATE_EVENT = 'sulu_comment.thread.pre_update'; + public const THREAD_PRE_UPDATE_EVENT = 'sulu_comment.thread.pre_update'; - const THREAD_PRE_DELETE_EVENT = 'sulu_comment.thread.pre_delete'; + public const THREAD_PRE_DELETE_EVENT = 'sulu_comment.thread.pre_delete'; - const THREAD_POST_DELETE_EVENT = 'sulu_comment.thread.post_delete'; + public const THREAD_POST_DELETE_EVENT = 'sulu_comment.thread.post_delete'; /** * Private constructor. diff --git a/Tests/Application/.env b/Tests/Application/.env index 01152b1b..b51d3365 100644 --- a/Tests/Application/.env +++ b/Tests/Application/.env @@ -1,2 +1,2 @@ APP_ENV=test -DATABASE_URL=mysql://root@localhost:3306/su_comment_test +DATABASE_URL=mysql://root@127.0.0.1:3306/su_comment_test diff --git a/Tests/Application/bin/console.php b/Tests/Application/bin/console.php index 5c7b283d..2c6d2c3d 100644 --- a/Tests/Application/bin/console.php +++ b/Tests/Application/bin/console.php @@ -13,7 +13,7 @@ // if you don't want to setup permissions the proper way, just uncomment the following PHP line // read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information -//umask(0000); +// umask(0000); set_time_limit(0); diff --git a/Tests/Application/config/config_admin.yml b/Tests/Application/config/config_admin.yml index c77da5a5..49b8adfe 100644 --- a/Tests/Application/config/config_admin.yml +++ b/Tests/Application/config/config_admin.yml @@ -3,7 +3,7 @@ parameters: database.url: '%env(resolve:DATABASE_URL)%' framework: - router: { resource: "%kernel.root_dir%/config/routing_admin.yml" } + router: { resource: "%kernel.project_dir%/config/routing_admin.yml" } doctrine: orm: diff --git a/Tests/Application/config/config_website.yml b/Tests/Application/config/config_website.yml index 81a150d6..d6b7d7b7 100644 --- a/Tests/Application/config/config_website.yml +++ b/Tests/Application/config/config_website.yml @@ -3,7 +3,7 @@ parameters: database.url: '%env(resolve:DATABASE_URL)%' framework: - router: { resource: "%kernel.root_dir%/config/routing_website.yml" } + router: { resource: "%kernel.project_dir%/config/routing_website.yml" } security: access_decision_manager: diff --git a/composer.json b/composer.json index 5cba07bc..016cd55c 100644 --- a/composer.json +++ b/composer.json @@ -4,36 +4,36 @@ "type": "sulu-bundle", "license": "MIT", "require": { - "php": "^7.2", + "php": "^7.2 || ^8.0", "friendsofsymfony/rest-bundle": "^2.6 || ^3.0", - "sulu/sulu": "^2.0.4", - "symfony/config": "^4.3 || ^5.0", - "symfony/dependency-injection": "^4.3 || ^5.0", - "symfony/framework-bundle": "^4.3 || ^5.0", - "symfony/http-foundation": "^4.3 || ^5.0", - "symfony/http-kernel": "^4.3 || ^5.0" + "sulu/sulu": "^2.0.4 || ^2.5.10@dev", + "symfony/config": "^4.3 || ^5.0 || ^6.0", + "symfony/dependency-injection": "^4.3 || ^5.0 || ^6.0", + "symfony/framework-bundle": "^4.3 || ^5.0 || ^6.0", + "symfony/http-foundation": "^4.3 || ^5.0 || ^6.0", + "symfony/http-kernel": "^4.3 || ^5.0 || ^6.0" }, "require-dev": { "doctrine/doctrine-bundle": "^1.10 || ^2.0", - "friendsofphp/php-cs-fixer": "^2.17", + "friendsofphp/php-cs-fixer": "^2.17 || ^3.0", "handcraftedinthealps/zendsearch": "^2.0", "jackalope/jackalope-doctrine-dbal": "^1.3.4", - "jangregor/phpstan-prophecy": "^0.5.1", + "jangregor/phpstan-prophecy": "^1.0", "massive/search-bundle": "^2.0.0", - "php-ffmpeg/php-ffmpeg": "^0.13 || ^0.14", + "php-ffmpeg/php-ffmpeg": "^0.14 || ^1.0", "phpspec/prophecy": "^1.17", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-doctrine": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-symfony": "^0.12", + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-doctrine": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-symfony": "^1.0", "phpunit/phpunit": "^8.0", - "symfony/browser-kit": "^4.3", - "symfony/dotenv": "^4.3", - "symfony/form": "^4.3", + "symfony/browser-kit": "^4.3 || ^5.0 || ^6.0", + "symfony/dotenv": "^4.3 || ^5.0 || ^6.0", + "symfony/form": "^4.3 || ^5.0 || ^6.0", "symfony/monolog-bundle": "^3.1", - "symfony/security-bundle": "^4.3", - "symfony/stopwatch": "^4.3", - "thecodingmachine/phpstan-strict-rules": "^0.12.2" + "symfony/security-bundle": "^4.3 || ^5.0 || ^6.0", + "symfony/stopwatch": "^4.3 || ^5.0 || ^6.0", + "thecodingmachine/phpstan-strict-rules": "^1.0" }, "keywords": [], "authors": [ diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 82f948bf..bab48829 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -6,22 +6,22 @@ parameters: path: Admin/CommentAdmin.php - - message: "#^Parameter \\#1 \\$message of method Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\CommentInterface\\:\\:setMessage\\(\\) expects string, bool\\|float\\|int\\|string\\|null given\\.$#" + message: "#^Cannot cast array\\|bool\\|float\\|int\\|string to string\\.$#" count: 1 path: Controller/CommentController.php - - message: "#^Parameter \\#2 \\$value of method Sulu\\\\Component\\\\Rest\\\\ListBuilder\\\\ListBuilderInterface\\:\\:where\\(\\) expects string, array\\\\|bool\\|float\\|int\\|string given\\.$#" + message: "#^Parameter \\#1 \\$message of method Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\CommentInterface\\:\\:setMessage\\(\\) expects string, bool\\|float\\|int\\|string\\|null given\\.$#" count: 1 path: Controller/CommentController.php - - message: "#^Parameter \\#1 \\$title of method Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\ThreadInterface\\:\\:setTitle\\(\\) expects string, bool\\|float\\|int\\|string\\|null given\\.$#" + message: "#^Cannot cast array\\|bool\\|float\\|int\\|string to string\\.$#" count: 1 path: Controller/ThreadController.php - - message: "#^Parameter \\#2 \\$value of method Sulu\\\\Component\\\\Rest\\\\ListBuilder\\\\ListBuilderInterface\\:\\:where\\(\\) expects string, array\\\\|bool\\|float\\|int\\|string given\\.$#" + message: "#^Parameter \\#1 \\$title of method Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\ThreadInterface\\:\\:setTitle\\(\\) expects string, bool\\|float\\|int\\|string\\|null given\\.$#" count: 1 path: Controller/ThreadController.php @@ -41,7 +41,7 @@ parameters: path: Controller/WebsiteCommentController.php - - message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\Controller\\\\WebsiteCommentController\\:\\:view\\(\\) has parameter \\$data with no typehint specified\\.$#" + message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\Controller\\\\WebsiteCommentController\\:\\:view\\(\\) has parameter \\$data with no type specified\\.$#" count: 1 path: Controller/WebsiteCommentController.php @@ -51,7 +51,12 @@ parameters: path: Controller/WebsiteCommentController.php - - message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\Controller\\\\WebsiteCommentController\\:\\:view\\(\\) has parameter \\$statusCode with no typehint specified\\.$#" + message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\Controller\\\\WebsiteCommentController\\:\\:view\\(\\) has parameter \\$statusCode with no type specified\\.$#" + count: 1 + path: Controller/WebsiteCommentController.php + + - + message: "#^Parameter \\#1 \\$id of method Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\CommentRepositoryInterface\\:\\:findCommentById\\(\\) expects int, mixed given\\.$#" count: 1 path: Controller/WebsiteCommentController.php @@ -60,6 +65,21 @@ parameters: count: 1 path: Controller/WebsiteCommentController.php + - + message: "#^Parameter \\#3 \\$comment of method Sulu\\\\Bundle\\\\CommentBundle\\\\Manager\\\\CommentManagerInterface\\:\\:addComment\\(\\) expects Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\CommentInterface, mixed given\\.$#" + count: 1 + path: Controller/WebsiteCommentController.php + + - + message: "#^Parameter \\#3 \\$limit of method Sulu\\\\Bundle\\\\CommentBundle\\\\Manager\\\\CommentManagerInterface\\:\\:findPublishedComments\\(\\) expects int, mixed given\\.$#" + count: 1 + path: Controller/WebsiteCommentController.php + + - + message: "#^Parameter \\#4 \\$threadTitle of method Sulu\\\\Bundle\\\\CommentBundle\\\\Manager\\\\CommentManagerInterface\\:\\:addComment\\(\\) expects string\\|null, mixed given\\.$#" + count: 1 + path: Controller/WebsiteCommentController.php + - message: "#^Property Sulu\\\\Bundle\\\\CommentBundle\\\\Controller\\\\WebsiteCommentController\\:\\:\\$commentDefaultTemplates type has no value type specified in iterable type array\\.$#" count: 1 @@ -76,12 +96,12 @@ parameters: path: Controller/WebsiteCommentController.php - - message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\DependencyInjection\\\\SuluCommentExtension\\:\\:load\\(\\) has no return typehint specified\\.$#" + message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\DependencyInjection\\\\SuluCommentExtension\\:\\:load\\(\\) has no return type specified\\.$#" count: 1 path: DependencyInjection/SuluCommentExtension.php - - message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\DependencyInjection\\\\SuluCommentExtension\\:\\:prepend\\(\\) has no return typehint specified\\.$#" + message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\DependencyInjection\\\\SuluCommentExtension\\:\\:prepend\\(\\) has no return type specified\\.$#" count: 1 path: DependencyInjection/SuluCommentExtension.php @@ -95,6 +115,11 @@ parameters: count: 1 path: Entity/Comment.php + - + message: "#^Parameter \\#1 \\$p of method Doctrine\\\\Common\\\\Collections\\\\Collection\\<\\(int\\|string\\),mixed\\>\\:\\:filter\\(\\) expects Closure\\(mixed\\)\\: bool, Closure\\(Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\CommentInterface\\)\\: bool given\\.$#" + count: 1 + path: Entity/Comment.php + - message: "#^Property Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\Comment\\:\\:\\$children type mapping mismatch\\: property can contain Doctrine\\\\Common\\\\Collections\\\\Collection&iterable\\ but database expects Doctrine\\\\Common\\\\Collections\\\\Collection&iterable\\\\.$#" count: 1 @@ -105,6 +130,11 @@ parameters: count: 1 path: Entity/Comment.php + - + message: "#^Property Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\Comment\\:\\:\\$message \\(string\\) on left side of \\?\\? is not nullable\\.$#" + count: 1 + path: Entity/Comment.php + - message: "#^Property Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\Comment\\:\\:\\$parent type mapping mismatch\\: property can contain Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\CommentInterface\\|null but database expects Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\Comment\\|null\\.$#" count: 1 @@ -125,6 +155,31 @@ parameters: count: 1 path: Entity/CommentInterface.php + - + message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\CommentRepository\\:\\:countPublishedComments\\(\\) should return int but returns bool\\|float\\|int\\|string\\|null\\.$#" + count: 1 + path: Entity/CommentRepository.php + + - + message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\CommentRepository\\:\\:findCommentById\\(\\) should return Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\CommentInterface\\|null but returns mixed\\.$#" + count: 1 + path: Entity/CommentRepository.php + + - + message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\CommentRepository\\:\\:findComments\\(\\) should return array\\ but returns mixed\\.$#" + count: 1 + path: Entity/CommentRepository.php + + - + message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\CommentRepository\\:\\:findCommentsByIds\\(\\) should return array\\ but returns mixed\\.$#" + count: 1 + path: Entity/CommentRepository.php + + - + message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\CommentRepository\\:\\:findPublishedComments\\(\\) should return array\\ but returns mixed\\.$#" + count: 1 + path: Entity/CommentRepository.php + - message: "#^Interface Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\CommentRepositoryInterface extends generic interface Sulu\\\\Component\\\\Persistence\\\\Repository\\\\RepositoryInterface but does not specify its types\\: T$#" count: 1 @@ -190,6 +245,11 @@ parameters: count: 1 path: Entity/ThreadRepository.php + - + message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\ThreadRepository\\:\\:findThreadsByIds\\(\\) should return array\\ but returns mixed\\.$#" + count: 1 + path: Entity/ThreadRepository.php + - message: "#^Call to an undefined method Sulu\\\\Component\\\\Security\\\\Authentication\\\\UserInterface\\:\\:getContact\\(\\)\\.$#" count: 1 @@ -201,27 +261,22 @@ parameters: path: EventSubscriber/CommentSerializationSubscriber.php - - message: "#^Method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) invoked with 2 parameters, 1 required\\.$#" + message: "#^Parameter \\#2 \\$haystack of function in_array expects array, mixed given\\.$#" count: 1 - path: Events/CommentEventCollector.php + path: EventSubscriber/CommentSerializationSubscriber.php - - message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\Form\\\\Type\\\\CommentType\\:\\:buildForm\\(\\) has no return typehint specified\\.$#" + message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\Form\\\\Type\\\\CommentType\\:\\:buildForm\\(\\) has no return type specified\\.$#" count: 1 path: Form/Type/CommentType.php - - message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\Form\\\\Type\\\\CommentType\\:\\:configureOptions\\(\\) has no return typehint specified\\.$#" + message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\Form\\\\Type\\\\CommentType\\:\\:configureOptions\\(\\) has no return type specified\\.$#" count: 1 path: Form/Type/CommentType.php - - message: "#^Method Symfony\\\\Contracts\\\\EventDispatcher\\\\EventDispatcherInterface\\:\\:dispatch\\(\\) invoked with 2 parameters, 1 required\\.$#" - count: 5 - path: Manager/CommentManager.php - - - - message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\SuluCommentBundle\\:\\:build\\(\\) has no return typehint specified\\.$#" + message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\SuluCommentBundle\\:\\:build\\(\\) has no return type specified\\.$#" count: 1 path: SuluCommentBundle.php diff --git a/phpstan.neon b/phpstan.neon index 645bf047..2681190e 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,5 @@ includes: - - vendor/jangregor/phpstan-prophecy/src/extension.neon + - vendor/jangregor/phpstan-prophecy/extension.neon - vendor/phpstan/phpstan-doctrine/extension.neon - vendor/phpstan/phpstan-doctrine/rules.neon - vendor/phpstan/phpstan-symfony/extension.neon @@ -12,7 +12,7 @@ parameters: paths: - . level: max - excludes_analyse: + excludePaths: - %currentWorkingDirectory%/DependencyInjection/Configuration.php - %currentWorkingDirectory%/Tests/* - %currentWorkingDirectory%/vendor/*