From bbdedb75aac74f60165c4fa08c739ba8113a05b4 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 14:21:25 +0200 Subject: [PATCH 01/37] Move files --- composer.json | 40 +++++++++---------- {Tests => tests}/Application/.env | 0 {Tests => tests}/Application/Kernel.php | 0 {Tests => tests}/Application/bin/adminconsole | 0 {Tests => tests}/Application/bin/console.php | 0 .../Application/bin/websiteconsole | 0 .../Application/config/bootstrap.php | 0 .../Application/config/config.yml | 0 .../Application/config/routing.yml | 0 .../config/templates/articles/article.xml | 0 .../config/templates/pages/default.xml | 0 .../config/templates/pages/overview.xml | 0 .../Application/config/webspaces/sulu.io.xml | 0 {Tests => tests}/Functional/.gitignore | 0 {Tests => tests}/Unit/.gitignore | 0 .../phpstan/console-application.php | 0 {Tests => tests}/phpstan/object-manager.php | 0 {Tests => tests}/test-bootstrap.php | 0 18 files changed, 20 insertions(+), 20 deletions(-) rename {Tests => tests}/Application/.env (100%) rename {Tests => tests}/Application/Kernel.php (100%) rename {Tests => tests}/Application/bin/adminconsole (100%) rename {Tests => tests}/Application/bin/console.php (100%) rename {Tests => tests}/Application/bin/websiteconsole (100%) rename {Tests => tests}/Application/config/bootstrap.php (100%) rename {Tests => tests}/Application/config/config.yml (100%) rename {Tests => tests}/Application/config/routing.yml (100%) rename {Tests => tests}/Application/config/templates/articles/article.xml (100%) rename {Tests => tests}/Application/config/templates/pages/default.xml (100%) rename {Tests => tests}/Application/config/templates/pages/overview.xml (100%) rename {Tests => tests}/Application/config/webspaces/sulu.io.xml (100%) rename {Tests => tests}/Functional/.gitignore (100%) rename {Tests => tests}/Unit/.gitignore (100%) rename {Tests => tests}/phpstan/console-application.php (100%) rename {Tests => tests}/phpstan/object-manager.php (100%) rename {Tests => tests}/test-bootstrap.php (100%) diff --git a/composer.json b/composer.json index 00c906276..3b6fd7c52 100644 --- a/composer.json +++ b/composer.json @@ -91,21 +91,21 @@ "exclude-from-classmap": [ "/src/", "/Resources/phpcr-migrations/", - "/Tests/" + "/tests/" ] }, "autoload-dev": { "psr-4": { - "Sulu\\Bundle\\ArticleBundle\\Tests\\": "Tests/" + "Sulu\\Bundle\\ArticleBundle\\Tests\\": "tests" } }, "scripts": { "bootstrap-test-environment": [ - "@php Tests/Application/bin/adminconsole doctrine:database:drop --if-exists --force --env test_experimental_storage", - "@php Tests/Application/bin/adminconsole doctrine:database:create --env test_experimental_storage", - "@php Tests/Application/bin/adminconsole doctrine:schema:update --force --env test_experimental_storage", - "@php Tests/Application/bin/adminconsole ongr:es:index:create --manager=default --if-not-exists --env test", - "@php Tests/Application/bin/adminconsole ongr:es:index:create --manager=live --if-not-exists --env test" + "@php tests/Application/bin/adminconsole doctrine:database:drop --if-exists --force --env test_experimental_storage", + "@php tests/Application/bin/adminconsole doctrine:database:create --env test_experimental_storage", + "@php tests/Application/bin/adminconsole doctrine:schema:update --force --env test_experimental_storage", + "@php tests/Application/bin/adminconsole ongr:es:index:create --manager=default --if-not-exists --env test", + "@php tests/Application/bin/adminconsole ongr:es:index:create --manager=live --if-not-exists --env test" ], "lint": [ "@phpstan", @@ -122,27 +122,27 @@ ], "phpunit": "@php vendor/bin/phpunit", "phpstan": [ - "@php Tests/Application/bin/adminconsole cache:warmup --env=dev", + "@php tests/Application/bin/adminconsole cache:warmup --env=dev", "@php vendor/bin/phpstan analyse" ], "php-cs": "@php vendor/bin/php-cs-fixer fix --verbose --diff --dry-run", "php-cs-fix": "@php vendor/bin/php-cs-fixer fix", "lint-composer": "@composer validate --strict", - "lint-twig": "@php Tests/Application/bin/adminconsole lint:twig Resources/doc", - "lint-yaml": "@php Tests/Application/bin/adminconsole lint:yaml Resources/config Tests/Application/config", + "lint-twig": "@php tests/Application/bin/adminconsole lint:twig Resources/doc", + "lint-yaml": "@php tests/Application/bin/adminconsole lint:yaml Resources/config tests/Application/config", "lint-container": [ - "@php Tests/Application/bin/adminconsole lint:container --env dev", - "@php Tests/Application/bin/websiteconsole lint:container --env dev", - "@php Tests/Application/bin/adminconsole lint:container --env test", - "@php Tests/Application/bin/websiteconsole lint:container --env test", - "@php Tests/Application/bin/adminconsole lint:container --env stage", - "@php Tests/Application/bin/websiteconsole lint:container --env stage", - "@php Tests/Application/bin/adminconsole lint:container --env prod", - "@php Tests/Application/bin/websiteconsole lint:container --env prod" + "@php tests/Application/bin/adminconsole lint:container --env dev", + "@php tests/Application/bin/websiteconsole lint:container --env dev", + "@php tests/Application/bin/adminconsole lint:container --env test", + "@php tests/Application/bin/websiteconsole lint:container --env test", + "@php tests/Application/bin/adminconsole lint:container --env stage", + "@php tests/Application/bin/websiteconsole lint:container --env stage", + "@php tests/Application/bin/adminconsole lint:container --env prod", + "@php tests/Application/bin/websiteconsole lint:container --env prod" ], "lint-doctrine": [ - "@php Tests/Application/bin/adminconsole doctrine:schema:validate --skip-sync", - "@php Tests/Application/bin/adminconsole doctrine:ensure-production-settings --env prod" + "@php tests/Application/bin/adminconsole doctrine:schema:validate --skip-sync", + "@php tests/Application/bin/adminconsole doctrine:ensure-production-settings --env prod" ] }, "config": { diff --git a/Tests/Application/.env b/tests/Application/.env similarity index 100% rename from Tests/Application/.env rename to tests/Application/.env diff --git a/Tests/Application/Kernel.php b/tests/Application/Kernel.php similarity index 100% rename from Tests/Application/Kernel.php rename to tests/Application/Kernel.php diff --git a/Tests/Application/bin/adminconsole b/tests/Application/bin/adminconsole similarity index 100% rename from Tests/Application/bin/adminconsole rename to tests/Application/bin/adminconsole diff --git a/Tests/Application/bin/console.php b/tests/Application/bin/console.php similarity index 100% rename from Tests/Application/bin/console.php rename to tests/Application/bin/console.php diff --git a/Tests/Application/bin/websiteconsole b/tests/Application/bin/websiteconsole similarity index 100% rename from Tests/Application/bin/websiteconsole rename to tests/Application/bin/websiteconsole diff --git a/Tests/Application/config/bootstrap.php b/tests/Application/config/bootstrap.php similarity index 100% rename from Tests/Application/config/bootstrap.php rename to tests/Application/config/bootstrap.php diff --git a/Tests/Application/config/config.yml b/tests/Application/config/config.yml similarity index 100% rename from Tests/Application/config/config.yml rename to tests/Application/config/config.yml diff --git a/Tests/Application/config/routing.yml b/tests/Application/config/routing.yml similarity index 100% rename from Tests/Application/config/routing.yml rename to tests/Application/config/routing.yml diff --git a/Tests/Application/config/templates/articles/article.xml b/tests/Application/config/templates/articles/article.xml similarity index 100% rename from Tests/Application/config/templates/articles/article.xml rename to tests/Application/config/templates/articles/article.xml diff --git a/Tests/Application/config/templates/pages/default.xml b/tests/Application/config/templates/pages/default.xml similarity index 100% rename from Tests/Application/config/templates/pages/default.xml rename to tests/Application/config/templates/pages/default.xml diff --git a/Tests/Application/config/templates/pages/overview.xml b/tests/Application/config/templates/pages/overview.xml similarity index 100% rename from Tests/Application/config/templates/pages/overview.xml rename to tests/Application/config/templates/pages/overview.xml diff --git a/Tests/Application/config/webspaces/sulu.io.xml b/tests/Application/config/webspaces/sulu.io.xml similarity index 100% rename from Tests/Application/config/webspaces/sulu.io.xml rename to tests/Application/config/webspaces/sulu.io.xml diff --git a/Tests/Functional/.gitignore b/tests/Functional/.gitignore similarity index 100% rename from Tests/Functional/.gitignore rename to tests/Functional/.gitignore diff --git a/Tests/Unit/.gitignore b/tests/Unit/.gitignore similarity index 100% rename from Tests/Unit/.gitignore rename to tests/Unit/.gitignore diff --git a/Tests/phpstan/console-application.php b/tests/phpstan/console-application.php similarity index 100% rename from Tests/phpstan/console-application.php rename to tests/phpstan/console-application.php diff --git a/Tests/phpstan/object-manager.php b/tests/phpstan/object-manager.php similarity index 100% rename from Tests/phpstan/object-manager.php rename to tests/phpstan/object-manager.php diff --git a/Tests/test-bootstrap.php b/tests/test-bootstrap.php similarity index 100% rename from Tests/test-bootstrap.php rename to tests/test-bootstrap.php From 81bd67c759b3df2590a8783cfc3b4d93341b91b4 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 12:09:41 +0200 Subject: [PATCH 02/37] Add article test template setup --- .../views/articles/article.html.twig | 7 +++ .../templates/views/base.html.twig | 11 ++++ .../config/templates/articles/article.xml | 55 ++++++++++++++++--- 3 files changed, 66 insertions(+), 7 deletions(-) create mode 100644 Tests/Application/templates/views/articles/article.html.twig create mode 100644 Tests/Application/templates/views/base.html.twig diff --git a/Tests/Application/templates/views/articles/article.html.twig b/Tests/Application/templates/views/articles/article.html.twig new file mode 100644 index 000000000..834b1fdcd --- /dev/null +++ b/Tests/Application/templates/views/articles/article.html.twig @@ -0,0 +1,7 @@ +{% extends 'views/base.html.twig' %} + +{% block content %} +

{{ content.title }}

+ + {{ content.article|raw }} +{% endblock %} diff --git a/Tests/Application/templates/views/base.html.twig b/Tests/Application/templates/views/base.html.twig new file mode 100644 index 000000000..6aa28c6a4 --- /dev/null +++ b/Tests/Application/templates/views/base.html.twig @@ -0,0 +1,11 @@ + + + + + + {{ content.title }} + + + {% block content %}{% endblock %} + + diff --git a/tests/Application/config/templates/articles/article.xml b/tests/Application/config/templates/articles/article.xml index 4a5e76252..665af27ce 100644 --- a/tests/Application/config/templates/articles/article.xml +++ b/tests/Application/config/templates/articles/article.xml @@ -5,15 +5,56 @@ article - ::article - SuluWebsiteBundle:Default:index - 2400 + templates/articles/article + Sulu\Bundle\ContentBundle\Content\UserInterface\Controller\Website\ContentController::indexAction + 604800 - + + Article + Artikel + - - - + + + Title + Titel + + + + + + + + + + + + + Resourcelocator + Adresse + + + + + + + + + Description + Beschreibung + + + + + + + + Image + Bild + + + + From 3f37979db9749186b3ff9d970f19258d1ce3cc46 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 12:34:12 +0200 Subject: [PATCH 03/37] Update CI script --- .github/workflows/test-application.yaml | 56 +--- SuluArticleBundle.php | 32 --- .../Integration/ArticleControllerTest.php | 269 ++++++++++++++++++ .../Integration/responses/article_cget.json | 14 + .../Integration/responses/article_get.json | 42 +++ .../responses/article_get_ghost_locale.json | 33 +++ .../Integration/responses/article_post.json | 42 +++ .../responses/article_post_publish.json | 42 +++ .../article_post_trigger_copy_locale.json | 44 +++ .../article_post_trigger_unpublish.json | 42 +++ .../Integration/responses/article_put.json | 47 +++ composer.json | 38 +-- phpunit.xml.dist | 13 +- tests/Application/.env | 2 +- tests/Application/Kernel.php | 14 +- 15 files changed, 600 insertions(+), 130 deletions(-) delete mode 100644 SuluArticleBundle.php create mode 100644 Tests/Functional/Integration/ArticleControllerTest.php create mode 100644 Tests/Functional/Integration/responses/article_cget.json create mode 100644 Tests/Functional/Integration/responses/article_get.json create mode 100644 Tests/Functional/Integration/responses/article_get_ghost_locale.json create mode 100644 Tests/Functional/Integration/responses/article_post.json create mode 100644 Tests/Functional/Integration/responses/article_post_publish.json create mode 100644 Tests/Functional/Integration/responses/article_post_trigger_copy_locale.json create mode 100644 Tests/Functional/Integration/responses/article_post_trigger_unpublish.json create mode 100644 Tests/Functional/Integration/responses/article_put.json diff --git a/.github/workflows/test-application.yaml b/.github/workflows/test-application.yaml index 9e2e6cfbf..1b974c411 100644 --- a/.github/workflows/test-application.yaml +++ b/.github/workflows/test-application.yaml @@ -9,12 +9,12 @@ on: jobs: test: - name: "PHP ${{ matrix.php-version }} (elasticsearch ${{ matrix.elasticsearch-version }}, ${{ matrix.phpcr-transport }}, ${{ matrix.dependency-versions }})" + name: 'PHP ${{ matrix.php-version }} (${{ matrix.dependency-versions }}, Coverage ${{ matrix.coverage }})' runs-on: ubuntu-latest env: - DATABASE_URL: mysql://root:root@127.0.0.1:3306/sulu_test?serverVersion=5.7 - PHPCR_TRANSPORT: ${{ matrix.phpcr-transport }} + APP_ENV: test + DATABASE_URL: mysql://root:root@127.0.0.1:3306/su_content_test?serverVersion=8.0.29&charset=utf8mb4&collation=utf8mb4_unicode_ci COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} strategy: @@ -22,93 +22,51 @@ jobs: matrix: include: - php-version: '8.0' - elasticsearch-version: '7.11.1' - elasticsearch-package-constraint: '~7.11.0' - phpcr-transport: jackrabbit dependency-versions: 'lowest' php-extensions: 'ctype, iconv, mysql, imagick' tools: 'composer:v2' env: SYMFONY_DEPRECATIONS_HELPER: weak - ELASTICSEARCH_HOST: '127.0.0.1:9200' - php-version: '8.1' - elasticsearch-version: '7.11.1' - elasticsearch-package-constraint: '~7.11.0' - phpcr-transport: doctrinedbal dependency-versions: 'highest' php-extensions: 'ctype, iconv, mysql, imagick' tools: 'composer:v2' env: SYMFONY_DEPRECATIONS_HELPER: weak - ELASTICSEARCH_HOST: '127.0.0.1:9200' - php-version: '8.2' - elasticsearch-version: '7.11.1' - elasticsearch-package-constraint: '~7.11.0' - phpcr-transport: jackrabbit dependency-versions: 'highest' php-extensions: 'ctype, iconv, mysql, imagick' tools: 'composer:v2' env: SYMFONY_DEPRECATIONS_HELPER: weak - ELASTICSEARCH_HOST: '127.0.0.1:9200' - php-version: '8.3' - elasticsearch-version: '7.17.2' - elasticsearch-package-constraint: '~7.17.0' - phpcr-transport: doctrinedbal dependency-versions: 'highest' php-extensions: 'ctype, iconv, mysql, imagick' tools: 'composer:v2' - phpstan: false env: SYMFONY_DEPRECATIONS_HELPER: weak - ELASTICSEARCH_HOST: '127.0.0.1:9200' - php-version: '8.4' composer-options: '--ignore-platform-reqs' - elasticsearch-version: '8.14.3' - elasticsearch-package-constraint: '~7.17.0' - phpcr-transport: doctrinedbal dependency-versions: 'highest' php-extensions: 'ctype, iconv, mysql, imagick' tools: 'composer:v2' - phpstan: false env: SYMFONY_DEPRECATIONS_HELPER: weak ELASTICSEARCH_HOST: '127.0.0.1:9200' services: mysql: - image: mysql:5.7 + image: mysql:8.0 env: MYSQL_ROOT_PASSWORD: root ports: - 3306:3306 options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5 - jackrabbit: - image: sulu/jackrabbit:2.20-tomcat-filesystem - env: - DATABASE_HOST: mysql - DATABASE_PORT: 3306 - DATABASE_NAME: sulu_test_jackrabbit - DATABASE_USER: root - DATABASE_PASS: root - LOG_LEVEL: WARN - ports: - - 8080:8080 - - elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:${{ matrix.elasticsearch-version }} - ports: - - 9200:9200 - env: - discovery.type: 'single-node' - xpack.security.enabled: 'false' - options: --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=5 - steps: - name: Checkout project uses: actions/checkout@v4 @@ -126,9 +84,6 @@ jobs: # testing lowest versions. run: composer remove "*php-cs-fixer*" "*phpstan*" "*rector*" --dev --no-update - - name: Require elasticsearch dependency - run: composer require --dev elasticsearch/elasticsearch:"${{ matrix.elasticsearch-package-constraint }}" --no-interaction --no-update - - name: Install composer dependencies uses: ramsey/composer-install@v2 with: @@ -162,9 +117,6 @@ jobs: tools: 'composer:v2' coverage: none - - name: Require elasticsearch dependency - run: composer require --dev elasticsearch/elasticsearch:"~7.11.0" --no-interaction --no-update - - name: Install composer dependencies uses: ramsey/composer-install@v2 with: diff --git a/SuluArticleBundle.php b/SuluArticleBundle.php deleted file mode 100644 index bfab05171..000000000 --- a/SuluArticleBundle.php +++ /dev/null @@ -1,32 +0,0 @@ -addCompilerPass(new RouteEnhancerCompilerPass()); - $container->addCompilerPass(new ConverterCompilerPass()); - $container->addCompilerPass(new StructureValidatorCompilerPass(), PassConfig::TYPE_AFTER_REMOVING); - } -} diff --git a/Tests/Functional/Integration/ArticleControllerTest.php b/Tests/Functional/Integration/ArticleControllerTest.php new file mode 100644 index 000000000..bf9e6ec56 --- /dev/null +++ b/Tests/Functional/Integration/ArticleControllerTest.php @@ -0,0 +1,269 @@ +client = $this->createAuthenticatedClient( + [], + ['CONTENT_TYPE' => 'application/json', 'HTTP_ACCEPT' => 'application/json'] + ); + } + + public function testPostPublish(): int + { + self::purgeDatabase(); + self::initPhpcr(); + + $this->client->request('POST', '/admin/api/articles?locale=en&action=publish', [], [], [], \json_encode([ + 'template' => 'article', + 'title' => 'Test Article', + 'url' => '/my-article', + 'published' => '2020-05-08T00:00:00+00:00', // Should be ignored + 'images' => null, + 'seoTitle' => 'Seo Title', + 'seoDescription' => 'Seo Description', + 'seoCanonicalUrl' => 'https://sulu.io/', + 'seoKeywords' => 'Seo Keyword 1, Seo Keyword 2', + 'seoNoIndex' => true, + 'seoNoFollow' => true, + 'seoHideInSitemap' => true, + 'excerptTitle' => 'Excerpt Title', + 'excerptDescription' => 'Excerpt Description', + 'excerptMore' => 'Excerpt More', + 'excerptTags' => ['Tag 1', 'Tag 2'], + 'excerptCategories' => [], + 'excerptIcon' => null, + 'excerptMedia' => null, + 'author' => null, + 'authored' => '2020-05-08T00:00:00+00:00', + 'mainWebspace' => 'sulu-io', + ]) ?: null); + + $response = $this->client->getResponse(); + $content = \json_decode((string) $response->getContent(), true); + /** @var int $id */ + $id = $content['id'] ?? null; // @phpstan-ignore-line + + $this->assertResponseSnapshot('article_post_publish.json', $response, 201); + $this->assertNotSame('2020-05-08T00:00:00+00:00', $content['published']); // @phpstan-ignore-line + + self::ensureKernelShutdown(); + + $websiteClient = $this->createWebsiteClient(); + $websiteClient->request('GET', '/en/my-article'); + + $response = $websiteClient->getResponse(); + $this->assertHttpStatusCode(200, $response); + $content = $response->getContent(); + $this->assertIsString($content); + $this->assertStringContainsString('EXAMPLE 2 TEMPLATE', $content); + + return $id; + } + + /** + * @depends testPostPublish + */ + public function testPostTriggerUnpublish(int $id): void + { + $this->client->request('POST', '/admin/api/articles/' . $id . '?locale=en&action=unpublish'); + + $response = $this->client->getResponse(); + + $this->assertResponseSnapshot('article_post_trigger_unpublish.json', $response, 200); + + self::ensureKernelShutdown(); + + $websiteClient = $this->createWebsiteClient(); + $websiteClient->request('GET', '/en/my-article'); + + $response = $websiteClient->getResponse(); + $this->assertHttpStatusCode(404, $response); + } + + public function testPost(): int + { + self::purgeDatabase(); + + $this->client->request('POST', '/admin/api/articles?locale=en', [], [], [], \json_encode([ + 'template' => 'article', + 'title' => 'Test Article', + 'url' => '/my-article', + 'images' => null, + 'seoTitle' => 'Seo Title', + 'seoDescription' => 'Seo Description', + 'seoCanonicalUrl' => 'https://sulu.io/', + 'seoKeywords' => 'Seo Keyword 1, Seo Keyword 2', + 'seoNoIndex' => true, + 'seoNoFollow' => true, + 'seoHideInSitemap' => true, + 'excerptTitle' => 'Excerpt Title', + 'excerptDescription' => 'Excerpt Description', + 'excerptMore' => 'Excerpt More', + 'excerptTags' => ['Tag 1', 'Tag 2'], + 'excerptCategories' => [], + 'excerptIcon' => null, + 'excerptMedia' => null, + 'mainWebspace' => 'sulu-io', + 'authored' => '2020-05-08T00:00:00+00:00', + ]) ?: null); + + $response = $this->client->getResponse(); + + $this->assertResponseSnapshot('article_post.json', $response, 201); + + $routeRepository = $this->getContainer()->get('sulu.repository.route'); + $this->assertCount(0, $routeRepository->findAll()); + + /** @var int $id */ + $id = \json_decode((string) $response->getContent(), true)['id'] ?? null; // @phpstan-ignore-line + + return $id; + } + + /** + * @depends testPost + */ + public function testGet(int $id): void + { + $this->client->request('GET', '/admin/api/articles/' . $id . '?locale=en'); + $response = $this->client->getResponse(); + $this->assertResponseSnapshot('article_get.json', $response, 200); + + self::ensureKernelShutdown(); + + $websiteClient = $this->createWebsiteClient(); + $websiteClient->request('GET', '/en/my-article'); + + $response = $websiteClient->getResponse(); + $this->assertHttpStatusCode(404, $response); + } + + /** + * @depends testPost + */ + public function testGetGhostLocale(int $id): void + { + $this->client->request('GET', '/admin/api/articles/' . $id . '?locale=de'); + $response = $this->client->getResponse(); + $this->assertResponseSnapshot('article_get_ghost_locale.json', $response, 200); + + self::ensureKernelShutdown(); + + $websiteClient = $this->createWebsiteClient(); + $websiteClient->request('GET', '/de/my-article'); + + $response = $websiteClient->getResponse(); + $this->assertHttpStatusCode(404, $response); + } + + /** + * @depends testPost + */ + public function testPostTriggerCopyLocale(int $id): void + { + $this->client->request('POST', '/admin/api/articles/' . $id . '?locale=de&action=copy-locale&src=en&dest=de'); + + $response = $this->client->getResponse(); + + $this->assertResponseSnapshot('article_post_trigger_copy_locale.json', $response, 200); + } + + /** + * @depends testPost + * @depends testGet + */ + public function testPut(int $id): void + { + $this->client->request('PUT', '/admin/api/articles/' . $id . '?locale=en', [], [], [], \json_encode([ + 'template' => 'article', + 'title' => 'Test Article 2', + 'url' => '/my-article-2', + 'article' => '

Test Article 2

', + 'seoTitle' => 'Seo Title 2', + 'seoDescription' => 'Seo Description 2', + 'seoCanonicalUrl' => 'https://sulu.io/2', + 'seoKeywords' => 'Seo Keyword 3, Seo Keyword 4', + 'seoNoIndex' => false, + 'seoNoFollow' => false, + 'seoHideInSitemap' => false, + 'excerptTitle' => 'Excerpt Title 2', + 'excerptDescription' => 'Excerpt Description 2', + 'excerptMore' => 'Excerpt More 2', + 'excerptTags' => ['Tag 3', 'Tag 4'], + 'excerptCategories' => [], + 'excerptIcon' => null, + 'excerptMedia' => null, + 'authored' => '2020-06-09T00:00:00+00:00', + 'mainWebspace' => 'sulu-io2', + ]) ?: null); + + $response = $this->client->getResponse(); + + $routeRepository = $this->getContainer()->get('sulu.repository.route'); + $this->assertCount(0, $routeRepository->findAll()); + + $this->assertResponseSnapshot('article_put.json', $response, 200); + } + + /** + * @depends testPost + * @depends testPut + */ + public function testGetList(): void + { + $this->client->request('GET', '/admin/api/articles?locale=en'); + $response = $this->client->getResponse(); + + $this->assertResponseSnapshot('article_cget.json', $response, 200); + } + + /** + * @depends testPost + * @depends testGetList + */ + public function testDelete(int $id): void + { + $this->client->request('DELETE', '/admin/api/articles/' . $id . '?locale=en'); + $response = $this->client->getResponse(); + $this->assertHttpStatusCode(204, $response); + + $routeRepository = $this->getContainer()->get('sulu.repository.route'); + $this->assertCount(0, $routeRepository->findAll()); + } + + protected function getSnapshotFolder(): string + { + return 'responses'; + } +} diff --git a/Tests/Functional/Integration/responses/article_cget.json b/Tests/Functional/Integration/responses/article_cget.json new file mode 100644 index 000000000..8563c9175 --- /dev/null +++ b/Tests/Functional/Integration/responses/article_cget.json @@ -0,0 +1,14 @@ +{ + "_embedded": { + "examples": [ + { + "id": "@integer@", + "title": "Test Example 2" + } + ] + }, + "limit": 10, + "total": 1, + "page": 1, + "pages": 1 +} diff --git a/Tests/Functional/Integration/responses/article_get.json b/Tests/Functional/Integration/responses/article_get.json new file mode 100644 index 000000000..00aa7a073 --- /dev/null +++ b/Tests/Functional/Integration/responses/article_get.json @@ -0,0 +1,42 @@ +{ + "author": null, + "authored": "2020-05-08T00:00:00+00:00", + "availableLocales": [ + "en" + ], + "contentLocales": [ + "en" + ], + "excerptCategories": [], + "excerptDescription": "Excerpt Description", + "excerptIcon": null, + "excerptImage": null, + "excerptMore": "Excerpt More", + "excerptTags": [ + "Tag 1", + "Tag 2" + ], + "excerptTitle": "Excerpt Title", + "ghostLocale": "en", + "id": "@integer@", + "images": null, + "mainWebspace": "sulu-io", + "locale": "en", + "published": null, + "publishedState": false, + "seoCanonicalUrl": "https://sulu.io/", + "seoDescription": "Seo Description", + "seoHideInSitemap": true, + "seoKeywords": "Seo Keyword 1, Seo Keyword 2", + "seoNoFollow": true, + "seoNoIndex": true, + "seoTitle": "Seo Title", + "shadowLocale": null, + "shadowLocales": [], + "shadowOn": false, + "stage": "draft", + "template": "example-2", + "title": "Test Example", + "url": "/my-example", + "workflowPlace": "unpublished" +} diff --git a/Tests/Functional/Integration/responses/article_get_ghost_locale.json b/Tests/Functional/Integration/responses/article_get_ghost_locale.json new file mode 100644 index 000000000..99727b2a1 --- /dev/null +++ b/Tests/Functional/Integration/responses/article_get_ghost_locale.json @@ -0,0 +1,33 @@ +{ + "author": null, + "authored": null, + "availableLocales": ["en"], + "contentLocales": ["en"], + "excerptCategories": [], + "excerptDescription": null, + "excerptIcon": null, + "excerptImage": null, + "excerptMore": null, + "excerptTags": [], + "excerptTitle":null, + "ghostLocale": "en", + "id": "@integer@", + "locale": null, + "mainWebspace": null, + "published": null, + "publishedState": false, + "seoCanonicalUrl": null, + "seoDescription": null, + "seoHideInSitemap": false, + "seoKeywords": null, + "seoNoFollow": false, + "seoNoIndex": false, + "seoTitle": null, + "shadowLocale": null, + "shadowLocales": [], + "shadowOn": false, + "stage": "draft", + "template": null, + "title": null, + "workflowPlace": null +} diff --git a/Tests/Functional/Integration/responses/article_post.json b/Tests/Functional/Integration/responses/article_post.json new file mode 100644 index 000000000..30d31e1be --- /dev/null +++ b/Tests/Functional/Integration/responses/article_post.json @@ -0,0 +1,42 @@ +{ + "author": null, + "authored": "2020-05-08T00:00:00+00:00", + "availableLocales": [ + "en" + ], + "contentLocales": [ + "en" + ], + "excerptCategories": [], + "excerptDescription": "Excerpt Description", + "excerptIcon": null, + "excerptImage": null, + "excerptMore": "Excerpt More", + "excerptTags": [ + "Tag 1", + "Tag 2" + ], + "excerptTitle": "Excerpt Title", + "ghostLocale": "en", + "id": "@integer@", + "images": null, + "locale": "en", + "published": null, + "publishedState": false, + "seoCanonicalUrl": "https://sulu.io/", + "seoDescription": "Seo Description", + "seoHideInSitemap": true, + "seoKeywords": "Seo Keyword 1, Seo Keyword 2", + "seoNoFollow": true, + "seoNoIndex": true, + "seoTitle": "Seo Title", + "shadowLocale": null, + "shadowLocales": [], + "shadowOn": false, + "stage": "draft", + "template": "example-2", + "title": "Test Example", + "url": "/my-example", + "workflowPlace": "unpublished", + "mainWebspace": "sulu-io" +} diff --git a/Tests/Functional/Integration/responses/article_post_publish.json b/Tests/Functional/Integration/responses/article_post_publish.json new file mode 100644 index 000000000..1fcfbf810 --- /dev/null +++ b/Tests/Functional/Integration/responses/article_post_publish.json @@ -0,0 +1,42 @@ +{ + "author": null, + "authored": "2020-05-08T00:00:00+00:00", + "availableLocales": [ + "en" + ], + "contentLocales": [ + "en" + ], + "excerptCategories": [], + "excerptDescription": "Excerpt Description", + "excerptIcon": null, + "excerptImage": null, + "excerptMore": "Excerpt More", + "excerptTags": [ + "Tag 1", + "Tag 2" + ], + "excerptTitle": "Excerpt Title", + "ghostLocale": "en", + "id": "@integer@", + "images": null, + "locale": "en", + "published": "@string@.isDateTime()", + "publishedState": true, + "seoCanonicalUrl": "https://sulu.io/", + "seoDescription": "Seo Description", + "seoHideInSitemap": true, + "seoKeywords": "Seo Keyword 1, Seo Keyword 2", + "seoNoFollow": true, + "seoNoIndex": true, + "seoTitle": "Seo Title", + "shadowLocale": null, + "shadowLocales": [], + "shadowOn": false, + "stage": "draft", + "template": "example-2", + "title": "Test Example", + "url": "/my-example", + "workflowPlace": "published", + "mainWebspace": "sulu-io" +} diff --git a/Tests/Functional/Integration/responses/article_post_trigger_copy_locale.json b/Tests/Functional/Integration/responses/article_post_trigger_copy_locale.json new file mode 100644 index 000000000..88c9a53a3 --- /dev/null +++ b/Tests/Functional/Integration/responses/article_post_trigger_copy_locale.json @@ -0,0 +1,44 @@ +{ + "author": null, + "authored": "2020-05-08T00:00:00+00:00", + "availableLocales": [ + "en", + "de" + ], + "contentLocales": [ + "en", + "de" + ], + "excerptCategories": [], + "excerptDescription": "Excerpt Description", + "excerptIcon": null, + "excerptImage": null, + "excerptMore": "Excerpt More", + "excerptTags": [ + "Tag 1", + "Tag 2" + ], + "excerptTitle": "Excerpt Title", + "ghostLocale": "en", + "id": "@integer@", + "images": null, + "locale": "de", + "mainWebspace": "sulu-io", + "published": null, + "publishedState": false, + "seoCanonicalUrl": "https://sulu.io/", + "seoDescription": "Seo Description", + "seoHideInSitemap": true, + "seoKeywords": "Seo Keyword 1, Seo Keyword 2", + "seoNoFollow": true, + "seoNoIndex": true, + "seoTitle": "Seo Title", + "shadowLocale": null, + "shadowLocales": [], + "shadowOn": false, + "stage": "draft", + "template": "example-2", + "title": "Test Example", + "url": "/my-example", + "workflowPlace": "unpublished" +} diff --git a/Tests/Functional/Integration/responses/article_post_trigger_unpublish.json b/Tests/Functional/Integration/responses/article_post_trigger_unpublish.json new file mode 100644 index 000000000..bfa1a3cdc --- /dev/null +++ b/Tests/Functional/Integration/responses/article_post_trigger_unpublish.json @@ -0,0 +1,42 @@ +{ + "author": null, + "authored": "2020-05-08T00:00:00+00:00", + "availableLocales": [ + "en" + ], + "contentLocales": [ + "en" + ], + "excerptCategories": [], + "excerptDescription": "Excerpt Description", + "excerptIcon": null, + "excerptImage": null, + "excerptMore": "Excerpt More", + "excerptTags": [ + "Tag 1", + "Tag 2" + ], + "excerptTitle": "Excerpt Title", + "ghostLocale": "en", + "id": "@integer@", + "images": null, + "locale": "en", + "published": null, + "publishedState": false, + "seoCanonicalUrl": "https:\/\/sulu.io\/", + "seoDescription": "Seo Description", + "seoHideInSitemap": true, + "seoKeywords": "Seo Keyword 1, Seo Keyword 2", + "seoNoFollow": true, + "seoNoIndex": true, + "seoTitle": "Seo Title", + "shadowLocale": null, + "shadowLocales": [], + "shadowOn": false, + "stage": "draft", + "template": "example-2", + "title": "Test Example", + "url": "\/my-example", + "workflowPlace": "unpublished", + "mainWebspace": "sulu-io" +} diff --git a/Tests/Functional/Integration/responses/article_put.json b/Tests/Functional/Integration/responses/article_put.json new file mode 100644 index 000000000..31644c041 --- /dev/null +++ b/Tests/Functional/Integration/responses/article_put.json @@ -0,0 +1,47 @@ +{ + "author": null, + "authored": "2020-06-09T00:00:00+00:00", + "article": "

Test Article 2

", + "availableLocales": [ + "en", + "de" + ], + "contentLocales": [ + "en", + "de" + ], + "blocks": null, + "description": null, + "excerptCategories": [], + "excerptDescription": "Excerpt Description 2", + "excerptIcon": null, + "excerptImage": null, + "excerptMore": "Excerpt More 2", + "excerptTags": [ + "Tag 3", + "Tag 4" + ], + "excerptTitle": "Excerpt Title 2", + "ghostLocale": "en", + "id": "@integer@", + "image": null, + "locale": "en", + "published": null, + "publishedState": false, + "seoCanonicalUrl": "https://sulu.io/2", + "seoDescription": "Seo Description 2", + "seoHideInSitemap": false, + "seoKeywords": "Seo Keyword 3, Seo Keyword 4", + "seoNoFollow": false, + "seoNoIndex": false, + "seoTitle": "Seo Title 2", + "shadowLocale": null, + "shadowLocales": [], + "shadowOn": false, + "stage": "draft", + "template": "default", + "title": "Test Example 2", + "url": "/my-example-2", + "workflowPlace": "unpublished", + "mainWebspace": "sulu-io2" +} diff --git a/composer.json b/composer.json index 3b6fd7c52..37daad4f2 100644 --- a/composer.json +++ b/composer.json @@ -36,16 +36,11 @@ "twig/twig": "^1.41 || ^2.0 || ^3.0" }, "require-dev": { - "doctrine/data-fixtures": "^1.3.3", - "elasticsearch/elasticsearch": "^5.0 || ^6.0 || ^7.0", + "coduo/php-matcher": "^6.0", "friendsofphp/php-cs-fixer": "^3.0", - "handcraftedinthealps/elasticsearch-bundle": "^5.2.6.4", - "handcraftedinthealps/elasticsearch-dsl": "^5.0.7.1 || ^6.2.0.1 || ^7.2.0.1", "handcraftedinthealps/zendsearch": "^2.0", - "jackalope/jackalope-doctrine-dbal": "^1.3.4 || ^2.0", - "jackalope/jackalope-jackrabbit": "^1.3 || ^2.0", + "jackalope/jackalope-doctrine-dbal": "^1.0 || ^2.0", "jangregor/phpstan-prophecy": "^1.0", - "massive/build-bundle": "^0.3 || ^0.4 || ^0.5", "php-cs-fixer/shim": "^3.0", "phpcr/phpcr-shell": "^1.1", "phpspec/prophecy": "^1.15", @@ -68,44 +63,29 @@ }, "conflict": { "doctrine/doctrine-bundle": "2.3.0", - "elasticsearch/elasticsearch": "<5.0 || >=8.0", - "guzzlehttp/ringphp": "<1.1.1", - "handcraftedinthealps/elasticsearch-bundle": "<5.2.6.4 || >=6.0", - "handcraftedinthealps/elasticsearch-dsl": "<5.0.7.1 || 6.0 - 6.2.0 || 7.0 - 7.2.0 || >=8.0", "sulu/automation-bundle": "<2.0, >=3.0", - "sulu/content-bundle": "<0.7, >=0.8", + "sulu/content-bundle": "<0.7, >=0.9", "sulu/headless-bundle": "<0.8, >=0.11", "sulu/messenger": "<0.1, >=0.3" }, "suggest": { - "elasticsearch/elasticsearch": "Required for the default article phpcr storage.", - "handcraftedinthealps/elasticsearch-bundle": "Required for the default article phpcr storage.", - "sulu/automation-bundle": "Allows publish automation and outsource long-running route update processes.", - "sulu/content-bundle": "Allows to use the experimental article storage." + "sulu/automation-bundle": "Allows publish automation and outsource long-running route update processes." }, "autoload": { "psr-4": { - "Sulu\\Bundle\\ArticleBundle\\": "", "Sulu\\Article\\": "src/" - }, - "exclude-from-classmap": [ - "/src/", - "/Resources/phpcr-migrations/", - "/tests/" - ] + } }, "autoload-dev": { "psr-4": { - "Sulu\\Bundle\\ArticleBundle\\Tests\\": "tests" + "Sulu\\Article\\Tests\\": "tests/" } }, "scripts": { "bootstrap-test-environment": [ - "@php tests/Application/bin/adminconsole doctrine:database:drop --if-exists --force --env test_experimental_storage", - "@php tests/Application/bin/adminconsole doctrine:database:create --env test_experimental_storage", - "@php tests/Application/bin/adminconsole doctrine:schema:update --force --env test_experimental_storage", - "@php tests/Application/bin/adminconsole ongr:es:index:create --manager=default --if-not-exists --env test", - "@php tests/Application/bin/adminconsole ongr:es:index:create --manager=live --if-not-exists --env test" + "@php tests/Application/bin/adminconsole doctrine:database:drop --if-exists --force --env test", + "@php tests/Application/bin/adminconsole doctrine:database:create --env test", + "@php tests/Application/bin/adminconsole doctrine:schema:update --force --env test" ], "lint": [ "@phpstan", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 03126bef7..32622feae 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -5,22 +5,17 @@ - Tests/Unit + tests/Unit - Tests/Functional + tests/Functional - . - - Resources/ - Tests/ - vendor/ - + src @@ -28,7 +23,7 @@ - + diff --git a/tests/Application/.env b/tests/Application/.env index c767aeb3c..076306fdc 100644 --- a/tests/Application/.env +++ b/tests/Application/.env @@ -1,2 +1,2 @@ APP_ENV=test -DATABASE_URL=mysql://root:@127.0.0.1:3306/sulu_test?serverVersion=5.7&charset=utf8mb4&collation=utf8mb4_unicode_ci +DATABASE_URL=mysql://root:ChangeMe@127.0.0.1:3306/sulu_test?serverVersion=5.7&charset=utf8mb4&collation=utf8mb4_unicode_ci diff --git a/tests/Application/Kernel.php b/tests/Application/Kernel.php index c06f0436a..1342223f8 100644 --- a/tests/Application/Kernel.php +++ b/tests/Application/Kernel.php @@ -9,13 +9,10 @@ * with this source code in the file LICENSE. */ -namespace Sulu\Bundle\ArticleBundle\Tests\Application; +namespace Sulu\Article\Tests\Application; -use ONGR\ElasticsearchBundle\ONGRElasticsearchBundle; -use Sulu\Bundle\ArticleBundle\SuluArticleBundle; -use Sulu\Bundle\ArticleBundle\Tests\TestExtendBundle\TestExtendBundle; +use Sulu\Article\Infrastructure\Symfony\HttpKernel\SuluArticleBundle; use Sulu\Bundle\ContentBundle\SuluContentBundle; -use Sulu\Bundle\HeadlessBundle\SuluHeadlessBundle; use Sulu\Bundle\TestBundle\Kernel\SuluTestKernel; use Sulu\Component\HttpKernel\SuluKernel; use Sulu\Messenger\Infrastructure\Symfony\HttpKernel\SuluMessengerBundle; @@ -26,7 +23,7 @@ /** * AppKernel for functional tests. */ -class Kernel extends SuluTestKernel implements CompilerPassInterface +class Kernel extends SuluTestKernel { /** * @var string|null @@ -57,7 +54,10 @@ public function registerContainerConfiguration(LoaderInterface $loader): void parent::registerContainerConfiguration($loader); $loader->load(__DIR__ . '/config/config.yml'); - $loader->load(__DIR__ . '/config/config_' . $this->config . '.yml'); + + if (\file_exists(__DIR__ . '/config/config_' . $this->config . '.yml')) { + $loader->load(__DIR__ . '/config/config_' . $this->config . '.yml'); + } } /** From e396d349543d0a2494eb5d97d7b95509686d9259 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 13:17:44 +0200 Subject: [PATCH 04/37] Fix Kernel Class --- tests/Application/bin/console.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Application/bin/console.php b/tests/Application/bin/console.php index 44e05b930..a5842cf5a 100755 --- a/tests/Application/bin/console.php +++ b/tests/Application/bin/console.php @@ -19,7 +19,7 @@ require_once __DIR__ . '/../config/bootstrap.php'; -use Sulu\Bundle\ArticleBundle\Tests\Application\Kernel; +use Sulu\Article\Tests\Application\Kernel; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\ErrorHandler\Debug; From 46f42994e47c9577f656636e9a217cec57ac9c4a Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 13:56:01 +0200 Subject: [PATCH 05/37] Update test setup --- .../views/articles/article.html.twig | 2 +- .../Integration/ArticleControllerTest.php | 29 ++++++++++--------- .../Integration/responses/article_cget.json | 11 +++++-- .../Integration/responses/article_get.json | 11 +++---- .../responses/article_get_ghost_locale.json | 2 +- .../Integration/responses/article_post.json | 11 +++---- .../responses/article_post_publish.json | 11 +++---- .../article_post_trigger_copy_locale.json | 11 +++---- .../article_post_trigger_unpublish.json | 11 +++---- .../Integration/responses/article_put.json | 14 ++++----- phpunit.xml.dist | 1 + src/Domain/Model/ArticleDimensionContent.php | 5 +++- .../ArticleDimensionContentInterface.php | 5 ++-- tests/Application/config/config.yml | 4 +++ .../config/templates/articles/article.xml | 2 +- 15 files changed, 74 insertions(+), 56 deletions(-) diff --git a/Tests/Application/templates/views/articles/article.html.twig b/Tests/Application/templates/views/articles/article.html.twig index 834b1fdcd..2e5f3f99d 100644 --- a/Tests/Application/templates/views/articles/article.html.twig +++ b/Tests/Application/templates/views/articles/article.html.twig @@ -3,5 +3,5 @@ {% block content %}

{{ content.title }}

- {{ content.article|raw }} + {{ content.description|raw }} {% endblock %} diff --git a/Tests/Functional/Integration/ArticleControllerTest.php b/Tests/Functional/Integration/ArticleControllerTest.php index bf9e6ec56..04e004b2e 100644 --- a/Tests/Functional/Integration/ArticleControllerTest.php +++ b/Tests/Functional/Integration/ArticleControllerTest.php @@ -39,7 +39,7 @@ protected function setUp(): void ); } - public function testPostPublish(): int + public function testPostPublish(): string { self::purgeDatabase(); self::initPhpcr(); @@ -49,7 +49,8 @@ public function testPostPublish(): int 'title' => 'Test Article', 'url' => '/my-article', 'published' => '2020-05-08T00:00:00+00:00', // Should be ignored - 'images' => null, + 'description' => null, + 'image' => null, 'seoTitle' => 'Seo Title', 'seoDescription' => 'Seo Description', 'seoCanonicalUrl' => 'https://sulu.io/', @@ -71,7 +72,7 @@ public function testPostPublish(): int $response = $this->client->getResponse(); $content = \json_decode((string) $response->getContent(), true); - /** @var int $id */ + /** @var string $id */ $id = $content['id'] ?? null; // @phpstan-ignore-line $this->assertResponseSnapshot('article_post_publish.json', $response, 201); @@ -86,7 +87,7 @@ public function testPostPublish(): int $this->assertHttpStatusCode(200, $response); $content = $response->getContent(); $this->assertIsString($content); - $this->assertStringContainsString('EXAMPLE 2 TEMPLATE', $content); + $this->assertStringContainsString('Test Article', $content); return $id; } @@ -94,7 +95,7 @@ public function testPostPublish(): int /** * @depends testPostPublish */ - public function testPostTriggerUnpublish(int $id): void + public function testPostTriggerUnpublish(string $id): void { $this->client->request('POST', '/admin/api/articles/' . $id . '?locale=en&action=unpublish'); @@ -111,7 +112,7 @@ public function testPostTriggerUnpublish(int $id): void $this->assertHttpStatusCode(404, $response); } - public function testPost(): int + public function testPost(): string { self::purgeDatabase(); @@ -145,7 +146,7 @@ public function testPost(): int $routeRepository = $this->getContainer()->get('sulu.repository.route'); $this->assertCount(0, $routeRepository->findAll()); - /** @var int $id */ + /** @var string $id */ $id = \json_decode((string) $response->getContent(), true)['id'] ?? null; // @phpstan-ignore-line return $id; @@ -154,7 +155,7 @@ public function testPost(): int /** * @depends testPost */ - public function testGet(int $id): void + public function testGet(string $id): void { $this->client->request('GET', '/admin/api/articles/' . $id . '?locale=en'); $response = $this->client->getResponse(); @@ -172,7 +173,7 @@ public function testGet(int $id): void /** * @depends testPost */ - public function testGetGhostLocale(int $id): void + public function testGetGhostLocale(string $id): void { $this->client->request('GET', '/admin/api/articles/' . $id . '?locale=de'); $response = $this->client->getResponse(); @@ -190,7 +191,7 @@ public function testGetGhostLocale(int $id): void /** * @depends testPost */ - public function testPostTriggerCopyLocale(int $id): void + public function testPostTriggerCopyLocale(string $id): void { $this->client->request('POST', '/admin/api/articles/' . $id . '?locale=de&action=copy-locale&src=en&dest=de'); @@ -203,13 +204,13 @@ public function testPostTriggerCopyLocale(int $id): void * @depends testPost * @depends testGet */ - public function testPut(int $id): void + public function testPut(string $id): void { $this->client->request('PUT', '/admin/api/articles/' . $id . '?locale=en', [], [], [], \json_encode([ 'template' => 'article', 'title' => 'Test Article 2', 'url' => '/my-article-2', - 'article' => '

Test Article 2

', + 'description' => '

Test Article 2

', 'seoTitle' => 'Seo Title 2', 'seoDescription' => 'Seo Description 2', 'seoCanonicalUrl' => 'https://sulu.io/2', @@ -225,7 +226,7 @@ public function testPut(int $id): void 'excerptIcon' => null, 'excerptMedia' => null, 'authored' => '2020-06-09T00:00:00+00:00', - 'mainWebspace' => 'sulu-io2', + 'mainWebspace' => 'sulu-io', ]) ?: null); $response = $this->client->getResponse(); @@ -252,7 +253,7 @@ public function testGetList(): void * @depends testPost * @depends testGetList */ - public function testDelete(int $id): void + public function testDelete(string $id): void { $this->client->request('DELETE', '/admin/api/articles/' . $id . '?locale=en'); $response = $this->client->getResponse(); diff --git a/Tests/Functional/Integration/responses/article_cget.json b/Tests/Functional/Integration/responses/article_cget.json index 8563c9175..74c5fc444 100644 --- a/Tests/Functional/Integration/responses/article_cget.json +++ b/Tests/Functional/Integration/responses/article_cget.json @@ -1,9 +1,14 @@ { "_embedded": { - "examples": [ + "articles": [ { - "id": "@integer@", - "title": "Test Example 2" + "author": null, + "changed": "@datetime@", + "changer": "Max Mustermann", + "created": "@datetime@", + "creator": "Max Mustermann", + "id": "@string@", + "title": "Test Article 2" } ] }, diff --git a/Tests/Functional/Integration/responses/article_get.json b/Tests/Functional/Integration/responses/article_get.json index 00aa7a073..0c5e39791 100644 --- a/Tests/Functional/Integration/responses/article_get.json +++ b/Tests/Functional/Integration/responses/article_get.json @@ -7,6 +7,7 @@ "contentLocales": [ "en" ], + "description": null, "excerptCategories": [], "excerptDescription": "Excerpt Description", "excerptIcon": null, @@ -18,8 +19,8 @@ ], "excerptTitle": "Excerpt Title", "ghostLocale": "en", - "id": "@integer@", - "images": null, + "id": "@string@", + "image": null, "mainWebspace": "sulu-io", "locale": "en", "published": null, @@ -35,8 +36,8 @@ "shadowLocales": [], "shadowOn": false, "stage": "draft", - "template": "example-2", - "title": "Test Example", - "url": "/my-example", + "template": "article", + "title": "Test Article", + "url": "/my-article", "workflowPlace": "unpublished" } diff --git a/Tests/Functional/Integration/responses/article_get_ghost_locale.json b/Tests/Functional/Integration/responses/article_get_ghost_locale.json index 99727b2a1..d812c8f1c 100644 --- a/Tests/Functional/Integration/responses/article_get_ghost_locale.json +++ b/Tests/Functional/Integration/responses/article_get_ghost_locale.json @@ -11,7 +11,7 @@ "excerptTags": [], "excerptTitle":null, "ghostLocale": "en", - "id": "@integer@", + "id": "@string@", "locale": null, "mainWebspace": null, "published": null, diff --git a/Tests/Functional/Integration/responses/article_post.json b/Tests/Functional/Integration/responses/article_post.json index 30d31e1be..bce6cd9bc 100644 --- a/Tests/Functional/Integration/responses/article_post.json +++ b/Tests/Functional/Integration/responses/article_post.json @@ -7,6 +7,7 @@ "contentLocales": [ "en" ], + "description": null, "excerptCategories": [], "excerptDescription": "Excerpt Description", "excerptIcon": null, @@ -18,8 +19,8 @@ ], "excerptTitle": "Excerpt Title", "ghostLocale": "en", - "id": "@integer@", - "images": null, + "id": "@string@", + "image": null, "locale": "en", "published": null, "publishedState": false, @@ -34,9 +35,9 @@ "shadowLocales": [], "shadowOn": false, "stage": "draft", - "template": "example-2", - "title": "Test Example", - "url": "/my-example", + "template": "article", + "title": "Test Article", + "url": "/my-article", "workflowPlace": "unpublished", "mainWebspace": "sulu-io" } diff --git a/Tests/Functional/Integration/responses/article_post_publish.json b/Tests/Functional/Integration/responses/article_post_publish.json index 1fcfbf810..3fa2fc7ae 100644 --- a/Tests/Functional/Integration/responses/article_post_publish.json +++ b/Tests/Functional/Integration/responses/article_post_publish.json @@ -7,6 +7,7 @@ "contentLocales": [ "en" ], + "description": null, "excerptCategories": [], "excerptDescription": "Excerpt Description", "excerptIcon": null, @@ -18,8 +19,8 @@ ], "excerptTitle": "Excerpt Title", "ghostLocale": "en", - "id": "@integer@", - "images": null, + "id": "@string@", + "image": null, "locale": "en", "published": "@string@.isDateTime()", "publishedState": true, @@ -34,9 +35,9 @@ "shadowLocales": [], "shadowOn": false, "stage": "draft", - "template": "example-2", - "title": "Test Example", - "url": "/my-example", + "template": "article", + "title": "Test Article", + "url": "/my-article", "workflowPlace": "published", "mainWebspace": "sulu-io" } diff --git a/Tests/Functional/Integration/responses/article_post_trigger_copy_locale.json b/Tests/Functional/Integration/responses/article_post_trigger_copy_locale.json index 88c9a53a3..de20b8c05 100644 --- a/Tests/Functional/Integration/responses/article_post_trigger_copy_locale.json +++ b/Tests/Functional/Integration/responses/article_post_trigger_copy_locale.json @@ -9,6 +9,7 @@ "en", "de" ], + "description": null, "excerptCategories": [], "excerptDescription": "Excerpt Description", "excerptIcon": null, @@ -20,8 +21,8 @@ ], "excerptTitle": "Excerpt Title", "ghostLocale": "en", - "id": "@integer@", - "images": null, + "id": "@string@", + "image": null, "locale": "de", "mainWebspace": "sulu-io", "published": null, @@ -37,8 +38,8 @@ "shadowLocales": [], "shadowOn": false, "stage": "draft", - "template": "example-2", - "title": "Test Example", - "url": "/my-example", + "template": "article", + "title": "Test Article", + "url": "/my-article", "workflowPlace": "unpublished" } diff --git a/Tests/Functional/Integration/responses/article_post_trigger_unpublish.json b/Tests/Functional/Integration/responses/article_post_trigger_unpublish.json index bfa1a3cdc..eb7430e25 100644 --- a/Tests/Functional/Integration/responses/article_post_trigger_unpublish.json +++ b/Tests/Functional/Integration/responses/article_post_trigger_unpublish.json @@ -7,6 +7,7 @@ "contentLocales": [ "en" ], + "description": null, "excerptCategories": [], "excerptDescription": "Excerpt Description", "excerptIcon": null, @@ -18,8 +19,8 @@ ], "excerptTitle": "Excerpt Title", "ghostLocale": "en", - "id": "@integer@", - "images": null, + "id": "@string@", + "image": null, "locale": "en", "published": null, "publishedState": false, @@ -34,9 +35,9 @@ "shadowLocales": [], "shadowOn": false, "stage": "draft", - "template": "example-2", - "title": "Test Example", - "url": "\/my-example", + "template": "article", + "title": "Test Article", + "url": "\/my-article", "workflowPlace": "unpublished", "mainWebspace": "sulu-io" } diff --git a/Tests/Functional/Integration/responses/article_put.json b/Tests/Functional/Integration/responses/article_put.json index 31644c041..7f1669166 100644 --- a/Tests/Functional/Integration/responses/article_put.json +++ b/Tests/Functional/Integration/responses/article_put.json @@ -1,7 +1,6 @@ { "author": null, "authored": "2020-06-09T00:00:00+00:00", - "article": "

Test Article 2

", "availableLocales": [ "en", "de" @@ -10,8 +9,7 @@ "en", "de" ], - "blocks": null, - "description": null, + "description": "

Test Article 2

", "excerptCategories": [], "excerptDescription": "Excerpt Description 2", "excerptIcon": null, @@ -23,7 +21,7 @@ ], "excerptTitle": "Excerpt Title 2", "ghostLocale": "en", - "id": "@integer@", + "id": "@string@", "image": null, "locale": "en", "published": null, @@ -39,9 +37,9 @@ "shadowLocales": [], "shadowOn": false, "stage": "draft", - "template": "default", - "title": "Test Example 2", - "url": "/my-example-2", + "template": "article", + "title": "Test Article 2", + "url": "/my-article-2", "workflowPlace": "unpublished", - "mainWebspace": "sulu-io2" + "mainWebspace": "sulu-io" } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 32622feae..75188b047 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -21,6 +21,7 @@ + diff --git a/src/Domain/Model/ArticleDimensionContent.php b/src/Domain/Model/ArticleDimensionContent.php index c67665fdf..d2c1288be 100644 --- a/src/Domain/Model/ArticleDimensionContent.php +++ b/src/Domain/Model/ArticleDimensionContent.php @@ -19,8 +19,10 @@ use Sulu\Bundle\ContentBundle\Content\Domain\Model\ExcerptTrait; use Sulu\Bundle\ContentBundle\Content\Domain\Model\RoutableTrait; use Sulu\Bundle\ContentBundle\Content\Domain\Model\SeoTrait; +use Sulu\Bundle\ContentBundle\Content\Domain\Model\ShadowTrait; use Sulu\Bundle\ContentBundle\Content\Domain\Model\TemplateTrait; //use Sulu\Bundle\ContentBundle\Content\Domain\Model\WebspaceTrait; +use Sulu\Bundle\ContentBundle\Content\Domain\Model\WebspaceTrait; use Sulu\Bundle\ContentBundle\Content\Domain\Model\WorkflowTrait; /** @@ -33,10 +35,11 @@ class ArticleDimensionContent implements ArticleDimensionContentInterface use ExcerptTrait; use RoutableTrait; use SeoTrait; + use ShadowTrait; use TemplateTrait { setTemplateData as parentSetTemplateData; } - //use WebspaceTrait; + use WebspaceTrait; use WorkflowTrait; /** diff --git a/src/Domain/Model/ArticleDimensionContentInterface.php b/src/Domain/Model/ArticleDimensionContentInterface.php index 1ba523113..341cf1287 100644 --- a/src/Domain/Model/ArticleDimensionContentInterface.php +++ b/src/Domain/Model/ArticleDimensionContentInterface.php @@ -16,8 +16,9 @@ use Sulu\Bundle\ContentBundle\Content\Domain\Model\ExcerptInterface; use Sulu\Bundle\ContentBundle\Content\Domain\Model\RoutableInterface; use Sulu\Bundle\ContentBundle\Content\Domain\Model\SeoInterface; +use Sulu\Bundle\ContentBundle\Content\Domain\Model\ShadowInterface; use Sulu\Bundle\ContentBundle\Content\Domain\Model\TemplateInterface; -// use Sulu\Bundle\ContentBundle\Content\Domain\Model\WebspaceInterface; +use Sulu\Bundle\ContentBundle\Content\Domain\Model\WebspaceInterface; use Sulu\Bundle\ContentBundle\Content\Domain\Model\WorkflowInterface; /** @@ -25,7 +26,7 @@ * * @extends DimensionContentInterface */ -interface ArticleDimensionContentInterface extends DimensionContentInterface, ExcerptInterface, SeoInterface, TemplateInterface, RoutableInterface, WorkflowInterface, /*WebspaceInterface,*/ AuthorInterface +interface ArticleDimensionContentInterface extends DimensionContentInterface, ExcerptInterface, SeoInterface, TemplateInterface, RoutableInterface, WorkflowInterface, ShadowInterface, WebspaceInterface, AuthorInterface { public function getTitle(): ?string; } diff --git a/tests/Application/config/config.yml b/tests/Application/config/config.yml index 2baa18167..da8f664d7 100644 --- a/tests/Application/config/config.yml +++ b/tests/Application/config/config.yml @@ -12,3 +12,7 @@ framework: messenger: transports: routing: + +twig: + paths: + - '%kernel.project_dir%/templates' diff --git a/tests/Application/config/templates/articles/article.xml b/tests/Application/config/templates/articles/article.xml index 665af27ce..144dcb5b3 100644 --- a/tests/Application/config/templates/articles/article.xml +++ b/tests/Application/config/templates/articles/article.xml @@ -5,7 +5,7 @@ article - templates/articles/article + views/articles/article Sulu\Bundle\ContentBundle\Content\UserInterface\Controller\Website\ContentController::indexAction 604800 From d08d6c3c7bf0c86b04c5ac03dc006ff05d2a5968 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 14:15:35 +0200 Subject: [PATCH 06/37] Fix ghost handling --- src/UserInterface/Controller/Admin/ArticleController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UserInterface/Controller/Admin/ArticleController.php b/src/UserInterface/Controller/Admin/ArticleController.php index a56847c92..17e0571f0 100644 --- a/src/UserInterface/Controller/Admin/ArticleController.php +++ b/src/UserInterface/Controller/Admin/ArticleController.php @@ -135,7 +135,7 @@ public function getAction(Request $request, string $id): Response // TODO route \array_merge( [ 'uuid' => $id, - 'load_ghost_content' => true, + 'loadGhost' => true, ], $dimensionAttributes, ), From abcab8bea5fde3d57824c251cae6ad65d451d099 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 14:24:15 +0200 Subject: [PATCH 07/37] Fix bootstrap directory --- phpunit.xml.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 75188b047..6084e9610 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,6 +1,6 @@ From 566f620ad266cd64dd2473036f51b88780ace5d6 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 14:24:56 +0200 Subject: [PATCH 08/37] Update crowdin path --- .github/workflows/crowdin-upload.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/crowdin-upload.yaml b/.github/workflows/crowdin-upload.yaml index 24a5ded27..6f34fd42c 100644 --- a/.github/workflows/crowdin-upload.yaml +++ b/.github/workflows/crowdin-upload.yaml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Copy translation file - run: cp Resources/translations/admin.en.json admin.en.json + run: cp translations/admin.en.json admin.en.json - name: Download Crowdin CLI run: curl "https://downloads.crowdin.com/cli/v3/crowdin-cli.zip" --output crowdin-cli.zip && unzip crowdin-cli.zip - name: Upload translations to crowdin From 8e9dbc5d8d9e1e3b4ca4b59a9061d1b861847c83 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 14:34:46 +0200 Subject: [PATCH 09/37] Increase required symfony version --- composer.json | 18 +- phpstan-baseline.neon | 2491 ----------------------------------------- 2 files changed, 9 insertions(+), 2500 deletions(-) delete mode 100644 phpstan-baseline.neon diff --git a/composer.json b/composer.json index 37daad4f2..a6e288358 100644 --- a/composer.json +++ b/composer.json @@ -28,10 +28,10 @@ "jms/serializer-bundle": "^3.3 || ^4.0 || ^5.0", "ramsey/uuid": "^3.1 || ^4.0", "sulu/sulu": "^2.5.9 || ^2.5.9@dev", - "symfony/config": "^5.4 || ^6.0 || ^7.0", - "symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0", - "symfony/http-foundation": "^5.4 || ^6.0 || ^7.0", - "symfony/http-kernel": "^5.4 || ^6.0 || ^7.0", + "symfony/config": "^6.4 || ^7.0", + "symfony/dependency-injection": "^6.4 || ^7.0", + "symfony/http-foundation": "^6.4 || ^7.0", + "symfony/http-kernel": "^6.4 || ^7.0", "symfony-cmf/slugifier-api": "^1.0 || ^2.0", "twig/twig": "^1.41 || ^2.0 || ^3.0" }, @@ -54,12 +54,12 @@ "sulu/content-bundle": "^0.7 || ^0.8@dev", "sulu/headless-bundle": "^0.8 || ^0.9 || ^0.10@dev", "sulu/messenger": "^0.1 || ^0.2@dev", - "symfony/browser-kit": "^5.4 || ^6.0 || ^7.0", - "symfony/dotenv": "^5.4 || ^6.0 || ^7.0", - "symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0", + "symfony/browser-kit": "^6.4 || ^7.0", + "symfony/dotenv": "^6.4 || ^7.0", + "symfony/framework-bundle": "^6.4 || ^7.0", "symfony/monolog-bundle": "^3.1", - "symfony/security-bundle": "^5.4 || ^6.0 || ^7.0", - "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" + "symfony/security-bundle": "^6.4 || ^7.0", + "symfony/stopwatch": "^6.4 || ^7.0" }, "conflict": { "doctrine/doctrine-bundle": "2.3.0", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon deleted file mode 100644 index 7c51ed894..000000000 --- a/phpstan-baseline.neon +++ /dev/null @@ -1,2491 +0,0 @@ -parameters: - ignoreErrors: - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Admin\\\\ArticleAdmin\\:\\:__construct\\(\\) has parameter \\$articleTypeConfigurations with no value type specified in iterable type array\\.$#" - count: 1 - path: Admin/ArticleAdmin.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Admin\\\\ArticleAdmin\\:\\:__construct\\(\\) has parameter \\$kernelBundles with no value type specified in iterable type array\\.$#" - count: 1 - path: Admin/ArticleAdmin.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Admin\\\\ArticleAdmin\\:\\:getSecurityContexts\\(\\) should return array\\\\>\\>\\> but returns array\\\\>\\>\\>\\.$#" - count: 1 - path: Admin/ArticleAdmin.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Admin\\\\ArticleAdmin\\:\\:getTypes\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Admin/ArticleAdmin.php - - - - message: "#^Offset 'translation_key' does not exist on string\\.$#" - count: 1 - path: Admin/ArticleAdmin.php - - - - message: "#^Parameter \\#1 \\$type of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Admin\\\\ArticleAdmin\\:\\:getTitle\\(\\) expects string, mixed given\\.$#" - count: 1 - path: Admin/ArticleAdmin.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Admin\\\\ArticleAdmin\\:\\:\\$kernelBundles is never read, only written\\.$#" - count: 1 - path: Admin/ArticleAdmin.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Admin\\\\Helper\\\\WebspaceSelect\\:\\:getValues\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Admin/Helper/WebspaceSelect.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Builder\\\\ArticleIndexBuilder\\:\\:getDependencies\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Builder/ArticleIndexBuilder.php - - - - message: "#^Strict comparison using \\=\\=\\= between 0 and bool will always evaluate to false\\.$#" - count: 1 - path: Command/ArticleExportCommand.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Command\\\\ArticleImportCommand\\:\\:printExceptions\\(\\) has no return type specified\\.$#" - count: 1 - path: Command/ArticleImportCommand.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Command\\\\ArticleImportCommand\\:\\:printExceptions\\(\\) has parameter \\$output with no type specified\\.$#" - count: 1 - path: Command/ArticleImportCommand.php - - - - message: "#^Strict comparison using \\=\\=\\= between 0 and bool will always evaluate to false\\.$#" - count: 1 - path: Command/ArticleImportCommand.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Command\\\\ReindexCommand\\:\\:getDocuments\\(\\) should return Sulu\\\\Component\\\\DocumentManager\\\\Collection\\\\QueryResultCollection but returns mixed\\.$#" - count: 1 - path: Command/ReindexCommand.php - - - - message: "#^Parameter \\#1 \\$document of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\IndexerInterface\\:\\:index\\(\\) expects Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument, mixed given\\.$#" - count: 1 - path: Command/ReindexCommand.php - - - - message: "#^Parameter \\#1 \\$string of function strlen expects string, int given\\.$#" - count: 1 - path: Command/ReindexCommand.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataItem\\:\\:getImage\\(\\) should return string but empty return statement found\\.$#" - count: 1 - path: Content/ArticleDataItem.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataItem\\:\\:getResource\\(\\) has no return type specified\\.$#" - count: 1 - path: Content/ArticleDataItem.php - - - - message: "#^Argument of an invalid type Countable supplied for foreach, only iterables are supported\\.$#" - count: 2 - path: Content/ArticleDataProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataProvider\\:\\:addBoolQuery\\(\\) has parameter \\$filters with no value type specified in iterable type array\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataProvider\\:\\:createSearch\\(\\) has parameter \\$filters with no value type specified in iterable type array\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataProvider\\:\\:getBoolQuery\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataProvider\\:\\:getExcludedFilter\\(\\) has parameter \\$filters with no value type specified in iterable type array\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataProvider\\:\\:getExcludedFilter\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataProvider\\:\\:getFilter\\(\\) has parameter \\$filters with no value type specified in iterable type array\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataProvider\\:\\:getResource\\(\\) is unused\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataProvider\\:\\:getSearchResult\\(\\) has parameter \\$filters with no value type specified in iterable type array\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataProvider\\:\\:getStructureTypesProperty\\(\\) has parameter \\$propertyParameter with no value type specified in iterable type array\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataProvider\\:\\:getStructureTypesProperty\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataProvider\\:\\:getTypesProperty\\(\\) has parameter \\$propertyParameter with no value type specified in iterable type array\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataProvider\\:\\:getTypesProperty\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataProvider\\:\\:getWebspaceKey\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataProvider\\:\\:getWebspaceKey\\(\\) has parameter \\$propertyParameter with no value type specified in iterable type array\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataProvider\\:\\:hasFilter\\(\\) has parameter \\$filters with no value type specified in iterable type array\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataProvider\\:\\:resolveDatasource\\(\\) should return Sulu\\\\Component\\\\SmartContent\\\\DatasourceItemInterface but empty return statement found\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Negated boolean expression is always false\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Parameter \\#2 \\$initializer of method ProxyManager\\\\Factory\\\\LazyLoadingValueHolderFactory\\:\\:createProxy\\(\\) expects Closure\\(Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\|null\\=, ProxyManager\\\\Proxy\\\\ValueHolderInterface\\&ProxyManager\\\\Proxy\\\\VirtualProxyInterface&Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\=, string\\=, array\\\\=, Closure\\|null\\=\\)\\: bool, Closure\\(mixed, ProxyManager\\\\Proxy\\\\LazyLoadingInterface, mixed, array, mixed\\)\\: true given\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Parameter \\#2 \\$value of class Sulu\\\\Component\\\\Content\\\\Compat\\\\PropertyParameter constructor expects array\\|bool\\|string, null given\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Parameter \\#2 \\$values of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataProvider\\:\\:getBoolQuery\\(\\) expects array, mixed given\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Parameter \\#3 \\$locale of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataProvider\\:\\:createSearch\\(\\) expects string, string\\|null given\\.$#" - count: 1 - path: Content/ArticleDataProvider.php - - - - message: "#^Parameter \\#4 \\$operator of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleDataProvider\\:\\:addBoolQuery\\(\\) expects string, mixed given\\.$#" - count: 4 - path: Content/ArticleDataProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleResourceItem\\:\\:getAuthorFullName\\(\\) has no return type specified\\.$#" - count: 1 - path: Content/ArticleResourceItem.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleResourceItem\\:\\:getAuthorId\\(\\) has no return type specified\\.$#" - count: 1 - path: Content/ArticleResourceItem.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleResourceItem\\:\\:getResource\\(\\) has no return type specified\\.$#" - count: 1 - path: Content/ArticleResourceItem.php - - - - message: "#^Parameter \\#2 \\$initializer of method ProxyManager\\\\Factory\\\\LazyLoadingValueHolderFactory\\:\\:createProxy\\(\\) expects Closure\\(Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\|null\\=, ProxyManager\\\\Proxy\\\\ValueHolderInterface\\&ProxyManager\\\\Proxy\\\\VirtualProxyInterface&Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\=, string\\=, array\\\\=, Closure\\|null\\=\\)\\: bool, Closure\\(mixed, ProxyManager\\\\Proxy\\\\LazyLoadingInterface, mixed, array, mixed\\)\\: true given\\.$#" - count: 1 - path: Content/ArticleResourceItemFactory.php - - - - message: "#^Parameter \\#2 \\$resource of class Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleResourceItem constructor expects Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument, object given\\.$#" - count: 1 - path: Content/ArticleResourceItemFactory.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleSelectionContentType\\:\\:getViewDocumentIds\\(\\) has parameter \\$uuids with no value type specified in iterable type array\\.$#" - count: 1 - path: Content/ArticleSelectionContentType.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleSelectionContentType\\:\\:getViewDocumentIds\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Content/ArticleSelectionContentType.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\ArticleSelectionContentType\\:\\:preResolve\\(\\) has no return type specified\\.$#" - count: 1 - path: Content/ArticleSelectionContentType.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\PageTreeArticleDataProvider\\:\\:createSearch\\(\\) has parameter \\$filters with no value type specified in iterable type array\\.$#" - count: 1 - path: Content/PageTreeArticleDataProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\PageTreeArticleDataProvider\\:\\:resolveDatasource\\(\\) should return Sulu\\\\Component\\\\SmartContent\\\\DatasourceItemInterface but returns null\\.$#" - count: 2 - path: Content/PageTreeArticleDataProvider.php - - - - message: "#^Parameter \\#1 \\$identifier of method Sulu\\\\Component\\\\DocumentManager\\\\DocumentManagerInterface\\:\\:find\\(\\) expects string, int\\\\|int\\<1, max\\>\\|string given\\.$#" - count: 1 - path: Content/PageTreeArticleDataProvider.php - - - - message: "#^Expression on left side of \\?\\? is not nullable\\.$#" - count: 1 - path: Content/SingleArticleSelectionContentType.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\SingleArticleSelectionContentType\\:\\:getViewDocumentIds\\(\\) has parameter \\$uuids with no value type specified in iterable type array\\.$#" - count: 1 - path: Content/SingleArticleSelectionContentType.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\SingleArticleSelectionContentType\\:\\:getViewDocumentIds\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Content/SingleArticleSelectionContentType.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Content\\\\SingleArticleSelectionContentType\\:\\:preResolve\\(\\) has no return type specified\\.$#" - count: 1 - path: Content/SingleArticleSelectionContentType.php - - - - message: "#^Argument of an invalid type array\\|null supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: Controller/ArticleController.php - - - - message: "#^Call to an undefined method object\\:\\:getUuid\\(\\)\\.$#" - count: 1 - path: Controller/ArticleController.php - - - - message: "#^Call to an undefined method object\\:\\:setAdditionalWebspaces\\(\\)\\.$#" - count: 2 - path: Controller/ArticleController.php - - - - message: "#^Call to an undefined method object\\:\\:setAuthor\\(\\)\\.$#" - count: 1 - path: Controller/ArticleController.php - - - - message: "#^Call to an undefined method object\\:\\:setMainWebspace\\(\\)\\.$#" - count: 1 - path: Controller/ArticleController.php - - - - message: "#^Cannot access offset '_source' on mixed\\.$#" - count: 1 - path: Controller/ArticleController.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Controller\\\\ArticleController\\:\\:getViewDocumentIds\\(\\) has parameter \\$uuids with no value type specified in iterable type array\\.$#" - count: 1 - path: Controller/ArticleController.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Controller\\\\ArticleController\\:\\:getViewDocumentIds\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Controller/ArticleController.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Controller\\\\ArticleController\\:\\:normalize\\(\\) has no return type specified\\.$#" - count: 1 - path: Controller/ArticleController.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Controller\\\\ArticleController\\:\\:normalize\\(\\) has parameter \\$document with no value type specified in iterable type array\\.$#" - count: 1 - path: Controller/ArticleController.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Controller\\\\ArticleController\\:\\:orderPages\\(\\) has parameter \\$pages with no value type specified in iterable type array\\.$#" - count: 1 - path: Controller/ArticleController.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Controller\\\\ArticleController\\:\\:persistDocument\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: Controller/ArticleController.php - - - - message: "#^Parameter \\#1 \\$actionParameter of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Controller\\\\ArticleController\\:\\:handleActionParameter\\(\\) expects string\\|null, mixed given\\.$#" - count: 2 - path: Controller/ArticleController.php - - - - message: "#^Parameter \\#1 \\$document of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Controller\\\\ArticleController\\:\\:normalize\\(\\) expects array, mixed given\\.$#" - count: 1 - path: Controller/ArticleController.php - - - - message: "#^Parameter \\#1 \\$pages of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Controller\\\\ArticleController\\:\\:orderPages\\(\\) expects array, string given\\.$#" - count: 1 - path: Controller/ArticleController.php - - - - message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, array\\|null given\\.$#" - count: 1 - path: Controller/ArticleController.php - - - - message: "#^Parameter \\#2 \\$from of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Controller\\\\ArticleController\\:\\:getRangeQuery\\(\\) expects string, mixed given\\.$#" - count: 1 - path: Controller/ArticleController.php - - - - message: "#^Parameter \\#2 \\$query of class ONGR\\\\ElasticsearchDSL\\\\Query\\\\FullText\\\\MatchQuery constructor expects string, mixed given\\.$#" - count: 3 - path: Controller/ArticleController.php - - - - message: "#^Parameter \\#2 \\$string of function explode expects string, mixed given\\.$#" - count: 3 - path: Controller/ArticleController.php - - - - message: "#^Parameter \\#2 \\$value of class ONGR\\\\ElasticsearchDSL\\\\Query\\\\TermLevel\\\\TermQuery constructor expects bool\\|float\\|int\\|string, mixed given\\.$#" - count: 3 - path: Controller/ArticleController.php - - - - message: "#^Parameter \\#3 \\$to of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Controller\\\\ArticleController\\:\\:getRangeQuery\\(\\) expects string, mixed given\\.$#" - count: 1 - path: Controller/ArticleController.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Controller\\\\ArticleController\\:\\:\\$contentMapper is never read, only written\\.$#" - count: 1 - path: Controller/ArticleController.php - - - - message: "#^Strict comparison using \\=\\=\\= between null and ONGR\\\\ElasticsearchDSL\\\\Query\\\\Compound\\\\BoolQuery will always evaluate to false\\.$#" - count: 1 - path: Controller/ArticleController.php - - - - message: "#^Call to an undefined method object\\:\\:getParent\\(\\)\\.$#" - count: 3 - path: Controller/ArticlePageController.php - - - - message: "#^Call to an undefined method object\\:\\:getStructureType\\(\\)\\.$#" - count: 1 - path: Controller/ArticlePageController.php - - - - message: "#^Call to an undefined method object\\:\\:getUuid\\(\\)\\.$#" - count: 1 - path: Controller/ArticlePageController.php - - - - message: "#^Call to an undefined method object\\:\\:setParent\\(\\)\\.$#" - count: 1 - path: Controller/ArticlePageController.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Controller\\\\ArticlePageController\\:\\:persistDocument\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: Controller/ArticlePageController.php - - - - message: "#^Parameter \\#1 \\$actionParameter of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Controller\\\\ArticlePageController\\:\\:handleActionParameter\\(\\) expects string\\|null, mixed given\\.$#" - count: 2 - path: Controller/ArticlePageController.php - - - - message: "#^Call to an undefined method object\\:\\:getVersions\\(\\)\\.$#" - count: 1 - path: Controller/VersionController.php - - - - message: "#^Else branch is unreachable because ternary operator condition is always true\\.$#" - count: 1 - path: Controller/VersionController.php - - - - message: "#^Parameter \\#2 \\$locale of method Sulu\\\\Component\\\\DocumentManager\\\\DocumentManagerInterface\\:\\:restore\\(\\) expects string, string\\|null given\\.$#" - count: 1 - path: Controller/VersionController.php - - - - message: "#^Parameter \\#2 \\$offset of function array_slice expects int, int\\|null given\\.$#" - count: 1 - path: Controller/VersionController.php - - - - message: "#^Parameter \\#3 \\$route of class Sulu\\\\Component\\\\Rest\\\\ListBuilder\\\\ListRepresentation constructor expects string, mixed given\\.$#" - count: 1 - path: Controller/VersionController.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Controller\\\\WebsiteArticleController\\:\\:normalizeArticle\\(\\) should return Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument but returns Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleInterface\\.$#" - count: 1 - path: Controller/WebsiteArticleController.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Controller\\\\WebsiteArticleController\\:\\:normalizeArticle\\(\\) should return Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument but returns object\\.$#" - count: 1 - path: Controller/WebsiteArticleController.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Controller\\\\WebsiteArticleController\\:\\:renderArticle\\(\\) has parameter \\$attributes with no value type specified in iterable type array\\.$#" - count: 1 - path: Controller/WebsiteArticleController.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Controller\\\\WebsiteArticleController\\:\\:resolveArticle\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Controller/WebsiteArticleController.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Controller\\\\WebsiteArticleController\\:\\:resolveArticle\\(\\) should return array but returns mixed\\.$#" - count: 1 - path: Controller/WebsiteArticleController.php - - - - message: "#^Parameter \\#1 \\$format of method Symfony\\\\Component\\\\HttpFoundation\\\\Request\\:\\:getMimeType\\(\\) expects string, string\\|null given\\.$#" - count: 1 - path: Controller/WebsiteArticleController.php - - - - message: "#^Parameter \\#2 \\$values of method Symfony\\\\Component\\\\HttpFoundation\\\\ResponseHeaderBag\\:\\:set\\(\\) expects array\\\\|string\\|null, mixed given\\.$#" - count: 1 - path: Controller/WebsiteArticleController.php - - - - message: "#^Negated boolean expression is always true\\.$#" - count: 1 - path: DependencyInjection/StructureValidatorCompilerPass.php - - - - message: "#^Offset 'article'\\|'article_page' on array\\{snippet\\: string\\} on left side of \\?\\? does not exist\\.$#" - count: 1 - path: DependencyInjection/StructureValidatorCompilerPass.php - - - - message: "#^Unreachable statement \\- code above always terminates\\.$#" - count: 1 - path: DependencyInjection/StructureValidatorCompilerPass.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\DependencyInjection\\\\SuluArticleExtension\\:\\:appendDefaultAuthor\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: DependencyInjection/SuluArticleExtension.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\DependencyInjection\\\\SuluArticleExtension\\:\\:cloneArticleConfig\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: DependencyInjection/SuluArticleExtension.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\DependencyInjection\\\\SuluArticleExtension\\:\\:cloneArticleConfig\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: DependencyInjection/SuluArticleExtension.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\DependencyInjection\\\\SuluArticleExtension\\:\\:load\\(\\) has no return type specified\\.$#" - count: 1 - path: DependencyInjection/SuluArticleExtension.php - - - - message: "#^Offset 'article' on array\\{snippet\\: string\\} in isset\\(\\) does not exist\\.$#" - count: 1 - path: DependencyInjection/SuluArticleExtension.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\DependencyInjection\\\\WebspaceSettingsConfigurationResolver\\:\\:__construct\\(\\) has parameter \\$defaultAdditionalWebspaces with no value type specified in iterable type array\\.$#" - count: 1 - path: DependencyInjection/WebspaceSettingsConfigurationResolver.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\DependencyInjection\\\\WebspaceSettingsConfigurationResolver\\:\\:__construct\\(\\) has parameter \\$defaultMainWebspace with no value type specified in iterable type array\\.$#" - count: 1 - path: DependencyInjection/WebspaceSettingsConfigurationResolver.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\DependencyInjection\\\\WebspaceSettingsConfigurationResolver\\:\\:getDefaultAdditionalWebspacesForLocale\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: DependencyInjection/WebspaceSettingsConfigurationResolver.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\DependencyInjection\\\\WebspaceSettingsConfigurationResolver\\:\\:\\$defaultAdditionalWebspaces type has no value type specified in iterable type array\\.$#" - count: 1 - path: DependencyInjection/WebspaceSettingsConfigurationResolver.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\DependencyInjection\\\\WebspaceSettingsConfigurationResolver\\:\\:\\$defaultMainWebspace type has no value type specified in iterable type array\\.$#" - count: 1 - path: DependencyInjection/WebspaceSettingsConfigurationResolver.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:getPages\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:getPublished\\(\\) should return DateTime\\|null but returns bool\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:setAuthor\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:setAuthored\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:setExtension\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:setExtension\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:setExtensionsData\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:setLocale\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:setOriginalLocale\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:setPages\\(\\) has parameter \\$pages with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:setParent\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:setRoute\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:setShadowLocale\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:setShadowLocaleEnabled\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:setStructureType\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:setTitle\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:setVersions\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:setWorkflowStage\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:\\$author \\(int\\) does not accept int\\|null\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:\\$children \\(Sulu\\\\Component\\\\DocumentManager\\\\Collection\\\\ChildrenCollection\\) does not accept ArrayIterator\\<\\*NEVER\\*, \\*NEVER\\*\\>\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:\\$creator \\(int\\) does not accept int\\|null\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:\\$extensions \\(Sulu\\\\Component\\\\Content\\\\Document\\\\Extension\\\\ExtensionContainer\\) does not accept array\\\\|Sulu\\\\Component\\\\Content\\\\Document\\\\Extension\\\\ExtensionContainer\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:\\$pages type has no value type specified in iterable type array\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:\\$route \\(Sulu\\\\Bundle\\\\RouteBundle\\\\Model\\\\RouteInterface\\) does not accept null\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:\\$routePath \\(string\\) does not accept null\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:\\$shadowLocale \\(string\\) does not accept string\\|null\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:\\$workflowStage \\(int\\) does not accept int\\|string\\.$#" - count: 1 - path: Document/ArticleDocument.php - - - - message: "#^Call to an undefined method object\\:\\:getExtensionsData\\(\\)\\.$#" - count: 1 - path: Document/ArticlePageDocument.php - - - - message: "#^Call to an undefined method object\\:\\:getUuid\\(\\)\\.$#" - count: 1 - path: Document/ArticlePageDocument.php - - - - message: "#^Call to an undefined method object\\:\\:getWorkflowStage\\(\\)\\.$#" - count: 1 - path: Document/ArticlePageDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageDocument\\:\\:getId\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticlePageDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageDocument\\:\\:setLocale\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticlePageDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageDocument\\:\\:setOriginalLocale\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticlePageDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageDocument\\:\\:setParent\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticlePageDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageDocument\\:\\:setRoute\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticlePageDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageDocument\\:\\:setShadowLocale\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticlePageDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageDocument\\:\\:setShadowLocaleEnabled\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticlePageDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageDocument\\:\\:setStructureType\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticlePageDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageDocument\\:\\:setTitle\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/ArticlePageDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageDocument\\:\\:\\$parent \\(Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\) does not accept object\\.$#" - count: 1 - path: Document/ArticlePageDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageDocument\\:\\:\\$route \\(Sulu\\\\Bundle\\\\RouteBundle\\\\Model\\\\RouteInterface\\) does not accept null\\.$#" - count: 1 - path: Document/ArticlePageDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageDocument\\:\\:\\$routePath \\(string\\) does not accept null\\.$#" - count: 1 - path: Document/ArticlePageDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageDocument\\:\\:\\$shadowLocale \\(string\\) does not accept string\\|null\\.$#" - count: 1 - path: Document/ArticlePageDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageViewObject\\:\\:\\$content with generic class ArrayObject does not specify its types\\: TKey, TValue$#" - count: 1 - path: Document/ArticlePageViewObject.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageViewObject\\:\\:\\$view with generic class ArrayObject does not specify its types\\: TKey, TValue$#" - count: 1 - path: Document/ArticlePageViewObject.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocument\\:\\:getContent\\(\\) return type with generic class ArrayObject does not specify its types\\: TKey, TValue$#" - count: 1 - path: Document/ArticleViewDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocument\\:\\:getView\\(\\) return type with generic class ArrayObject does not specify its types\\: TKey, TValue$#" - count: 1 - path: Document/ArticleViewDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocument\\:\\:setContent\\(\\) has parameter \\$content with generic class ArrayObject but does not specify its types\\: TKey, TValue$#" - count: 1 - path: Document/ArticleViewDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocument\\:\\:setContent\\(\\) return type with generic class ArrayObject does not specify its types\\: TKey, TValue$#" - count: 1 - path: Document/ArticleViewDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocument\\:\\:setContent\\(\\) should return ArrayObject but returns \\$this\\(Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocument\\)\\.$#" - count: 1 - path: Document/ArticleViewDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocument\\:\\:setPages\\(\\) has parameter \\$pages with generic class Doctrine\\\\Common\\\\Collections\\\\ArrayCollection but does not specify its types\\: TKey, T$#" - count: 1 - path: Document/ArticleViewDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocument\\:\\:setView\\(\\) has parameter \\$view with generic class ArrayObject but does not specify its types\\: TKey, TValue$#" - count: 1 - path: Document/ArticleViewDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocument\\:\\:\\$additionalWebspaces \\(array\\\\) does not accept array\\\\|null\\.$#" - count: 1 - path: Document/ArticleViewDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocument\\:\\:\\$authored \\(DateTime\\) does not accept DateTime\\|null\\.$#" - count: 1 - path: Document/ArticleViewDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocument\\:\\:\\$content with generic class ArrayObject does not specify its types\\: TKey, TValue$#" - count: 1 - path: Document/ArticleViewDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocument\\:\\:\\$mainWebspace \\(string\\) does not accept string\\|null\\.$#" - count: 1 - path: Document/ArticleViewDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocument\\:\\:\\$pages \\(array\\\\) does not accept Doctrine\\\\Common\\\\Collections\\\\ArrayCollection\\.$#" - count: 1 - path: Document/ArticleViewDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocument\\:\\:\\$published \\(DateTime\\) does not accept DateTime\\|null\\.$#" - count: 1 - path: Document/ArticleViewDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocument\\:\\:\\$uuid \\(string\\) does not accept string\\|null\\.$#" - count: 1 - path: Document/ArticleViewDocument.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocument\\:\\:\\$view with generic class ArrayObject does not specify its types\\: TKey, TValue$#" - count: 1 - path: Document/ArticleViewDocument.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface\\:\\:getContent\\(\\) return type with generic class ArrayObject does not specify its types\\: TKey, TValue$#" - count: 1 - path: Document/ArticleViewDocumentInterface.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface\\:\\:getView\\(\\) return type with generic class ArrayObject does not specify its types\\: TKey, TValue$#" - count: 1 - path: Document/ArticleViewDocumentInterface.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface\\:\\:setContent\\(\\) has parameter \\$content with generic class ArrayObject but does not specify its types\\: TKey, TValue$#" - count: 1 - path: Document/ArticleViewDocumentInterface.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface\\:\\:setContent\\(\\) return type with generic class ArrayObject does not specify its types\\: TKey, TValue$#" - count: 1 - path: Document/ArticleViewDocumentInterface.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface\\:\\:setPages\\(\\) has parameter \\$pages with generic class Doctrine\\\\Common\\\\Collections\\\\ArrayCollection but does not specify its types\\: TKey, T$#" - count: 1 - path: Document/ArticleViewDocumentInterface.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface\\:\\:setView\\(\\) has parameter \\$view with generic class ArrayObject but does not specify its types\\: TKey, TValue$#" - count: 1 - path: Document/ArticleViewDocumentInterface.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Form\\\\ArticleDocumentType\\:\\:buildForm\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/Form/ArticleDocumentType.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Form\\\\ArticlePageDocumentType\\:\\:buildForm\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/Form/ArticlePageDocumentType.php - - - - message: "#^Cannot access offset 'structure' on mixed\\.$#" - count: 2 - path: Document/Form/Listener/DataNormalizer.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Form\\\\Listener\\\\DataNormalizer\\:\\:getAndUnsetValue\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Form/Listener/DataNormalizer.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Form\\\\Listener\\\\DataNormalizer\\:\\:normalize\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/Form/Listener/DataNormalizer.php - - - - message: "#^Parameter \\#2 \\.\\.\\.\\$arrays of function array_merge expects array, mixed given\\.$#" - count: 1 - path: Document/Form/Listener/DataNormalizer.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\ArticleGhostIndexer\\:\\:__construct\\(\\) has parameter \\$typeConfiguration with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Index/ArticleGhostIndexer.php - - - - message: "#^Parameter \\#1 \\$document of method ONGR\\\\ElasticsearchBundle\\\\Service\\\\Manager\\:\\:persist\\(\\) expects object, Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface\\|null given\\.$#" - count: 1 - path: Document/Index/ArticleGhostIndexer.php - - - - message: "#^Parameter \\#2 \\$article of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\ArticleIndexer\\:\\:dispatchIndexEvent\\(\\) expects Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface, Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface\\|null given\\.$#" - count: 1 - path: Document/Index/ArticleGhostIndexer.php - - - - message: "#^Cannot call method getPropertyByTagName\\(\\) on Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata\\|null\\.$#" - count: 2 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Cannot call method hasPropertyWithTagName\\(\\) on Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata\\|null\\.$#" - count: 2 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Cannot call method setLocalizationState\\(\\) on Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface\\|null\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\ArticleIndexer\\:\\:__construct\\(\\) has parameter \\$typeConfiguration with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\ArticleIndexer\\:\\:getBlockContentFieldsRecursive\\(\\) has parameter \\$blockMetaData with no type specified\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\ArticleIndexer\\:\\:getBlockContentFieldsRecursive\\(\\) has parameter \\$blocks with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\ArticleIndexer\\:\\:getBlockContentFieldsRecursive\\(\\) has parameter \\$tag with no type specified\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\ArticleIndexer\\:\\:getContentFields\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\ArticleIndexer\\:\\:getDocumentInspector\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\ArticleIndexer\\:\\:getViewDocumentIds\\(\\) has parameter \\$uuids with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\ArticleIndexer\\:\\:getViewDocumentIds\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Parameter \\#1 \\$authorId of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface\\:\\:setAuthorId\\(\\) expects string, int given\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Parameter \\#1 \\$changerContactId of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface\\:\\:setChangerContactId\\(\\) expects string, int given\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Parameter \\#1 \\$contentData of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface\\:\\:setContentData\\(\\) expects string, string\\|false given\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Parameter \\#1 \\$creatorContactId of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface\\:\\:setCreatorContactId\\(\\) expects string, int given\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Parameter \\#1 \\$document of method ONGR\\\\ElasticsearchBundle\\\\Service\\\\Manager\\:\\:persist\\(\\) expects object, Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface\\|null given\\.$#" - count: 3 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Parameter \\#1 \\$document of method ONGR\\\\ElasticsearchBundle\\\\Service\\\\Manager\\:\\:remove\\(\\) expects object, mixed given\\.$#" - count: 2 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Parameter \\#1 \\$metadata of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\ArticleIndexer\\:\\:getType\\(\\) expects Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata, Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata\\|null given\\.$#" - count: 2 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Parameter \\#1 \\$name of method Sulu\\\\Component\\\\Content\\\\Document\\\\Structure\\\\StructureInterface\\:\\:getProperty\\(\\) expects string, float\\|int\\|string given\\.$#" - count: 4 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Parameter \\#1 \\$routePath of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface\\:\\:setRoutePath\\(\\) expects string, string\\|null given\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Parameter \\#1 \\$structure of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\ArticleIndexer\\:\\:getContentFields\\(\\) expects Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata, Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata\\|null given\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Parameter \\#1 \\$structureType of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface\\:\\:setStructureType\\(\\) expects string, string\\|null given\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Parameter \\#1 \\$type of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface\\:\\:setType\\(\\) expects string, mixed given\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Parameter \\#1 \\$type of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\ArticleIndexer\\:\\:getTypeTranslation\\(\\) expects string, mixed given\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Parameter \\#2 \\$article of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\ArticleIndexer\\:\\:dispatchIndexEvent\\(\\) expects Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface, Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface\\|null given\\.$#" - count: 2 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Parameter \\#2 \\$value of class ONGR\\\\ElasticsearchDSL\\\\Query\\\\TermLevel\\\\TermQuery constructor expects bool\\|float\\|int\\|string, mixed given\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageViewObject\\:\\:\\$contentData \\(string\\) does not accept string\\|false\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageViewObject\\:\\:\\$routePath \\(string\\) does not accept string\\|null\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageViewObject\\:\\:\\$title \\(string\\) does not accept string\\|null\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\ArticleIndexer\\:\\:\\$typeConfiguration type has no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Strict comparison using \\=\\=\\= between null and object will always evaluate to false\\.$#" - count: 1 - path: Document/Index/ArticleIndexer.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\DocumentFactory\\:\\:__construct\\(\\) has parameter \\$documents with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Index/DocumentFactory.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\DocumentFactory\\:\\:create\\(\\) should return Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface but returns object\\.$#" - count: 1 - path: Document/Index/DocumentFactory.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\DocumentFactory\\:\\:\\$documents type has no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Index/DocumentFactory.php - - - - message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: Document/Index/Factory/CategoryCollectionFactory.php - - - - message: "#^Cannot access offset 'id' on mixed\\.$#" - count: 1 - path: Document/Index/Factory/CategoryCollectionFactory.php - - - - message: "#^Cannot access offset 'key' on mixed\\.$#" - count: 1 - path: Document/Index/Factory/CategoryCollectionFactory.php - - - - message: "#^Cannot access offset 'keyword' on mixed\\.$#" - count: 1 - path: Document/Index/Factory/CategoryCollectionFactory.php - - - - message: "#^Cannot access offset 'name' on mixed\\.$#" - count: 1 - path: Document/Index/Factory/CategoryCollectionFactory.php - - - - message: "#^Cannot cast mixed to int\\.$#" - count: 1 - path: Document/Index/Factory/CategoryCollectionFactory.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\Factory\\\\CategoryCollectionFactory\\:\\:__construct\\(\\) has parameter \\$categoryRepository with generic class Doctrine\\\\ORM\\\\EntityRepository but does not specify its types\\: TEntityClass$#" - count: 1 - path: Document/Index/Factory/CategoryCollectionFactory.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\CategoryViewObject\\:\\:\\$key \\(string\\) does not accept mixed\\.$#" - count: 1 - path: Document/Index/Factory/CategoryCollectionFactory.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\CategoryViewObject\\:\\:\\$keywords \\(array\\\\) does not accept array\\.$#" - count: 1 - path: Document/Index/Factory/CategoryCollectionFactory.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\CategoryViewObject\\:\\:\\$name \\(string\\) does not accept mixed\\.$#" - count: 1 - path: Document/Index/Factory/CategoryCollectionFactory.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\Factory\\\\CategoryCollectionFactory\\:\\:\\$categoryRepository with generic class Doctrine\\\\ORM\\\\EntityRepository does not specify its types\\: TEntityClass$#" - count: 1 - path: Document/Index/Factory/CategoryCollectionFactory.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\Factory\\\\ExcerptFactory\\:\\:create\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Index/Factory/ExcerptFactory.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\Factory\\\\MediaCollectionFactory\\:\\:create\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Index/Factory/MediaCollectionFactory.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\Factory\\\\SegmentCollectionFactory\\:\\:create\\(\\) has parameter \\$segments with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Index/Factory/SegmentCollectionFactory.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\Factory\\\\SeoFactory\\:\\:create\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Index/Factory/SeoFactory.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\Factory\\\\TagCollectionFactory\\:\\:create\\(\\) should return ONGR\\\\ElasticsearchBundle\\\\Collection\\\\Collection but returns null\\.$#" - count: 1 - path: Document/Index/Factory/TagCollectionFactory.php - - - - message: "#^Negated boolean expression is always false\\.$#" - count: 1 - path: Document/Index/Factory/TagCollectionFactory.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Initializer\\\\ArticleInitializer\\:\\:initialize\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/Initializer/ArticleInitializer.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Initializer\\\\ArticleInitializer\\:\\:initialize\\(\\) has parameter \\$purge with no type specified\\.$#" - count: 1 - path: Document/Initializer/ArticleInitializer.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Initializer\\\\ArticleNodeType\\:\\:getPrimaryItemName\\(\\) should return string but empty return statement found\\.$#" - count: 1 - path: Document/Initializer/ArticleNodeType.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Initializer\\\\ArticlePageNodeDefinition\\:\\:getDeclaringNodeType\\(\\) should return PHPCR\\\\NodeType\\\\NodeTypeInterface but returns null\\.$#" - count: 1 - path: Document/Initializer/ArticlePageNodeDefinition.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Initializer\\\\ArticlePageNodeDefinition\\:\\:getDefaultPrimaryType\\(\\) should return PHPCR\\\\NodeType\\\\NodeTypeInterface but returns null\\.$#" - count: 1 - path: Document/Initializer/ArticlePageNodeDefinition.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Initializer\\\\ArticlePageNodeDefinition\\:\\:getDefaultPrimaryTypeName\\(\\) should return string but returns null\\.$#" - count: 1 - path: Document/Initializer/ArticlePageNodeDefinition.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Initializer\\\\ArticlePageNodeDefinition\\:\\:getRequiredPrimaryTypeNames\\(\\) should return array\\ but returns null\\.$#" - count: 1 - path: Document/Initializer/ArticlePageNodeDefinition.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Initializer\\\\ArticlePageNodeDefinition\\:\\:getRequiredPrimaryTypes\\(\\) should return array\\ but returns null\\.$#" - count: 1 - path: Document/Initializer/ArticlePageNodeDefinition.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Initializer\\\\ArticlePageNodeType\\:\\:getPrimaryItemName\\(\\) should return string but empty return statement found\\.$#" - count: 1 - path: Document/Initializer/ArticlePageNodeType.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\LocalizationStateViewObject\\:\\:\\$locale \\(string\\) does not accept string\\|null\\.$#" - count: 1 - path: Document/LocalizationStateViewObject.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\LocalizationStateViewObject\\:\\:\\$state \\(string\\) does not accept string\\|null\\.$#" - count: 1 - path: Document/LocalizationStateViewObject.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\MediaViewObject\\:\\:getThumbnails\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Document/MediaViewObject.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\MediaViewObject\\:\\:getThumbnails\\(\\) should return array but returns mixed\\.$#" - count: 1 - path: Document/MediaViewObject.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\MediaViewObject\\:\\:\\$copyright \\(string\\) does not accept string\\|null\\.$#" - count: 1 - path: Document/MediaViewObject.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\MediaViewObject\\:\\:\\$formats \\(string\\) does not accept string\\|false\\.$#" - count: 1 - path: Document/MediaViewObject.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\MediaViewObject\\:\\:\\$title \\(string\\) does not accept string\\|null\\.$#" - count: 1 - path: Document/MediaViewObject.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Repository\\\\ArticleViewDocumentRepository\\:\\:__construct\\(\\) has parameter \\$searchFields with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Repository/ArticleViewDocumentRepository.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Repository\\\\ArticleViewDocumentRepository\\:\\:createSearch\\(\\) has parameter \\$types with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Repository/ArticleViewDocumentRepository.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Repository\\\\ArticleViewDocumentRepository\\:\\:findRecent\\(\\) has parameter \\$types with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Repository/ArticleViewDocumentRepository.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Repository\\\\ArticleViewDocumentRepository\\:\\:findSimilar\\(\\) has parameter \\$types with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Repository/ArticleViewDocumentRepository.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Repository\\\\ArticleViewDocumentRepository\\:\\:getViewDocumentIds\\(\\) has parameter \\$uuids with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Repository/ArticleViewDocumentRepository.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Repository\\\\ArticleViewDocumentRepository\\:\\:getViewDocumentIds\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Repository/ArticleViewDocumentRepository.php - - - - message: "#^Parameter \\#1 \\$like of class ONGR\\\\ElasticsearchDSL\\\\Query\\\\Specialized\\\\MoreLikeThisQuery constructor expects string, null given\\.$#" - count: 1 - path: Document/Repository/ArticleViewDocumentRepository.php - - - - message: "#^Parameter \\#2 \\$locale of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Repository\\\\ArticleViewDocumentRepository\\:\\:getViewDocumentId\\(\\) expects string, string\\|null given\\.$#" - count: 1 - path: Document/Repository/ArticleViewDocumentRepository.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Repository\\\\ArticleViewDocumentRepository\\:\\:\\$searchFields type has no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Repository/ArticleViewDocumentRepository.php - - - - message: "#^Cannot call method getKey\\(\\) on Sulu\\\\Component\\\\Webspace\\\\Webspace\\|false\\.$#" - count: 1 - path: Document/Resolver/WebspaceResolver.php - - - - message: "#^Call to an undefined method object\\:\\:getTitle\\(\\)\\.$#" - count: 1 - path: Document/Serializer/ArticlePageSubscriber.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Serializer\\\\ArticlePageSubscriber\\:\\:getSubscribedEvents\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Serializer/ArticlePageSubscriber.php - - - - message: "#^Cannot call method getProperty\\(\\) on Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata\\|null\\.$#" - count: 1 - path: Document/Serializer/ArticleSubscriber.php - - - - message: "#^Cannot call method getPropertyByTagName\\(\\) on Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata\\|null\\.$#" - count: 1 - path: Document/Serializer/ArticleSubscriber.php - - - - message: "#^Cannot call method hasProperty\\(\\) on Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata\\|null\\.$#" - count: 1 - path: Document/Serializer/ArticleSubscriber.php - - - - message: "#^Cannot call method hasPropertyWithTagName\\(\\) on Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata\\|null\\.$#" - count: 1 - path: Document/Serializer/ArticleSubscriber.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Serializer\\\\ArticleSubscriber\\:\\:getSubscribedEvents\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Serializer/ArticleSubscriber.php - - - - message: "#^Negated boolean expression is always false\\.$#" - count: 1 - path: Document/Serializer/ArticleSubscriber.php - - - - message: "#^Parameter \\#1 \\$key of method Sulu\\\\Component\\\\Content\\\\Compat\\\\StructureManagerInterface\\:\\:getStructure\\(\\) expects string, string\\|null given\\.$#" - count: 1 - path: Document/Serializer/ArticleSubscriber.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Serializer\\\\ArticleSubscriber\\:\\:\\$localizationManager is unused\\.$#" - count: 1 - path: Document/Serializer/ArticleSubscriber.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Serializer\\\\WebsiteArticleUrlsSubscriber\\:\\:getSubscribedEvents\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Serializer/WebsiteArticleUrlsSubscriber.php - - - - message: "#^Negated boolean expression is always false\\.$#" - count: 2 - path: Document/Serializer/WebsiteArticleUrlsSubscriber.php - - - - message: "#^Call to an undefined method object\\:\\:getExtensionsData\\(\\)\\.$#" - count: 1 - path: Document/Structure/ArticleBridge.php - - - - message: "#^If condition is always true\\.$#" - count: 1 - path: Document/Structure/ArticleBridge.php - - - - message: "#^Left side of && is always true\\.$#" - count: 1 - path: Document/Structure/ArticleBridge.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Structure\\\\ArticleBridge\\:\\:getConcreteLanguages\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Structure/ArticleBridge.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Structure\\\\ArticleBridge\\:\\:getEnabledShadowLanguages\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Structure/ArticleBridge.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Structure\\\\ArticleBridge\\:\\:getExt\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/Structure/ArticleBridge.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Structure\\\\ArticleBridge\\:\\:getNavContexts\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/Structure/ArticleBridge.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Structure\\\\ArticleBridge\\:\\:setUuid\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/Structure/ArticleBridge.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Structure\\\\ArticleBridge\\:\\:setWebspaceKey\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/Structure/ArticleBridge.php - - - - message: "#^Negated boolean expression is always false\\.$#" - count: 1 - path: Document/Structure/ArticleBridge.php - - - - message: "#^Parameter \\#1 \\$document of method Sulu\\\\Bundle\\\\DocumentManagerBundle\\\\Bridge\\\\DocumentInspector\\:\\:getConcreteLocales\\(\\) expects Sulu\\\\Component\\\\Content\\\\Document\\\\Behavior\\\\ShadowLocaleBehavior, object given\\.$#" - count: 1 - path: Document/Structure/ArticleBridge.php - - - - message: "#^Parameter \\#1 \\$document of method Sulu\\\\Bundle\\\\DocumentManagerBundle\\\\Bridge\\\\DocumentInspector\\:\\:getShadowLocales\\(\\) expects Sulu\\\\Component\\\\Content\\\\Document\\\\Behavior\\\\ShadowLocaleBehavior, object given\\.$#" - count: 1 - path: Document/Structure/ArticleBridge.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Structure\\\\ArticleBridge\\:\\:\\$uuid is never read, only written\\.$#" - count: 1 - path: Document/Structure/ArticleBridge.php - - - - message: "#^Unreachable statement \\- code above always terminates\\.$#" - count: 1 - path: Document/Structure/ArticleBridge.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Structure\\\\ContentProxyFactory\\:\\:createContentProxy\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Structure/ContentProxyFactory.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Structure\\\\ContentProxyFactory\\:\\:createViewProxy\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Structure/ContentProxyFactory.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Structure\\\\ContentProxyFactory\\:\\:resolveContent\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Structure/ContentProxyFactory.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Structure\\\\ContentProxyFactory\\:\\:resolveContent\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Structure/ContentProxyFactory.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Structure\\\\ContentProxyFactory\\:\\:resolveView\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Structure/ContentProxyFactory.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Structure\\\\ContentProxyFactory\\:\\:resolveView\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Structure/ContentProxyFactory.php - - - - message: "#^Negated boolean expression is always false\\.$#" - count: 1 - path: Document/Structure/ContentProxyFactory.php - - - - message: "#^Parameter \\#1 \\$webspace of method Sulu\\\\Component\\\\Content\\\\Compat\\\\StructureInterface\\:\\:setWebspaceKey\\(\\) expects string, string\\|null given\\.$#" - count: 2 - path: Document/Structure/ContentProxyFactory.php - - - - message: "#^Parameter \\#2 \\$initializer of method ProxyManager\\\\Factory\\\\LazyLoadingValueHolderFactory\\:\\:createProxy\\(\\) expects Closure\\(ArrayObject\\|null\\=, ArrayObject&ProxyManager\\\\Proxy\\\\ValueHolderInterface\\&ProxyManager\\\\Proxy\\\\VirtualProxyInterface\\=, string\\=, array\\\\=, Closure\\|null\\=\\)\\: bool, Closure\\(mixed, ProxyManager\\\\Proxy\\\\LazyLoadingInterface, mixed, array, mixed\\)\\: true given\\.$#" - count: 2 - path: Document/Structure/ContentProxyFactory.php - - - - message: "#^Call to an undefined method object\\:\\:getStructureType\\(\\)\\.$#" - count: 1 - path: Document/Subscriber/ArticlePageSubscriber.php - - - - message: "#^Call to an undefined method object\\:\\:getTitle\\(\\)\\.$#" - count: 1 - path: Document/Subscriber/ArticlePageSubscriber.php - - - - message: "#^Call to an undefined method object\\:\\:setStructureType\\(\\)\\.$#" - count: 1 - path: Document/Subscriber/ArticlePageSubscriber.php - - - - message: "#^Call to an undefined method object\\:\\:setWorkflowStage\\(\\)\\.$#" - count: 1 - path: Document/Subscriber/ArticlePageSubscriber.php - - - - message: "#^Cannot call method getProperty\\(\\) on Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata\\|null\\.$#" - count: 1 - path: Document/Subscriber/ArticlePageSubscriber.php - - - - message: "#^Cannot call method getPropertyByTagName\\(\\) on Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata\\|null\\.$#" - count: 1 - path: Document/Subscriber/ArticlePageSubscriber.php - - - - message: "#^Cannot call method hasProperty\\(\\) on Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata\\|null\\.$#" - count: 1 - path: Document/Subscriber/ArticlePageSubscriber.php - - - - message: "#^Cannot call method hasPropertyWithTagName\\(\\) on Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata\\|null\\.$#" - count: 1 - path: Document/Subscriber/ArticlePageSubscriber.php - - - - message: "#^Parameter \\#1 \\$key of function array_key_exists expects int\\|string, float\\|int\\|string given\\.$#" - count: 1 - path: Document/Subscriber/ArticlePageSubscriber.php - - - - message: "#^Parameter \\#1 \\$name of method Sulu\\\\Component\\\\Content\\\\Document\\\\Structure\\\\StructureInterface\\:\\:getProperty\\(\\) expects string, float\\|int\\|string given\\.$#" - count: 1 - path: Document/Subscriber/ArticlePageSubscriber.php - - - - message: "#^Parameter \\#1 \\$name of method Sulu\\\\Component\\\\Content\\\\Document\\\\Structure\\\\StructureInterface\\:\\:hasProperty\\(\\) expects string, float\\|int\\|string given\\.$#" - count: 1 - path: Document/Subscriber/ArticlePageSubscriber.php - - - - message: "#^Right side of \\|\\| is always true\\.$#" - count: 1 - path: Document/Subscriber/ArticlePageSubscriber.php - - - - message: "#^Unreachable statement \\- code above always terminates\\.$#" - count: 1 - path: Document/Subscriber/ArticlePageSubscriber.php - - - - message: "#^Call to an undefined method object\\:\\:getLocale\\(\\)\\.$#" - count: 9 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Call to an undefined method object\\:\\:getUuid\\(\\)\\.$#" - count: 8 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Call to an undefined method object\\:\\:setWorkflowStage\\(\\)\\.$#" - count: 1 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Cannot access offset 'routePath' on mixed\\.$#" - count: 1 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Cannot access offset int\\<0, max\\> on mixed\\.$#" - count: 1 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\IndexerInterface\\:\\:remove\\(\\) invoked with 1 parameter, 2 required\\.$#" - count: 2 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Subscriber\\\\ArticleSubscriber\\:\\:handleRemoveLocale\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Subscriber\\\\ArticleSubscriber\\:\\:handleRemoveLocaleLive\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Subscriber\\\\ArticleSubscriber\\:\\:loadPageDataForShadow\\(\\) has parameter \\$originalPages with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Subscriber\\\\ArticleSubscriber\\:\\:loadPageDataForShadow\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Subscriber\\\\ArticleSubscriber\\:\\:loadPageDataForShadow\\(\\) should return array but returns mixed\\.$#" - count: 1 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Subscriber\\\\ArticleSubscriber\\:\\:removeDraftChildren\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Parameter \\#1 \\$document of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\IndexerInterface\\:\\:index\\(\\) expects Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument, Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\|null given\\.$#" - count: 2 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Parameter \\#1 \\$document of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Subscriber\\\\ArticleSubscriber\\:\\:setPageData\\(\\) expects Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument, object given\\.$#" - count: 1 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Parameter \\#1 \\$document of method Sulu\\\\Bundle\\\\DocumentManagerBundle\\\\Bridge\\\\DocumentInspector\\:\\:getLocalizationState\\(\\) expects object, mixed given\\.$#" - count: 2 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Parameter \\#1 \\$document of method Sulu\\\\Component\\\\DocumentManager\\\\DocumentInspector\\:\\:getNode\\(\\) expects object, mixed given\\.$#" - count: 1 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Parameter \\#1 \\$document of method Sulu\\\\Component\\\\DocumentManager\\\\DocumentManagerInterface\\:\\:publish\\(\\) expects object, mixed given\\.$#" - count: 1 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Parameter \\#1 \\$document of method Sulu\\\\Component\\\\DocumentManager\\\\DocumentManagerInterface\\:\\:refresh\\(\\) expects object, Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\|null given\\.$#" - count: 2 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Parameter \\#1 \\$document of method Sulu\\\\Component\\\\DocumentManager\\\\DocumentManagerInterface\\:\\:removeDraft\\(\\) expects object, mixed given\\.$#" - count: 1 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Parameter \\#1 \\$json of function json_decode expects string, mixed given\\.$#" - count: 2 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Parameter \\#1 \\$pages of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:setPages\\(\\) expects array, mixed given\\.$#" - count: 1 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Parameter \\#3 \\$originalPages of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Subscriber\\\\ArticleSubscriber\\:\\:loadPageDataForShadow\\(\\) expects array, mixed given\\.$#" - count: 1 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Subscriber\\\\ArticleSubscriber\\:\\:\\$children is never read, only written\\.$#" - count: 1 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Subscriber\\\\ArticleSubscriber\\:\\:\\$children type has no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Subscriber\\\\ArticleSubscriber\\:\\:\\$documents type has no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Subscriber\\\\ArticleSubscriber\\:\\:\\$liveDocuments type has no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Subscriber/ArticleSubscriber.php - - - - message: "#^Strict comparison using \\=\\=\\= between null and DateTime will always evaluate to false\\.$#" - count: 1 - path: Document/Subscriber/DateShardingSubscriber.php - - - - message: "#^Call to an undefined method object\\:\\:getChildren\\(\\)\\.$#" - count: 2 - path: Document/Subscriber/PageSubscriber.php - - - - message: "#^Parameter \\#1 \\$pageNumber of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Behavior\\\\PageBehavior\\:\\:setPageNumber\\(\\) expects int, mixed given\\.$#" - count: 1 - path: Document/Subscriber/PageSubscriber.php - - - - message: "#^Cannot call method getPropertyByTagName\\(\\) on Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata\\|null\\.$#" - count: 1 - path: Document/Subscriber/RoutableSubscriber.php - - - - message: "#^Cannot call method hasTag\\(\\) on Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata\\|null\\.$#" - count: 1 - path: Document/Subscriber/RoutableSubscriber.php - - - - message: "#^Left side of && is always true\\.$#" - count: 1 - path: Document/Subscriber/RoutableSubscriber.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Subscriber\\\\RoutableSubscriber\\:\\:createOrUpdatePageRoute\\(\\) should return Sulu\\\\Bundle\\\\RouteBundle\\\\Model\\\\RouteInterface but returns Sulu\\\\Bundle\\\\RouteBundle\\\\Model\\\\RouteInterface\\|null\\.$#" - count: 1 - path: Document/Subscriber/RoutableSubscriber.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Subscriber\\\\RoutableSubscriber\\:\\:removeOldChildRoutes\\(\\) has parameter \\$oldRoutes with no value type specified in iterable type array\\.$#" - count: 1 - path: Document/Subscriber/RoutableSubscriber.php - - - - message: "#^Negated boolean expression is always false\\.$#" - count: 1 - path: Document/Subscriber/RoutableSubscriber.php - - - - message: "#^Parameter \\#1 \\$identifier of method Sulu\\\\Component\\\\DocumentManager\\\\DocumentManagerInterface\\:\\:find\\(\\) expects string, string\\|null given\\.$#" - count: 1 - path: Document/Subscriber/RoutableSubscriber.php - - - - message: "#^Parameter \\#2 \\$field of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Subscriber\\\\RoutableSubscriber\\:\\:getPropertyName\\(\\) expects string, float\\|int\\|string given\\.$#" - count: 1 - path: Document/Subscriber/RoutableSubscriber.php - - - - message: "#^Parameter \\#2 \\$locale of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Subscriber\\\\RoutableSubscriber\\:\\:getRoutePathPropertyName\\(\\) expects string, string\\|null given\\.$#" - count: 1 - path: Document/Subscriber/RoutableSubscriber.php - - - - message: "#^Parameter \\#2 \\$oldRoutes of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Subscriber\\\\RoutableSubscriber\\:\\:removeOldChildRoutes\\(\\) expects array, mixed given\\.$#" - count: 1 - path: Document/Subscriber/RoutableSubscriber.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Subscriber\\\\RoutableSubscriber\\:\\:\\$conflictResolver is never read, only written\\.$#" - count: 1 - path: Document/Subscriber/RoutableSubscriber.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Subscriber\\\\WebspaceSubscriber\\:\\:getDocumentInspector\\(\\) has no return type specified\\.$#" - count: 1 - path: Document/Subscriber/WebspaceSubscriber.php - - - - message: "#^Parameter \\#1 \\$additionalWebspaces of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Behavior\\\\WebspaceBehavior\\:\\:setAdditionalWebspaces\\(\\) expects array\\\\|null, mixed given\\.$#" - count: 1 - path: Document/Subscriber/WebspaceSubscriber.php - - - - message: "#^Parameter \\#1 \\$document of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Subscriber\\\\WebspaceSubscriber\\:\\:getParentPageUuidFromPageTree\\(\\) expects Sulu\\\\Component\\\\Route\\\\Document\\\\Behavior\\\\RoutableBehavior, Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleInterface&Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Behavior\\\\WebspaceBehavior given\\.$#" - count: 1 - path: Document/Subscriber/WebspaceSubscriber.php - - - - message: "#^Parameter \\#1 \\$webspace of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Behavior\\\\WebspaceBehavior\\:\\:setMainWebspace\\(\\) expects string\\|null, mixed given\\.$#" - count: 1 - path: Document/Subscriber/WebspaceSubscriber.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Elasticsearch\\\\AnnotationReader\\:\\:__construct\\(\\) has parameter \\$articleViewDocumentClass with no type specified\\.$#" - count: 1 - path: Elasticsearch/AnnotationReader.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Elasticsearch\\\\AnnotationReader\\:\\:getClassAnnotation\\(\\) has parameter \\$class with generic class ReflectionClass but does not specify its types\\: T$#" - count: 1 - path: Elasticsearch/AnnotationReader.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Elasticsearch\\\\AnnotationReader\\:\\:getClassAnnotation\\(\\) should return T\\|null but returns ONGR\\\\ElasticsearchBundle\\\\Annotation\\\\Document\\.$#" - count: 1 - path: Elasticsearch/AnnotationReader.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Elasticsearch\\\\AnnotationReader\\:\\:getClassAnnotations\\(\\) has parameter \\$class with generic class ReflectionClass but does not specify its types\\: T$#" - count: 1 - path: Elasticsearch/AnnotationReader.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Elasticsearch\\\\EventAwareConverter\\:\\:convertToDocument\\(\\) has parameter \\$rawData with no value type specified in iterable type array\\.$#" - count: 1 - path: Elasticsearch/EventAwareConverter.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Elasticsearch\\\\PostConvertToDocumentEvent\\:\\:__construct\\(\\) has parameter \\$document with no type specified\\.$#" - count: 1 - path: Elasticsearch/PostConvertToDocumentEvent.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Elasticsearch\\\\PostConvertToDocumentEvent\\:\\:__construct\\(\\) has parameter \\$rawData with no value type specified in iterable type array\\.$#" - count: 1 - path: Elasticsearch/PostConvertToDocumentEvent.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Elasticsearch\\\\PostConvertToDocumentEvent\\:\\:getRawData\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Elasticsearch/PostConvertToDocumentEvent.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Elasticsearch\\\\PostConvertToDocumentEvent\\:\\:\\$rawData type has no value type specified in iterable type array\\.$#" - count: 1 - path: Elasticsearch/PostConvertToDocumentEvent.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\EventListener\\\\ContentProxyListener\\:\\:getProxies\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: EventListener/ContentProxyListener.php - - - - message: "#^Negated boolean expression is always false\\.$#" - count: 1 - path: EventListener/ContentProxyListener.php - - - - message: "#^Parameter \\#2 \\$data of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Structure\\\\ContentProxyFactory\\:\\:createContentProxy\\(\\) expects array, mixed given\\.$#" - count: 1 - path: EventListener/ContentProxyListener.php - - - - message: "#^Parameter \\#2 \\$data of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Structure\\\\ContentProxyFactory\\:\\:createViewProxy\\(\\) expects array, mixed given\\.$#" - count: 1 - path: EventListener/ContentProxyListener.php - - - - message: "#^Cannot access offset 'articlePath' on mixed\\.$#" - count: 1 - path: EventListener/DomainEventSubscriber.php - - - - message: "#^Cannot access offset 'locale' on mixed\\.$#" - count: 1 - path: EventListener/DomainEventSubscriber.php - - - - message: "#^Cannot access offset 'sourceArticleId' on mixed\\.$#" - count: 1 - path: EventListener/DomainEventSubscriber.php - - - - message: "#^Cannot access offset 'sourceArticleTitle' on mixed\\.$#" - count: 1 - path: EventListener/DomainEventSubscriber.php - - - - message: "#^Parameter \\#1 \\$identifier of method Sulu\\\\Component\\\\DocumentManager\\\\DocumentManagerInterface\\:\\:find\\(\\) expects string, mixed given\\.$#" - count: 1 - path: EventListener/DomainEventSubscriber.php - - - - message: "#^Parameter \\#2 \\$locale of method Sulu\\\\Component\\\\DocumentManager\\\\DocumentManagerInterface\\:\\:find\\(\\) expects string\\|null, mixed given\\.$#" - count: 1 - path: EventListener/DomainEventSubscriber.php - - - - message: "#^Parameter \\#2 \\$sourceArticleId of class Sulu\\\\Bundle\\\\ArticleBundle\\\\Domain\\\\Event\\\\ArticleCopiedEvent constructor expects string, mixed given\\.$#" - count: 1 - path: EventListener/DomainEventSubscriber.php - - - - message: "#^Parameter \\#3 \\$sourceArticleTitle of class Sulu\\\\Bundle\\\\ArticleBundle\\\\Domain\\\\Event\\\\ArticleCopiedEvent constructor expects string\\|null, mixed given\\.$#" - count: 1 - path: EventListener/DomainEventSubscriber.php - - - - message: "#^Parameter \\#4 \\$sourceArticleTitleLocale of class Sulu\\\\Bundle\\\\ArticleBundle\\\\Domain\\\\Event\\\\ArticleCopiedEvent constructor expects string\\|null, mixed given\\.$#" - count: 1 - path: EventListener/DomainEventSubscriber.php - - - - message: "#^Negated boolean expression is always false\\.$#" - count: 1 - path: EventListener/TargetWebspaceListener.php - - - - message: "#^Parameter \\#1 \\$targetWebspace of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocumentInterface\\:\\:setTargetWebspace\\(\\) expects string, string\\|null given\\.$#" - count: 1 - path: EventListener/TargetWebspaceListener.php - - - - message: "#^If condition is always true\\.$#" - count: 2 - path: Export/ArticleExport.php - - - - message: "#^Left side of && is always true\\.$#" - count: 1 - path: Export/ArticleExport.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Export\\\\ArticleExport\\:\\:__construct\\(\\) has parameter \\$formatFilePaths with no value type specified in iterable type array\\.$#" - count: 1 - path: Export/ArticleExport.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Export\\\\ArticleExport\\:\\:getDocuments\\(\\) should return Sulu\\\\Component\\\\DocumentManager\\\\Collection\\\\QueryResultCollection but returns mixed\\.$#" - count: 1 - path: Export/ArticleExport.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Export\\\\ArticleExport\\:\\:getExportData\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Export/ArticleExport.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Export\\\\ArticleExport\\:\\:getExtensionData\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Export/ArticleExport.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Export\\\\ArticleExport\\:\\:getSettingData\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Export/ArticleExport.php - - - - message: "#^Parameter \\#1 \\$key of method Sulu\\\\Component\\\\Content\\\\Extension\\\\ExtensionManagerInterface\\:\\:getExtension\\(\\) expects string, string\\|null given\\.$#" - count: 1 - path: Export/ArticleExport.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Export\\\\ArticleExport\\:\\:\\$output \\(Symfony\\\\Component\\\\Console\\\\Output\\\\OutputInterface\\) does not accept Symfony\\\\Component\\\\Console\\\\Output\\\\OutputInterface\\|null\\.$#" - count: 1 - path: Export/ArticleExport.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Import\\\\ArticleImport\\:\\:importDocument\\(\\) has parameter \\$parsedData with no value type specified in iterable type array\\.$#" - count: 1 - path: Import/ArticleImport.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Import\\\\ArticleImport\\:\\:importExtension\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: Import/ArticleImport.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Import\\\\ArticleImport\\:\\:importExtension\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Import/ArticleImport.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Import\\\\ArticleImport\\:\\:importExtension\\(\\) should return array but returns mixed\\.$#" - count: 1 - path: Import/ArticleImport.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Import\\\\ArticleImport\\:\\:setDocumentData\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: Import/ArticleImport.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Import\\\\ArticleImport\\:\\:setDocumentSettings\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: Import/ArticleImport.php - - - - message: "#^Parameter \\#1 \\$datetime of class DateTime constructor expects string, mixed given\\.$#" - count: 1 - path: Import/ArticleImport.php - - - - message: "#^Parameter \\#1 \\$json of function json_decode expects string, mixed given\\.$#" - count: 1 - path: Import/ArticleImport.php - - - - message: "#^Parameter \\#1 \\$key of method Sulu\\\\Component\\\\Content\\\\Compat\\\\StructureManagerInterface\\:\\:getStructure\\(\\) expects string, string\\|null given\\.$#" - count: 1 - path: Import/ArticleImport.php - - - - message: "#^Parameter \\#1 \\$key of method Sulu\\\\Component\\\\Content\\\\Extension\\\\ExtensionManagerInterface\\:\\:getExtensions\\(\\) expects string, string\\|null given\\.$#" - count: 1 - path: Import/ArticleImport.php - - - - message: "#^Parameter \\#2 \\$webspaceKey of method Sulu\\\\Component\\\\Content\\\\Extension\\\\ExtensionInterface\\:\\:load\\(\\) expects string, null given\\.$#" - count: 1 - path: Import/ArticleImport.php - - - - message: "#^Parameter \\#3 \\$webspaceKey of method Sulu\\\\Component\\\\Content\\\\Extension\\\\ExportExtensionInterface\\:\\:import\\(\\) expects string, null given\\.$#" - count: 1 - path: Import/ArticleImport.php - - - - message: "#^Parameter \\#5 \\$webspaceKey of method Sulu\\\\Component\\\\Import\\\\Import\\:\\:importProperty\\(\\) expects string, null given\\.$#" - count: 1 - path: Import/ArticleImport.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Import\\\\ArticleImport\\:\\:\\$excludedSettings type has no value type specified in iterable type array\\.$#" - count: 1 - path: Import/ArticleImport.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Import\\\\ImportResult\\:\\:__construct\\(\\) has parameter \\$exceptionStore with no value type specified in iterable type array\\.$#" - count: 1 - path: Import/ImportResult.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Import\\\\ImportResult\\:\\:__construct\\(\\) has parameter \\$failed with no value type specified in iterable type array\\.$#" - count: 1 - path: Import/ImportResult.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Import\\\\ImportResult\\:\\:getExceptionStore\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Import/ImportResult.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Import\\\\ImportResult\\:\\:getFailed\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Import/ImportResult.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Import\\\\ImportResult\\:\\:\\$failed type has no value type specified in iterable type array\\.$#" - count: 1 - path: Import/ImportResult.php - - - - message: "#^Parameter \\#1 \\$filters of method Sulu\\\\Component\\\\SmartContent\\\\DataProviderInterface\\:\\:resolveResourceItems\\(\\) expects array\\{dataSource\\?\\: int\\|string\\|null, sortMethod\\?\\: 'asc'\\|'desc', sortBy\\?\\: string, tags\\?\\: array\\, tagOperator\\?\\: 'and'\\|'or', types\\?\\: array\\, categories\\?\\: array\\, categoryOperator\\?\\: 'and'\\|'or', \\.\\.\\.\\}, array given\\.$#" - count: 1 - path: Infrastructure/Sulu/Headless/DataProviderResolver/AbstractArticleDataProviderResolver.php - - - - message: "#^Parameter \\#1 \\$filters of method Sulu\\\\Component\\\\SmartContent\\\\DataProviderInterface\\:\\:resolveResourceItems\\(\\) expects array\\{dataSource\\?\\: int\\|string\\|null, sortMethod\\?\\: 'asc'\\|'desc', sortBy\\?\\: string, tags\\?\\: array\\, tagOperator\\?\\: 'and'\\|'or', types\\?\\: array\\, categories\\?\\: array\\, categoryOperator\\?\\: 'and'\\|'or', \\.\\.\\.\\}, array given\\.$#" - count: 1 - path: Infrastructure/SuluHeadlessBundle/DataProviderResolver/AbstractArticleDataProviderResolver.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\ListBuilder\\\\ElasticSearchFieldDescriptorBuilder\\:\\:setSearchability\\(\\) has no return type specified\\.$#" - count: 1 - path: ListBuilder/ElasticSearchFieldDescriptorBuilder.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\ListBuilder\\\\ElasticSearchFieldDescriptorBuilder\\:\\:setSortField\\(\\) has no return type specified\\.$#" - count: 1 - path: ListBuilder/ElasticSearchFieldDescriptorBuilder.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\ListBuilder\\\\ElasticSearchFieldDescriptorBuilder\\:\\:setType\\(\\) has no return type specified\\.$#" - count: 1 - path: ListBuilder/ElasticSearchFieldDescriptorBuilder.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\ListBuilder\\\\ElasticSearchFieldDescriptorBuilder\\:\\:setVisibility\\(\\) has no return type specified\\.$#" - count: 1 - path: ListBuilder/ElasticSearchFieldDescriptorBuilder.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\ListBuilder\\\\ElasticSearchFieldDescriptorBuilder\\:\\:\\$translation \\(string\\) does not accept string\\|null\\.$#" - count: 1 - path: ListBuilder/ElasticSearchFieldDescriptorBuilder.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Markup\\\\ArticleLinkProvider\\:\\:__construct\\(\\) has parameter \\$articleViewClass with no type specified\\.$#" - count: 1 - path: Markup/ArticleLinkProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Markup\\\\ArticleLinkProvider\\:\\:__construct\\(\\) has parameter \\$environment with no type specified\\.$#" - count: 1 - path: Markup/ArticleLinkProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Markup\\\\ArticleLinkProvider\\:\\:__construct\\(\\) has parameter \\$types with no value type specified in iterable type array\\.$#" - count: 1 - path: Markup/ArticleLinkProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Markup\\\\ArticleLinkProvider\\:\\:getViewDocumentIds\\(\\) has parameter \\$uuids with no value type specified in iterable type array\\.$#" - count: 1 - path: Markup/ArticleLinkProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Markup\\\\ArticleLinkProvider\\:\\:getViewDocumentIds\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Markup/ArticleLinkProvider.php - - - - message: "#^Parameter \\#3 \\$url of class Sulu\\\\Bundle\\\\MarkupBundle\\\\Markup\\\\Link\\\\LinkItem constructor expects string, string\\|null given\\.$#" - count: 1 - path: Markup/ArticleLinkProvider.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Markup\\\\ArticleLinkProvider\\:\\:\\$types is never read, only written\\.$#" - count: 1 - path: Markup/ArticleLinkProvider.php - - - - message: "#^Property Sulu\\\\Bundle\\\\ArticleBundle\\\\Markup\\\\ArticleLinkProvider\\:\\:\\$types type has no value type specified in iterable type array\\.$#" - count: 1 - path: Markup/ArticleLinkProvider.php - - - - message: "#^Cannot access offset 'object' on mixed\\.$#" - count: 1 - path: Preview/ArticleObjectProvider.php - - - - message: "#^Cannot access offset 'pageNumber' on mixed\\.$#" - count: 1 - path: Preview/ArticleObjectProvider.php - - - - message: "#^Cannot call method getChildren\\(\\) on mixed\\.$#" - count: 2 - path: Preview/ArticleObjectProvider.php - - - - message: "#^Instanceof between Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument and Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageDocument will always evaluate to false\\.$#" - count: 1 - path: Preview/ArticleObjectProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Preview\\\\ArticleObjectProvider\\:\\:deserialize\\(\\) has no return type specified\\.$#" - count: 1 - path: Preview/ArticleObjectProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Preview\\\\ArticleObjectProvider\\:\\:getArticleType\\(\\) should return string\\|null but returns mixed\\.$#" - count: 1 - path: Preview/ArticleObjectProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Preview\\\\ArticleObjectProvider\\:\\:getObject\\(\\) has no return type specified\\.$#" - count: 1 - path: Preview/ArticleObjectProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Preview\\\\ArticleObjectProvider\\:\\:serialize\\(\\) should return string but returns string\\|false\\.$#" - count: 1 - path: Preview/ArticleObjectProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Preview\\\\ArticleObjectProvider\\:\\:setContext\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" - count: 1 - path: Preview/ArticleObjectProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Preview\\\\ArticleObjectProvider\\:\\:setValues\\(\\) has no return type specified\\.$#" - count: 1 - path: Preview/ArticleObjectProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Preview\\\\ArticleObjectProvider\\:\\:setValues\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: Preview/ArticleObjectProvider.php - - - - message: "#^Parameter \\#1 \\$data of method JMS\\\\Serializer\\\\SerializerInterface\\:\\:deserialize\\(\\) expects string, mixed given\\.$#" - count: 1 - path: Preview/ArticleObjectProvider.php - - - - message: "#^Parameter \\#1 \\$json of function json_decode expects string, Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument given\\.$#" - count: 1 - path: Preview/ArticleObjectProvider.php - - - - message: "#^Parameter \\#1 \\$serializedObject \\(Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\) of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Preview\\\\ArticleObjectProvider\\:\\:deserialize\\(\\) should be compatible with parameter \\$serializedObject \\(string\\) of method Sulu\\\\Bundle\\\\PreviewBundle\\\\Preview\\\\Object\\\\PreviewObjectProviderInterface\\:\\:deserialize\\(\\)$#" - count: 1 - path: Preview/ArticleObjectProvider.php - - - - message: "#^Call to an undefined method object\\:\\:getPages\\(\\)\\.$#" - count: 1 - path: Resolver/ArticleContentResolver.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Resolver\\\\ArticleContentResolver\\:\\:getArticleForPage\\(\\) should return Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument but returns Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageDocument\\.$#" - count: 1 - path: Resolver/ArticleContentResolver.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Resolver\\\\ArticleContentResolver\\:\\:resolveContent\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Resolver/ArticleContentResolver.php - - - - message: "#^Parameter \\#1 \\$article of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Resolver\\\\ArticleContentResolver\\:\\:getArticleForPage\\(\\) expects Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument, object given\\.$#" - count: 1 - path: Resolver/ArticleContentResolver.php - - - - message: "#^Parameter \\#1 \\$key of method Sulu\\\\Component\\\\Content\\\\Compat\\\\StructureManagerInterface\\:\\:getStructure\\(\\) expects string, string\\|null given\\.$#" - count: 1 - path: Resolver/ArticleContentResolver.php - - - - message: "#^Strict comparison using \\=\\=\\= between null and Sulu\\\\Component\\\\DocumentManager\\\\Collection\\\\ChildrenCollection will always evaluate to false\\.$#" - count: 1 - path: Resolver/ArticleContentResolver.php - - - - message: "#^Parameter \\#1 \\$str of function strtr expects string, mixed given\\.$#" - count: 1 - path: Routing/ArticlePageRouteGenerator.php - - - - message: "#^Parameter \\#2 \\$subject of function preg_match_all expects string, mixed given\\.$#" - count: 1 - path: Routing/ArticlePageRouteGenerator.php - - - - message: "#^Call to an undefined method object\\:\\:getPageNumber\\(\\)\\.$#" - count: 1 - path: Routing/ArticleRouteDefaultProvider.php - - - - message: "#^Call to an undefined method object\\:\\:getStructureType\\(\\)\\.$#" - count: 1 - path: Routing/ArticleRouteDefaultProvider.php - - - - message: "#^Cannot call method getController\\(\\) on Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata\\|null\\.$#" - count: 1 - path: Routing/ArticleRouteDefaultProvider.php - - - - message: "#^Cannot call method getView\\(\\) on Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata\\|null\\.$#" - count: 1 - path: Routing/ArticleRouteDefaultProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Routing\\\\ArticleRouteDefaultProvider\\:\\:getByEntity\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Routing/ArticleRouteDefaultProvider.php - - - - message: "#^Negated boolean expression is always false\\.$#" - count: 1 - path: Routing/ArticleRouteDefaultProvider.php - - - - message: "#^Parameter \\#1 \\$document of method Sulu\\\\Component\\\\Content\\\\Compat\\\\Structure\\\\StructureBridge\\:\\:setDocument\\(\\) expects Sulu\\\\Component\\\\Content\\\\Document\\\\Behavior\\\\StructureBehavior, object given\\.$#" - count: 1 - path: Routing/ArticleRouteDefaultProvider.php - - - - message: "#^Parameter \\#1 \\$metadata of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Routing\\\\ArticleRouteDefaultProvider\\:\\:getCacheLifetime\\(\\) expects Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata, Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata\\|null given\\.$#" - count: 1 - path: Routing/ArticleRouteDefaultProvider.php - - - - message: "#^Parameter \\#2 \\$haystack of function in_array expects array, array\\\\|null given\\.$#" - count: 1 - path: Routing/ArticleRouteDefaultProvider.php - - - - message: "#^Parameter \\#2 \\$structure of method Sulu\\\\Component\\\\Content\\\\Compat\\\\StructureManagerInterface\\:\\:wrapStructure\\(\\) expects Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata, Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata\\|null given\\.$#" - count: 1 - path: Routing/ArticleRouteDefaultProvider.php - - - - message: "#^Cannot call method getAttribute\\(\\) on mixed\\.$#" - count: 1 - path: Routing/ArticleRouteEnhancer.php - - - - message: "#^Cannot call method getLocale\\(\\) on mixed\\.$#" - count: 1 - path: Routing/ArticleRouteEnhancer.php - - - - message: "#^Cannot call method getRoutePath\\(\\) on mixed\\.$#" - count: 1 - path: Routing/ArticleRouteEnhancer.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Routing\\\\ArticleRouteEnhancer\\:\\:shouldAddCanonicalTag\\(\\) has parameter \\$defaults with no value type specified in iterable type array\\.$#" - count: 1 - path: Routing/ArticleRouteEnhancer.php - - - - message: "#^Negated boolean expression is always false\\.$#" - count: 1 - path: Routing/ArticleRouteEnhancer.php - - - - message: "#^Parameter \\#1 \\$document of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Resolver\\\\WebspaceResolver\\:\\:resolveMainWebspace\\(\\) expects Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Behavior\\\\WebspaceBehavior, mixed given\\.$#" - count: 1 - path: Routing/ArticleRouteEnhancer.php - - - - message: "#^Parameter \\#1 \\$key of function array_key_exists expects int\\|string, string\\|null given\\.$#" - count: 1 - path: Routing/ArticleRouteGeneratorByTemplate.php - - - - message: "#^Parameter \\#1 \\$requested of class Sulu\\\\Bundle\\\\ArticleBundle\\\\Exception\\\\RouteSchemaNotFoundException constructor expects string, string\\|null given\\.$#" - count: 1 - path: Routing/ArticleRouteGeneratorByTemplate.php - - - - message: "#^Parameter \\#1 \\$key of function array_key_exists expects int\\|string, mixed given\\.$#" - count: 1 - path: Routing/ArticleRouteGeneratorByType.php - - - - message: "#^Parameter \\#1 \\$metadata of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Routing\\\\ArticleRouteGeneratorByType\\:\\:getType\\(\\) expects Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata, Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata\\|null given\\.$#" - count: 1 - path: Routing/ArticleRouteGeneratorByType.php - - - - message: "#^Parameter \\#1 \\$requested of class Sulu\\\\Bundle\\\\ArticleBundle\\\\Exception\\\\RouteSchemaNotFoundException constructor expects string, mixed given\\.$#" - count: 1 - path: Routing/ArticleRouteGeneratorByType.php - - - - message: "#^Parameter \\#1 \\$url of method Massive\\\\Bundle\\\\SearchBundle\\\\Search\\\\Document\\:\\:setUrl\\(\\) expects string, string\\|null given\\.$#" - count: 1 - path: Search/ArticleSearchSubscriber.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Sitemap\\\\ArticleSitemapProvider\\:\\:findUrl\\(\\) should return string but returns string\\|null\\.$#" - count: 1 - path: Sitemap/ArticleSitemapProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Sitemap\\\\ArticleSitemapProvider\\:\\:getBulk\\(\\) has parameter \\$webspaceKeys with no value type specified in iterable type array\\.$#" - count: 1 - path: Sitemap/ArticleSitemapProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Sitemap\\\\ArticleSitemapProvider\\:\\:getMaxPage\\(\\) should return int but returns float\\.$#" - count: 1 - path: Sitemap/ArticleSitemapProvider.php - - - - message: "#^Parameter \\#1 \\$sitemapUrlList of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Sitemap\\\\ArticleSitemapProvider\\:\\:setAlternatives\\(\\) expects array\\, array\\\\|Sulu\\\\Bundle\\\\WebsiteBundle\\\\Sitemap\\\\SitemapUrl given\\.$#" - count: 1 - path: Sitemap/ArticleSitemapProvider.php - - - - message: "#^Parameter \\#2 \\.\\.\\.\\$arrays of function array_merge expects array, array\\\\|null given\\.$#" - count: 1 - path: Sitemap/ArticleSitemapProvider.php - - - - message: "#^Cannot call method getExcerpt\\(\\) on mixed\\.$#" - count: 1 - path: Teaser/ArticleTeaserProvider.php - - - - message: "#^Cannot call method getLocale\\(\\) on mixed\\.$#" - count: 1 - path: Teaser/ArticleTeaserProvider.php - - - - message: "#^Cannot call method getRoutePath\\(\\) on mixed\\.$#" - count: 1 - path: Teaser/ArticleTeaserProvider.php - - - - message: "#^Cannot call method getTeaserDescription\\(\\) on mixed\\.$#" - count: 1 - path: Teaser/ArticleTeaserProvider.php - - - - message: "#^Cannot call method getTeaserMediaId\\(\\) on mixed\\.$#" - count: 1 - path: Teaser/ArticleTeaserProvider.php - - - - message: "#^Cannot call method getTitle\\(\\) on mixed\\.$#" - count: 1 - path: Teaser/ArticleTeaserProvider.php - - - - message: "#^Cannot call method getUuid\\(\\) on mixed\\.$#" - count: 1 - path: Teaser/ArticleTeaserProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Teaser\\\\ArticleTeaserProvider\\:\\:find\\(\\) has parameter \\$ids with no value type specified in iterable type array\\.$#" - count: 1 - path: Teaser/ArticleTeaserProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Teaser\\\\ArticleTeaserProvider\\:\\:getAttributes\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Teaser/ArticleTeaserProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Teaser\\\\ArticleTeaserProvider\\:\\:getViewDocumentIds\\(\\) has parameter \\$uuids with no value type specified in iterable type array\\.$#" - count: 1 - path: Teaser/ArticleTeaserProvider.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Teaser\\\\ArticleTeaserProvider\\:\\:getViewDocumentIds\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: Teaser/ArticleTeaserProvider.php - - - - message: "#^Parameter \\#1 \\$viewDocument of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Teaser\\\\ArticleTeaserProvider\\:\\:getAttributes\\(\\) expects Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleViewDocument, mixed given\\.$#" - count: 1 - path: Teaser/ArticleTeaserProvider.php - - - - message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: Trash/ArticleTrashItemHandler.php - - - - message: "#^Call to an undefined method object\\:\\:getUuid\\(\\)\\.$#" - count: 1 - path: Trash/ArticleTrashItemHandler.php - - - - message: "#^Cannot access offset 'shadowLocaleEnabled' on mixed\\.$#" - count: 1 - path: Trash/ArticleTrashItemHandler.php - - - - message: "#^Parameter \\#1 \\$data of method Sulu\\\\Component\\\\Content\\\\Document\\\\Structure\\\\StructureInterface\\:\\:bind\\(\\) expects array, mixed given\\.$#" - count: 1 - path: Trash/ArticleTrashItemHandler.php - - - - message: "#^Parameter \\#1 \\$extensions of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:setExtensionsData\\(\\) expects array\\\\|Sulu\\\\Component\\\\Content\\\\Document\\\\Extension\\\\ExtensionContainer, mixed given\\.$#" - count: 1 - path: Trash/ArticleTrashItemHandler.php - - - - message: "#^Parameter \\#2 \\$locale of class Sulu\\\\Bundle\\\\ArticleBundle\\\\Domain\\\\Event\\\\ArticleTranslationRestoredEvent constructor expects string, mixed given\\.$#" - count: 1 - path: Trash/ArticleTrashItemHandler.php - - - - message: "#^Cannot call method get\\(\\) on Symfony\\\\Component\\\\HttpFoundation\\\\Request\\|null\\.$#" - count: 1 - path: Twig/ArticleViewDocumentTwigExtension.php - - - - message: "#^Cannot call method getAttribute\\(\\) on mixed\\.$#" - count: 1 - path: Twig/ArticleViewDocumentTwigExtension.php - - - - message: "#^Cannot call method getLocale\\(\\) on Symfony\\\\Component\\\\HttpFoundation\\\\Request\\|null\\.$#" - count: 1 - path: Twig/ArticleViewDocumentTwigExtension.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Twig\\\\ArticleViewDocumentTwigExtension\\:\\:getArticleType\\(\\) should return string but returns mixed\\.$#" - count: 1 - path: Twig/ArticleViewDocumentTwigExtension.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Twig\\\\ArticleViewDocumentTwigExtension\\:\\:loadRecent\\(\\) has parameter \\$types with no value type specified in iterable type array\\.$#" - count: 1 - path: Twig/ArticleViewDocumentTwigExtension.php - - - - message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Twig\\\\ArticleViewDocumentTwigExtension\\:\\:loadSimilar\\(\\) has parameter \\$types with no value type specified in iterable type array\\.$#" - count: 1 - path: Twig/ArticleViewDocumentTwigExtension.php - - - - message: "#^Negated boolean expression is always false\\.$#" - count: 1 - path: Twig/ArticleViewDocumentTwigExtension.php - - - - message: "#^Parameter \\#1 \\$metadata of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Twig\\\\ArticleViewDocumentTwigExtension\\:\\:getType\\(\\) expects Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata, Sulu\\\\Component\\\\Content\\\\Metadata\\\\StructureMetadata\\|null given\\.$#" - count: 1 - path: Twig/ArticleViewDocumentTwigExtension.php - - - - message: "#^Parameter \\#1 \\$request of method Sulu\\\\Bundle\\\\ArticleBundle\\\\Twig\\\\ArticleViewDocumentTwigExtension\\:\\:getWebspaceKey\\(\\) expects Symfony\\\\Component\\\\HttpFoundation\\\\Request, Symfony\\\\Component\\\\HttpFoundation\\\\Request\\|null given\\.$#" - count: 1 - path: Twig/ArticleViewDocumentTwigExtension.php From e80a32b9dcd64aea847a0b39a7dbb3e22a9c1d75 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 14:37:57 +0200 Subject: [PATCH 10/37] Fix some more phpstan issues --- .github/workflows/test-application.yaml | 9 +-------- phpstan.neon | 7 ++----- src/Domain/Model/ArticleDimensionContent.php | 4 +++- .../Doctrine/Repository/ArticleRepository.php | 4 ++-- .../Sulu/Content/ArticleSelectionContentType.php | 2 +- .../Sulu/Content/ArticleSitemapProvider.php | 5 +++++ .../Sulu/Content/SingleArticleSelectionContentType.php | 4 +++- tests/Application/Kernel.php | 2 +- tests/phpstan/console-application.php | 2 +- tests/phpstan/object-manager.php | 2 +- 10 files changed, 20 insertions(+), 21 deletions(-) diff --git a/.github/workflows/test-application.yaml b/.github/workflows/test-application.yaml index 1b974c411..ee2eceecc 100644 --- a/.github/workflows/test-application.yaml +++ b/.github/workflows/test-application.yaml @@ -21,15 +21,8 @@ jobs: fail-fast: false matrix: include: - - php-version: '8.0' - dependency-versions: 'lowest' - php-extensions: 'ctype, iconv, mysql, imagick' - tools: 'composer:v2' - env: - SYMFONY_DEPRECATIONS_HELPER: weak - - php-version: '8.1' - dependency-versions: 'highest' + dependency-versions: 'lowest' php-extensions: 'ctype, iconv, mysql, imagick' tools: 'composer:v2' env: diff --git a/phpstan.neon b/phpstan.neon index 80a51e30c..6dc828529 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,4 @@ includes: - - phpstan-baseline.neon - vendor/jangregor/phpstan-prophecy/extension.neon - vendor/phpstan/phpstan-symfony/extension.neon - vendor/phpstan/phpstan-doctrine/extension.neon @@ -13,12 +12,10 @@ parameters: - . level: max excludePaths: - - %currentWorkingDirectory%/DependencyInjection/Configuration.php - %currentWorkingDirectory%/vendor/* - - %currentWorkingDirectory%/Tests/* - - %currentWorkingDirectory%/Resources/phpcr-migrations/* + - %currentWorkingDirectory%/tests/* symfony: - container_xml_path: %currentWorkingDirectory%/Tests/Application/var/cache/admin/dev/phpcr_storage/Sulu_Bundle_ArticleBundle_Tests_Application_KernelDevDebugContainer.xml + container_xml_path: %currentWorkingDirectory%/tests/Application/var/cache/admin/dev/default/Sulu_Article_Tests_Application_KernelDevDebugContainer.xml console_application_loader: Tests/phpstan/console-application.php doctrine: objectManagerLoader: Tests/phpstan/object-manager.php diff --git a/src/Domain/Model/ArticleDimensionContent.php b/src/Domain/Model/ArticleDimensionContent.php index d2c1288be..65c0edd73 100644 --- a/src/Domain/Model/ArticleDimensionContent.php +++ b/src/Domain/Model/ArticleDimensionContent.php @@ -77,7 +77,9 @@ public function getTitle(): ?string public function setTemplateData(array $templateData): void { - if (\array_key_exists('title', $templateData)) { + if (\array_key_exists('title', $templateData) + && \is_string($templateData['title']) + ) { $this->title = $templateData['title']; } diff --git a/src/Infrastructure/Doctrine/Repository/ArticleRepository.php b/src/Infrastructure/Doctrine/Repository/ArticleRepository.php index 3712b5d5d..9006b3451 100644 --- a/src/Infrastructure/Doctrine/Repository/ArticleRepository.php +++ b/src/Infrastructure/Doctrine/Repository/ArticleRepository.php @@ -132,7 +132,7 @@ public function countBy(array $filters = []): int $queryBuilder->select('COUNT(DISTINCT article.uuid)'); - return (int) $queryBuilder->getQuery()->getSingleScalarResult(); // @phpstan-ignore-line + return (int) $queryBuilder->getQuery()->getSingleScalarResult(); } /** @@ -162,7 +162,7 @@ public function findIdentifiersBy(array $filters = [], array $sortBy = []): iter $queryBuilder->addSelect(\explode(' ', $orderBy->getParts()[0])[0]); } - /** @var iterable $identifiers */ + /** @var iterable $identifiers */ $identifiers = $queryBuilder->getQuery()->getResult(); return $identifiers; diff --git a/src/Infrastructure/Sulu/Content/ArticleSelectionContentType.php b/src/Infrastructure/Sulu/Content/ArticleSelectionContentType.php index e0eff4235..0e088d48d 100644 --- a/src/Infrastructure/Sulu/Content/ArticleSelectionContentType.php +++ b/src/Infrastructure/Sulu/Content/ArticleSelectionContentType.php @@ -68,7 +68,7 @@ public function getContentData(PropertyInterface $property) return \array_values($result); } - public function preResolve(PropertyInterface $property) + public function preResolve(PropertyInterface $property): void { $uuids = $property->getValue(); if (!\is_array($uuids)) { diff --git a/src/Infrastructure/Sulu/Content/ArticleSitemapProvider.php b/src/Infrastructure/Sulu/Content/ArticleSitemapProvider.php index 23d923101..485fb4e79 100644 --- a/src/Infrastructure/Sulu/Content/ArticleSitemapProvider.php +++ b/src/Infrastructure/Sulu/Content/ArticleSitemapProvider.php @@ -12,9 +12,14 @@ namespace Sulu\Article\Infrastructure\Sulu\Content; use Doctrine\ORM\EntityManagerInterface; +use Sulu\Article\Domain\Model\ArticleDimensionContentInterface; +use Sulu\Article\Domain\Model\ArticleInterface; use Sulu\Bundle\ContentBundle\Content\Infrastructure\Sulu\Sitemap\ContentSitemapProvider; use Sulu\Component\Webspace\Manager\WebspaceManagerInterface; +/** + * @extends ContentSitemapProvider + */ class ArticleSitemapProvider extends ContentSitemapProvider { public function __construct(EntityManagerInterface $entityManager, WebspaceManagerInterface $webspaceManager, string $kernelEnvironment, string $contentRichEntityClass, string $routeClass, string $alias) diff --git a/src/Infrastructure/Sulu/Content/SingleArticleSelectionContentType.php b/src/Infrastructure/Sulu/Content/SingleArticleSelectionContentType.php index 772958971..341d9f6f8 100644 --- a/src/Infrastructure/Sulu/Content/SingleArticleSelectionContentType.php +++ b/src/Infrastructure/Sulu/Content/SingleArticleSelectionContentType.php @@ -27,6 +27,8 @@ class SingleArticleSelectionContentType extends SimpleContentType implements Pre private ContentManagerInterface $contentManager; + private ReferenceStoreInterface $referenceStore; + public function __construct( ArticleRepositoryInterface $articleRepository, ContentManagerInterface $contentManager, @@ -67,7 +69,7 @@ public function getContentData(PropertyInterface $property) return $this->contentManager->normalize($dimensionContent); } - public function preResolve(PropertyInterface $property) + public function preResolve(PropertyInterface $property): void { $uuid = $property->getValue(); if (null === $uuid) { diff --git a/tests/Application/Kernel.php b/tests/Application/Kernel.php index 1342223f8..fad2e2b22 100644 --- a/tests/Application/Kernel.php +++ b/tests/Application/Kernel.php @@ -28,7 +28,7 @@ class Kernel extends SuluTestKernel /** * @var string|null */ - private $config = 'phpcr_storage'; + private $config = 'default'; public function __construct(string $environment, bool $debug, string $suluContext = SuluKernel::CONTEXT_ADMIN) { diff --git a/tests/phpstan/console-application.php b/tests/phpstan/console-application.php index e64a0065c..5e6facbb2 100644 --- a/tests/phpstan/console-application.php +++ b/tests/phpstan/console-application.php @@ -11,7 +11,7 @@ * with this source code in the file LICENSE. */ -use Sulu\Bundle\ArticleBundle\Tests\Application\Kernel; +use Sulu\Bundle\AdminBundle\Tests\Application\Kernel; use Symfony\Bundle\FrameworkBundle\Console\Application; require \dirname(__DIR__) . '/Application/config/bootstrap.php'; diff --git a/tests/phpstan/object-manager.php b/tests/phpstan/object-manager.php index 144225faa..f50f46dd1 100644 --- a/tests/phpstan/object-manager.php +++ b/tests/phpstan/object-manager.php @@ -11,7 +11,7 @@ * with this source code in the file LICENSE. */ -use Sulu\Bundle\ArticleBundle\Tests\Application\Kernel; +use Sulu\Bundle\AdminBundle\Tests\Application\Kernel; use Symfony\Component\DependencyInjection\ContainerInterface; require \dirname(__DIR__) . '/Application/config/bootstrap.php'; From 76dd1a63159c5f4f4aad02d002e65de67f9a6d72 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 14:38:17 +0200 Subject: [PATCH 11/37] Drop support for 8.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a6e288358..c2cf1f1ba 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ } ], "require": { - "php": "^8.0", + "php": "^8.1", "ext-json": "*", "doctrine/collections": "^1.0", "doctrine/orm": "^2.5.3", From ce8d8fc256218e4e0e2706eb6deedcaab3910058 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 14:42:05 +0200 Subject: [PATCH 12/37] Readd circle ci to keep CI green --- .circleci/config.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..04056f2bb --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,8 @@ +version: 2 + +jobs: + build: + docker: + - image: circleci/php:8.1-node-browsers + steps: + - run: echo "Circle CI is not longer used on 3.0 can be removed when support for 2.x is removed" From 6c28bab4056de88014f6f2379aed3e6ba5f27b4c Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 14:49:13 +0200 Subject: [PATCH 13/37] Drop support for Sulu 2.5 --- .github/workflows/test-application.yaml | 2 +- composer.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-application.yaml b/.github/workflows/test-application.yaml index ee2eceecc..21fa9c6c8 100644 --- a/.github/workflows/test-application.yaml +++ b/.github/workflows/test-application.yaml @@ -21,7 +21,7 @@ jobs: fail-fast: false matrix: include: - - php-version: '8.1' + - php-version: '8.2' dependency-versions: 'lowest' php-extensions: 'ctype, iconv, mysql, imagick' tools: 'composer:v2' diff --git a/composer.json b/composer.json index c2cf1f1ba..bbdc059c7 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ } ], "require": { - "php": "^8.1", + "php": "^8.2", "ext-json": "*", "doctrine/collections": "^1.0", "doctrine/orm": "^2.5.3", @@ -27,7 +27,7 @@ "jms/serializer": "^3.3", "jms/serializer-bundle": "^3.3 || ^4.0 || ^5.0", "ramsey/uuid": "^3.1 || ^4.0", - "sulu/sulu": "^2.5.9 || ^2.5.9@dev", + "sulu/sulu": "^2.6.0 || ^2.6.4@dev", "symfony/config": "^6.4 || ^7.0", "symfony/dependency-injection": "^6.4 || ^7.0", "symfony/http-foundation": "^6.4 || ^7.0", From b82f845b86295c0ed9a28b64625fe4e4bdd95369 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 14:50:57 +0200 Subject: [PATCH 14/37] Update gitignore --- .gitignore | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index b2e6b5b8e..dd32acca4 100644 --- a/.gitignore +++ b/.gitignore @@ -28,14 +28,8 @@ php-cs-fixer .DS_Store # Frontend Caches -bower_components/ -.tmp/ -.sass-cache/ node_modules/ npm-debug.log # tests -.env.*.local -/Tests/Application/config/parameters.yml -/Tests/Application/var -/Tests/Functional/Import/export.test.xliff +/tests/Application/var From 4e93810289e0345ef5d03d2d9fefb713ffa8c36f Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 14:54:23 +0200 Subject: [PATCH 15/37] Test Circle Ci --- .circleci/config.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 04056f2bb..366852b4b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,6 +3,13 @@ version: 2 jobs: build: docker: - - image: circleci/php:8.1-node-browsers + - image: circleci/php:7.3-node-browsers steps: + - checkout + - run: + name: Install OS dependencies (mysql, gd) + command: | + sudo apt-get install -y libpng-dev + sudo docker-php-ext-install pdo_mysql gd + parallel: true - run: echo "Circle CI is not longer used on 3.0 can be removed when support for 2.x is removed" From 59343ad344b557175e8b1603ffaa61755f2b07dc Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 14:56:51 +0200 Subject: [PATCH 16/37] Update PHPUnit --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index bbdc059c7..8007a027b 100644 --- a/composer.json +++ b/composer.json @@ -49,7 +49,7 @@ "phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-symfony": "^1.0", "phpstan/phpstan-webmozart-assert": "^1.0", - "phpunit/phpunit": "^8.2", + "phpunit/phpunit": "^9.6.5 || ^10.5.29", "sulu/automation-bundle": "^2.0 || ^2.1@dev", "sulu/content-bundle": "^0.7 || ^0.8@dev", "sulu/headless-bundle": "^0.8 || ^0.9 || ^0.10@dev", From b755a9ff450103ece9cfbd8b9009d602a10ee6cd Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 15:01:37 +0200 Subject: [PATCH 17/37] Update readme file --- README.md | 15 +----------- docs/README.md | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 14 deletions(-) create mode 100644 docs/README.md diff --git a/README.md b/README.md index 0e8f474e7..89ecd3e92 100644 --- a/README.md +++ b/README.md @@ -49,11 +49,10 @@ Execute the following [composer](https://getcomposer.org/) commands to add the b project: ```bash -composer require "elasticsearch/elasticsearch:7.9.*" # should match version of your elasticsearch installation composer require sulu/article-bundle ``` -Afterwards, visit the [bundle documentation](Resources/doc) to +Afterwards, visit the [bundle documentation](docs) to find out **how to set up and configure the SuluArticleBundle** to your specific needs. @@ -67,18 +66,6 @@ In contrast to Sulu pages, articles are **managed in a flat list** instead of a the Sulu page tree, the article bundle is **optimized for managing a big number of articles**. -### Elasticsearch dependency - -The SuluArticleBundle was originally developed to be used in the publishing industry. To satisfy the initial -requirements regarding performance and scalability, a **view layer stored in an Elasticsearch index** was utilized. -Because of this, there is **no way to use the bundle without Elasticsearch** at the moment. It is planned to -remove this hard dependency in the next major version. - -If you cannot or do not want to make Elasticsearch a dependency of your project, you can **use Sulu pages for -certain use cases** instead of the SuluArticleBundle. However, be aware that the article list provides a better -performance and is more comfortable to use with a large number of entities. - - ## ❤️  Support and Contributions The Sulu content management system is a **community-driven open source project** backed by various partner companies. diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 000000000..a10ede1bd --- /dev/null +++ b/docs/README.md @@ -0,0 +1,64 @@ +# Getting Started + +## Installation + +The recommended way to install this bundle is through [Composer](https://getcomposer.org/). + +```bash +composer require sulu/article-bundle +``` + +## Create your first template + +Go to your `config/templates/articles` directory a new file `article.xml` with the following content: + +
+article.xml + +```xml + + + +``` + +
From 51f49f1945f791c7ebca3bb927210907d07ce5e0 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 15:11:56 +0200 Subject: [PATCH 18/37] Fix code style --- .php-cs-fixer.dist.php | 9 +++++++-- composer.json | 13 ++++++------- tests/Application/Kernel.php | 2 -- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index e0268a33c..74e140eaa 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -10,8 +10,13 @@ EOF; $finder = PhpCsFixer\Finder::create() - ->exclude(['Tests/Application/var/cache']) - ->in(__DIR__); + ->in([ + __DIR__ . '/src', + __DIR__ . '/tests', + ]) + ->exclude([ + 'Application/var/', + ]); $config = new PhpCsFixer\Config(); $config->setRiskyAllowed(true) diff --git a/composer.json b/composer.json index 8007a027b..5cd795465 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,6 @@ }, "require-dev": { "coduo/php-matcher": "^6.0", - "friendsofphp/php-cs-fixer": "^3.0", "handcraftedinthealps/zendsearch": "^2.0", "jackalope/jackalope-doctrine-dbal": "^1.0 || ^2.0", "jangregor/phpstan-prophecy": "^1.0", @@ -63,10 +62,10 @@ }, "conflict": { "doctrine/doctrine-bundle": "2.3.0", - "sulu/automation-bundle": "<2.0, >=3.0", - "sulu/content-bundle": "<0.7, >=0.9", - "sulu/headless-bundle": "<0.8, >=0.11", - "sulu/messenger": "<0.1, >=0.3" + "sulu/automation-bundle": "<2.0 || >=3.0", + "sulu/content-bundle": "<0.7 || >=0.9", + "sulu/headless-bundle": "<0.8 || >=0.11", + "sulu/messenger": "<0.1 || >=0.3" }, "suggest": { "sulu/automation-bundle": "Allows publish automation and outsource long-running route update processes." @@ -108,8 +107,8 @@ "php-cs": "@php vendor/bin/php-cs-fixer fix --verbose --diff --dry-run", "php-cs-fix": "@php vendor/bin/php-cs-fixer fix", "lint-composer": "@composer validate --strict", - "lint-twig": "@php tests/Application/bin/adminconsole lint:twig Resources/doc", - "lint-yaml": "@php tests/Application/bin/adminconsole lint:yaml Resources/config tests/Application/config", + "lint-twig": "@php tests/Application/bin/adminconsole lint:twig tests/Application/templates", + "lint-yaml": "@php tests/Application/bin/adminconsole lint:yaml config tests/Application/config", "lint-container": [ "@php tests/Application/bin/adminconsole lint:container --env dev", "@php tests/Application/bin/websiteconsole lint:container --env dev", diff --git a/tests/Application/Kernel.php b/tests/Application/Kernel.php index fad2e2b22..9f45b2ec3 100644 --- a/tests/Application/Kernel.php +++ b/tests/Application/Kernel.php @@ -17,8 +17,6 @@ use Sulu\Component\HttpKernel\SuluKernel; use Sulu\Messenger\Infrastructure\Symfony\HttpKernel\SuluMessengerBundle; use Symfony\Component\Config\Loader\LoaderInterface; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; /** * AppKernel for functional tests. From 2924f53462ea07bd231286c678a2cc0aba35ee61 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 15:18:16 +0200 Subject: [PATCH 19/37] Move files --- .../Application/templates/views/articles/article.html.twig | 0 {Tests => tests}/Application/templates/views/base.html.twig | 0 {Tests => tests}/Functional/Integration/ArticleControllerTest.php | 0 .../Functional/Integration/responses/article_cget.json | 0 .../Functional/Integration/responses/article_get.json | 0 .../Integration/responses/article_get_ghost_locale.json | 0 .../Functional/Integration/responses/article_post.json | 0 .../Functional/Integration/responses/article_post_publish.json | 0 .../Integration/responses/article_post_trigger_copy_locale.json | 0 .../Integration/responses/article_post_trigger_unpublish.json | 0 .../Functional/Integration/responses/article_put.json | 0 11 files changed, 0 insertions(+), 0 deletions(-) rename {Tests => tests}/Application/templates/views/articles/article.html.twig (100%) rename {Tests => tests}/Application/templates/views/base.html.twig (100%) rename {Tests => tests}/Functional/Integration/ArticleControllerTest.php (100%) rename {Tests => tests}/Functional/Integration/responses/article_cget.json (100%) rename {Tests => tests}/Functional/Integration/responses/article_get.json (100%) rename {Tests => tests}/Functional/Integration/responses/article_get_ghost_locale.json (100%) rename {Tests => tests}/Functional/Integration/responses/article_post.json (100%) rename {Tests => tests}/Functional/Integration/responses/article_post_publish.json (100%) rename {Tests => tests}/Functional/Integration/responses/article_post_trigger_copy_locale.json (100%) rename {Tests => tests}/Functional/Integration/responses/article_post_trigger_unpublish.json (100%) rename {Tests => tests}/Functional/Integration/responses/article_put.json (100%) diff --git a/Tests/Application/templates/views/articles/article.html.twig b/tests/Application/templates/views/articles/article.html.twig similarity index 100% rename from Tests/Application/templates/views/articles/article.html.twig rename to tests/Application/templates/views/articles/article.html.twig diff --git a/Tests/Application/templates/views/base.html.twig b/tests/Application/templates/views/base.html.twig similarity index 100% rename from Tests/Application/templates/views/base.html.twig rename to tests/Application/templates/views/base.html.twig diff --git a/Tests/Functional/Integration/ArticleControllerTest.php b/tests/Functional/Integration/ArticleControllerTest.php similarity index 100% rename from Tests/Functional/Integration/ArticleControllerTest.php rename to tests/Functional/Integration/ArticleControllerTest.php diff --git a/Tests/Functional/Integration/responses/article_cget.json b/tests/Functional/Integration/responses/article_cget.json similarity index 100% rename from Tests/Functional/Integration/responses/article_cget.json rename to tests/Functional/Integration/responses/article_cget.json diff --git a/Tests/Functional/Integration/responses/article_get.json b/tests/Functional/Integration/responses/article_get.json similarity index 100% rename from Tests/Functional/Integration/responses/article_get.json rename to tests/Functional/Integration/responses/article_get.json diff --git a/Tests/Functional/Integration/responses/article_get_ghost_locale.json b/tests/Functional/Integration/responses/article_get_ghost_locale.json similarity index 100% rename from Tests/Functional/Integration/responses/article_get_ghost_locale.json rename to tests/Functional/Integration/responses/article_get_ghost_locale.json diff --git a/Tests/Functional/Integration/responses/article_post.json b/tests/Functional/Integration/responses/article_post.json similarity index 100% rename from Tests/Functional/Integration/responses/article_post.json rename to tests/Functional/Integration/responses/article_post.json diff --git a/Tests/Functional/Integration/responses/article_post_publish.json b/tests/Functional/Integration/responses/article_post_publish.json similarity index 100% rename from Tests/Functional/Integration/responses/article_post_publish.json rename to tests/Functional/Integration/responses/article_post_publish.json diff --git a/Tests/Functional/Integration/responses/article_post_trigger_copy_locale.json b/tests/Functional/Integration/responses/article_post_trigger_copy_locale.json similarity index 100% rename from Tests/Functional/Integration/responses/article_post_trigger_copy_locale.json rename to tests/Functional/Integration/responses/article_post_trigger_copy_locale.json diff --git a/Tests/Functional/Integration/responses/article_post_trigger_unpublish.json b/tests/Functional/Integration/responses/article_post_trigger_unpublish.json similarity index 100% rename from Tests/Functional/Integration/responses/article_post_trigger_unpublish.json rename to tests/Functional/Integration/responses/article_post_trigger_unpublish.json diff --git a/Tests/Functional/Integration/responses/article_put.json b/tests/Functional/Integration/responses/article_put.json similarity index 100% rename from Tests/Functional/Integration/responses/article_put.json rename to tests/Functional/Integration/responses/article_put.json From d036f819ab923b4c34516dbf5268489282b83979 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 15:21:56 +0200 Subject: [PATCH 20/37] Create missing trait --- .../Integration/ArticleControllerTest.php | 2 +- tests/Traits/AssertSnapshotTrait.php | 80 +++++++++++++++++++ 2 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 tests/Traits/AssertSnapshotTrait.php diff --git a/tests/Functional/Integration/ArticleControllerTest.php b/tests/Functional/Integration/ArticleControllerTest.php index 04e004b2e..8630a2a60 100644 --- a/tests/Functional/Integration/ArticleControllerTest.php +++ b/tests/Functional/Integration/ArticleControllerTest.php @@ -13,7 +13,7 @@ namespace Sulu\Article\Tests\Functional\Integration; -use Sulu\Bundle\ContentBundle\Tests\Traits\AssertSnapshotTrait; +use Sulu\Article\Tests\Traits\AssertSnapshotTrait; use Sulu\Bundle\TestBundle\Testing\SuluTestCase; use Symfony\Bundle\FrameworkBundle\KernelBrowser; diff --git a/tests/Traits/AssertSnapshotTrait.php b/tests/Traits/AssertSnapshotTrait.php new file mode 100644 index 000000000..d14d72d58 --- /dev/null +++ b/tests/Traits/AssertSnapshotTrait.php @@ -0,0 +1,80 @@ +assertInstanceOf(Response::class, $actualResponse); + $responseContent = $actualResponse->getContent(); + $this->assertHttpStatusCode($statusCode, $actualResponse); + $this->assertIsString($responseContent); + + $this->assertSnapshot($snapshotPatternFilename, $responseContent, $message); + } + + /** + * @param mixed[] $array + */ + protected function assertArraySnapshot( + string $snapshotPatternFilename, + array $array, + string $message = '' + ): void { + $arrayContent = \json_encode($array); + $this->assertIsString($arrayContent); + + $this->assertSnapshot($snapshotPatternFilename, $arrayContent, $message); + } + + protected function assertSnapshot( + string $snapshotPatternFilename, + string $content, + string $message = '' + ): void { + $snapshotFolder = $this->getCalledClassFolder() . \DIRECTORY_SEPARATOR . $this->getSnapshotFolder(); + $snapshotPattern = \file_get_contents($snapshotFolder . \DIRECTORY_SEPARATOR . $snapshotPatternFilename); + $this->assertIsString($snapshotPattern); + + $this->assertMatchesPattern(\trim($snapshotPattern), \trim($content), $message); + } + + private function getCalledClassFolder(): string + { + $calledClass = static::class; + + /** @var string $fileName */ + $fileName = (new \ReflectionClass($calledClass))->getFileName(); + + return \dirname($fileName); + } + + protected function getSnapshotFolder(): string + { + return 'snapshots'; + } +} From bd99f01dae24829ebc37f0837a6315b69823b319 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 15:23:33 +0200 Subject: [PATCH 21/37] Update PHPUnit config --- .github/workflows/test-application.yaml | 9 --------- phpunit.xml.dist | 11 +++++------ 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test-application.yaml b/.github/workflows/test-application.yaml index 21fa9c6c8..0177da321 100644 --- a/.github/workflows/test-application.yaml +++ b/.github/workflows/test-application.yaml @@ -25,31 +25,22 @@ jobs: dependency-versions: 'lowest' php-extensions: 'ctype, iconv, mysql, imagick' tools: 'composer:v2' - env: - SYMFONY_DEPRECATIONS_HELPER: weak - php-version: '8.2' dependency-versions: 'highest' php-extensions: 'ctype, iconv, mysql, imagick' tools: 'composer:v2' - env: - SYMFONY_DEPRECATIONS_HELPER: weak - php-version: '8.3' dependency-versions: 'highest' php-extensions: 'ctype, iconv, mysql, imagick' tools: 'composer:v2' - env: - SYMFONY_DEPRECATIONS_HELPER: weak - php-version: '8.4' composer-options: '--ignore-platform-reqs' dependency-versions: 'highest' php-extensions: 'ctype, iconv, mysql, imagick' tools: 'composer:v2' - env: - SYMFONY_DEPRECATIONS_HELPER: weak - ELASTICSEARCH_HOST: '127.0.0.1:9200' services: mysql: diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 6084e9610..5016572e4 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -13,11 +13,11 @@
- - - src - - + + + src/ + + @@ -25,6 +25,5 @@ -
From b3dd69c91166b41053b0e4a3ebe9e17a351fc5ff Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 15:25:19 +0200 Subject: [PATCH 22/37] Remove env variables --- .github/workflows/test-application.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test-application.yaml b/.github/workflows/test-application.yaml index 0177da321..abe3961ba 100644 --- a/.github/workflows/test-application.yaml +++ b/.github/workflows/test-application.yaml @@ -76,11 +76,9 @@ jobs: - name: Bootstrap test environment run: composer bootstrap-test-environment - env: ${{ matrix.env }} - name: Execute test cases run: time composer test - env: ${{ matrix.env }} lint: name: "PHP Lint" From e84db16191e5141936c1769178b60e70df1bf2e9 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 15:27:37 +0200 Subject: [PATCH 23/37] Update content bundle --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5cd795465..6f621cce3 100644 --- a/composer.json +++ b/composer.json @@ -50,7 +50,7 @@ "phpstan/phpstan-webmozart-assert": "^1.0", "phpunit/phpunit": "^9.6.5 || ^10.5.29", "sulu/automation-bundle": "^2.0 || ^2.1@dev", - "sulu/content-bundle": "^0.7 || ^0.8@dev", + "sulu/content-bundle": "^0.8.1 || ^0.8.1@dev", "sulu/headless-bundle": "^0.8 || ^0.9 || ^0.10@dev", "sulu/messenger": "^0.1 || ^0.2@dev", "symfony/browser-kit": "^6.4 || ^7.0", From 769dcf208e77484c41c678e3741ab2f712ae9369 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 15:28:03 +0200 Subject: [PATCH 24/37] Update conflict --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6f621cce3..4ecad91e6 100644 --- a/composer.json +++ b/composer.json @@ -63,7 +63,7 @@ "conflict": { "doctrine/doctrine-bundle": "2.3.0", "sulu/automation-bundle": "<2.0 || >=3.0", - "sulu/content-bundle": "<0.7 || >=0.9", + "sulu/content-bundle": "<0.8.1 || >=0.9", "sulu/headless-bundle": "<0.8 || >=0.11", "sulu/messenger": "<0.1 || >=0.3" }, From e2196869bf32982ab67a16c1d4f2aecf91535286 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 15:29:03 +0200 Subject: [PATCH 25/37] Remove unused headless bundle integration --- composer.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/composer.json b/composer.json index 4ecad91e6..e56ccc497 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,6 @@ "phpunit/phpunit": "^9.6.5 || ^10.5.29", "sulu/automation-bundle": "^2.0 || ^2.1@dev", "sulu/content-bundle": "^0.8.1 || ^0.8.1@dev", - "sulu/headless-bundle": "^0.8 || ^0.9 || ^0.10@dev", "sulu/messenger": "^0.1 || ^0.2@dev", "symfony/browser-kit": "^6.4 || ^7.0", "symfony/dotenv": "^6.4 || ^7.0", @@ -64,7 +63,6 @@ "doctrine/doctrine-bundle": "2.3.0", "sulu/automation-bundle": "<2.0 || >=3.0", "sulu/content-bundle": "<0.8.1 || >=0.9", - "sulu/headless-bundle": "<0.8 || >=0.11", "sulu/messenger": "<0.1 || >=0.3" }, "suggest": { From 9d9eea246ab799f012c9303fa6e27f0c76e00ab9 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 15:29:46 +0200 Subject: [PATCH 26/37] Remove unneeded dependencies --- composer.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/composer.json b/composer.json index e56ccc497..608659a60 100644 --- a/composer.json +++ b/composer.json @@ -31,9 +31,7 @@ "symfony/config": "^6.4 || ^7.0", "symfony/dependency-injection": "^6.4 || ^7.0", "symfony/http-foundation": "^6.4 || ^7.0", - "symfony/http-kernel": "^6.4 || ^7.0", - "symfony-cmf/slugifier-api": "^1.0 || ^2.0", - "twig/twig": "^1.41 || ^2.0 || ^3.0" + "symfony/http-kernel": "^6.4 || ^7.0" }, "require-dev": { "coduo/php-matcher": "^6.0", From 102cbc38622f7f41649f97a403366f30b860fdf6 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 15:31:37 +0200 Subject: [PATCH 27/37] Update phpunit --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 608659a60..dc9241c49 100644 --- a/composer.json +++ b/composer.json @@ -46,7 +46,7 @@ "phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-symfony": "^1.0", "phpstan/phpstan-webmozart-assert": "^1.0", - "phpunit/phpunit": "^9.6.5 || ^10.5.29", + "phpunit/phpunit": "^10.5.29", "sulu/automation-bundle": "^2.0 || ^2.1@dev", "sulu/content-bundle": "^0.8.1 || ^0.8.1@dev", "sulu/messenger": "^0.1 || ^0.2@dev", From 16dd780fbb89e21de5d49addb0bf665e65035e86 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 15:32:29 +0200 Subject: [PATCH 28/37] Remove unneeded phcpr shell --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index dc9241c49..ce264bed0 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,6 @@ "jackalope/jackalope-doctrine-dbal": "^1.0 || ^2.0", "jangregor/phpstan-prophecy": "^1.0", "php-cs-fixer/shim": "^3.0", - "phpcr/phpcr-shell": "^1.1", "phpspec/prophecy": "^1.15", "phpstan/phpstan": "^1.0", "phpstan/phpstan-doctrine": "^1.0", From b0898e032becc3c2eb2450540743659fe58c4594 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 15:32:39 +0200 Subject: [PATCH 29/37] Remove monolog bundle --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index ce264bed0..e9affd474 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,6 @@ "symfony/browser-kit": "^6.4 || ^7.0", "symfony/dotenv": "^6.4 || ^7.0", "symfony/framework-bundle": "^6.4 || ^7.0", - "symfony/monolog-bundle": "^3.1", "symfony/security-bundle": "^6.4 || ^7.0", "symfony/stopwatch": "^6.4 || ^7.0" }, From 2a01ef0fddbfb34fe203c17b4d38dab8ef1d7f20 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 15:50:08 +0200 Subject: [PATCH 30/37] Make messenger and content bundle hard depenedency --- composer.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index e9affd474..d4c1dc462 100644 --- a/composer.json +++ b/composer.json @@ -27,6 +27,8 @@ "jms/serializer": "^3.3", "jms/serializer-bundle": "^3.3 || ^4.0 || ^5.0", "ramsey/uuid": "^3.1 || ^4.0", + "sulu/content-bundle": "^0.8.1 || ^0.8.1@dev", + "sulu/messenger": "^0.2.1 || ^0.2.1@dev", "sulu/sulu": "^2.6.0 || ^2.6.4@dev", "symfony/config": "^6.4 || ^7.0", "symfony/dependency-injection": "^6.4 || ^7.0", @@ -47,13 +49,12 @@ "phpstan/phpstan-webmozart-assert": "^1.0", "phpunit/phpunit": "^10.5.29", "sulu/automation-bundle": "^2.0 || ^2.1@dev", - "sulu/content-bundle": "^0.8.1 || ^0.8.1@dev", - "sulu/messenger": "^0.1 || ^0.2@dev", "symfony/browser-kit": "^6.4 || ^7.0", "symfony/dotenv": "^6.4 || ^7.0", "symfony/framework-bundle": "^6.4 || ^7.0", "symfony/security-bundle": "^6.4 || ^7.0", - "symfony/stopwatch": "^6.4 || ^7.0" + "symfony/stopwatch": "^6.4 || ^7.0", + "twig/twig": "^1.0 || ^2.0 || ^3.0" }, "conflict": { "doctrine/doctrine-bundle": "2.3.0", From 05790d61c1066cd192c000f02857eb5a72647e31 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 15:52:07 +0200 Subject: [PATCH 31/37] Add some more fixes --- composer.json | 3 +-- phpstan.neon | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index d4c1dc462..c32c88049 100644 --- a/composer.json +++ b/composer.json @@ -53,8 +53,7 @@ "symfony/dotenv": "^6.4 || ^7.0", "symfony/framework-bundle": "^6.4 || ^7.0", "symfony/security-bundle": "^6.4 || ^7.0", - "symfony/stopwatch": "^6.4 || ^7.0", - "twig/twig": "^1.0 || ^2.0 || ^3.0" + "symfony/stopwatch": "^6.4 || ^7.0" }, "conflict": { "doctrine/doctrine-bundle": "2.3.0", diff --git a/phpstan.neon b/phpstan.neon index 6dc828529..4a5e9fc5a 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -13,9 +13,8 @@ parameters: level: max excludePaths: - %currentWorkingDirectory%/vendor/* - - %currentWorkingDirectory%/tests/* symfony: container_xml_path: %currentWorkingDirectory%/tests/Application/var/cache/admin/dev/default/Sulu_Article_Tests_Application_KernelDevDebugContainer.xml - console_application_loader: Tests/phpstan/console-application.php + console_application_loader: tests/phpstan/console-application.php doctrine: - objectManagerLoader: Tests/phpstan/object-manager.php + objectManagerLoader: tests/phpstan/object-manager.php From a4e75ce021ac874d31cf3a8a4b5726ccce4a022b Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 15:52:57 +0200 Subject: [PATCH 32/37] Fix messenger version requirement --- composer.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index c32c88049..1fea4da96 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "jms/serializer-bundle": "^3.3 || ^4.0 || ^5.0", "ramsey/uuid": "^3.1 || ^4.0", "sulu/content-bundle": "^0.8.1 || ^0.8.1@dev", - "sulu/messenger": "^0.2.1 || ^0.2.1@dev", + "sulu/messenger": "^0.2.4 || ^0.2.4@dev", "sulu/sulu": "^2.6.0 || ^2.6.4@dev", "symfony/config": "^6.4 || ^7.0", "symfony/dependency-injection": "^6.4 || ^7.0", @@ -57,9 +57,7 @@ }, "conflict": { "doctrine/doctrine-bundle": "2.3.0", - "sulu/automation-bundle": "<2.0 || >=3.0", - "sulu/content-bundle": "<0.8.1 || >=0.9", - "sulu/messenger": "<0.1 || >=0.3" + "sulu/automation-bundle": "<2.0 || >=3.0" }, "suggest": { "sulu/automation-bundle": "Allows publish automation and outsource long-running route update processes." From 1996fd32bc5cec144d956ae922630300da9616e2 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 15:54:28 +0200 Subject: [PATCH 33/37] Fix admin class --- tests/phpstan/console-application.php | 2 +- tests/phpstan/object-manager.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpstan/console-application.php b/tests/phpstan/console-application.php index 5e6facbb2..630376dc0 100644 --- a/tests/phpstan/console-application.php +++ b/tests/phpstan/console-application.php @@ -11,7 +11,7 @@ * with this source code in the file LICENSE. */ -use Sulu\Bundle\AdminBundle\Tests\Application\Kernel; +use Sulu\Article\Tests\Application\Kernel; use Symfony\Bundle\FrameworkBundle\Console\Application; require \dirname(__DIR__) . '/Application/config/bootstrap.php'; diff --git a/tests/phpstan/object-manager.php b/tests/phpstan/object-manager.php index f50f46dd1..d9663feea 100644 --- a/tests/phpstan/object-manager.php +++ b/tests/phpstan/object-manager.php @@ -11,7 +11,7 @@ * with this source code in the file LICENSE. */ -use Sulu\Bundle\AdminBundle\Tests\Application\Kernel; +use Sulu\Article\Tests\Application\Kernel; use Symfony\Component\DependencyInjection\ContainerInterface; require \dirname(__DIR__) . '/Application/config/bootstrap.php'; From 3de83a3701a89acee5551c0237169e5703e33154 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 15:56:50 +0200 Subject: [PATCH 34/37] Fix phpstan dir --- phpstan.neon | 1 + 1 file changed, 1 insertion(+) diff --git a/phpstan.neon b/phpstan.neon index 4a5e9fc5a..dc880266f 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -13,6 +13,7 @@ parameters: level: max excludePaths: - %currentWorkingDirectory%/vendor/* + - %currentWorkingDirectory%/tests/Application/var* symfony: container_xml_path: %currentWorkingDirectory%/tests/Application/var/cache/admin/dev/default/Sulu_Article_Tests_Application_KernelDevDebugContainer.xml console_application_loader: tests/phpstan/console-application.php From 701423d0293f6c4eae61285ec09fbb7fd4c8f9a8 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 15:58:52 +0200 Subject: [PATCH 35/37] Fix phpstan issues in test directory --- tests/Application/Kernel.php | 2 +- tests/Application/bin/console.php | 40 ++++++++++++++++++------------- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/tests/Application/Kernel.php b/tests/Application/Kernel.php index 9f45b2ec3..ce425980b 100644 --- a/tests/Application/Kernel.php +++ b/tests/Application/Kernel.php @@ -39,7 +39,7 @@ public function __construct(string $environment, bool $debug, string $suluContex public function registerBundles(): iterable { - $bundles = parent::registerBundles(); + $bundles = [...parent::registerBundles()]; $bundles[] = new SuluArticleBundle(); $bundles[] = new SuluContentBundle(); $bundles[] = new SuluMessengerBundle(); diff --git a/tests/Application/bin/console.php b/tests/Application/bin/console.php index a5842cf5a..fae0fcc13 100755 --- a/tests/Application/bin/console.php +++ b/tests/Application/bin/console.php @@ -11,32 +11,40 @@ * with this source code in the file LICENSE. */ -// 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); - -\set_time_limit(0); - -require_once __DIR__ . '/../config/bootstrap.php'; - use Sulu\Article\Tests\Application\Kernel; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Component\Console\Input\ArgvInput; -use Symfony\Component\ErrorHandler\Debug; +use Symfony\Component\Debug\Debug; + +if (false === \in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) { + echo 'Warning: The console should be invoked via the CLI version of PHP, not the ' . \PHP_SAPI . ' SAPI' . \PHP_EOL; +} + +require __DIR__ . '/../../../vendor/autoload.php'; + +if (!\class_exists(Application::class)) { + throw new RuntimeException('You need to add "symfony/framework-bundle" as a Composer dependency.'); +} $input = new ArgvInput(); -$env = $input->getParameterOption(['--env', '-e'], \getenv('SYMFONY_ENV') ?: 'dev'); -$debug = '0' !== \getenv('SYMFONY_DEBUG') && !$input->hasParameterOption(['--no-debug', '']) && 'prod' !== $env; +if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) { + \putenv('APP_ENV=' . $_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env); +} + +if ($input->hasParameterOption('--no-debug', true)) { + \putenv('APP_DEBUG=' . $_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0'); +} + +require \dirname(__DIR__) . '/config/bootstrap.php'; + +if ($_SERVER['APP_DEBUG']) { + \umask(0000); -if ($debug) { - // Clean up when sf 4.3 support is removed if (\class_exists(Debug::class)) { Debug::enable(); - } else { - Symfony\Component\Debug\Debug::enable(); } } -$kernel = new Kernel($env, $debug, $suluContext); +$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG'], $suluContext ?? Kernel::CONTEXT_ADMIN); $application = new Application($kernel); $application->run($input); From 03f5fd9eefe7d29e5b2b7a36e2b6ea10e9ac5525 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 16:00:40 +0200 Subject: [PATCH 36/37] Fix some phpstan issues --- src/Infrastructure/Symfony/HttpKernel/SuluArticleBundle.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Infrastructure/Symfony/HttpKernel/SuluArticleBundle.php b/src/Infrastructure/Symfony/HttpKernel/SuluArticleBundle.php index abf1bc5aa..5d7e32277 100644 --- a/src/Infrastructure/Symfony/HttpKernel/SuluArticleBundle.php +++ b/src/Infrastructure/Symfony/HttpKernel/SuluArticleBundle.php @@ -63,7 +63,7 @@ final class SuluArticleBundle extends AbstractBundle */ public function configure(DefinitionConfigurator $definition): void { - $definition->rootNode() + $definition->rootNode() // @phpstan-ignore-line ->children() ->arrayNode('objects') ->addDefaultsIfNotSet() @@ -86,11 +86,13 @@ public function configure(DefinitionConfigurator $definition): void } /** + * @param array $config + * * @internal this method is not part of the public API and should only be called by the Symfony framework classes */ public function loadExtension(array $config, ContainerConfigurator $container, ContainerBuilder $builder): void { - $this->configurePersistence($config['objects'], $builder); + $this->configurePersistence($config['objects'], $builder); // @phpstan-ignore-line $services = $container->services(); From a099d79755597cc40def45cdcb1b8823da894ec8 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Thu, 8 Aug 2024 16:05:15 +0200 Subject: [PATCH 37/37] Fix coduo php matcher lowest --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1fea4da96..58a1f6d65 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ "symfony/http-kernel": "^6.4 || ^7.0" }, "require-dev": { - "coduo/php-matcher": "^6.0", + "coduo/php-matcher": "^6.0.14", "handcraftedinthealps/zendsearch": "^2.0", "jackalope/jackalope-doctrine-dbal": "^1.0 || ^2.0", "jangregor/phpstan-prophecy": "^1.0",