From f61f8fdd3bb4ff1ec74e4819d59ac80e0480b936 Mon Sep 17 00:00:00 2001 From: Petro Kurbatskyi Date: Thu, 14 Mar 2024 14:08:29 +0100 Subject: [PATCH 01/53] Set up branch to become 5.0 in the future --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 578f689f02..02227f8fd8 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "symfony/expression-language": "^5.3.0", "symfony/validator": "^5.3.0", "symfony/var-dumper": "^5.3.0", - "ibexa/doctrine-schema": "~4.6.0@dev", + "ibexa/doctrine-schema": "~5.0.0@dev", "symfony-cmf/routing": "^2.3", "guzzlehttp/guzzle": "^6.5", "php-http/guzzle6-adapter": "^2.0", @@ -158,7 +158,7 @@ }, "extra": { "branch-alias": { - "dev-main": "4.6.x-dev" + "dev-main": "5.0.x-dev" } } } From 29e6434c8b0c1f7912810076730b9c7591f6e0c8 Mon Sep 17 00:00:00 2001 From: Petro Kurbatskyi Date: Wed, 27 Mar 2024 15:44:04 +0100 Subject: [PATCH 02/53] Removed repository-wide pull request template --- .github/pull_request_template.md | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 6828b236ff..0000000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,16 +0,0 @@ -| Question | Answer -| ---------------------------------------- | ------------------ -| **JIRA issue** | [IBX-XXXX](https://issues.ibexa.co/browse/IBX-XXXX) -| **Type** | feature/bug/improvement -| **Target Ibexa version** | `v4.0` -| **BC breaks** | yes/no - - - -#### Checklist: -- [ ] Provided PR description. -- [ ] Tested the solution manually. -- [ ] Provided automated test coverage. -- [ ] Checked that target branch is set correctly (main for features, the oldest supported for bugs). -- [ ] Ran PHP CS Fixer for new PHP code (use `$ composer fix-cs`). -- [ ] Asked for a review (ping `@ibexa/engineering`). From e570cf84ce7614bc6b514574576a74d712bf7a18 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 25 Apr 2024 10:09:44 +0200 Subject: [PATCH 03/53] [BC break] Added `implements \Stringable` to `Translation` Value Object (#344) For more details see https://github.com/ibexa/core/pull/344 Breaking changes: Any class extending `\Ibexa\Contracts\Core\Repository\Values\Translation` will need to implement `\Stringable`. --- phpstan-baseline.neon | 10 ---------- src/contracts/Repository/Values/Translation.php | 9 ++++++--- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index b1e31685b4..4819c04f0a 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -8480,11 +8480,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/UnauthorizedException.php - - - message: "#^Cannot cast Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Translation to string\\.$#" - count: 1 - path: src/lib/Base/Exceptions/UserPasswordValidationException.php - - message: "#^Method Ibexa\\\\Core\\\\Base\\\\Exceptions\\\\UserPasswordValidationException\\:\\:__construct\\(\\) has parameter \\$errors with no value type specified in iterable type array\\.$#" count: 1 @@ -42900,11 +42895,6 @@ parameters: count: 1 path: tests/lib/FieldType/FloatValueValidatorTest.php - - - message: "#^Cannot cast Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Translation to string\\.$#" - count: 1 - path: tests/lib/FieldType/Generic/GenericTest.php - - message: "#^Class Symfony\\\\Component\\\\Validator\\\\ConstraintViolation constructor invoked with 1 parameter, 6\\-10 required\\.$#" count: 1 diff --git a/src/contracts/Repository/Values/Translation.php b/src/contracts/Repository/Values/Translation.php index 76a3d9a0bd..6ccabc40f6 100644 --- a/src/contracts/Repository/Values/Translation.php +++ b/src/contracts/Repository/Values/Translation.php @@ -8,12 +8,15 @@ namespace Ibexa\Contracts\Core\Repository\Values; +use Stringable; + /** - * Base class fro translation messages. + * Abstract for UI translation messages, use its extensions: Translation\Message, Translation\Plural. * - * Use its extensions: Translation\Singular, Translation\Plural. + * @see \Ibexa\Contracts\Core\Repository\Values\Translation\Message + * @see \Ibexa\Contracts\Core\Repository\Values\Translation\Plural */ -abstract class Translation extends ValueObject +abstract class Translation extends ValueObject implements Stringable { } From 77145c37a2a7c3d9409c5a8da402f83c4e61b3f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Niedzielski?= Date: Thu, 25 Apr 2024 10:22:06 +0200 Subject: [PATCH 04/53] IBX-8119: Upgraded minimum PHP version to 8.3 https://github.com/ibexa/core/pull/358 --- .github/workflows/ci.yaml | 58 +++++++++++--------------- .github/workflows/gha-docker-solr.yaml | 7 ++-- 2 files changed, 28 insertions(+), 37 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3d110a576e..b97487dc91 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,13 +10,13 @@ on: jobs: cs-fix: name: Run code style check - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" strategy: matrix: php: - - '8.0' + - '8.3' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup PHP Action uses: shivammathur/setup-php@v2 @@ -26,28 +26,26 @@ jobs: extensions: 'pdo_sqlite, gd' tools: cs2pr - - uses: "ramsey/composer-install@v1" + - uses: ramsey/composer-install@v3 with: - dependency-versions: "highest" + dependency-versions: highest - name: Run code style check run: composer run-script check-cs -- --format=checkstyle | cs2pr tests: name: Unit tests & SQLite integration tests - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" timeout-minutes: 15 strategy: fail-fast: false matrix: php: - - '7.4' - - '8.0' - - '8.1' + - '8.3' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup PHP Action uses: shivammathur/setup-php@v2 @@ -57,9 +55,9 @@ jobs: extensions: pdo_sqlite, gd tools: cs2pr - - uses: "ramsey/composer-install@v1" + - uses: ramsey/composer-install@v3 with: - dependency-versions: "highest" + dependency-versions: highest - name: Setup problem matchers for PHPUnit run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" @@ -90,19 +88,17 @@ jobs: --health-timeout 5s --health-retries 5 --tmpfs /var/lib/postgres - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" timeout-minutes: 60 strategy: fail-fast: false matrix: php: - - '7.4' - - '8.0' - - '8.1' + - '8.3' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup PHP Action uses: shivammathur/setup-php@v2 @@ -112,9 +108,9 @@ jobs: extensions: pdo_pgsql, gd tools: cs2pr - - uses: "ramsey/composer-install@v1" + - uses: ramsey/composer-install@v3 with: - dependency-versions: "highest" + dependency-versions: highest - name: Setup problem matchers for PHPUnit run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" @@ -145,19 +141,17 @@ jobs: --health-timeout=5s --health-retries=5 --tmpfs=/var/lib/mysql - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" timeout-minutes: 60 strategy: fail-fast: false matrix: php: - - '7.4' - - '8.0' - - '8.1' + - '8.3' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup PHP Action uses: shivammathur/setup-php@v2 @@ -167,9 +161,9 @@ jobs: extensions: pdo_mysql, gd, redis tools: cs2pr - - uses: "ramsey/composer-install@v1" + - uses: ramsey/composer-install@v3 with: - dependency-versions: "highest" + dependency-versions: highest - name: Setup problem matchers for PHPUnit run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" @@ -182,7 +176,7 @@ jobs: solr-integration: name: "Solr integration tests" - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" timeout-minutes: 30 permissions: packages: read @@ -207,11 +201,9 @@ jobs: fail-fast: false matrix: php: - - '7.4' - - '8.0' - - '8.1' + - '8.3' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -226,9 +218,9 @@ jobs: VERSION=$(jq -r '.extra | ."branch-alias" | ."dev-main"' < composer.json) composer require --no-update "ibexa/solr:$VERSION" - - uses: "ramsey/composer-install@v1" + - uses: ramsey/composer-install@v3 with: - dependency-versions: "highest" + dependency-versions: highest - name: Run integration test suite run: composer test-integration-solr diff --git a/.github/workflows/gha-docker-solr.yaml b/.github/workflows/gha-docker-solr.yaml index f32cb9525f..2d49d29290 100644 --- a/.github/workflows/gha-docker-solr.yaml +++ b/.github/workflows/gha-docker-solr.yaml @@ -15,7 +15,7 @@ env: jobs: build-and-publish: - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" permissions: packages: write services: @@ -50,9 +50,9 @@ jobs: VERSION=$(jq -r '.extra | ."branch-alias" | ."dev-main"' < composer.json) composer require --no-update "ibexa/solr:$VERSION" - - uses: "ramsey/composer-install@v2" + - uses: ramsey/composer-install@v3 with: - dependency-versions: "highest" + dependency-versions: highest - name: Run integration test suite run: composer test-integration-solr @@ -71,4 +71,3 @@ jobs: - name: Push image run: docker push "$IMAGE_NAME" - From 8251a420bc157f00a388a65495c54f913bb3c54a Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 6 May 2024 16:13:40 +0200 Subject: [PATCH 05/53] [Tests] Dropped providing fallback Kernel if not defined (#345) For more details see https://github.com/ibexa/core/pull/345 Key changes: * [Tests] Dropped providing fallback Test Kernel if not defined * [Tests] Made IbexaTestKernel and IbexaKernelTestCase internal For both 1st and 3rd party, contracts from ibexa/test-core need to be used instead. --- src/contracts/Test/IbexaKernelTestCase.php | 12 +----------- src/contracts/Test/IbexaTestKernel.php | 2 +- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/contracts/Test/IbexaKernelTestCase.php b/src/contracts/Test/IbexaKernelTestCase.php index 25effb04e5..61efcdd0b5 100644 --- a/src/contracts/Test/IbexaKernelTestCase.php +++ b/src/contracts/Test/IbexaKernelTestCase.php @@ -8,22 +8,12 @@ namespace Ibexa\Contracts\Core\Test; -use LogicException; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; /** - * @experimental + * @internal For core tests only. Use \Ibexa\Contracts\Test\Core\IbexaKernelTestCase from ibexa/test-core instead. */ abstract class IbexaKernelTestCase extends KernelTestCase { use IbexaKernelTestTrait; - - protected static function getKernelClass(): string - { - try { - return parent::getKernelClass(); - } catch (LogicException $e) { - return IbexaTestKernel::class; - } - } } diff --git a/src/contracts/Test/IbexaTestKernel.php b/src/contracts/Test/IbexaTestKernel.php index ca18fc32a7..05498302ba 100644 --- a/src/contracts/Test/IbexaTestKernel.php +++ b/src/contracts/Test/IbexaTestKernel.php @@ -34,7 +34,7 @@ use Symfony\Component\HttpKernel\Kernel; /** - * @experimental + * @internal For core tests only. Use \Ibexa\Contracts\Test\Core\IbexaTestKernel from ibexa/test-core instead. * * Baseline test kernel that dependent packages can extend for their integration tests. * From 9a1b02ed552c28b284ae7ad6741a0f4427e4acab Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 7 May 2024 12:43:47 +0200 Subject: [PATCH 06/53] IBX-8119: [GHA] Bumped PHP to 8.3 in gha-docker-solr.yaml workflow (#364) For more details see https://issues.ibexa.co/browse/IBX-8119 and https://github.com/ibexa/core/pull/364 Key changes: * [GHA] Bumped PHP to 8.3 in gha-docker-solr.yaml workflow * [Doc] Added a better description for published docker image --- .github/workflows/gha-docker-solr.yaml | 2 +- docker/solr/Dockerfile | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gha-docker-solr.yaml b/.github/workflows/gha-docker-solr.yaml index 2d49d29290..f4018846ae 100644 --- a/.github/workflows/gha-docker-solr.yaml +++ b/.github/workflows/gha-docker-solr.yaml @@ -42,7 +42,7 @@ jobs: - name: Setup PHP Action uses: shivammathur/setup-php@v2 with: - php-version: 7.4 + php-version: 8.3 coverage: none - name: Add solr dependency diff --git a/docker/solr/Dockerfile b/docker/solr/Dockerfile index 7f00ba7387..987dfd5d7f 100644 --- a/docker/solr/Dockerfile +++ b/docker/solr/Dockerfile @@ -7,6 +7,9 @@ RUN git clone --depth=1 https://github.com/ibexa/solr.git solr RUN ./solr/bin/generate-solr-config.sh --destination-dir=config --solr-version=8.6.3 FROM solr:8.6.3 +LABEL org.opencontainers.image.source=https://github.com/ibexa/core/blob/main/docker/solr/Dockerfile +LABEL org.opencontainers.image.description="Configured Ibexa Solr Bundle image, created by 'Build and publish Solr Docker image' GHA workflow" +LABEL org.opencontainers.image.licenses=GPL-2.0-only USER root RUN rm -rf server/solr/configsets/_default/conf/* USER solr From 83e5d5e771bf21fb1568cdecc359808c3d9b2724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Niedzielski?= Date: Mon, 29 Apr 2024 13:12:46 +0200 Subject: [PATCH 07/53] IBX-8121: Fixed code style for 5.0 - Run code style fixer --- src/bundle/Core/ApiLoader/CacheFactory.php | 1 + .../Exception/InvalidRepositoryException.php | 1 + .../Exception/InvalidSearchEngine.php | 1 + .../Exception/InvalidSearchEngineIndexer.php | 1 + .../Exception/InvalidStorageEngine.php | 1 + .../RepositoryConfigurationProvider.php | 1 + .../Core/ApiLoader/RepositoryFactory.php | 1 + .../Core/ApiLoader/SearchEngineFactory.php | 1 + .../ApiLoader/SearchEngineIndexerFactory.php | 1 + .../ApiLoader/StorageConnectionFactory.php | 1 + .../Core/ApiLoader/StorageEngineFactory.php | 1 + .../Core/Command/CleanupVersionsCommand.php | 1 + .../Core/Command/CopySubtreeCommand.php | 1 + .../Command/DebugConfigResolverCommand.php | 1 + .../DeleteContentTranslationCommand.php | 1 + .../Command/RegenerateUrlAliasesCommand.php | 1 + src/bundle/Core/Command/ReindexCommand.php | 1 + .../Core/Converter/ContentParamConverter.php | 1 + .../Core/Converter/LocationParamConverter.php | 1 + .../Converter/RepositoryParamConverter.php | 1 + .../Compiler/BinaryContentDownloadPass.php | 1 + .../Compiler/ChainConfigResolverPass.php | 1 + .../Compiler/ChainRoutingPass.php | 1 + .../Compiler/ConsoleCacheWarmupPass.php | 1 + ...FieldTypeParameterProviderRegistryPass.php | 1 + .../Compiler/FragmentPass.php | 1 + .../Compiler/ImaginePass.php | 1 + .../Compiler/PlaceholderProviderPass.php | 1 + .../RegisterSearchEngineIndexerPass.php | 1 + .../Compiler/RegisterSearchEnginePass.php | 1 + .../Compiler/RegisterStorageEnginePass.php | 1 + .../Compiler/RouterPass.php | 1 + .../Compiler/SecurityPass.php | 1 + .../SlugConverterConfigurationPass.php | 1 + .../Compiler/StorageConnectionPass.php | 1 + .../Compiler/TranslationCollectorPass.php | 1 + .../Compiler/URLHandlerPass.php | 1 + .../Compiler/ViewProvidersPass.php | 1 + .../DependencyInjection/Configuration.php | 1 + .../Configuration/AbstractParser.php | 1 + .../Configuration/ChainConfigResolver.php | 1 + .../ComplexSettings/ComplexSettingParser.php | 1 + .../ComplexSettingParserInterface.php | 1 + .../ComplexSettingValueResolver.php | 1 + .../Configuration/ConfigBuilderInterface.php | 1 + .../Configuration/ConfigParser.php | 1 + .../Configuration/ConfigResolver.php | 1 + .../Configuration/ContainerConfigBuilder.php | 1 + .../FieldTypeParserInterface.php | 1 + .../Parser/AbstractFieldTypeParser.php | 1 + .../Configuration/Parser/Common.php | 1 + .../Configuration/Parser/Content.php | 1 + .../Configuration/Parser/ContentView.php | 1 + .../Parser/FieldDefinitionEditTemplates.php | 1 + .../FieldDefinitionSettingsTemplates.php | 1 + .../Parser/FieldEditTemplates.php | 1 + .../Configuration/Parser/FieldTemplates.php | 1 + .../Configuration/Parser/IO.php | 1 + .../Configuration/Parser/Image.php | 1 + .../Configuration/Parser/Languages.php | 1 + .../Configuration/Parser/LocationView.php | 1 + .../Configuration/Parser/Templates.php | 1 + .../Configuration/Parser/UrlChecker.php | 1 + .../Configuration/Parser/View.php | 1 + .../Configuration/ParserInterface.php | 1 + .../SiteAccessAware/Configuration.php | 1 + .../ConfigurationMapperInterface.php | 1 + .../ConfigurationProcessor.php | 1 + .../SiteAccessAware/Contextualizer.php | 1 + .../ContextualizerInterface.php | 1 + .../SiteAccessAware/DynamicSettingParser.php | 1 + .../DynamicSettingParserInterface.php | 1 + .../HookableConfigurationMapperInterface.php | 1 + .../Collector/SuggestionCollector.php | 1 + .../SuggestionCollectorAwareInterface.php | 1 + .../SuggestionCollectorInterface.php | 1 + .../Suggestion/ConfigSuggestion.php | 1 + .../SuggestionFormatterInterface.php | 1 + .../Formatter/YamlSuggestionFormatter.php | 1 + .../Security/HttpBasicFactory.php | 1 + .../PolicyProvider/PoliciesConfigBuilder.php | 1 + .../PolicyProviderInterface.php | 1 + .../RepositoryPolicyProvider.php | 1 + .../PolicyProvider/YamlPolicyProvider.php | 1 + .../BackgroundIndexingTerminateListener.php | 1 + .../CacheViewResponseListener.php | 1 + .../EventListener/ConfigScopeListener.php | 1 + .../EventListener/ConsoleCommandListener.php | 1 + .../ContentDownloadRouteReferenceListener.php | 1 + .../Core/EventListener/ExceptionListener.php | 1 + .../EventListener/IndexRequestListener.php | 1 + .../Core/EventListener/LocaleListener.php | 1 + .../EventListener/OriginalRequestListener.php | 1 + .../EventListener/PreviewRequestListener.php | 1 + ...xplicitFrontControllerRequestsListener.php | 1 + .../EventListener/RequestEventListener.php | 1 + .../Core/EventListener/RoutingListener.php | 1 + .../SessionInitByPostListener.php | 1 + .../SessionSetDynamicNameListener.php | 1 + .../Core/EventListener/SiteAccessListener.php | 1 + .../EventListener/ViewControllerListener.php | 1 + .../EventListener/ViewRendererListener.php | 1 + .../CrowdinRequestLocaleSubscriber.php | 1 + .../Features/Context/BasicContentContext.php | 1 + .../Core/Features/Context/ConsoleContext.php | 1 + .../Core/Features/Context/ContentContext.php | 1 + .../Context/ContentPreviewContext.php | 1 + .../Features/Context/ContentTypeContext.php | 1 + .../Features/Context/ExceptionContext.php | 1 + .../Features/Context/FieldTypeContext.php | 1 + .../Context/QueryControllerContext.php | 1 + .../Core/Features/Context/RoleContext.php | 1 + .../Core/Features/Context/UserContext.php | 4 + .../Context/YamlConfigurationContext.php | 1 + .../Fragment/DecoratedFragmentRenderer.php | 1 + .../Core/Fragment/FragmentListenerFactory.php | 1 + .../Core/Fragment/InlineFragmentRenderer.php | 1 + src/bundle/Core/IbexaCoreBundle.php | 1 + src/bundle/Core/Imagine/AliasCleaner.php | 1 + src/bundle/Core/Imagine/AliasGenerator.php | 1 + src/bundle/Core/Imagine/BinaryLoader.php | 1 + .../Imagine/Cache/AliasGeneratorDecorator.php | 1 + .../Imagine/Cache/Resolver/ProxyResolver.php | 1 + .../Cache/Resolver/RelativeResolver.php | 1 + .../Core/Imagine/Cache/ResolverFactory.php | 1 + .../Core/Imagine/Filter/AbstractFilter.php | 1 + .../Imagine/Filter/FilterConfiguration.php | 1 + .../Core/Imagine/Filter/FilterInterface.php | 1 + .../Filter/Gmagick/ReduceNoiseFilter.php | 1 + .../Imagine/Filter/Gmagick/SwirlFilter.php | 1 + .../Filter/Imagick/ReduceNoiseFilter.php | 1 + .../Imagine/Filter/Imagick/SwirlFilter.php | 1 + .../Filter/Loader/BorderFilterLoader.php | 1 + .../Filter/Loader/CropFilterLoader.php | 1 + .../Filter/Loader/FilterLoaderWrapped.php | 1 + .../Filter/Loader/GrayscaleFilterLoader.php | 1 + .../Filter/Loader/ReduceNoiseFilterLoader.php | 1 + .../Loader/ScaleDownOnlyFilterLoader.php | 1 + .../Filter/Loader/ScaleExactFilterLoader.php | 1 + .../Filter/Loader/ScaleFilterLoader.php | 1 + .../ScaleHeightDownOnlyFilterLoader.php | 1 + .../Filter/Loader/ScaleHeightFilterLoader.php | 1 + .../Loader/ScalePercentFilterLoader.php | 1 + .../Loader/ScaleWidthDownOnlyFilterLoader.php | 1 + .../Filter/Loader/ScaleWidthFilterLoader.php | 1 + .../Filter/Loader/SwirlFilterLoader.php | 1 + .../Core/Imagine/Filter/UnsupportedFilter.php | 1 + .../Core/Imagine/IORepositoryResolver.php | 1 + .../Imagine/PlaceholderAliasGenerator.php | 1 + .../PlaceholderAliasGeneratorConfigurator.php | 1 + .../Core/Imagine/PlaceholderProvider.php | 1 + .../PlaceholderProvider/GenericProvider.php | 1 + .../PlaceholderProvider/RemoteProvider.php | 1 + .../Imagine/PlaceholderProviderRegistry.php | 1 + .../Variation/ImagineAwareAliasGenerator.php | 1 + .../Core/Imagine/VariationPathGenerator.php | 1 + .../AliasDirectoryVariationPathGenerator.php | 1 + ...riginalDirectoryVariationPathGenerator.php | 1 + .../VariationPurger/IOVariationPurger.php | 1 + .../Imagine/VariationPurger/ImageFileList.php | 1 + .../VariationPurger/ImageFileRowReader.php | 1 + .../ImageFileVariationPurger.php | 1 + .../LegacyStorageImageFileList.php | 1 + .../LegacyStorageImageFileRowReader.php | 1 + .../Matcher/ServiceAwareMatcherFactory.php | 1 + src/bundle/Core/Routing/DefaultRouter.php | 1 + .../JsRouting/ExposedRoutesExtractor.php | 1 + src/bundle/Core/Routing/UrlAliasRouter.php | 1 + .../Session/Handler/NativeSessionHandler.php | 1 + .../Core/SiteAccess/LanguageResolver.php | 1 + src/bundle/Core/SiteAccess/Matcher.php | 1 + src/bundle/Core/SiteAccess/MatcherBuilder.php | 1 + .../SiteAccessConfigurationFilter.php | 1 + src/bundle/Core/Translation/Collector.php | 1 + src/bundle/Core/Translation/GlobCollector.php | 1 + .../AbstractConfigResolverBasedURLHandler.php | 1 + .../URLChecker/Handler/AbstractURLHandler.php | 1 + .../Core/URLChecker/Handler/HTTPHandler.php | 1 + .../Core/URLChecker/Handler/MailToHandler.php | 1 + src/bundle/Core/URLChecker/URLChecker.php | 1 + .../Core/URLChecker/URLCheckerInterface.php | 1 + .../Core/URLChecker/URLHandlerInterface.php | 1 + .../Core/URLChecker/URLHandlerRegistry.php | 1 + .../URLHandlerRegistryInterface.php | 1 + src/bundle/Core/Variation/PathResolver.php | 1 + .../Variation/VariationHandlerResolver.php | 1 + src/bundle/Core/View/Manager.php | 1 + src/bundle/Core/View/Provider/Configured.php | 1 + .../Debug/Collector/IbexaCoreCollector.php | 1 + .../Collector/PersistenceCacheCollector.php | 1 + .../Debug/Collector/SiteAccessCollector.php | 1 + .../Compiler/DataCollectorPass.php | 1 + .../IbexaDebugExtension.php | 2 + src/bundle/Debug/IbexaDebugBundle.php | 1 + src/bundle/IO/ApiLoader/HandlerRegistry.php | 1 + src/bundle/IO/BinaryStreamResponse.php | 1 + src/bundle/IO/Command/MigrateFilesCommand.php | 1 + .../Compiler/IOConfigurationPass.php | 1 + .../Compiler/MigrationFileListerPass.php | 1 + .../IO/DependencyInjection/Configuration.php | 1 + .../ConfigurationFactory.php | 1 + .../BinarydataHandler/Flysystem.php | 1 + .../ConfigurationFactory/Flysystem.php | 1 + .../MetadataHandler/Flysystem.php | 1 + .../MetadataHandler/LegacyDFSCluster.php | 1 + .../DependencyInjection/IbexaIOExtension.php | 1 + .../IO/EventListener/StreamFileListener.php | 1 + src/bundle/IO/IbexaIOBundle.php | 1 + .../Migration/FileLister/BinaryFileLister.php | 1 + .../LegacyStorageFileIterator.php | 1 + .../FileLister/FileIteratorInterface.php | 1 + .../LegacyStorageBinaryFileRowReader.php | 1 + .../LegacyStorageFileRowReader.php | 1 + .../LegacyStorageMediaFileRowReader.php | 1 + .../FileLister/FileRowReaderInterface.php | 1 + .../Migration/FileLister/ImageFileLister.php | 1 + .../IO/Migration/FileListerInterface.php | 1 + .../IO/Migration/FileListerRegistry.php | 1 + .../ConfigurableRegistry.php | 1 + .../Migration/FileMigrator/FileMigrator.php | 1 + .../IO/Migration/FileMigratorInterface.php | 1 + src/bundle/IO/Migration/MigrationHandler.php | 1 + .../Migration/MigrationHandlerInterface.php | 1 + .../ApiLoader/ConnectionFactory.php | 1 + .../IbexaLegacySearchEngineExtension.php | 1 + .../IbexaLegacySearchEngineBundle.php | 1 + .../Command/InstallPlatformCommand.php | 3 +- .../Command/ValidatePasswordHashesCommand.php | 1 + .../Compiler/InstallerTagPass.php | 1 + .../IbexaRepositoryInstallerExtension.php | 1 + .../IbexaRepositoryInstallerBundle.php | 1 + .../Installer/DbBasedInstaller.php | 1 + .../Installer/Installer.php | 1 + src/contracts/Collection/ArrayList.php | 1 + src/contracts/Collection/ArrayMap.php | 1 + src/contracts/Collection/MutableArrayList.php | 1 + src/contracts/Collection/MutableArrayMap.php | 1 + src/contracts/Container.php | 1 + .../FieldType/BinaryBase/PathGenerator.php | 1 + src/contracts/FieldType/FieldStorage.php | 1 + src/contracts/FieldType/FieldType.php | 1 + .../FieldType/GatewayBasedStorage.php | 3 + src/contracts/FieldType/Indexable.php | 1 + src/contracts/FieldType/StorageGateway.php | 1 + src/contracts/FieldType/ValidationError.php | 1 + src/contracts/FieldType/Value.php | 1 + src/contracts/HashGenerator.php | 1 + src/contracts/IO/BinaryFile.php | 1 + src/contracts/IO/BinaryFileCreateStruct.php | 1 + src/contracts/IO/MimeTypeDetector.php | 1 + src/contracts/Limitation/Type.php | 1 + src/contracts/Persistence/Content.php | 1 + .../Persistence/Content/ContentInfo.php | 1 + .../Persistence/Content/CreateStruct.php | 1 + src/contracts/Persistence/Content/Field.php | 1 + .../Content/FieldTypeConstraints.php | 1 + .../Persistence/Content/FieldValue.php | 1 + src/contracts/Persistence/Content/Handler.php | 1 + .../Persistence/Content/Language.php | 1 + .../Content/Language/CreateStruct.php | 1 + .../Persistence/Content/Language/Handler.php | 1 + .../Persistence/Content/LoadStruct.php | 1 + .../Persistence/Content/Location.php | 1 + .../Content/Location/CreateStruct.php | 1 + .../Persistence/Content/Location/Handler.php | 1 + .../Content/Location/Trash/Handler.php | 1 + .../Content/Location/Trash/TrashResult.php | 1 + .../Persistence/Content/Location/Trashed.php | 1 + .../Content/Location/UpdateStruct.php | 1 + .../Content/MetadataUpdateStruct.php | 1 + .../Persistence/Content/ObjectState.php | 1 + .../Persistence/Content/ObjectState/Group.php | 1 + .../Content/ObjectState/Handler.php | 1 + .../Content/ObjectState/InputStruct.php | 1 + .../Persistence/Content/Relation.php | 1 + .../Content/Relation/CreateStruct.php | 1 + src/contracts/Persistence/Content/Section.php | 1 + .../Persistence/Content/Section/Handler.php | 1 + src/contracts/Persistence/Content/Type.php | 1 + .../Persistence/Content/Type/CreateStruct.php | 1 + .../Content/Type/DeleteByParamsStruct.php | 1 + .../Content/Type/FieldDefinition.php | 1 + .../Persistence/Content/Type/Group.php | 1 + .../Content/Type/Group/CreateStruct.php | 1 + .../Content/Type/Group/UpdateStruct.php | 1 + .../Persistence/Content/Type/Handler.php | 1 + .../Persistence/Content/Type/UpdateStruct.php | 1 + .../Persistence/Content/UpdateStruct.php | 1 + .../Persistence/Content/UrlAlias.php | 1 + .../Persistence/Content/UrlAlias/Handler.php | 1 + .../Persistence/Content/UrlWildcard.php | 1 + .../Content/UrlWildcard/Handler.php | 1 + .../Persistence/Content/VersionInfo.php | 1 + src/contracts/Persistence/FieldType.php | 1 + .../Persistence/FieldType/IsEmptyValue.php | 1 + .../Persistence/TransactionHandler.php | 1 + src/contracts/Persistence/URL/Handler.php | 1 + src/contracts/Persistence/URL/URL.php | 1 + .../Persistence/URL/URLUpdateStruct.php | 1 + src/contracts/Persistence/User.php | 1 + src/contracts/Persistence/User/Handler.php | 1 + src/contracts/Persistence/User/Policy.php | 1 + src/contracts/Persistence/User/Role.php | 1 + .../Persistence/User/RoleAssignment.php | 1 + .../Persistence/User/RoleCreateStruct.php | 1 + .../Persistence/User/RoleUpdateStruct.php | 1 + .../User/UserTokenUpdateStruct.php | 1 + src/contracts/Persistence/ValueObject.php | 1 + src/contracts/Repository/LanguageService.php | 1 + .../Repository/ObjectStateService.php | 1 + src/contracts/Repository/RoleService.php | 1 + src/contracts/Repository/Translatable.php | 1 + .../Repository/TranslationService.php | 1 + .../FacetBuilder/DateRangeFacetBuilder.php | 1 + .../Values/MultiLanguageDescription.php | 1 + .../Repository/Values/MultiLanguageName.php | 1 + .../Repository/Values/Translation/Message.php | 1 + .../Repository/Values/Translation/Plural.php | 1 + .../Repository/Values/ValueObject.php | 1 + src/contracts/Search/Document.php | 1 + src/contracts/Search/Field.php | 1 + src/contracts/Search/FieldType.php | 1 + .../Search/FieldType/BooleanField.php | 1 + .../Search/FieldType/CustomField.php | 1 + src/contracts/Search/FieldType/DateField.php | 1 + .../Search/FieldType/DocumentField.php | 1 + src/contracts/Search/FieldType/FloatField.php | 1 + .../Search/FieldType/FullTextField.php | 1 + .../Search/FieldType/GeoLocationField.php | 1 + .../Search/FieldType/IdentifierField.php | 1 + .../Search/FieldType/IntegerField.php | 1 + .../Search/FieldType/MultipleBooleanField.php | 1 + .../FieldType/MultipleIdentifierField.php | 1 + .../Search/FieldType/MultipleIntegerField.php | 1 + .../MultipleRemoteIdentifierField.php | 1 + .../Search/FieldType/MultipleStringField.php | 1 + src/contracts/Search/FieldType/PriceField.php | 1 + .../FieldType/RemoteIdentifierField.php | 1 + .../Search/FieldType/StringField.php | 1 + src/contracts/Search/FieldType/TextField.php | 1 + src/contracts/Search/Handler.php | 1 + .../SiteAccess/ConfigResolverInterface.php | 1 + src/contracts/Test/IbexaKernelTestTrait.php | 1 + .../Test/IbexaTestKernelInterface.php | 1 + .../Test/Repository/SetupFactory.php | 1 + .../Test/Repository/SetupFactory/Legacy.php | 1 + src/contracts/User/Identity.php | 1 + src/contracts/User/IdentityAware.php | 1 + .../Variation/Values/ImageVariation.php | 1 + src/contracts/Variation/Values/Variation.php | 1 + src/contracts/Variation/VariationHandler.php | 1 + .../Variation/VariationPathGenerator.php | 1 + src/contracts/Variation/VariationPurger.php | 1 + .../Container/ApiLoader/RepositoryFactory.php | 1 + .../Compiler/AbstractFieldTypeBasedPass.php | 1 + .../Compiler/FieldTypeRegistryPass.php | 1 + .../Persistence/FieldTypeRegistryPass.php | 1 + .../Search/AggregateFieldValueMapperPass.php | 1 + .../Compiler/Search/FieldRegistryPass.php | 1 + .../Search/Legacy/CriteriaConverterPass.php | 1 + ...CriterionFieldValueHandlerRegistryPass.php | 1 + .../Search/Legacy/SortClauseConverterPass.php | 1 + .../Storage/ExternalStorageRegistryPass.php | 1 + .../FieldValueConverterRegistryPass.php | 1 + .../Legacy/RoleLimitationConverterPass.php | 1 + src/lib/Base/Exceptions/BadStateException.php | 1 + .../ContentFieldValidationException.php | 1 + ...TypeFieldDefinitionValidationException.php | 1 + .../ContentTypeValidationException.php | 1 + .../Exceptions/ContentValidationException.php | 1 + .../Base/Exceptions/ForbiddenException.php | 1 + src/lib/Base/Exceptions/Httpable.php | 1 + .../Exceptions/InvalidArgumentException.php | 1 + .../Base/Exceptions/InvalidArgumentType.php | 1 + .../Base/Exceptions/InvalidArgumentValue.php | 1 + .../LimitationValidationException.php | 1 + src/lib/Base/Exceptions/MissingClass.php | 1 + .../MissingUserFieldTypeException.php | 1 + .../NotFound/FieldTypeNotFoundException.php | 1 + .../NotFound/LimitationNotFoundException.php | 1 + src/lib/Base/Exceptions/NotFoundException.php | 1 + .../Base/Exceptions/UnauthorizedException.php | 1 + src/lib/Base/ServiceContainer.php | 1 + src/lib/Base/Translatable.php | 1 + src/lib/Base/TranslatableBase.php | 1 + src/lib/Base/Utils/DeprecationWarner.php | 1 + .../Base/Utils/DeprecationWarnerInterface.php | 1 + src/lib/FieldType/Author/Author.php | 1 + src/lib/FieldType/Author/AuthorCollection.php | 1 + src/lib/FieldType/Author/SearchField.php | 1 + src/lib/FieldType/Author/Type.php | 1 + src/lib/FieldType/Author/Value.php | 1 + .../BinaryBase/BinaryBaseStorage.php | 1 + .../BinaryBase/BinaryBaseStorage/Gateway.php | 1 + .../Gateway/DoctrineStorage.php | 1 + .../PathGenerator/LegacyPathGenerator.php | 1 + src/lib/FieldType/BinaryBase/Type.php | 1 + src/lib/FieldType/BinaryBase/Value.php | 1 + .../BinaryFile/BinaryFileStorage.php | 1 + .../Gateway/DoctrineStorage.php | 1 + src/lib/FieldType/BinaryFile/SearchField.php | 1 + src/lib/FieldType/BinaryFile/Type.php | 1 + src/lib/FieldType/BinaryFile/Value.php | 1 + src/lib/FieldType/Checkbox/SearchField.php | 1 + src/lib/FieldType/Checkbox/Type.php | 1 + src/lib/FieldType/Checkbox/Value.php | 1 + .../Country/Exception/InvalidValue.php | 1 + src/lib/FieldType/Country/SearchField.php | 1 + src/lib/FieldType/Country/Type.php | 1 + src/lib/FieldType/Country/Value.php | 1 + src/lib/FieldType/Date/SearchField.php | 1 + src/lib/FieldType/Date/Type.php | 1 + src/lib/FieldType/Date/Value.php | 1 + src/lib/FieldType/DateAndTime/SearchField.php | 1 + src/lib/FieldType/DateAndTime/Type.php | 1 + src/lib/FieldType/DateAndTime/Value.php | 1 + .../FieldType/EmailAddress/SearchField.php | 1 + src/lib/FieldType/EmailAddress/Type.php | 1 + src/lib/FieldType/EmailAddress/Value.php | 1 + src/lib/FieldType/FieldSettings.php | 1 + src/lib/FieldType/FieldType.php | 1 + src/lib/FieldType/FieldTypeRegistry.php | 1 + src/lib/FieldType/Float/SearchField.php | 1 + src/lib/FieldType/Float/Type.php | 1 + src/lib/FieldType/Float/Value.php | 1 + src/lib/FieldType/GatewayBasedStorage.php | 1 + src/lib/FieldType/Handler.php | 1 + src/lib/FieldType/ISBN/SearchField.php | 1 + src/lib/FieldType/ISBN/Type.php | 1 + src/lib/FieldType/ISBN/Value.php | 1 + .../FieldType/Image/AliasCleanerInterface.php | 1 + src/lib/FieldType/Image/IO/Legacy.php | 1 + .../FieldType/Image/IO/OptionsProvider.php | 1 + src/lib/FieldType/Image/ImageStorage.php | 1 + .../FieldType/Image/ImageStorage/Gateway.php | 1 + .../ImageStorage/Gateway/DoctrineStorage.php | 1 + src/lib/FieldType/Image/PathGenerator.php | 1 + .../PathGenerator/LegacyPathGenerator.php | 1 + src/lib/FieldType/Image/SearchField.php | 1 + src/lib/FieldType/Image/Type.php | 1 + src/lib/FieldType/Image/Value.php | 1 + src/lib/FieldType/Integer/SearchField.php | 1 + src/lib/FieldType/Integer/Type.php | 1 + src/lib/FieldType/Integer/Value.php | 1 + src/lib/FieldType/Keyword/KeywordStorage.php | 1 + .../Keyword/KeywordStorage/Gateway.php | 1 + .../Gateway/DoctrineStorage.php | 1 + src/lib/FieldType/Keyword/SearchField.php | 1 + src/lib/FieldType/Keyword/Type.php | 1 + src/lib/FieldType/Keyword/Value.php | 1 + .../MapLocation/MapLocationStorage.php | 1 + .../MapLocationStorage/Gateway.php | 1 + .../Gateway/DoctrineStorage.php | 1 + src/lib/FieldType/MapLocation/SearchField.php | 1 + src/lib/FieldType/MapLocation/Type.php | 1 + src/lib/FieldType/MapLocation/Value.php | 1 + src/lib/FieldType/Media/MediaStorage.php | 1 + .../MediaStorage/Gateway/DoctrineStorage.php | 1 + src/lib/FieldType/Media/SearchField.php | 1 + src/lib/FieldType/Media/Type.php | 1 + src/lib/FieldType/Media/Value.php | 1 + src/lib/FieldType/Null/Type.php | 1 + src/lib/FieldType/Null/Value.php | 1 + src/lib/FieldType/NullStorage.php | 1 + src/lib/FieldType/Relation/SearchField.php | 1 + src/lib/FieldType/Relation/Type.php | 1 + src/lib/FieldType/Relation/Value.php | 1 + .../FieldType/RelationList/SearchField.php | 1 + src/lib/FieldType/RelationList/Type.php | 1 + src/lib/FieldType/RelationList/Value.php | 1 + src/lib/FieldType/Selection/SearchField.php | 1 + src/lib/FieldType/Selection/Type.php | 1 + src/lib/FieldType/Selection/Value.php | 1 + src/lib/FieldType/StorageGateway.php | 1 + src/lib/FieldType/TextBlock/SearchField.php | 1 + src/lib/FieldType/TextBlock/Type.php | 1 + src/lib/FieldType/TextBlock/Value.php | 1 + src/lib/FieldType/TextLine/SearchField.php | 1 + src/lib/FieldType/TextLine/Type.php | 1 + src/lib/FieldType/TextLine/Value.php | 1 + src/lib/FieldType/Time/SearchField.php | 1 + src/lib/FieldType/Time/Type.php | 1 + src/lib/FieldType/Time/Value.php | 1 + src/lib/FieldType/Unindexed.php | 1 + src/lib/FieldType/Url/SearchField.php | 1 + src/lib/FieldType/Url/Type.php | 1 + src/lib/FieldType/Url/UrlStorage.php | 1 + src/lib/FieldType/Url/UrlStorage/Gateway.php | 1 + .../UrlStorage/Gateway/DoctrineStorage.php | 1 + src/lib/FieldType/Url/Value.php | 1 + src/lib/FieldType/User/Type.php | 1 + src/lib/FieldType/User/UserStorage.php | 1 + .../FieldType/User/UserStorage/Gateway.php | 1 + .../UserStorage/Gateway/DoctrineStorage.php | 1 + src/lib/FieldType/User/Value.php | 1 + src/lib/FieldType/ValidationError.php | 1 + src/lib/FieldType/Validator.php | 1 + .../Validator/EmailAddressValidator.php | 1 + .../FileExtensionBlackListValidator.php | 1 + .../FieldType/Validator/FileSizeValidator.php | 1 + .../Validator/FloatValueValidator.php | 1 + .../FieldType/Validator/ImageValidator.php | 1 + .../Validator/IntegerValueValidator.php | 1 + .../Validator/StringLengthValidator.php | 1 + src/lib/FieldType/Value.php | 1 + src/lib/Helper/ContentInfoLocationLoader.php | 1 + .../SudoMainLocationLoader.php | 1 + src/lib/Helper/ContentPreviewHelper.php | 1 + src/lib/Helper/FieldHelper.php | 1 + .../ArrayTranslatorFieldsGroupsList.php | 1 + .../Helper/FieldsGroups/FieldsGroupsList.php | 1 + ...epositoryConfigFieldsGroupsListFactory.php | 1 + src/lib/Helper/PreviewLocationProvider.php | 1 + src/lib/Helper/TranslationHelper.php | 1 + .../Exception/BinaryFileNotFoundException.php | 1 + src/lib/IO/Exception/IOException.php | 1 + .../InvalidBinaryAbsolutePathException.php | 1 + .../InvalidBinaryFileIdException.php | 1 + .../InvalidBinaryPrefixException.php | 1 + .../PathPrefixer/PathPrefixerInterface.php | 1 + src/lib/IO/IOBinarydataHandler.php | 1 + src/lib/IO/IOBinarydataHandler/Flysystem.php | 1 + .../SiteAccessDependentBinaryDataHandler.php | 1 + .../SiteAccessDependentMetadataHandler.php | 1 + src/lib/IO/IOMetadataHandler.php | 1 + src/lib/IO/IOMetadataHandler/Flysystem.php | 1 + .../IO/IOMetadataHandler/LegacyDFSCluster.php | 1 + src/lib/IO/IOService.php | 1 + src/lib/IO/IOServiceInterface.php | 1 + src/lib/IO/MetadataHandler.php | 1 + src/lib/IO/MetadataHandler/ImageSize.php | 1 + src/lib/IO/MimeTypeDetector/FileInfo.php | 1 + src/lib/IO/TolerantIOService.php | 1 + src/lib/IO/UrlDecorator.php | 1 + src/lib/IO/UrlRedecorator.php | 1 + src/lib/IO/UrlRedecoratorInterface.php | 1 + src/lib/IO/Values/BinaryFile.php | 1 + src/lib/IO/Values/BinaryFileCreateStruct.php | 1 + src/lib/IO/Values/MissingBinaryFile.php | 1 + .../AbstractPersistenceLimitationType.php | 1 + src/lib/Limitation/BlockingLimitationType.php | 1 + .../Limitation/ContentTypeLimitationType.php | 1 + src/lib/Limitation/LocationLimitationType.php | 1 + .../NewObjectStateLimitationType.php | 1 + .../Limitation/NewSectionLimitationType.php | 1 + .../Limitation/ObjectStateLimitationType.php | 1 + src/lib/Limitation/OwnerLimitationType.php | 1 + .../ParentContentTypeLimitationType.php | 1 + .../Limitation/ParentDepthLimitationType.php | 1 + .../Limitation/ParentOwnerLimitationType.php | 1 + .../ParentUserGroupLimitationType.php | 1 + src/lib/Limitation/SectionLimitationType.php | 1 + .../Limitation/SiteAccessLimitationType.php | 1 + src/lib/Limitation/StatusLimitationType.php | 1 + src/lib/Limitation/SubtreeLimitationType.php | 1 + .../Limitation/UserGroupLimitationType.php | 1 + .../MVC/Exception/HiddenLocationException.php | 1 + .../Exception/InvalidSiteAccessException.php | 1 + .../MVC/Exception/NoViewTemplateException.php | 1 + .../Exception/ParameterNotFoundException.php | 1 + .../SourceImageNotFoundException.php | 1 + src/lib/MVC/RepositoryAware.php | 1 + src/lib/MVC/RepositoryAwareInterface.php | 1 + .../Serializer/CompoundMatcherNormalizer.php | 1 + .../SimplifiedRequestNormalizer.php | 1 + src/lib/MVC/Symfony/ConfigDumperInterface.php | 1 + .../Configuration/VersatileScopeInterface.php | 1 + .../Controller/Content/DownloadController.php | 1 + .../Content/DownloadRedirectionController.php | 1 + .../Controller/Content/PreviewController.php | 1 + .../Controller/Content/QueryController.php | 1 + .../Controller/Content/ViewController.php | 1 + src/lib/MVC/Symfony/Controller/Controller.php | 1 + .../Symfony/Controller/SecurityController.php | 1 + .../Event/APIContentExceptionEvent.php | 1 + .../MVC/Symfony/Event/ConsoleInitEvent.php | 1 + .../Symfony/Event/ContentCacheClearEvent.php | 1 + .../Event/PostSiteAccessMatchEvent.php | 1 + .../MVC/Symfony/Event/PreContentViewEvent.php | 1 + .../Event/RouteReferenceGenerationEvent.php | 1 + .../MVC/Symfony/Event/ScopeChangeEvent.php | 1 + .../EventListener/LanguageSwitchListener.php | 1 + .../EventListener/SiteAccessMatchListener.php | 1 + .../ContentDownloadUrlGenerator.php | 1 + .../FieldType/Relation/ParameterProvider.php | 1 + .../RelationList/ParameterProvider.php | 1 + .../LocaleParameterProvider.php | 1 + .../View/ParameterProviderInterface.php | 1 + .../View/ParameterProviderRegistry.php | 1 + .../ParameterProviderRegistryInterface.php | 1 + .../MVC/Symfony/Locale/LocaleConverter.php | 1 + .../Locale/LocaleConverterInterface.php | 1 + src/lib/MVC/Symfony/MVCEvents.php | 1 + .../Matcher/ClassNameMatcherFactory.php | 1 + .../ConfigurableMatcherFactoryInterface.php | 1 + .../Symfony/Matcher/ContentBased/Depth.php | 1 + .../Matcher/ContentBased/Id/Content.php | 1 + .../Matcher/ContentBased/Id/ContentType.php | 1 + .../ContentBased/Id/ContentTypeGroup.php | 1 + .../Matcher/ContentBased/Id/Location.php | 1 + .../ContentBased/Id/LocationRemote.php | 1 + .../ContentBased/Id/ParentContentType.php | 1 + .../ContentBased/Id/ParentLocation.php | 1 + .../Matcher/ContentBased/Id/Remote.php | 1 + .../Matcher/ContentBased/Id/Section.php | 1 + .../ContentBased/Identifier/ContentType.php | 1 + .../Identifier/ParentContentType.php | 1 + .../ContentBased/Identifier/Section.php | 1 + .../Matcher/ContentBased/MatcherInterface.php | 1 + .../Matcher/ContentBased/MultipleValued.php | 1 + .../Symfony/Matcher/ContentBased/UrlAlias.php | 1 + ...callyConfiguredMatcherFactoryDecorator.php | 1 + .../Matcher/MatcherFactoryInterface.php | 1 + .../Symfony/Matcher/ViewMatcherInterface.php | 1 + src/lib/MVC/Symfony/RequestStackAware.php | 1 + src/lib/MVC/Symfony/Routing/Generator.php | 1 + .../Generator/RouteReferenceGenerator.php | 1 + .../RouteReferenceGeneratorInterface.php | 1 + .../Routing/Generator/UrlAliasGenerator.php | 1 + .../MVC/Symfony/Routing/RouteReference.php | 1 + .../MVC/Symfony/Routing/SimplifiedRequest.php | 1 + .../MVC/Symfony/Routing/UrlAliasRouter.php | 1 + .../MVC/Symfony/Routing/UrlWildcardRouter.php | 1 + .../AnonymousAuthenticationProvider.php | 1 + .../Authentication/AuthenticatorInterface.php | 1 + .../DefaultAuthenticationSuccessHandler.php | 1 + ...mberMeRepositoryAuthenticationProvider.php | 1 + .../RepositoryAuthenticationProvider.php | 1 + .../Security/Authorization/Attribute.php | 1 + .../Authorization/Voter/CoreVoter.php | 1 + .../Authorization/Voter/ValueObjectVoter.php | 1 + .../EventListener/SecurityListener.php | 1 + .../Exception/PasswordExpiredException.php | 1 + .../UnauthorizedSiteAccessException.php | 1 + src/lib/MVC/Symfony/Security/HttpUtils.php | 1 + .../Security/InteractiveLoginToken.php | 1 + .../Security/ReferenceUserInterface.php | 1 + .../User/APIUserProviderInterface.php | 1 + .../MVC/Symfony/Security/UserInterface.php | 1 + src/lib/MVC/Symfony/Security/UserWrapped.php | 1 + src/lib/MVC/Symfony/SiteAccess.php | 1 + src/lib/MVC/Symfony/SiteAccess/Matcher.php | 1 + .../Symfony/SiteAccess/Matcher/Compound.php | 1 + .../Matcher/Compound/LogicalAnd.php | 1 + .../SiteAccess/Matcher/Compound/LogicalOr.php | 1 + .../SiteAccess/Matcher/CompoundInterface.php | 1 + .../SiteAccess/Matcher/HostElement.php | 1 + .../Symfony/SiteAccess/Matcher/HostText.php | 1 + .../MVC/Symfony/SiteAccess/Matcher/Map.php | 1 + .../Symfony/SiteAccess/Matcher/Map/Host.php | 1 + .../Symfony/SiteAccess/Matcher/Map/Port.php | 1 + .../Symfony/SiteAccess/Matcher/Map/URI.php | 1 + .../MVC/Symfony/SiteAccess/Matcher/Regex.php | 1 + .../Symfony/SiteAccess/Matcher/Regex/Host.php | 1 + .../Symfony/SiteAccess/Matcher/Regex/URI.php | 1 + .../Symfony/SiteAccess/Matcher/URIElement.php | 1 + .../Symfony/SiteAccess/Matcher/URIText.php | 1 + .../MVC/Symfony/SiteAccess/MatcherBuilder.php | 1 + .../SiteAccess/MatcherBuilderInterface.php | 1 + src/lib/MVC/Symfony/SiteAccess/Router.php | 1 + .../Symfony/SiteAccess/SiteAccessAware.php | 1 + .../SiteAccess/SiteAccessRouterInterface.php | 1 + src/lib/MVC/Symfony/SiteAccess/URILexer.php | 1 + .../Symfony/SiteAccess/VersatileMatcher.php | 1 + .../Exception/MissingFieldBlockException.php | 1 + .../FieldBlockRendererInterface.php | 1 + .../MVC/Symfony/Templating/GlobalHelper.php | 1 + .../Twig/Extension/ContentExtension.php | 1 + .../Twig/Extension/CoreExtension.php | 1 + .../Extension/FieldRenderingExtension.php | 1 + .../Twig/Extension/FileSizeExtension.php | 1 + .../Twig/Extension/ImageExtension.php | 1 + .../Translation/CatalogueMapperFileWriter.php | 1 + .../ExceptionMessageTemplateFileVisitor.php | 1 + .../FieldTypesTranslationExtractor.php | 1 + .../TranslatableExceptionsFileVisitor.php | 1 + .../ValidationErrorFileVisitor.php | 1 + src/lib/MVC/Symfony/View/BaseView.php | 1 + .../View/Builder/ContentViewBuilder.php | 1 + .../ParametersFilter/RequestAttributes.php | 1 + .../View/Builder/Registry/ControllerMatch.php | 1 + .../MVC/Symfony/View/Builder/ViewBuilder.php | 1 + .../View/Builder/ViewBuilderRegistry.php | 1 + src/lib/MVC/Symfony/View/CachableView.php | 1 + src/lib/MVC/Symfony/View/Configurator.php | 1 + .../View/Configurator/ViewProvider.php | 1 + src/lib/MVC/Symfony/View/ContentValueView.php | 1 + src/lib/MVC/Symfony/View/ContentView.php | 1 + .../View/CustomLocationControllerChecker.php | 1 + src/lib/MVC/Symfony/View/EmbedView.php | 1 + .../FilterViewBuilderParametersEvent.php | 1 + .../View/Event/FilterViewParametersEvent.php | 1 + .../MVC/Symfony/View/LocationValueView.php | 1 + src/lib/MVC/Symfony/View/Manager.php | 1 + .../MVC/Symfony/View/ParametersInjector.php | 1 + .../ParametersInjector/CustomParameters.php | 1 + .../EmbedObjectParameters.php | 1 + .../EventDispatcherInjector.php | 1 + .../View/ParametersInjector/NoLayout.php | 1 + .../ParametersInjector/ValueObjectsIds.php | 1 + .../ParametersInjector/ViewbaseLayout.php | 1 + .../MVC/Symfony/View/Provider/Configured.php | 1 + src/lib/MVC/Symfony/View/Provider/Content.php | 1 + .../MVC/Symfony/View/Provider/Location.php | 1 + .../MVC/Symfony/View/Provider/Registry.php | 1 + src/lib/MVC/Symfony/View/Renderer.php | 1 + .../View/Renderer/TemplateRenderer.php | 1 + src/lib/MVC/Symfony/View/View.php | 1 + src/lib/MVC/Symfony/View/ViewEvents.php | 1 + .../MVC/Symfony/View/ViewManagerInterface.php | 1 + src/lib/MVC/Symfony/View/ViewProvider.php | 1 + .../Pagerfanta/ContentSearchAdapter.php | 1 + .../Pagerfanta/ContentSearchHitAdapter.php | 1 + .../Pagerfanta/LocationSearchAdapter.php | 1 + .../Pagerfanta/LocationSearchHitAdapter.php | 1 + src/lib/Persistence/Cache/AbstractHandler.php | 1 + .../Cache/AbstractInMemoryHandler.php | 1 + .../AbstractInMemoryPersistenceHandler.php | 1 + src/lib/Persistence/Cache/ContentHandler.php | 1 + .../Cache/ContentLanguageHandler.php | 1 + .../Persistence/Cache/ContentTypeHandler.php | 1 + src/lib/Persistence/Cache/LocationHandler.php | 1 + .../Persistence/Cache/ObjectStateHandler.php | 1 + src/lib/Persistence/Cache/SectionHandler.php | 1 + src/lib/Persistence/Cache/SettingHandler.php | 1 + .../Persistence/Cache/TransactionHandler.php | 1 + src/lib/Persistence/Cache/TrashHandler.php | 1 + src/lib/Persistence/Cache/URLHandler.php | 1 + src/lib/Persistence/Cache/UrlAliasHandler.php | 1 + .../Persistence/Cache/UrlWildcardHandler.php | 1 + src/lib/Persistence/Cache/UserHandler.php | 1 + src/lib/Persistence/FieldType.php | 1 + src/lib/Persistence/FieldTypeRegistry.php | 1 + .../Legacy/Content/FieldHandler.php | 1 + .../Legacy/Content/FieldValue/Converter.php | 1 + .../FieldValue/Converter/AuthorConverter.php | 1 + .../Converter/BinaryFileConverter.php | 1 + .../Converter/CheckboxConverter.php | 1 + .../FieldValue/Converter/CountryConverter.php | 1 + .../Converter/DateAndTimeConverter.php | 1 + .../FieldValue/Converter/DateConverter.php | 1 + .../Converter/EmailAddressConverter.php | 1 + .../Converter/Exception/NotFound.php | 1 + .../FieldValue/Converter/FloatConverter.php | 1 + .../FieldValue/Converter/ISBNConverter.php | 1 + .../FieldValue/Converter/ImageConverter.php | 1 + .../FieldValue/Converter/IntegerConverter.php | 1 + .../FieldValue/Converter/KeywordConverter.php | 1 + .../Converter/MapLocationConverter.php | 1 + .../FieldValue/Converter/MediaConverter.php | 1 + .../FieldValue/Converter/NullConverter.php | 1 + .../Converter/RelationConverter.php | 1 + .../Converter/RelationListConverter.php | 1 + .../Converter/SelectionConverter.php | 1 + .../Converter/TextBlockConverter.php | 1 + .../Converter/TextLineConverter.php | 1 + .../FieldValue/Converter/TimeConverter.php | 1 + .../FieldValue/Converter/UrlConverter.php | 1 + .../Content/FieldValue/ConverterRegistry.php | 1 + .../Persistence/Legacy/Content/Gateway.php | 1 + .../Content/Gateway/DoctrineDatabase.php | 1 + .../Gateway/DoctrineDatabase/QueryBuilder.php | 1 + .../Content/Gateway/ExceptionConversion.php | 1 + .../Persistence/Legacy/Content/Handler.php | 1 + .../Content/Language/CachingHandler.php | 1 + .../Legacy/Content/Language/Handler.php | 1 + .../Legacy/Content/Language/Mapper.php | 1 + .../Legacy/Content/Language/MaskGenerator.php | 1 + .../Legacy/Content/Location/Gateway.php | 1 + .../Location/Gateway/DoctrineDatabase.php | 2 + .../Location/Gateway/ExceptionConversion.php | 1 + .../Legacy/Content/Location/Handler.php | 1 + .../Legacy/Content/Location/Mapper.php | 1 + .../Legacy/Content/Location/Trash/Handler.php | 1 + src/lib/Persistence/Legacy/Content/Mapper.php | 1 + .../Legacy/Content/ObjectState/Handler.php | 1 + .../Legacy/Content/ObjectState/Mapper.php | 1 + .../Legacy/Content/Section/Handler.php | 1 + .../Legacy/Content/StorageFieldDefinition.php | 1 + .../Legacy/Content/StorageFieldValue.php | 1 + .../Legacy/Content/StorageHandler.php | 1 + .../Legacy/Content/StorageRegistry.php | 1 + .../Legacy/Content/TreeHandler.php | 1 + .../Legacy/Content/Type/ContentUpdater.php | 1 + .../Content/Type/ContentUpdater/Action.php | 1 + .../Type/ContentUpdater/Action/AddField.php | 1 + .../ContentUpdater/Action/RemoveField.php | 1 + .../Legacy/Content/Type/Handler.php | 3 + .../Legacy/Content/Type/Mapper.php | 1 + .../Content/Type/MemoryCachingHandler.php | 1 + .../DTO/SwappedLocationProperties.php | 1 + .../DTO/UrlAliasForSwappedLocation.php | 1 + .../Legacy/Content/UrlAlias/Handler.php | 1 + .../Legacy/Content/UrlAlias/Mapper.php | 1 + .../Legacy/Content/UrlAlias/SlugConverter.php | 1 + .../Legacy/Content/UrlWildcard/Handler.php | 1 + .../Legacy/Content/UrlWildcard/Mapper.php | 1 + .../Legacy/Exception/GroupNotEmpty.php | 1 + .../Exception/RemoveLastGroupFromType.php | 1 + .../Legacy/Exception/RoleNotFound.php | 1 + .../Legacy/Exception/StorageNotFound.php | 1 + .../Legacy/Exception/TypeGroupNotFound.php | 1 + .../Legacy/Exception/TypeNotFound.php | 1 + .../Legacy/Exception/TypeStillHasContent.php | 1 + .../Persistence/Legacy/Setting/Handler.php | 1 + .../Persistence/Legacy/TransactionHandler.php | 1 + src/lib/Persistence/Legacy/URL/Gateway.php | 1 + .../Legacy/URL/Gateway/DoctrineDatabase.php | 1 + .../URL/Gateway/ExceptionConversion.php | 1 + src/lib/Persistence/Legacy/URL/Handler.php | 1 + src/lib/Persistence/Legacy/URL/Mapper.php | 1 + .../Legacy/URL/Query/CriteriaConverter.php | 1 + .../Legacy/URL/Query/CriterionHandler.php | 1 + .../URL/Query/CriterionHandler/LogicalAnd.php | 1 + .../URL/Query/CriterionHandler/LogicalNot.php | 1 + .../URL/Query/CriterionHandler/LogicalOr.php | 1 + .../URL/Query/CriterionHandler/MatchAll.php | 1 + .../URL/Query/CriterionHandler/MatchNone.php | 1 + .../URL/Query/CriterionHandler/Pattern.php | 1 + .../URL/Query/CriterionHandler/Validity.php | 1 + .../Query/CriterionHandler/VisibleOnly.php | 1 + src/lib/Persistence/Legacy/User/Handler.php | 1 + src/lib/Persistence/Legacy/User/Mapper.php | 1 + .../Legacy/User/Role/LimitationConverter.php | 1 + .../Legacy/User/Role/LimitationHandler.php | 1 + .../LimitationHandler/ObjectStateHandler.php | 1 + .../Persistence/TransformationProcessor.php | 1 + .../DefinitionBased.php | 1 + .../DefinitionBased/Parser.php | 1 + .../TransformationProcessor/PcreCompiler.php | 1 + .../PreprocessedBased.php | 1 + src/lib/Persistence/Utf8Converter.php | 1 + src/lib/Query/QueryFactoryInterface.php | 1 + src/lib/QueryType/ArrayQueryTypeRegistry.php | 1 + .../QueryType/ContentViewQueryTypeMapper.php | 1 + .../OptionsResolverBasedQueryType.php | 1 + ...eryParameterContentViewQueryTypeMapper.php | 1 + src/lib/QueryType/QueryType.php | 1 + src/lib/QueryType/QueryTypeRegistry.php | 1 + .../Repository/Helper/NameSchemaService.php | 1 + .../Repository/Helper/RelationProcessor.php | 1 + .../Repository/Helper/RoleDomainMapper.php | 1 + src/lib/Repository/LanguageService.php | 1 + .../Repository/Mapper/ContentDomainMapper.php | 1 + .../Repository/Mapper/RoleDomainMapper.php | 1 + .../NameSchema/NameSchemaService.php | 4 +- src/lib/Repository/ObjectStateService.php | 1 + .../PermissionsCriterionHandler.php | 1 + .../ProxyDomainMapperFactoryInterface.php | 1 + src/lib/Repository/Repository.php | 1 + src/lib/Repository/RoleService.php | 1 + .../SiteAccessAware/ContentTypeService.php | 1 + .../Language/LanguageResolver.php | 1 + .../SiteAccessAware/LanguageService.php | 1 + .../SiteAccessAware/ObjectStateService.php | 1 + .../Query/Criterion/PermissionSubtree.php | 1 + .../Repository/Values/Content/VersionInfo.php | 1 + .../Values/ContentType/ContentType.php | 1 + .../ContentType/ContentTypeCreateStruct.php | 1 + .../Values/ContentType/ContentTypeDraft.php | 1 + .../Values/ContentType/ContentTypeGroup.php | 1 + .../Values/MultiLanguageDescriptionTrait.php | 1 + .../Values/MultiLanguageNameTrait.php | 1 + .../Repository/Values/MultiLanguageTrait.php | 1 + .../Values/ObjectState/ObjectStateGroup.php | 1 + .../Values/User/PolicyUpdateStruct.php | 1 + src/lib/Repository/Values/User/Role.php | 1 + src/lib/Search/Common/BackgroundIndexer.php | 1 + .../Common/BackgroundIndexer/NullIndexer.php | 1 + .../AbstractSearchEventSubscriber.php | 1 + .../ContentEventSubscriber.php | 1 + .../LocationEventSubscriber.php | 1 + .../ObjectStateEventSubscriber.php | 1 + .../SectionEventSubscriber.php | 1 + .../EventSubscriber/TrashEventSubscriber.php | 1 + .../EventSubscriber/UserEventSubscriber.php | 1 + src/lib/Search/Common/FieldNameGenerator.php | 1 + src/lib/Search/Common/FieldNameResolver.php | 1 + src/lib/Search/Common/FieldRegistry.php | 1 + src/lib/Search/Common/FieldValueMapper.php | 1 + .../Common/FieldValueMapper/Aggregate.php | 1 + .../Common/FieldValueMapper/BooleanMapper.php | 1 + .../Common/FieldValueMapper/DateMapper.php | 1 + .../FieldValueMapper/DocumentMapper.php | 1 + .../Common/FieldValueMapper/FloatMapper.php | 1 + .../FieldValueMapper/GeoLocationMapper.php | 1 + .../FieldValueMapper/IdentifierMapper.php | 1 + .../Common/FieldValueMapper/IntegerMapper.php | 1 + .../MultipleBooleanMapper.php | 1 + .../MultipleIdentifierMapper.php | 1 + .../MultipleIntegerMapper.php | 1 + .../MultipleRemoteIdentifierMapper.php | 1 + .../FieldValueMapper/MultipleStringMapper.php | 1 + .../Common/FieldValueMapper/PriceMapper.php | 1 + .../RemoteIdentifierMapper.php | 1 + .../Common/FieldValueMapper/StringMapper.php | 1 + src/lib/Search/Common/IncrementalIndexer.php | 1 + src/lib/Search/Common/Indexer.php | 1 + .../Common/Gateway/CriteriaConverter.php | 1 + .../Common/Gateway/CriterionHandler.php | 1 + .../Gateway/CriterionHandler/ContentId.php | 1 + .../CriterionHandler/ContentTypeGroupId.php | 1 + .../CriterionHandler/ContentTypeId.php | 1 + .../ContentTypeIdentifier.php | 1 + .../Gateway/CriterionHandler/DateMetadata.php | 1 + .../Common/Gateway/CriterionHandler/Field.php | 1 + .../Gateway/CriterionHandler/FieldBase.php | 1 + .../CriterionHandler/FieldRelation.php | 1 + .../CriterionHandler/FieldValue/Converter.php | 1 + .../CriterionHandler/FieldValue/Handler.php | 1 + .../FieldValue/Handler/Collection.php | 1 + .../FieldValue/Handler/Composite.php | 1 + .../FieldValue/Handler/Keyword.php | 1 + .../FieldValue/Handler/Simple.php | 1 + .../FieldValue/HandlerRegistry.php | 1 + .../Gateway/CriterionHandler/FullText.php | 1 + .../Gateway/CriterionHandler/LanguageCode.php | 1 + .../Gateway/CriterionHandler/LogicalAnd.php | 1 + .../Gateway/CriterionHandler/LogicalNot.php | 1 + .../Gateway/CriterionHandler/LogicalOr.php | 1 + .../CriterionHandler/MapLocationDistance.php | 1 + .../Gateway/CriterionHandler/MatchAll.php | 1 + .../Gateway/CriterionHandler/MatchNone.php | 1 + .../CriterionHandler/ObjectStateId.php | 1 + .../Gateway/CriterionHandler/RemoteId.php | 1 + .../Gateway/CriterionHandler/SectionId.php | 1 + .../Gateway/CriterionHandler/UserMetadata.php | 1 + .../Common/Gateway/SortClauseConverter.php | 1 + .../Common/Gateway/SortClauseHandler.php | 1 + .../SortClauseHandler/AbstractRandom.php | 1 + .../Gateway/SortClauseHandler/ContentId.php | 1 + .../Gateway/SortClauseHandler/ContentName.php | 1 + .../SortClauseHandler/DateModified.php | 1 + .../SortClauseHandler/DatePublished.php | 1 + .../Gateway/SortClauseHandler/Field.php | 1 + .../SortClauseHandler/MapLocationDistance.php | 1 + .../SortClauseHandler/SectionIdentifier.php | 1 + .../Gateway/SortClauseHandler/SectionName.php | 1 + .../Search/Legacy/Content/FullTextData.php | 1 + .../Search/Legacy/Content/FullTextValue.php | 1 + src/lib/Search/Legacy/Content/Gateway.php | 1 + .../Gateway/CriterionHandler/Ancestor.php | 1 + .../Gateway/CriterionHandler/LocationId.php | 1 + .../CriterionHandler/LocationRemoteId.php | 1 + .../CriterionHandler/ParentLocationId.php | 1 + .../CriterionHandler/PermissionSubtree.php | 1 + .../Gateway/CriterionHandler/Subtree.php | 1 + .../Gateway/CriterionHandler/Visibility.php | 1 + .../Content/Gateway/DoctrineDatabase.php | 1 + .../Content/Gateway/ExceptionConversion.php | 1 + src/lib/Search/Legacy/Content/Handler.php | 1 + src/lib/Search/Legacy/Content/Indexer.php | 1 + .../Legacy/Content/Location/Gateway.php | 1 + .../Gateway/CriterionHandler/Ancestor.php | 1 + .../CriterionHandler/Location/Depth.php | 1 + .../Location/IsMainLocation.php | 1 + .../CriterionHandler/Location/Priority.php | 1 + .../Gateway/CriterionHandler/LocationId.php | 1 + .../CriterionHandler/LocationRemoteId.php | 1 + .../CriterionHandler/ParentLocationId.php | 1 + .../Gateway/CriterionHandler/Subtree.php | 1 + .../Gateway/CriterionHandler/Visibility.php | 1 + .../Location/Gateway/DoctrineDatabase.php | 1 + .../Location/Gateway/ExceptionConversion.php | 1 + .../SortClauseHandler/Location/Depth.php | 1 + .../Gateway/SortClauseHandler/Location/Id.php | 1 + .../Location/IsMainLocation.php | 1 + .../SortClauseHandler/Location/Path.php | 1 + .../SortClauseHandler/Location/Priority.php | 1 + .../SortClauseHandler/Location/Visibility.php | 1 + .../Legacy/Content/Mapper/FullTextMapper.php | 1 + .../Legacy/Content/WordIndexer/Gateway.php | 1 + .../WordIndexer/Gateway/DoctrineDatabase.php | 1 + .../WordIndexer/Repository/SearchIndex.php | 1 + .../Core/ApiLoader/CacheFactoryTest.php | 11 +- .../RepositoryConfigurationProviderTest.php | 17 +- .../StorageConnectionFactoryTest.php | 31 +- .../ApiLoader/StorageEngineFactoryTest.php | 15 +- .../Cache/Warmer/ProxyCacheWarmerTest.php | 4 +- tests/bundle/Core/ChainConfigResolverTest.php | 53 +- tests/bundle/Core/ConfigResolverTest.php | 73 +- .../Converter/AbstractParamConverterTest.php | 9 +- .../Converter/ContentParamConverterTest.php | 21 +- .../Converter/LocationParamConverterTest.php | 21 +- .../Compiler/ChainConfigResolverPassTest.php | 1 + .../Compiler/ChainRoutingPassTest.php | 1 + ...dTypeParameterProviderRegistryPassTest.php | 1 + .../Compiler/FragmentPassTest.php | 41 +- .../Compiler/PlaceholderProviderPassTest.php | 1 + .../RegisterStorageEnginePassTest.php | 1 + .../Compiler/SecurityPassTest.php | 1 + .../SlugConverterConfigurationPassTest.php | 9 +- .../Compiler/TranslationCollectorPassTest.php | 1 + .../Compiler/URLHandlerPassTest.php | 1 + .../Compiler/ViewProvidersPassTest.php | 1 + .../ComplexSettingParserTest.php | 1 + .../ComplexSettingValueResolverTest.php | 1 + .../Configuration/ConfigParserTest.php | 15 +- .../ChainConfigResolverTest.php | 44 +- .../ConfigResolver/ConfigResolverTest.php | 12 +- .../Parser/AbstractParserTestCase.php | 1 + .../Configuration/Parser/CommonTest.php | 1 + .../Configuration/Parser/ContentTest.php | 1 + .../Configuration/Parser/IOTest.php | 1 + .../Configuration/Parser/ImageTest.php | 3 +- .../Configuration/Parser/LanguagesTest.php | 5 +- .../Configuration/Parser/TemplatesTest.php | 1 + .../Configuration/Parser/ViewTest.php | 1 + .../RepositoryConfigParserTest.php | 2 +- .../ConfigurationProcessorTest.php | 33 +- .../SiteAccessAware/ContextualizerTest.php | 77 +- .../DynamicSettingParserTest.php | 5 +- .../Collector/SuggestionCollectorTest.php | 5 +- .../Suggestion/ConfigSuggestionTest.php | 19 +- .../Formatter/YamlSuggestionFormatterTest.php | 5 +- .../IbexaCoreExtensionTest.php | 63 +- .../PoliciesConfigBuilderTest.php | 1 + .../PolicyProvider/YamlPolicyProviderTest.php | 15 +- .../QueryType/TestQueryType.php | 1 + .../Stub/QueryTypeBundle/QueryTypeBundle.php | 1 + .../Stub/StubPolicyProvider.php | 1 + .../Stub/StubYamlPolicyProvider.php | 1 + ...ackgroundIndexingTerminateListenerTest.php | 51 +- .../BackwardCompatibleCommandListenerTest.php | 6 +- .../EventListener/ConfigScopeListenerTest.php | 11 +- .../ConsoleCommandListenerTest.php | 15 +- ...tentDownloadRouteReferenceListenerTest.php | 5 +- .../EventListener/ExceptionListenerTest.php | 11 +- .../IndexRequestListenerTest.php | 13 +- .../Core/EventListener/LocaleListenerTest.php | 13 +- .../OriginalRequestListenerTest.php | 9 +- ...citFrontControllerRequestsListenerTest.php | 3 +- .../RequestEventListenerTest.php | 53 +- .../EventListener/RoutingListenerTest.php | 13 +- .../SessionInitByPostListenerTest.php | 27 +- .../SessionSetDynamicNameListenerTest.php | 21 +- .../EventListener/SiteAccessListenerTest.php | 7 +- .../Stubs/FooServiceInterface.php | 1 + .../Core/EventListener/Stubs/TestOutput.php | 1 + .../Core/EventListener/Stubs/ViewManager.php | 1 + .../Core/EventListener/Stubs/ViewProvider.php | 1 + .../ViewControllerListenerTest.php | 37 +- .../CrowdinRequestLocaleSubscriberTest.php | 3 +- .../DecoratedFragmentRendererTest.php | 35 +- .../Fragment/DirectFragmentRendererTest.php | 22 +- .../Fragment/FragmentListenerFactoryTest.php | 9 +- .../Fragment/FragmentRendererBaseTest.php | 19 +- .../Fragment/InlineFragmentRendererTest.php | 31 +- .../bundle/Core/Imagine/AliasCleanerTest.php | 3 +- .../Core/Imagine/AliasGeneratorTest.php | 115 +-- .../bundle/Core/Imagine/BinaryLoaderTest.php | 15 +- .../Cache/Resolver/ProxyResolverTest.php | 13 +- .../Cache/Resolver/RelativeResolverTest.php | 5 +- .../Imagine/Cache/ResolverFactoryTest.php | 13 +- .../Imagine/Filter/AbstractFilterTest.php | 21 +- .../Filter/FilterConfigurationTest.php | 47 +- .../Filter/Loader/BorderFilterLoaderTest.php | 61 +- .../Filter/Loader/CropFilterLoaderTest.php | 7 +- .../Loader/GrayscaleFilterLoaderTest.php | 11 +- .../Loader/ReduceNoiseFilterLoaderTest.php | 1 + .../Loader/ScaleDownOnlyFilterLoaderTest.php | 9 +- .../Loader/ScaleExactFilterLoaderTest.php | 7 +- .../Filter/Loader/ScaleFilterLoaderTest.php | 25 +- .../ScaleHeightDownOnlyFilterLoaderTest.php | 9 +- .../Loader/ScaleHeightFilterLoaderTest.php | 9 +- .../Loader/ScalePercentFilterLoaderTest.php | 13 +- .../ScaleWidthDownOnlyFilterLoaderTest.php | 9 +- .../Loader/ScaleWidthFilterLoaderTest.php | 9 +- .../Filter/Loader/SwirlFilterLoaderTest.php | 17 +- .../Imagine/Filter/UnsupportedFilterTest.php | 1 + .../Core/Imagine/IORepositoryResolverTest.php | 79 +- .../Imagine/ImageAsset/AliasGeneratorTest.php | 20 +- ...ceholderAliasGeneratorConfiguratorTest.php | 7 +- .../Imagine/PlaceholderAliasGeneratorTest.php | 45 +- .../GenericProviderTest.php | 17 +- .../PlaceholderProviderRegistryTest.php | 13 +- ...iasDirectoryVariationPathGeneratorTest.php | 1 + ...nalDirectoryVariationPathGeneratorTest.php | 1 + .../VariationPurger/IOVariationPurgerTest.php | 1 + .../ImageFileVariationPurgerTest.php | 31 +- .../LegacyStorageImageFileListTest.php | 4 +- .../Core/Matcher/ViewMatcherRegistryTest.php | 1 + .../bundle/Core/Routing/DefaultRouterTest.php | 15 +- .../Core/Routing/UrlAliasRouterTest.php | 109 +-- .../Config/IOConfigResolverTest.php | 6 +- .../Core/SiteAccess/MatcherBuilderTest.php | 17 +- .../SiteAccessMatcherRegistryTest.php | 6 +- .../Core/Translation/GlobCollectorTest.php | 1 + .../bundle/Core/URLChecker/URLCheckerTest.php | 13 +- .../Collector/IbexaCoreCollectorTest.php | 53 +- .../Compiler/DataCollectorPassTest.php | 1 + .../Compiler/IOConfigurationPassTest.php | 9 +- .../BaseFlysystemTest.php | 1 + .../BinarydataHandler/FlysystemTest.php | 1 + .../MetadataHandler/FlysystemTest.php | 1 + .../MetadataHandler/LegacyDFSClusterTest.php | 1 + .../ConfigurationFactoryTest.php | 3 +- .../IbexaIOExtensionTest.php | 1 + .../EventListener/StreamFileListenerTest.php | 13 +- .../Core/BaseCoreFieldTypeIntegrationTest.php | 1 + .../BinaryBaseStorageTest.php | 2 +- .../Repository/BaseContentServiceTest.php | 1 + .../Repository/BaseContentTypeServiceTest.php | 1 + .../BaseNonRedundantFieldSetTest.php | 1 + .../integration/Core/Repository/BaseTest.php | 7 +- .../Core/Repository/BaseTrashServiceTest.php | 1 + .../Core/Repository/BaseURLServiceTest.php | 17 +- .../Core/Repository/BookmarkServiceTest.php | 20 +- .../Core/Repository/Common/SlugConverter.php | 1 + .../Compiler/SetAllServicesPublicPass.php | 1 + .../ContentServiceAuthorizationTest.php | 61 +- .../Core/Repository/ContentServiceTest.php | 698 +++++++++++------- .../ContentTypeServiceAuthorizationTest.php | 17 + .../FieldType/AuthorIntegrationTest.php | 7 +- .../FieldType/BaseIntegrationTest.php | 62 +- .../FieldType/BinaryFileIntegrationTest.php | 19 +- .../FieldType/CheckboxIntegrationTest.php | 1 + .../FieldType/CountryIntegrationTest.php | 7 +- .../FieldType/DateAndTimeIntegrationTest.php | 7 +- .../FieldType/DateIntegrationTest.php | 5 +- .../FieldType/EmailAddressIntegrationTest.php | 7 +- .../FileSearchBaseIntegrationTest.php | 1 + .../FieldType/FloatIntegrationTest.php | 7 +- .../FieldType/ISBNIntegrationTest.php | 13 +- .../FieldType/ImageIntegrationTest.php | 9 +- .../FieldType/IntegerIntegrationTest.php | 7 +- .../FieldType/KeywordIntegrationTest.php | 27 +- .../FieldType/MapLocationIntegrationTest.php | 7 +- .../FieldType/MediaIntegrationTest.php | 17 +- .../FieldType/RelationIntegrationTest.php | 5 +- .../FieldType/RelationListIntegrationTest.php | 5 +- ...RelationSearchBaseIntegrationTestTrait.php | 1 + .../FieldType/SearchBaseIntegrationTest.php | 74 +- .../SearchMultivaluedBaseIntegrationTest.php | 29 +- .../FieldType/SelectionIntegrationTest.php | 7 +- .../SelectionMultilingualIntegrationTest.php | 1 + .../FieldType/TextBlockIntegrationTest.php | 7 +- .../FieldType/TextLineIntegrationTest.php | 7 +- .../FieldType/TimeIntegrationTest.php | 7 +- .../FieldType/UrlIntegrationTest.php | 7 +- .../FieldType/UserIntegrationTest.php | 27 +- .../Core/Repository/FieldTypeServiceTest.php | 12 +- .../integration/Core/Repository/IdManager.php | 1 + .../LanguageServiceAuthorizationTest.php | 8 + ...geServiceMaximumSupportedLanguagesTest.php | 4 +- .../Core/Repository/LanguageServiceTest.php | 71 +- .../LocationServiceAuthorizationTest.php | 22 +- .../Core/Repository/LocationServiceTest.php | 225 +++--- .../Repository/NonRedundantFieldSetTest.php | 369 ++++----- .../Repository/NotificationServiceTest.php | 26 +- .../ObjectStateServiceAuthorizationTest.php | 10 + .../Repository/ObjectStateServiceTest.php | 131 ++-- .../Parallel/BaseParallelTestCase.php | 2 +- .../Parallel/ContentServiceTest.php | 2 +- .../Repository/PermissionResolverTest.php | 64 +- .../Regression/EZP20018LanguageTest.php | 15 +- .../Regression/EZP20018ObjectStateTest.php | 17 +- .../Regression/EZP20018VisibilityTest.php | 17 +- .../Repository/Regression/EZP21069Test.php | 13 +- .../Repository/Regression/EZP21089Test.php | 1 + .../Regression/EZP21109EzIntegerTest.php | 5 +- .../Regression/EZP21771EzStringTest.php | 3 +- .../Repository/Regression/EZP21798Test.php | 3 +- ...6SearchOneContentMultipleLocationsTest.php | 5 +- .../EZP22408DeleteRelatedObjectTest.php | 5 +- .../EZP22409RelationListTypeStateTest.php | 1 + .../EZP22612URLAliasTranslations.php | 3 +- .../Regression/EZP22840RoleLimitations.php | 3 +- ...22958SearchSubtreePathstringFormatTest.php | 1 + .../EZP26327UrlAliasHistorizationTest.php | 5 +- ...ZP26367UrlAliasHistoryRedirectLoopTest.php | 29 +- .../EZP26551DeleteContentTypeDraftTest.php | 4 +- .../Regression/EZP28799SubtreeSearchTest.php | 5 +- .../Core/Repository/Regression/EnvTest.php | 9 +- .../Regression/PureNegativeQueryTest.php | 11 +- .../Core/Repository/RepositoryTest.php | 6 +- .../RoleServiceAuthorizationTest.php | 27 +- .../Core/Repository/RoleServiceTest.php | 215 ++++-- .../Repository/SearchEngineIndexingTest.php | 122 +-- .../SearchService/DeleteTranslationTest.php | 11 +- .../SearchServiceAuthorizationTest.php | 13 +- .../Repository/SearchServiceFulltextTest.php | 14 +- .../Repository/SearchServiceLocationTest.php | 90 ++- .../Core/Repository/SearchServiceTest.php | 240 +++--- ...ServiceTranslationLanguageFallbackTest.php | 31 +- .../SectionServiceAuthorizationTest.php | 6 +- .../Core/Repository/SectionServiceTest.php | 90 ++- .../Core/Repository/SettingServiceTest.php | 1 + .../TrashServiceAuthorizationTest.php | 7 + .../Core/Repository/TrashServiceTest.php | 90 +-- .../URLAliasServiceAuthorizationTest.php | 4 + .../Core/Repository/URLAliasServiceTest.php | 82 +- .../URLServiceAuthorizationTest.php | 1 + .../Core/Repository/URLServiceTest.php | 42 +- .../URLWildcardService/CriterionTest.php | 1 + .../URLWildcardServiceAuthorizationTest.php | 4 + .../Repository/URLWildcardServiceTest.php | 45 +- .../Repository/UserPreferenceServiceTest.php | 21 +- .../UserServiceAuthorizationTest.php | 15 + .../Core/Repository/UserServiceTest.php | 225 ++++-- .../User/Limitation/BaseLimitationTest.php | 1 + .../Limitation/ChangeOwnerLimitationTest.php | 1 + .../Limitation/ContentTypeLimitationTest.php | 4 +- .../Limitation/LanguageLimitationTest.php | 2 +- .../Limitation/LocationLimitationTest.php | 4 +- .../NewObjectStateLimitationTest.php | 2 + .../Limitation/NewSectionLimitationTest.php | 4 +- .../Limitation/ObjectStateLimitationTest.php | 1 + .../User/Limitation/OwnerLimitationTest.php | 2 + .../ParentContentTypeLimitationTest.php | 4 +- .../Limitation/ParentDepthLimitationTest.php | 4 +- .../Limitation/ParentOwnerLimitationTest.php | 4 +- .../ParentUserGroupLimitationTest.php | 4 +- .../Limitation/RolePolicyLimitationTest.php | 7 +- .../User/Limitation/SectionLimitationTest.php | 4 +- .../User/Limitation/StatusLimitationTest.php | 4 +- .../User/Limitation/SubtreeLimitationTest.php | 4 +- .../Limitation/UserGroupLimitationTest.php | 4 +- .../UserStorage/UserStorageGatewayTest.php | 1 + .../Compiler/FieldTypeRegistryPassTest.php | 1 + .../Search/FieldTypeRegistryPassTest.php | 1 + .../Legacy/CriteriaConverterPassTest.php | 1 + ...erionFieldValueHandlerRegistryPassTest.php | 1 + .../Legacy/SortClauseConverterPassTest.php | 1 + .../ExternalStorageRegistryPassTest.php | 1 + .../FieldValueConverterRegistryPassTest.php | 1 + .../RoleLimitationConverterPassTest.php | 1 + .../Stubs/GatewayBasedStorageHandler.php | 1 + .../BackwardCompatibleIteratorTest.php | 4 +- tests/lib/Event/AbstractServiceTest.php | 1 + tests/lib/Event/BookmarkServiceTest.php | 17 +- tests/lib/Event/ContentServiceTest.php | 185 ++--- tests/lib/Event/ContentTypeServiceTest.php | 171 ++--- tests/lib/Event/LanguageServiceTest.php | 81 +- tests/lib/Event/LocationServiceTest.php | 115 +-- tests/lib/Event/NotificationServiceTest.php | 35 +- tests/lib/Event/ObjectStateServiceTest.php | 105 +-- tests/lib/Event/RoleServiceTest.php | 157 ++-- tests/lib/Event/SectionServiceTest.php | 61 +- tests/lib/Event/SettingServiceTest.php | 1 + tests/lib/Event/TrashServiceTest.php | 73 +- tests/lib/Event/URLAliasServiceTest.php | 53 +- tests/lib/Event/URLServiceTest.php | 19 +- tests/lib/Event/URLWildcardServiceTest.php | 53 +- tests/lib/Event/UserPreferenceServiceTest.php | 9 +- tests/lib/Event/UserServiceTest.php | 151 ++-- tests/lib/FieldType/APIFieldTypeTest.php | 13 +- tests/lib/FieldType/AuthorTest.php | 1 + tests/lib/FieldType/BaseFieldTypeTest.php | 51 +- tests/lib/FieldType/BinaryBaseTest.php | 1 + tests/lib/FieldType/BinaryFileTest.php | 1 + tests/lib/FieldType/CheckboxTest.php | 1 + tests/lib/FieldType/CountryTest.php | 1 + tests/lib/FieldType/DateAndTimeTest.php | 9 +- tests/lib/FieldType/DateTest.php | 1 + tests/lib/FieldType/EmailAddressTest.php | 7 +- .../FieldType/EmailAddressValidatorTest.php | 16 +- tests/lib/FieldType/FieldTypeMockTest.php | 19 +- tests/lib/FieldType/FieldTypeTest.php | 1 + tests/lib/FieldType/FileSizeValidatorTest.php | 45 +- tests/lib/FieldType/FloatTest.php | 1 + .../lib/FieldType/FloatValueValidatorTest.php | 41 +- .../SymfonySerializerAdapterTest.php | 16 +- tests/lib/FieldType/ISBNTest.php | 1 + tests/lib/FieldType/Image/IO/LegacyTest.php | 141 ++-- .../PathGenerator/LegacyPathGeneratorTest.php | 3 +- .../FieldType/ImageAsset/AssetMapperTest.php | 50 +- tests/lib/FieldType/ImageAssetTest.php | 22 +- tests/lib/FieldType/ImageTest.php | 1 + tests/lib/FieldType/IntegerTest.php | 1 + .../FieldType/IntegerValueValidatorTest.php | 41 +- tests/lib/FieldType/KeywordTest.php | 1 + tests/lib/FieldType/MapLocationTest.php | 1 + tests/lib/FieldType/MediaTest.php | 1 + tests/lib/FieldType/RelationListTest.php | 3 +- tests/lib/FieldType/RelationTest.php | 3 +- tests/lib/FieldType/SelectionTest.php | 1 + .../FieldType/StringLengthValidatorTest.php | 43 +- tests/lib/FieldType/TextBlockTest.php | 1 + tests/lib/FieldType/TextLineTest.php | 1 + tests/lib/FieldType/TimeTest.php | 1 + .../Url/Gateway/DoctrineStorageTest.php | 17 +- tests/lib/FieldType/Url/UrlStorageTest.php | 65 +- tests/lib/FieldType/UrlTest.php | 1 + tests/lib/FieldType/UserTest.php | 15 +- .../SudoMainLocationLoaderTest.php | 31 +- tests/lib/Helper/ContentPreviewHelperTest.php | 31 +- tests/lib/Helper/FieldHelperTest.php | 41 +- .../ArrayTranslatorFieldsGroupsListTest.php | 13 +- ...itoryConfigFieldsGroupsListFactoryTest.php | 7 +- .../Helper/PreviewLocationProviderTest.php | 43 +- tests/lib/Helper/TranslationHelperTest.php | 71 +- .../ConfigScopeChangeAwareIOServiceTest.php | 58 +- .../IO/IOBinarydataHandler/FlysystemTest.php | 22 +- .../IO/IOMetadataHandler/FlysystemTest.php | 13 +- .../LegacyDFSClusterTest.php | 1 + tests/lib/IO/IOServiceTest.php | 91 +-- .../lib/IO/MetadataHandler/ImageSizeTest.php | 1 + .../lib/IO/MimeTypeDetector/FileInfoTest.php | 1 + tests/lib/IO/TolerantIOServiceTest.php | 5 +- tests/lib/IO/UrlRedecoratorTest.php | 17 +- tests/lib/Limitation/Base.php | 1 + .../Limitation/BlockingLimitationTypeTest.php | 23 +- .../ContentTypeLimitationTypeTest.php | 49 +- .../Limitation/LocationLimitationTypeTest.php | 57 +- .../Limitation/MemberOfLimitationTypeTest.php | 3 +- .../NewObjectStateLimitationTypeTest.php | 37 +- .../ObjectStateLimitationTypeTest.php | 9 +- .../ParentContentTypeLimitationTypeTest.php | 75 +- .../ParentDepthLimitationTypeTest.php | 48 +- .../lib/Limitation/RoleLimitationTypeTest.php | 2 +- .../Limitation/SectionLimitationTypeTest.php | 51 +- .../SiteAccessLimitationTypeTest.php | 10 +- .../Limitation/StatusLimitationTypeTest.php | 22 +- .../Limitation/SubtreeLimitationTypeTest.php | 71 +- .../CompoundMatcherNormalizerTest.php | 10 +- .../Serializer/HostElementNormalizerTest.php | 6 +- .../Serializer/HostTextNormalizerTest.php | 6 +- .../Serializer/MapNormalizerTest.php | 6 +- .../Serializer/RegexHostNormalizerTest.php | 6 +- .../Serializer/RegexNormalizerTest.php | 6 +- .../Serializer/RegexURINormalizerTest.php | 6 +- .../SimplifiedRequestNormalizerTest.php | 7 +- .../Serializer/Stubs/SerializerStub.php | 1 + .../Serializer/URIElementNormalizerTest.php | 6 +- .../Serializer/URITextNormalizerTest.php | 6 +- .../MVC/Symfony/Controller/ControllerTest.php | 13 +- .../Controller/QueryRenderControllerTest.php | 2 +- .../Php82HideDeprecationsErrorHandlerTest.php | 4 +- .../Event/ContentCacheClearEventTest.php | 9 +- .../Event/InteractiveLoginEventTest.php | 7 +- .../RouteReferenceGenerationEventTest.php | 11 +- .../Symfony/Event/ScopeChangeEventTest.php | 3 +- ...ContentViewTwigVariablesSubscriberTest.php | 12 +- .../LanguageSwitchListenerTest.php | 23 +- .../SiteAccessMatchListenerTest.php | 55 +- .../ImageAsset/ParameterProviderTest.php | 14 +- .../Relation/ParameterProviderTest.php | 1 + .../RelationList/ParameterProviderTest.php | 3 +- .../FieldType/User/ParameterProviderTest.php | 8 +- .../LocaleParameterProviderTest.php | 21 +- .../View/ParameterProviderRegistryTest.php | 7 +- .../Symfony/Locale/LocaleConverterTest.php | 7 +- .../UserLanguagePreferenceProviderTest.php | 6 +- .../Symfony/Matcher/ContentBased/BaseTest.php | 1 + .../Matcher/ContentBased/DepthTest.php | 19 +- .../Matcher/ContentBased/Id/ContentTest.php | 11 +- .../ContentBased/Id/ContentTypeGroupTest.php | 23 +- .../ContentBased/Id/ContentTypeTest.php | 11 +- .../Matcher/ContentBased/Id/LocationTest.php | 7 +- .../ContentBased/Id/ParentContentTypeTest.php | 27 +- .../ContentBased/Id/ParentLocationTest.php | 19 +- .../Matcher/ContentBased/Id/RemoteTest.php | 7 +- .../Matcher/ContentBased/Id/SectionTest.php | 11 +- .../Identifier/ContentTypeTest.php | 19 +- .../Identifier/ParentContentTypeTest.php | 35 +- .../ContentBased/Identifier/SectionTest.php | 22 +- .../Matcher/ContentBased/IsPreviewTest.php | 2 +- .../ContentBased/MultipleValuedTest.php | 8 +- .../Matcher/ContentBased/UrlAliasTest.php | 23 +- ...yConfiguredMatcherFactoryDecoratorTest.php | 7 +- .../lib/MVC/Symfony/Routing/GeneratorTest.php | 27 +- .../Routing/RouteReferenceGeneratorTest.php | 37 +- .../Symfony/Routing/RouteReferenceTest.php | 27 +- .../Symfony/Routing/SimplifiedRequestTest.php | 1 + .../Symfony/Routing/UrlAliasGeneratorTest.php | 79 +- .../Symfony/Routing/UrlAliasRouterTest.php | 197 ++--- .../AnonymousAuthenticationProviderTest.php | 9 +- ...efaultAuthenticationSuccessHandlerTest.php | 9 +- ...MeRepositoryAuthenticationProviderTest.php | 27 +- .../RepositoryAuthenticationProviderTest.php | 31 +- .../EventListener/SecurityListenerTest.php | 123 +-- .../MVC/Symfony/Security/HttpUtilsTest.php | 25 +- .../Security/InteractiveLoginTokenTest.php | 15 +- .../Security/User/EmailProviderTest.php | 46 +- .../Security/User/UsernameProviderTest.php | 46 +- .../MVC/Symfony/Security/UserWrappedTest.php | 49 +- .../Symfony/Security/Voter/CoreVoterTest.php | 15 +- .../Security/Voter/ValueObjectVoterTest.php | 13 +- .../SiteAccess/Compound/CompoundAndTest.php | 69 +- .../SiteAccess/Compound/CompoundOrTest.php | 73 +- .../SiteAccess/MatcherSerializationTest.php | 3 +- .../Provider/ChainSiteAccessProviderTest.php | 12 +- .../MVC/Symfony/SiteAccess/RouterBaseTest.php | 6 +- .../SiteAccess/RouterHostElementTest.php | 13 +- .../SiteAccess/RouterHostPortURITest.php | 35 +- .../SiteAccess/RouterHostRegexTest.php | 3 +- .../Symfony/SiteAccess/RouterHostTextTest.php | 9 +- .../Symfony/SiteAccess/RouterMapURITest.php | 23 +- .../SiteAccess/RouterPortHostURITest.php | 1 + .../SiteAccess/RouterSpecialPortsTest.php | 3 +- .../lib/MVC/Symfony/SiteAccess/RouterTest.php | 43 +- .../SiteAccess/RouterURIElement2Test.php | 19 +- .../SiteAccess/RouterURIElementTest.php | 17 +- .../Symfony/SiteAccess/RouterURIRegexTest.php | 5 +- .../Symfony/SiteAccess/RouterURITextTest.php | 13 +- .../SiteAccess/SiteAccessServiceTest.php | 4 +- .../Symfony/Templating/GlobalHelperTest.php | 41 +- .../Templating/RenderContentStrategyTest.php | 20 +- .../Templating/RenderLocationStrategyTest.php | 20 +- .../Symfony/Templating/RenderOptionsTest.php | 38 +- .../Symfony/Templating/RenderStrategyTest.php | 16 +- .../Twig/Extension/ContentExtensionTest.php | 17 +- ...FieldRenderingExtensionIntegrationTest.php | 5 +- .../Twig/Extension/FileSizeExtensionTest.php | 13 +- .../FileSystemTwigIntegrationTestCase.php | 11 +- .../Templating/Twig/ResourceProviderTest.php | 48 +- ...xceptionMessageTemplateFileVisitorTest.php | 2 +- .../lib/MVC/Symfony/View/AbstractViewTest.php | 10 +- .../View/Builder/ContentViewBuilderTest.php | 38 +- .../MVC/Symfony/View/LoginFormViewTest.php | 4 +- .../View/Renderer/TemplateRendererTest.php | 7 +- .../View/VariableProviderRegistryTest.php | 14 +- .../lib/MVC/Symfony/View/ViewManagerTest.php | 65 +- .../SearchHitAdapterFactoryTest.php | 8 +- .../ContentFilteringAdapterTest.php | 2 +- .../Pagination/ContentSearchAdapterTest.php | 1 + .../ContentSearchHitAdapterTest.php | 27 +- .../FixedSearchResultHitAdapterTest.php | 12 +- .../LocationFilteringAdapterTest.php | 2 +- .../Pagination/LocationSearchAdapterTest.php | 1 + .../LocationSearchHitAdapterTest.php | 27 +- tests/lib/Pagination/PagerfantaTest.php | 8 +- .../AbstractInMemoryCacheHandlerTest.php | 72 +- .../InMemoryClearingProxyAdapterTest.php | 38 +- .../Persistence/Cache/ContentHandlerTest.php | 15 +- .../Cache/ContentLanguageHandlerTest.php | 1 + .../Cache/ContentTypeHandlerTest.php | 17 +- .../CacheIdentifierGeneratorTest.php | 8 +- .../Cache/InMemory/InMemoryCacheTest.php | 94 +-- .../Persistence/Cache/LocationHandlerTest.php | 1 + .../Cache/ObjectStateHandlerTest.php | 1 + .../Cache/PersistenceHandlerTest.php | 71 +- .../Cache/PersistenceLoggerTest.php | 27 +- .../Persistence/Cache/SectionHandlerTest.php | 1 + .../Persistence/Cache/SettingHandlerTest.php | 1 + .../Cache/TransactionHandlerTest.php | 27 +- .../Persistence/Cache/TrashHandlerTest.php | 39 +- .../lib/Persistence/Cache/URLHandlerTest.php | 21 +- .../Persistence/Cache/UrlAliasHandlerTest.php | 1 + .../Cache/UrlWildcardHandlerTest.php | 1 + .../lib/Persistence/Cache/UserHandlerTest.php | 43 +- .../lib/Persistence/FieldTypeRegistryTest.php | 7 +- .../Bookmark/Gateway/DoctrineDatabaseTest.php | 16 +- .../Legacy/Bookmark/HandlerTest.php | 28 +- .../Legacy/Bookmark/MapperTest.php | 4 +- .../Legacy/Content/FieldHandlerTest.php | 289 ++++---- .../FieldValue/Converter/AuthorTest.php | 1 + .../FieldValue/Converter/CheckboxTest.php | 1 + .../FieldValue/Converter/CountryTest.php | 3 + .../FieldValue/Converter/DateAndTimeTest.php | 1 + .../Content/FieldValue/Converter/DateTest.php | 1 + .../Content/FieldValue/Converter/ISBNTest.php | 1 + .../FieldValue/Converter/KeywordTest.php | 15 +- .../FieldValue/Converter/MediaTest.php | 1 + .../FieldValue/Converter/RelationListTest.php | 21 +- .../FieldValue/Converter/RelationTest.php | 3 +- .../FieldValue/Converter/SelectionTest.php | 17 +- .../Converter/SerializableConverterTest.php | 38 +- .../FieldValue/Converter/TextBlockTest.php | 1 + .../FieldValue/Converter/TextLineTest.php | 1 + .../Content/FieldValue/Converter/TimeTest.php | 1 + .../Content/FieldValue/Converter/UrlTest.php | 1 + .../FieldValueConverterRegistryTest.php | 5 +- .../Content/Gateway/DoctrineDatabaseTest.php | 79 +- .../RandomSortClauseHandlerFactoryTest.php | 2 +- .../Language/CachingLanguageHandlerTest.php | 75 +- .../Language/Gateway/DoctrineDatabaseTest.php | 5 +- .../Content/Language/LanguageHandlerTest.php | 103 +-- .../Legacy/Content/Language/MapperTest.php | 3 +- .../Content/Language/MaskGeneratorTest.php | 20 +- .../Legacy/Content/LanguageAwareTestCase.php | 1 + .../Legacy/Content/LanguageHandlerMock.php | 1 + .../Location/Gateway/DoctrineDatabaseTest.php | 37 +- .../Gateway/DoctrineDatabaseTrashTest.php | 19 +- .../Legacy/Content/Location/MapperTest.php | 9 +- .../Content/Location/TrashHandlerTest.php | 149 ++-- .../Legacy/Content/LocationHandlerTest.php | 161 ++-- .../Gateway/DoctrineDatabaseTest.php | 35 +- .../Legacy/Content/ObjectState/MapperTest.php | 1 + .../ObjectState/ObjectStateHandlerTest.php | 329 +++++---- .../Section/Gateway/DoctrineDatabaseTest.php | 13 +- .../Content/Section/SectionHandlerTest.php | 79 +- .../Legacy/Content/StorageHandlerTest.php | 59 +- .../Legacy/Content/StorageRegistryTest.php | 5 +- .../Legacy/Content/TreeHandlerTest.php | 173 ++--- .../ContentUpdater/Action/AddFieldTest.php | 215 +++--- .../ContentUpdater/Action/RemoveFieldTest.php | 127 ++-- .../Content/Type/ContentUpdaterTest.php | 19 +- .../Type/Gateway/DoctrineDatabaseTest.php | 35 +- .../Legacy/Content/Type/MapperTest.php | 29 +- .../Content/Type/StorageDispatcherTest.php | 10 +- .../UrlAlias/Gateway/DoctrineDatabaseTest.php | 1 + .../Content/UrlAlias/SlugConverterTest.php | 43 +- .../Content/UrlAlias/UrlAliasHandlerTest.php | 259 ++++--- .../Content/UrlAlias/UrlAliasMapperTest.php | 1 + .../UrlWildcard/UrlWildcardMapperTest.php | 1 + .../Converter/ImageConverterTest.php | 4 +- tests/lib/Persistence/Legacy/HandlerTest.php | 45 +- .../Gateway/DoctrineDatabaseTest.php | 14 +- .../Legacy/Notification/HandlerTest.php | 34 +- .../Legacy/Notification/MapperTest.php | 4 +- .../Legacy/Setting/SettingHandlerTest.php | 5 +- .../SharedGateway/GatewayFactoryTest.php | 2 +- tests/lib/Persistence/Legacy/TestCase.php | 5 +- .../Legacy/TransactionHandlerTest.php | 51 +- .../Persistence/Legacy/URL/HandlerTest.php | 39 +- .../lib/Persistence/Legacy/URL/MapperTest.php | 5 +- .../URL/Query/CriteriaConverterTest.php | 11 +- .../CriterionHandler/CriterionHandlerTest.php | 13 +- .../Query/CriterionHandler/LogicalAndTest.php | 7 +- .../Query/CriterionHandler/LogicalNotTest.php | 5 +- .../Query/CriterionHandler/LogicalOrTest.php | 3 +- .../Query/CriterionHandler/MatchAllTest.php | 3 +- .../Query/CriterionHandler/MatchNoneTest.php | 3 +- .../Query/CriterionHandler/PatternTest.php | 9 +- .../Query/CriterionHandler/ValidityTest.php | 9 +- .../CriterionHandler/VisibleOnlyTest.php | 6 +- .../Role/Gateway/DoctrineDatabaseTest.php | 6 +- .../User/Role/LimitationConverterTest.php | 17 +- .../Legacy/User/UserHandlerTest.php | 43 +- .../Gateway/DoctrineDatabaseTest.php | 8 +- .../Legacy/UserPreference/HandlerTest.php | 16 +- .../Legacy/UserPreference/MapperTest.php | 2 +- ...tionProcessorDefinitionBasedParserTest.php | 3 +- ...sformationProcessorDefinitionBasedTest.php | 9 +- ...ransformationProcessorPcreCompilerTest.php | 21 +- ...ormationProcessorPreprocessedBasedTest.php | 7 +- tests/lib/Query/QueryFactoryTest.php | 6 +- .../BuiltIn/AbstractQueryTypeTest.php | 6 +- .../CustomFieldSortClauseParserTest.php | 4 +- .../DefaultSortClauseParserTest.php | 12 +- .../FieldSortClauseParserTest.php | 4 +- .../MapDistanceSortClauseParserTest.php | 4 +- .../RandomSortClauseParserTest.php | 4 +- .../SortClauseParserDispatcherTest.php | 4 +- .../BuiltIn/SortSpec/SortSpecLexerTest.php | 4 +- .../BuiltIn/SortSpec/SortSpecParserTest.php | 20 +- .../Common/FacetedSearchProvider.php | 1 + .../ContentFieldStrategyTest.php | 20 +- .../ContentThumbnail/StaticStrategyTest.php | 2 +- .../ThumbnailChainStrategyTest.php | 16 +- .../ContentValidatorStrategyTest.php | 9 +- .../BookmarkServiceDecoratorTest.php | 8 +- .../Decorator/ContentServiceDecoratorTest.php | 62 +- .../ContentTypeServiceDecoratorTest.php | 62 +- .../FieldTypeServiceDecoratorTest.php | 6 +- .../LanguageServiceDecoratorTest.php | 24 +- .../LocationServiceDecoratorTest.php | 38 +- .../NotificationServiceDecoratorTest.php | 14 +- .../ObjectStateServiceDecoratorTest.php | 44 +- .../Decorator/RoleServiceDecoratorTest.php | 54 +- .../Decorator/SearchServiceDecoratorTest.php | 12 +- .../Decorator/SectionServiceDecoratorTest.php | 24 +- .../Decorator/SettingServiceDecoratorTest.php | 12 +- .../TranslationServiceDecoratorTest.php | 4 +- .../Decorator/TrashServiceDecoratorTest.php | 12 +- .../URLAliasServiceDecoratorTest.php | 20 +- .../Decorator/URLServiceDecoratorTest.php | 12 +- .../URLWildcardServiceDecoratorTest.php | 10 +- .../UserPreferenceServiceDecoratorTest.php | 8 +- .../Decorator/UserServiceDecoratorTest.php | 58 +- .../Helper/FieldTypeRegistryTest.php | 17 +- tests/lib/Repository/IdManager/Php.php | 1 + .../AbstractSearchAdapterTest.php | 8 +- .../ContentFilteringAdapterTest.php | 2 +- .../LocationFilteringAdapterTest.php | 2 +- .../Repository/Iterator/BatchIteratorTest.php | 12 +- .../PermissionAwareLocationResolverTest.php | 4 +- .../DecoratedLocationServiceTest.php | 10 +- .../NameSchema/NameSchemaServiceTest.php | 2 +- .../CachedPermissionServiceTest.php | 22 +- .../PermissionCriterionResolverTest.php | 47 +- tests/lib/Repository/Service/Mock/Base.php | 45 +- .../Repository/Service/Mock/BookmarkTest.php | 66 +- .../Service/Mock/PermissionTest.php | 155 ++-- .../Mock/PermissionsCriterionHandlerTest.php | 53 +- .../Service/Mock/RelationProcessorTest.php | 89 +-- .../Service/Mock/RepositoryTest.php | 15 +- .../lib/Repository/Service/Mock/RoleTest.php | 633 ++++++++-------- .../Repository/Service/Mock/SearchTest.php | 177 ++--- .../Repository/Service/Mock/UrlAliasTest.php | 314 ++++---- tests/lib/Repository/Service/Mock/UrlTest.php | 67 +- .../Service/Mock/UrlWildcardTest.php | 174 ++--- .../Mock/UserPasswordValidatorTest.php | 2 +- .../Service/Mock/UserPreferenceTest.php | 34 +- .../lib/Repository/Service/Mock/UserTest.php | 1 + .../lib/Repository/Service/Mock/ValueStub.php | 1 + .../SiteAccessAware/AbstractServiceTest.php | 23 +- .../SiteAccessAware/ContentServiceTest.php | 1 + .../ContentTypeServiceTest.php | 1 + .../SiteAccessAware/LanguageServiceTest.php | 1 + .../SiteAccessAware/LocationServiceTest.php | 1 + .../ObjectStateServiceTest.php | 1 + .../SiteAccessAware/SearchServiceTest.php | 1 + .../SiteAccessAware/TrashServiceTest.php | 1 + .../SiteAccessAware/UrlAliasServiceTest.php | 1 + .../SiteAccessAware/UserServiceTest.php | 1 + .../Repository/Values/Content/ContentTest.php | 4 +- .../Values/Content/LanguageTest.php | 1 + .../Location/SubtreeTermAggregationTest.php | 8 +- .../Content/Query/Aggregation/RangeTest.php | 20 +- .../Query/Criterion/DateMetadataTest.php | 3 +- .../Repository/Values/Content/SectionTest.php | 1 + .../Values/Content/TrashItemTest.php | 1 + .../ContentType/ContentTypeDraftTest.php | 1 + .../Values/ContentType/ContentTypeTest.php | 22 +- .../FieldDefinitionCollectionTest.php | 74 +- .../Values/MultiLanguageTestTrait.php | 1 + .../ObjectState/ObjectStateGroupTest.php | 11 +- .../Values/ObjectState/ObjectStateTest.php | 11 +- .../lib/Repository/Values/User/PolicyTest.php | 1 + tests/lib/Repository/Values/User/RoleTest.php | 1 + .../Repository/Values/User/UserGroupTest.php | 7 +- tests/lib/Repository/Values/User/UserTest.php | 7 +- .../Values/ValueObjectTestTrait.php | 1 + .../LocationEventSubscriberTest.php | 4 +- tests/lib/Search/FieldNameResolverTest.php | 205 ++--- .../Legacy/Content/AbstractTestCase.php | 3 +- .../Legacy/Content/HandlerContentSortTest.php | 25 +- .../Legacy/Content/HandlerContentTest.php | 33 +- .../Content/HandlerLocationSortTest.php | 19 +- .../Legacy/Content/HandlerLocationTest.php | 33 +- tests/lib/Search/TestCase.php | 1 + .../Specification/AndSpecificationTest.php | 1 + .../Specification/BaseSpecificationTest.php | 1 + .../ContentContainerSpecificationTest.php | 6 +- .../Content/ContentTypeSpecificationTest.php | 8 +- .../Specification/NotSpecificationTest.php | 1 + .../lib/Specification/OrSpecificationTest.php | 1 + 1630 files changed, 10275 insertions(+), 7921 deletions(-) diff --git a/src/bundle/Core/ApiLoader/CacheFactory.php b/src/bundle/Core/ApiLoader/CacheFactory.php index a01c686542..76c64e8313 100644 --- a/src/bundle/Core/ApiLoader/CacheFactory.php +++ b/src/bundle/Core/ApiLoader/CacheFactory.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\ApiLoader; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/bundle/Core/ApiLoader/Exception/InvalidRepositoryException.php b/src/bundle/Core/ApiLoader/Exception/InvalidRepositoryException.php index 3b4941d068..d210cb1f9a 100644 --- a/src/bundle/Core/ApiLoader/Exception/InvalidRepositoryException.php +++ b/src/bundle/Core/ApiLoader/Exception/InvalidRepositoryException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\ApiLoader\Exception; use InvalidArgumentException; diff --git a/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngine.php b/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngine.php index 9ef5d897e5..0188c33f0c 100644 --- a/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngine.php +++ b/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngine.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\ApiLoader\Exception; use InvalidArgumentException; diff --git a/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngineIndexer.php b/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngineIndexer.php index 2f4c23bdf6..13918a4424 100644 --- a/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngineIndexer.php +++ b/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngineIndexer.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\ApiLoader\Exception; use InvalidArgumentException; diff --git a/src/bundle/Core/ApiLoader/Exception/InvalidStorageEngine.php b/src/bundle/Core/ApiLoader/Exception/InvalidStorageEngine.php index da452291ee..89936af64b 100644 --- a/src/bundle/Core/ApiLoader/Exception/InvalidStorageEngine.php +++ b/src/bundle/Core/ApiLoader/Exception/InvalidStorageEngine.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\ApiLoader\Exception; use InvalidArgumentException; diff --git a/src/bundle/Core/ApiLoader/RepositoryConfigurationProvider.php b/src/bundle/Core/ApiLoader/RepositoryConfigurationProvider.php index ed7b577b8f..681bef61a6 100644 --- a/src/bundle/Core/ApiLoader/RepositoryConfigurationProvider.php +++ b/src/bundle/Core/ApiLoader/RepositoryConfigurationProvider.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\ApiLoader; use Ibexa\Bundle\Core\ApiLoader\Exception\InvalidRepositoryException; diff --git a/src/bundle/Core/ApiLoader/RepositoryFactory.php b/src/bundle/Core/ApiLoader/RepositoryFactory.php index 2d2ac159fd..41c1de89c2 100644 --- a/src/bundle/Core/ApiLoader/RepositoryFactory.php +++ b/src/bundle/Core/ApiLoader/RepositoryFactory.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\ApiLoader; use Ibexa\Contracts\Core\Persistence\Filter\Content\Handler as ContentFilteringHandler; diff --git a/src/bundle/Core/ApiLoader/SearchEngineFactory.php b/src/bundle/Core/ApiLoader/SearchEngineFactory.php index 75d29fe433..adf691b794 100644 --- a/src/bundle/Core/ApiLoader/SearchEngineFactory.php +++ b/src/bundle/Core/ApiLoader/SearchEngineFactory.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\ApiLoader; use Ibexa\Bundle\Core\ApiLoader\Exception\InvalidSearchEngine; diff --git a/src/bundle/Core/ApiLoader/SearchEngineIndexerFactory.php b/src/bundle/Core/ApiLoader/SearchEngineIndexerFactory.php index a0190e3e02..4996de1dee 100644 --- a/src/bundle/Core/ApiLoader/SearchEngineIndexerFactory.php +++ b/src/bundle/Core/ApiLoader/SearchEngineIndexerFactory.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\ApiLoader; use Ibexa\Bundle\Core\ApiLoader\Exception\InvalidSearchEngine; diff --git a/src/bundle/Core/ApiLoader/StorageConnectionFactory.php b/src/bundle/Core/ApiLoader/StorageConnectionFactory.php index 365ab589b9..911664983f 100644 --- a/src/bundle/Core/ApiLoader/StorageConnectionFactory.php +++ b/src/bundle/Core/ApiLoader/StorageConnectionFactory.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\ApiLoader; use InvalidArgumentException; diff --git a/src/bundle/Core/ApiLoader/StorageEngineFactory.php b/src/bundle/Core/ApiLoader/StorageEngineFactory.php index b856747531..0e2ed665d2 100644 --- a/src/bundle/Core/ApiLoader/StorageEngineFactory.php +++ b/src/bundle/Core/ApiLoader/StorageEngineFactory.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\ApiLoader; use Ibexa\Bundle\Core\ApiLoader\Exception\InvalidStorageEngine; diff --git a/src/bundle/Core/Command/CleanupVersionsCommand.php b/src/bundle/Core/Command/CleanupVersionsCommand.php index 82d3bb0a33..73d73faa25 100644 --- a/src/bundle/Core/Command/CleanupVersionsCommand.php +++ b/src/bundle/Core/Command/CleanupVersionsCommand.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Command; use Doctrine\DBAL\Connection; diff --git a/src/bundle/Core/Command/CopySubtreeCommand.php b/src/bundle/Core/Command/CopySubtreeCommand.php index 5e65b57873..5cea94a657 100644 --- a/src/bundle/Core/Command/CopySubtreeCommand.php +++ b/src/bundle/Core/Command/CopySubtreeCommand.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Command; use Ibexa\Contracts\Core\Repository\ContentTypeService; diff --git a/src/bundle/Core/Command/DebugConfigResolverCommand.php b/src/bundle/Core/Command/DebugConfigResolverCommand.php index 42f8d11dae..ba4cba3929 100644 --- a/src/bundle/Core/Command/DebugConfigResolverCommand.php +++ b/src/bundle/Core/Command/DebugConfigResolverCommand.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Command; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/bundle/Core/Command/DeleteContentTranslationCommand.php b/src/bundle/Core/Command/DeleteContentTranslationCommand.php index a1bd2bac3b..9752bfd09e 100644 --- a/src/bundle/Core/Command/DeleteContentTranslationCommand.php +++ b/src/bundle/Core/Command/DeleteContentTranslationCommand.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Command; use Exception; diff --git a/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php b/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php index b65cef4e45..6fbbaedc83 100644 --- a/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php +++ b/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Command; use Exception; diff --git a/src/bundle/Core/Command/ReindexCommand.php b/src/bundle/Core/Command/ReindexCommand.php index bd8d6cc246..704a1d3dfe 100644 --- a/src/bundle/Core/Command/ReindexCommand.php +++ b/src/bundle/Core/Command/ReindexCommand.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Command; use function count; diff --git a/src/bundle/Core/Converter/ContentParamConverter.php b/src/bundle/Core/Converter/ContentParamConverter.php index 3742773eca..a517c30c3d 100644 --- a/src/bundle/Core/Converter/ContentParamConverter.php +++ b/src/bundle/Core/Converter/ContentParamConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Converter; use Ibexa\Contracts\Core\Repository\ContentService; diff --git a/src/bundle/Core/Converter/LocationParamConverter.php b/src/bundle/Core/Converter/LocationParamConverter.php index 8bcbc9e053..4669c25af9 100644 --- a/src/bundle/Core/Converter/LocationParamConverter.php +++ b/src/bundle/Core/Converter/LocationParamConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Converter; use Ibexa\Contracts\Core\Repository\LocationService; diff --git a/src/bundle/Core/Converter/RepositoryParamConverter.php b/src/bundle/Core/Converter/RepositoryParamConverter.php index a18e341bff..875345b69d 100644 --- a/src/bundle/Core/Converter/RepositoryParamConverter.php +++ b/src/bundle/Core/Converter/RepositoryParamConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Converter; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; diff --git a/src/bundle/Core/DependencyInjection/Compiler/BinaryContentDownloadPass.php b/src/bundle/Core/DependencyInjection/Compiler/BinaryContentDownloadPass.php index 2ca0180814..b47dc795f6 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/BinaryContentDownloadPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/BinaryContentDownloadPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Core\FieldType\BinaryFile\BinaryFileStorage; diff --git a/src/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPass.php b/src/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPass.php index 244965652e..0fd2280c12 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\DependencyInjection\Configuration\ChainConfigResolver; diff --git a/src/bundle/Core/DependencyInjection/Compiler/ChainRoutingPass.php b/src/bundle/Core/DependencyInjection/Compiler/ChainRoutingPass.php index a92d9b9d4e..18c3dda701 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/ChainRoutingPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/ChainRoutingPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Core\MVC\Symfony\Routing\ChainRouter; diff --git a/src/bundle/Core/DependencyInjection/Compiler/ConsoleCacheWarmupPass.php b/src/bundle/Core/DependencyInjection/Compiler/ConsoleCacheWarmupPass.php index 28c53a6532..4681ed2fc1 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/ConsoleCacheWarmupPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/ConsoleCacheWarmupPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; diff --git a/src/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPass.php b/src/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPass.php index d43ac8fdb3..b07da6d610 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Core\MVC\Symfony\FieldType\View\ParameterProviderRegistry; diff --git a/src/bundle/Core/DependencyInjection/Compiler/FragmentPass.php b/src/bundle/Core/DependencyInjection/Compiler/FragmentPass.php index 286d5d23b0..066c50e2c4 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/FragmentPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/FragmentPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\Fragment\DecoratedFragmentRenderer; diff --git a/src/bundle/Core/DependencyInjection/Compiler/ImaginePass.php b/src/bundle/Core/DependencyInjection/Compiler/ImaginePass.php index 07902794cb..719ad2c8f1 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/ImaginePass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/ImaginePass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\Imagine\Filter\FilterConfiguration; diff --git a/src/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPass.php b/src/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPass.php index 20fbe8aeab..21c7dcafb7 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\Imagine\PlaceholderProviderRegistry; diff --git a/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEngineIndexerPass.php b/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEngineIndexerPass.php index d6a3235ac7..4707a69ee8 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEngineIndexerPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEngineIndexerPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\ApiLoader\SearchEngineIndexerFactory; diff --git a/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEnginePass.php b/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEnginePass.php index 2e3df7eb34..383dd14753 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEnginePass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEnginePass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\ApiLoader\SearchEngineFactory; diff --git a/src/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePass.php b/src/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePass.php index 5daf4d41ae..2306ba17c7 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\ApiLoader\StorageEngineFactory; diff --git a/src/bundle/Core/DependencyInjection/Compiler/RouterPass.php b/src/bundle/Core/DependencyInjection/Compiler/RouterPass.php index d18fba635a..937c809ad9 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/RouterPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/RouterPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\Routing\DefaultRouter; diff --git a/src/bundle/Core/DependencyInjection/Compiler/SecurityPass.php b/src/bundle/Core/DependencyInjection/Compiler/SecurityPass.php index 28aa5b0f6b..4add7aa5fb 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/SecurityPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/SecurityPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Contracts\Core\Repository\PermissionResolver; diff --git a/src/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPass.php b/src/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPass.php index de299def82..77bc0d2d20 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter; diff --git a/src/bundle/Core/DependencyInjection/Compiler/StorageConnectionPass.php b/src/bundle/Core/DependencyInjection/Compiler/StorageConnectionPass.php index 58f655155d..afd4ecdd12 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/StorageConnectionPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/StorageConnectionPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Compiler; use LogicException; diff --git a/src/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPass.php b/src/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPass.php index 5274e55c11..1342765abb 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\Translation\GlobCollector; diff --git a/src/bundle/Core/DependencyInjection/Compiler/URLHandlerPass.php b/src/bundle/Core/DependencyInjection/Compiler/URLHandlerPass.php index 5e54a9cd27..2f98d59c6b 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/URLHandlerPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/URLHandlerPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\URLChecker\URLHandlerRegistry; diff --git a/src/bundle/Core/DependencyInjection/Compiler/ViewProvidersPass.php b/src/bundle/Core/DependencyInjection/Compiler/ViewProvidersPass.php index 99a9c8b557..468cdca1ea 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/ViewProvidersPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/ViewProvidersPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\EventListener\ConfigScopeListener; diff --git a/src/bundle/Core/DependencyInjection/Configuration.php b/src/bundle/Core/DependencyInjection/Configuration.php index 4b859f673b..25e2ad74db 100644 --- a/src/bundle/Core/DependencyInjection/Configuration.php +++ b/src/bundle/Core/DependencyInjection/Configuration.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection; use Ibexa\Bundle\Core\DependencyInjection\Configuration\ParserInterface; diff --git a/src/bundle/Core/DependencyInjection/Configuration/AbstractParser.php b/src/bundle/Core/DependencyInjection/Configuration/AbstractParser.php index 33d0210a1e..2f3b712ac6 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/AbstractParser.php +++ b/src/bundle/Core/DependencyInjection/Configuration/AbstractParser.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration; use Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface; diff --git a/src/bundle/Core/DependencyInjection/Configuration/ChainConfigResolver.php b/src/bundle/Core/DependencyInjection/Configuration/ChainConfigResolver.php index fe6175e4b0..e158f93593 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ChainConfigResolver.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ChainConfigResolver.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParser.php b/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParser.php index e58d33375a..0d7c6be371 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParser.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParser.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\ComplexSettings; use Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\DynamicSettingParser; diff --git a/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserInterface.php b/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserInterface.php index 93425374c0..785b33399a 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\ComplexSettings; use Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\DynamicSettingParserInterface; diff --git a/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolver.php b/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolver.php index 2a3b3f57c1..67fb6f3609 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolver.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolver.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\ComplexSettings; /** diff --git a/src/bundle/Core/DependencyInjection/Configuration/ConfigBuilderInterface.php b/src/bundle/Core/DependencyInjection/Configuration/ConfigBuilderInterface.php index 01231b0ec3..594b64ad60 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ConfigBuilderInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ConfigBuilderInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration; use Symfony\Component\Config\Resource\ResourceInterface; diff --git a/src/bundle/Core/DependencyInjection/Configuration/ConfigParser.php b/src/bundle/Core/DependencyInjection/Configuration/ConfigParser.php index d963217279..2cec92863e 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ConfigParser.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ConfigParser.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration; use Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface; diff --git a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php index 09e6c64263..ceeb68163b 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration; use Ibexa\Core\MVC\Exception\ParameterNotFoundException; diff --git a/src/bundle/Core/DependencyInjection/Configuration/ContainerConfigBuilder.php b/src/bundle/Core/DependencyInjection/Configuration/ContainerConfigBuilder.php index 6c0d0e7b90..70638c80c9 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ContainerConfigBuilder.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ContainerConfigBuilder.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration; use Symfony\Component\DependencyInjection\ContainerBuilder; diff --git a/src/bundle/Core/DependencyInjection/Configuration/FieldTypeParserInterface.php b/src/bundle/Core/DependencyInjection/Configuration/FieldTypeParserInterface.php index 6c9df96c8d..97d0068e8e 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/FieldTypeParserInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/FieldTypeParserInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration; use Symfony\Component\Config\Definition\Builder\NodeBuilder; diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/AbstractFieldTypeParser.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/AbstractFieldTypeParser.php index c7d80ed798..537437eb25 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/AbstractFieldTypeParser.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/AbstractFieldTypeParser.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser; use Ibexa\Bundle\Core\DependencyInjection\Configuration\AbstractParser; diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/Common.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/Common.php index 803c2a5ba7..f444a97fec 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/Common.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/Common.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser; use Ibexa\Bundle\Core\DependencyInjection\Configuration\AbstractParser; diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/Content.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/Content.php index 64ee5b8773..21547fa6de 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/Content.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/Content.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser; use Ibexa\Bundle\Core\DependencyInjection\Configuration\AbstractParser; diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/ContentView.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/ContentView.php index 365ee5164c..85792b8b15 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/ContentView.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/ContentView.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser; class ContentView extends View diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldDefinitionEditTemplates.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldDefinitionEditTemplates.php index 103e502e20..ce3a7d5837 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldDefinitionEditTemplates.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldDefinitionEditTemplates.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser; class FieldDefinitionEditTemplates extends Templates diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldDefinitionSettingsTemplates.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldDefinitionSettingsTemplates.php index e8d5932a82..390576d71e 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldDefinitionSettingsTemplates.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldDefinitionSettingsTemplates.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser; class FieldDefinitionSettingsTemplates extends Templates diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldEditTemplates.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldEditTemplates.php index 1b82c4dc94..666d8910ac 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldEditTemplates.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldEditTemplates.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser; class FieldEditTemplates extends Templates diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldTemplates.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldTemplates.php index 8c796d684b..e4d4c65c64 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldTemplates.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldTemplates.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser; class FieldTemplates extends Templates diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/IO.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/IO.php index 1717c667a5..5412989ea8 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/IO.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/IO.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser; use Ibexa\Bundle\Core\DependencyInjection\Configuration\AbstractParser; diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/Image.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/Image.php index 26972e3829..c509fda7e2 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/Image.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/Image.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser; use Ibexa\Bundle\Core\DependencyInjection\Configuration\AbstractParser; diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/Languages.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/Languages.php index 7d87316b26..a0193499ae 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/Languages.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/Languages.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser; use Ibexa\Bundle\Core\DependencyInjection\Configuration\AbstractParser; diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/LocationView.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/LocationView.php index 6d8a1ea37d..c39ec2f7fe 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/LocationView.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/LocationView.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser; use Ibexa\Bundle\Core\DependencyInjection\Configuration\ConfigResolver; diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/Templates.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/Templates.php index 6d5274d8ee..84297411ca 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/Templates.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/Templates.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser; use Ibexa\Bundle\Core\DependencyInjection\Configuration\AbstractParser; diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/UrlChecker.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/UrlChecker.php index 99836f93df..ba9bfdf03f 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/UrlChecker.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/UrlChecker.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser; use Ibexa\Bundle\Core\DependencyInjection\Configuration\AbstractParser; diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/View.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/View.php index 6cb2f70dd1..0cbb977aeb 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/View.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/View.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser; use Ibexa\Bundle\Core\DependencyInjection\Configuration\AbstractParser; diff --git a/src/bundle/Core/DependencyInjection/Configuration/ParserInterface.php b/src/bundle/Core/DependencyInjection/Configuration/ParserInterface.php index 96cccb2e60..e172062d15 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ParserInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ParserInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration; use Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\HookableConfigurationMapperInterface; diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Configuration.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Configuration.php index ede48e5bc3..4306a3fa78 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Configuration.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Configuration.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationMapperInterface.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationMapperInterface.php index 7196a1c948..b285bb3927 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationMapperInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationMapperInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware; /** diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php index 64b0bae3a6..0e725689aa 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware; use InvalidArgumentException; diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php index 2aa708bced..c0ad0f2d0a 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware; use Ibexa\Bundle\Core\DependencyInjection\Configuration\ConfigResolver; diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerInterface.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerInterface.php index 901799759b..ea9e20e494 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware; use Symfony\Component\DependencyInjection\ContainerInterface; diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParser.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParser.php index 4c26f6048c..325350f93f 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParser.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParser.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware; use OutOfBoundsException; diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserInterface.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserInterface.php index cc5d4e8f98..57a67d900d 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware; /** diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/HookableConfigurationMapperInterface.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/HookableConfigurationMapperInterface.php index 9f6ffd935f..302401823c 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/HookableConfigurationMapperInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/HookableConfigurationMapperInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware; /** diff --git a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollector.php b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollector.php index 4752c522d8..c470209adb 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollector.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollector.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Suggestion\Collector; use Ibexa\Bundle\Core\DependencyInjection\Configuration\Suggestion\ConfigSuggestion; diff --git a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorAwareInterface.php b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorAwareInterface.php index 63ed004eb2..79eabdb74a 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorAwareInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorAwareInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Suggestion\Collector; interface SuggestionCollectorAwareInterface diff --git a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorInterface.php b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorInterface.php index c278e123fc..4238a92411 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Suggestion\Collector; use Ibexa\Bundle\Core\DependencyInjection\Configuration\Suggestion\ConfigSuggestion; diff --git a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestion.php b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestion.php index 0ed806dca0..9e6fce39fd 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestion.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestion.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Suggestion; /** diff --git a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/SuggestionFormatterInterface.php b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/SuggestionFormatterInterface.php index eb3f1ef795..953126247d 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/SuggestionFormatterInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/SuggestionFormatterInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Suggestion\Formatter; use Ibexa\Bundle\Core\DependencyInjection\Configuration\Suggestion\ConfigSuggestion; diff --git a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatter.php b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatter.php index 7b007bc6b5..8b4fcd3bac 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatter.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Configuration\Suggestion\Formatter; use Ibexa\Bundle\Core\DependencyInjection\Configuration\Suggestion\ConfigSuggestion; diff --git a/src/bundle/Core/DependencyInjection/Security/HttpBasicFactory.php b/src/bundle/Core/DependencyInjection/Security/HttpBasicFactory.php index ee4170d6ce..6062a7e5f5 100644 --- a/src/bundle/Core/DependencyInjection/Security/HttpBasicFactory.php +++ b/src/bundle/Core/DependencyInjection/Security/HttpBasicFactory.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Security; use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\HttpBasicFactory as BaseHttpBasicFactory; diff --git a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilder.php b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilder.php index a81e201004..f23c4026a6 100644 --- a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilder.php +++ b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilder.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Security\PolicyProvider; use Ibexa\Bundle\Core\DependencyInjection\Configuration\ContainerConfigBuilder; diff --git a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PolicyProviderInterface.php b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PolicyProviderInterface.php index 1307863012..e8333bbc47 100644 --- a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PolicyProviderInterface.php +++ b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PolicyProviderInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Security\PolicyProvider; use Ibexa\Bundle\Core\DependencyInjection\Configuration\ConfigBuilderInterface; diff --git a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/RepositoryPolicyProvider.php b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/RepositoryPolicyProvider.php index ede1ed3f7a..22e116f3b9 100644 --- a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/RepositoryPolicyProvider.php +++ b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/RepositoryPolicyProvider.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Security\PolicyProvider; /** diff --git a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProvider.php b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProvider.php index f9caa6d375..0eff6a5941 100644 --- a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProvider.php +++ b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProvider.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\DependencyInjection\Security\PolicyProvider; use Ibexa\Bundle\Core\DependencyInjection\Configuration\ConfigBuilderInterface; diff --git a/src/bundle/Core/EventListener/BackgroundIndexingTerminateListener.php b/src/bundle/Core/EventListener/BackgroundIndexingTerminateListener.php index 1cefdf70fb..d7ca44970e 100644 --- a/src/bundle/Core/EventListener/BackgroundIndexingTerminateListener.php +++ b/src/bundle/Core/EventListener/BackgroundIndexingTerminateListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\EventListener; use Ibexa\Contracts\Core\Persistence\Content\ContentInfo; diff --git a/src/bundle/Core/EventListener/CacheViewResponseListener.php b/src/bundle/Core/EventListener/CacheViewResponseListener.php index 6cd55df609..ac298147c9 100644 --- a/src/bundle/Core/EventListener/CacheViewResponseListener.php +++ b/src/bundle/Core/EventListener/CacheViewResponseListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\EventListener; use Ibexa\Contracts\Core\Repository\Values\Content\Location; diff --git a/src/bundle/Core/EventListener/ConfigScopeListener.php b/src/bundle/Core/EventListener/ConfigScopeListener.php index b9fab21cd1..a97e3ba92f 100644 --- a/src/bundle/Core/EventListener/ConfigScopeListener.php +++ b/src/bundle/Core/EventListener/ConfigScopeListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\EventListener; use Ibexa\Contracts\Core\MVC\EventSubscriber\ConfigScopeChangeSubscriber; diff --git a/src/bundle/Core/EventListener/ConsoleCommandListener.php b/src/bundle/Core/EventListener/ConsoleCommandListener.php index 86454f7ac8..484be6e007 100644 --- a/src/bundle/Core/EventListener/ConsoleCommandListener.php +++ b/src/bundle/Core/EventListener/ConsoleCommandListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\EventListener; use Ibexa\Core\MVC\Exception\InvalidSiteAccessException; diff --git a/src/bundle/Core/EventListener/ContentDownloadRouteReferenceListener.php b/src/bundle/Core/EventListener/ContentDownloadRouteReferenceListener.php index 1f9a4d3ddb..1cb9c69039 100644 --- a/src/bundle/Core/EventListener/ContentDownloadRouteReferenceListener.php +++ b/src/bundle/Core/EventListener/ContentDownloadRouteReferenceListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\EventListener; use Ibexa\Contracts\Core\Repository\Values\Content\Content; diff --git a/src/bundle/Core/EventListener/ExceptionListener.php b/src/bundle/Core/EventListener/ExceptionListener.php index 78fb4b00d8..7e1c322f83 100644 --- a/src/bundle/Core/EventListener/ExceptionListener.php +++ b/src/bundle/Core/EventListener/ExceptionListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\EventListener; use Exception; diff --git a/src/bundle/Core/EventListener/IndexRequestListener.php b/src/bundle/Core/EventListener/IndexRequestListener.php index 90b9a55587..6fcf98714a 100644 --- a/src/bundle/Core/EventListener/IndexRequestListener.php +++ b/src/bundle/Core/EventListener/IndexRequestListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\EventListener; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/bundle/Core/EventListener/LocaleListener.php b/src/bundle/Core/EventListener/LocaleListener.php index ee5c62b397..738bc08f11 100644 --- a/src/bundle/Core/EventListener/LocaleListener.php +++ b/src/bundle/Core/EventListener/LocaleListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\EventListener; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/bundle/Core/EventListener/OriginalRequestListener.php b/src/bundle/Core/EventListener/OriginalRequestListener.php index 82843293c1..952353fe93 100644 --- a/src/bundle/Core/EventListener/OriginalRequestListener.php +++ b/src/bundle/Core/EventListener/OriginalRequestListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\EventListener; use Symfony\Component\EventDispatcher\EventSubscriberInterface; diff --git a/src/bundle/Core/EventListener/PreviewRequestListener.php b/src/bundle/Core/EventListener/PreviewRequestListener.php index 2b095fef55..a60de5483d 100644 --- a/src/bundle/Core/EventListener/PreviewRequestListener.php +++ b/src/bundle/Core/EventListener/PreviewRequestListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\EventListener; use Ibexa\Core\MVC\Symfony\Controller\Content\PreviewController; diff --git a/src/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListener.php b/src/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListener.php index c58754c543..e9c5c71060 100644 --- a/src/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListener.php +++ b/src/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\EventListener; use Symfony\Component\EventDispatcher\EventSubscriberInterface; diff --git a/src/bundle/Core/EventListener/RequestEventListener.php b/src/bundle/Core/EventListener/RequestEventListener.php index 1e49692d2c..4085d8b889 100644 --- a/src/bundle/Core/EventListener/RequestEventListener.php +++ b/src/bundle/Core/EventListener/RequestEventListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\EventListener; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/bundle/Core/EventListener/RoutingListener.php b/src/bundle/Core/EventListener/RoutingListener.php index b9a5774fad..68794f91c7 100644 --- a/src/bundle/Core/EventListener/RoutingListener.php +++ b/src/bundle/Core/EventListener/RoutingListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\EventListener; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/bundle/Core/EventListener/SessionInitByPostListener.php b/src/bundle/Core/EventListener/SessionInitByPostListener.php index 2fca699560..31bac46af5 100644 --- a/src/bundle/Core/EventListener/SessionInitByPostListener.php +++ b/src/bundle/Core/EventListener/SessionInitByPostListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\EventListener; use Ibexa\Core\MVC\Symfony\Event\PostSiteAccessMatchEvent; diff --git a/src/bundle/Core/EventListener/SessionSetDynamicNameListener.php b/src/bundle/Core/EventListener/SessionSetDynamicNameListener.php index bda86b016f..90b8e0af18 100644 --- a/src/bundle/Core/EventListener/SessionSetDynamicNameListener.php +++ b/src/bundle/Core/EventListener/SessionSetDynamicNameListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\EventListener; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/bundle/Core/EventListener/SiteAccessListener.php b/src/bundle/Core/EventListener/SiteAccessListener.php index e35ca05a29..5c067d473d 100644 --- a/src/bundle/Core/EventListener/SiteAccessListener.php +++ b/src/bundle/Core/EventListener/SiteAccessListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\EventListener; use Ibexa\Core\MVC\Symfony\Event\PostSiteAccessMatchEvent; diff --git a/src/bundle/Core/EventListener/ViewControllerListener.php b/src/bundle/Core/EventListener/ViewControllerListener.php index 2d4169263d..ec42bfc18f 100644 --- a/src/bundle/Core/EventListener/ViewControllerListener.php +++ b/src/bundle/Core/EventListener/ViewControllerListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\EventListener; use Ibexa\Contracts\Core\Event\View\PostBuildViewEvent; diff --git a/src/bundle/Core/EventListener/ViewRendererListener.php b/src/bundle/Core/EventListener/ViewRendererListener.php index 27cafda9cb..83f24b1034 100644 --- a/src/bundle/Core/EventListener/ViewRendererListener.php +++ b/src/bundle/Core/EventListener/ViewRendererListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\EventListener; use Ibexa\Core\MVC\Symfony\View\Renderer as ViewRenderer; diff --git a/src/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriber.php b/src/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriber.php index c6e6e39ea6..986a2d92f3 100644 --- a/src/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriber.php +++ b/src/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriber.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\EventSubscriber; use Symfony\Component\EventDispatcher\EventSubscriberInterface; diff --git a/src/bundle/Core/Features/Context/BasicContentContext.php b/src/bundle/Core/Features/Context/BasicContentContext.php index 80ce1b481a..7a35067a92 100644 --- a/src/bundle/Core/Features/Context/BasicContentContext.php +++ b/src/bundle/Core/Features/Context/BasicContentContext.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Features\Context; use Behat\Behat\Context\Context; diff --git a/src/bundle/Core/Features/Context/ConsoleContext.php b/src/bundle/Core/Features/Context/ConsoleContext.php index 1bb0cfc1e9..7e0921259d 100644 --- a/src/bundle/Core/Features/Context/ConsoleContext.php +++ b/src/bundle/Core/Features/Context/ConsoleContext.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Features\Context; use Behat\Behat\Context\Context; diff --git a/src/bundle/Core/Features/Context/ContentContext.php b/src/bundle/Core/Features/Context/ContentContext.php index 3202babf06..e404b4f9ec 100644 --- a/src/bundle/Core/Features/Context/ContentContext.php +++ b/src/bundle/Core/Features/Context/ContentContext.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Features\Context; use Behat\Behat\Context\Context; diff --git a/src/bundle/Core/Features/Context/ContentPreviewContext.php b/src/bundle/Core/Features/Context/ContentPreviewContext.php index f4bb0678bb..dfd9c9c7f1 100644 --- a/src/bundle/Core/Features/Context/ContentPreviewContext.php +++ b/src/bundle/Core/Features/Context/ContentPreviewContext.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Features\Context; use Behat\Behat\Hook\Scope\BeforeScenarioScope; diff --git a/src/bundle/Core/Features/Context/ContentTypeContext.php b/src/bundle/Core/Features/Context/ContentTypeContext.php index e67fb58664..ebb6600a07 100644 --- a/src/bundle/Core/Features/Context/ContentTypeContext.php +++ b/src/bundle/Core/Features/Context/ContentTypeContext.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Features\Context; use Behat\Behat\Context\Context; diff --git a/src/bundle/Core/Features/Context/ExceptionContext.php b/src/bundle/Core/Features/Context/ExceptionContext.php index 18043fb104..c6ec93b2d6 100644 --- a/src/bundle/Core/Features/Context/ExceptionContext.php +++ b/src/bundle/Core/Features/Context/ExceptionContext.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Features\Context; use Behat\Behat\Context\Context; diff --git a/src/bundle/Core/Features/Context/FieldTypeContext.php b/src/bundle/Core/Features/Context/FieldTypeContext.php index 9ce8cd3b85..8f45e517ed 100644 --- a/src/bundle/Core/Features/Context/FieldTypeContext.php +++ b/src/bundle/Core/Features/Context/FieldTypeContext.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Features\Context; use Behat\Behat\Context\Context; diff --git a/src/bundle/Core/Features/Context/QueryControllerContext.php b/src/bundle/Core/Features/Context/QueryControllerContext.php index 225ef2210c..c356ae5199 100644 --- a/src/bundle/Core/Features/Context/QueryControllerContext.php +++ b/src/bundle/Core/Features/Context/QueryControllerContext.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Features\Context; use Behat\MinkExtension\Context\RawMinkContext; diff --git a/src/bundle/Core/Features/Context/RoleContext.php b/src/bundle/Core/Features/Context/RoleContext.php index 526215d06f..e870a5e8fe 100644 --- a/src/bundle/Core/Features/Context/RoleContext.php +++ b/src/bundle/Core/Features/Context/RoleContext.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Features\Context; use Behat\Behat\Context\Context; diff --git a/src/bundle/Core/Features/Context/UserContext.php b/src/bundle/Core/Features/Context/UserContext.php index e239bcf462..b50de7f76a 100644 --- a/src/bundle/Core/Features/Context/UserContext.php +++ b/src/bundle/Core/Features/Context/UserContext.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Features\Context; use Behat\Behat\Context\Context; @@ -69,6 +70,7 @@ public function searchUserByLogin($username, $parentGroupId = null) return $user; } } + // user not found in $parentGroupId return null; } @@ -319,6 +321,7 @@ public function createPasswordHash($login, $password, $type) /* PASSWORD_HASH_PLAINTEXT */ return $password; } + /* PASSWORD_HASH_MD5_PASSWORD (1) */ return md5($password); } @@ -416,6 +419,7 @@ public function iHaveTheFollowingUsers(TableNode $table) /** * @Given a User with name :username already exists + * * @Then User with name :username exists * * Checks that user ':username' exists. diff --git a/src/bundle/Core/Features/Context/YamlConfigurationContext.php b/src/bundle/Core/Features/Context/YamlConfigurationContext.php index 7526fec88b..523073019c 100644 --- a/src/bundle/Core/Features/Context/YamlConfigurationContext.php +++ b/src/bundle/Core/Features/Context/YamlConfigurationContext.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Features\Context; use Behat\Behat\Context\Context; diff --git a/src/bundle/Core/Fragment/DecoratedFragmentRenderer.php b/src/bundle/Core/Fragment/DecoratedFragmentRenderer.php index cf7acadec9..e9c30242c1 100644 --- a/src/bundle/Core/Fragment/DecoratedFragmentRenderer.php +++ b/src/bundle/Core/Fragment/DecoratedFragmentRenderer.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Fragment; use Ibexa\Core\MVC\Symfony\SiteAccess; diff --git a/src/bundle/Core/Fragment/FragmentListenerFactory.php b/src/bundle/Core/Fragment/FragmentListenerFactory.php index bb1c53b647..605fa025f9 100644 --- a/src/bundle/Core/Fragment/FragmentListenerFactory.php +++ b/src/bundle/Core/Fragment/FragmentListenerFactory.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Fragment; use Ibexa\Core\MVC\Symfony\RequestStackAware; diff --git a/src/bundle/Core/Fragment/InlineFragmentRenderer.php b/src/bundle/Core/Fragment/InlineFragmentRenderer.php index d47bc11a1e..af79884745 100644 --- a/src/bundle/Core/Fragment/InlineFragmentRenderer.php +++ b/src/bundle/Core/Fragment/InlineFragmentRenderer.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Fragment; use Ibexa\Core\MVC\Symfony\SiteAccess; diff --git a/src/bundle/Core/IbexaCoreBundle.php b/src/bundle/Core/IbexaCoreBundle.php index be9b0ab962..1f5a94220e 100644 --- a/src/bundle/Core/IbexaCoreBundle.php +++ b/src/bundle/Core/IbexaCoreBundle.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core; use Ibexa\Bundle\Core\DependencyInjection\Compiler\BinaryContentDownloadPass; diff --git a/src/bundle/Core/Imagine/AliasCleaner.php b/src/bundle/Core/Imagine/AliasCleaner.php index 9873da912d..a4e272cc1d 100644 --- a/src/bundle/Core/Imagine/AliasCleaner.php +++ b/src/bundle/Core/Imagine/AliasCleaner.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine; use Ibexa\Core\FieldType\Image\AliasCleanerInterface; diff --git a/src/bundle/Core/Imagine/AliasGenerator.php b/src/bundle/Core/Imagine/AliasGenerator.php index 77ddc22bca..7e99bb7779 100644 --- a/src/bundle/Core/Imagine/AliasGenerator.php +++ b/src/bundle/Core/Imagine/AliasGenerator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine; use Ibexa\Contracts\Core\FieldType\Value; diff --git a/src/bundle/Core/Imagine/BinaryLoader.php b/src/bundle/Core/Imagine/BinaryLoader.php index 1c40589515..d9b278ed41 100644 --- a/src/bundle/Core/Imagine/BinaryLoader.php +++ b/src/bundle/Core/Imagine/BinaryLoader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine; use Exception; diff --git a/src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php b/src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php index 4beef2de61..171e1a4e9e 100644 --- a/src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php +++ b/src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Cache; use Ibexa\Contracts\Core\Repository\Values\Content\Field; diff --git a/src/bundle/Core/Imagine/Cache/Resolver/ProxyResolver.php b/src/bundle/Core/Imagine/Cache/Resolver/ProxyResolver.php index 08ba10db5d..60fb75fc2d 100644 --- a/src/bundle/Core/Imagine/Cache/Resolver/ProxyResolver.php +++ b/src/bundle/Core/Imagine/Cache/Resolver/ProxyResolver.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Cache\Resolver; use Liip\ImagineBundle\Imagine\Cache\Resolver\ProxyResolver as ImagineProxyResolver; diff --git a/src/bundle/Core/Imagine/Cache/Resolver/RelativeResolver.php b/src/bundle/Core/Imagine/Cache/Resolver/RelativeResolver.php index 4b2796fa79..735ccdb7fd 100644 --- a/src/bundle/Core/Imagine/Cache/Resolver/RelativeResolver.php +++ b/src/bundle/Core/Imagine/Cache/Resolver/RelativeResolver.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Cache\Resolver; use Liip\ImagineBundle\Imagine\Cache\Resolver\ProxyResolver as ImagineProxyResolver; diff --git a/src/bundle/Core/Imagine/Cache/ResolverFactory.php b/src/bundle/Core/Imagine/Cache/ResolverFactory.php index b7f79d7c50..a70fb803de 100644 --- a/src/bundle/Core/Imagine/Cache/ResolverFactory.php +++ b/src/bundle/Core/Imagine/Cache/ResolverFactory.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Cache; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/bundle/Core/Imagine/Filter/AbstractFilter.php b/src/bundle/Core/Imagine/Filter/AbstractFilter.php index ea3e38d24d..b3c9ee2550 100644 --- a/src/bundle/Core/Imagine/Filter/AbstractFilter.php +++ b/src/bundle/Core/Imagine/Filter/AbstractFilter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter; /** diff --git a/src/bundle/Core/Imagine/Filter/FilterConfiguration.php b/src/bundle/Core/Imagine/Filter/FilterConfiguration.php index 1d99af786b..2e6eaa4013 100644 --- a/src/bundle/Core/Imagine/Filter/FilterConfiguration.php +++ b/src/bundle/Core/Imagine/Filter/FilterConfiguration.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/bundle/Core/Imagine/Filter/FilterInterface.php b/src/bundle/Core/Imagine/Filter/FilterInterface.php index be74b2a81c..e20ca2ab6c 100644 --- a/src/bundle/Core/Imagine/Filter/FilterInterface.php +++ b/src/bundle/Core/Imagine/Filter/FilterInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter; use Imagine\Filter\FilterInterface as BaseFilterInterface; diff --git a/src/bundle/Core/Imagine/Filter/Gmagick/ReduceNoiseFilter.php b/src/bundle/Core/Imagine/Filter/Gmagick/ReduceNoiseFilter.php index 1e826b4d9c..7a34a3b214 100644 --- a/src/bundle/Core/Imagine/Filter/Gmagick/ReduceNoiseFilter.php +++ b/src/bundle/Core/Imagine/Filter/Gmagick/ReduceNoiseFilter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter\Gmagick; use Ibexa\Bundle\Core\Imagine\Filter\AbstractFilter; diff --git a/src/bundle/Core/Imagine/Filter/Gmagick/SwirlFilter.php b/src/bundle/Core/Imagine/Filter/Gmagick/SwirlFilter.php index d5dcfe01a2..1004430024 100644 --- a/src/bundle/Core/Imagine/Filter/Gmagick/SwirlFilter.php +++ b/src/bundle/Core/Imagine/Filter/Gmagick/SwirlFilter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter\Gmagick; use Ibexa\Bundle\Core\Imagine\Filter\AbstractFilter; diff --git a/src/bundle/Core/Imagine/Filter/Imagick/ReduceNoiseFilter.php b/src/bundle/Core/Imagine/Filter/Imagick/ReduceNoiseFilter.php index fb931f71e8..a4e4b4a494 100644 --- a/src/bundle/Core/Imagine/Filter/Imagick/ReduceNoiseFilter.php +++ b/src/bundle/Core/Imagine/Filter/Imagick/ReduceNoiseFilter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter\Imagick; use Ibexa\Bundle\Core\Imagine\Filter\AbstractFilter; diff --git a/src/bundle/Core/Imagine/Filter/Imagick/SwirlFilter.php b/src/bundle/Core/Imagine/Filter/Imagick/SwirlFilter.php index 67b4306797..793daae3ae 100644 --- a/src/bundle/Core/Imagine/Filter/Imagick/SwirlFilter.php +++ b/src/bundle/Core/Imagine/Filter/Imagick/SwirlFilter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter\Imagick; use Ibexa\Bundle\Core\Imagine\Filter\AbstractFilter; diff --git a/src/bundle/Core/Imagine/Filter/Loader/BorderFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/BorderFilterLoader.php index c30e8a07c0..edd3f73641 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/BorderFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/BorderFilterLoader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter\Loader; use Imagine\Exception\InvalidArgumentException; diff --git a/src/bundle/Core/Imagine/Filter/Loader/CropFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/CropFilterLoader.php index 014cfd7852..58af50df60 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/CropFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/CropFilterLoader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter\Loader; use Imagine\Exception\InvalidArgumentException; diff --git a/src/bundle/Core/Imagine/Filter/Loader/FilterLoaderWrapped.php b/src/bundle/Core/Imagine/Filter/Loader/FilterLoaderWrapped.php index 366ccce2fc..e75a9250be 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/FilterLoaderWrapped.php +++ b/src/bundle/Core/Imagine/Filter/Loader/FilterLoaderWrapped.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter\Loader; use Liip\ImagineBundle\Imagine\Filter\Loader\LoaderInterface; diff --git a/src/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoader.php index 6e49081cfa..cdc8f61f59 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter\Loader; use Imagine\Image\ImageInterface; diff --git a/src/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoader.php index 25364fa509..d544d17070 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter\Loader; use Ibexa\Bundle\Core\Imagine\Filter\FilterInterface; diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoader.php index a52a014e4d..f7274704c8 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter\Loader; use Imagine\Exception\InvalidArgumentException; diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoader.php index cdf73e4f54..3f6d43330d 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter\Loader; use Imagine\Exception\InvalidArgumentException; diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoader.php index 8800a23858..d8cbb21b2d 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter\Loader; use Imagine\Exception\InvalidArgumentException; diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoader.php index d92486330b..0baae5a879 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter\Loader; use Imagine\Exception\InvalidArgumentException; diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoader.php index c45029b62d..09bd4ddf41 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter\Loader; use Imagine\Exception\InvalidArgumentException; diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoader.php index 30d47e6565..61a0600f2f 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter\Loader; use Imagine\Exception\InvalidArgumentException; diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoader.php index 36ce89b184..9dc6d66434 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter\Loader; use Imagine\Exception\InvalidArgumentException; diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoader.php index c07ce2a4d7..ce1a2e5eb8 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter\Loader; use Imagine\Exception\InvalidArgumentException; diff --git a/src/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoader.php index ac00c75cc6..c312ac55a1 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter\Loader; use Ibexa\Bundle\Core\Imagine\Filter\FilterInterface; diff --git a/src/bundle/Core/Imagine/Filter/UnsupportedFilter.php b/src/bundle/Core/Imagine/Filter/UnsupportedFilter.php index b5801c1b58..357f4b7a45 100644 --- a/src/bundle/Core/Imagine/Filter/UnsupportedFilter.php +++ b/src/bundle/Core/Imagine/Filter/UnsupportedFilter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Filter; use Imagine\Exception\NotSupportedException; diff --git a/src/bundle/Core/Imagine/IORepositoryResolver.php b/src/bundle/Core/Imagine/IORepositoryResolver.php index a70715421c..2e78515154 100644 --- a/src/bundle/Core/Imagine/IORepositoryResolver.php +++ b/src/bundle/Core/Imagine/IORepositoryResolver.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine; use Ibexa\Bundle\Core\Variation\PathResolver; diff --git a/src/bundle/Core/Imagine/PlaceholderAliasGenerator.php b/src/bundle/Core/Imagine/PlaceholderAliasGenerator.php index 6bdb880aa5..d92543a6be 100644 --- a/src/bundle/Core/Imagine/PlaceholderAliasGenerator.php +++ b/src/bundle/Core/Imagine/PlaceholderAliasGenerator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException as APIInvalidArgumentException; diff --git a/src/bundle/Core/Imagine/PlaceholderAliasGeneratorConfigurator.php b/src/bundle/Core/Imagine/PlaceholderAliasGeneratorConfigurator.php index 3148e7382f..ee228a68db 100644 --- a/src/bundle/Core/Imagine/PlaceholderAliasGeneratorConfigurator.php +++ b/src/bundle/Core/Imagine/PlaceholderAliasGeneratorConfigurator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/bundle/Core/Imagine/PlaceholderProvider.php b/src/bundle/Core/Imagine/PlaceholderProvider.php index 59ed1eed02..5628c38823 100644 --- a/src/bundle/Core/Imagine/PlaceholderProvider.php +++ b/src/bundle/Core/Imagine/PlaceholderProvider.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine; use Ibexa\Core\FieldType\Image\Value as ImageValue; diff --git a/src/bundle/Core/Imagine/PlaceholderProvider/GenericProvider.php b/src/bundle/Core/Imagine/PlaceholderProvider/GenericProvider.php index 2be35b5ae4..07d8df192e 100644 --- a/src/bundle/Core/Imagine/PlaceholderProvider/GenericProvider.php +++ b/src/bundle/Core/Imagine/PlaceholderProvider/GenericProvider.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\PlaceholderProvider; use Ibexa\Bundle\Core\Imagine\PlaceholderProvider; diff --git a/src/bundle/Core/Imagine/PlaceholderProvider/RemoteProvider.php b/src/bundle/Core/Imagine/PlaceholderProvider/RemoteProvider.php index f85ad9d29e..a5c065d80e 100644 --- a/src/bundle/Core/Imagine/PlaceholderProvider/RemoteProvider.php +++ b/src/bundle/Core/Imagine/PlaceholderProvider/RemoteProvider.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\PlaceholderProvider; use Ibexa\Bundle\Core\Imagine\PlaceholderProvider; diff --git a/src/bundle/Core/Imagine/PlaceholderProviderRegistry.php b/src/bundle/Core/Imagine/PlaceholderProviderRegistry.php index 7935234de6..2a434276e7 100644 --- a/src/bundle/Core/Imagine/PlaceholderProviderRegistry.php +++ b/src/bundle/Core/Imagine/PlaceholderProviderRegistry.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine; use InvalidArgumentException; diff --git a/src/bundle/Core/Imagine/Variation/ImagineAwareAliasGenerator.php b/src/bundle/Core/Imagine/Variation/ImagineAwareAliasGenerator.php index b861eda957..99fd010a1f 100644 --- a/src/bundle/Core/Imagine/Variation/ImagineAwareAliasGenerator.php +++ b/src/bundle/Core/Imagine/Variation/ImagineAwareAliasGenerator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\Variation; use Ibexa\Bundle\Core\Imagine\IORepositoryResolver; diff --git a/src/bundle/Core/Imagine/VariationPathGenerator.php b/src/bundle/Core/Imagine/VariationPathGenerator.php index 1c6decc7ac..5d12bf0aeb 100644 --- a/src/bundle/Core/Imagine/VariationPathGenerator.php +++ b/src/bundle/Core/Imagine/VariationPathGenerator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine; use Ibexa\Contracts\Core\Variation\VariationPathGenerator as VariationPathGeneratorContract; diff --git a/src/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGenerator.php b/src/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGenerator.php index 3b30f66d35..2ccae432f6 100644 --- a/src/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGenerator.php +++ b/src/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGenerator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\VariationPathGenerator; use Ibexa\Contracts\Core\Variation\VariationPathGenerator; diff --git a/src/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGenerator.php b/src/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGenerator.php index 630d7a9f08..de05a6240e 100644 --- a/src/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGenerator.php +++ b/src/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGenerator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\VariationPathGenerator; use Ibexa\Contracts\Core\Variation\VariationPathGenerator; diff --git a/src/bundle/Core/Imagine/VariationPurger/IOVariationPurger.php b/src/bundle/Core/Imagine/VariationPurger/IOVariationPurger.php index 73393f4afe..7d6bc5849d 100644 --- a/src/bundle/Core/Imagine/VariationPurger/IOVariationPurger.php +++ b/src/bundle/Core/Imagine/VariationPurger/IOVariationPurger.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\VariationPurger; use Ibexa\Bundle\Core\Imagine\Cache\AliasGeneratorDecorator; diff --git a/src/bundle/Core/Imagine/VariationPurger/ImageFileList.php b/src/bundle/Core/Imagine/VariationPurger/ImageFileList.php index d3b609e938..38c86ddafa 100644 --- a/src/bundle/Core/Imagine/VariationPurger/ImageFileList.php +++ b/src/bundle/Core/Imagine/VariationPurger/ImageFileList.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\VariationPurger; use Countable; diff --git a/src/bundle/Core/Imagine/VariationPurger/ImageFileRowReader.php b/src/bundle/Core/Imagine/VariationPurger/ImageFileRowReader.php index cf8b031ee1..d9edadf084 100644 --- a/src/bundle/Core/Imagine/VariationPurger/ImageFileRowReader.php +++ b/src/bundle/Core/Imagine/VariationPurger/ImageFileRowReader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\VariationPurger; /** diff --git a/src/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurger.php b/src/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurger.php index 081a029deb..51fe1d944e 100644 --- a/src/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurger.php +++ b/src/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurger.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\VariationPurger; use Ibexa\Contracts\Core\Variation\VariationPathGenerator; diff --git a/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileList.php b/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileList.php index ab959e6327..f8960fc965 100644 --- a/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileList.php +++ b/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileList.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\VariationPurger; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileRowReader.php b/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileRowReader.php index 37194de053..d0c26e19e6 100644 --- a/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileRowReader.php +++ b/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileRowReader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Imagine\VariationPurger; use Doctrine\DBAL\Connection; diff --git a/src/bundle/Core/Matcher/ServiceAwareMatcherFactory.php b/src/bundle/Core/Matcher/ServiceAwareMatcherFactory.php index 8c6d749f5e..872af03779 100644 --- a/src/bundle/Core/Matcher/ServiceAwareMatcherFactory.php +++ b/src/bundle/Core/Matcher/ServiceAwareMatcherFactory.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Matcher; use Ibexa\Contracts\Core\MVC\View\ViewMatcherRegistryInterface; diff --git a/src/bundle/Core/Routing/DefaultRouter.php b/src/bundle/Core/Routing/DefaultRouter.php index 209869e2fa..f8a8ebecc4 100644 --- a/src/bundle/Core/Routing/DefaultRouter.php +++ b/src/bundle/Core/Routing/DefaultRouter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Routing; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/bundle/Core/Routing/JsRouting/ExposedRoutesExtractor.php b/src/bundle/Core/Routing/JsRouting/ExposedRoutesExtractor.php index deaf1baf62..48eb33d7fc 100644 --- a/src/bundle/Core/Routing/JsRouting/ExposedRoutesExtractor.php +++ b/src/bundle/Core/Routing/JsRouting/ExposedRoutesExtractor.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Routing\JsRouting; use FOS\JsRoutingBundle\Extractor\ExposedRoutesExtractorInterface; diff --git a/src/bundle/Core/Routing/UrlAliasRouter.php b/src/bundle/Core/Routing/UrlAliasRouter.php index bbc42258e8..cd1a9d910b 100644 --- a/src/bundle/Core/Routing/UrlAliasRouter.php +++ b/src/bundle/Core/Routing/UrlAliasRouter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Routing; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/bundle/Core/Session/Handler/NativeSessionHandler.php b/src/bundle/Core/Session/Handler/NativeSessionHandler.php index c60e14e099..efbfcff48c 100644 --- a/src/bundle/Core/Session/Handler/NativeSessionHandler.php +++ b/src/bundle/Core/Session/Handler/NativeSessionHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Session\Handler; /** diff --git a/src/bundle/Core/SiteAccess/LanguageResolver.php b/src/bundle/Core/SiteAccess/LanguageResolver.php index a22db5f3e4..196cd0888f 100644 --- a/src/bundle/Core/SiteAccess/LanguageResolver.php +++ b/src/bundle/Core/SiteAccess/LanguageResolver.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\SiteAccess; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/bundle/Core/SiteAccess/Matcher.php b/src/bundle/Core/SiteAccess/Matcher.php index eed312fa5a..4ee5cf3c44 100644 --- a/src/bundle/Core/SiteAccess/Matcher.php +++ b/src/bundle/Core/SiteAccess/Matcher.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\SiteAccess; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher as BaseMatcher; diff --git a/src/bundle/Core/SiteAccess/MatcherBuilder.php b/src/bundle/Core/SiteAccess/MatcherBuilder.php index 9f86e1d234..9d230ef008 100644 --- a/src/bundle/Core/SiteAccess/MatcherBuilder.php +++ b/src/bundle/Core/SiteAccess/MatcherBuilder.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\SiteAccess; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; diff --git a/src/bundle/Core/SiteAccess/SiteAccessConfigurationFilter.php b/src/bundle/Core/SiteAccess/SiteAccessConfigurationFilter.php index d07f0e142e..c3aae28912 100644 --- a/src/bundle/Core/SiteAccess/SiteAccessConfigurationFilter.php +++ b/src/bundle/Core/SiteAccess/SiteAccessConfigurationFilter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\SiteAccess; /** diff --git a/src/bundle/Core/Translation/Collector.php b/src/bundle/Core/Translation/Collector.php index 0794c08562..e006148460 100644 --- a/src/bundle/Core/Translation/Collector.php +++ b/src/bundle/Core/Translation/Collector.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Translation; /** diff --git a/src/bundle/Core/Translation/GlobCollector.php b/src/bundle/Core/Translation/GlobCollector.php index f9fc3a6362..5d3f783bf3 100644 --- a/src/bundle/Core/Translation/GlobCollector.php +++ b/src/bundle/Core/Translation/GlobCollector.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Translation; use const DIRECTORY_SEPARATOR; diff --git a/src/bundle/Core/URLChecker/Handler/AbstractConfigResolverBasedURLHandler.php b/src/bundle/Core/URLChecker/Handler/AbstractConfigResolverBasedURLHandler.php index ba5c363ddd..20f98a2b5d 100644 --- a/src/bundle/Core/URLChecker/Handler/AbstractConfigResolverBasedURLHandler.php +++ b/src/bundle/Core/URLChecker/Handler/AbstractConfigResolverBasedURLHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\URLChecker\Handler; use Ibexa\Contracts\Core\Repository\URLService; diff --git a/src/bundle/Core/URLChecker/Handler/AbstractURLHandler.php b/src/bundle/Core/URLChecker/Handler/AbstractURLHandler.php index 101c198353..9725f02b9a 100644 --- a/src/bundle/Core/URLChecker/Handler/AbstractURLHandler.php +++ b/src/bundle/Core/URLChecker/Handler/AbstractURLHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\URLChecker\Handler; use DateTime; diff --git a/src/bundle/Core/URLChecker/Handler/HTTPHandler.php b/src/bundle/Core/URLChecker/Handler/HTTPHandler.php index 12977be304..4ce062cdcc 100644 --- a/src/bundle/Core/URLChecker/Handler/HTTPHandler.php +++ b/src/bundle/Core/URLChecker/Handler/HTTPHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\URLChecker\Handler; use Ibexa\Contracts\Core\Repository\Values\URL\URL; diff --git a/src/bundle/Core/URLChecker/Handler/MailToHandler.php b/src/bundle/Core/URLChecker/Handler/MailToHandler.php index b112be2406..038247be60 100644 --- a/src/bundle/Core/URLChecker/Handler/MailToHandler.php +++ b/src/bundle/Core/URLChecker/Handler/MailToHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\URLChecker\Handler; use Ibexa\Contracts\Core\Repository\URLService; diff --git a/src/bundle/Core/URLChecker/URLChecker.php b/src/bundle/Core/URLChecker/URLChecker.php index 055949fb52..bc0329e5b3 100644 --- a/src/bundle/Core/URLChecker/URLChecker.php +++ b/src/bundle/Core/URLChecker/URLChecker.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\URLChecker; use Ibexa\Contracts\Core\Repository\URLService as URLServiceInterface; diff --git a/src/bundle/Core/URLChecker/URLCheckerInterface.php b/src/bundle/Core/URLChecker/URLCheckerInterface.php index b5a0353144..2b99771c8a 100644 --- a/src/bundle/Core/URLChecker/URLCheckerInterface.php +++ b/src/bundle/Core/URLChecker/URLCheckerInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\URLChecker; use Ibexa\Contracts\Core\Repository\Values\URL\URLQuery; diff --git a/src/bundle/Core/URLChecker/URLHandlerInterface.php b/src/bundle/Core/URLChecker/URLHandlerInterface.php index 82d3af6c9b..5f0759a238 100644 --- a/src/bundle/Core/URLChecker/URLHandlerInterface.php +++ b/src/bundle/Core/URLChecker/URLHandlerInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\URLChecker; interface URLHandlerInterface diff --git a/src/bundle/Core/URLChecker/URLHandlerRegistry.php b/src/bundle/Core/URLChecker/URLHandlerRegistry.php index fbc72b0e56..f20158b310 100644 --- a/src/bundle/Core/URLChecker/URLHandlerRegistry.php +++ b/src/bundle/Core/URLChecker/URLHandlerRegistry.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\URLChecker; use InvalidArgumentException; diff --git a/src/bundle/Core/URLChecker/URLHandlerRegistryInterface.php b/src/bundle/Core/URLChecker/URLHandlerRegistryInterface.php index e919451f18..8f4bc5d5d1 100644 --- a/src/bundle/Core/URLChecker/URLHandlerRegistryInterface.php +++ b/src/bundle/Core/URLChecker/URLHandlerRegistryInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\URLChecker; interface URLHandlerRegistryInterface diff --git a/src/bundle/Core/Variation/PathResolver.php b/src/bundle/Core/Variation/PathResolver.php index e2098fc548..6ce750b772 100644 --- a/src/bundle/Core/Variation/PathResolver.php +++ b/src/bundle/Core/Variation/PathResolver.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Variation; use Ibexa\Contracts\Core\Variation\VariationPathGenerator; diff --git a/src/bundle/Core/Variation/VariationHandlerResolver.php b/src/bundle/Core/Variation/VariationHandlerResolver.php index c220c64b95..357ade4b1b 100644 --- a/src/bundle/Core/Variation/VariationHandlerResolver.php +++ b/src/bundle/Core/Variation/VariationHandlerResolver.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\Variation; use Ibexa\Contracts\Core\Repository\Values\Content\Field; diff --git a/src/bundle/Core/View/Manager.php b/src/bundle/Core/View/Manager.php index 3fd98d84c6..c309cb8633 100644 --- a/src/bundle/Core/View/Manager.php +++ b/src/bundle/Core/View/Manager.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\View; use Ibexa\Core\MVC\Symfony\SiteAccess; diff --git a/src/bundle/Core/View/Provider/Configured.php b/src/bundle/Core/View/Provider/Configured.php index 09cacbd760..05dbf49b18 100644 --- a/src/bundle/Core/View/Provider/Configured.php +++ b/src/bundle/Core/View/Provider/Configured.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Core\View\Provider; use Ibexa\Core\MVC\Symfony\SiteAccess; diff --git a/src/bundle/Debug/Collector/IbexaCoreCollector.php b/src/bundle/Debug/Collector/IbexaCoreCollector.php index 29e029366f..5c7e1f4754 100644 --- a/src/bundle/Debug/Collector/IbexaCoreCollector.php +++ b/src/bundle/Debug/Collector/IbexaCoreCollector.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Debug\Collector; use InvalidArgumentException; diff --git a/src/bundle/Debug/Collector/PersistenceCacheCollector.php b/src/bundle/Debug/Collector/PersistenceCacheCollector.php index c81df9f417..3d519fcc9c 100644 --- a/src/bundle/Debug/Collector/PersistenceCacheCollector.php +++ b/src/bundle/Debug/Collector/PersistenceCacheCollector.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Debug\Collector; use Ibexa\Core\Persistence\Cache\PersistenceLogger; diff --git a/src/bundle/Debug/Collector/SiteAccessCollector.php b/src/bundle/Debug/Collector/SiteAccessCollector.php index 6ccd04b427..d25698bd5c 100644 --- a/src/bundle/Debug/Collector/SiteAccessCollector.php +++ b/src/bundle/Debug/Collector/SiteAccessCollector.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Debug\Collector; use Ibexa\Core\MVC\Symfony\SiteAccess; diff --git a/src/bundle/Debug/DependencyInjection/Compiler/DataCollectorPass.php b/src/bundle/Debug/DependencyInjection/Compiler/DataCollectorPass.php index f5fceeaedc..b2fd21ae6e 100644 --- a/src/bundle/Debug/DependencyInjection/Compiler/DataCollectorPass.php +++ b/src/bundle/Debug/DependencyInjection/Compiler/DataCollectorPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Debug\DependencyInjection\Compiler; use Ibexa\Bundle\Debug\Collector\IbexaCoreCollector; diff --git a/src/bundle/Debug/DependencyInjection/IbexaDebugExtension.php b/src/bundle/Debug/DependencyInjection/IbexaDebugExtension.php index 418e4a6974..7e64eeab6b 100644 --- a/src/bundle/Debug/DependencyInjection/IbexaDebugExtension.php +++ b/src/bundle/Debug/DependencyInjection/IbexaDebugExtension.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Debug\DependencyInjection; use Symfony\Component\Config\FileLocator; @@ -13,6 +14,7 @@ /** * @internal + * * @final */ class IbexaDebugExtension extends Extension diff --git a/src/bundle/Debug/IbexaDebugBundle.php b/src/bundle/Debug/IbexaDebugBundle.php index eeca1ebdee..b70822b426 100644 --- a/src/bundle/Debug/IbexaDebugBundle.php +++ b/src/bundle/Debug/IbexaDebugBundle.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Debug; use Ibexa\Bundle\Debug\DependencyInjection\Compiler\DataCollectorPass; diff --git a/src/bundle/IO/ApiLoader/HandlerRegistry.php b/src/bundle/IO/ApiLoader/HandlerRegistry.php index 3e568928fb..0a28f5a5b0 100644 --- a/src/bundle/IO/ApiLoader/HandlerRegistry.php +++ b/src/bundle/IO/ApiLoader/HandlerRegistry.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\ApiLoader; use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; diff --git a/src/bundle/IO/BinaryStreamResponse.php b/src/bundle/IO/BinaryStreamResponse.php index d1f0638f0a..d4f12ed1ea 100644 --- a/src/bundle/IO/BinaryStreamResponse.php +++ b/src/bundle/IO/BinaryStreamResponse.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO; use DateTime; diff --git a/src/bundle/IO/Command/MigrateFilesCommand.php b/src/bundle/IO/Command/MigrateFilesCommand.php index 213369d40f..302290eedb 100644 --- a/src/bundle/IO/Command/MigrateFilesCommand.php +++ b/src/bundle/IO/Command/MigrateFilesCommand.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\Command; use Ibexa\Bundle\Core\Command\BackwardCompatibleCommand; diff --git a/src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php b/src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php index 097b94c782..e79b9d3862 100644 --- a/src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php +++ b/src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\DependencyInjection\Compiler; use ArrayObject; diff --git a/src/bundle/IO/DependencyInjection/Compiler/MigrationFileListerPass.php b/src/bundle/IO/DependencyInjection/Compiler/MigrationFileListerPass.php index 2f5908cd97..5ba4111631 100644 --- a/src/bundle/IO/DependencyInjection/Compiler/MigrationFileListerPass.php +++ b/src/bundle/IO/DependencyInjection/Compiler/MigrationFileListerPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\DependencyInjection\Compiler; use Ibexa\Bundle\IO\Migration\FileListerRegistry\ConfigurableRegistry; diff --git a/src/bundle/IO/DependencyInjection/Configuration.php b/src/bundle/IO/DependencyInjection/Configuration.php index 0d599ad820..b23bbe78cd 100644 --- a/src/bundle/IO/DependencyInjection/Configuration.php +++ b/src/bundle/IO/DependencyInjection/Configuration.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\DependencyInjection; use ArrayObject; diff --git a/src/bundle/IO/DependencyInjection/ConfigurationFactory.php b/src/bundle/IO/DependencyInjection/ConfigurationFactory.php index 8feeda29de..a27c08549e 100644 --- a/src/bundle/IO/DependencyInjection/ConfigurationFactory.php +++ b/src/bundle/IO/DependencyInjection/ConfigurationFactory.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\DependencyInjection; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; diff --git a/src/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/Flysystem.php b/src/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/Flysystem.php index f463dfddf1..8be748b5cb 100644 --- a/src/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/Flysystem.php +++ b/src/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/Flysystem.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory\BinarydataHandler; use Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory\Flysystem as BaseFactory; diff --git a/src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php b/src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php index b3bf3e5a21..095b97b385 100644 --- a/src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php +++ b/src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory; use Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory; diff --git a/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/Flysystem.php b/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/Flysystem.php index b31246e49f..793573b001 100644 --- a/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/Flysystem.php +++ b/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/Flysystem.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory\MetadataHandler; use Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory\Flysystem as BaseFactory; diff --git a/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php b/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php index 7cc59c160e..bea2c9a959 100644 --- a/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php +++ b/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory\MetadataHandler; use Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory; diff --git a/src/bundle/IO/DependencyInjection/IbexaIOExtension.php b/src/bundle/IO/DependencyInjection/IbexaIOExtension.php index 5a558db932..fe1987fee2 100644 --- a/src/bundle/IO/DependencyInjection/IbexaIOExtension.php +++ b/src/bundle/IO/DependencyInjection/IbexaIOExtension.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\DependencyInjection; use ArrayObject; diff --git a/src/bundle/IO/EventListener/StreamFileListener.php b/src/bundle/IO/EventListener/StreamFileListener.php index 19adcca341..1b04344b49 100644 --- a/src/bundle/IO/EventListener/StreamFileListener.php +++ b/src/bundle/IO/EventListener/StreamFileListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\EventListener; use Ibexa\Bundle\IO\BinaryStreamResponse; diff --git a/src/bundle/IO/IbexaIOBundle.php b/src/bundle/IO/IbexaIOBundle.php index 4a526cb9ed..d43611bf0b 100644 --- a/src/bundle/IO/IbexaIOBundle.php +++ b/src/bundle/IO/IbexaIOBundle.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO; use Ibexa\Bundle\IO\DependencyInjection\Compiler; diff --git a/src/bundle/IO/Migration/FileLister/BinaryFileLister.php b/src/bundle/IO/Migration/FileLister/BinaryFileLister.php index f002b171c8..f995e6fd13 100644 --- a/src/bundle/IO/Migration/FileLister/BinaryFileLister.php +++ b/src/bundle/IO/Migration/FileLister/BinaryFileLister.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\Migration\FileLister; use Ibexa\Bundle\IO\ApiLoader\HandlerRegistry; diff --git a/src/bundle/IO/Migration/FileLister/FileIterator/LegacyStorageFileIterator.php b/src/bundle/IO/Migration/FileLister/FileIterator/LegacyStorageFileIterator.php index 57ec109144..dad0222b7d 100644 --- a/src/bundle/IO/Migration/FileLister/FileIterator/LegacyStorageFileIterator.php +++ b/src/bundle/IO/Migration/FileLister/FileIterator/LegacyStorageFileIterator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\Migration\FileLister\FileIterator; use Ibexa\Bundle\IO\Migration\FileLister\FileIteratorInterface; diff --git a/src/bundle/IO/Migration/FileLister/FileIteratorInterface.php b/src/bundle/IO/Migration/FileLister/FileIteratorInterface.php index 5e377135c0..55c3d9909f 100644 --- a/src/bundle/IO/Migration/FileLister/FileIteratorInterface.php +++ b/src/bundle/IO/Migration/FileLister/FileIteratorInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\Migration\FileLister; use Countable; diff --git a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageBinaryFileRowReader.php b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageBinaryFileRowReader.php index 6c3aef52dc..ce48f347ce 100644 --- a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageBinaryFileRowReader.php +++ b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageBinaryFileRowReader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\Migration\FileLister\FileRowReader; final class LegacyStorageBinaryFileRowReader extends LegacyStorageFileRowReader diff --git a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php index 95613290f7..a264ef8bf4 100644 --- a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php +++ b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\Migration\FileLister\FileRowReader; use Doctrine\DBAL\Connection; diff --git a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageMediaFileRowReader.php b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageMediaFileRowReader.php index 32f86fc676..40dd049303 100644 --- a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageMediaFileRowReader.php +++ b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageMediaFileRowReader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\Migration\FileLister\FileRowReader; final class LegacyStorageMediaFileRowReader extends LegacyStorageFileRowReader diff --git a/src/bundle/IO/Migration/FileLister/FileRowReaderInterface.php b/src/bundle/IO/Migration/FileLister/FileRowReaderInterface.php index 0e740dfa79..412fb986ce 100644 --- a/src/bundle/IO/Migration/FileLister/FileRowReaderInterface.php +++ b/src/bundle/IO/Migration/FileLister/FileRowReaderInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\Migration\FileLister; /** diff --git a/src/bundle/IO/Migration/FileLister/ImageFileLister.php b/src/bundle/IO/Migration/FileLister/ImageFileLister.php index 5129e863f1..4c0d724647 100644 --- a/src/bundle/IO/Migration/FileLister/ImageFileLister.php +++ b/src/bundle/IO/Migration/FileLister/ImageFileLister.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\Migration\FileLister; use Ibexa\Bundle\IO\ApiLoader\HandlerRegistry; diff --git a/src/bundle/IO/Migration/FileListerInterface.php b/src/bundle/IO/Migration/FileListerInterface.php index cbeba6e165..54d9fa04dc 100644 --- a/src/bundle/IO/Migration/FileListerInterface.php +++ b/src/bundle/IO/Migration/FileListerInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\Migration; interface FileListerInterface extends MigrationHandlerInterface diff --git a/src/bundle/IO/Migration/FileListerRegistry.php b/src/bundle/IO/Migration/FileListerRegistry.php index 3df10ef60c..f447893ebb 100644 --- a/src/bundle/IO/Migration/FileListerRegistry.php +++ b/src/bundle/IO/Migration/FileListerRegistry.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\Migration; /** diff --git a/src/bundle/IO/Migration/FileListerRegistry/ConfigurableRegistry.php b/src/bundle/IO/Migration/FileListerRegistry/ConfigurableRegistry.php index 3b99c25ca7..e912e74b19 100644 --- a/src/bundle/IO/Migration/FileListerRegistry/ConfigurableRegistry.php +++ b/src/bundle/IO/Migration/FileListerRegistry/ConfigurableRegistry.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\Migration\FileListerRegistry; use Ibexa\Bundle\IO\Migration\FileListerRegistry; diff --git a/src/bundle/IO/Migration/FileMigrator/FileMigrator.php b/src/bundle/IO/Migration/FileMigrator/FileMigrator.php index fec473538c..5567336310 100644 --- a/src/bundle/IO/Migration/FileMigrator/FileMigrator.php +++ b/src/bundle/IO/Migration/FileMigrator/FileMigrator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\Migration\FileMigrator; use Ibexa\Bundle\IO\Migration\FileMigratorInterface; diff --git a/src/bundle/IO/Migration/FileMigratorInterface.php b/src/bundle/IO/Migration/FileMigratorInterface.php index b84c57bcf7..245e9d70a3 100644 --- a/src/bundle/IO/Migration/FileMigratorInterface.php +++ b/src/bundle/IO/Migration/FileMigratorInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\Migration; use Ibexa\Contracts\Core\IO\BinaryFile; diff --git a/src/bundle/IO/Migration/MigrationHandler.php b/src/bundle/IO/Migration/MigrationHandler.php index d59eed0b88..87d48be12e 100644 --- a/src/bundle/IO/Migration/MigrationHandler.php +++ b/src/bundle/IO/Migration/MigrationHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\Migration; use Ibexa\Bundle\IO\ApiLoader\HandlerRegistry; diff --git a/src/bundle/IO/Migration/MigrationHandlerInterface.php b/src/bundle/IO/Migration/MigrationHandlerInterface.php index 793a715c98..6dc64f422d 100644 --- a/src/bundle/IO/Migration/MigrationHandlerInterface.php +++ b/src/bundle/IO/Migration/MigrationHandlerInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\IO\Migration; interface MigrationHandlerInterface diff --git a/src/bundle/LegacySearchEngine/ApiLoader/ConnectionFactory.php b/src/bundle/LegacySearchEngine/ApiLoader/ConnectionFactory.php index be802fe2b7..46f23aa720 100644 --- a/src/bundle/LegacySearchEngine/ApiLoader/ConnectionFactory.php +++ b/src/bundle/LegacySearchEngine/ApiLoader/ConnectionFactory.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\LegacySearchEngine\ApiLoader; use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider; diff --git a/src/bundle/LegacySearchEngine/DependencyInjection/IbexaLegacySearchEngineExtension.php b/src/bundle/LegacySearchEngine/DependencyInjection/IbexaLegacySearchEngineExtension.php index 0f7f47aecb..f5d745bb2e 100644 --- a/src/bundle/LegacySearchEngine/DependencyInjection/IbexaLegacySearchEngineExtension.php +++ b/src/bundle/LegacySearchEngine/DependencyInjection/IbexaLegacySearchEngineExtension.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\LegacySearchEngine\DependencyInjection; use Symfony\Component\Config\FileLocator; diff --git a/src/bundle/LegacySearchEngine/IbexaLegacySearchEngineBundle.php b/src/bundle/LegacySearchEngine/IbexaLegacySearchEngineBundle.php index 2110f94a71..bea1756337 100644 --- a/src/bundle/LegacySearchEngine/IbexaLegacySearchEngineBundle.php +++ b/src/bundle/LegacySearchEngine/IbexaLegacySearchEngineBundle.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\LegacySearchEngine; use Ibexa\Core\Base\Container\Compiler\Search\FieldRegistryPass; diff --git a/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php b/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php index 0011d9d37c..55e7123ab1 100644 --- a/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php +++ b/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\RepositoryInstaller\Command; use Doctrine\DBAL\Connection; @@ -88,7 +89,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $schemaManager = $this->connection->getSchemaManager(); if (!empty($schemaManager->listTables())) { $io = new SymfonyStyle($input, $output); - if (!$io->confirm('Running this command will delete data in all Ibexa generated tables. Continue?', )) { + if (!$io->confirm('Running this command will delete data in all Ibexa generated tables. Continue?')) { return 0; } } diff --git a/src/bundle/RepositoryInstaller/Command/ValidatePasswordHashesCommand.php b/src/bundle/RepositoryInstaller/Command/ValidatePasswordHashesCommand.php index 74db9309c6..faba75b0e1 100644 --- a/src/bundle/RepositoryInstaller/Command/ValidatePasswordHashesCommand.php +++ b/src/bundle/RepositoryInstaller/Command/ValidatePasswordHashesCommand.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\RepositoryInstaller\Command; use Ibexa\Bundle\Core\Command\BackwardCompatibleCommand; diff --git a/src/bundle/RepositoryInstaller/DependencyInjection/Compiler/InstallerTagPass.php b/src/bundle/RepositoryInstaller/DependencyInjection/Compiler/InstallerTagPass.php index cf0df72c3e..ef01fcbef5 100644 --- a/src/bundle/RepositoryInstaller/DependencyInjection/Compiler/InstallerTagPass.php +++ b/src/bundle/RepositoryInstaller/DependencyInjection/Compiler/InstallerTagPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\RepositoryInstaller\DependencyInjection\Compiler; use Ibexa\Bundle\RepositoryInstaller\Command\InstallPlatformCommand; diff --git a/src/bundle/RepositoryInstaller/DependencyInjection/IbexaRepositoryInstallerExtension.php b/src/bundle/RepositoryInstaller/DependencyInjection/IbexaRepositoryInstallerExtension.php index 87f8cfd728..dae6b66a7e 100644 --- a/src/bundle/RepositoryInstaller/DependencyInjection/IbexaRepositoryInstallerExtension.php +++ b/src/bundle/RepositoryInstaller/DependencyInjection/IbexaRepositoryInstallerExtension.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\RepositoryInstaller\DependencyInjection; use Symfony\Component\Config\FileLocator; diff --git a/src/bundle/RepositoryInstaller/IbexaRepositoryInstallerBundle.php b/src/bundle/RepositoryInstaller/IbexaRepositoryInstallerBundle.php index b5934d8080..497b7c21ad 100644 --- a/src/bundle/RepositoryInstaller/IbexaRepositoryInstallerBundle.php +++ b/src/bundle/RepositoryInstaller/IbexaRepositoryInstallerBundle.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\RepositoryInstaller; use Ibexa\Bundle\DoctrineSchema\DoctrineSchemaBundle; diff --git a/src/bundle/RepositoryInstaller/Installer/DbBasedInstaller.php b/src/bundle/RepositoryInstaller/Installer/DbBasedInstaller.php index 5c343563e4..06a21973b0 100644 --- a/src/bundle/RepositoryInstaller/Installer/DbBasedInstaller.php +++ b/src/bundle/RepositoryInstaller/Installer/DbBasedInstaller.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\RepositoryInstaller\Installer; use Doctrine\DBAL\Connection; diff --git a/src/bundle/RepositoryInstaller/Installer/Installer.php b/src/bundle/RepositoryInstaller/Installer/Installer.php index c9d95c46ed..80640b6a90 100644 --- a/src/bundle/RepositoryInstaller/Installer/Installer.php +++ b/src/bundle/RepositoryInstaller/Installer/Installer.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\RepositoryInstaller\Installer; /** diff --git a/src/contracts/Collection/ArrayList.php b/src/contracts/Collection/ArrayList.php index 4a639645a8..738335b76a 100644 --- a/src/contracts/Collection/ArrayList.php +++ b/src/contracts/Collection/ArrayList.php @@ -14,6 +14,7 @@ * @template TValue * * @template-extends \Ibexa\Contracts\Core\Collection\AbstractInMemoryCollection + * * @template-implements \Ibexa\Contracts\Core\Collection\ListInterface */ class ArrayList extends AbstractInMemoryCollection implements ListInterface diff --git a/src/contracts/Collection/ArrayMap.php b/src/contracts/Collection/ArrayMap.php index 698dc3a0f7..cf7109d7b4 100644 --- a/src/contracts/Collection/ArrayMap.php +++ b/src/contracts/Collection/ArrayMap.php @@ -15,6 +15,7 @@ * @template TValue * * @template-extends \Ibexa\Contracts\Core\Collection\AbstractInMemoryCollection + * * @template-implements \Ibexa\Contracts\Core\Collection\MapInterface */ class ArrayMap extends AbstractInMemoryCollection implements MapInterface diff --git a/src/contracts/Collection/MutableArrayList.php b/src/contracts/Collection/MutableArrayList.php index ef8958c5f4..90d8d201b5 100644 --- a/src/contracts/Collection/MutableArrayList.php +++ b/src/contracts/Collection/MutableArrayList.php @@ -12,6 +12,7 @@ * @template TValue * * @template-extends \Ibexa\Contracts\Core\Collection\ArrayList + * * @template-implements \Ibexa\Contracts\Core\Collection\MutableListInterface */ class MutableArrayList extends ArrayList implements MutableListInterface diff --git a/src/contracts/Collection/MutableArrayMap.php b/src/contracts/Collection/MutableArrayMap.php index 3dbbf96d18..c185e92164 100644 --- a/src/contracts/Collection/MutableArrayMap.php +++ b/src/contracts/Collection/MutableArrayMap.php @@ -13,6 +13,7 @@ * @template TValue * * @template-extends \Ibexa\Contracts\Core\Collection\ArrayMap + * * @template-implements \Ibexa\Contracts\Core\Collection\MutableMapInterface */ class MutableArrayMap extends ArrayMap implements MutableMapInterface diff --git a/src/contracts/Container.php b/src/contracts/Container.php index 0998f158ab..29856c9771 100644 --- a/src/contracts/Container.php +++ b/src/contracts/Container.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core; /** diff --git a/src/contracts/FieldType/BinaryBase/PathGenerator.php b/src/contracts/FieldType/BinaryBase/PathGenerator.php index 1b2271c930..db5f9fac26 100644 --- a/src/contracts/FieldType/BinaryBase/PathGenerator.php +++ b/src/contracts/FieldType/BinaryBase/PathGenerator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\FieldType\BinaryBase; use Ibexa\Contracts\Core\Persistence\Content\Field; diff --git a/src/contracts/FieldType/FieldStorage.php b/src/contracts/FieldType/FieldStorage.php index 73abe9d907..20b15013f3 100644 --- a/src/contracts/FieldType/FieldStorage.php +++ b/src/contracts/FieldType/FieldStorage.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\FieldType; use Ibexa\Contracts\Core\Persistence\Content\Field; diff --git a/src/contracts/FieldType/FieldType.php b/src/contracts/FieldType/FieldType.php index 46694a2458..f193c9b535 100644 --- a/src/contracts/FieldType/FieldType.php +++ b/src/contracts/FieldType/FieldType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\FieldType; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; diff --git a/src/contracts/FieldType/GatewayBasedStorage.php b/src/contracts/FieldType/GatewayBasedStorage.php index e54fabfcb7..bacb073f6e 100644 --- a/src/contracts/FieldType/GatewayBasedStorage.php +++ b/src/contracts/FieldType/GatewayBasedStorage.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\FieldType; use Ibexa\Contracts\Core\Persistence\Content\Field; @@ -20,12 +21,14 @@ abstract class GatewayBasedStorage implements FieldStorage * Field Type External Storage Gateway. * * @var \Ibexa\Contracts\Core\FieldType\StorageGatewayInterface + * * @phpstan-var T */ protected $gateway; /** * @param \Ibexa\Contracts\Core\FieldType\StorageGatewayInterface $gateway + * * @phpstan-param T $gateway */ public function __construct(StorageGatewayInterface $gateway) diff --git a/src/contracts/FieldType/Indexable.php b/src/contracts/FieldType/Indexable.php index 1229d34279..4bc7eda331 100644 --- a/src/contracts/FieldType/Indexable.php +++ b/src/contracts/FieldType/Indexable.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\FieldType; use Ibexa\Contracts\Core\Persistence\Content\Field; diff --git a/src/contracts/FieldType/StorageGateway.php b/src/contracts/FieldType/StorageGateway.php index 07688479ac..5219135508 100644 --- a/src/contracts/FieldType/StorageGateway.php +++ b/src/contracts/FieldType/StorageGateway.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\FieldType; /** diff --git a/src/contracts/FieldType/ValidationError.php b/src/contracts/FieldType/ValidationError.php index 23f1170ce0..a303afc89f 100644 --- a/src/contracts/FieldType/ValidationError.php +++ b/src/contracts/FieldType/ValidationError.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\FieldType; use Ibexa\Contracts\Core\Repository\Translatable; diff --git a/src/contracts/FieldType/Value.php b/src/contracts/FieldType/Value.php index f58deadf24..3a9e92c316 100644 --- a/src/contracts/FieldType/Value.php +++ b/src/contracts/FieldType/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\FieldType; /** diff --git a/src/contracts/HashGenerator.php b/src/contracts/HashGenerator.php index 5b18106647..5aa871674f 100644 --- a/src/contracts/HashGenerator.php +++ b/src/contracts/HashGenerator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core; interface HashGenerator diff --git a/src/contracts/IO/BinaryFile.php b/src/contracts/IO/BinaryFile.php index 5f292d1422..eaec6c39e0 100644 --- a/src/contracts/IO/BinaryFile.php +++ b/src/contracts/IO/BinaryFile.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\IO; /** diff --git a/src/contracts/IO/BinaryFileCreateStruct.php b/src/contracts/IO/BinaryFileCreateStruct.php index 24ce7547ec..cda1528408 100644 --- a/src/contracts/IO/BinaryFileCreateStruct.php +++ b/src/contracts/IO/BinaryFileCreateStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\IO; /** diff --git a/src/contracts/IO/MimeTypeDetector.php b/src/contracts/IO/MimeTypeDetector.php index 8b8c80d419..cda2100fe6 100644 --- a/src/contracts/IO/MimeTypeDetector.php +++ b/src/contracts/IO/MimeTypeDetector.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\IO; interface MimeTypeDetector diff --git a/src/contracts/Limitation/Type.php b/src/contracts/Limitation/Type.php index b93aa4a5c4..04d6a92554 100644 --- a/src/contracts/Limitation/Type.php +++ b/src/contracts/Limitation/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Limitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation as APILimitationValue; diff --git a/src/contracts/Persistence/Content.php b/src/contracts/Persistence/Content.php index 5e77891c4c..fbcbda583c 100644 --- a/src/contracts/Persistence/Content.php +++ b/src/contracts/Persistence/Content.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence; /** diff --git a/src/contracts/Persistence/Content/ContentInfo.php b/src/contracts/Persistence/Content/ContentInfo.php index 5d247fc73e..22a73c1f8f 100644 --- a/src/contracts/Persistence/Content/ContentInfo.php +++ b/src/contracts/Persistence/Content/ContentInfo.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/CreateStruct.php b/src/contracts/Persistence/Content/CreateStruct.php index c4eb7f4dd9..11f604020a 100644 --- a/src/contracts/Persistence/Content/CreateStruct.php +++ b/src/contracts/Persistence/Content/CreateStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/Field.php b/src/contracts/Persistence/Content/Field.php index 7c45810edd..94f844f868 100644 --- a/src/contracts/Persistence/Content/Field.php +++ b/src/contracts/Persistence/Content/Field.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/FieldTypeConstraints.php b/src/contracts/Persistence/Content/FieldTypeConstraints.php index ad28914353..e4b59f7226 100644 --- a/src/contracts/Persistence/Content/FieldTypeConstraints.php +++ b/src/contracts/Persistence/Content/FieldTypeConstraints.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/FieldValue.php b/src/contracts/Persistence/Content/FieldValue.php index f946b467bf..816229b7fa 100644 --- a/src/contracts/Persistence/Content/FieldValue.php +++ b/src/contracts/Persistence/Content/FieldValue.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/Handler.php b/src/contracts/Persistence/Content/Handler.php index 5bfb72ed37..4c2a573bbf 100644 --- a/src/contracts/Persistence/Content/Handler.php +++ b/src/contracts/Persistence/Content/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content; // @todo We must verify whether we want to type cast on the "Criterion" interface or abstract class diff --git a/src/contracts/Persistence/Content/Language.php b/src/contracts/Persistence/Content/Language.php index eb80b7a084..47620294b5 100644 --- a/src/contracts/Persistence/Content/Language.php +++ b/src/contracts/Persistence/Content/Language.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/Language/CreateStruct.php b/src/contracts/Persistence/Content/Language/CreateStruct.php index c695c265ac..0fd75c6b44 100644 --- a/src/contracts/Persistence/Content/Language/CreateStruct.php +++ b/src/contracts/Persistence/Content/Language/CreateStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\Language; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/Language/Handler.php b/src/contracts/Persistence/Content/Language/Handler.php index 521adcb940..68e919aa39 100644 --- a/src/contracts/Persistence/Content/Language/Handler.php +++ b/src/contracts/Persistence/Content/Language/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\Language; use Ibexa\Contracts\Core\Persistence\Content\Language; diff --git a/src/contracts/Persistence/Content/LoadStruct.php b/src/contracts/Persistence/Content/LoadStruct.php index 1af40edf9e..fe17b360ca 100644 --- a/src/contracts/Persistence/Content/LoadStruct.php +++ b/src/contracts/Persistence/Content/LoadStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/Location.php b/src/contracts/Persistence/Content/Location.php index 7b06fca0f5..14f96f4926 100644 --- a/src/contracts/Persistence/Content/Location.php +++ b/src/contracts/Persistence/Content/Location.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/Location/CreateStruct.php b/src/contracts/Persistence/Content/Location/CreateStruct.php index 0796c1b840..f010073acd 100644 --- a/src/contracts/Persistence/Content/Location/CreateStruct.php +++ b/src/contracts/Persistence/Content/Location/CreateStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\Location; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/Location/Handler.php b/src/contracts/Persistence/Content/Location/Handler.php index 0fbea26996..8f143ffc7a 100644 --- a/src/contracts/Persistence/Content/Location/Handler.php +++ b/src/contracts/Persistence/Content/Location/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\Location; use Ibexa\Contracts\Core\Persistence\Content\Location; diff --git a/src/contracts/Persistence/Content/Location/Trash/Handler.php b/src/contracts/Persistence/Content/Location/Trash/Handler.php index 99bc01f0d5..e97e3a841c 100644 --- a/src/contracts/Persistence/Content/Location/Trash/Handler.php +++ b/src/contracts/Persistence/Content/Location/Trash/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\Location\Trash; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; diff --git a/src/contracts/Persistence/Content/Location/Trash/TrashResult.php b/src/contracts/Persistence/Content/Location/Trash/TrashResult.php index a5181bcc3a..7eae9c17b2 100644 --- a/src/contracts/Persistence/Content/Location/Trash/TrashResult.php +++ b/src/contracts/Persistence/Content/Location/Trash/TrashResult.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\Location\Trash; use ArrayIterator; diff --git a/src/contracts/Persistence/Content/Location/Trashed.php b/src/contracts/Persistence/Content/Location/Trashed.php index e643a31c9e..8688fc6878 100644 --- a/src/contracts/Persistence/Content/Location/Trashed.php +++ b/src/contracts/Persistence/Content/Location/Trashed.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\Location; use Ibexa\Contracts\Core\Persistence\Content\Location; diff --git a/src/contracts/Persistence/Content/Location/UpdateStruct.php b/src/contracts/Persistence/Content/Location/UpdateStruct.php index afb3db2a03..7c910d38a3 100644 --- a/src/contracts/Persistence/Content/Location/UpdateStruct.php +++ b/src/contracts/Persistence/Content/Location/UpdateStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\Location; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/MetadataUpdateStruct.php b/src/contracts/Persistence/Content/MetadataUpdateStruct.php index 6b19f3a013..40b39ffbad 100644 --- a/src/contracts/Persistence/Content/MetadataUpdateStruct.php +++ b/src/contracts/Persistence/Content/MetadataUpdateStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/ObjectState.php b/src/contracts/Persistence/Content/ObjectState.php index b95d4ffffd..816795d347 100644 --- a/src/contracts/Persistence/Content/ObjectState.php +++ b/src/contracts/Persistence/Content/ObjectState.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/ObjectState/Group.php b/src/contracts/Persistence/Content/ObjectState/Group.php index 1d9c58bb6a..a17bd121e8 100644 --- a/src/contracts/Persistence/Content/ObjectState/Group.php +++ b/src/contracts/Persistence/Content/ObjectState/Group.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\ObjectState; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/ObjectState/Handler.php b/src/contracts/Persistence/Content/ObjectState/Handler.php index 48bc70740a..6138e0561f 100644 --- a/src/contracts/Persistence/Content/ObjectState/Handler.php +++ b/src/contracts/Persistence/Content/ObjectState/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\ObjectState; /** diff --git a/src/contracts/Persistence/Content/ObjectState/InputStruct.php b/src/contracts/Persistence/Content/ObjectState/InputStruct.php index ac87663f92..ac95a1f504 100644 --- a/src/contracts/Persistence/Content/ObjectState/InputStruct.php +++ b/src/contracts/Persistence/Content/ObjectState/InputStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\ObjectState; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/Relation.php b/src/contracts/Persistence/Content/Relation.php index 502c972faa..7418b070d1 100644 --- a/src/contracts/Persistence/Content/Relation.php +++ b/src/contracts/Persistence/Content/Relation.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/Relation/CreateStruct.php b/src/contracts/Persistence/Content/Relation/CreateStruct.php index 3c046ffa36..8de92e6625 100644 --- a/src/contracts/Persistence/Content/Relation/CreateStruct.php +++ b/src/contracts/Persistence/Content/Relation/CreateStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\Relation; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/Section.php b/src/contracts/Persistence/Content/Section.php index ba6a064ca1..c465b9c9c0 100644 --- a/src/contracts/Persistence/Content/Section.php +++ b/src/contracts/Persistence/Content/Section.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/Section/Handler.php b/src/contracts/Persistence/Content/Section/Handler.php index 399b174dd7..e263dfab76 100644 --- a/src/contracts/Persistence/Content/Section/Handler.php +++ b/src/contracts/Persistence/Content/Section/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\Section; interface Handler diff --git a/src/contracts/Persistence/Content/Type.php b/src/contracts/Persistence/Content/Type.php index 3abf1e1a5e..85df242f45 100644 --- a/src/contracts/Persistence/Content/Type.php +++ b/src/contracts/Persistence/Content/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/Type/CreateStruct.php b/src/contracts/Persistence/Content/Type/CreateStruct.php index e86d3a7578..59689e724d 100644 --- a/src/contracts/Persistence/Content/Type/CreateStruct.php +++ b/src/contracts/Persistence/Content/Type/CreateStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\Type; use Ibexa\Contracts\Core\Persistence\Content\Location; diff --git a/src/contracts/Persistence/Content/Type/DeleteByParamsStruct.php b/src/contracts/Persistence/Content/Type/DeleteByParamsStruct.php index 69bdfa07e5..90427da0e3 100644 --- a/src/contracts/Persistence/Content/Type/DeleteByParamsStruct.php +++ b/src/contracts/Persistence/Content/Type/DeleteByParamsStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\Type; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/Type/FieldDefinition.php b/src/contracts/Persistence/Content/Type/FieldDefinition.php index f584ce4434..54ac445bf6 100644 --- a/src/contracts/Persistence/Content/Type/FieldDefinition.php +++ b/src/contracts/Persistence/Content/Type/FieldDefinition.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\Type; use Ibexa\Contracts\Core\Persistence\Content\FieldTypeConstraints; diff --git a/src/contracts/Persistence/Content/Type/Group.php b/src/contracts/Persistence/Content/Type/Group.php index fde5eceb8b..689966ef51 100644 --- a/src/contracts/Persistence/Content/Type/Group.php +++ b/src/contracts/Persistence/Content/Type/Group.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\Type; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/Type/Group/CreateStruct.php b/src/contracts/Persistence/Content/Type/Group/CreateStruct.php index 5f643e6745..d8206876c0 100644 --- a/src/contracts/Persistence/Content/Type/Group/CreateStruct.php +++ b/src/contracts/Persistence/Content/Type/Group/CreateStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\Type\Group; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/Type/Group/UpdateStruct.php b/src/contracts/Persistence/Content/Type/Group/UpdateStruct.php index e9d93727f6..f745e09fb3 100644 --- a/src/contracts/Persistence/Content/Type/Group/UpdateStruct.php +++ b/src/contracts/Persistence/Content/Type/Group/UpdateStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\Type\Group; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/Type/Handler.php b/src/contracts/Persistence/Content/Type/Handler.php index a2a72698af..6ec5d222a5 100644 --- a/src/contracts/Persistence/Content/Type/Handler.php +++ b/src/contracts/Persistence/Content/Type/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\Type; use Ibexa\Contracts\Core\Persistence\Content\Type; diff --git a/src/contracts/Persistence/Content/Type/UpdateStruct.php b/src/contracts/Persistence/Content/Type/UpdateStruct.php index 3c6a1783e3..085b06636f 100644 --- a/src/contracts/Persistence/Content/Type/UpdateStruct.php +++ b/src/contracts/Persistence/Content/Type/UpdateStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\Type; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/UpdateStruct.php b/src/contracts/Persistence/Content/UpdateStruct.php index a7d0b6e479..6d9a382f49 100644 --- a/src/contracts/Persistence/Content/UpdateStruct.php +++ b/src/contracts/Persistence/Content/UpdateStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/UrlAlias.php b/src/contracts/Persistence/Content/UrlAlias.php index 3d3aa741a4..67397f7b02 100644 --- a/src/contracts/Persistence/Content/UrlAlias.php +++ b/src/contracts/Persistence/Content/UrlAlias.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/UrlAlias/Handler.php b/src/contracts/Persistence/Content/UrlAlias/Handler.php index 1899770d73..eaf439f319 100644 --- a/src/contracts/Persistence/Content/UrlAlias/Handler.php +++ b/src/contracts/Persistence/Content/UrlAlias/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\UrlAlias; /** diff --git a/src/contracts/Persistence/Content/UrlWildcard.php b/src/contracts/Persistence/Content/UrlWildcard.php index 57345165a5..4b46a3f7d1 100644 --- a/src/contracts/Persistence/Content/UrlWildcard.php +++ b/src/contracts/Persistence/Content/UrlWildcard.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/Content/UrlWildcard/Handler.php b/src/contracts/Persistence/Content/UrlWildcard/Handler.php index 5ba68a395f..6ee91415aa 100644 --- a/src/contracts/Persistence/Content/UrlWildcard/Handler.php +++ b/src/contracts/Persistence/Content/UrlWildcard/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content\UrlWildcard; use Ibexa\Contracts\Core\Persistence\Content\UrlWildcard; diff --git a/src/contracts/Persistence/Content/VersionInfo.php b/src/contracts/Persistence/Content/VersionInfo.php index 5bb6dfecd7..9ec5f56422 100644 --- a/src/contracts/Persistence/Content/VersionInfo.php +++ b/src/contracts/Persistence/Content/VersionInfo.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/FieldType.php b/src/contracts/Persistence/FieldType.php index 9a24d26389..9f00954d12 100644 --- a/src/contracts/Persistence/FieldType.php +++ b/src/contracts/Persistence/FieldType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence; /** diff --git a/src/contracts/Persistence/FieldType/IsEmptyValue.php b/src/contracts/Persistence/FieldType/IsEmptyValue.php index c5f672c299..bb3f21eecb 100644 --- a/src/contracts/Persistence/FieldType/IsEmptyValue.php +++ b/src/contracts/Persistence/FieldType/IsEmptyValue.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\FieldType; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; diff --git a/src/contracts/Persistence/TransactionHandler.php b/src/contracts/Persistence/TransactionHandler.php index 77a4e0614d..d377aecbfa 100644 --- a/src/contracts/Persistence/TransactionHandler.php +++ b/src/contracts/Persistence/TransactionHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence; /** diff --git a/src/contracts/Persistence/URL/Handler.php b/src/contracts/Persistence/URL/Handler.php index df1f4edfbf..79001ed9eb 100644 --- a/src/contracts/Persistence/URL/Handler.php +++ b/src/contracts/Persistence/URL/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\URL; use Ibexa\Contracts\Core\Repository\Values\URL\URLQuery; diff --git a/src/contracts/Persistence/URL/URL.php b/src/contracts/Persistence/URL/URL.php index b2f8dd3935..4aec2bd608 100644 --- a/src/contracts/Persistence/URL/URL.php +++ b/src/contracts/Persistence/URL/URL.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\URL; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/URL/URLUpdateStruct.php b/src/contracts/Persistence/URL/URLUpdateStruct.php index 4df429051d..5858d84dbc 100644 --- a/src/contracts/Persistence/URL/URLUpdateStruct.php +++ b/src/contracts/Persistence/URL/URLUpdateStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\URL; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/User.php b/src/contracts/Persistence/User.php index 5e6351d123..2aaa50147a 100644 --- a/src/contracts/Persistence/User.php +++ b/src/contracts/Persistence/User.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence; class User extends ValueObject diff --git a/src/contracts/Persistence/User/Handler.php b/src/contracts/Persistence/User/Handler.php index e479ef5abe..e822b208e3 100644 --- a/src/contracts/Persistence/User/Handler.php +++ b/src/contracts/Persistence/User/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\User; use Ibexa\Contracts\Core\Persistence\User; diff --git a/src/contracts/Persistence/User/Policy.php b/src/contracts/Persistence/User/Policy.php index fb39e2013f..37f0d73986 100644 --- a/src/contracts/Persistence/User/Policy.php +++ b/src/contracts/Persistence/User/Policy.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\User; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/User/Role.php b/src/contracts/Persistence/User/Role.php index 176b188b4f..cb84fb7239 100644 --- a/src/contracts/Persistence/User/Role.php +++ b/src/contracts/Persistence/User/Role.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\User; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/User/RoleAssignment.php b/src/contracts/Persistence/User/RoleAssignment.php index 85999780b0..629f088454 100644 --- a/src/contracts/Persistence/User/RoleAssignment.php +++ b/src/contracts/Persistence/User/RoleAssignment.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\User; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/User/RoleCreateStruct.php b/src/contracts/Persistence/User/RoleCreateStruct.php index ee0fae508f..628fcc2681 100644 --- a/src/contracts/Persistence/User/RoleCreateStruct.php +++ b/src/contracts/Persistence/User/RoleCreateStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\User; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/User/RoleUpdateStruct.php b/src/contracts/Persistence/User/RoleUpdateStruct.php index 5080c86b93..2303710c63 100644 --- a/src/contracts/Persistence/User/RoleUpdateStruct.php +++ b/src/contracts/Persistence/User/RoleUpdateStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\User; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/User/UserTokenUpdateStruct.php b/src/contracts/Persistence/User/UserTokenUpdateStruct.php index 771d354362..c870e48184 100644 --- a/src/contracts/Persistence/User/UserTokenUpdateStruct.php +++ b/src/contracts/Persistence/User/UserTokenUpdateStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence\User; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Persistence/ValueObject.php b/src/contracts/Persistence/ValueObject.php index e577ceb3cd..e49b91807b 100644 --- a/src/contracts/Persistence/ValueObject.php +++ b/src/contracts/Persistence/ValueObject.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Persistence; use Ibexa\Contracts\Core\Repository\Values\ValueObject as APIValueObject; diff --git a/src/contracts/Repository/LanguageService.php b/src/contracts/Repository/LanguageService.php index bf3b3b574e..b9c0ec4943 100644 --- a/src/contracts/Repository/LanguageService.php +++ b/src/contracts/Repository/LanguageService.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Repository; use Ibexa\Contracts\Core\Repository\Values\Content\Language; diff --git a/src/contracts/Repository/ObjectStateService.php b/src/contracts/Repository/ObjectStateService.php index 0b1a3f74f7..74f84b2309 100644 --- a/src/contracts/Repository/ObjectStateService.php +++ b/src/contracts/Repository/ObjectStateService.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Repository; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; diff --git a/src/contracts/Repository/RoleService.php b/src/contracts/Repository/RoleService.php index 5332b69cc5..e9ccb7b700 100644 --- a/src/contracts/Repository/RoleService.php +++ b/src/contracts/Repository/RoleService.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Repository; use Ibexa\Contracts\Core\Limitation\Type; diff --git a/src/contracts/Repository/Translatable.php b/src/contracts/Repository/Translatable.php index 68ab807b74..af9780a120 100644 --- a/src/contracts/Repository/Translatable.php +++ b/src/contracts/Repository/Translatable.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Repository; /** diff --git a/src/contracts/Repository/TranslationService.php b/src/contracts/Repository/TranslationService.php index 51571c1b27..0286701c45 100644 --- a/src/contracts/Repository/TranslationService.php +++ b/src/contracts/Repository/TranslationService.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Repository; use Ibexa\Contracts\Core\Repository\Values\Translation; diff --git a/src/contracts/Repository/Values/Content/Query/FacetBuilder/DateRangeFacetBuilder.php b/src/contracts/Repository/Values/Content/Query/FacetBuilder/DateRangeFacetBuilder.php index 9cedb17322..bd708e04e4 100644 --- a/src/contracts/Repository/Values/Content/Query/FacetBuilder/DateRangeFacetBuilder.php +++ b/src/contracts/Repository/Values/Content/Query/FacetBuilder/DateRangeFacetBuilder.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Repository\Values\Content\Query\FacetBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\FacetBuilder; diff --git a/src/contracts/Repository/Values/MultiLanguageDescription.php b/src/contracts/Repository/Values/MultiLanguageDescription.php index d0e030949d..45c86df574 100644 --- a/src/contracts/Repository/Values/MultiLanguageDescription.php +++ b/src/contracts/Repository/Values/MultiLanguageDescription.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Repository\Values; /** diff --git a/src/contracts/Repository/Values/MultiLanguageName.php b/src/contracts/Repository/Values/MultiLanguageName.php index cfb7e9b5a5..344942d937 100644 --- a/src/contracts/Repository/Values/MultiLanguageName.php +++ b/src/contracts/Repository/Values/MultiLanguageName.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Repository\Values; /** diff --git a/src/contracts/Repository/Values/Translation/Message.php b/src/contracts/Repository/Values/Translation/Message.php index 16fcd84552..20b2eed75b 100644 --- a/src/contracts/Repository/Values/Translation/Message.php +++ b/src/contracts/Repository/Values/Translation/Message.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Repository\Values\Translation; use Ibexa\Contracts\Core\Repository\Values\Translation; diff --git a/src/contracts/Repository/Values/Translation/Plural.php b/src/contracts/Repository/Values/Translation/Plural.php index 720c8f5347..a05d37ebb3 100644 --- a/src/contracts/Repository/Values/Translation/Plural.php +++ b/src/contracts/Repository/Values/Translation/Plural.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Repository\Values\Translation; use Ibexa\Contracts\Core\Repository\Values\Translation; diff --git a/src/contracts/Repository/Values/ValueObject.php b/src/contracts/Repository/Values/ValueObject.php index 3aa5b81e76..40195ed9e9 100644 --- a/src/contracts/Repository/Values/ValueObject.php +++ b/src/contracts/Repository/Values/ValueObject.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Repository\Values; use Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException; diff --git a/src/contracts/Search/Document.php b/src/contracts/Search/Document.php index 8f5ef3acd6..3203d26aca 100644 --- a/src/contracts/Search/Document.php +++ b/src/contracts/Search/Document.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search; use Ibexa\Contracts\Core\Repository\Values\ValueObject; diff --git a/src/contracts/Search/Field.php b/src/contracts/Search/Field.php index b74500c8b4..1d0c84a66c 100644 --- a/src/contracts/Search/Field.php +++ b/src/contracts/Search/Field.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Search/FieldType.php b/src/contracts/Search/FieldType.php index 5163df332c..c8bb88c0c2 100644 --- a/src/contracts/Search/FieldType.php +++ b/src/contracts/Search/FieldType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/contracts/Search/FieldType/BooleanField.php b/src/contracts/Search/FieldType/BooleanField.php index 60d50e479d..cb82ef1e62 100644 --- a/src/contracts/Search/FieldType/BooleanField.php +++ b/src/contracts/Search/FieldType/BooleanField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search\FieldType; use Ibexa\Contracts\Core\Search\FieldType; diff --git a/src/contracts/Search/FieldType/CustomField.php b/src/contracts/Search/FieldType/CustomField.php index 102f598b82..42258e9eff 100644 --- a/src/contracts/Search/FieldType/CustomField.php +++ b/src/contracts/Search/FieldType/CustomField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search\FieldType; use Ibexa\Contracts\Core\Search\FieldType; diff --git a/src/contracts/Search/FieldType/DateField.php b/src/contracts/Search/FieldType/DateField.php index dea29d1747..dca1601225 100644 --- a/src/contracts/Search/FieldType/DateField.php +++ b/src/contracts/Search/FieldType/DateField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search\FieldType; use Ibexa\Contracts\Core\Search\FieldType; diff --git a/src/contracts/Search/FieldType/DocumentField.php b/src/contracts/Search/FieldType/DocumentField.php index c08c18eb5c..23c79fcc0a 100644 --- a/src/contracts/Search/FieldType/DocumentField.php +++ b/src/contracts/Search/FieldType/DocumentField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search\FieldType; use Ibexa\Contracts\Core\Search\FieldType; diff --git a/src/contracts/Search/FieldType/FloatField.php b/src/contracts/Search/FieldType/FloatField.php index 6a4a2c3e19..8bef513295 100644 --- a/src/contracts/Search/FieldType/FloatField.php +++ b/src/contracts/Search/FieldType/FloatField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search\FieldType; use Ibexa\Contracts\Core\Search\FieldType; diff --git a/src/contracts/Search/FieldType/FullTextField.php b/src/contracts/Search/FieldType/FullTextField.php index b430603963..28fc3f8216 100644 --- a/src/contracts/Search/FieldType/FullTextField.php +++ b/src/contracts/Search/FieldType/FullTextField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search\FieldType; use Ibexa\Contracts\Core\Search\FieldType; diff --git a/src/contracts/Search/FieldType/GeoLocationField.php b/src/contracts/Search/FieldType/GeoLocationField.php index a514d765ca..afa1ec080e 100644 --- a/src/contracts/Search/FieldType/GeoLocationField.php +++ b/src/contracts/Search/FieldType/GeoLocationField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search\FieldType; use Ibexa\Contracts\Core\Search\FieldType; diff --git a/src/contracts/Search/FieldType/IdentifierField.php b/src/contracts/Search/FieldType/IdentifierField.php index 552e931c80..341536806a 100644 --- a/src/contracts/Search/FieldType/IdentifierField.php +++ b/src/contracts/Search/FieldType/IdentifierField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search\FieldType; use Ibexa\Contracts\Core\Search\FieldType; diff --git a/src/contracts/Search/FieldType/IntegerField.php b/src/contracts/Search/FieldType/IntegerField.php index 115773d8b0..acafba82b1 100644 --- a/src/contracts/Search/FieldType/IntegerField.php +++ b/src/contracts/Search/FieldType/IntegerField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search\FieldType; use Ibexa\Contracts\Core\Search\FieldType; diff --git a/src/contracts/Search/FieldType/MultipleBooleanField.php b/src/contracts/Search/FieldType/MultipleBooleanField.php index 48d3b3e796..ae48b4582d 100644 --- a/src/contracts/Search/FieldType/MultipleBooleanField.php +++ b/src/contracts/Search/FieldType/MultipleBooleanField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search\FieldType; use Ibexa\Contracts\Core\Search\FieldType; diff --git a/src/contracts/Search/FieldType/MultipleIdentifierField.php b/src/contracts/Search/FieldType/MultipleIdentifierField.php index e3682560bd..55c4ca8d54 100644 --- a/src/contracts/Search/FieldType/MultipleIdentifierField.php +++ b/src/contracts/Search/FieldType/MultipleIdentifierField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search\FieldType; use Ibexa\Contracts\Core\Search\FieldType; diff --git a/src/contracts/Search/FieldType/MultipleIntegerField.php b/src/contracts/Search/FieldType/MultipleIntegerField.php index 902389df5e..2430b70850 100644 --- a/src/contracts/Search/FieldType/MultipleIntegerField.php +++ b/src/contracts/Search/FieldType/MultipleIntegerField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search\FieldType; use Ibexa\Contracts\Core\Search\FieldType; diff --git a/src/contracts/Search/FieldType/MultipleRemoteIdentifierField.php b/src/contracts/Search/FieldType/MultipleRemoteIdentifierField.php index 0af2eb37c1..c2ae1e4e58 100644 --- a/src/contracts/Search/FieldType/MultipleRemoteIdentifierField.php +++ b/src/contracts/Search/FieldType/MultipleRemoteIdentifierField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search\FieldType; use Ibexa\Contracts\Core\Search\FieldType; diff --git a/src/contracts/Search/FieldType/MultipleStringField.php b/src/contracts/Search/FieldType/MultipleStringField.php index 3d8a6bbe8e..04a7f5de5f 100644 --- a/src/contracts/Search/FieldType/MultipleStringField.php +++ b/src/contracts/Search/FieldType/MultipleStringField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search\FieldType; use Ibexa\Contracts\Core\Search\FieldType; diff --git a/src/contracts/Search/FieldType/PriceField.php b/src/contracts/Search/FieldType/PriceField.php index 5c446c8a28..7bc53b1d76 100644 --- a/src/contracts/Search/FieldType/PriceField.php +++ b/src/contracts/Search/FieldType/PriceField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search\FieldType; use Ibexa\Contracts\Core\Search\FieldType; diff --git a/src/contracts/Search/FieldType/RemoteIdentifierField.php b/src/contracts/Search/FieldType/RemoteIdentifierField.php index 55a9a70133..9f9d74f320 100644 --- a/src/contracts/Search/FieldType/RemoteIdentifierField.php +++ b/src/contracts/Search/FieldType/RemoteIdentifierField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search\FieldType; use Ibexa\Contracts\Core\Search\FieldType; diff --git a/src/contracts/Search/FieldType/StringField.php b/src/contracts/Search/FieldType/StringField.php index 5dadd1e2e3..2bfd2f8a7e 100644 --- a/src/contracts/Search/FieldType/StringField.php +++ b/src/contracts/Search/FieldType/StringField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search\FieldType; use Ibexa\Contracts\Core\Search\FieldType; diff --git a/src/contracts/Search/FieldType/TextField.php b/src/contracts/Search/FieldType/TextField.php index 93c53c8301..7a9853d033 100644 --- a/src/contracts/Search/FieldType/TextField.php +++ b/src/contracts/Search/FieldType/TextField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search\FieldType; use Ibexa\Contracts\Core\Search\FieldType; diff --git a/src/contracts/Search/Handler.php b/src/contracts/Search/Handler.php index 314377f965..bfd390f14b 100644 --- a/src/contracts/Search/Handler.php +++ b/src/contracts/Search/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Search; use Ibexa\Contracts\Core\Persistence\Content; diff --git a/src/contracts/SiteAccess/ConfigResolverInterface.php b/src/contracts/SiteAccess/ConfigResolverInterface.php index c2fb705b54..a478c54e48 100644 --- a/src/contracts/SiteAccess/ConfigResolverInterface.php +++ b/src/contracts/SiteAccess/ConfigResolverInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\SiteAccess; /** diff --git a/src/contracts/Test/IbexaKernelTestTrait.php b/src/contracts/Test/IbexaKernelTestTrait.php index 6b75669022..fb36233104 100644 --- a/src/contracts/Test/IbexaKernelTestTrait.php +++ b/src/contracts/Test/IbexaKernelTestTrait.php @@ -71,6 +71,7 @@ protected static function getFixtures(): iterable /** * @template T of object + * * @phpstan-param class-string $className * * @return T diff --git a/src/contracts/Test/IbexaTestKernelInterface.php b/src/contracts/Test/IbexaTestKernelInterface.php index 55f6e42186..31af73e6ed 100644 --- a/src/contracts/Test/IbexaTestKernelInterface.php +++ b/src/contracts/Test/IbexaTestKernelInterface.php @@ -10,6 +10,7 @@ /** * @internal + * * @experimental */ interface IbexaTestKernelInterface diff --git a/src/contracts/Test/Repository/SetupFactory.php b/src/contracts/Test/Repository/SetupFactory.php index eb2d57f9cb..93a4ef1509 100644 --- a/src/contracts/Test/Repository/SetupFactory.php +++ b/src/contracts/Test/Repository/SetupFactory.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Test\Repository; /** diff --git a/src/contracts/Test/Repository/SetupFactory/Legacy.php b/src/contracts/Test/Repository/SetupFactory/Legacy.php index d690e77406..bfd6b7068a 100644 --- a/src/contracts/Test/Repository/SetupFactory/Legacy.php +++ b/src/contracts/Test/Repository/SetupFactory/Legacy.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Test\Repository\SetupFactory; use Doctrine\DBAL\Connection; diff --git a/src/contracts/User/Identity.php b/src/contracts/User/Identity.php index a7fa649160..e516384747 100644 --- a/src/contracts/User/Identity.php +++ b/src/contracts/User/Identity.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\User; /** diff --git a/src/contracts/User/IdentityAware.php b/src/contracts/User/IdentityAware.php index e17bc53d4c..ea72f22f13 100644 --- a/src/contracts/User/IdentityAware.php +++ b/src/contracts/User/IdentityAware.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\User; /** diff --git a/src/contracts/Variation/Values/ImageVariation.php b/src/contracts/Variation/Values/ImageVariation.php index 980808f723..0ffe0efd75 100644 --- a/src/contracts/Variation/Values/ImageVariation.php +++ b/src/contracts/Variation/Values/ImageVariation.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Variation\Values; /** diff --git a/src/contracts/Variation/Values/Variation.php b/src/contracts/Variation/Values/Variation.php index ec373e1890..e9018002f6 100644 --- a/src/contracts/Variation/Values/Variation.php +++ b/src/contracts/Variation/Values/Variation.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Variation\Values; use Ibexa\Contracts\Core\Repository\Values\ValueObject; diff --git a/src/contracts/Variation/VariationHandler.php b/src/contracts/Variation/VariationHandler.php index 04a87c04c5..652496c575 100644 --- a/src/contracts/Variation/VariationHandler.php +++ b/src/contracts/Variation/VariationHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Variation; use Ibexa\Contracts\Core\Repository\Values\Content\Field; diff --git a/src/contracts/Variation/VariationPathGenerator.php b/src/contracts/Variation/VariationPathGenerator.php index b4ce04f8be..07b781e671 100644 --- a/src/contracts/Variation/VariationPathGenerator.php +++ b/src/contracts/Variation/VariationPathGenerator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Variation; /** diff --git a/src/contracts/Variation/VariationPurger.php b/src/contracts/Variation/VariationPurger.php index 8cef29a434..a611a2b5c1 100644 --- a/src/contracts/Variation/VariationPurger.php +++ b/src/contracts/Variation/VariationPurger.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\Core\Variation; /** diff --git a/src/lib/Base/Container/ApiLoader/RepositoryFactory.php b/src/lib/Base/Container/ApiLoader/RepositoryFactory.php index c4b1cbb17e..959bb4b10b 100644 --- a/src/lib/Base/Container/ApiLoader/RepositoryFactory.php +++ b/src/lib/Base/Container/ApiLoader/RepositoryFactory.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Container\ApiLoader; use Ibexa\Contracts\Core\Persistence\Filter\Content\Handler as ContentFilteringHandler; diff --git a/src/lib/Base/Container/Compiler/AbstractFieldTypeBasedPass.php b/src/lib/Base/Container/Compiler/AbstractFieldTypeBasedPass.php index 4a2c3068db..d8f8075318 100644 --- a/src/lib/Base/Container/Compiler/AbstractFieldTypeBasedPass.php +++ b/src/lib/Base/Container/Compiler/AbstractFieldTypeBasedPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Container\Compiler; use LogicException; diff --git a/src/lib/Base/Container/Compiler/FieldTypeRegistryPass.php b/src/lib/Base/Container/Compiler/FieldTypeRegistryPass.php index 955da2ef37..e0a9c5b1ad 100644 --- a/src/lib/Base/Container/Compiler/FieldTypeRegistryPass.php +++ b/src/lib/Base/Container/Compiler/FieldTypeRegistryPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Container\Compiler; use Ibexa\Core\FieldType\FieldTypeRegistry; diff --git a/src/lib/Base/Container/Compiler/Persistence/FieldTypeRegistryPass.php b/src/lib/Base/Container/Compiler/Persistence/FieldTypeRegistryPass.php index ec0e6c617a..fa7a635837 100644 --- a/src/lib/Base/Container/Compiler/Persistence/FieldTypeRegistryPass.php +++ b/src/lib/Base/Container/Compiler/Persistence/FieldTypeRegistryPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Container\Compiler\Persistence; use Ibexa\Core\Base\Container\Compiler\AbstractFieldTypeBasedPass; diff --git a/src/lib/Base/Container/Compiler/Search/AggregateFieldValueMapperPass.php b/src/lib/Base/Container/Compiler/Search/AggregateFieldValueMapperPass.php index fdda21cfac..34bff08dc3 100644 --- a/src/lib/Base/Container/Compiler/Search/AggregateFieldValueMapperPass.php +++ b/src/lib/Base/Container/Compiler/Search/AggregateFieldValueMapperPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Container\Compiler\Search; use Ibexa\Core\Search\Common\FieldValueMapper\Aggregate; diff --git a/src/lib/Base/Container/Compiler/Search/FieldRegistryPass.php b/src/lib/Base/Container/Compiler/Search/FieldRegistryPass.php index a2b81739f6..6c70904c08 100644 --- a/src/lib/Base/Container/Compiler/Search/FieldRegistryPass.php +++ b/src/lib/Base/Container/Compiler/Search/FieldRegistryPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Container\Compiler\Search; use Ibexa\Core\Search\Common\FieldRegistry; diff --git a/src/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPass.php b/src/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPass.php index f28331e82e..72d6a666df 100644 --- a/src/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPass.php +++ b/src/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Container\Compiler\Search\Legacy; use Ibexa\Core\Persistence\Legacy\URL\Query\CriteriaConverter; diff --git a/src/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPass.php b/src/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPass.php index 0fe22241d3..56726be00e 100644 --- a/src/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPass.php +++ b/src/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Container\Compiler\Search\Legacy; use Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\HandlerRegistry; diff --git a/src/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPass.php b/src/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPass.php index 8de87e3cdd..daf4e4575d 100644 --- a/src/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPass.php +++ b/src/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Container\Compiler\Search\Legacy; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; diff --git a/src/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPass.php b/src/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPass.php index 165ec9e1e5..a58750fa69 100644 --- a/src/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPass.php +++ b/src/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Container\Compiler\Storage; use Ibexa\Core\FieldType\GatewayBasedStorage; diff --git a/src/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPass.php b/src/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPass.php index e877da9d60..f14e55410f 100644 --- a/src/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPass.php +++ b/src/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Container\Compiler\Storage\Legacy; use Ibexa\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry; diff --git a/src/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPass.php b/src/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPass.php index c78295b118..7fe26d7b60 100644 --- a/src/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPass.php +++ b/src/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Container\Compiler\Storage\Legacy; use Ibexa\Core\Persistence\Legacy\User\Role\LimitationConverter; diff --git a/src/lib/Base/Exceptions/BadStateException.php b/src/lib/Base/Exceptions/BadStateException.php index a4c41bd537..ce76d2c60c 100644 --- a/src/lib/Base/Exceptions/BadStateException.php +++ b/src/lib/Base/Exceptions/BadStateException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Exceptions; use Exception; diff --git a/src/lib/Base/Exceptions/ContentFieldValidationException.php b/src/lib/Base/Exceptions/ContentFieldValidationException.php index 0b8091dca4..1e10831293 100644 --- a/src/lib/Base/Exceptions/ContentFieldValidationException.php +++ b/src/lib/Base/Exceptions/ContentFieldValidationException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Exceptions; use Ibexa\Contracts\Core\Repository\Exceptions\ContentFieldValidationException as APIContentFieldValidationException; diff --git a/src/lib/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php b/src/lib/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php index a2046b4870..22ebf9360d 100644 --- a/src/lib/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php +++ b/src/lib/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Exceptions; use Ibexa\Contracts\Core\Repository\Exceptions\ContentTypeFieldDefinitionValidationException as APIContentTypeFieldDefinitionValidationException; diff --git a/src/lib/Base/Exceptions/ContentTypeValidationException.php b/src/lib/Base/Exceptions/ContentTypeValidationException.php index 43f2e768db..220dd1e953 100644 --- a/src/lib/Base/Exceptions/ContentTypeValidationException.php +++ b/src/lib/Base/Exceptions/ContentTypeValidationException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Exceptions; use Ibexa\Contracts\Core\Repository\Exceptions\ContentTypeValidationException as APIContentTypeValidationException; diff --git a/src/lib/Base/Exceptions/ContentValidationException.php b/src/lib/Base/Exceptions/ContentValidationException.php index 83ba4aa0c4..7b249f5062 100644 --- a/src/lib/Base/Exceptions/ContentValidationException.php +++ b/src/lib/Base/Exceptions/ContentValidationException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Exceptions; use Ibexa\Contracts\Core\Repository\Exceptions\ContentValidationException as APIContentValidationException; diff --git a/src/lib/Base/Exceptions/ForbiddenException.php b/src/lib/Base/Exceptions/ForbiddenException.php index 5f80bab8ff..6e89faa425 100644 --- a/src/lib/Base/Exceptions/ForbiddenException.php +++ b/src/lib/Base/Exceptions/ForbiddenException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Exceptions; use Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException as APIForbiddenException; diff --git a/src/lib/Base/Exceptions/Httpable.php b/src/lib/Base/Exceptions/Httpable.php index 5a8c44f056..97147510b0 100644 --- a/src/lib/Base/Exceptions/Httpable.php +++ b/src/lib/Base/Exceptions/Httpable.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Exceptions; /** diff --git a/src/lib/Base/Exceptions/InvalidArgumentException.php b/src/lib/Base/Exceptions/InvalidArgumentException.php index 95aafad9cf..4468260384 100644 --- a/src/lib/Base/Exceptions/InvalidArgumentException.php +++ b/src/lib/Base/Exceptions/InvalidArgumentException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Exceptions; use Exception; diff --git a/src/lib/Base/Exceptions/InvalidArgumentType.php b/src/lib/Base/Exceptions/InvalidArgumentType.php index 7a4e7799fe..4e95e270e0 100644 --- a/src/lib/Base/Exceptions/InvalidArgumentType.php +++ b/src/lib/Base/Exceptions/InvalidArgumentType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Exceptions; use Exception; diff --git a/src/lib/Base/Exceptions/InvalidArgumentValue.php b/src/lib/Base/Exceptions/InvalidArgumentValue.php index 02dad42371..94cfb2ec89 100644 --- a/src/lib/Base/Exceptions/InvalidArgumentValue.php +++ b/src/lib/Base/Exceptions/InvalidArgumentValue.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Exceptions; use Exception; diff --git a/src/lib/Base/Exceptions/LimitationValidationException.php b/src/lib/Base/Exceptions/LimitationValidationException.php index d16dec73f3..e826b2f657 100644 --- a/src/lib/Base/Exceptions/LimitationValidationException.php +++ b/src/lib/Base/Exceptions/LimitationValidationException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Exceptions; use Ibexa\Contracts\Core\Repository\Exceptions\LimitationValidationException as APILimitationValidationException; diff --git a/src/lib/Base/Exceptions/MissingClass.php b/src/lib/Base/Exceptions/MissingClass.php index 76ea1008ad..0209f447b5 100644 --- a/src/lib/Base/Exceptions/MissingClass.php +++ b/src/lib/Base/Exceptions/MissingClass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Exceptions; use Exception; diff --git a/src/lib/Base/Exceptions/MissingUserFieldTypeException.php b/src/lib/Base/Exceptions/MissingUserFieldTypeException.php index 495acb4553..caced1bdfa 100644 --- a/src/lib/Base/Exceptions/MissingUserFieldTypeException.php +++ b/src/lib/Base/Exceptions/MissingUserFieldTypeException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Exceptions; use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; diff --git a/src/lib/Base/Exceptions/NotFound/FieldTypeNotFoundException.php b/src/lib/Base/Exceptions/NotFound/FieldTypeNotFoundException.php index 1ea37f1d2b..34c03af440 100644 --- a/src/lib/Base/Exceptions/NotFound/FieldTypeNotFoundException.php +++ b/src/lib/Base/Exceptions/NotFound/FieldTypeNotFoundException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Exceptions\NotFound; use Exception; diff --git a/src/lib/Base/Exceptions/NotFound/LimitationNotFoundException.php b/src/lib/Base/Exceptions/NotFound/LimitationNotFoundException.php index 45125f777a..7247127faf 100644 --- a/src/lib/Base/Exceptions/NotFound/LimitationNotFoundException.php +++ b/src/lib/Base/Exceptions/NotFound/LimitationNotFoundException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Exceptions\NotFound; use Exception; diff --git a/src/lib/Base/Exceptions/NotFoundException.php b/src/lib/Base/Exceptions/NotFoundException.php index efbd4242e5..298e1d6b07 100644 --- a/src/lib/Base/Exceptions/NotFoundException.php +++ b/src/lib/Base/Exceptions/NotFoundException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Exceptions; use Exception; diff --git a/src/lib/Base/Exceptions/UnauthorizedException.php b/src/lib/Base/Exceptions/UnauthorizedException.php index 7b126e35b3..b9152240f7 100644 --- a/src/lib/Base/Exceptions/UnauthorizedException.php +++ b/src/lib/Base/Exceptions/UnauthorizedException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Exceptions; use Exception; diff --git a/src/lib/Base/ServiceContainer.php b/src/lib/Base/ServiceContainer.php index 3dc1ae862d..7ee3f742d7 100644 --- a/src/lib/Base/ServiceContainer.php +++ b/src/lib/Base/ServiceContainer.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base; use Ibexa\Contracts\Core\Container; diff --git a/src/lib/Base/Translatable.php b/src/lib/Base/Translatable.php index 479d41e9a2..413fb198b6 100644 --- a/src/lib/Base/Translatable.php +++ b/src/lib/Base/Translatable.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base; /** diff --git a/src/lib/Base/TranslatableBase.php b/src/lib/Base/TranslatableBase.php index f3f15507e7..7f0ccee7bd 100644 --- a/src/lib/Base/TranslatableBase.php +++ b/src/lib/Base/TranslatableBase.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base; /** diff --git a/src/lib/Base/Utils/DeprecationWarner.php b/src/lib/Base/Utils/DeprecationWarner.php index dd4017eaa5..edf7afb7fa 100644 --- a/src/lib/Base/Utils/DeprecationWarner.php +++ b/src/lib/Base/Utils/DeprecationWarner.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Utils; class DeprecationWarner implements DeprecationWarnerInterface diff --git a/src/lib/Base/Utils/DeprecationWarnerInterface.php b/src/lib/Base/Utils/DeprecationWarnerInterface.php index d99dd903b7..975e24b93b 100644 --- a/src/lib/Base/Utils/DeprecationWarnerInterface.php +++ b/src/lib/Base/Utils/DeprecationWarnerInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Base\Utils; /** diff --git a/src/lib/FieldType/Author/Author.php b/src/lib/FieldType/Author/Author.php index 51a1bee824..0b07025363 100644 --- a/src/lib/FieldType/Author/Author.php +++ b/src/lib/FieldType/Author/Author.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Author; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/lib/FieldType/Author/AuthorCollection.php b/src/lib/FieldType/Author/AuthorCollection.php index fa78b1a2d5..9b3f303278 100644 --- a/src/lib/FieldType/Author/AuthorCollection.php +++ b/src/lib/FieldType/Author/AuthorCollection.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Author; use ArrayObject; diff --git a/src/lib/FieldType/Author/SearchField.php b/src/lib/FieldType/Author/SearchField.php index 7f63151ac8..89de149205 100644 --- a/src/lib/FieldType/Author/SearchField.php +++ b/src/lib/FieldType/Author/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Author; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/Author/Type.php b/src/lib/FieldType/Author/Type.php index 61db3acff0..e4c86e47fd 100644 --- a/src/lib/FieldType/Author/Type.php +++ b/src/lib/FieldType/Author/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Author; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/src/lib/FieldType/Author/Value.php b/src/lib/FieldType/Author/Value.php index 1e61cdc12e..1a632420dc 100644 --- a/src/lib/FieldType/Author/Value.php +++ b/src/lib/FieldType/Author/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Author; use Ibexa\Core\FieldType\Value as BaseValue; diff --git a/src/lib/FieldType/BinaryBase/BinaryBaseStorage.php b/src/lib/FieldType/BinaryBase/BinaryBaseStorage.php index 7817c92801..d70f00c742 100644 --- a/src/lib/FieldType/BinaryBase/BinaryBaseStorage.php +++ b/src/lib/FieldType/BinaryBase/BinaryBaseStorage.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\BinaryBase; use Ibexa\Contracts\Core\FieldType\BinaryBase\PathGenerator; diff --git a/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php b/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php index ade24ff438..e1943ca20d 100644 --- a/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php +++ b/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\BinaryBase\BinaryBaseStorage; use Ibexa\Contracts\Core\FieldType\StorageGateway; diff --git a/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php index bd34223549..1721be5de1 100644 --- a/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway; use Doctrine\DBAL\Connection; diff --git a/src/lib/FieldType/BinaryBase/PathGenerator/LegacyPathGenerator.php b/src/lib/FieldType/BinaryBase/PathGenerator/LegacyPathGenerator.php index 221228d294..a4e59598fd 100644 --- a/src/lib/FieldType/BinaryBase/PathGenerator/LegacyPathGenerator.php +++ b/src/lib/FieldType/BinaryBase/PathGenerator/LegacyPathGenerator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\BinaryBase\PathGenerator; use Ibexa\Contracts\Core\FieldType\BinaryBase\PathGenerator; diff --git a/src/lib/FieldType/BinaryBase/Type.php b/src/lib/FieldType/BinaryBase/Type.php index fa9b750b16..784e2b2444 100644 --- a/src/lib/FieldType/BinaryBase/Type.php +++ b/src/lib/FieldType/BinaryBase/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\BinaryBase; use Ibexa\Contracts\Core\FieldType\BinaryBase\RouteAwarePathGenerator; diff --git a/src/lib/FieldType/BinaryBase/Value.php b/src/lib/FieldType/BinaryBase/Value.php index e3b1608e9f..af1021053f 100644 --- a/src/lib/FieldType/BinaryBase/Value.php +++ b/src/lib/FieldType/BinaryBase/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\BinaryBase; use Ibexa\Core\FieldType\Value as BaseValue; diff --git a/src/lib/FieldType/BinaryFile/BinaryFileStorage.php b/src/lib/FieldType/BinaryFile/BinaryFileStorage.php index 5657a5d967..fe75e3780c 100644 --- a/src/lib/FieldType/BinaryFile/BinaryFileStorage.php +++ b/src/lib/FieldType/BinaryFile/BinaryFileStorage.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\BinaryFile; use Ibexa\Core\FieldType\BinaryBase\BinaryBaseStorage; diff --git a/src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php index 9cd3e48f20..6a41c09565 100644 --- a/src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\BinaryFile\BinaryFileStorage\Gateway; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/FieldType/BinaryFile/SearchField.php b/src/lib/FieldType/BinaryFile/SearchField.php index 0d58746314..f705b1d013 100644 --- a/src/lib/FieldType/BinaryFile/SearchField.php +++ b/src/lib/FieldType/BinaryFile/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\BinaryFile; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/BinaryFile/Type.php b/src/lib/FieldType/BinaryFile/Type.php index c14a35e070..5ca184c593 100644 --- a/src/lib/FieldType/BinaryFile/Type.php +++ b/src/lib/FieldType/BinaryFile/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\BinaryFile; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/src/lib/FieldType/BinaryFile/Value.php b/src/lib/FieldType/BinaryFile/Value.php index a92c6329b3..0e045aa33e 100644 --- a/src/lib/FieldType/BinaryFile/Value.php +++ b/src/lib/FieldType/BinaryFile/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\BinaryFile; use Ibexa\Core\FieldType\BinaryBase\Value as BaseValue; diff --git a/src/lib/FieldType/Checkbox/SearchField.php b/src/lib/FieldType/Checkbox/SearchField.php index 1b1a427844..1f0fb0834b 100644 --- a/src/lib/FieldType/Checkbox/SearchField.php +++ b/src/lib/FieldType/Checkbox/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Checkbox; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/Checkbox/Type.php b/src/lib/FieldType/Checkbox/Type.php index c0971f6bc2..b0d6a14c6e 100644 --- a/src/lib/FieldType/Checkbox/Type.php +++ b/src/lib/FieldType/Checkbox/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Checkbox; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/src/lib/FieldType/Checkbox/Value.php b/src/lib/FieldType/Checkbox/Value.php index 016e95d513..e1de171cf0 100644 --- a/src/lib/FieldType/Checkbox/Value.php +++ b/src/lib/FieldType/Checkbox/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Checkbox; use Ibexa\Core\FieldType\Value as BaseValue; diff --git a/src/lib/FieldType/Country/Exception/InvalidValue.php b/src/lib/FieldType/Country/Exception/InvalidValue.php index 5a7f714e06..feeb5a9e7c 100644 --- a/src/lib/FieldType/Country/Exception/InvalidValue.php +++ b/src/lib/FieldType/Country/Exception/InvalidValue.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Country\Exception; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; diff --git a/src/lib/FieldType/Country/SearchField.php b/src/lib/FieldType/Country/SearchField.php index e773e16d67..5c38c4d126 100644 --- a/src/lib/FieldType/Country/SearchField.php +++ b/src/lib/FieldType/Country/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Country; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/Country/Type.php b/src/lib/FieldType/Country/Type.php index 7bb257ad38..cca3abadb7 100644 --- a/src/lib/FieldType/Country/Type.php +++ b/src/lib/FieldType/Country/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Country; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/src/lib/FieldType/Country/Value.php b/src/lib/FieldType/Country/Value.php index a032be5477..35917cf7ae 100644 --- a/src/lib/FieldType/Country/Value.php +++ b/src/lib/FieldType/Country/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Country; use Ibexa\Core\FieldType\Value as BaseValue; diff --git a/src/lib/FieldType/Date/SearchField.php b/src/lib/FieldType/Date/SearchField.php index 0e8eeeb513..7189af1a8d 100644 --- a/src/lib/FieldType/Date/SearchField.php +++ b/src/lib/FieldType/Date/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Date; use DateTime; diff --git a/src/lib/FieldType/Date/Type.php b/src/lib/FieldType/Date/Type.php index 4af0fa813c..923e067327 100644 --- a/src/lib/FieldType/Date/Type.php +++ b/src/lib/FieldType/Date/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Date; use DateTime; diff --git a/src/lib/FieldType/Date/Value.php b/src/lib/FieldType/Date/Value.php index 126fbee346..22216e273d 100644 --- a/src/lib/FieldType/Date/Value.php +++ b/src/lib/FieldType/Date/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Date; use DateTime; diff --git a/src/lib/FieldType/DateAndTime/SearchField.php b/src/lib/FieldType/DateAndTime/SearchField.php index 55274cc62e..5b466bf1ed 100644 --- a/src/lib/FieldType/DateAndTime/SearchField.php +++ b/src/lib/FieldType/DateAndTime/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\DateAndTime; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/DateAndTime/Type.php b/src/lib/FieldType/DateAndTime/Type.php index 0303719a76..40bd2378f6 100644 --- a/src/lib/FieldType/DateAndTime/Type.php +++ b/src/lib/FieldType/DateAndTime/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\DateAndTime; use DateInterval; diff --git a/src/lib/FieldType/DateAndTime/Value.php b/src/lib/FieldType/DateAndTime/Value.php index a13959c054..776896a682 100644 --- a/src/lib/FieldType/DateAndTime/Value.php +++ b/src/lib/FieldType/DateAndTime/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\DateAndTime; use DateTime; diff --git a/src/lib/FieldType/EmailAddress/SearchField.php b/src/lib/FieldType/EmailAddress/SearchField.php index 328e3f3fd9..289e7f3efa 100644 --- a/src/lib/FieldType/EmailAddress/SearchField.php +++ b/src/lib/FieldType/EmailAddress/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\EmailAddress; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/EmailAddress/Type.php b/src/lib/FieldType/EmailAddress/Type.php index 0880c8bfb8..8a26254247 100644 --- a/src/lib/FieldType/EmailAddress/Type.php +++ b/src/lib/FieldType/EmailAddress/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\EmailAddress; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/src/lib/FieldType/EmailAddress/Value.php b/src/lib/FieldType/EmailAddress/Value.php index ef3e029f7b..efca47f24c 100644 --- a/src/lib/FieldType/EmailAddress/Value.php +++ b/src/lib/FieldType/EmailAddress/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\EmailAddress; use Ibexa\Core\FieldType\Value as BaseValue; diff --git a/src/lib/FieldType/FieldSettings.php b/src/lib/FieldType/FieldSettings.php index 083fb576e7..c35208b650 100644 --- a/src/lib/FieldType/FieldSettings.php +++ b/src/lib/FieldType/FieldSettings.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType; use ArrayObject; diff --git a/src/lib/FieldType/FieldType.php b/src/lib/FieldType/FieldType.php index 6d6395c92d..dfe18ba471 100644 --- a/src/lib/FieldType/FieldType.php +++ b/src/lib/FieldType/FieldType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType; use Ibexa\Contracts\Core\FieldType\Comparable; diff --git a/src/lib/FieldType/FieldTypeRegistry.php b/src/lib/FieldType/FieldTypeRegistry.php index 1b463bbe63..7d0cbfe05d 100644 --- a/src/lib/FieldType/FieldTypeRegistry.php +++ b/src/lib/FieldType/FieldTypeRegistry.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType; use Ibexa\Contracts\Core\FieldType\FieldType as SPIFieldType; diff --git a/src/lib/FieldType/Float/SearchField.php b/src/lib/FieldType/Float/SearchField.php index 7d8b535d03..73be5b540a 100644 --- a/src/lib/FieldType/Float/SearchField.php +++ b/src/lib/FieldType/Float/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Float; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/Float/Type.php b/src/lib/FieldType/Float/Type.php index a8e2a3001b..38b4412f2e 100644 --- a/src/lib/FieldType/Float/Type.php +++ b/src/lib/FieldType/Float/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Float; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/src/lib/FieldType/Float/Value.php b/src/lib/FieldType/Float/Value.php index d2aa2707ff..4e0e976d2b 100644 --- a/src/lib/FieldType/Float/Value.php +++ b/src/lib/FieldType/Float/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Float; use Ibexa\Core\FieldType\Value as BaseValue; diff --git a/src/lib/FieldType/GatewayBasedStorage.php b/src/lib/FieldType/GatewayBasedStorage.php index 4b0a43efeb..e97b1dd34f 100644 --- a/src/lib/FieldType/GatewayBasedStorage.php +++ b/src/lib/FieldType/GatewayBasedStorage.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType; use Ibexa\Contracts\Core\FieldType\FieldStorage; diff --git a/src/lib/FieldType/Handler.php b/src/lib/FieldType/Handler.php index edac92ce1f..ed705303fa 100644 --- a/src/lib/FieldType/Handler.php +++ b/src/lib/FieldType/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType; /** diff --git a/src/lib/FieldType/ISBN/SearchField.php b/src/lib/FieldType/ISBN/SearchField.php index 155f5054e3..67b4fb06ba 100644 --- a/src/lib/FieldType/ISBN/SearchField.php +++ b/src/lib/FieldType/ISBN/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\ISBN; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/ISBN/Type.php b/src/lib/FieldType/ISBN/Type.php index 18de50fd9b..c5cd544355 100644 --- a/src/lib/FieldType/ISBN/Type.php +++ b/src/lib/FieldType/ISBN/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\ISBN; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/src/lib/FieldType/ISBN/Value.php b/src/lib/FieldType/ISBN/Value.php index ecf41c3dfe..54ee69bc47 100644 --- a/src/lib/FieldType/ISBN/Value.php +++ b/src/lib/FieldType/ISBN/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\ISBN; use Ibexa\Core\FieldType\Value as BaseValue; diff --git a/src/lib/FieldType/Image/AliasCleanerInterface.php b/src/lib/FieldType/Image/AliasCleanerInterface.php index a0a094b9cb..22392f6907 100644 --- a/src/lib/FieldType/Image/AliasCleanerInterface.php +++ b/src/lib/FieldType/Image/AliasCleanerInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Image; /** diff --git a/src/lib/FieldType/Image/IO/Legacy.php b/src/lib/FieldType/Image/IO/Legacy.php index 957dd7a704..b440f514d3 100644 --- a/src/lib/FieldType/Image/IO/Legacy.php +++ b/src/lib/FieldType/Image/IO/Legacy.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Image\IO; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; diff --git a/src/lib/FieldType/Image/IO/OptionsProvider.php b/src/lib/FieldType/Image/IO/OptionsProvider.php index fdc8eca1cc..4d7b8bdac1 100644 --- a/src/lib/FieldType/Image/IO/OptionsProvider.php +++ b/src/lib/FieldType/Image/IO/OptionsProvider.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Image\IO; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/lib/FieldType/Image/ImageStorage.php b/src/lib/FieldType/Image/ImageStorage.php index 60d1236a73..87bc4a6955 100644 --- a/src/lib/FieldType/Image/ImageStorage.php +++ b/src/lib/FieldType/Image/ImageStorage.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Image; use Ibexa\Contracts\Core\FieldType\GatewayBasedStorage; diff --git a/src/lib/FieldType/Image/ImageStorage/Gateway.php b/src/lib/FieldType/Image/ImageStorage/Gateway.php index 2c8138cb7c..eb6cdba213 100644 --- a/src/lib/FieldType/Image/ImageStorage/Gateway.php +++ b/src/lib/FieldType/Image/ImageStorage/Gateway.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Image\ImageStorage; use Ibexa\Contracts\Core\FieldType\StorageGateway; diff --git a/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php index de2ab8e21b..6a5dda82a1 100644 --- a/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Image\ImageStorage\Gateway; use Doctrine\DBAL\Connection; diff --git a/src/lib/FieldType/Image/PathGenerator.php b/src/lib/FieldType/Image/PathGenerator.php index 7fa9e7a78b..9b9cd6b7ac 100644 --- a/src/lib/FieldType/Image/PathGenerator.php +++ b/src/lib/FieldType/Image/PathGenerator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Image; abstract class PathGenerator diff --git a/src/lib/FieldType/Image/PathGenerator/LegacyPathGenerator.php b/src/lib/FieldType/Image/PathGenerator/LegacyPathGenerator.php index 6b6acba1b1..a415fcc8c9 100644 --- a/src/lib/FieldType/Image/PathGenerator/LegacyPathGenerator.php +++ b/src/lib/FieldType/Image/PathGenerator/LegacyPathGenerator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Image\PathGenerator; use Ibexa\Core\FieldType\Image\PathGenerator; diff --git a/src/lib/FieldType/Image/SearchField.php b/src/lib/FieldType/Image/SearchField.php index cce5068a1e..78de5cab1d 100644 --- a/src/lib/FieldType/Image/SearchField.php +++ b/src/lib/FieldType/Image/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Image; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/Image/Type.php b/src/lib/FieldType/Image/Type.php index 6bf4531614..9f90635e2d 100644 --- a/src/lib/FieldType/Image/Type.php +++ b/src/lib/FieldType/Image/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Image; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/src/lib/FieldType/Image/Value.php b/src/lib/FieldType/Image/Value.php index f8cf5645df..9ae04bb388 100644 --- a/src/lib/FieldType/Image/Value.php +++ b/src/lib/FieldType/Image/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Image; use Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException; diff --git a/src/lib/FieldType/Integer/SearchField.php b/src/lib/FieldType/Integer/SearchField.php index ae96902227..ebbbe0251b 100644 --- a/src/lib/FieldType/Integer/SearchField.php +++ b/src/lib/FieldType/Integer/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Integer; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/Integer/Type.php b/src/lib/FieldType/Integer/Type.php index 495b787944..c89f1ae3d1 100644 --- a/src/lib/FieldType/Integer/Type.php +++ b/src/lib/FieldType/Integer/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Integer; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/src/lib/FieldType/Integer/Value.php b/src/lib/FieldType/Integer/Value.php index 5d04f25e7b..e2c59bd604 100644 --- a/src/lib/FieldType/Integer/Value.php +++ b/src/lib/FieldType/Integer/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Integer; use Ibexa\Core\FieldType\Value as BaseValue; diff --git a/src/lib/FieldType/Keyword/KeywordStorage.php b/src/lib/FieldType/Keyword/KeywordStorage.php index 2a9418fcd0..1185ba568a 100644 --- a/src/lib/FieldType/Keyword/KeywordStorage.php +++ b/src/lib/FieldType/Keyword/KeywordStorage.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Keyword; use Ibexa\Contracts\Core\FieldType\GatewayBasedStorage; diff --git a/src/lib/FieldType/Keyword/KeywordStorage/Gateway.php b/src/lib/FieldType/Keyword/KeywordStorage/Gateway.php index 4685d94453..e38d58370e 100644 --- a/src/lib/FieldType/Keyword/KeywordStorage/Gateway.php +++ b/src/lib/FieldType/Keyword/KeywordStorage/Gateway.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Keyword\KeywordStorage; use Ibexa\Contracts\Core\FieldType\StorageGateway; diff --git a/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php index 797a5090ce..e6293f2cb5 100644 --- a/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Keyword\KeywordStorage\Gateway; use Doctrine\DBAL\Connection; diff --git a/src/lib/FieldType/Keyword/SearchField.php b/src/lib/FieldType/Keyword/SearchField.php index f162de1c07..40478c1ae3 100644 --- a/src/lib/FieldType/Keyword/SearchField.php +++ b/src/lib/FieldType/Keyword/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Keyword; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/Keyword/Type.php b/src/lib/FieldType/Keyword/Type.php index 6ef4f2e24a..35652c7449 100644 --- a/src/lib/FieldType/Keyword/Type.php +++ b/src/lib/FieldType/Keyword/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Keyword; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/src/lib/FieldType/Keyword/Value.php b/src/lib/FieldType/Keyword/Value.php index e3e73df0aa..126425d15a 100644 --- a/src/lib/FieldType/Keyword/Value.php +++ b/src/lib/FieldType/Keyword/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Keyword; use Ibexa\Core\FieldType\Value as BaseValue; diff --git a/src/lib/FieldType/MapLocation/MapLocationStorage.php b/src/lib/FieldType/MapLocation/MapLocationStorage.php index 7d3485e5ff..29163b2e26 100644 --- a/src/lib/FieldType/MapLocation/MapLocationStorage.php +++ b/src/lib/FieldType/MapLocation/MapLocationStorage.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\MapLocation; use Ibexa\Contracts\Core\FieldType\GatewayBasedStorage; diff --git a/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway.php b/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway.php index 06c3a8f93a..03eb94edb5 100644 --- a/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway.php +++ b/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\MapLocation\MapLocationStorage; use Ibexa\Contracts\Core\FieldType\StorageGateway; diff --git a/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php index ddc8e0213b..7b88427758 100644 --- a/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\MapLocation\MapLocationStorage\Gateway; use Doctrine\DBAL\Connection; diff --git a/src/lib/FieldType/MapLocation/SearchField.php b/src/lib/FieldType/MapLocation/SearchField.php index 69760c4603..14aa363909 100644 --- a/src/lib/FieldType/MapLocation/SearchField.php +++ b/src/lib/FieldType/MapLocation/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\MapLocation; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/MapLocation/Type.php b/src/lib/FieldType/MapLocation/Type.php index f6a6ca12f9..1ae6233ba0 100644 --- a/src/lib/FieldType/MapLocation/Type.php +++ b/src/lib/FieldType/MapLocation/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\MapLocation; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/src/lib/FieldType/MapLocation/Value.php b/src/lib/FieldType/MapLocation/Value.php index 0e8f92da01..d621b1bcf9 100644 --- a/src/lib/FieldType/MapLocation/Value.php +++ b/src/lib/FieldType/MapLocation/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\MapLocation; use Ibexa\Core\FieldType\Value as BaseValue; diff --git a/src/lib/FieldType/Media/MediaStorage.php b/src/lib/FieldType/Media/MediaStorage.php index 069751a68b..edbe3e7029 100644 --- a/src/lib/FieldType/Media/MediaStorage.php +++ b/src/lib/FieldType/Media/MediaStorage.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Media; use Ibexa\Core\FieldType\BinaryBase\BinaryBaseStorage; diff --git a/src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php index f207ed802b..45c84c8ebc 100644 --- a/src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Media\MediaStorage\Gateway; use Doctrine\DBAL\ParameterType; diff --git a/src/lib/FieldType/Media/SearchField.php b/src/lib/FieldType/Media/SearchField.php index 17c4bd233e..e606ecf2db 100644 --- a/src/lib/FieldType/Media/SearchField.php +++ b/src/lib/FieldType/Media/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Media; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/Media/Type.php b/src/lib/FieldType/Media/Type.php index c416bf0cd7..0be65a70eb 100644 --- a/src/lib/FieldType/Media/Type.php +++ b/src/lib/FieldType/Media/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Media; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/src/lib/FieldType/Media/Value.php b/src/lib/FieldType/Media/Value.php index 87583b6018..d876e1010e 100644 --- a/src/lib/FieldType/Media/Value.php +++ b/src/lib/FieldType/Media/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Media; use Ibexa\Core\FieldType\BinaryBase\Value as BaseValue; diff --git a/src/lib/FieldType/Null/Type.php b/src/lib/FieldType/Null/Type.php index ce9f30e31c..f1db6f0def 100644 --- a/src/lib/FieldType/Null/Type.php +++ b/src/lib/FieldType/Null/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Null; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/src/lib/FieldType/Null/Value.php b/src/lib/FieldType/Null/Value.php index d307001cf1..dac36e7cd1 100644 --- a/src/lib/FieldType/Null/Value.php +++ b/src/lib/FieldType/Null/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Null; use Ibexa\Core\FieldType\Value as BaseValue; diff --git a/src/lib/FieldType/NullStorage.php b/src/lib/FieldType/NullStorage.php index 4fc7d87fe1..7a2d745be9 100644 --- a/src/lib/FieldType/NullStorage.php +++ b/src/lib/FieldType/NullStorage.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType; use Ibexa\Contracts\Core\FieldType\FieldStorage; diff --git a/src/lib/FieldType/Relation/SearchField.php b/src/lib/FieldType/Relation/SearchField.php index ef7c84a706..1dbca6075d 100644 --- a/src/lib/FieldType/Relation/SearchField.php +++ b/src/lib/FieldType/Relation/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Relation; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/Relation/Type.php b/src/lib/FieldType/Relation/Type.php index 90dc13f508..2ac83793c0 100644 --- a/src/lib/FieldType/Relation/Type.php +++ b/src/lib/FieldType/Relation/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Relation; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/src/lib/FieldType/Relation/Value.php b/src/lib/FieldType/Relation/Value.php index 3a0abe0e0c..8d17fee54c 100644 --- a/src/lib/FieldType/Relation/Value.php +++ b/src/lib/FieldType/Relation/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Relation; use Ibexa\Core\FieldType\Value as BaseValue; diff --git a/src/lib/FieldType/RelationList/SearchField.php b/src/lib/FieldType/RelationList/SearchField.php index 5251215d63..bff8716996 100644 --- a/src/lib/FieldType/RelationList/SearchField.php +++ b/src/lib/FieldType/RelationList/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\RelationList; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/RelationList/Type.php b/src/lib/FieldType/RelationList/Type.php index abc34b59a1..752dd9a080 100644 --- a/src/lib/FieldType/RelationList/Type.php +++ b/src/lib/FieldType/RelationList/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\RelationList; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/src/lib/FieldType/RelationList/Value.php b/src/lib/FieldType/RelationList/Value.php index 023d9ffd76..a7fea0fd29 100644 --- a/src/lib/FieldType/RelationList/Value.php +++ b/src/lib/FieldType/RelationList/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\RelationList; use Ibexa\Core\FieldType\Value as BaseValue; diff --git a/src/lib/FieldType/Selection/SearchField.php b/src/lib/FieldType/Selection/SearchField.php index de52b0a262..8e6f06d86b 100644 --- a/src/lib/FieldType/Selection/SearchField.php +++ b/src/lib/FieldType/Selection/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Selection; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/Selection/Type.php b/src/lib/FieldType/Selection/Type.php index cfb091bf2a..9480a77399 100644 --- a/src/lib/FieldType/Selection/Type.php +++ b/src/lib/FieldType/Selection/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Selection; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/src/lib/FieldType/Selection/Value.php b/src/lib/FieldType/Selection/Value.php index 455321d44b..fbbd1666cc 100644 --- a/src/lib/FieldType/Selection/Value.php +++ b/src/lib/FieldType/Selection/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Selection; use Ibexa\Core\FieldType\Value as BaseValue; diff --git a/src/lib/FieldType/StorageGateway.php b/src/lib/FieldType/StorageGateway.php index 4c696fb96c..55599777cb 100644 --- a/src/lib/FieldType/StorageGateway.php +++ b/src/lib/FieldType/StorageGateway.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType; use Ibexa\Contracts\Core\FieldType\StorageGateway as SPIStorageGateway; diff --git a/src/lib/FieldType/TextBlock/SearchField.php b/src/lib/FieldType/TextBlock/SearchField.php index 2bfde7dc89..3dac6110ed 100644 --- a/src/lib/FieldType/TextBlock/SearchField.php +++ b/src/lib/FieldType/TextBlock/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\TextBlock; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/TextBlock/Type.php b/src/lib/FieldType/TextBlock/Type.php index a9184cabb2..45e742b2a3 100644 --- a/src/lib/FieldType/TextBlock/Type.php +++ b/src/lib/FieldType/TextBlock/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\TextBlock; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/src/lib/FieldType/TextBlock/Value.php b/src/lib/FieldType/TextBlock/Value.php index edf9a30463..fcdb54de29 100644 --- a/src/lib/FieldType/TextBlock/Value.php +++ b/src/lib/FieldType/TextBlock/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\TextBlock; use Ibexa\Core\FieldType\TextLine\Value as TextLineValue; diff --git a/src/lib/FieldType/TextLine/SearchField.php b/src/lib/FieldType/TextLine/SearchField.php index 679cc55414..0c80f3bb45 100644 --- a/src/lib/FieldType/TextLine/SearchField.php +++ b/src/lib/FieldType/TextLine/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\TextLine; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/TextLine/Type.php b/src/lib/FieldType/TextLine/Type.php index 465de19244..f8c6c98d19 100644 --- a/src/lib/FieldType/TextLine/Type.php +++ b/src/lib/FieldType/TextLine/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\TextLine; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/src/lib/FieldType/TextLine/Value.php b/src/lib/FieldType/TextLine/Value.php index 5425a88237..8574995650 100644 --- a/src/lib/FieldType/TextLine/Value.php +++ b/src/lib/FieldType/TextLine/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\TextLine; use Ibexa\Core\FieldType\Value as BaseValue; diff --git a/src/lib/FieldType/Time/SearchField.php b/src/lib/FieldType/Time/SearchField.php index d7b750bbc5..dd317adb55 100644 --- a/src/lib/FieldType/Time/SearchField.php +++ b/src/lib/FieldType/Time/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Time; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/Time/Type.php b/src/lib/FieldType/Time/Type.php index ec78fecd9a..43f0b03c0b 100644 --- a/src/lib/FieldType/Time/Type.php +++ b/src/lib/FieldType/Time/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Time; use DateTime; diff --git a/src/lib/FieldType/Time/Value.php b/src/lib/FieldType/Time/Value.php index fec0f4c929..1b25435481 100644 --- a/src/lib/FieldType/Time/Value.php +++ b/src/lib/FieldType/Time/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Time; use DateTime; diff --git a/src/lib/FieldType/Unindexed.php b/src/lib/FieldType/Unindexed.php index 30fde7f162..267ce0798e 100644 --- a/src/lib/FieldType/Unindexed.php +++ b/src/lib/FieldType/Unindexed.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/Url/SearchField.php b/src/lib/FieldType/Url/SearchField.php index c2a1e39066..96bfe2108d 100644 --- a/src/lib/FieldType/Url/SearchField.php +++ b/src/lib/FieldType/Url/SearchField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Url; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/FieldType/Url/Type.php b/src/lib/FieldType/Url/Type.php index 6650a591f1..bce00c6a31 100644 --- a/src/lib/FieldType/Url/Type.php +++ b/src/lib/FieldType/Url/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Url; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/src/lib/FieldType/Url/UrlStorage.php b/src/lib/FieldType/Url/UrlStorage.php index ff448030e2..cc000db3e1 100644 --- a/src/lib/FieldType/Url/UrlStorage.php +++ b/src/lib/FieldType/Url/UrlStorage.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Url; use Ibexa\Contracts\Core\FieldType\GatewayBasedStorage; diff --git a/src/lib/FieldType/Url/UrlStorage/Gateway.php b/src/lib/FieldType/Url/UrlStorage/Gateway.php index 679ab0dbd5..487e5aec90 100644 --- a/src/lib/FieldType/Url/UrlStorage/Gateway.php +++ b/src/lib/FieldType/Url/UrlStorage/Gateway.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Url\UrlStorage; use Ibexa\Contracts\Core\FieldType\StorageGateway; diff --git a/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php index aa832435b0..27cc2bd281 100644 --- a/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Url\UrlStorage\Gateway; use Doctrine\DBAL\Connection; diff --git a/src/lib/FieldType/Url/Value.php b/src/lib/FieldType/Url/Value.php index 5f234fc0d7..7bad6b6d9d 100644 --- a/src/lib/FieldType/Url/Value.php +++ b/src/lib/FieldType/Url/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Url; use Ibexa\Core\FieldType\Value as BaseValue; diff --git a/src/lib/FieldType/User/Type.php b/src/lib/FieldType/User/Type.php index 97d9611bee..426aacac2e 100644 --- a/src/lib/FieldType/User/Type.php +++ b/src/lib/FieldType/User/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\User; use DateTimeImmutable; diff --git a/src/lib/FieldType/User/UserStorage.php b/src/lib/FieldType/User/UserStorage.php index d682e5bac0..00a7c61041 100644 --- a/src/lib/FieldType/User/UserStorage.php +++ b/src/lib/FieldType/User/UserStorage.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\User; use Ibexa\Contracts\Core\FieldType\GatewayBasedStorage; diff --git a/src/lib/FieldType/User/UserStorage/Gateway.php b/src/lib/FieldType/User/UserStorage/Gateway.php index 0d6218c621..124b302ec6 100644 --- a/src/lib/FieldType/User/UserStorage/Gateway.php +++ b/src/lib/FieldType/User/UserStorage/Gateway.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\User\UserStorage; use Ibexa\Contracts\Core\FieldType\StorageGateway; diff --git a/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php index dbdc432915..cf054a4177 100644 --- a/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\User\UserStorage\Gateway; use Doctrine\DBAL\Connection; diff --git a/src/lib/FieldType/User/Value.php b/src/lib/FieldType/User/Value.php index e5b83f1109..473117a1ed 100644 --- a/src/lib/FieldType/User/Value.php +++ b/src/lib/FieldType/User/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\User; use Ibexa\Core\FieldType\Value as BaseValue; diff --git a/src/lib/FieldType/ValidationError.php b/src/lib/FieldType/ValidationError.php index 3faa82714b..1cf02925d4 100644 --- a/src/lib/FieldType/ValidationError.php +++ b/src/lib/FieldType/ValidationError.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType; use Ibexa\Contracts\Core\FieldType\ValidationError as ValidationErrorInterface; diff --git a/src/lib/FieldType/Validator.php b/src/lib/FieldType/Validator.php index 2832efcf24..18e5ebfa3b 100644 --- a/src/lib/FieldType/Validator.php +++ b/src/lib/FieldType/Validator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType; use Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException as PropertyNotFound; diff --git a/src/lib/FieldType/Validator/EmailAddressValidator.php b/src/lib/FieldType/Validator/EmailAddressValidator.php index 2deff8a00e..4b3d2de6a3 100644 --- a/src/lib/FieldType/Validator/EmailAddressValidator.php +++ b/src/lib/FieldType/Validator/EmailAddressValidator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Validator; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; diff --git a/src/lib/FieldType/Validator/FileExtensionBlackListValidator.php b/src/lib/FieldType/Validator/FileExtensionBlackListValidator.php index 510d5d2ee9..7c9fe25c55 100644 --- a/src/lib/FieldType/Validator/FileExtensionBlackListValidator.php +++ b/src/lib/FieldType/Validator/FileExtensionBlackListValidator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Validator; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; diff --git a/src/lib/FieldType/Validator/FileSizeValidator.php b/src/lib/FieldType/Validator/FileSizeValidator.php index 3fd2f5ef77..339a6ad698 100644 --- a/src/lib/FieldType/Validator/FileSizeValidator.php +++ b/src/lib/FieldType/Validator/FileSizeValidator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Validator; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; diff --git a/src/lib/FieldType/Validator/FloatValueValidator.php b/src/lib/FieldType/Validator/FloatValueValidator.php index 1fb4013611..d7b7206688 100644 --- a/src/lib/FieldType/Validator/FloatValueValidator.php +++ b/src/lib/FieldType/Validator/FloatValueValidator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Validator; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; diff --git a/src/lib/FieldType/Validator/ImageValidator.php b/src/lib/FieldType/Validator/ImageValidator.php index ae57f81f4a..5ba56f359f 100644 --- a/src/lib/FieldType/Validator/ImageValidator.php +++ b/src/lib/FieldType/Validator/ImageValidator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Validator; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; diff --git a/src/lib/FieldType/Validator/IntegerValueValidator.php b/src/lib/FieldType/Validator/IntegerValueValidator.php index 3a69d22a47..1aff6c779e 100644 --- a/src/lib/FieldType/Validator/IntegerValueValidator.php +++ b/src/lib/FieldType/Validator/IntegerValueValidator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Validator; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; diff --git a/src/lib/FieldType/Validator/StringLengthValidator.php b/src/lib/FieldType/Validator/StringLengthValidator.php index 23ffd68f32..75c2a45e56 100644 --- a/src/lib/FieldType/Validator/StringLengthValidator.php +++ b/src/lib/FieldType/Validator/StringLengthValidator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType\Validator; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; diff --git a/src/lib/FieldType/Value.php b/src/lib/FieldType/Value.php index a57338a6e2..e09b29cab8 100644 --- a/src/lib/FieldType/Value.php +++ b/src/lib/FieldType/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\FieldType; use Ibexa\Contracts\Core\FieldType\Value as ValueInterface; diff --git a/src/lib/Helper/ContentInfoLocationLoader.php b/src/lib/Helper/ContentInfoLocationLoader.php index ba4d2f110d..d5205d5640 100644 --- a/src/lib/Helper/ContentInfoLocationLoader.php +++ b/src/lib/Helper/ContentInfoLocationLoader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Helper; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; diff --git a/src/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoader.php b/src/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoader.php index 50dd5a3418..e54d50e1a9 100644 --- a/src/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoader.php +++ b/src/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoader.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Helper\ContentInfoLocationLoader; use Exception; diff --git a/src/lib/Helper/ContentPreviewHelper.php b/src/lib/Helper/ContentPreviewHelper.php index ae32cedc11..d5c1694e95 100644 --- a/src/lib/Helper/ContentPreviewHelper.php +++ b/src/lib/Helper/ContentPreviewHelper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Helper; use Ibexa\Contracts\Core\Repository\Values\Content\Content; diff --git a/src/lib/Helper/FieldHelper.php b/src/lib/Helper/FieldHelper.php index c628846c11..b701f5b197 100644 --- a/src/lib/Helper/FieldHelper.php +++ b/src/lib/Helper/FieldHelper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Helper; use Ibexa\Contracts\Core\Repository\ContentTypeService; diff --git a/src/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsList.php b/src/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsList.php index 3343fd4bd7..a88afe75a1 100644 --- a/src/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsList.php +++ b/src/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsList.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Helper\FieldsGroups; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; diff --git a/src/lib/Helper/FieldsGroups/FieldsGroupsList.php b/src/lib/Helper/FieldsGroups/FieldsGroupsList.php index be128c0906..4e349a51cc 100644 --- a/src/lib/Helper/FieldsGroups/FieldsGroupsList.php +++ b/src/lib/Helper/FieldsGroups/FieldsGroupsList.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Helper\FieldsGroups; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; diff --git a/src/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactory.php b/src/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactory.php index dad8611d2d..815fa4dcd7 100644 --- a/src/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactory.php +++ b/src/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactory.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Helper\FieldsGroups; use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider; diff --git a/src/lib/Helper/PreviewLocationProvider.php b/src/lib/Helper/PreviewLocationProvider.php index 7d3bd6b662..5c2a515c23 100644 --- a/src/lib/Helper/PreviewLocationProvider.php +++ b/src/lib/Helper/PreviewLocationProvider.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Helper; use Ibexa\Contracts\Core\Persistence\Content\Location\Handler as PersistenceLocationHandler; diff --git a/src/lib/Helper/TranslationHelper.php b/src/lib/Helper/TranslationHelper.php index 7942a5a710..23484d7c6f 100644 --- a/src/lib/Helper/TranslationHelper.php +++ b/src/lib/Helper/TranslationHelper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Helper; use Ibexa\Contracts\Core\Repository\ContentService; diff --git a/src/lib/IO/Exception/BinaryFileNotFoundException.php b/src/lib/IO/Exception/BinaryFileNotFoundException.php index 10ac691b25..fca6c6b7b4 100644 --- a/src/lib/IO/Exception/BinaryFileNotFoundException.php +++ b/src/lib/IO/Exception/BinaryFileNotFoundException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO\Exception; use Exception; diff --git a/src/lib/IO/Exception/IOException.php b/src/lib/IO/Exception/IOException.php index d9d04e826b..374d5e26a3 100644 --- a/src/lib/IO/Exception/IOException.php +++ b/src/lib/IO/Exception/IOException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO\Exception; use Exception; diff --git a/src/lib/IO/Exception/InvalidBinaryAbsolutePathException.php b/src/lib/IO/Exception/InvalidBinaryAbsolutePathException.php index 4748b88708..1ebb8c8e7a 100644 --- a/src/lib/IO/Exception/InvalidBinaryAbsolutePathException.php +++ b/src/lib/IO/Exception/InvalidBinaryAbsolutePathException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO\Exception; use Exception; diff --git a/src/lib/IO/Exception/InvalidBinaryFileIdException.php b/src/lib/IO/Exception/InvalidBinaryFileIdException.php index 1e660c7368..215ca49fb5 100644 --- a/src/lib/IO/Exception/InvalidBinaryFileIdException.php +++ b/src/lib/IO/Exception/InvalidBinaryFileIdException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO\Exception; use Ibexa\Core\Base\Exceptions\InvalidArgumentValue; diff --git a/src/lib/IO/Exception/InvalidBinaryPrefixException.php b/src/lib/IO/Exception/InvalidBinaryPrefixException.php index e7232f722f..423f8294ea 100644 --- a/src/lib/IO/Exception/InvalidBinaryPrefixException.php +++ b/src/lib/IO/Exception/InvalidBinaryPrefixException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO\Exception; use Exception; diff --git a/src/lib/IO/Flysystem/PathPrefixer/PathPrefixerInterface.php b/src/lib/IO/Flysystem/PathPrefixer/PathPrefixerInterface.php index bb3e2ee778..a82e928c2a 100644 --- a/src/lib/IO/Flysystem/PathPrefixer/PathPrefixerInterface.php +++ b/src/lib/IO/Flysystem/PathPrefixer/PathPrefixerInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO\Flysystem\PathPrefixer; /** diff --git a/src/lib/IO/IOBinarydataHandler.php b/src/lib/IO/IOBinarydataHandler.php index 36d07baf8d..4b5cf4207d 100644 --- a/src/lib/IO/IOBinarydataHandler.php +++ b/src/lib/IO/IOBinarydataHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO; use Ibexa\Contracts\Core\IO\BinaryFileCreateStruct; diff --git a/src/lib/IO/IOBinarydataHandler/Flysystem.php b/src/lib/IO/IOBinarydataHandler/Flysystem.php index 596b9c6988..5274a5bc1a 100644 --- a/src/lib/IO/IOBinarydataHandler/Flysystem.php +++ b/src/lib/IO/IOBinarydataHandler/Flysystem.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO\IOBinarydataHandler; use Ibexa\Contracts\Core\IO\BinaryFileCreateStruct; diff --git a/src/lib/IO/IOBinarydataHandler/SiteAccessDependentBinaryDataHandler.php b/src/lib/IO/IOBinarydataHandler/SiteAccessDependentBinaryDataHandler.php index f1c70d8818..581092828f 100644 --- a/src/lib/IO/IOBinarydataHandler/SiteAccessDependentBinaryDataHandler.php +++ b/src/lib/IO/IOBinarydataHandler/SiteAccessDependentBinaryDataHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO\IOBinarydataHandler; use Ibexa\Bundle\IO\ApiLoader\HandlerRegistry; diff --git a/src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php b/src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php index 577dda4049..665c64a46f 100644 --- a/src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php +++ b/src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO\IOBinarydataHandler; use Ibexa\Bundle\IO\ApiLoader\HandlerRegistry; diff --git a/src/lib/IO/IOMetadataHandler.php b/src/lib/IO/IOMetadataHandler.php index 29f549d6cc..657fd7c401 100644 --- a/src/lib/IO/IOMetadataHandler.php +++ b/src/lib/IO/IOMetadataHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO; use Ibexa\Contracts\Core\IO\BinaryFileCreateStruct; diff --git a/src/lib/IO/IOMetadataHandler/Flysystem.php b/src/lib/IO/IOMetadataHandler/Flysystem.php index f294f5b74e..2c3f6005a3 100644 --- a/src/lib/IO/IOMetadataHandler/Flysystem.php +++ b/src/lib/IO/IOMetadataHandler/Flysystem.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO\IOMetadataHandler; use DateTime; diff --git a/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php b/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php index 3b6f0f9c34..a6e336b255 100644 --- a/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php +++ b/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO\IOMetadataHandler; use DateTime; diff --git a/src/lib/IO/IOService.php b/src/lib/IO/IOService.php index 2df7587935..791e05a5bf 100644 --- a/src/lib/IO/IOService.php +++ b/src/lib/IO/IOService.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO; use Exception; diff --git a/src/lib/IO/IOServiceInterface.php b/src/lib/IO/IOServiceInterface.php index c676310600..19d8d62099 100644 --- a/src/lib/IO/IOServiceInterface.php +++ b/src/lib/IO/IOServiceInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO; use Ibexa\Core\IO\Values\BinaryFile; diff --git a/src/lib/IO/MetadataHandler.php b/src/lib/IO/MetadataHandler.php index 3b27be92f9..1d30271053 100644 --- a/src/lib/IO/MetadataHandler.php +++ b/src/lib/IO/MetadataHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO; /** diff --git a/src/lib/IO/MetadataHandler/ImageSize.php b/src/lib/IO/MetadataHandler/ImageSize.php index d7d47c1450..06b9aec4d1 100644 --- a/src/lib/IO/MetadataHandler/ImageSize.php +++ b/src/lib/IO/MetadataHandler/ImageSize.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO\MetadataHandler; use Ibexa\Core\IO\MetadataHandler; diff --git a/src/lib/IO/MimeTypeDetector/FileInfo.php b/src/lib/IO/MimeTypeDetector/FileInfo.php index 0318ea902b..1633b10f8f 100644 --- a/src/lib/IO/MimeTypeDetector/FileInfo.php +++ b/src/lib/IO/MimeTypeDetector/FileInfo.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO\MimeTypeDetector; use Ibexa\Contracts\Core\IO\MimeTypeDetector; diff --git a/src/lib/IO/TolerantIOService.php b/src/lib/IO/TolerantIOService.php index a92363f57b..c954fa5775 100644 --- a/src/lib/IO/TolerantIOService.php +++ b/src/lib/IO/TolerantIOService.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; diff --git a/src/lib/IO/UrlDecorator.php b/src/lib/IO/UrlDecorator.php index 6eb2d30cfc..61999a9ecb 100644 --- a/src/lib/IO/UrlDecorator.php +++ b/src/lib/IO/UrlDecorator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO; /** diff --git a/src/lib/IO/UrlRedecorator.php b/src/lib/IO/UrlRedecorator.php index 7f393d0a9d..b3bc3d2640 100644 --- a/src/lib/IO/UrlRedecorator.php +++ b/src/lib/IO/UrlRedecorator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO; /** diff --git a/src/lib/IO/UrlRedecoratorInterface.php b/src/lib/IO/UrlRedecoratorInterface.php index bcc0c0d886..6466dae982 100644 --- a/src/lib/IO/UrlRedecoratorInterface.php +++ b/src/lib/IO/UrlRedecoratorInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO; /** diff --git a/src/lib/IO/Values/BinaryFile.php b/src/lib/IO/Values/BinaryFile.php index 247f026a62..46c2b09adf 100644 --- a/src/lib/IO/Values/BinaryFile.php +++ b/src/lib/IO/Values/BinaryFile.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO\Values; use Ibexa\Contracts\Core\Repository\Values\ValueObject; diff --git a/src/lib/IO/Values/BinaryFileCreateStruct.php b/src/lib/IO/Values/BinaryFileCreateStruct.php index 492877fd79..af284e83ab 100644 --- a/src/lib/IO/Values/BinaryFileCreateStruct.php +++ b/src/lib/IO/Values/BinaryFileCreateStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO\Values; use Ibexa\Contracts\Core\Repository\Values\ValueObject; diff --git a/src/lib/IO/Values/MissingBinaryFile.php b/src/lib/IO/Values/MissingBinaryFile.php index 8958ddf452..4bebe3c02c 100644 --- a/src/lib/IO/Values/MissingBinaryFile.php +++ b/src/lib/IO/Values/MissingBinaryFile.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\IO\Values; /** diff --git a/src/lib/Limitation/AbstractPersistenceLimitationType.php b/src/lib/Limitation/AbstractPersistenceLimitationType.php index fe0c074b65..e6bdb26a9c 100644 --- a/src/lib/Limitation/AbstractPersistenceLimitationType.php +++ b/src/lib/Limitation/AbstractPersistenceLimitationType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Limitation; use Ibexa\Contracts\Core\Persistence\Handler as SPIPersistenceHandler; diff --git a/src/lib/Limitation/BlockingLimitationType.php b/src/lib/Limitation/BlockingLimitationType.php index b8bad0a85b..38f64cc444 100644 --- a/src/lib/Limitation/BlockingLimitationType.php +++ b/src/lib/Limitation/BlockingLimitationType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Limitation; use Ibexa\Contracts\Core\Limitation\Type as SPILimitationTypeInterface; diff --git a/src/lib/Limitation/ContentTypeLimitationType.php b/src/lib/Limitation/ContentTypeLimitationType.php index 62e0e73136..62f13dfdcf 100644 --- a/src/lib/Limitation/ContentTypeLimitationType.php +++ b/src/lib/Limitation/ContentTypeLimitationType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Limitation; use Ibexa\Contracts\Core\Limitation\Target; diff --git a/src/lib/Limitation/LocationLimitationType.php b/src/lib/Limitation/LocationLimitationType.php index 3c7cd6571f..45c0e3f535 100644 --- a/src/lib/Limitation/LocationLimitationType.php +++ b/src/lib/Limitation/LocationLimitationType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Limitation; use Ibexa\Contracts\Core\Limitation\Type as SPILimitationTypeInterface; diff --git a/src/lib/Limitation/NewObjectStateLimitationType.php b/src/lib/Limitation/NewObjectStateLimitationType.php index bc0006b24c..d6e21ec666 100644 --- a/src/lib/Limitation/NewObjectStateLimitationType.php +++ b/src/lib/Limitation/NewObjectStateLimitationType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Limitation; use Ibexa\Contracts\Core\Limitation\Type as SPILimitationTypeInterface; diff --git a/src/lib/Limitation/NewSectionLimitationType.php b/src/lib/Limitation/NewSectionLimitationType.php index b9186c1feb..317582025d 100644 --- a/src/lib/Limitation/NewSectionLimitationType.php +++ b/src/lib/Limitation/NewSectionLimitationType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Limitation; use Ibexa\Contracts\Core\Limitation\Type as SPILimitationTypeInterface; diff --git a/src/lib/Limitation/ObjectStateLimitationType.php b/src/lib/Limitation/ObjectStateLimitationType.php index c1b015ca54..e103e9ab9c 100644 --- a/src/lib/Limitation/ObjectStateLimitationType.php +++ b/src/lib/Limitation/ObjectStateLimitationType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Limitation; use Ibexa\Contracts\Core\Limitation\Type as SPILimitationTypeInterface; diff --git a/src/lib/Limitation/OwnerLimitationType.php b/src/lib/Limitation/OwnerLimitationType.php index c1a4da4c06..3967042601 100644 --- a/src/lib/Limitation/OwnerLimitationType.php +++ b/src/lib/Limitation/OwnerLimitationType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Limitation; use Ibexa\Contracts\Core\Limitation\Type as SPILimitationTypeInterface; diff --git a/src/lib/Limitation/ParentContentTypeLimitationType.php b/src/lib/Limitation/ParentContentTypeLimitationType.php index f1e7fbe761..16b417f59c 100644 --- a/src/lib/Limitation/ParentContentTypeLimitationType.php +++ b/src/lib/Limitation/ParentContentTypeLimitationType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Limitation; use Ibexa\Contracts\Core\Limitation\Type as SPILimitationTypeInterface; diff --git a/src/lib/Limitation/ParentDepthLimitationType.php b/src/lib/Limitation/ParentDepthLimitationType.php index 32ad40fb32..bcdcf47b1d 100644 --- a/src/lib/Limitation/ParentDepthLimitationType.php +++ b/src/lib/Limitation/ParentDepthLimitationType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Limitation; use Ibexa\Contracts\Core\Limitation\Type as SPILimitationTypeInterface; diff --git a/src/lib/Limitation/ParentOwnerLimitationType.php b/src/lib/Limitation/ParentOwnerLimitationType.php index 7c7059d953..9e90a79321 100644 --- a/src/lib/Limitation/ParentOwnerLimitationType.php +++ b/src/lib/Limitation/ParentOwnerLimitationType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Limitation; use Ibexa\Contracts\Core\Limitation\Target; diff --git a/src/lib/Limitation/ParentUserGroupLimitationType.php b/src/lib/Limitation/ParentUserGroupLimitationType.php index b4239508c0..fb7bc3cf28 100644 --- a/src/lib/Limitation/ParentUserGroupLimitationType.php +++ b/src/lib/Limitation/ParentUserGroupLimitationType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Limitation; use Ibexa\Contracts\Core\Limitation\Target; diff --git a/src/lib/Limitation/SectionLimitationType.php b/src/lib/Limitation/SectionLimitationType.php index 99769e3958..015c7cf014 100644 --- a/src/lib/Limitation/SectionLimitationType.php +++ b/src/lib/Limitation/SectionLimitationType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Limitation; use Ibexa\Contracts\Core\Limitation\Type as SPILimitationTypeInterface; diff --git a/src/lib/Limitation/SiteAccessLimitationType.php b/src/lib/Limitation/SiteAccessLimitationType.php index 13a087195d..5c7fa94da5 100644 --- a/src/lib/Limitation/SiteAccessLimitationType.php +++ b/src/lib/Limitation/SiteAccessLimitationType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Limitation; use Ibexa\Contracts\Core\Limitation\Type as SPILimitationTypeInterface; diff --git a/src/lib/Limitation/StatusLimitationType.php b/src/lib/Limitation/StatusLimitationType.php index 93648c5340..24f00d6349 100644 --- a/src/lib/Limitation/StatusLimitationType.php +++ b/src/lib/Limitation/StatusLimitationType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Limitation; use Ibexa\Contracts\Core\Limitation\Type as SPILimitationTypeInterface; diff --git a/src/lib/Limitation/SubtreeLimitationType.php b/src/lib/Limitation/SubtreeLimitationType.php index c642ec64e8..2625f07f49 100644 --- a/src/lib/Limitation/SubtreeLimitationType.php +++ b/src/lib/Limitation/SubtreeLimitationType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Limitation; use Ibexa\Contracts\Core\Limitation\Target\Version; diff --git a/src/lib/Limitation/UserGroupLimitationType.php b/src/lib/Limitation/UserGroupLimitationType.php index 0232e10ec9..f2cbfe2422 100644 --- a/src/lib/Limitation/UserGroupLimitationType.php +++ b/src/lib/Limitation/UserGroupLimitationType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Limitation; use Ibexa\Contracts\Core\Limitation\Type as SPILimitationTypeInterface; diff --git a/src/lib/MVC/Exception/HiddenLocationException.php b/src/lib/MVC/Exception/HiddenLocationException.php index b8785a4704..6801b1be7a 100644 --- a/src/lib/MVC/Exception/HiddenLocationException.php +++ b/src/lib/MVC/Exception/HiddenLocationException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Exception; use Ibexa\Contracts\Core\Repository\Values\Content\Location; diff --git a/src/lib/MVC/Exception/InvalidSiteAccessException.php b/src/lib/MVC/Exception/InvalidSiteAccessException.php index e16fcbd159..8ebbc5a3af 100644 --- a/src/lib/MVC/Exception/InvalidSiteAccessException.php +++ b/src/lib/MVC/Exception/InvalidSiteAccessException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Exception; use Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessProviderInterface; diff --git a/src/lib/MVC/Exception/NoViewTemplateException.php b/src/lib/MVC/Exception/NoViewTemplateException.php index bd6af39de7..b433058f99 100644 --- a/src/lib/MVC/Exception/NoViewTemplateException.php +++ b/src/lib/MVC/Exception/NoViewTemplateException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Exception; use Exception; diff --git a/src/lib/MVC/Exception/ParameterNotFoundException.php b/src/lib/MVC/Exception/ParameterNotFoundException.php index f7ede1eb92..96e08c8d9c 100644 --- a/src/lib/MVC/Exception/ParameterNotFoundException.php +++ b/src/lib/MVC/Exception/ParameterNotFoundException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Exception; use InvalidArgumentException; diff --git a/src/lib/MVC/Exception/SourceImageNotFoundException.php b/src/lib/MVC/Exception/SourceImageNotFoundException.php index a277a9a549..6057ca766d 100644 --- a/src/lib/MVC/Exception/SourceImageNotFoundException.php +++ b/src/lib/MVC/Exception/SourceImageNotFoundException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Exception; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; diff --git a/src/lib/MVC/RepositoryAware.php b/src/lib/MVC/RepositoryAware.php index 0802400ec6..542d7a1fe1 100644 --- a/src/lib/MVC/RepositoryAware.php +++ b/src/lib/MVC/RepositoryAware.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC; use Ibexa\Contracts\Core\Repository\Repository; diff --git a/src/lib/MVC/RepositoryAwareInterface.php b/src/lib/MVC/RepositoryAwareInterface.php index f1484d5eff..c91a19f54f 100644 --- a/src/lib/MVC/RepositoryAwareInterface.php +++ b/src/lib/MVC/RepositoryAwareInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC; use Ibexa\Contracts\Core\Repository\Repository; diff --git a/src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php index 3fbb99fe05..02ba5b02fd 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Component\Serializer; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; diff --git a/src/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizer.php index 1032a189c5..0eb6a0d15c 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizer.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Component\Serializer; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; diff --git a/src/lib/MVC/Symfony/ConfigDumperInterface.php b/src/lib/MVC/Symfony/ConfigDumperInterface.php index 1da94ee506..3fe551a91c 100644 --- a/src/lib/MVC/Symfony/ConfigDumperInterface.php +++ b/src/lib/MVC/Symfony/ConfigDumperInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony; /** diff --git a/src/lib/MVC/Symfony/Configuration/VersatileScopeInterface.php b/src/lib/MVC/Symfony/Configuration/VersatileScopeInterface.php index 49dc21b643..2572cce165 100644 --- a/src/lib/MVC/Symfony/Configuration/VersatileScopeInterface.php +++ b/src/lib/MVC/Symfony/Configuration/VersatileScopeInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Configuration; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/lib/MVC/Symfony/Controller/Content/DownloadController.php b/src/lib/MVC/Symfony/Controller/Content/DownloadController.php index 46408987e6..be3fb9501c 100644 --- a/src/lib/MVC/Symfony/Controller/Content/DownloadController.php +++ b/src/lib/MVC/Symfony/Controller/Content/DownloadController.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Controller\Content; use Ibexa\Bundle\IO\BinaryStreamResponse; diff --git a/src/lib/MVC/Symfony/Controller/Content/DownloadRedirectionController.php b/src/lib/MVC/Symfony/Controller/Content/DownloadRedirectionController.php index e40ceba30c..77797adeeb 100644 --- a/src/lib/MVC/Symfony/Controller/Content/DownloadRedirectionController.php +++ b/src/lib/MVC/Symfony/Controller/Content/DownloadRedirectionController.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Controller\Content; use Ibexa\Contracts\Core\Repository\ContentService; diff --git a/src/lib/MVC/Symfony/Controller/Content/PreviewController.php b/src/lib/MVC/Symfony/Controller/Content/PreviewController.php index 2bfec8d11f..900dc25768 100644 --- a/src/lib/MVC/Symfony/Controller/Content/PreviewController.php +++ b/src/lib/MVC/Symfony/Controller/Content/PreviewController.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Controller\Content; use Exception; diff --git a/src/lib/MVC/Symfony/Controller/Content/QueryController.php b/src/lib/MVC/Symfony/Controller/Content/QueryController.php index 17ba947b93..3f012e8ed7 100644 --- a/src/lib/MVC/Symfony/Controller/Content/QueryController.php +++ b/src/lib/MVC/Symfony/Controller/Content/QueryController.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Controller\Content; use Ibexa\Contracts\Core\Repository\SearchService; diff --git a/src/lib/MVC/Symfony/Controller/Content/ViewController.php b/src/lib/MVC/Symfony/Controller/Content/ViewController.php index 9173379433..b35a0a34ba 100644 --- a/src/lib/MVC/Symfony/Controller/Content/ViewController.php +++ b/src/lib/MVC/Symfony/Controller/Content/ViewController.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Controller\Content; use DateTime; diff --git a/src/lib/MVC/Symfony/Controller/Controller.php b/src/lib/MVC/Symfony/Controller/Controller.php index a931508152..8d898c9534 100644 --- a/src/lib/MVC/Symfony/Controller/Controller.php +++ b/src/lib/MVC/Symfony/Controller/Controller.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Controller; use Ibexa\Core\MVC\Symfony\Security\Authorization\Attribute as AuthorizationAttribute; diff --git a/src/lib/MVC/Symfony/Controller/SecurityController.php b/src/lib/MVC/Symfony/Controller/SecurityController.php index 134f09acad..9e88ac416f 100644 --- a/src/lib/MVC/Symfony/Controller/SecurityController.php +++ b/src/lib/MVC/Symfony/Controller/SecurityController.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Controller; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php b/src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php index 04f8d8926a..05ed61599d 100644 --- a/src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php +++ b/src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Event; use Exception; diff --git a/src/lib/MVC/Symfony/Event/ConsoleInitEvent.php b/src/lib/MVC/Symfony/Event/ConsoleInitEvent.php index 3c1dddfdf8..c679483c71 100644 --- a/src/lib/MVC/Symfony/Event/ConsoleInitEvent.php +++ b/src/lib/MVC/Symfony/Event/ConsoleInitEvent.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Event; use Symfony\Component\Console\Event\ConsoleEvent; diff --git a/src/lib/MVC/Symfony/Event/ContentCacheClearEvent.php b/src/lib/MVC/Symfony/Event/ContentCacheClearEvent.php index a692c8723f..023d1ecc3f 100644 --- a/src/lib/MVC/Symfony/Event/ContentCacheClearEvent.php +++ b/src/lib/MVC/Symfony/Event/ContentCacheClearEvent.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Event; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; diff --git a/src/lib/MVC/Symfony/Event/PostSiteAccessMatchEvent.php b/src/lib/MVC/Symfony/Event/PostSiteAccessMatchEvent.php index 35520f3619..1780202ed9 100644 --- a/src/lib/MVC/Symfony/Event/PostSiteAccessMatchEvent.php +++ b/src/lib/MVC/Symfony/Event/PostSiteAccessMatchEvent.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Event; use Ibexa\Core\MVC\Symfony\SiteAccess; diff --git a/src/lib/MVC/Symfony/Event/PreContentViewEvent.php b/src/lib/MVC/Symfony/Event/PreContentViewEvent.php index fc5e13207d..26aee26948 100644 --- a/src/lib/MVC/Symfony/Event/PreContentViewEvent.php +++ b/src/lib/MVC/Symfony/Event/PreContentViewEvent.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Event; use Ibexa\Core\MVC\Symfony\View\View; diff --git a/src/lib/MVC/Symfony/Event/RouteReferenceGenerationEvent.php b/src/lib/MVC/Symfony/Event/RouteReferenceGenerationEvent.php index 19571aede2..eb4ba4efd4 100644 --- a/src/lib/MVC/Symfony/Event/RouteReferenceGenerationEvent.php +++ b/src/lib/MVC/Symfony/Event/RouteReferenceGenerationEvent.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Event; use Ibexa\Core\MVC\Symfony\Routing\RouteReference; diff --git a/src/lib/MVC/Symfony/Event/ScopeChangeEvent.php b/src/lib/MVC/Symfony/Event/ScopeChangeEvent.php index 121c58e329..524c69bdfd 100644 --- a/src/lib/MVC/Symfony/Event/ScopeChangeEvent.php +++ b/src/lib/MVC/Symfony/Event/ScopeChangeEvent.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Event; use Ibexa\Core\MVC\Symfony\SiteAccess; diff --git a/src/lib/MVC/Symfony/EventListener/LanguageSwitchListener.php b/src/lib/MVC/Symfony/EventListener/LanguageSwitchListener.php index 14dc3bc582..423aefd9c6 100644 --- a/src/lib/MVC/Symfony/EventListener/LanguageSwitchListener.php +++ b/src/lib/MVC/Symfony/EventListener/LanguageSwitchListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\EventListener; use Ibexa\Core\Helper\TranslationHelper; diff --git a/src/lib/MVC/Symfony/EventListener/SiteAccessMatchListener.php b/src/lib/MVC/Symfony/EventListener/SiteAccessMatchListener.php index e55cb6a6a0..cabe9ac865 100644 --- a/src/lib/MVC/Symfony/EventListener/SiteAccessMatchListener.php +++ b/src/lib/MVC/Symfony/EventListener/SiteAccessMatchListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\EventListener; // @todo Move SiteAccessMatcherRegistryInterface to \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher diff --git a/src/lib/MVC/Symfony/FieldType/BinaryBase/ContentDownloadUrlGenerator.php b/src/lib/MVC/Symfony/FieldType/BinaryBase/ContentDownloadUrlGenerator.php index 14b7b7849a..8fec6d19e4 100644 --- a/src/lib/MVC/Symfony/FieldType/BinaryBase/ContentDownloadUrlGenerator.php +++ b/src/lib/MVC/Symfony/FieldType/BinaryBase/ContentDownloadUrlGenerator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\FieldType\BinaryBase; use Ibexa\Contracts\Core\FieldType\BinaryBase\PathGenerator; diff --git a/src/lib/MVC/Symfony/FieldType/Relation/ParameterProvider.php b/src/lib/MVC/Symfony/FieldType/Relation/ParameterProvider.php index 625b009089..5de229b5db 100644 --- a/src/lib/MVC/Symfony/FieldType/Relation/ParameterProvider.php +++ b/src/lib/MVC/Symfony/FieldType/Relation/ParameterProvider.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\FieldType\Relation; use Ibexa\Contracts\Core\Repository\ContentService; diff --git a/src/lib/MVC/Symfony/FieldType/RelationList/ParameterProvider.php b/src/lib/MVC/Symfony/FieldType/RelationList/ParameterProvider.php index b5a2cb4b46..eae62a2072 100644 --- a/src/lib/MVC/Symfony/FieldType/RelationList/ParameterProvider.php +++ b/src/lib/MVC/Symfony/FieldType/RelationList/ParameterProvider.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\FieldType\RelationList; use Ibexa\Contracts\Core\Repository\ContentService; diff --git a/src/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProvider.php b/src/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProvider.php index 729156cdc7..9eb07ae8b1 100644 --- a/src/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProvider.php +++ b/src/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProvider.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\FieldType\View\ParameterProvider; use Ibexa\Contracts\Core\Repository\Values\Content\Field; diff --git a/src/lib/MVC/Symfony/FieldType/View/ParameterProviderInterface.php b/src/lib/MVC/Symfony/FieldType/View/ParameterProviderInterface.php index f5e5536732..a4a1c5b8e8 100644 --- a/src/lib/MVC/Symfony/FieldType/View/ParameterProviderInterface.php +++ b/src/lib/MVC/Symfony/FieldType/View/ParameterProviderInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\FieldType\View; use Ibexa\Contracts\Core\Repository\Values\Content\Field; diff --git a/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistry.php b/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistry.php index ac27d7b061..ed366129fc 100644 --- a/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistry.php +++ b/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistry.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\FieldType\View; use InvalidArgumentException; diff --git a/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryInterface.php b/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryInterface.php index 3af3df6d52..d40fcf1f62 100644 --- a/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryInterface.php +++ b/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\FieldType\View; /** diff --git a/src/lib/MVC/Symfony/Locale/LocaleConverter.php b/src/lib/MVC/Symfony/Locale/LocaleConverter.php index 5f99846a5a..4a210f985d 100644 --- a/src/lib/MVC/Symfony/Locale/LocaleConverter.php +++ b/src/lib/MVC/Symfony/Locale/LocaleConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Locale; use Psr\Log\LoggerInterface; diff --git a/src/lib/MVC/Symfony/Locale/LocaleConverterInterface.php b/src/lib/MVC/Symfony/Locale/LocaleConverterInterface.php index 08bd545578..387aae3449 100644 --- a/src/lib/MVC/Symfony/Locale/LocaleConverterInterface.php +++ b/src/lib/MVC/Symfony/Locale/LocaleConverterInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Locale; /** diff --git a/src/lib/MVC/Symfony/MVCEvents.php b/src/lib/MVC/Symfony/MVCEvents.php index 903d67e6db..dd415eaf50 100644 --- a/src/lib/MVC/Symfony/MVCEvents.php +++ b/src/lib/MVC/Symfony/MVCEvents.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony; final class MVCEvents diff --git a/src/lib/MVC/Symfony/Matcher/ClassNameMatcherFactory.php b/src/lib/MVC/Symfony/Matcher/ClassNameMatcherFactory.php index ccafe9b3a8..25f588cbe1 100644 --- a/src/lib/MVC/Symfony/Matcher/ClassNameMatcherFactory.php +++ b/src/lib/MVC/Symfony/Matcher/ClassNameMatcherFactory.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher; use Ibexa\Contracts\Core\Repository\Repository; diff --git a/src/lib/MVC/Symfony/Matcher/ConfigurableMatcherFactoryInterface.php b/src/lib/MVC/Symfony/Matcher/ConfigurableMatcherFactoryInterface.php index ef9c6a0a59..ed2cc2ac56 100644 --- a/src/lib/MVC/Symfony/Matcher/ConfigurableMatcherFactoryInterface.php +++ b/src/lib/MVC/Symfony/Matcher/ConfigurableMatcherFactoryInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher; /** diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php index 5ab721b4e8..ce3a0af336 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher\ContentBased; use Ibexa\Contracts\Core\Repository\Repository; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Content.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Content.php index 3158b989b0..2ce556bacf 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Content.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Content.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentType.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentType.php index 630e11205e..0606deb3f9 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentType.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroup.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroup.php index 8b3b6fb74d..b6c570b9ef 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroup.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroup.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Location.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Location.php index 412c836aec..553ddfc1bb 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Location.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Location.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationRemote.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationRemote.php index 0f3b870650..c3ddd19ca3 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationRemote.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationRemote.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php index 8b0ac09a3f..b0f36c2a6c 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id; use Ibexa\Contracts\Core\Repository\Repository; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocation.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocation.php index 3b5dd3e6ce..1bebc971e9 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocation.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocation.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id; use Ibexa\Contracts\Core\Repository\Repository; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Remote.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Remote.php index 8b8f15c619..8934978fb3 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Remote.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Remote.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Section.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Section.php index 6573b56ea7..4e51670d06 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Section.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Section.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentType.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentType.php index 62deaf6a80..6161b71258 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentType.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentType.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentType.php index 932c049929..0da4ba9e27 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentType.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier; use Ibexa\Contracts\Core\Repository\Repository; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/Section.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/Section.php index 97cff3130d..23c8e1aa0a 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/Section.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/Section.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier; use Ibexa\Contracts\Core\Repository\Repository; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/MatcherInterface.php b/src/lib/MVC/Symfony/Matcher/ContentBased/MatcherInterface.php index 4489855485..41fea2b927 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/MatcherInterface.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/MatcherInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher\ContentBased; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/MultipleValued.php b/src/lib/MVC/Symfony/Matcher/ContentBased/MultipleValued.php index 55a64b198f..87e0e671fc 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/MultipleValued.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/MultipleValued.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher\ContentBased; use Ibexa\Core\MVC\RepositoryAware; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/UrlAlias.php b/src/lib/MVC/Symfony/Matcher/ContentBased/UrlAlias.php index ec7f0b07a5..8537fe54e2 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/UrlAlias.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/UrlAlias.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher\ContentBased; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; diff --git a/src/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecorator.php b/src/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecorator.php index d8a0be6c9c..4929cf8a24 100644 --- a/src/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecorator.php +++ b/src/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecorator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/lib/MVC/Symfony/Matcher/MatcherFactoryInterface.php b/src/lib/MVC/Symfony/Matcher/MatcherFactoryInterface.php index b51e0d295e..b0ec327380 100644 --- a/src/lib/MVC/Symfony/Matcher/MatcherFactoryInterface.php +++ b/src/lib/MVC/Symfony/Matcher/MatcherFactoryInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher; use Ibexa\Core\MVC\Symfony\View\View; diff --git a/src/lib/MVC/Symfony/Matcher/ViewMatcherInterface.php b/src/lib/MVC/Symfony/Matcher/ViewMatcherInterface.php index 0a9e10ec0c..d8769de8f1 100644 --- a/src/lib/MVC/Symfony/Matcher/ViewMatcherInterface.php +++ b/src/lib/MVC/Symfony/Matcher/ViewMatcherInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Matcher; use Ibexa\Core\MVC\Symfony\View\View; diff --git a/src/lib/MVC/Symfony/RequestStackAware.php b/src/lib/MVC/Symfony/RequestStackAware.php index cce25a022e..4f67c09fa6 100644 --- a/src/lib/MVC/Symfony/RequestStackAware.php +++ b/src/lib/MVC/Symfony/RequestStackAware.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony; use Symfony\Component\HttpFoundation\RequestStack; diff --git a/src/lib/MVC/Symfony/Routing/Generator.php b/src/lib/MVC/Symfony/Routing/Generator.php index eb9d819543..2fa0b891b9 100644 --- a/src/lib/MVC/Symfony/Routing/Generator.php +++ b/src/lib/MVC/Symfony/Routing/Generator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Routing; use Ibexa\Core\MVC\Symfony\SiteAccess; diff --git a/src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGenerator.php b/src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGenerator.php index 5fd3f6cd9c..f23a199f4f 100644 --- a/src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGenerator.php +++ b/src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGenerator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Routing\Generator; use Ibexa\Core\MVC\Symfony\Event\RouteReferenceGenerationEvent; diff --git a/src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGeneratorInterface.php b/src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGeneratorInterface.php index dc4c956c15..29764e9de1 100644 --- a/src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGeneratorInterface.php +++ b/src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGeneratorInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Routing\Generator; /** diff --git a/src/lib/MVC/Symfony/Routing/Generator/UrlAliasGenerator.php b/src/lib/MVC/Symfony/Routing/Generator/UrlAliasGenerator.php index 3da4acdd54..d1fec7eb13 100644 --- a/src/lib/MVC/Symfony/Routing/Generator/UrlAliasGenerator.php +++ b/src/lib/MVC/Symfony/Routing/Generator/UrlAliasGenerator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Routing\Generator; use Ibexa\Contracts\Core\Repository\Repository; diff --git a/src/lib/MVC/Symfony/Routing/RouteReference.php b/src/lib/MVC/Symfony/Routing/RouteReference.php index dca38f7f8e..a1a38dbbcc 100644 --- a/src/lib/MVC/Symfony/Routing/RouteReference.php +++ b/src/lib/MVC/Symfony/Routing/RouteReference.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Routing; use Symfony\Component\HttpFoundation\ParameterBag; diff --git a/src/lib/MVC/Symfony/Routing/SimplifiedRequest.php b/src/lib/MVC/Symfony/Routing/SimplifiedRequest.php index 602f50bf16..c6bcee763e 100644 --- a/src/lib/MVC/Symfony/Routing/SimplifiedRequest.php +++ b/src/lib/MVC/Symfony/Routing/SimplifiedRequest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Routing; use Ibexa\Contracts\Core\Repository\Values\ValueObject; diff --git a/src/lib/MVC/Symfony/Routing/UrlAliasRouter.php b/src/lib/MVC/Symfony/Routing/UrlAliasRouter.php index e65c821831..9d1f22429e 100644 --- a/src/lib/MVC/Symfony/Routing/UrlAliasRouter.php +++ b/src/lib/MVC/Symfony/Routing/UrlAliasRouter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Routing; use Ibexa\Contracts\Core\Repository\ContentService; diff --git a/src/lib/MVC/Symfony/Routing/UrlWildcardRouter.php b/src/lib/MVC/Symfony/Routing/UrlWildcardRouter.php index 4b83a27ca7..c8c0d0055f 100644 --- a/src/lib/MVC/Symfony/Routing/UrlWildcardRouter.php +++ b/src/lib/MVC/Symfony/Routing/UrlWildcardRouter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Routing; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; diff --git a/src/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProvider.php b/src/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProvider.php index eb50be4155..f4ad03819a 100644 --- a/src/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProvider.php +++ b/src/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProvider.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Security\Authentication; use Ibexa\Contracts\Core\Repository\PermissionResolver; diff --git a/src/lib/MVC/Symfony/Security/Authentication/AuthenticatorInterface.php b/src/lib/MVC/Symfony/Security/Authentication/AuthenticatorInterface.php index fb52589a3e..c28d1fb7a1 100644 --- a/src/lib/MVC/Symfony/Security/Authentication/AuthenticatorInterface.php +++ b/src/lib/MVC/Symfony/Security/Authentication/AuthenticatorInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Security\Authentication; use Symfony\Component\HttpFoundation\Request; diff --git a/src/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandler.php b/src/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandler.php index bbd684225a..a0b4524021 100644 --- a/src/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandler.php +++ b/src/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Security\Authentication; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProvider.php b/src/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProvider.php index f40ef6a1e0..a1e3245456 100644 --- a/src/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProvider.php +++ b/src/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProvider.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Security\Authentication; use Ibexa\Contracts\Core\Repository\PermissionResolver; diff --git a/src/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php b/src/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php index cd50a94366..d95ce8b160 100644 --- a/src/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php +++ b/src/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Security\Authentication; use Ibexa\Bundle\Core\DependencyInjection\Compiler\SecurityPass; diff --git a/src/lib/MVC/Symfony/Security/Authorization/Attribute.php b/src/lib/MVC/Symfony/Security/Authorization/Attribute.php index e63bf61bbd..fccb583b54 100644 --- a/src/lib/MVC/Symfony/Security/Authorization/Attribute.php +++ b/src/lib/MVC/Symfony/Security/Authorization/Attribute.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Security\Authorization; /** diff --git a/src/lib/MVC/Symfony/Security/Authorization/Voter/CoreVoter.php b/src/lib/MVC/Symfony/Security/Authorization/Voter/CoreVoter.php index fe508515ed..26cecaedc2 100644 --- a/src/lib/MVC/Symfony/Security/Authorization/Voter/CoreVoter.php +++ b/src/lib/MVC/Symfony/Security/Authorization/Voter/CoreVoter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Security\Authorization\Voter; use Ibexa\Contracts\Core\Repository\PermissionResolver; diff --git a/src/lib/MVC/Symfony/Security/Authorization/Voter/ValueObjectVoter.php b/src/lib/MVC/Symfony/Security/Authorization/Voter/ValueObjectVoter.php index 2674cb8271..f85ea6569a 100644 --- a/src/lib/MVC/Symfony/Security/Authorization/Voter/ValueObjectVoter.php +++ b/src/lib/MVC/Symfony/Security/Authorization/Voter/ValueObjectVoter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Security\Authorization\Voter; use Ibexa\Contracts\Core\Repository\PermissionResolver; diff --git a/src/lib/MVC/Symfony/Security/EventListener/SecurityListener.php b/src/lib/MVC/Symfony/Security/EventListener/SecurityListener.php index b836339099..14b60f79d2 100644 --- a/src/lib/MVC/Symfony/Security/EventListener/SecurityListener.php +++ b/src/lib/MVC/Symfony/Security/EventListener/SecurityListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Security\EventListener; use Ibexa\Contracts\Core\Repository\PermissionResolver; diff --git a/src/lib/MVC/Symfony/Security/Exception/PasswordExpiredException.php b/src/lib/MVC/Symfony/Security/Exception/PasswordExpiredException.php index f9653ecced..bbe349d16c 100644 --- a/src/lib/MVC/Symfony/Security/Exception/PasswordExpiredException.php +++ b/src/lib/MVC/Symfony/Security/Exception/PasswordExpiredException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Security\Exception; use Symfony\Component\Security\Core\Exception\CustomUserMessageAccountStatusException; diff --git a/src/lib/MVC/Symfony/Security/Exception/UnauthorizedSiteAccessException.php b/src/lib/MVC/Symfony/Security/Exception/UnauthorizedSiteAccessException.php index e18c12dee7..06db5e8f73 100644 --- a/src/lib/MVC/Symfony/Security/Exception/UnauthorizedSiteAccessException.php +++ b/src/lib/MVC/Symfony/Security/Exception/UnauthorizedSiteAccessException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Security\Exception; use Exception; diff --git a/src/lib/MVC/Symfony/Security/HttpUtils.php b/src/lib/MVC/Symfony/Security/HttpUtils.php index 12059476cd..9e55db0ae7 100644 --- a/src/lib/MVC/Symfony/Security/HttpUtils.php +++ b/src/lib/MVC/Symfony/Security/HttpUtils.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Security; use Ibexa\Core\MVC\Symfony\SiteAccess; diff --git a/src/lib/MVC/Symfony/Security/InteractiveLoginToken.php b/src/lib/MVC/Symfony/Security/InteractiveLoginToken.php index af7fc23494..93a7cb3d79 100644 --- a/src/lib/MVC/Symfony/Security/InteractiveLoginToken.php +++ b/src/lib/MVC/Symfony/Security/InteractiveLoginToken.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Security; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; diff --git a/src/lib/MVC/Symfony/Security/ReferenceUserInterface.php b/src/lib/MVC/Symfony/Security/ReferenceUserInterface.php index 8e6d308277..bca1ce0825 100644 --- a/src/lib/MVC/Symfony/Security/ReferenceUserInterface.php +++ b/src/lib/MVC/Symfony/Security/ReferenceUserInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Security; /** diff --git a/src/lib/MVC/Symfony/Security/User/APIUserProviderInterface.php b/src/lib/MVC/Symfony/Security/User/APIUserProviderInterface.php index 97a8655796..85ca84e081 100644 --- a/src/lib/MVC/Symfony/Security/User/APIUserProviderInterface.php +++ b/src/lib/MVC/Symfony/Security/User/APIUserProviderInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Security\User; use Ibexa\Contracts\Core\Repository\Values\User\User as APIUser; diff --git a/src/lib/MVC/Symfony/Security/UserInterface.php b/src/lib/MVC/Symfony/Security/UserInterface.php index 05bb390f5d..5e75ac23ba 100644 --- a/src/lib/MVC/Symfony/Security/UserInterface.php +++ b/src/lib/MVC/Symfony/Security/UserInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Security; use Ibexa\Contracts\Core\Repository\Values\User\User as APIUser; diff --git a/src/lib/MVC/Symfony/Security/UserWrapped.php b/src/lib/MVC/Symfony/Security/UserWrapped.php index 9ce8ba4c61..7de58b54fb 100644 --- a/src/lib/MVC/Symfony/Security/UserWrapped.php +++ b/src/lib/MVC/Symfony/Security/UserWrapped.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Security; use Ibexa\Contracts\Core\Repository\Values\User\User as APIUser; diff --git a/src/lib/MVC/Symfony/SiteAccess.php b/src/lib/MVC/Symfony/SiteAccess.php index 9ed34bbe6c..0f38623fab 100644 --- a/src/lib/MVC/Symfony/SiteAccess.php +++ b/src/lib/MVC/Symfony/SiteAccess.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony; use Ibexa\Contracts\Core\Repository\Values\ValueObject; diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher.php b/src/lib/MVC/Symfony/SiteAccess/Matcher.php index e68057ea00..80205e7515 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php index 831c5ba765..f03a8fa8f0 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalAnd.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalAnd.php index df1ea30d7c..9d6ee11f19 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalAnd.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalAnd.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Compound; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Compound; diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalOr.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalOr.php index 6e72132d57..5dace917c4 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalOr.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalOr.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Compound; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Compound; diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/CompoundInterface.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/CompoundInterface.php index b2308956f6..8de1719f4d 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/CompoundInterface.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/CompoundInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php index 3a1bbb4427..6d1984c0cc 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php index 86c46df428..7fede2a377 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php index 76d4db7b85..f16fa5fd02 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php index 0658f59dc6..7a8b1aff43 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Map; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php index de1e7dd0a1..d954bca4e7 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Map; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php index 9e5eb6e256..1fdccd82fe 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Map; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php index 795d4a2002..f277b34a6d 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/Host.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/Host.php index 8bc64d4dcc..e09ff879ba 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/Host.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/Host.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Regex; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/URI.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/URI.php index c0f2da883c..449a57fab8 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/URI.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/URI.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Regex; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php index b9f4df7b70..7f9a8aa636 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php index b459630b88..abf8f1359d 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; diff --git a/src/lib/MVC/Symfony/SiteAccess/MatcherBuilder.php b/src/lib/MVC/Symfony/SiteAccess/MatcherBuilder.php index f7705c9d19..8c514b8fcf 100644 --- a/src/lib/MVC/Symfony/SiteAccess/MatcherBuilder.php +++ b/src/lib/MVC/Symfony/SiteAccess/MatcherBuilder.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; diff --git a/src/lib/MVC/Symfony/SiteAccess/MatcherBuilderInterface.php b/src/lib/MVC/Symfony/SiteAccess/MatcherBuilderInterface.php index ed6bb9c85f..c7bb4391dd 100644 --- a/src/lib/MVC/Symfony/SiteAccess/MatcherBuilderInterface.php +++ b/src/lib/MVC/Symfony/SiteAccess/MatcherBuilderInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; diff --git a/src/lib/MVC/Symfony/SiteAccess/Router.php b/src/lib/MVC/Symfony/SiteAccess/Router.php index 5445aa47c5..770448d4b6 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Router.php +++ b/src/lib/MVC/Symfony/SiteAccess/Router.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Exception\InvalidSiteAccessException; diff --git a/src/lib/MVC/Symfony/SiteAccess/SiteAccessAware.php b/src/lib/MVC/Symfony/SiteAccess/SiteAccessAware.php index 612c35513e..e2b0e0ee0c 100644 --- a/src/lib/MVC/Symfony/SiteAccess/SiteAccessAware.php +++ b/src/lib/MVC/Symfony/SiteAccess/SiteAccessAware.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\SiteAccess; diff --git a/src/lib/MVC/Symfony/SiteAccess/SiteAccessRouterInterface.php b/src/lib/MVC/Symfony/SiteAccess/SiteAccessRouterInterface.php index 0d0a7cfbef..8fa74733e6 100644 --- a/src/lib/MVC/Symfony/SiteAccess/SiteAccessRouterInterface.php +++ b/src/lib/MVC/Symfony/SiteAccess/SiteAccessRouterInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; diff --git a/src/lib/MVC/Symfony/SiteAccess/URILexer.php b/src/lib/MVC/Symfony/SiteAccess/URILexer.php index 6c36bcf477..b47403a11d 100644 --- a/src/lib/MVC/Symfony/SiteAccess/URILexer.php +++ b/src/lib/MVC/Symfony/SiteAccess/URILexer.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess; /** diff --git a/src/lib/MVC/Symfony/SiteAccess/VersatileMatcher.php b/src/lib/MVC/Symfony/SiteAccess/VersatileMatcher.php index a46b60f6cc..09a66da580 100644 --- a/src/lib/MVC/Symfony/SiteAccess/VersatileMatcher.php +++ b/src/lib/MVC/Symfony/SiteAccess/VersatileMatcher.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\SiteAccess; /** diff --git a/src/lib/MVC/Symfony/Templating/Exception/MissingFieldBlockException.php b/src/lib/MVC/Symfony/Templating/Exception/MissingFieldBlockException.php index 1a80329451..aafd93cb7c 100644 --- a/src/lib/MVC/Symfony/Templating/Exception/MissingFieldBlockException.php +++ b/src/lib/MVC/Symfony/Templating/Exception/MissingFieldBlockException.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Templating\Exception; use RuntimeException; diff --git a/src/lib/MVC/Symfony/Templating/FieldBlockRendererInterface.php b/src/lib/MVC/Symfony/Templating/FieldBlockRendererInterface.php index 72ddc65737..76fafaf50a 100644 --- a/src/lib/MVC/Symfony/Templating/FieldBlockRendererInterface.php +++ b/src/lib/MVC/Symfony/Templating/FieldBlockRendererInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Templating; use Ibexa\Contracts\Core\Repository\Values\Content\Content; diff --git a/src/lib/MVC/Symfony/Templating/GlobalHelper.php b/src/lib/MVC/Symfony/Templating/GlobalHelper.php index fb57f8ba50..854a46435e 100644 --- a/src/lib/MVC/Symfony/Templating/GlobalHelper.php +++ b/src/lib/MVC/Symfony/Templating/GlobalHelper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Templating; use Ibexa\Contracts\Core\Repository\LocationService; diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php index 348a7cd7e4..f19f336033 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Templating\Twig\Extension; use Ibexa\Contracts\Core\Repository\Repository; diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/CoreExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/CoreExtension.php index 86ecb6ad85..821433e884 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/CoreExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/CoreExtension.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Templating\Twig\Extension; use Ibexa\Core\MVC\Symfony\Templating\GlobalHelper; diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtension.php index a63c6f8e1b..88950eebc7 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtension.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Templating\Twig\Extension; use Ibexa\Contracts\Core\Repository\Values\Content\Content; diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php index 9c0d700ec7..b5664bb77d 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Templating\Twig\Extension; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/ImageExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/ImageExtension.php index 0a85394329..10776d185c 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/ImageExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/ImageExtension.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Templating\Twig\Extension; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidVariationException; diff --git a/src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php b/src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php index ec2562f5c5..cbf8035d72 100644 --- a/src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php +++ b/src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Translation; use JMS\TranslationBundle\Exception\InvalidArgumentException; diff --git a/src/lib/MVC/Symfony/Translation/ExceptionMessageTemplateFileVisitor.php b/src/lib/MVC/Symfony/Translation/ExceptionMessageTemplateFileVisitor.php index c975d605b3..e4bf154c5e 100644 --- a/src/lib/MVC/Symfony/Translation/ExceptionMessageTemplateFileVisitor.php +++ b/src/lib/MVC/Symfony/Translation/ExceptionMessageTemplateFileVisitor.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Translation; use Doctrine\Common\Annotations\DocParser; diff --git a/src/lib/MVC/Symfony/Translation/FieldTypesTranslationExtractor.php b/src/lib/MVC/Symfony/Translation/FieldTypesTranslationExtractor.php index cb30455b20..8345a54d3b 100644 --- a/src/lib/MVC/Symfony/Translation/FieldTypesTranslationExtractor.php +++ b/src/lib/MVC/Symfony/Translation/FieldTypesTranslationExtractor.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Translation; use Ibexa\Core\FieldType\FieldTypeRegistry; diff --git a/src/lib/MVC/Symfony/Translation/TranslatableExceptionsFileVisitor.php b/src/lib/MVC/Symfony/Translation/TranslatableExceptionsFileVisitor.php index d7ffbeec1f..4a61f2dd6f 100644 --- a/src/lib/MVC/Symfony/Translation/TranslatableExceptionsFileVisitor.php +++ b/src/lib/MVC/Symfony/Translation/TranslatableExceptionsFileVisitor.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Translation; use Doctrine\Common\Annotations\DocParser; diff --git a/src/lib/MVC/Symfony/Translation/ValidationErrorFileVisitor.php b/src/lib/MVC/Symfony/Translation/ValidationErrorFileVisitor.php index 81d6ace9e5..1b5b21ae09 100644 --- a/src/lib/MVC/Symfony/Translation/ValidationErrorFileVisitor.php +++ b/src/lib/MVC/Symfony/Translation/ValidationErrorFileVisitor.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\Translation; use Doctrine\Common\Annotations\DocParser; diff --git a/src/lib/MVC/Symfony/View/BaseView.php b/src/lib/MVC/Symfony/View/BaseView.php index 195274bbc2..bdeb883134 100644 --- a/src/lib/MVC/Symfony/View/BaseView.php +++ b/src/lib/MVC/Symfony/View/BaseView.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View; use Ibexa\Core\Base\Exceptions\InvalidArgumentType; diff --git a/src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php b/src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php index 8f2c36ba7b..fe5cb6acea 100644 --- a/src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php +++ b/src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View\Builder; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; diff --git a/src/lib/MVC/Symfony/View/Builder/ParametersFilter/RequestAttributes.php b/src/lib/MVC/Symfony/View/Builder/ParametersFilter/RequestAttributes.php index 82098c6341..8ec87d1539 100644 --- a/src/lib/MVC/Symfony/View/Builder/ParametersFilter/RequestAttributes.php +++ b/src/lib/MVC/Symfony/View/Builder/ParametersFilter/RequestAttributes.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View\Builder\ParametersFilter; use Ibexa\Core\MVC\Symfony\View\Event\FilterViewBuilderParametersEvent; diff --git a/src/lib/MVC/Symfony/View/Builder/Registry/ControllerMatch.php b/src/lib/MVC/Symfony/View/Builder/Registry/ControllerMatch.php index 36fb40c5c8..034e5b10cf 100644 --- a/src/lib/MVC/Symfony/View/Builder/Registry/ControllerMatch.php +++ b/src/lib/MVC/Symfony/View/Builder/Registry/ControllerMatch.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View\Builder\Registry; use Ibexa\Core\MVC\Symfony\View\Builder\ViewBuilderRegistry; diff --git a/src/lib/MVC/Symfony/View/Builder/ViewBuilder.php b/src/lib/MVC/Symfony/View/Builder/ViewBuilder.php index 533da06fca..9bb333b46d 100644 --- a/src/lib/MVC/Symfony/View/Builder/ViewBuilder.php +++ b/src/lib/MVC/Symfony/View/Builder/ViewBuilder.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View\Builder; use Ibexa\Core\MVC\Symfony\View\View; diff --git a/src/lib/MVC/Symfony/View/Builder/ViewBuilderRegistry.php b/src/lib/MVC/Symfony/View/Builder/ViewBuilderRegistry.php index aebd4e1f46..d8c29c4cc0 100644 --- a/src/lib/MVC/Symfony/View/Builder/ViewBuilderRegistry.php +++ b/src/lib/MVC/Symfony/View/Builder/ViewBuilderRegistry.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View\Builder; /** diff --git a/src/lib/MVC/Symfony/View/CachableView.php b/src/lib/MVC/Symfony/View/CachableView.php index 3f446392ed..7e9f073729 100644 --- a/src/lib/MVC/Symfony/View/CachableView.php +++ b/src/lib/MVC/Symfony/View/CachableView.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View; /** diff --git a/src/lib/MVC/Symfony/View/Configurator.php b/src/lib/MVC/Symfony/View/Configurator.php index c17af6eaaa..ad516bc03e 100644 --- a/src/lib/MVC/Symfony/View/Configurator.php +++ b/src/lib/MVC/Symfony/View/Configurator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View; /** diff --git a/src/lib/MVC/Symfony/View/Configurator/ViewProvider.php b/src/lib/MVC/Symfony/View/Configurator/ViewProvider.php index 56534487e6..db75ad84dc 100644 --- a/src/lib/MVC/Symfony/View/Configurator/ViewProvider.php +++ b/src/lib/MVC/Symfony/View/Configurator/ViewProvider.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View\Configurator; use Ibexa\Core\MVC\Symfony\View\Configurator; diff --git a/src/lib/MVC/Symfony/View/ContentValueView.php b/src/lib/MVC/Symfony/View/ContentValueView.php index 76160e3fd4..47d68ede1c 100644 --- a/src/lib/MVC/Symfony/View/ContentValueView.php +++ b/src/lib/MVC/Symfony/View/ContentValueView.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View; /** diff --git a/src/lib/MVC/Symfony/View/ContentView.php b/src/lib/MVC/Symfony/View/ContentView.php index 9777af3acf..981b960163 100644 --- a/src/lib/MVC/Symfony/View/ContentView.php +++ b/src/lib/MVC/Symfony/View/ContentView.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View; use Ibexa\Contracts\Core\Repository\Values\Content\Content; diff --git a/src/lib/MVC/Symfony/View/CustomLocationControllerChecker.php b/src/lib/MVC/Symfony/View/CustomLocationControllerChecker.php index 4aaab8fb4b..116e209408 100644 --- a/src/lib/MVC/Symfony/View/CustomLocationControllerChecker.php +++ b/src/lib/MVC/Symfony/View/CustomLocationControllerChecker.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View; use Ibexa\Contracts\Core\Repository\Values\Content\Content; diff --git a/src/lib/MVC/Symfony/View/EmbedView.php b/src/lib/MVC/Symfony/View/EmbedView.php index a13a7c467e..b18f7c00de 100644 --- a/src/lib/MVC/Symfony/View/EmbedView.php +++ b/src/lib/MVC/Symfony/View/EmbedView.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View; /** diff --git a/src/lib/MVC/Symfony/View/Event/FilterViewBuilderParametersEvent.php b/src/lib/MVC/Symfony/View/Event/FilterViewBuilderParametersEvent.php index 81f9eeec7f..9794e2c16d 100644 --- a/src/lib/MVC/Symfony/View/Event/FilterViewBuilderParametersEvent.php +++ b/src/lib/MVC/Symfony/View/Event/FilterViewBuilderParametersEvent.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View\Event; use Symfony\Component\HttpFoundation\ParameterBag; diff --git a/src/lib/MVC/Symfony/View/Event/FilterViewParametersEvent.php b/src/lib/MVC/Symfony/View/Event/FilterViewParametersEvent.php index 266f6ae301..8a289349f0 100644 --- a/src/lib/MVC/Symfony/View/Event/FilterViewParametersEvent.php +++ b/src/lib/MVC/Symfony/View/Event/FilterViewParametersEvent.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View\Event; use Ibexa\Core\MVC\Symfony\View\View; diff --git a/src/lib/MVC/Symfony/View/LocationValueView.php b/src/lib/MVC/Symfony/View/LocationValueView.php index 1f6029a0a3..e0a03ee080 100644 --- a/src/lib/MVC/Symfony/View/LocationValueView.php +++ b/src/lib/MVC/Symfony/View/LocationValueView.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View; interface LocationValueView diff --git a/src/lib/MVC/Symfony/View/Manager.php b/src/lib/MVC/Symfony/View/Manager.php index fd8242486d..ecb4e9acef 100644 --- a/src/lib/MVC/Symfony/View/Manager.php +++ b/src/lib/MVC/Symfony/View/Manager.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View; use Ibexa\Contracts\Core\Repository\Repository; diff --git a/src/lib/MVC/Symfony/View/ParametersInjector.php b/src/lib/MVC/Symfony/View/ParametersInjector.php index 2f4468f34b..06ac8fa01c 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View; /** diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/CustomParameters.php b/src/lib/MVC/Symfony/View/ParametersInjector/CustomParameters.php index 7fc7836c11..87ce2a1630 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/CustomParameters.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/CustomParameters.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View\ParametersInjector; use Ibexa\Core\MVC\Symfony\View\Event\FilterViewParametersEvent; diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/EmbedObjectParameters.php b/src/lib/MVC/Symfony/View/ParametersInjector/EmbedObjectParameters.php index 992dc85308..ab4c31f78d 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/EmbedObjectParameters.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/EmbedObjectParameters.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View\ParametersInjector; use Ibexa\Core\MVC\Symfony\View\Event\FilterViewParametersEvent; diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/EventDispatcherInjector.php b/src/lib/MVC/Symfony/View/ParametersInjector/EventDispatcherInjector.php index 254dd811a7..99abc7272a 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/EventDispatcherInjector.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/EventDispatcherInjector.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View\ParametersInjector; use Ibexa\Core\MVC\Symfony\View\Event\FilterViewParametersEvent; diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/NoLayout.php b/src/lib/MVC/Symfony/View/ParametersInjector/NoLayout.php index b8ffd98e36..a71f6704ae 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/NoLayout.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/NoLayout.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View\ParametersInjector; use Ibexa\Core\MVC\Symfony\View\Event\FilterViewParametersEvent; diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/ValueObjectsIds.php b/src/lib/MVC/Symfony/View/ParametersInjector/ValueObjectsIds.php index ad96c283ff..4218dcf18a 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/ValueObjectsIds.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/ValueObjectsIds.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View\ParametersInjector; use Ibexa\Contracts\Core\Repository\Values\Content\Location; diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/ViewbaseLayout.php b/src/lib/MVC/Symfony/View/ParametersInjector/ViewbaseLayout.php index 05f0096c01..b90d0ac79c 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/ViewbaseLayout.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/ViewbaseLayout.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View\ParametersInjector; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/src/lib/MVC/Symfony/View/Provider/Configured.php b/src/lib/MVC/Symfony/View/Provider/Configured.php index 3f56c1713f..d2bf56d6be 100644 --- a/src/lib/MVC/Symfony/View/Provider/Configured.php +++ b/src/lib/MVC/Symfony/View/Provider/Configured.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View\Provider; use Ibexa\Core\MVC\Symfony\Matcher\MatcherFactoryInterface; diff --git a/src/lib/MVC/Symfony/View/Provider/Content.php b/src/lib/MVC/Symfony/View/Provider/Content.php index 07ea6de95c..59e5f6d896 100644 --- a/src/lib/MVC/Symfony/View/Provider/Content.php +++ b/src/lib/MVC/Symfony/View/Provider/Content.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View\Provider; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; diff --git a/src/lib/MVC/Symfony/View/Provider/Location.php b/src/lib/MVC/Symfony/View/Provider/Location.php index 65f86631c0..d3c01d92cd 100644 --- a/src/lib/MVC/Symfony/View/Provider/Location.php +++ b/src/lib/MVC/Symfony/View/Provider/Location.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View\Provider; use Ibexa\Contracts\Core\Repository\Values\Content\Location as APIContentLocation; diff --git a/src/lib/MVC/Symfony/View/Provider/Registry.php b/src/lib/MVC/Symfony/View/Provider/Registry.php index 6565514840..8eb4373f63 100644 --- a/src/lib/MVC/Symfony/View/Provider/Registry.php +++ b/src/lib/MVC/Symfony/View/Provider/Registry.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View\Provider; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; diff --git a/src/lib/MVC/Symfony/View/Renderer.php b/src/lib/MVC/Symfony/View/Renderer.php index 8132e74189..8d03b30f26 100644 --- a/src/lib/MVC/Symfony/View/Renderer.php +++ b/src/lib/MVC/Symfony/View/Renderer.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View; /** diff --git a/src/lib/MVC/Symfony/View/Renderer/TemplateRenderer.php b/src/lib/MVC/Symfony/View/Renderer/TemplateRenderer.php index 52326882e5..e7fe4df7dd 100644 --- a/src/lib/MVC/Symfony/View/Renderer/TemplateRenderer.php +++ b/src/lib/MVC/Symfony/View/Renderer/TemplateRenderer.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View\Renderer; use Closure; diff --git a/src/lib/MVC/Symfony/View/View.php b/src/lib/MVC/Symfony/View/View.php index dec7f2e0fe..4d80d97cc5 100644 --- a/src/lib/MVC/Symfony/View/View.php +++ b/src/lib/MVC/Symfony/View/View.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View; use Symfony\Component\HttpFoundation\Response; diff --git a/src/lib/MVC/Symfony/View/ViewEvents.php b/src/lib/MVC/Symfony/View/ViewEvents.php index 689af41599..e9786c67e6 100644 --- a/src/lib/MVC/Symfony/View/ViewEvents.php +++ b/src/lib/MVC/Symfony/View/ViewEvents.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View; /** diff --git a/src/lib/MVC/Symfony/View/ViewManagerInterface.php b/src/lib/MVC/Symfony/View/ViewManagerInterface.php index cc72431fdf..2c3cc38bf2 100644 --- a/src/lib/MVC/Symfony/View/ViewManagerInterface.php +++ b/src/lib/MVC/Symfony/View/ViewManagerInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View; use Ibexa\Contracts\Core\Repository\Values\Content\Content; diff --git a/src/lib/MVC/Symfony/View/ViewProvider.php b/src/lib/MVC/Symfony/View/ViewProvider.php index 8de5df92f5..dfa1bf0dd6 100644 --- a/src/lib/MVC/Symfony/View/ViewProvider.php +++ b/src/lib/MVC/Symfony/View/ViewProvider.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\MVC\Symfony\View; interface ViewProvider diff --git a/src/lib/Pagination/Pagerfanta/ContentSearchAdapter.php b/src/lib/Pagination/Pagerfanta/ContentSearchAdapter.php index 24317cec7d..9a7a399083 100644 --- a/src/lib/Pagination/Pagerfanta/ContentSearchAdapter.php +++ b/src/lib/Pagination/Pagerfanta/ContentSearchAdapter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Pagination\Pagerfanta; /** diff --git a/src/lib/Pagination/Pagerfanta/ContentSearchHitAdapter.php b/src/lib/Pagination/Pagerfanta/ContentSearchHitAdapter.php index 891beb1ddb..6211971e16 100644 --- a/src/lib/Pagination/Pagerfanta/ContentSearchHitAdapter.php +++ b/src/lib/Pagination/Pagerfanta/ContentSearchHitAdapter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Pagination\Pagerfanta; use Ibexa\Contracts\Core\Repository\SearchService; diff --git a/src/lib/Pagination/Pagerfanta/LocationSearchAdapter.php b/src/lib/Pagination/Pagerfanta/LocationSearchAdapter.php index 8bfaa34ad3..5ccb9cd5de 100644 --- a/src/lib/Pagination/Pagerfanta/LocationSearchAdapter.php +++ b/src/lib/Pagination/Pagerfanta/LocationSearchAdapter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Pagination\Pagerfanta; /** diff --git a/src/lib/Pagination/Pagerfanta/LocationSearchHitAdapter.php b/src/lib/Pagination/Pagerfanta/LocationSearchHitAdapter.php index c0ec9fc2bf..4602bb4006 100644 --- a/src/lib/Pagination/Pagerfanta/LocationSearchHitAdapter.php +++ b/src/lib/Pagination/Pagerfanta/LocationSearchHitAdapter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Pagination\Pagerfanta; use Ibexa\Contracts\Core\Repository\SearchService; diff --git a/src/lib/Persistence/Cache/AbstractHandler.php b/src/lib/Persistence/Cache/AbstractHandler.php index 04fdddd34a..d9d86cd243 100644 --- a/src/lib/Persistence/Cache/AbstractHandler.php +++ b/src/lib/Persistence/Cache/AbstractHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Handler as PersistenceHandler; diff --git a/src/lib/Persistence/Cache/AbstractInMemoryHandler.php b/src/lib/Persistence/Cache/AbstractInMemoryHandler.php index 8fa1ae1072..5a3f5d35d3 100644 --- a/src/lib/Persistence/Cache/AbstractInMemoryHandler.php +++ b/src/lib/Persistence/Cache/AbstractInMemoryHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Cache; use Ibexa\Core\Persistence\Cache\Adapter\TransactionAwareAdapterInterface; diff --git a/src/lib/Persistence/Cache/AbstractInMemoryPersistenceHandler.php b/src/lib/Persistence/Cache/AbstractInMemoryPersistenceHandler.php index 6d76d31c11..5da20fac52 100644 --- a/src/lib/Persistence/Cache/AbstractInMemoryPersistenceHandler.php +++ b/src/lib/Persistence/Cache/AbstractInMemoryPersistenceHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Handler as PersistenceHandler; diff --git a/src/lib/Persistence/Cache/ContentHandler.php b/src/lib/Persistence/Cache/ContentHandler.php index 9047a4c182..30794a01b0 100644 --- a/src/lib/Persistence/Cache/ContentHandler.php +++ b/src/lib/Persistence/Cache/ContentHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Content; diff --git a/src/lib/Persistence/Cache/ContentLanguageHandler.php b/src/lib/Persistence/Cache/ContentLanguageHandler.php index 96c6d167e1..e5e02875ee 100644 --- a/src/lib/Persistence/Cache/ContentLanguageHandler.php +++ b/src/lib/Persistence/Cache/ContentLanguageHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Content\Language; diff --git a/src/lib/Persistence/Cache/ContentTypeHandler.php b/src/lib/Persistence/Cache/ContentTypeHandler.php index ed24ed5fc7..a8e4dda0dd 100644 --- a/src/lib/Persistence/Cache/ContentTypeHandler.php +++ b/src/lib/Persistence/Cache/ContentTypeHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Content\Type; diff --git a/src/lib/Persistence/Cache/LocationHandler.php b/src/lib/Persistence/Cache/LocationHandler.php index dc07fd9f93..1d681883a6 100644 --- a/src/lib/Persistence/Cache/LocationHandler.php +++ b/src/lib/Persistence/Cache/LocationHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Content\Location; diff --git a/src/lib/Persistence/Cache/ObjectStateHandler.php b/src/lib/Persistence/Cache/ObjectStateHandler.php index 20b68167f7..16b3d219fc 100644 --- a/src/lib/Persistence/Cache/ObjectStateHandler.php +++ b/src/lib/Persistence/Cache/ObjectStateHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Content\ObjectState; diff --git a/src/lib/Persistence/Cache/SectionHandler.php b/src/lib/Persistence/Cache/SectionHandler.php index 09755f9aaf..39c9d6c836 100644 --- a/src/lib/Persistence/Cache/SectionHandler.php +++ b/src/lib/Persistence/Cache/SectionHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Content\Section\Handler as SectionHandlerInterface; diff --git a/src/lib/Persistence/Cache/SettingHandler.php b/src/lib/Persistence/Cache/SettingHandler.php index ea295842f5..a409ad60f6 100644 --- a/src/lib/Persistence/Cache/SettingHandler.php +++ b/src/lib/Persistence/Cache/SettingHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Setting\Handler as SettingHandlerInterface; diff --git a/src/lib/Persistence/Cache/TransactionHandler.php b/src/lib/Persistence/Cache/TransactionHandler.php index 580bb4b610..8801adc533 100644 --- a/src/lib/Persistence/Cache/TransactionHandler.php +++ b/src/lib/Persistence/Cache/TransactionHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\TransactionHandler as TransactionHandlerInterface; diff --git a/src/lib/Persistence/Cache/TrashHandler.php b/src/lib/Persistence/Cache/TrashHandler.php index a8f5fdd39f..b3f0ef6729 100644 --- a/src/lib/Persistence/Cache/TrashHandler.php +++ b/src/lib/Persistence/Cache/TrashHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Content\Location\Trash\Handler as TrashHandlerInterface; diff --git a/src/lib/Persistence/Cache/URLHandler.php b/src/lib/Persistence/Cache/URLHandler.php index 517e0a7948..53947d7e5d 100644 --- a/src/lib/Persistence/Cache/URLHandler.php +++ b/src/lib/Persistence/Cache/URLHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\URL\Handler as URLHandlerInterface; diff --git a/src/lib/Persistence/Cache/UrlAliasHandler.php b/src/lib/Persistence/Cache/UrlAliasHandler.php index 0edfaeb3f6..98fd819cf1 100644 --- a/src/lib/Persistence/Cache/UrlAliasHandler.php +++ b/src/lib/Persistence/Cache/UrlAliasHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Content\UrlAlias; diff --git a/src/lib/Persistence/Cache/UrlWildcardHandler.php b/src/lib/Persistence/Cache/UrlWildcardHandler.php index fb92a76ba7..e51ab896ca 100644 --- a/src/lib/Persistence/Cache/UrlWildcardHandler.php +++ b/src/lib/Persistence/Cache/UrlWildcardHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Content\UrlWildcard; diff --git a/src/lib/Persistence/Cache/UserHandler.php b/src/lib/Persistence/Cache/UserHandler.php index 0a5999dffc..eaf8574f5d 100644 --- a/src/lib/Persistence/Cache/UserHandler.php +++ b/src/lib/Persistence/Cache/UserHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\User; diff --git a/src/lib/Persistence/FieldType.php b/src/lib/Persistence/FieldType.php index 259f6c6ebe..93909c06b1 100644 --- a/src/lib/Persistence/FieldType.php +++ b/src/lib/Persistence/FieldType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence; use Ibexa\Contracts\Core\FieldType\FieldType as SPIFieldType; diff --git a/src/lib/Persistence/FieldTypeRegistry.php b/src/lib/Persistence/FieldTypeRegistry.php index fe013d35ce..1408b16fc5 100644 --- a/src/lib/Persistence/FieldTypeRegistry.php +++ b/src/lib/Persistence/FieldTypeRegistry.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence; use Ibexa\Contracts\Core\FieldType\FieldType as SPIFieldType; diff --git a/src/lib/Persistence/Legacy/Content/FieldHandler.php b/src/lib/Persistence/Legacy/Content/FieldHandler.php index 892608c25c..231a586cee 100644 --- a/src/lib/Persistence/Legacy/Content/FieldHandler.php +++ b/src/lib/Persistence/Legacy/Content/FieldHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content; use Ibexa\Contracts\Core\Persistence\Content; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter.php index 95601cafe9..3862a6f690 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php index 379d821ce7..89c2bee915 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use DOMDocument; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/BinaryFileConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/BinaryFileConverter.php index 5789e2bc8e..0de9160e3e 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/BinaryFileConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/BinaryFileConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldTypeConstraints; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxConverter.php index dd3486bbf4..8265604427 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryConverter.php index 670839dddb..c6f68b1b76 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php index 42a2efc4f1..3145a47307 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use DateInterval; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php index c311520a42..83e6cf2072 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php index b1bd4aae4b..40f9806e25 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/Exception/NotFound.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/Exception/NotFound.php index d11218747c..fc4ee6e851 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/Exception/NotFound.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/Exception/NotFound.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter\Exception; use Ibexa\Core\Base\Exceptions\NotFoundException; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php index d13a502764..619738e431 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNConverter.php index 38776a37c1..822e81e241 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php index 3b30bd924a..a4d6eb4d82 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldTypeConstraints; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/IntegerConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/IntegerConverter.php index 63e494280e..3cb51ae5a1 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/IntegerConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/IntegerConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordConverter.php index 8832a09702..7d4145ee69 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MapLocationConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MapLocationConverter.php index ec78361fe1..f349147d77 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MapLocationConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MapLocationConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaConverter.php index 9f64106d7d..014b2dbe95 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php index 909ef9defa..37dbededc0 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php index b0fcde53fa..370bba3f7e 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use DOMDocument; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php index 172d157953..38e0651e2a 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Doctrine\DBAL\Connection; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionConverter.php index f2f14815f1..f10b01e1f9 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use DOMDocument; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php index 59460d3e03..95f977a1ce 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php index 30e0c13726..49c46bc11d 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php index df9b133fb8..456165a0f1 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use DateTime; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php index cdbd95203a..e690bb07a4 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/ConverterRegistry.php b/src/lib/Persistence/Legacy/Content/FieldValue/ConverterRegistry.php index 0a2da82760..8c2dc91e7b 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/ConverterRegistry.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/ConverterRegistry.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue; use Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter\Exception\NotFound; diff --git a/src/lib/Persistence/Legacy/Content/Gateway.php b/src/lib/Persistence/Legacy/Content/Gateway.php index 95f12bc0b4..181007e7bd 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/Gateway.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content; use Ibexa\Contracts\Core\Persistence\Content; diff --git a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php index 29d1569b52..d450b36698 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Gateway; use Doctrine\DBAL\Connection; diff --git a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase/QueryBuilder.php b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase/QueryBuilder.php index cdc28887e9..0b71efd067 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase/QueryBuilder.php +++ b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase/QueryBuilder.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase; use Doctrine\DBAL\Connection; diff --git a/src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php index f4e8f9dc32..6ba5f755b3 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Gateway; use Doctrine\DBAL\DBALException; diff --git a/src/lib/Persistence/Legacy/Content/Handler.php b/src/lib/Persistence/Legacy/Content/Handler.php index 56871b0d27..d59ee5185d 100644 --- a/src/lib/Persistence/Legacy/Content/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content; use Exception; diff --git a/src/lib/Persistence/Legacy/Content/Language/CachingHandler.php b/src/lib/Persistence/Legacy/Content/Language/CachingHandler.php index 6b4e8f16ef..807d2416ad 100644 --- a/src/lib/Persistence/Legacy/Content/Language/CachingHandler.php +++ b/src/lib/Persistence/Legacy/Content/Language/CachingHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Language; use Ibexa\Contracts\Core\Persistence\Content\Language; diff --git a/src/lib/Persistence/Legacy/Content/Language/Handler.php b/src/lib/Persistence/Legacy/Content/Language/Handler.php index a3db53098c..5cf0c0d43e 100644 --- a/src/lib/Persistence/Legacy/Content/Language/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Language/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Language; use Ibexa\Contracts\Core\Persistence\Content\Language; diff --git a/src/lib/Persistence/Legacy/Content/Language/Mapper.php b/src/lib/Persistence/Legacy/Content/Language/Mapper.php index ec3bc16224..b085cdee83 100644 --- a/src/lib/Persistence/Legacy/Content/Language/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/Language/Mapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Language; use Ibexa\Contracts\Core\Persistence\Content\Language; diff --git a/src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php b/src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php index c51c84f85f..fbcec7fbc5 100644 --- a/src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php +++ b/src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Language; use Ibexa\Contracts\Core\Persistence\Content\Language\Handler as LanguageHandler; diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway.php b/src/lib/Persistence/Legacy/Content/Location/Gateway.php index 57e7838eeb..009b137c89 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Location; use Ibexa\Contracts\Core\Persistence\Content\Location; diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php index 8341e96196..968343fa3e 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Location\Gateway; use Doctrine\DBAL\Connection; @@ -229,6 +230,7 @@ public function getSubtreeContent(int $sourceId, bool $onlyIds = false): array $statement = $query->execute(); $results = $statement->fetchAll($onlyIds ? (FetchMode::COLUMN | PDO::FETCH_GROUP) : FetchMode::ASSOCIATIVE); + // array_map() is used to map all elements stored as $results[$i][0] to $results[$i] return $onlyIds ? array_map(static function (array $result) { diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php index 70fe4b717c..52f78048d9 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Location\Gateway; use Doctrine\DBAL\DBALException; diff --git a/src/lib/Persistence/Legacy/Content/Location/Handler.php b/src/lib/Persistence/Legacy/Content/Location/Handler.php index 758e221c4a..94809a6f48 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Location/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Location; use Ibexa\Contracts\Core\Persistence\Content; diff --git a/src/lib/Persistence/Legacy/Content/Location/Mapper.php b/src/lib/Persistence/Legacy/Content/Location/Mapper.php index 4afeb7109e..6bbf29c5fa 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/Location/Mapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Location; use Ibexa\Contracts\Core\Persistence\Content\Location; diff --git a/src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php b/src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php index 18cdd924b6..1ef1ba9168 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Location\Trash; use Ibexa\Contracts\Core\Persistence\Content\Location\Trash\Handler as BaseTrashHandler; diff --git a/src/lib/Persistence/Legacy/Content/Mapper.php b/src/lib/Persistence/Legacy/Content/Mapper.php index aa6a670a66..720fda16a9 100644 --- a/src/lib/Persistence/Legacy/Content/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/Mapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content; use Ibexa\Contracts\Core\Event\Mapper\ResolveMissingFieldEvent; diff --git a/src/lib/Persistence/Legacy/Content/ObjectState/Handler.php b/src/lib/Persistence/Legacy/Content/ObjectState/Handler.php index d27e0920b3..a34f6bb9f7 100644 --- a/src/lib/Persistence/Legacy/Content/ObjectState/Handler.php +++ b/src/lib/Persistence/Legacy/Content/ObjectState/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\ObjectState; use Ibexa\Contracts\Core\Persistence\Content\ObjectState\Handler as BaseObjectStateHandler; diff --git a/src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php b/src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php index da6cb8d1f4..e49d65c827 100644 --- a/src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\ObjectState; use Ibexa\Contracts\Core\Persistence\Content\Language\Handler as LanguageHandler; diff --git a/src/lib/Persistence/Legacy/Content/Section/Handler.php b/src/lib/Persistence/Legacy/Content/Section/Handler.php index 76f03f85df..9813126701 100644 --- a/src/lib/Persistence/Legacy/Content/Section/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Section/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Section; use Ibexa\Contracts\Core\Persistence\Content\Section; diff --git a/src/lib/Persistence/Legacy/Content/StorageFieldDefinition.php b/src/lib/Persistence/Legacy/Content/StorageFieldDefinition.php index e5a283184c..d657ad7c5d 100644 --- a/src/lib/Persistence/Legacy/Content/StorageFieldDefinition.php +++ b/src/lib/Persistence/Legacy/Content/StorageFieldDefinition.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/lib/Persistence/Legacy/Content/StorageFieldValue.php b/src/lib/Persistence/Legacy/Content/StorageFieldValue.php index 2914c1baf7..a4ee9a8c69 100644 --- a/src/lib/Persistence/Legacy/Content/StorageFieldValue.php +++ b/src/lib/Persistence/Legacy/Content/StorageFieldValue.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content; use Ibexa\Contracts\Core\Persistence\ValueObject; diff --git a/src/lib/Persistence/Legacy/Content/StorageHandler.php b/src/lib/Persistence/Legacy/Content/StorageHandler.php index b4e9ded93d..b37f4ca39e 100644 --- a/src/lib/Persistence/Legacy/Content/StorageHandler.php +++ b/src/lib/Persistence/Legacy/Content/StorageHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content; use Ibexa\Contracts\Core\Persistence\Content\Field; diff --git a/src/lib/Persistence/Legacy/Content/StorageRegistry.php b/src/lib/Persistence/Legacy/Content/StorageRegistry.php index 0de52b627a..5869f546aa 100644 --- a/src/lib/Persistence/Legacy/Content/StorageRegistry.php +++ b/src/lib/Persistence/Legacy/Content/StorageRegistry.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content; use Ibexa\Contracts\Core\FieldType\FieldStorage; diff --git a/src/lib/Persistence/Legacy/Content/TreeHandler.php b/src/lib/Persistence/Legacy/Content/TreeHandler.php index 700b067e94..cc6391b113 100644 --- a/src/lib/Persistence/Legacy/Content/TreeHandler.php +++ b/src/lib/Persistence/Legacy/Content/TreeHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; diff --git a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater.php b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater.php index 9c53b14628..1c04fee47f 100644 --- a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater.php +++ b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Type; use Ibexa\Contracts\Core\Persistence\Content\Type; diff --git a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action.php b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action.php index cb7c3d8fff..f011e2c313 100644 --- a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action.php +++ b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Type\ContentUpdater; use Ibexa\Core\Persistence\Legacy\Content\Gateway as ContentGateway; diff --git a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddField.php b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddField.php index 2bfceff98c..a62df29175 100644 --- a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddField.php +++ b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action; use Ibexa\Contracts\Core\Persistence\Content; diff --git a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveField.php b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveField.php index dc8123ff8f..1299a73b12 100644 --- a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveField.php +++ b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveField.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action; use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition; diff --git a/src/lib/Persistence/Legacy/Content/Type/Handler.php b/src/lib/Persistence/Legacy/Content/Type/Handler.php index 88abfb59ef..6c59d935b7 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Type/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Type; use Ibexa\Contracts\Core\Persistence\Content\Type; @@ -477,6 +478,7 @@ public function unlink($groupId, $contentTypeId, $status) } $this->contentTypeGateway->deleteGroupAssignment($groupId, $contentTypeId, $status); + // @todo FIXME: What is to be returned? return true; } @@ -495,6 +497,7 @@ public function unlink($groupId, $contentTypeId, $status) public function link($groupId, $contentTypeId, $status) { $this->contentTypeGateway->insertGroupAssignment($groupId, $contentTypeId, $status); + // @todo FIXME: What is to be returned? return true; } diff --git a/src/lib/Persistence/Legacy/Content/Type/Mapper.php b/src/lib/Persistence/Legacy/Content/Type/Mapper.php index af8c060d95..80f08556eb 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/Type/Mapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Type; use Ibexa\Contracts\Core\Persistence\Content\Type; diff --git a/src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php b/src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php index ec9c7e990d..2355b67682 100644 --- a/src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php +++ b/src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\Type; use Ibexa\Contracts\Core\Persistence\Content\Type; diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/DTO/SwappedLocationProperties.php b/src/lib/Persistence/Legacy/Content/UrlAlias/DTO/SwappedLocationProperties.php index 903815c635..75a8d241bc 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/DTO/SwappedLocationProperties.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/DTO/SwappedLocationProperties.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\UrlAlias\DTO; /** diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/DTO/UrlAliasForSwappedLocation.php b/src/lib/Persistence/Legacy/Content/UrlAlias/DTO/UrlAliasForSwappedLocation.php index 670f5169ee..bee42796e7 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/DTO/UrlAliasForSwappedLocation.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/DTO/UrlAliasForSwappedLocation.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\UrlAlias\DTO; /** diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php index 49d08729da..b841ce4bac 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\UrlAlias; use Doctrine\DBAL\Exception\UniqueConstraintViolationException; diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php index 17cad221a1..443fe50f87 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\UrlAlias; use Ibexa\Contracts\Core\Persistence\Content\UrlAlias; diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/SlugConverter.php b/src/lib/Persistence/Legacy/Content/UrlAlias/SlugConverter.php index d24883391c..7eec2456c6 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/SlugConverter.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/SlugConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\UrlAlias; use Ibexa\Core\Persistence\TransformationProcessor; diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php index 4b72da8672..ec92b97058 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\UrlWildcard; use Ibexa\Contracts\Core\Persistence\Content\UrlWildcard; diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Mapper.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Mapper.php index 81009c90bb..b074b98e28 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Mapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Content\UrlWildcard; use Ibexa\Contracts\Core\Persistence\Content\UrlWildcard; diff --git a/src/lib/Persistence/Legacy/Exception/GroupNotEmpty.php b/src/lib/Persistence/Legacy/Exception/GroupNotEmpty.php index a494be98cd..b3ec5faf80 100644 --- a/src/lib/Persistence/Legacy/Exception/GroupNotEmpty.php +++ b/src/lib/Persistence/Legacy/Exception/GroupNotEmpty.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Exception; use Ibexa\Core\Base\Exceptions\BadStateException; diff --git a/src/lib/Persistence/Legacy/Exception/RemoveLastGroupFromType.php b/src/lib/Persistence/Legacy/Exception/RemoveLastGroupFromType.php index 2b7c914deb..8930fbcfe2 100644 --- a/src/lib/Persistence/Legacy/Exception/RemoveLastGroupFromType.php +++ b/src/lib/Persistence/Legacy/Exception/RemoveLastGroupFromType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Exception; use Ibexa\Core\Base\Exceptions\BadStateException; diff --git a/src/lib/Persistence/Legacy/Exception/RoleNotFound.php b/src/lib/Persistence/Legacy/Exception/RoleNotFound.php index 35373f0e8e..31720b33c2 100644 --- a/src/lib/Persistence/Legacy/Exception/RoleNotFound.php +++ b/src/lib/Persistence/Legacy/Exception/RoleNotFound.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Exception; use Ibexa\Core\Base\Exceptions\NotFoundException; diff --git a/src/lib/Persistence/Legacy/Exception/StorageNotFound.php b/src/lib/Persistence/Legacy/Exception/StorageNotFound.php index 98b0c3e854..cf00d0faf1 100644 --- a/src/lib/Persistence/Legacy/Exception/StorageNotFound.php +++ b/src/lib/Persistence/Legacy/Exception/StorageNotFound.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Exception; use InvalidArgumentException; diff --git a/src/lib/Persistence/Legacy/Exception/TypeGroupNotFound.php b/src/lib/Persistence/Legacy/Exception/TypeGroupNotFound.php index 4f016df335..afdf91e275 100644 --- a/src/lib/Persistence/Legacy/Exception/TypeGroupNotFound.php +++ b/src/lib/Persistence/Legacy/Exception/TypeGroupNotFound.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Exception; use Ibexa\Core\Base\Exceptions\NotFoundException; diff --git a/src/lib/Persistence/Legacy/Exception/TypeNotFound.php b/src/lib/Persistence/Legacy/Exception/TypeNotFound.php index 58ce696196..7bf36f3f41 100644 --- a/src/lib/Persistence/Legacy/Exception/TypeNotFound.php +++ b/src/lib/Persistence/Legacy/Exception/TypeNotFound.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Exception; use Ibexa\Core\Base\Exceptions\NotFoundException; diff --git a/src/lib/Persistence/Legacy/Exception/TypeStillHasContent.php b/src/lib/Persistence/Legacy/Exception/TypeStillHasContent.php index 196812c40b..23b44ac2e1 100644 --- a/src/lib/Persistence/Legacy/Exception/TypeStillHasContent.php +++ b/src/lib/Persistence/Legacy/Exception/TypeStillHasContent.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Exception; use Ibexa\Core\Base\Exceptions\BadStateException; diff --git a/src/lib/Persistence/Legacy/Setting/Handler.php b/src/lib/Persistence/Legacy/Setting/Handler.php index b336a0bf92..c4329cfb70 100644 --- a/src/lib/Persistence/Legacy/Setting/Handler.php +++ b/src/lib/Persistence/Legacy/Setting/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\Setting; use Ibexa\Contracts\Core\Persistence\Setting\Handler as BaseSettingHandler; diff --git a/src/lib/Persistence/Legacy/TransactionHandler.php b/src/lib/Persistence/Legacy/TransactionHandler.php index b450b9bdf3..45d29a6dff 100644 --- a/src/lib/Persistence/Legacy/TransactionHandler.php +++ b/src/lib/Persistence/Legacy/TransactionHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy; use Doctrine\DBAL\Connection; diff --git a/src/lib/Persistence/Legacy/URL/Gateway.php b/src/lib/Persistence/Legacy/URL/Gateway.php index ed83690ed7..ee00264e77 100644 --- a/src/lib/Persistence/Legacy/URL/Gateway.php +++ b/src/lib/Persistence/Legacy/URL/Gateway.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\URL; use Ibexa\Contracts\Core\Persistence\URL\URL; diff --git a/src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php index 81a7f53e36..9895c3dd6d 100644 --- a/src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\URL\Gateway; use Doctrine\DBAL\Connection; diff --git a/src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php index ff301d2ad1..9958240c78 100644 --- a/src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\URL\Gateway; use Doctrine\DBAL\DBALException; diff --git a/src/lib/Persistence/Legacy/URL/Handler.php b/src/lib/Persistence/Legacy/URL/Handler.php index 5ce9869be6..6dc8d4f9ef 100644 --- a/src/lib/Persistence/Legacy/URL/Handler.php +++ b/src/lib/Persistence/Legacy/URL/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\URL; use Ibexa\Contracts\Core\Persistence\URL\Handler as HandlerInterface; diff --git a/src/lib/Persistence/Legacy/URL/Mapper.php b/src/lib/Persistence/Legacy/URL/Mapper.php index 3b29647e3c..4221d83fb2 100644 --- a/src/lib/Persistence/Legacy/URL/Mapper.php +++ b/src/lib/Persistence/Legacy/URL/Mapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\URL; use Ibexa\Contracts\Core\Persistence\URL\URL; diff --git a/src/lib/Persistence/Legacy/URL/Query/CriteriaConverter.php b/src/lib/Persistence/Legacy/URL/Query/CriteriaConverter.php index 21e7002ac7..981e042f2f 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriteriaConverter.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriteriaConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\URL\Query; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler.php index dc8920b58c..7ac19679ed 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\URL\Query; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAnd.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAnd.php index 3367ea0168..617caba36a 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAnd.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAnd.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\URL\Query\CriterionHandler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNot.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNot.php index 35d8c9208e..7c96a36278 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNot.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNot.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\URL\Query\CriterionHandler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOr.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOr.php index 07642ebb14..fea8b4ccf3 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOr.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOr.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\URL\Query\CriterionHandler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAll.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAll.php index f0374904c7..e67cf64ee8 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAll.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAll.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\URL\Query\CriterionHandler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNone.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNone.php index 7d4efc15e8..b12b32d4b1 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNone.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNone.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\URL\Query\CriterionHandler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Pattern.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Pattern.php index 201cc5165b..672baea7e3 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Pattern.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Pattern.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\URL\Query\CriterionHandler; use Doctrine\DBAL\ParameterType; diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Validity.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Validity.php index fafa42df36..5854c45471 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Validity.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Validity.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\URL\Query\CriterionHandler; use Doctrine\DBAL\ParameterType; diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnly.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnly.php index 8564418beb..d471911b6a 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnly.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnly.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\URL\Query\CriterionHandler; use Doctrine\DBAL\ParameterType; diff --git a/src/lib/Persistence/Legacy/User/Handler.php b/src/lib/Persistence/Legacy/User/Handler.php index c476a49e35..c3a5294b04 100644 --- a/src/lib/Persistence/Legacy/User/Handler.php +++ b/src/lib/Persistence/Legacy/User/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\User; use Ibexa\Contracts\Core\Persistence\User; diff --git a/src/lib/Persistence/Legacy/User/Mapper.php b/src/lib/Persistence/Legacy/User/Mapper.php index df7abea750..aff71f3dd9 100644 --- a/src/lib/Persistence/Legacy/User/Mapper.php +++ b/src/lib/Persistence/Legacy/User/Mapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\User; use Ibexa\Contracts\Core\Persistence\User; diff --git a/src/lib/Persistence/Legacy/User/Role/LimitationConverter.php b/src/lib/Persistence/Legacy/User/Role/LimitationConverter.php index ca59e3c758..0e906200b5 100644 --- a/src/lib/Persistence/Legacy/User/Role/LimitationConverter.php +++ b/src/lib/Persistence/Legacy/User/Role/LimitationConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\User\Role; use Ibexa\Contracts\Core\Persistence\User\Policy; diff --git a/src/lib/Persistence/Legacy/User/Role/LimitationHandler.php b/src/lib/Persistence/Legacy/User/Role/LimitationHandler.php index 89281cea7e..94273b722e 100644 --- a/src/lib/Persistence/Legacy/User/Role/LimitationHandler.php +++ b/src/lib/Persistence/Legacy/User/Role/LimitationHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\User\Role; use Doctrine\DBAL\Connection; diff --git a/src/lib/Persistence/Legacy/User/Role/LimitationHandler/ObjectStateHandler.php b/src/lib/Persistence/Legacy/User/Role/LimitationHandler/ObjectStateHandler.php index 4518c477ec..6ca4ac046d 100644 --- a/src/lib/Persistence/Legacy/User/Role/LimitationHandler/ObjectStateHandler.php +++ b/src/lib/Persistence/Legacy/User/Role/LimitationHandler/ObjectStateHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\Legacy\User\Role\LimitationHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Persistence/TransformationProcessor.php b/src/lib/Persistence/TransformationProcessor.php index 025e321403..de21cd6c82 100644 --- a/src/lib/Persistence/TransformationProcessor.php +++ b/src/lib/Persistence/TransformationProcessor.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence; use Ibexa\Core\Persistence\TransformationProcessor\PcreCompiler; diff --git a/src/lib/Persistence/TransformationProcessor/DefinitionBased.php b/src/lib/Persistence/TransformationProcessor/DefinitionBased.php index 60be031dd7..9343f3da59 100644 --- a/src/lib/Persistence/TransformationProcessor/DefinitionBased.php +++ b/src/lib/Persistence/TransformationProcessor/DefinitionBased.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\TransformationProcessor; use Ibexa\Core\Persistence\TransformationProcessor; diff --git a/src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php b/src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php index 4e2a31de38..cb4993a49b 100644 --- a/src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php +++ b/src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\TransformationProcessor\DefinitionBased; use Ibexa\Core\Persistence\TransformationProcessor; diff --git a/src/lib/Persistence/TransformationProcessor/PcreCompiler.php b/src/lib/Persistence/TransformationProcessor/PcreCompiler.php index fc96e7de11..c87c420c2a 100644 --- a/src/lib/Persistence/TransformationProcessor/PcreCompiler.php +++ b/src/lib/Persistence/TransformationProcessor/PcreCompiler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\TransformationProcessor; use Ibexa\Core\Persistence\TransformationProcessor; diff --git a/src/lib/Persistence/TransformationProcessor/PreprocessedBased.php b/src/lib/Persistence/TransformationProcessor/PreprocessedBased.php index 2af518212d..75cc29bbc7 100644 --- a/src/lib/Persistence/TransformationProcessor/PreprocessedBased.php +++ b/src/lib/Persistence/TransformationProcessor/PreprocessedBased.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence\TransformationProcessor; use Ibexa\Core\Persistence\TransformationProcessor; diff --git a/src/lib/Persistence/Utf8Converter.php b/src/lib/Persistence/Utf8Converter.php index f5220226cc..9e53609a9a 100644 --- a/src/lib/Persistence/Utf8Converter.php +++ b/src/lib/Persistence/Utf8Converter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Persistence; use RuntimeException; diff --git a/src/lib/Query/QueryFactoryInterface.php b/src/lib/Query/QueryFactoryInterface.php index 4149075b8e..4d9cc08d1d 100644 --- a/src/lib/Query/QueryFactoryInterface.php +++ b/src/lib/Query/QueryFactoryInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Query; use Ibexa\Contracts\Core\Repository\Values\Content\Query; diff --git a/src/lib/QueryType/ArrayQueryTypeRegistry.php b/src/lib/QueryType/ArrayQueryTypeRegistry.php index 58593a6cd4..147e942bff 100644 --- a/src/lib/QueryType/ArrayQueryTypeRegistry.php +++ b/src/lib/QueryType/ArrayQueryTypeRegistry.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\QueryType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; diff --git a/src/lib/QueryType/ContentViewQueryTypeMapper.php b/src/lib/QueryType/ContentViewQueryTypeMapper.php index 8e3e5ea460..db3d3d907f 100644 --- a/src/lib/QueryType/ContentViewQueryTypeMapper.php +++ b/src/lib/QueryType/ContentViewQueryTypeMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\QueryType; use Ibexa\Core\MVC\Symfony\View\ContentView; diff --git a/src/lib/QueryType/OptionsResolverBasedQueryType.php b/src/lib/QueryType/OptionsResolverBasedQueryType.php index d6d8d1266f..26abc7b494 100644 --- a/src/lib/QueryType/OptionsResolverBasedQueryType.php +++ b/src/lib/QueryType/OptionsResolverBasedQueryType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\QueryType; use Ibexa\Contracts\Core\Repository\Values\Content\Query; diff --git a/src/lib/QueryType/QueryParameterContentViewQueryTypeMapper.php b/src/lib/QueryType/QueryParameterContentViewQueryTypeMapper.php index e629ddf755..f52f05442c 100644 --- a/src/lib/QueryType/QueryParameterContentViewQueryTypeMapper.php +++ b/src/lib/QueryType/QueryParameterContentViewQueryTypeMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\QueryType; use Ibexa\Core\MVC\Symfony\View\ContentView; diff --git a/src/lib/QueryType/QueryType.php b/src/lib/QueryType/QueryType.php index 4f30d22ff6..c94ed9c9a0 100644 --- a/src/lib/QueryType/QueryType.php +++ b/src/lib/QueryType/QueryType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\QueryType; /** diff --git a/src/lib/QueryType/QueryTypeRegistry.php b/src/lib/QueryType/QueryTypeRegistry.php index 74c96dfe7b..5748c8b268 100644 --- a/src/lib/QueryType/QueryTypeRegistry.php +++ b/src/lib/QueryType/QueryTypeRegistry.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\QueryType; /** diff --git a/src/lib/Repository/Helper/NameSchemaService.php b/src/lib/Repository/Helper/NameSchemaService.php index 111edb167c..25e2ae564b 100644 --- a/src/lib/Repository/Helper/NameSchemaService.php +++ b/src/lib/Repository/Helper/NameSchemaService.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\Helper; use Ibexa\Contracts\Core\Persistence\Content\Type as SPIContentType; diff --git a/src/lib/Repository/Helper/RelationProcessor.php b/src/lib/Repository/Helper/RelationProcessor.php index bcb4914ec7..761e75179f 100644 --- a/src/lib/Repository/Helper/RelationProcessor.php +++ b/src/lib/Repository/Helper/RelationProcessor.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\Helper; use Ibexa\Contracts\Core\FieldType\FieldType as SPIFieldType; diff --git a/src/lib/Repository/Helper/RoleDomainMapper.php b/src/lib/Repository/Helper/RoleDomainMapper.php index abec45016a..1789f5fd9b 100644 --- a/src/lib/Repository/Helper/RoleDomainMapper.php +++ b/src/lib/Repository/Helper/RoleDomainMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\Helper; use Ibexa\Core\Repository\Mapper\RoleDomainMapper as BaseRoleDomainMapper; diff --git a/src/lib/Repository/LanguageService.php b/src/lib/Repository/LanguageService.php index 8e47d8ab2b..6ca9970a11 100644 --- a/src/lib/Repository/LanguageService.php +++ b/src/lib/Repository/LanguageService.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository; use Exception; diff --git a/src/lib/Repository/Mapper/ContentDomainMapper.php b/src/lib/Repository/Mapper/ContentDomainMapper.php index d2c2024d15..bf881fbde7 100644 --- a/src/lib/Repository/Mapper/ContentDomainMapper.php +++ b/src/lib/Repository/Mapper/ContentDomainMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\Mapper; use DateTime; diff --git a/src/lib/Repository/Mapper/RoleDomainMapper.php b/src/lib/Repository/Mapper/RoleDomainMapper.php index 3f5f6ecd0c..6e0db859e2 100644 --- a/src/lib/Repository/Mapper/RoleDomainMapper.php +++ b/src/lib/Repository/Mapper/RoleDomainMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\Mapper; use Ibexa\Contracts\Core\Persistence\User\Policy as SPIPolicy; diff --git a/src/lib/Repository/NameSchema/NameSchemaService.php b/src/lib/Repository/NameSchema/NameSchemaService.php index 782a154191..049a52edfa 100644 --- a/src/lib/Repository/NameSchema/NameSchemaService.php +++ b/src/lib/Repository/NameSchema/NameSchemaService.php @@ -54,7 +54,7 @@ class NameSchemaService implements NameSchemaServiceInterface protected FieldTypeRegistry $fieldTypeRegistry; /** - * @param array{limit?: integer, sequence?: string} $settings + * @param array{limit?: int, sequence?: string} $settings */ protected array $settings; @@ -63,7 +63,7 @@ class NameSchemaService implements NameSchemaServiceInterface private SchemaIdentifierExtractorInterface $schemaIdentifierExtractor; /** - * @param array{limit?: integer, sequence?: string} $settings + * @param array{limit?: int, sequence?: string} $settings */ public function __construct( FieldTypeRegistry $fieldTypeRegistry, diff --git a/src/lib/Repository/ObjectStateService.php b/src/lib/Repository/ObjectStateService.php index e654a1621c..50d66b14bb 100644 --- a/src/lib/Repository/ObjectStateService.php +++ b/src/lib/Repository/ObjectStateService.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository; use Exception; diff --git a/src/lib/Repository/PermissionsCriterionHandler.php b/src/lib/Repository/PermissionsCriterionHandler.php index 09278d4841..a9edb9d220 100644 --- a/src/lib/Repository/PermissionsCriterionHandler.php +++ b/src/lib/Repository/PermissionsCriterionHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; diff --git a/src/lib/Repository/ProxyFactory/ProxyDomainMapperFactoryInterface.php b/src/lib/Repository/ProxyFactory/ProxyDomainMapperFactoryInterface.php index 8c7dce26be..bf07dc66f9 100644 --- a/src/lib/Repository/ProxyFactory/ProxyDomainMapperFactoryInterface.php +++ b/src/lib/Repository/ProxyFactory/ProxyDomainMapperFactoryInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\ProxyFactory; use Ibexa\Contracts\Core\Repository\Repository; diff --git a/src/lib/Repository/Repository.php b/src/lib/Repository/Repository.php index d97c929160..aa9dae0b55 100644 --- a/src/lib/Repository/Repository.php +++ b/src/lib/Repository/Repository.php @@ -725,6 +725,7 @@ public function getPermissionResolver(): PermissionResolverInterface /** * @internal + * * @private */ public function getNameSchemaService(): NameSchemaServiceInterface diff --git a/src/lib/Repository/RoleService.php b/src/lib/Repository/RoleService.php index b57f1fda30..d6b7cc4373 100644 --- a/src/lib/Repository/RoleService.php +++ b/src/lib/Repository/RoleService.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository; use Exception; diff --git a/src/lib/Repository/SiteAccessAware/ContentTypeService.php b/src/lib/Repository/SiteAccessAware/ContentTypeService.php index 939c03f652..e13caad382 100644 --- a/src/lib/Repository/SiteAccessAware/ContentTypeService.php +++ b/src/lib/Repository/SiteAccessAware/ContentTypeService.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\SiteAccessAware; use Ibexa\Contracts\Core\Repository\ContentTypeService as ContentTypeServiceInterface; diff --git a/src/lib/Repository/SiteAccessAware/Language/LanguageResolver.php b/src/lib/Repository/SiteAccessAware/Language/LanguageResolver.php index da05360ee8..d7209632f1 100644 --- a/src/lib/Repository/SiteAccessAware/Language/LanguageResolver.php +++ b/src/lib/Repository/SiteAccessAware/Language/LanguageResolver.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\SiteAccessAware\Language; /** diff --git a/src/lib/Repository/SiteAccessAware/LanguageService.php b/src/lib/Repository/SiteAccessAware/LanguageService.php index 1c43282c3a..430479c1d0 100644 --- a/src/lib/Repository/SiteAccessAware/LanguageService.php +++ b/src/lib/Repository/SiteAccessAware/LanguageService.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\SiteAccessAware; use Ibexa\Contracts\Core\Repository\LanguageService as LanguageServiceInterface; diff --git a/src/lib/Repository/SiteAccessAware/ObjectStateService.php b/src/lib/Repository/SiteAccessAware/ObjectStateService.php index 86c587777b..710692d4bd 100644 --- a/src/lib/Repository/SiteAccessAware/ObjectStateService.php +++ b/src/lib/Repository/SiteAccessAware/ObjectStateService.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\SiteAccessAware; use Ibexa\Contracts\Core\Repository\LanguageResolver; diff --git a/src/lib/Repository/Values/Content/Query/Criterion/PermissionSubtree.php b/src/lib/Repository/Values/Content/Query/Criterion/PermissionSubtree.php index 4f0495f93f..cb8108fb55 100644 --- a/src/lib/Repository/Values/Content/Query/Criterion/PermissionSubtree.php +++ b/src/lib/Repository/Values/Content/Query/Criterion/PermissionSubtree.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Subtree as APISubtreeCriterion; diff --git a/src/lib/Repository/Values/Content/VersionInfo.php b/src/lib/Repository/Values/Content/VersionInfo.php index 891fb19137..0cf535d6d0 100644 --- a/src/lib/Repository/Values/Content/VersionInfo.php +++ b/src/lib/Repository/Values/Content/VersionInfo.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\Values\Content; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; diff --git a/src/lib/Repository/Values/ContentType/ContentType.php b/src/lib/Repository/Values/ContentType/ContentType.php index d20ce31e2a..e4dfca7a65 100644 --- a/src/lib/Repository/Values/ContentType/ContentType.php +++ b/src/lib/Repository/Values/ContentType/ContentType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\Values\ContentType; use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType as APIContentType; diff --git a/src/lib/Repository/Values/ContentType/ContentTypeCreateStruct.php b/src/lib/Repository/Values/ContentType/ContentTypeCreateStruct.php index c9d5c10188..0bff232008 100644 --- a/src/lib/Repository/Values/ContentType/ContentTypeCreateStruct.php +++ b/src/lib/Repository/Values/ContentType/ContentTypeCreateStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\Values\ContentType; use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeCreateStruct as APIContentTypeCreateStruct; diff --git a/src/lib/Repository/Values/ContentType/ContentTypeDraft.php b/src/lib/Repository/Values/ContentType/ContentTypeDraft.php index b202f815e3..e59bdd8b9c 100644 --- a/src/lib/Repository/Values/ContentType/ContentTypeDraft.php +++ b/src/lib/Repository/Values/ContentType/ContentTypeDraft.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\Values\ContentType; use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft as APIContentTypeDraft; diff --git a/src/lib/Repository/Values/ContentType/ContentTypeGroup.php b/src/lib/Repository/Values/ContentType/ContentTypeGroup.php index b6c39bee0d..d35cb0c18e 100644 --- a/src/lib/Repository/Values/ContentType/ContentTypeGroup.php +++ b/src/lib/Repository/Values/ContentType/ContentTypeGroup.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\Values\ContentType; use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroup as APIContentTypeGroup; diff --git a/src/lib/Repository/Values/MultiLanguageDescriptionTrait.php b/src/lib/Repository/Values/MultiLanguageDescriptionTrait.php index ec3756504c..d311382304 100644 --- a/src/lib/Repository/Values/MultiLanguageDescriptionTrait.php +++ b/src/lib/Repository/Values/MultiLanguageDescriptionTrait.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\Values; /** diff --git a/src/lib/Repository/Values/MultiLanguageNameTrait.php b/src/lib/Repository/Values/MultiLanguageNameTrait.php index 159c05c54f..c9f83abd89 100644 --- a/src/lib/Repository/Values/MultiLanguageNameTrait.php +++ b/src/lib/Repository/Values/MultiLanguageNameTrait.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\Values; /** diff --git a/src/lib/Repository/Values/MultiLanguageTrait.php b/src/lib/Repository/Values/MultiLanguageTrait.php index 8643055ab6..0cbe5990d1 100644 --- a/src/lib/Repository/Values/MultiLanguageTrait.php +++ b/src/lib/Repository/Values/MultiLanguageTrait.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\Values; /** diff --git a/src/lib/Repository/Values/ObjectState/ObjectStateGroup.php b/src/lib/Repository/Values/ObjectState/ObjectStateGroup.php index 411490eb79..1c5c28451d 100644 --- a/src/lib/Repository/Values/ObjectState/ObjectStateGroup.php +++ b/src/lib/Repository/Values/ObjectState/ObjectStateGroup.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\Values\ObjectState; use Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroup as APIObjectStateGroup; diff --git a/src/lib/Repository/Values/User/PolicyUpdateStruct.php b/src/lib/Repository/Values/User/PolicyUpdateStruct.php index 93e5011c0b..45d50b85dd 100644 --- a/src/lib/Repository/Values/User/PolicyUpdateStruct.php +++ b/src/lib/Repository/Values/User/PolicyUpdateStruct.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\Values\User; use Ibexa\Contracts\Core\Repository\Values\User\Limitation; diff --git a/src/lib/Repository/Values/User/Role.php b/src/lib/Repository/Values/User/Role.php index fc1eae0e36..4f56f7fbfb 100644 --- a/src/lib/Repository/Values/User/Role.php +++ b/src/lib/Repository/Values/User/Role.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Repository\Values\User; use Ibexa\Contracts\Core\Repository\Values\User\Role as APIRole; diff --git a/src/lib/Search/Common/BackgroundIndexer.php b/src/lib/Search/Common/BackgroundIndexer.php index 0fb7eb39a3..9f6b6c37c7 100644 --- a/src/lib/Search/Common/BackgroundIndexer.php +++ b/src/lib/Search/Common/BackgroundIndexer.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common; use Ibexa\Contracts\Core\Persistence\Content\ContentInfo; diff --git a/src/lib/Search/Common/BackgroundIndexer/NullIndexer.php b/src/lib/Search/Common/BackgroundIndexer/NullIndexer.php index 87c4986740..00dad284f4 100644 --- a/src/lib/Search/Common/BackgroundIndexer/NullIndexer.php +++ b/src/lib/Search/Common/BackgroundIndexer/NullIndexer.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\BackgroundIndexer; use Ibexa\Contracts\Core\Persistence\Content\ContentInfo; diff --git a/src/lib/Search/Common/EventSubscriber/AbstractSearchEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/AbstractSearchEventSubscriber.php index 71d05750f3..deeabedd6f 100644 --- a/src/lib/Search/Common/EventSubscriber/AbstractSearchEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/AbstractSearchEventSubscriber.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\EventSubscriber; use Ibexa\Contracts\Core\Persistence\Handler as PersistenceHandler; diff --git a/src/lib/Search/Common/EventSubscriber/ContentEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/ContentEventSubscriber.php index 5aa0adf2f5..032179b589 100644 --- a/src/lib/Search/Common/EventSubscriber/ContentEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/ContentEventSubscriber.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\EventSubscriber; use Ibexa\Contracts\Core\Repository\Events\Content\CopyContentEvent; diff --git a/src/lib/Search/Common/EventSubscriber/LocationEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/LocationEventSubscriber.php index 8970e9a930..62fabd52c8 100644 --- a/src/lib/Search/Common/EventSubscriber/LocationEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/LocationEventSubscriber.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\EventSubscriber; use Ibexa\Contracts\Core\Repository\Events\Location\CopySubtreeEvent; diff --git a/src/lib/Search/Common/EventSubscriber/ObjectStateEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/ObjectStateEventSubscriber.php index d8ebb44443..46b6e5b593 100644 --- a/src/lib/Search/Common/EventSubscriber/ObjectStateEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/ObjectStateEventSubscriber.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\EventSubscriber; use Ibexa\Contracts\Core\Repository\Events\ObjectState\SetContentStateEvent; diff --git a/src/lib/Search/Common/EventSubscriber/SectionEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/SectionEventSubscriber.php index 700bd9c25e..67b2800dc5 100644 --- a/src/lib/Search/Common/EventSubscriber/SectionEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/SectionEventSubscriber.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\EventSubscriber; use Ibexa\Contracts\Core\Repository\Events\Section\AssignSectionEvent; diff --git a/src/lib/Search/Common/EventSubscriber/TrashEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/TrashEventSubscriber.php index 0d9da88fab..ef2b64a9f1 100644 --- a/src/lib/Search/Common/EventSubscriber/TrashEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/TrashEventSubscriber.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\EventSubscriber; use Ibexa\Contracts\Core\Repository\Events\Trash\DeleteTrashItemEvent; diff --git a/src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php index 979e0313ae..959da4c0b9 100644 --- a/src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\EventSubscriber; use Ibexa\Contracts\Core\Repository\Event\AfterEvent; diff --git a/src/lib/Search/Common/FieldNameGenerator.php b/src/lib/Search/Common/FieldNameGenerator.php index 48b2bed3c7..45e7010450 100644 --- a/src/lib/Search/Common/FieldNameGenerator.php +++ b/src/lib/Search/Common/FieldNameGenerator.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common; use Ibexa\Contracts\Core\Search\FieldType; diff --git a/src/lib/Search/Common/FieldNameResolver.php b/src/lib/Search/Common/FieldNameResolver.php index 1bce132395..b4476d74d8 100644 --- a/src/lib/Search/Common/FieldNameResolver.php +++ b/src/lib/Search/Common/FieldNameResolver.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common; use Ibexa\Contracts\Core\Persistence\Content\Type\Handler as ContentTypeHandler; diff --git a/src/lib/Search/Common/FieldRegistry.php b/src/lib/Search/Common/FieldRegistry.php index 89d928544e..45e8c412b7 100644 --- a/src/lib/Search/Common/FieldRegistry.php +++ b/src/lib/Search/Common/FieldRegistry.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common; use Ibexa\Contracts\Core\FieldType\Indexable; diff --git a/src/lib/Search/Common/FieldValueMapper.php b/src/lib/Search/Common/FieldValueMapper.php index 5c9e2ab7b3..a01dfa75c6 100644 --- a/src/lib/Search/Common/FieldValueMapper.php +++ b/src/lib/Search/Common/FieldValueMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common; use Ibexa\Contracts\Core\Search\Field; diff --git a/src/lib/Search/Common/FieldValueMapper/Aggregate.php b/src/lib/Search/Common/FieldValueMapper/Aggregate.php index 6b9d0c090a..9540d6fc49 100644 --- a/src/lib/Search/Common/FieldValueMapper/Aggregate.php +++ b/src/lib/Search/Common/FieldValueMapper/Aggregate.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\FieldValueMapper; use Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException; diff --git a/src/lib/Search/Common/FieldValueMapper/BooleanMapper.php b/src/lib/Search/Common/FieldValueMapper/BooleanMapper.php index fe725e9d14..839d75c8ae 100644 --- a/src/lib/Search/Common/FieldValueMapper/BooleanMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/BooleanMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\FieldValueMapper; use Ibexa\Contracts\Core\Search\Field; diff --git a/src/lib/Search/Common/FieldValueMapper/DateMapper.php b/src/lib/Search/Common/FieldValueMapper/DateMapper.php index 74bd043621..6e81625b11 100644 --- a/src/lib/Search/Common/FieldValueMapper/DateMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/DateMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\FieldValueMapper; use DateTime; diff --git a/src/lib/Search/Common/FieldValueMapper/DocumentMapper.php b/src/lib/Search/Common/FieldValueMapper/DocumentMapper.php index 639b041502..c8e926d161 100644 --- a/src/lib/Search/Common/FieldValueMapper/DocumentMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/DocumentMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\FieldValueMapper; use Ibexa\Contracts\Core\Search\Field; diff --git a/src/lib/Search/Common/FieldValueMapper/FloatMapper.php b/src/lib/Search/Common/FieldValueMapper/FloatMapper.php index 4ca7584844..58ca654251 100644 --- a/src/lib/Search/Common/FieldValueMapper/FloatMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/FloatMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\FieldValueMapper; use Ibexa\Contracts\Core\Search\Field; diff --git a/src/lib/Search/Common/FieldValueMapper/GeoLocationMapper.php b/src/lib/Search/Common/FieldValueMapper/GeoLocationMapper.php index 83f33ea4dc..53dddb41cd 100644 --- a/src/lib/Search/Common/FieldValueMapper/GeoLocationMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/GeoLocationMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\FieldValueMapper; use Ibexa\Contracts\Core\Search\Field; diff --git a/src/lib/Search/Common/FieldValueMapper/IdentifierMapper.php b/src/lib/Search/Common/FieldValueMapper/IdentifierMapper.php index c15c45a62f..7ed08164ba 100644 --- a/src/lib/Search/Common/FieldValueMapper/IdentifierMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/IdentifierMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\FieldValueMapper; use Ibexa\Contracts\Core\Search\Field; diff --git a/src/lib/Search/Common/FieldValueMapper/IntegerMapper.php b/src/lib/Search/Common/FieldValueMapper/IntegerMapper.php index cb97133213..aeea5893fb 100644 --- a/src/lib/Search/Common/FieldValueMapper/IntegerMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/IntegerMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\FieldValueMapper; use Ibexa\Contracts\Core\Search\Field; diff --git a/src/lib/Search/Common/FieldValueMapper/MultipleBooleanMapper.php b/src/lib/Search/Common/FieldValueMapper/MultipleBooleanMapper.php index 7f6c451ce3..1cc9a75821 100644 --- a/src/lib/Search/Common/FieldValueMapper/MultipleBooleanMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/MultipleBooleanMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\FieldValueMapper; use Ibexa\Contracts\Core\Search\Field; diff --git a/src/lib/Search/Common/FieldValueMapper/MultipleIdentifierMapper.php b/src/lib/Search/Common/FieldValueMapper/MultipleIdentifierMapper.php index c48b32b24c..6dcced5e5c 100644 --- a/src/lib/Search/Common/FieldValueMapper/MultipleIdentifierMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/MultipleIdentifierMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\FieldValueMapper; use Ibexa\Contracts\Core\Search\Field; diff --git a/src/lib/Search/Common/FieldValueMapper/MultipleIntegerMapper.php b/src/lib/Search/Common/FieldValueMapper/MultipleIntegerMapper.php index c45d80ecb7..6952f5649a 100644 --- a/src/lib/Search/Common/FieldValueMapper/MultipleIntegerMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/MultipleIntegerMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\FieldValueMapper; use Ibexa\Contracts\Core\Search\Field; diff --git a/src/lib/Search/Common/FieldValueMapper/MultipleRemoteIdentifierMapper.php b/src/lib/Search/Common/FieldValueMapper/MultipleRemoteIdentifierMapper.php index 287f332a59..972410350b 100644 --- a/src/lib/Search/Common/FieldValueMapper/MultipleRemoteIdentifierMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/MultipleRemoteIdentifierMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\FieldValueMapper; use Ibexa\Contracts\Core\Search\Field; diff --git a/src/lib/Search/Common/FieldValueMapper/MultipleStringMapper.php b/src/lib/Search/Common/FieldValueMapper/MultipleStringMapper.php index 30f5b35e03..6046f1dc03 100644 --- a/src/lib/Search/Common/FieldValueMapper/MultipleStringMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/MultipleStringMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\FieldValueMapper; use Ibexa\Contracts\Core\Search\Field; diff --git a/src/lib/Search/Common/FieldValueMapper/PriceMapper.php b/src/lib/Search/Common/FieldValueMapper/PriceMapper.php index 7c5b803831..8052801b0b 100644 --- a/src/lib/Search/Common/FieldValueMapper/PriceMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/PriceMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\FieldValueMapper; use Ibexa\Contracts\Core\Search\Field; diff --git a/src/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapper.php b/src/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapper.php index e1d7c9aecd..0e05d61e68 100644 --- a/src/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\FieldValueMapper; use Ibexa\Contracts\Core\Search\Field; diff --git a/src/lib/Search/Common/FieldValueMapper/StringMapper.php b/src/lib/Search/Common/FieldValueMapper/StringMapper.php index 1050b068ed..f410ce4b20 100644 --- a/src/lib/Search/Common/FieldValueMapper/StringMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/StringMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common\FieldValueMapper; use Ibexa\Contracts\Core\Search\Field; diff --git a/src/lib/Search/Common/IncrementalIndexer.php b/src/lib/Search/Common/IncrementalIndexer.php index 86b278141a..3ade0a214e 100644 --- a/src/lib/Search/Common/IncrementalIndexer.php +++ b/src/lib/Search/Common/IncrementalIndexer.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common; use Doctrine\DBAL\FetchMode; diff --git a/src/lib/Search/Common/Indexer.php b/src/lib/Search/Common/Indexer.php index e13db89017..a70b0a0969 100644 --- a/src/lib/Search/Common/Indexer.php +++ b/src/lib/Search/Common/Indexer.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Common; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriteriaConverter.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriteriaConverter.php index dd474e2fb9..1918480c7d 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriteriaConverter.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriteriaConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php index 832a977cd3..3896e85e1b 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentId.php index 6698700ae9..a3c4cbebc0 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentId.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeGroupId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeGroupId.php index b844dd6ce8..3c1ffa3c59 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeGroupId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeGroupId.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeId.php index c705ad2539..cc88af30e6 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeId.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php index c1c9504f42..b7816db167 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/DateMetadata.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/DateMetadata.php index ca5c2e128f..101ace0fb4 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/DateMetadata.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/DateMetadata.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php index 4ed7cb1cca..47ee09368c 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php index 67cc3f2c67..7fb4a4e34a 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php index 2f1d13def5..339518b23b 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Converter.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Converter.php index 4f3b9aa426..77fc2badad 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Converter.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Converter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php index d061587f5e..b846e0407a 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php index e391e08a1e..182c93316a 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Handler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Composite.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Composite.php index 22c8b1d01b..0d7b021b57 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Composite.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Composite.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Handler; use Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Handler; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Keyword.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Keyword.php index 700aaf1156..5b60c90b1d 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Keyword.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Keyword.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Handler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Simple.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Simple.php index 29a550f99e..c5df88347e 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Simple.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Simple.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Handler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/HandlerRegistry.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/HandlerRegistry.php index 355eee7969..fccf853101 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/HandlerRegistry.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/HandlerRegistry.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue; use OutOfBoundsException; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php index 2b17830ac3..965a52a7b3 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php index 52d734ed49..856223af58 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php index bb751a7fff..9a95601752 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalNot.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalNot.php index 3ee7879967..ee2bc9f817 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalNot.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalNot.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php index 8d4ee794b7..af85ededbb 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php index 16dc37890a..4ad49df2e7 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchAll.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchAll.php index 0c38f0ed7e..440f60c6fa 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchAll.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchAll.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchNone.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchNone.php index a6f3b23853..ab3df627e9 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchNone.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchNone.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateId.php index b1b4f97458..180a35067d 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateId.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/RemoteId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/RemoteId.php index c0293e280f..eed4fd3ba9 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/RemoteId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/RemoteId.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionId.php index 462d4096ef..495ce4cd06 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionId.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserMetadata.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserMetadata.php index 4da42b0668..555f30d89f 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserMetadata.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserMetadata.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseConverter.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseConverter.php index 01450d0537..fb59f50477 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseConverter.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php index b5a168bc95..6d15fc3cd6 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/AbstractRandom.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/AbstractRandom.php index 66cd7994d6..96bcaf0bbf 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/AbstractRandom.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/AbstractRandom.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentId.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentId.php index 12dbacdf12..908dbffe73 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentId.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentName.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentName.php index 177bb8101e..f50114404e 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentName.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentName.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DateModified.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DateModified.php index 7e02069cf1..d9b97653ac 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DateModified.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DateModified.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DatePublished.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DatePublished.php index 7779e01e46..0c5b0b53ba 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DatePublished.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DatePublished.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php index 8e231d518c..f7146b5ed1 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php index 79c0888b38..908d9ec7c7 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler; use Doctrine\DBAL\ParameterType; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionIdentifier.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionIdentifier.php index ab8f302158..f29d541728 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionIdentifier.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionIdentifier.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php index bb181ae479..8011c3de60 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/FullTextData.php b/src/lib/Search/Legacy/Content/FullTextData.php index 4edffb6c47..e33b2e326a 100644 --- a/src/lib/Search/Legacy/Content/FullTextData.php +++ b/src/lib/Search/Legacy/Content/FullTextData.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content; use Ibexa\Contracts\Core\Repository\Values\ValueObject; diff --git a/src/lib/Search/Legacy/Content/FullTextValue.php b/src/lib/Search/Legacy/Content/FullTextValue.php index eba5b4cfa2..fe67650847 100644 --- a/src/lib/Search/Legacy/Content/FullTextValue.php +++ b/src/lib/Search/Legacy/Content/FullTextValue.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content; use Ibexa\Contracts\Core\Repository\Values\ValueObject; diff --git a/src/lib/Search/Legacy/Content/Gateway.php b/src/lib/Search/Legacy/Content/Gateway.php index a989baf18d..6deae61d2f 100644 --- a/src/lib/Search/Legacy/Content/Gateway.php +++ b/src/lib/Search/Legacy/Content/Gateway.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php index 00d546d883..d40e537ebb 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Gateway\CriterionHandler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationId.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationId.php index 1e317dc3c4..3ac44137dd 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationId.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationId.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationRemoteId.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationRemoteId.php index 2744257e40..fec44b5d36 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationRemoteId.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationRemoteId.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/ParentLocationId.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/ParentLocationId.php index 96eefe9578..cbc4c6e5ec 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/ParentLocationId.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/ParentLocationId.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php index 61831618e8..9049d943c1 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Gateway\CriterionHandler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php index 618dd096f9..011c4abfd0 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Gateway\CriterionHandler; use Doctrine\DBAL\ParameterType; diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php index cebcca8901..2bf4ba1694 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Gateway\CriterionHandler; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php b/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php index 1fb0688ca2..fcb230659a 100644 --- a/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php +++ b/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Gateway; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php b/src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php index d60dceb681..909cf60949 100644 --- a/src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php +++ b/src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Gateway; use Doctrine\DBAL\DBALException; diff --git a/src/lib/Search/Legacy/Content/Handler.php b/src/lib/Search/Legacy/Content/Handler.php index e00265b39b..a6c106aba3 100644 --- a/src/lib/Search/Legacy/Content/Handler.php +++ b/src/lib/Search/Legacy/Content/Handler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content; use Ibexa\Contracts\Core\Persistence\Content; diff --git a/src/lib/Search/Legacy/Content/Indexer.php b/src/lib/Search/Legacy/Content/Indexer.php index 63f3bcbc97..82bcabdb67 100644 --- a/src/lib/Search/Legacy/Content/Indexer.php +++ b/src/lib/Search/Legacy/Content/Indexer.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway.php b/src/lib/Search/Legacy/Content/Location/Gateway.php index c693eb89d0..1ebf2700d5 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Location; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php index 8ba0e4613d..e135fa8deb 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php index 4f7f5b6163..f792119cff 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler\Location; use Doctrine\DBAL\ParameterType; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsMainLocation.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsMainLocation.php index 817a712a4e..1425e78aef 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsMainLocation.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsMainLocation.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler\Location; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php index 649b7e2f76..6777a9351c 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler\Location; use Doctrine\DBAL\ParameterType; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationId.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationId.php index 71dc3883ba..d2fa983c9e 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationId.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationId.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationRemoteId.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationRemoteId.php index ac1c77558a..b777f1a4e6 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationRemoteId.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationRemoteId.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/ParentLocationId.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/ParentLocationId.php index cd30b576d4..dda6dac23f 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/ParentLocationId.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/ParentLocationId.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php index 64fb35fb5f..c8f3199348 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler; use Doctrine\DBAL\ParameterType; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Visibility.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Visibility.php index 45fd8742a0..8af91230ea 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Visibility.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Visibility.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler; use Doctrine\DBAL\ParameterType; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php b/src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php index 553aeae3ad..19bc27e67f 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php b/src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php index 9af3219ee2..58349ab052 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway; use Doctrine\DBAL\DBALException; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Depth.php b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Depth.php index 180ef47c0e..0ef5767581 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Depth.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Depth.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\SortClauseHandler\Location; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Id.php b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Id.php index fa0384da07..62180704b0 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Id.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Id.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\SortClauseHandler\Location; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/IsMainLocation.php b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/IsMainLocation.php index c56cbf6ccf..402f0a1044 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/IsMainLocation.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/IsMainLocation.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\SortClauseHandler\Location; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Path.php b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Path.php index 0bcbfaa06c..c8e2d4c454 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Path.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Path.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\SortClauseHandler\Location; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Priority.php b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Priority.php index 84b9ddeb95..1c4e1bd462 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Priority.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Priority.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\SortClauseHandler\Location; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Visibility.php b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Visibility.php index 778b15d39e..d555c6f65b 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Visibility.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Visibility.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\SortClauseHandler\Location; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php b/src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php index 25b60009b2..3aad26be50 100644 --- a/src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php +++ b/src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\Mapper; use Ibexa\Contracts\Core\Persistence\Content; diff --git a/src/lib/Search/Legacy/Content/WordIndexer/Gateway.php b/src/lib/Search/Legacy/Content/WordIndexer/Gateway.php index 2bac94a015..d5debee115 100644 --- a/src/lib/Search/Legacy/Content/WordIndexer/Gateway.php +++ b/src/lib/Search/Legacy/Content/WordIndexer/Gateway.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\WordIndexer; use Ibexa\Contracts\Core\Persistence\Content; diff --git a/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php b/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php index 0ae44a2456..7c84160c9d 100644 --- a/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php +++ b/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\WordIndexer\Gateway; use Doctrine\DBAL\Connection; diff --git a/src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php b/src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php index 7b3092af9a..2e02d5fa2b 100644 --- a/src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php +++ b/src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Core\Search\Legacy\Content\WordIndexer\Repository; use Doctrine\DBAL\Connection; diff --git a/tests/bundle/Core/ApiLoader/CacheFactoryTest.php b/tests/bundle/Core/ApiLoader/CacheFactoryTest.php index 0d9b5d3922..43c46a3e07 100644 --- a/tests/bundle/Core/ApiLoader/CacheFactoryTest.php +++ b/tests/bundle/Core/ApiLoader/CacheFactoryTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\ApiLoader; use Ibexa\Bundle\Core\ApiLoader\CacheFactory; @@ -46,21 +47,21 @@ public function providerGetService() public function testGetService($name, $expected) { $this->configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('cache_service_name') - ->will($this->returnValue($name)); + ->will(self::returnValue($name)); $this->container - ->expects($this->once()) + ->expects(self::once()) ->method('get') ->with($expected) - ->will($this->returnValue($this->createMock(AdapterInterface::class))); + ->will(self::returnValue($this->createMock(AdapterInterface::class))); $factory = new CacheFactory(); $factory->setContainer($this->container); - $this->assertInstanceOf(TagAwareAdapter::class, $factory->getCachePool($this->configResolver)); + self::assertInstanceOf(TagAwareAdapter::class, $factory->getCachePool($this->configResolver)); } } diff --git a/tests/bundle/Core/ApiLoader/RepositoryConfigurationProviderTest.php b/tests/bundle/Core/ApiLoader/RepositoryConfigurationProviderTest.php index 76e4a8b2f2..8556532b5a 100644 --- a/tests/bundle/Core/ApiLoader/RepositoryConfigurationProviderTest.php +++ b/tests/bundle/Core/ApiLoader/RepositoryConfigurationProviderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\ApiLoader; use Ibexa\Bundle\Core\ApiLoader\Exception\InvalidRepositoryException; @@ -30,12 +31,12 @@ public function testGetRepositoryConfigSpecifiedRepository() $provider = new RepositoryConfigurationProvider($configResolver, $repositories); $configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('repository') - ->will($this->returnValue($repositoryAlias)); + ->will(self::returnValue($repositoryAlias)); - $this->assertSame( + self::assertSame( ['alias' => $repositoryAlias] + $repositoryConfig, $provider->getRepositoryConfig() ); @@ -58,12 +59,12 @@ public function testGetRepositoryConfigNotSpecifiedRepository() $provider = new RepositoryConfigurationProvider($configResolver, $repositories); $configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('repository') - ->will($this->returnValue(null)); + ->will(self::returnValue(null)); - $this->assertSame( + self::assertSame( ['alias' => $repositoryAlias] + $repositoryConfig, $provider->getRepositoryConfig() ); @@ -79,10 +80,10 @@ public function testGetRepositoryConfigUndefinedRepository(array $repositories): $configResolver = $this->getConfigResolverMock(); $configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('repository') - ->will($this->returnValue('undefined_repository')); + ->will(self::returnValue('undefined_repository')); $provider = new RepositoryConfigurationProvider($configResolver, $repositories); $provider->getRepositoryConfig(); diff --git a/tests/bundle/Core/ApiLoader/StorageConnectionFactoryTest.php b/tests/bundle/Core/ApiLoader/StorageConnectionFactoryTest.php index d49be25545..206d073f9a 100644 --- a/tests/bundle/Core/ApiLoader/StorageConnectionFactoryTest.php +++ b/tests/bundle/Core/ApiLoader/StorageConnectionFactoryTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\ApiLoader; use Ibexa\Bundle\Core\ApiLoader\Exception\InvalidRepositoryException; @@ -31,28 +32,28 @@ public function testGetConnection($repositoryAlias, $doctrineConnection) $configResolver = $this->getConfigResolverMock(); $configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('repository') - ->will($this->returnValue($repositoryAlias)); + ->will(self::returnValue($repositoryAlias)); $container = $this->getContainerMock(); $container - ->expects($this->once()) + ->expects(self::once()) ->method('has') ->with("doctrine.dbal.{$doctrineConnection}_connection") - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); $container - ->expects($this->once()) + ->expects(self::once()) ->method('get') ->with("doctrine.dbal.{$doctrineConnection}_connection") - ->will($this->returnValue($this->getMockBuilder('Doctrine\DBAL\Connection')->disableOriginalConstructor()->getMock())); + ->will(self::returnValue($this->getMockBuilder('Doctrine\DBAL\Connection')->disableOriginalConstructor()->getMock())); $repositoryConfigurationProvider = new RepositoryConfigurationProvider($configResolver, $repositories); $factory = new StorageConnectionFactory($repositoryConfigurationProvider); $factory->setContainer($container); $connection = $factory->getConnection(); - $this->assertInstanceOf( + self::assertInstanceOf( 'Doctrine\DBAL\Connection', $connection ); @@ -82,10 +83,10 @@ public function testGetConnectionInvalidRepository() $configResolver = $this->getConfigResolverMock(); $configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('repository') - ->will($this->returnValue('inexistent_repository')); + ->will(self::returnValue('inexistent_repository')); $repositoryConfigurationProvider = new RepositoryConfigurationProvider($configResolver, $repositories); $factory = new StorageConnectionFactory($repositoryConfigurationProvider); @@ -106,21 +107,21 @@ public function testGetConnectionInvalidConnection() ], ]; $repositoryConfigurationProviderMock - ->expects($this->once()) + ->expects(self::once()) ->method('getRepositoryConfig') - ->will($this->returnValue($repositoryConfig)); + ->will(self::returnValue($repositoryConfig)); $container = $this->getContainerMock(); $container - ->expects($this->once()) + ->expects(self::once()) ->method('has') ->with('doctrine.dbal.my_doctrine_connection_connection') - ->will($this->returnValue(false)); + ->will(self::returnValue(false)); $container - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('doctrine.connections') - ->will($this->returnValue([])); + ->will(self::returnValue([])); $factory = new StorageConnectionFactory($repositoryConfigurationProviderMock); $factory->setContainer($container); $factory->getConnection(); diff --git a/tests/bundle/Core/ApiLoader/StorageEngineFactoryTest.php b/tests/bundle/Core/ApiLoader/StorageEngineFactoryTest.php index aed319c78f..88fd24b007 100644 --- a/tests/bundle/Core/ApiLoader/StorageEngineFactoryTest.php +++ b/tests/bundle/Core/ApiLoader/StorageEngineFactoryTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\ApiLoader; use Ibexa\Bundle\Core\ApiLoader\Exception\InvalidStorageEngine; @@ -31,7 +32,7 @@ public function testRegisterStorageEngine() $factory->registerStorageEngine($persistenceHandler, $identifier); } - $this->assertSame($storageEngines, $factory->getStorageEngines()); + self::assertSame($storageEngines, $factory->getStorageEngines()); } public function testBuildStorageEngine() @@ -63,12 +64,12 @@ public function testBuildStorageEngine() } $configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('repository') - ->will($this->returnValue($repositoryAlias)); + ->will(self::returnValue($repositoryAlias)); - $this->assertSame($expectedStorageEngine, $factory->buildStorageEngine()); + self::assertSame($expectedStorageEngine, $factory->buildStorageEngine()); } public function testBuildInvalidStorageEngine() @@ -103,12 +104,12 @@ public function testBuildInvalidStorageEngine() } $configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('repository') - ->will($this->returnValue($repositoryAlias)); + ->will(self::returnValue($repositoryAlias)); - $this->assertSame($this->getPersistenceHandlerMock(), $factory->buildStorageEngine()); + self::assertSame($this->getPersistenceHandlerMock(), $factory->buildStorageEngine()); } /** diff --git a/tests/bundle/Core/Cache/Warmer/ProxyCacheWarmerTest.php b/tests/bundle/Core/Cache/Warmer/ProxyCacheWarmerTest.php index 19ab3183b3..472b77021d 100644 --- a/tests/bundle/Core/Cache/Warmer/ProxyCacheWarmerTest.php +++ b/tests/bundle/Core/Cache/Warmer/ProxyCacheWarmerTest.php @@ -28,13 +28,13 @@ protected function setUp(): void public function testIsOptional(): void { - $this->assertFalse($this->proxyCacheWarmer->isOptional()); + self::assertFalse($this->proxyCacheWarmer->isOptional()); } public function testWarmUp(): void { $this->proxyGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('warmUp') ->with(ProxyCacheWarmer::PROXY_CLASSES); diff --git a/tests/bundle/Core/ChainConfigResolverTest.php b/tests/bundle/Core/ChainConfigResolverTest.php index 882ab18ceb..80bf182a76 100644 --- a/tests/bundle/Core/ChainConfigResolverTest.php +++ b/tests/bundle/Core/ChainConfigResolverTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core; use Ibexa\Bundle\Core\DependencyInjection\Configuration\ChainConfigResolver; @@ -26,14 +27,14 @@ protected function setUp(): void public function testPriority() { - $this->assertEquals([], $this->chainResolver->getAllResolvers()); + self::assertEquals([], $this->chainResolver->getAllResolvers()); list($low, $high) = $this->createResolverMocks(); $this->chainResolver->addResolver($low, 10); $this->chainResolver->addResolver($high, 100); - $this->assertEquals( + self::assertEquals( [ $high, $low, @@ -55,10 +56,10 @@ public function testSortResolvers() ['sortResolvers'] ); $resolver - ->expects($this->once()) + ->expects(self::once()) ->method('sortResolvers') ->will( - $this->returnValue( + self::returnValue( [$high, $medium, $low] ) ); @@ -69,7 +70,7 @@ public function testSortResolvers() $expectedSortedRouters = [$high, $medium, $low]; // Let's get all routers 5 times, we should only sort once. for ($i = 0; $i < 5; ++$i) { - $this->assertSame($expectedSortedRouters, $resolver->getAllResolvers()); + self::assertSame($expectedSortedRouters, $resolver->getAllResolvers()); } } @@ -86,19 +87,19 @@ public function testReSortResolvers() ['sortResolvers'] ); $resolver - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('sortResolvers') ->will( - $this->returnValue( + self::returnValue( [$high, $medium, $low] ) ); // The second time sortResolvers() is called, we're supposed to get the newly added router ($highest) $resolver - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('sortResolvers') ->will( - $this->returnValue( + self::returnValue( [$highest, $high, $medium, $low] ) ); @@ -106,14 +107,14 @@ public function testReSortResolvers() $resolver->addResolver($low, 10); $resolver->addResolver($medium, 50); $resolver->addResolver($high, 100); - $this->assertSame( + self::assertSame( [$high, $medium, $low], $resolver->getAllResolvers() ); // Now adding another resolver on the fly, sorting must have been reset $resolver->addResolver($highest, 101); - $this->assertSame( + self::assertSame( [$highest, $high, $medium, $low], $resolver->getAllResolvers() ); @@ -131,7 +132,7 @@ public function testSetDefaultNamespace() $namespace = 'foo'; foreach ($this->createResolverMocks() as $i => $resolver) { $resolver - ->expects($this->once()) + ->expects(self::once()) ->method('setDefaultNamespace') ->with($namespace); $this->chainResolver->addResolver($resolver, $i); @@ -149,10 +150,10 @@ public function testGetParameterInvalid() $scope = 'scope'; foreach ($this->createResolverMocks() as $resolver) { $resolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with($paramName, $namespace, $scope) - ->will($this->throwException(new ParameterNotFoundException($paramName, $namespace))); + ->will(self::throwException(new ParameterNotFoundException($paramName, $namespace))); $this->chainResolver->addResolver($resolver); } @@ -171,13 +172,13 @@ public function testGetParameter($paramName, $namespace, $scope, $expectedValue) { $resolver = $this->createMock(ConfigResolverInterface::class); $resolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with($paramName, $namespace, $scope) - ->will($this->returnValue($expectedValue)); + ->will(self::returnValue($expectedValue)); $this->chainResolver->addResolver($resolver); - $this->assertSame($expectedValue, $this->chainResolver->getParameter($paramName, $namespace, $scope)); + self::assertSame($expectedValue, $this->chainResolver->getParameter($paramName, $namespace, $scope)); } public function getParameterProvider() @@ -198,27 +199,27 @@ public function testHasParameterTrue() $resolver1 = $this->createMock(ConfigResolverInterface::class); $resolver1 - ->expects($this->once()) + ->expects(self::once()) ->method('hasParameter') ->with($paramName, $namespace, $scope) - ->will($this->returnValue(false)); + ->will(self::returnValue(false)); $this->chainResolver->addResolver($resolver1); $resolver2 = $this->createMock(ConfigResolverInterface::class); $resolver2 - ->expects($this->once()) + ->expects(self::once()) ->method('hasParameter') ->with($paramName, $namespace, $scope) - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); $this->chainResolver->addResolver($resolver2); $resolver3 = $this->createMock(ConfigResolverInterface::class); $resolver3 - ->expects($this->never()) + ->expects(self::never()) ->method('hasParameter'); $this->chainResolver->addResolver($resolver3); - $this->assertTrue($this->chainResolver->hasParameter($paramName, $namespace, $scope)); + self::assertTrue($this->chainResolver->hasParameter($paramName, $namespace, $scope)); } public function testHasParameterFalse() @@ -229,13 +230,13 @@ public function testHasParameterFalse() $resolver = $this->createMock(ConfigResolverInterface::class); $resolver - ->expects($this->once()) + ->expects(self::once()) ->method('hasParameter') ->with($paramName, $namespace, $scope) - ->will($this->returnValue(false)); + ->will(self::returnValue(false)); $this->chainResolver->addResolver($resolver); - $this->assertFalse($this->chainResolver->hasParameter($paramName, $namespace, $scope)); + self::assertFalse($this->chainResolver->hasParameter($paramName, $namespace, $scope)); } /** diff --git a/tests/bundle/Core/ConfigResolverTest.php b/tests/bundle/Core/ConfigResolverTest.php index 3b2985db40..6f39287ff6 100644 --- a/tests/bundle/Core/ConfigResolverTest.php +++ b/tests/bundle/Core/ConfigResolverTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core; use Ibexa\Bundle\Core\DependencyInjection\Configuration\ConfigResolver; @@ -54,13 +55,13 @@ public function testGetSetUndefinedStrategy() $defaultNS = 'ibexa.site_access.config'; $resolver = $this->getResolver($defaultNS, $strategy); - $this->assertSame($strategy, $resolver->getUndefinedStrategy()); + self::assertSame($strategy, $resolver->getUndefinedStrategy()); $resolver->setUndefinedStrategy(ConfigResolver::UNDEFINED_STRATEGY_EXCEPTION); - $this->assertSame(ConfigResolver::UNDEFINED_STRATEGY_EXCEPTION, $resolver->getUndefinedStrategy()); + self::assertSame(ConfigResolver::UNDEFINED_STRATEGY_EXCEPTION, $resolver->getUndefinedStrategy()); - $this->assertSame($defaultNS, $resolver->getDefaultNamespace()); + self::assertSame($defaultNS, $resolver->getDefaultNamespace()); $resolver->setDefaultNamespace('anotherNamespace'); - $this->assertSame('anotherNamespace', $resolver->getDefaultNamespace()); + self::assertSame('anotherNamespace', $resolver->getDefaultNamespace()); } public function testGetParameterFailedWithException() @@ -74,7 +75,7 @@ public function testGetParameterFailedWithException() public function testGetParameterFailedNull() { $resolver = $this->getResolver('ibexa.site_access.config', ConfigResolver::UNDEFINED_STRATEGY_NULL); - $this->assertNull($resolver->getParameter('foo')); + self::assertNull($resolver->getParameter('foo')); } public function parameterProvider() @@ -111,17 +112,17 @@ public function testGetParameterGlobalScope($paramName, $expectedValue) { $globalScopeParameter = "ibexa.site_access.config.global.$paramName"; $this->containerMock - ->expects($this->once()) + ->expects(self::once()) ->method('hasParameter') ->with($globalScopeParameter) - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); $this->containerMock - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with($globalScopeParameter) - ->will($this->returnValue($expectedValue)); + ->will(self::returnValue($expectedValue)); - $this->assertSame($expectedValue, $this->getResolver()->getParameter($paramName)); + self::assertSame($expectedValue, $this->getResolver()->getParameter($paramName)); } /** @@ -131,23 +132,23 @@ public function testGetParameterRelativeScope($paramName, $expectedValue) { $relativeScopeParameter = "ibexa.site_access.config.{$this->siteAccess->name}.$paramName"; $this->containerMock - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('hasParameter') ->with( - $this->logicalOr( + self::logicalOr( "ibexa.site_access.config.global.$paramName", $relativeScopeParameter ) ) // First call is for "global" scope, second is the right one - ->will($this->onConsecutiveCalls(false, true)); + ->will(self::onConsecutiveCalls(false, true)); $this->containerMock - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with($relativeScopeParameter) - ->will($this->returnValue($expectedValue)); + ->will(self::returnValue($expectedValue)); - $this->assertSame($expectedValue, $this->getResolver()->getParameter($paramName)); + self::assertSame($expectedValue, $this->getResolver()->getParameter($paramName)); } /** @@ -158,23 +159,23 @@ public function testGetParameterSpecificScope($paramName, $expectedValue) $scope = 'some_siteaccess'; $relativeScopeParameter = "ibexa.site_access.config.$scope.$paramName"; $this->containerMock - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('hasParameter') ->with( - $this->logicalOr( + self::logicalOr( "ibexa.site_access.config.global.$paramName", $relativeScopeParameter ) ) // First call is for "global" scope, second is the right one - ->will($this->onConsecutiveCalls(false, true)); + ->will(self::onConsecutiveCalls(false, true)); $this->containerMock - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with($relativeScopeParameter) - ->will($this->returnValue($expectedValue)); + ->will(self::returnValue($expectedValue)); - $this->assertSame( + self::assertSame( $expectedValue, $this->getResolver()->getParameter($paramName, 'ibexa.site_access.config', $scope) ); @@ -188,24 +189,24 @@ public function testGetParameterDefaultScope($paramName, $expectedValue) $defaultScopeParameter = "ibexa.site_access.config.default.$paramName"; $relativeScopeParameter = "ibexa.site_access.config.{$this->siteAccess->name}.$paramName"; $this->containerMock - ->expects($this->exactly(3)) + ->expects(self::exactly(3)) ->method('hasParameter') ->with( - $this->logicalOr( + self::logicalOr( "ibexa.site_access.config.global.$paramName", $relativeScopeParameter, $defaultScopeParameter ) ) // First call is for "global" scope, second is the right one - ->will($this->onConsecutiveCalls(false, false, true)); + ->will(self::onConsecutiveCalls(false, false, true)); $this->containerMock - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with($defaultScopeParameter) - ->will($this->returnValue($expectedValue)); + ->will(self::returnValue($expectedValue)); - $this->assertSame($expectedValue, $this->getResolver()->getParameter($paramName)); + self::assertSame($expectedValue, $this->getResolver()->getParameter($paramName)); } public function hasParameterProvider() @@ -235,10 +236,10 @@ public function testHasParameterNoNamespace($defaultMatch, $groupMatch, $scopeMa [$this->siteAccess->name => [$groupName]] ); - $this->containerMock->expects($this->atLeastOnce()) + $this->containerMock->expects(self::atLeastOnce()) ->method('hasParameter') ->will( - $this->returnValueMap( + self::returnValueMap( [ ["ibexa.site_access.config.default.$paramName", $defaultMatch], ["ibexa.site_access.config.$groupName.$paramName", $groupMatch], @@ -248,7 +249,7 @@ public function testHasParameterNoNamespace($defaultMatch, $groupMatch, $scopeMa ) ); - $this->assertSame($expectedResult, $configResolver->hasParameter($paramName)); + self::assertSame($expectedResult, $configResolver->hasParameter($paramName)); } /** @@ -269,10 +270,10 @@ public function testHasParameterWithNamespaceAndScope($defaultMatch, $groupMatch ] ); - $this->containerMock->expects($this->atLeastOnce()) + $this->containerMock->expects(self::atLeastOnce()) ->method('hasParameter') ->will( - $this->returnValueMap( + self::returnValueMap( [ ["$namespace.default.$paramName", $defaultMatch], ["$namespace.$groupName.$paramName", $groupMatch], @@ -282,16 +283,16 @@ public function testHasParameterWithNamespaceAndScope($defaultMatch, $groupMatch ) ); - $this->assertSame($expectedResult, $configResolver->hasParameter($paramName, $namespace, $scope)); + self::assertSame($expectedResult, $configResolver->hasParameter($paramName, $namespace, $scope)); } public function testGetSetDefaultScope() { $newDefaultScope = 'bar'; $configResolver = $this->getResolver(); - $this->assertSame($this->siteAccess->name, $configResolver->getDefaultScope()); + self::assertSame($this->siteAccess->name, $configResolver->getDefaultScope()); $configResolver->setDefaultScope($newDefaultScope); - $this->assertSame($newDefaultScope, $configResolver->getDefaultScope()); + self::assertSame($newDefaultScope, $configResolver->getDefaultScope()); } } diff --git a/tests/bundle/Core/Converter/AbstractParamConverterTest.php b/tests/bundle/Core/Converter/AbstractParamConverterTest.php index 4a2053229e..0336492210 100644 --- a/tests/bundle/Core/Converter/AbstractParamConverterTest.php +++ b/tests/bundle/Core/Converter/AbstractParamConverterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Converter; use PHPUnit\Framework\TestCase; @@ -20,14 +21,14 @@ public function createConfiguration($class = null, $name = null) ->getMock(); if ($name !== null) { - $config->expects($this->any()) + $config->expects(self::any()) ->method('getName') - ->will($this->returnValue($name)); + ->will(self::returnValue($name)); } if ($class !== null) { - $config->expects($this->any()) + $config->expects(self::any()) ->method('getClass') - ->will($this->returnValue($class)); + ->will(self::returnValue($class)); } return $config; diff --git a/tests/bundle/Core/Converter/ContentParamConverterTest.php b/tests/bundle/Core/Converter/ContentParamConverterTest.php index 21cf408c6f..63478df3ea 100644 --- a/tests/bundle/Core/Converter/ContentParamConverterTest.php +++ b/tests/bundle/Core/Converter/ContentParamConverterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Converter; use Ibexa\Bundle\Core\Converter\ContentParamConverter; @@ -31,13 +32,13 @@ protected function setUp(): void public function testSupports() { $config = $this->createConfiguration(self::CONTENT_CLASS); - $this->assertTrue($this->converter->supports($config)); + self::assertTrue($this->converter->supports($config)); $config = $this->createConfiguration(__CLASS__); - $this->assertFalse($this->converter->supports($config)); + self::assertFalse($this->converter->supports($config)); $config = $this->createConfiguration(); - $this->assertFalse($this->converter->supports($config)); + self::assertFalse($this->converter->supports($config)); } public function testApplyContent() @@ -46,17 +47,17 @@ public function testApplyContent() $valueObject = $this->createMock(Content::class); $this->contentServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadContent') ->with($id) - ->will($this->returnValue($valueObject)); + ->will(self::returnValue($valueObject)); $request = new Request([], [], [self::PROPERTY_NAME => $id]); $config = $this->createConfiguration(self::CONTENT_CLASS, 'content'); $this->converter->apply($request, $config); - $this->assertInstanceOf(self::CONTENT_CLASS, $request->attributes->get('content')); + self::assertInstanceOf(self::CONTENT_CLASS, $request->attributes->get('content')); } public function testApplyContentOptionalWithEmptyAttribute() @@ -64,12 +65,12 @@ public function testApplyContentOptionalWithEmptyAttribute() $request = new Request([], [], [self::PROPERTY_NAME => null]); $config = $this->createConfiguration(self::CONTENT_CLASS, 'content'); - $config->expects($this->once()) + $config->expects(self::once()) ->method('isOptional') - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); - $this->assertFalse($this->converter->apply($request, $config)); - $this->assertNull($request->attributes->get('content')); + self::assertFalse($this->converter->apply($request, $config)); + self::assertNull($request->attributes->get('content')); } } diff --git a/tests/bundle/Core/Converter/LocationParamConverterTest.php b/tests/bundle/Core/Converter/LocationParamConverterTest.php index e2b69783f1..d91ede800d 100644 --- a/tests/bundle/Core/Converter/LocationParamConverterTest.php +++ b/tests/bundle/Core/Converter/LocationParamConverterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Converter; use Ibexa\Bundle\Core\Converter\LocationParamConverter; @@ -34,13 +35,13 @@ protected function setUp(): void public function testSupports() { $config = $this->createConfiguration(self::LOCATION_CLASS); - $this->assertTrue($this->converter->supports($config)); + self::assertTrue($this->converter->supports($config)); $config = $this->createConfiguration(__CLASS__); - $this->assertFalse($this->converter->supports($config)); + self::assertFalse($this->converter->supports($config)); $config = $this->createConfiguration(); - $this->assertFalse($this->converter->supports($config)); + self::assertFalse($this->converter->supports($config)); } public function testApplyLocation() @@ -49,17 +50,17 @@ public function testApplyLocation() $valueObject = $this->createMock(Location::class); $this->locationServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') ->with($id) - ->will($this->returnValue($valueObject)); + ->will(self::returnValue($valueObject)); $request = new Request([], [], [self::PROPERTY_NAME => $id]); $config = $this->createConfiguration(self::LOCATION_CLASS, 'location'); $this->converter->apply($request, $config); - $this->assertInstanceOf(self::LOCATION_CLASS, $request->attributes->get('location')); + self::assertInstanceOf(self::LOCATION_CLASS, $request->attributes->get('location')); } public function testApplyLocationOptionalWithEmptyAttribute() @@ -67,12 +68,12 @@ public function testApplyLocationOptionalWithEmptyAttribute() $request = new Request([], [], [self::PROPERTY_NAME => null]); $config = $this->createConfiguration(self::LOCATION_CLASS, 'location'); - $config->expects($this->once()) + $config->expects(self::once()) ->method('isOptional') - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); - $this->assertFalse($this->converter->apply($request, $config)); - $this->assertNull($request->attributes->get('location')); + self::assertFalse($this->converter->apply($request, $config)); + self::assertNull($request->attributes->get('location')); } } diff --git a/tests/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPassTest.php index c973128d31..fbfd87248d 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\DependencyInjection\Compiler\ChainConfigResolverPass; diff --git a/tests/bundle/Core/DependencyInjection/Compiler/ChainRoutingPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/ChainRoutingPassTest.php index c9ce1f34e9..e032b3b910 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/ChainRoutingPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/ChainRoutingPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\DependencyInjection\Compiler\ChainRoutingPass; diff --git a/tests/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPassTest.php index f034ae26a6..4c457f430d 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\DependencyInjection\Compiler\FieldTypeParameterProviderRegistryPass; diff --git a/tests/bundle/Core/DependencyInjection/Compiler/FragmentPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/FragmentPassTest.php index f59baf694a..232ecd16bb 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/FragmentPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/FragmentPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\DependencyInjection\Compiler\FragmentPass; @@ -43,45 +44,45 @@ public function testProcess() $this->compile(); - $this->assertTrue($this->container->hasDefinition('fragment.listener')); + self::assertTrue($this->container->hasDefinition('fragment.listener')); $fragmentListenerDef = $this->container->getDefinition('fragment.listener'); $factoryArray = $fragmentListenerDef->getFactory(); - $this->assertInstanceOf(Reference::class, $factoryArray[0]); - $this->assertEquals('buildFragmentListener', $factoryArray[1]); - $this->assertEquals(FragmentListenerFactory::class, $factoryArray[0]); + self::assertInstanceOf(Reference::class, $factoryArray[0]); + self::assertEquals('buildFragmentListener', $factoryArray[1]); + self::assertEquals(FragmentListenerFactory::class, $factoryArray[0]); - $this->assertTrue($this->container->hasDefinition('fragment.renderer.inline.inner')); - $this->assertSame($inlineRendererDef, $this->container->getDefinition('fragment.renderer.inline.inner')); - $this->assertFalse($inlineRendererDef->isPublic()); - $this->assertTrue($this->container->hasDefinition('fragment.renderer.esi.inner')); - $this->assertSame($esiRendererDef, $this->container->getDefinition('fragment.renderer.esi.inner')); - $this->assertFalse($esiRendererDef->isPublic()); - $this->assertTrue($this->container->hasDefinition('fragment.renderer.hinclude.inner')); - $this->assertSame($hincludeRendererDef, $this->container->getDefinition('fragment.renderer.hinclude.inner')); - $this->assertFalse($hincludeRendererDef->isPublic()); + self::assertTrue($this->container->hasDefinition('fragment.renderer.inline.inner')); + self::assertSame($inlineRendererDef, $this->container->getDefinition('fragment.renderer.inline.inner')); + self::assertFalse($inlineRendererDef->isPublic()); + self::assertTrue($this->container->hasDefinition('fragment.renderer.esi.inner')); + self::assertSame($esiRendererDef, $this->container->getDefinition('fragment.renderer.esi.inner')); + self::assertFalse($esiRendererDef->isPublic()); + self::assertTrue($this->container->hasDefinition('fragment.renderer.hinclude.inner')); + self::assertSame($hincludeRendererDef, $this->container->getDefinition('fragment.renderer.hinclude.inner')); + self::assertFalse($hincludeRendererDef->isPublic()); $this->assertContainerBuilderHasServiceDefinitionWithParent('fragment.renderer.inline', DecoratedFragmentRenderer::class); $decoratedInlineDef = $this->container->getDefinition('fragment.renderer.inline'); - $this->assertSame(['kernel.fragment_renderer' => [[]]], $decoratedInlineDef->getTags()); - $this->assertEquals( + self::assertSame(['kernel.fragment_renderer' => [[]]], $decoratedInlineDef->getTags()); + self::assertEquals( [new Reference('fragment.renderer.inline.inner')], $decoratedInlineDef->getArguments() ); - $this->assertSame(InlineFragmentRenderer::class, $decoratedInlineDef->getClass()); + self::assertSame(InlineFragmentRenderer::class, $decoratedInlineDef->getClass()); $this->assertContainerBuilderHasServiceDefinitionWithParent('fragment.renderer.esi', DecoratedFragmentRenderer::class); $decoratedEsiDef = $this->container->getDefinition('fragment.renderer.esi'); - $this->assertSame(['kernel.fragment_renderer' => [[]]], $decoratedEsiDef->getTags()); - $this->assertEquals( + self::assertSame(['kernel.fragment_renderer' => [[]]], $decoratedEsiDef->getTags()); + self::assertEquals( [new Reference('fragment.renderer.esi.inner')], $decoratedEsiDef->getArguments() ); $this->assertContainerBuilderHasServiceDefinitionWithParent('fragment.renderer.hinclude', DecoratedFragmentRenderer::class); $decoratedHincludeDef = $this->container->getDefinition('fragment.renderer.hinclude'); - $this->assertSame(['kernel.fragment_renderer' => [[]]], $decoratedHincludeDef->getTags()); - $this->assertEquals( + self::assertSame(['kernel.fragment_renderer' => [[]]], $decoratedHincludeDef->getTags()); + self::assertEquals( [new Reference('fragment.renderer.hinclude.inner')], $decoratedHincludeDef->getArguments() ); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPassTest.php index fd54bb4f0d..73c2d2ad3b 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\DependencyInjection\Compiler\PlaceholderProviderPass; diff --git a/tests/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePassTest.php index 97d6cfd0f0..d88ab98feb 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\ApiLoader\StorageEngineFactory; diff --git a/tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php index 605e800554..e76f5988b4 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\DependencyInjection\Compiler\SecurityPass; diff --git a/tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php index 06f0dbf9fa..d398d4599b 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\DependencyInjection\Compiler\SlugConverterConfigurationPass; @@ -63,10 +64,10 @@ public function testMergeConfigurations( $configurationPropertyRef->setAccessible(true); $configuration = $configurationPropertyRef->getValue($this->container->get(\Ibexa\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter::class)); - $this->assertEquals('urlalias', $configuration['transformation']); - $this->assertEquals('underscore', $configuration['wordSeparatorName']); - $this->assertEquals($expectedCommands, $configuration['transformationGroups']['urlalias']['commands']); - $this->assertEquals('url_cleanup', $configuration['transformationGroups']['urlalias']['cleanupMethod']); + self::assertEquals('urlalias', $configuration['transformation']); + self::assertEquals('underscore', $configuration['wordSeparatorName']); + self::assertEquals($expectedCommands, $configuration['transformationGroups']['urlalias']['commands']); + self::assertEquals('url_cleanup', $configuration['transformationGroups']['urlalias']['cleanupMethod']); } public function configurationProvider() diff --git a/tests/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPassTest.php index 0493675f98..27195f21d8 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\DependencyInjection\Compiler\TranslationCollectorPass; diff --git a/tests/bundle/Core/DependencyInjection/Compiler/URLHandlerPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/URLHandlerPassTest.php index bb0b3f3644..c960b87871 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/URLHandlerPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/URLHandlerPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\DependencyInjection\Compiler\URLHandlerPass; diff --git a/tests/bundle/Core/DependencyInjection/Compiler/ViewProvidersPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/ViewProvidersPassTest.php index dd58d5da36..9ea5e735fa 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/ViewProvidersPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/ViewProvidersPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Compiler; use Ibexa\Bundle\Core\DependencyInjection\Compiler\ViewProvidersPass; diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php index 52fcf604d5..465cf2bdc1 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Configuration\ComplexSettings; use Ibexa\Bundle\Core\DependencyInjection\Configuration\ComplexSettings\ComplexSettingParser; diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolverTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolverTest.php index 6005e51f81..adda2b1be4 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolverTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolverTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Configuration\ComplexSettings; use Ibexa\Bundle\Core\DependencyInjection\Configuration\ComplexSettings\ComplexSettingValueResolver; diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ConfigParserTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ConfigParserTest.php index d1c0332a92..54aa5cd459 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ConfigParserTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ConfigParserTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Configuration; use Ibexa\Bundle\Core\DependencyInjection\Configuration\ConfigParser; @@ -36,13 +37,13 @@ public function testConstruct() $this->getConfigurationParserMock(), ]; $configParser = new ConfigParser($innerParsers); - $this->assertSame($innerParsers, $configParser->getConfigParsers()); + self::assertSame($innerParsers, $configParser->getConfigParsers()); } public function testGetSetInnerParsers() { $configParser = new ConfigParser(); - $this->assertSame([], $configParser->getConfigParsers()); + self::assertSame([], $configParser->getConfigParsers()); $innerParsers = [ $this->getConfigurationParserMock(), @@ -50,7 +51,7 @@ public function testGetSetInnerParsers() $this->getConfigurationParserMock(), ]; $configParser->setConfigParsers($innerParsers); - $this->assertSame($innerParsers, $configParser->getConfigParsers()); + self::assertSame($innerParsers, $configParser->getConfigParsers()); } public function testMapConfig() @@ -71,7 +72,7 @@ public function testMapConfig() foreach ($parsers as $parser) { /* @var \PHPUnit\Framework\MockObject\MockObject $parser */ $parser - ->expects($this->once()) + ->expects(self::once()) ->method('mapConfig') ->with($scopeSettings, $currentScope, $contextualizer); } @@ -96,11 +97,11 @@ public function testPrePostMap() foreach ($parsers as $parser) { /* @var \PHPUnit\Framework\MockObject\MockObject $parser */ $parser - ->expects($this->once()) + ->expects(self::once()) ->method('preMap') ->with($config, $contextualizer); $parser - ->expects($this->once()) + ->expects(self::once()) ->method('postMap') ->with($config, $contextualizer); } @@ -122,7 +123,7 @@ public function testAddSemanticConfig() foreach ($parsers as $parser) { /* @var \PHPUnit\Framework\MockObject\MockObject $parser */ $parser - ->expects($this->once()) + ->expects(self::once()) ->method('addSemanticConfig') ->with($nodeBuilder); } diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php index 64add1fe17..d0df89631b 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php @@ -56,10 +56,10 @@ public function testGetParameterDefaultScope(string $paramName, $expectedValue): $saGroupScopeParameter = $this->getParameter($paramName, self::SA_GROUP); $defaultScopeParameter = $this->getParameter($paramName, self::SCOPE_DEFAULT); $this->containerMock - ->expects($this->exactly(4)) + ->expects(self::exactly(4)) ->method('hasParameter') ->with( - $this->logicalOr( + self::logicalOr( $globalScopeParameter, $relativeScopeParameter, $saGroupScopeParameter, @@ -67,14 +67,14 @@ public function testGetParameterDefaultScope(string $paramName, $expectedValue): ) ) // First call is for "global" scope, second for SA scope, third fo SA group scope, last is the right one - ->will($this->onConsecutiveCalls(false, false, false, true)); + ->will(self::onConsecutiveCalls(false, false, false, true)); $this->containerMock - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with($defaultScopeParameter) ->willReturn($expectedValue); - $this->assertSame($expectedValue, $this->getChainConfigResolver()->getParameter($paramName)); + self::assertSame($expectedValue, $this->getChainConfigResolver()->getParameter($paramName)); } /** @@ -85,23 +85,23 @@ public function testGetParameterRelativeScope(string $paramName, $expectedValue) $globalScopeParameter = $this->getParameter($paramName, self::SCOPE_GLOBAL); $relativeScopeParameter = $this->getParameter($paramName, $this->siteAccess->name); $this->containerMock - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('hasParameter') ->with( - $this->logicalOr( + self::logicalOr( $globalScopeParameter, $relativeScopeParameter ) ) // First call is for "global" scope, second is the right one - ->will($this->onConsecutiveCalls(false, true)); + ->will(self::onConsecutiveCalls(false, true)); $this->containerMock - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with($relativeScopeParameter) ->willReturn($expectedValue); - $this->assertSame($expectedValue, $this->getChainConfigResolver()->getParameter($paramName)); + self::assertSame($expectedValue, $this->getChainConfigResolver()->getParameter($paramName)); } /** @@ -111,23 +111,23 @@ public function testGetParameterSpecificScope(string $paramName, $expectedValue) { $specificScopeParameter = $this->getParameter($paramName, self::FIRST_SA_NAME); $this->containerMock - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('hasParameter') ->with( - $this->logicalOr( + self::logicalOr( "ibexa.site_access.config.global.$paramName", $specificScopeParameter ) ) // First call is for "global" scope, second is the right one - ->will($this->onConsecutiveCalls(false, true)); + ->will(self::onConsecutiveCalls(false, true)); $this->containerMock - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with($specificScopeParameter) ->willReturn($expectedValue); - $this->assertSame( + self::assertSame( $expectedValue, $this->getChainConfigResolver()->getParameter($paramName, self::DEFAULT_NAMESPACE, self::FIRST_SA_NAME) ); @@ -140,17 +140,17 @@ public function testGetParameterGlobalScope(string $paramName, $expectedValue): { $globalScopeParameter = $this->getParameter($paramName, self::SCOPE_GLOBAL); $this->containerMock - ->expects($this->once()) + ->expects(self::once()) ->method('hasParameter') ->with($globalScopeParameter) ->willReturn(true); $this->containerMock - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with($globalScopeParameter) ->willReturn($expectedValue); - $this->assertSame($expectedValue, $this->getChainConfigResolver()->getParameter($paramName)); + self::assertSame($expectedValue, $this->getChainConfigResolver()->getParameter($paramName)); } /** @@ -168,7 +168,7 @@ public function testHasParameterNoNamespace( $chainConfigResolver = $this->getChainConfigResolver(); - $this->containerMock->expects($this->atLeastOnce()) + $this->containerMock->expects(self::atLeastOnce()) ->method('hasParameter') ->willReturnMap( [ @@ -179,7 +179,7 @@ public function testHasParameterNoNamespace( ] ); - $this->assertSame($expectedResult, $chainConfigResolver->hasParameter($paramName)); + self::assertSame($expectedResult, $chainConfigResolver->hasParameter($paramName)); } /** @@ -199,7 +199,7 @@ public function testHasParameterWithNamespaceAndScope( $chainConfigResolver = $this->getChainConfigResolver(); - $this->containerMock->expects($this->atLeastOnce()) + $this->containerMock->expects(self::atLeastOnce()) ->method('hasParameter') ->willReturnMap( [ @@ -210,7 +210,7 @@ public function testHasParameterWithNamespaceAndScope( ] ); - $this->assertSame($expectedResult, $chainConfigResolver->hasParameter($paramName, $namespace, $scope)); + self::assertSame($expectedResult, $chainConfigResolver->hasParameter($paramName, $namespace, $scope)); } private function getGlobalConfigResolver(string $defaultNamespace = self::DEFAULT_NAMESPACE): ConfigResolverInterface diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ConfigResolverTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ConfigResolverTest.php index a034848891..e0e7e590a2 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ConfigResolverTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ConfigResolverTest.php @@ -48,7 +48,7 @@ public function testGetParameterFailedWithException(): void { $resolver = $this->getResolver(self::DEFAULT_NAMESPACE); $this->containerMock - ->expects($this->once()) + ->expects(self::once()) ->method('hasParameter') ->with(sprintf('%s.%s.undefined', $this->getNamespace(), $this->getScope())) ->willReturn(false); @@ -65,17 +65,17 @@ public function testGetParameterGlobalScope(string $paramName, $expectedValue): { $globalScopeParameter = sprintf('%s.%s.%s', $this->getNamespace(), $this->getScope(), $paramName); $this->containerMock - ->expects($this->once()) + ->expects(self::once()) ->method('hasParameter') ->with($globalScopeParameter) ->willReturn(true); $this->containerMock - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with($globalScopeParameter) ->willReturn($expectedValue); - $this->assertSame($expectedValue, $this->getResolver()->getParameter($paramName)); + self::assertSame($expectedValue, $this->getResolver()->getParameter($paramName)); } public function parameterProvider(): array @@ -109,9 +109,9 @@ public function testGetSetDefaultNamespace(): void { $newDefaultNamespace = 'new'; $configResolver = $this->getResolver(); - $this->assertSame(self::DEFAULT_NAMESPACE, $configResolver->getDefaultNamespace()); + self::assertSame(self::DEFAULT_NAMESPACE, $configResolver->getDefaultNamespace()); $configResolver->setDefaultNamespace($newDefaultNamespace); - $this->assertSame($newDefaultNamespace, $configResolver->getDefaultNamespace()); + self::assertSame($newDefaultNamespace, $configResolver->getDefaultNamespace()); } } diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/AbstractParserTestCase.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/AbstractParserTestCase.php index c08bd7a501..107007e59c 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/AbstractParserTestCase.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/AbstractParserTestCase.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Configuration\Parser; use Ibexa\Bundle\Core\DependencyInjection\Configuration\ChainConfigResolver; diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php index 3831514945..5b5ccb4fbf 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Configuration\Parser; use Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser\Common; diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php index 285a0cc2b3..bba6f79c7f 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Configuration\Parser; use Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser\Content as ContentConfigParser; diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php index bcec996124..08ef6e55c9 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Configuration\Parser; use Ibexa\Bundle\Core\DependencyInjection\Configuration\ComplexSettings\ComplexSettingParser; diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php index 360af7a6a1..fccf7d2c6d 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Configuration\Parser; use Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser\Image; @@ -19,7 +20,7 @@ protected function setUp(): void parent::setUp(); if (!isset($_ENV['imagemagickConvertPath']) || !is_executable($_ENV['imagemagickConvertPath'])) { - $this->markTestSkipped('Missing or mis-configured Imagemagick convert path.'); + self::markTestSkipped('Missing or mis-configured Imagemagick convert path.'); } } diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php index e7bb6a8aad..e3d91b5296 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Configuration\Parser; use Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser\Languages; @@ -45,7 +46,7 @@ public function testLanguagesSingleSiteaccess() $this->assertConfigResolverParameterValue('languages', $langFre, 'fre'); $this->assertConfigResolverParameterValue('languages', $langFre, 'fre2'); $this->assertConfigResolverParameterValue('languages', $langEmptyGroup, self::EMPTY_SA_GROUP); - $this->assertSame( + self::assertSame( [ 'eng-GB' => ['ibexa_demo_site'], 'fre-FR' => ['fre', 'fre2'], @@ -72,7 +73,7 @@ public function testLanguagesSiteaccessGroup() $this->assertConfigResolverParameterValue('languages', $langDemoSite, 'ibexa_demo_site'); $this->assertConfigResolverParameterValue('languages', $langDemoSite, 'fre'); $this->assertConfigResolverParameterValue('languages', [], self::EMPTY_SA_GROUP); - $this->assertSame( + self::assertSame( [ 'eng-US' => ['ibexa_demo_frontend_group', 'ibexa_demo_site', 'fre'], ], diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php index 2b5a3cfc38..093f0d3bb2 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Configuration\Parser; use Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser\FieldDefinitionSettingsTemplates; diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/ViewTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/ViewTest.php index 48f67f5db3..464754cfe4 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/ViewTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/ViewTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Configuration\Parser; use Ibexa\Bundle\Core\DependencyInjection\Configuration\Parser\ContentView; diff --git a/tests/bundle/Core/DependencyInjection/Configuration/RepositoryConfigParserTest.php b/tests/bundle/Core/DependencyInjection/Configuration/RepositoryConfigParserTest.php index fdcbc72920..adbc0e02be 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/RepositoryConfigParserTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/RepositoryConfigParserTest.php @@ -33,7 +33,7 @@ private function createRepositoryConfigParserMock( ): RepositoryConfigParserInterface { $configParser = $this->createMock(RepositoryConfigParserInterface::class); $configParser - ->expects($this->once()) + ->expects(self::once()) ->method('addSemanticConfig') ->with($nodeBuilder); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php b/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php index 47dc66eeff..18ad1074c2 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware; use Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\ConfigurationMapperInterface; @@ -34,12 +35,12 @@ public function testConstruct() $processor = new ConfigurationProcessor($container, $namespace, $siteAccessNodeName); $contextualizer = $processor->getContextualizer(); - $this->assertInstanceOf(ContextualizerInterface::class, $contextualizer); - $this->assertSame($container, $contextualizer->getContainer()); - $this->assertSame($namespace, $contextualizer->getNamespace()); - $this->assertSame($siteAccessNodeName, $contextualizer->getSiteAccessNodeName()); - $this->assertSame($siteAccessList, $contextualizer->getAvailableSiteAccesses()); - $this->assertSame($groupsBySa, $contextualizer->getGroupsBySiteAccess()); + self::assertInstanceOf(ContextualizerInterface::class, $contextualizer); + self::assertSame($container, $contextualizer->getContainer()); + self::assertSame($namespace, $contextualizer->getNamespace()); + self::assertSame($siteAccessNodeName, $contextualizer->getSiteAccessNodeName()); + self::assertSame($siteAccessList, $contextualizer->getAvailableSiteAccesses()); + self::assertSame($groupsBySa, $contextualizer->getGroupsBySiteAccess()); } public function testGetSetContextualizer() @@ -49,14 +50,14 @@ public function testGetSetContextualizer() $container = $this->getContainerMock(); $processor = new ConfigurationProcessor($container, $namespace, $siteAccessNodeName); - $this->assertInstanceOf( + self::assertInstanceOf( ContextualizerInterface::class, $processor->getContextualizer() ); $newContextualizer = $this->getContextualizerMock(); $processor->setContextualizer($newContextualizer); - $this->assertSame($newContextualizer, $processor->getContextualizer()); + self::assertSame($newContextualizer, $processor->getContextualizer()); } public function testMapConfigWrongMapper() @@ -142,10 +143,10 @@ public function testMapConfigMapperObject() $mapper = $this->createMock(ConfigurationMapperInterface::class); $mapper - ->expects($this->exactly(count($config[$saNodeName]))) + ->expects(self::exactly(count($config[$saNodeName]))) ->method('mapConfig') ->will( - $this->returnValueMap( + self::returnValueMap( [ [$sa1Config, $sa1Name, $contextualizer, null], [$sa2Config, $sa2Name, $contextualizer, null], @@ -188,18 +189,18 @@ public function testMapConfigHookableMapperObject() $mapper = $this->createMock(HookableConfigurationMapperInterface::class); $mapper - ->expects($this->once()) + ->expects(self::once()) ->method('preMap') ->with($config, $contextualizer); $mapper - ->expects($this->once()) + ->expects(self::once()) ->method('postMap') ->with($config, $contextualizer); $mapper - ->expects($this->exactly(count($config[$saNodeName]))) + ->expects(self::exactly(count($config[$saNodeName]))) ->method('mapConfig') ->will( - $this->returnValueMap( + self::returnValueMap( [ [$sa1Config, $sa1Name, $contextualizer, null], [$sa2Config, $sa2Name, $contextualizer, null], @@ -240,7 +241,7 @@ public function testMapSetting() ]; $contextualizer - ->expects($this->once()) + ->expects(self::once()) ->method('mapSetting') ->with('foo', $config); $processor->mapSetting('foo', $config); @@ -276,7 +277,7 @@ public function testMapConfigArray() ]; $contextualizer - ->expects($this->once()) + ->expects(self::once()) ->method('mapConfigArray') ->with('hello', $config, ContextualizerInterface::MERGE_FROM_SECOND_LEVEL); $processor->mapConfigArray('hello', $config, ContextualizerInterface::MERGE_FROM_SECOND_LEVEL); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php b/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php index d620ed6f96..bf41b0ba60 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware; use Ibexa\Bundle\Core\DependencyInjection\Configuration\ConfigResolver; @@ -63,7 +64,7 @@ protected function setUp(): void public function testSetContextualParameter($parameterName, $scope, $value) { $this->container - ->expects($this->once()) + ->expects(self::once()) ->method('setParameter') ->with("$this->namespace.$scope.$parameterName", $value); @@ -119,15 +120,15 @@ public function testMapSetting() $this->contextualizer->mapSetting('an_integer', $config); $this->contextualizer->mapSetting('a_bool', $config); - $this->assertSame($fooSa1, $container->getParameter("$this->namespace.sa1.foo")); - $this->assertSame($planetsSa1, $container->getParameter("$this->namespace.sa1.planets")); - $this->assertSame($intSa1, $container->getParameter("$this->namespace.sa1.an_integer")); - $this->assertSame($boolSa1, $container->getParameter("$this->namespace.sa1.a_bool")); + self::assertSame($fooSa1, $container->getParameter("$this->namespace.sa1.foo")); + self::assertSame($planetsSa1, $container->getParameter("$this->namespace.sa1.planets")); + self::assertSame($intSa1, $container->getParameter("$this->namespace.sa1.an_integer")); + self::assertSame($boolSa1, $container->getParameter("$this->namespace.sa1.a_bool")); - $this->assertSame($fooSa2, $container->getParameter("$this->namespace.sa2.foo")); - $this->assertSame($planetsSa2, $container->getParameter("$this->namespace.sa2.planets")); - $this->assertSame($intSa2, $container->getParameter("$this->namespace.sa2.an_integer")); - $this->assertSame($boolSa2, $container->getParameter("$this->namespace.sa2.a_bool")); + self::assertSame($fooSa2, $container->getParameter("$this->namespace.sa2.foo")); + self::assertSame($planetsSa2, $container->getParameter("$this->namespace.sa2.planets")); + self::assertSame($intSa2, $container->getParameter("$this->namespace.sa2.an_integer")); + self::assertSame($boolSa2, $container->getParameter("$this->namespace.sa2.a_bool")); } public function testMapConfigArray() @@ -214,19 +215,19 @@ public function testMapConfigArray() $this->contextualizer->mapConfigArray('foo_setting', $config); - $this->assertSame( + self::assertSame( $expectedMergedSettings['sa1'], $containerBuilder->getParameter("$this->namespace.sa1.foo_setting") ); - $this->assertSame( + self::assertSame( $expectedMergedSettings['sa2'], $containerBuilder->getParameter("$this->namespace.sa2.foo_setting") ); - $this->assertSame( + self::assertSame( $expectedMergedSettings['sa3'], $containerBuilder->getParameter("$this->namespace.sa3.foo_setting") ); - $this->assertSame( + self::assertSame( $expectedMergedSettings['sa_group1'], $containerBuilder->getParameter("$this->namespace.sa_group1.foo_setting") ); @@ -324,19 +325,19 @@ public function testMapConfigArraySecondLevel() $this->contextualizer->mapConfigArray('foo_setting', $config, ContextualizerInterface::MERGE_FROM_SECOND_LEVEL); - $this->assertSame( + self::assertSame( $expectedMergedSettings['sa1'], $containerBuilder->getParameter("$this->namespace.sa1.foo_setting") ); - $this->assertSame( + self::assertSame( $expectedMergedSettings['sa2'], $containerBuilder->getParameter("$this->namespace.sa2.foo_setting") ); - $this->assertSame( + self::assertSame( $expectedMergedSettings['sa3'], $containerBuilder->getParameter("$this->namespace.sa3.foo_setting") ); - $this->assertSame( + self::assertSame( $expectedMergedSettings['sa_group1'], $containerBuilder->getParameter("$this->namespace.sa_group1.foo_setting") ); @@ -377,19 +378,19 @@ public function testMapConfigArrayUnique() $this->contextualizer->mapConfigArray('foo_setting', $config, ContextualizerInterface::UNIQUE); - $this->assertSame( + self::assertSame( $expectedMergedSettings['sa1'], $containerBuilder->getParameter("$this->namespace.sa1.foo_setting") ); - $this->assertSame( + self::assertSame( $expectedMergedSettings['sa2'], $containerBuilder->getParameter("$this->namespace.sa2.foo_setting") ); - $this->assertSame( + self::assertSame( $expectedMergedSettings['sa3'], $containerBuilder->getParameter("$this->namespace.sa3.foo_setting") ); - $this->assertSame( + self::assertSame( $expectedMergedSettings['sa_group1'], $containerBuilder->getParameter("$this->namespace.sa_group1.foo_setting") ); @@ -397,42 +398,42 @@ public function testMapConfigArrayUnique() public function testGetSetContainer() { - $this->assertSame($this->container, $this->contextualizer->getContainer()); + self::assertSame($this->container, $this->contextualizer->getContainer()); $containerBuilder = new ContainerBuilder(); $this->contextualizer->setContainer($containerBuilder); - $this->assertSame($containerBuilder, $this->contextualizer->getContainer()); + self::assertSame($containerBuilder, $this->contextualizer->getContainer()); } public function testGetSetSANodeName() { $nodeName = 'foobarbaz'; - $this->assertSame($this->saNodeName, $this->contextualizer->getSiteAccessNodeName()); + self::assertSame($this->saNodeName, $this->contextualizer->getSiteAccessNodeName()); $this->contextualizer->setSiteAccessNodeName($nodeName); - $this->assertSame($nodeName, $this->contextualizer->getSiteAccessNodeName()); + self::assertSame($nodeName, $this->contextualizer->getSiteAccessNodeName()); } public function testGetSetNamespace() { $ns = 'ibexa'; - $this->assertSame($this->namespace, $this->contextualizer->getNamespace()); + self::assertSame($this->namespace, $this->contextualizer->getNamespace()); $this->contextualizer->setNamespace($ns); - $this->assertSame($ns, $this->contextualizer->getNamespace()); + self::assertSame($ns, $this->contextualizer->getNamespace()); } public function testGetSetAvailableSiteAccesses() { - $this->assertSame($this->availableSAs, $this->contextualizer->getAvailableSiteAccesses()); + self::assertSame($this->availableSAs, $this->contextualizer->getAvailableSiteAccesses()); $sa = ['foo', 'bar', 'baz']; $this->contextualizer->setAvailableSiteAccesses($sa); - $this->assertSame($sa, $this->contextualizer->getAvailableSiteAccesses()); + self::assertSame($sa, $this->contextualizer->getAvailableSiteAccesses()); } public function testGetSetGroupsBySA() { - $this->assertSame($this->groupsBySA, $this->contextualizer->getGroupsBySiteAccess()); + self::assertSame($this->groupsBySA, $this->contextualizer->getGroupsBySiteAccess()); $groups = ['foo' => ['bar', 'baz'], 'group2' => ['some', 'thing']]; $this->contextualizer->setGroupsBySiteAccess($groups); - $this->assertSame($groups, $this->contextualizer->getGroupsBySiteAccess()); + self::assertSame($groups, $this->contextualizer->getGroupsBySiteAccess()); } /** @@ -478,21 +479,21 @@ public function testFullMapConfigArray( ]; $this->container - ->expects($this->any()) + ->expects(self::any()) ->method('hasParameter') - ->will($this->returnValueMap($hasParameterMap)); + ->will(self::returnValueMap($hasParameterMap)); $this->container - ->expects($this->any()) + ->expects(self::any()) ->method('getParameter') - ->will($this->returnValueMap($getParameterMap)); + ->will(self::returnValueMap($getParameterMap)); $this->container - ->expects($this->any()) + ->expects(self::any()) ->method('setParameter') ->with( - $this->equalTo("$this->namespace.$siteaccess.$testId"), - $this->equalTo($expected) + self::equalTo("$this->namespace.$siteaccess.$testId"), + self::equalTo($expected) ); if ($customSANodeKey !== null) { diff --git a/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php b/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php index d1629f385e..78792782bc 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware; use Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\DynamicSettingParser; @@ -17,7 +18,7 @@ class DynamicSettingParserTest extends TestCase public function testIsDynamicSetting($setting, $expected) { $parser = new DynamicSettingParser(); - $this->assertSame($expected, $parser->isDynamicSetting($setting)); + self::assertSame($expected, $parser->isDynamicSetting($setting)); } public function isDynamicSettingProvider() @@ -53,7 +54,7 @@ public function testParseDynamicSettingFail() public function testParseDynamicSetting($setting, array $expected) { $parser = new DynamicSettingParser(); - $this->assertSame($expected, $parser->parseDynamicSetting($setting)); + self::assertSame($expected, $parser->parseDynamicSetting($setting)); } public function parseDynamicSettingProvider() diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorTest.php index 93d8b17e5e..b2ea4423a8 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Configuration\Suggestion\Collector; use Ibexa\Bundle\Core\DependencyInjection\Configuration\Suggestion\Collector\SuggestionCollector; @@ -20,8 +21,8 @@ public function testAddHasGetSuggestions() $collector->addSuggestion($suggestion); } - $this->assertTrue($collector->hasSuggestions()); - $this->assertSame($suggestions, $collector->getSuggestions()); + self::assertTrue($collector->hasSuggestions()); + self::assertSame($suggestions, $collector->getSuggestions()); } } diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestionTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestionTest.php index 90893fc5dc..6e774529f6 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestionTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestionTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Configuration\Suggestion; use Ibexa\Bundle\Core\DependencyInjection\Configuration\Suggestion\ConfigSuggestion; @@ -14,9 +15,9 @@ class ConfigSuggestionTest extends TestCase public function testEmptyConstructor() { $suggestion = new ConfigSuggestion(); - $this->assertNull($suggestion->getMessage()); - $this->assertSame([], $suggestion->getSuggestion()); - $this->assertFalse($suggestion->isMandatory()); + self::assertNull($suggestion->getMessage()); + self::assertSame([], $suggestion->getSuggestion()); + self::assertFalse($suggestion->isMandatory()); } public function testConfigSuggestion() @@ -25,20 +26,20 @@ public function testConfigSuggestion() $configArray = ['foo' => 'bar']; $suggestion = new ConfigSuggestion($message, $configArray); - $this->assertSame($message, $suggestion->getMessage()); - $this->assertSame($configArray, $suggestion->getSuggestion()); - $this->assertFalse($suggestion->isMandatory()); + self::assertSame($message, $suggestion->getMessage()); + self::assertSame($configArray, $suggestion->getSuggestion()); + self::assertFalse($suggestion->isMandatory()); $newMessage = 'foo bar'; $suggestion->setMessage($newMessage); - $this->assertSame($newMessage, $suggestion->getMessage()); + self::assertSame($newMessage, $suggestion->getMessage()); $newConfigArray = ['ibexa' => 'publish']; $suggestion->setSuggestion($newConfigArray); - $this->assertSame($newConfigArray, $suggestion->getSuggestion()); + self::assertSame($newConfigArray, $suggestion->getSuggestion()); $suggestion->setMandatory(true); - $this->assertTrue($suggestion->isMandatory()); + self::assertTrue($suggestion->isMandatory()); } } diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatterTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatterTest.php index e468aab9f2..2666ca40ba 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatterTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Configuration\Suggestion\Formatter; use Ibexa\Bundle\Core\DependencyInjection\Configuration\Suggestion\ConfigSuggestion; @@ -83,7 +84,7 @@ public function testFormat() EOT; $formatter = new YamlSuggestionFormatter(); - $this->assertSame($expectedMessage, trim($formatter->format($suggestion))); + self::assertSame($expectedMessage, trim($formatter->format($suggestion))); } public function testFormatNoSuggestion() @@ -91,7 +92,7 @@ public function testFormatNoSuggestion() $message = 'This is a message'; $suggestion = new ConfigSuggestion($message); $formatter = new YamlSuggestionFormatter(); - $this->assertSame($message, $formatter->format($suggestion)); + self::assertSame($message, $formatter->format($suggestion)); } } diff --git a/tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php b/tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php index f71ba92824..bcfa39caba 100644 --- a/tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php +++ b/tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection; use Ibexa\Bundle\Core\DependencyInjection\Compiler\QueryTypePass; @@ -132,7 +133,7 @@ public function testSiteAccessNoConfiguration() public function testImageMagickConfigurationBasic() { if (!isset($_ENV['imagemagickConvertPath']) || !is_executable($_ENV['imagemagickConvertPath'])) { - $this->markTestSkipped('Missing or mis-configured Imagemagick convert path.'); + self::markTestSkipped('Missing or mis-configured Imagemagick convert path.'); } $this->load( @@ -189,7 +190,7 @@ public function translationsConfigurationProvider(): iterable public function testImageMagickConfigurationFilters() { if (!isset($_ENV['imagemagickConvertPath']) || !is_executable($_ENV['imagemagickConvertPath'])) { - $this->markTestSkipped('Missing or mis-configured Imagemagick convert path.'); + self::markTestSkipped('Missing or mis-configured Imagemagick convert path.'); } $customFilters = [ @@ -205,12 +206,12 @@ public function testImageMagickConfigurationFilters() ], ] ); - $this->assertTrue($this->container->hasParameter('ibexa.image.imagemagick.filters')); + self::assertTrue($this->container->hasParameter('ibexa.image.imagemagick.filters')); $filters = $this->container->getParameter('ibexa.image.imagemagick.filters'); - $this->assertArrayHasKey('foobar', $filters); - $this->assertSame($customFilters['foobar'], $filters['foobar']); - $this->assertArrayHasKey('wow', $filters); - $this->assertSame($customFilters['wow'], $filters['wow']); + self::assertArrayHasKey('foobar', $filters); + self::assertSame($customFilters['foobar'], $filters['foobar']); + self::assertArrayHasKey('wow', $filters); + self::assertSame($customFilters['wow'], $filters['wow']); } public function testImagePlaceholderConfiguration() @@ -231,7 +232,7 @@ public function testImagePlaceholderConfiguration() ], ]); - $this->assertEquals([ + self::assertEquals([ 'default' => [ 'provider' => 'generic', 'options' => [ @@ -253,11 +254,11 @@ public function testRoutingConfiguration() $this->load(); $this->assertContainerBuilderHasAlias('router', ChainRouter::class); - $this->assertTrue($this->container->hasParameter('ibexa.default_router.non_site_access_aware_routes')); + self::assertTrue($this->container->hasParameter('ibexa.default_router.non_site_access_aware_routes')); $nonSiteaccessAwareRoutes = $this->container->getParameter('ibexa.default_router.non_site_access_aware_routes'); // See ezpublish_minimal_no_siteaccess.yml fixture - $this->assertContains('foo_route', $nonSiteaccessAwareRoutes); - $this->assertContains('my_prefix_', $nonSiteaccessAwareRoutes); + self::assertContains('foo_route', $nonSiteaccessAwareRoutes); + self::assertContains('my_prefix_', $nonSiteaccessAwareRoutes); } /** @@ -327,8 +328,8 @@ public function testLocaleConfiguration() { $this->load(['locale_conversion' => ['foo' => 'bar']]); $conversionMap = $this->container->getParameter('ibexa.locale.conversion_map'); - $this->assertArrayHasKey('foo', $conversionMap); - $this->assertSame('bar', $conversionMap['foo']); + self::assertArrayHasKey('foo', $conversionMap); + self::assertSame('bar', $conversionMap['foo']); } public function testRepositoriesConfiguration() @@ -372,13 +373,13 @@ public function testRepositoriesConfiguration() ], ]; $this->load(['repositories' => $repositories]); - $this->assertTrue($this->container->hasParameter('ibexa.repositories')); + self::assertTrue($this->container->hasParameter('ibexa.repositories')); foreach ($repositories as &$repositoryConfig) { $repositoryConfig['storage']['config'] = []; $repositoryConfig['search']['config'] = []; } - $this->assertSame($repositories, $this->container->getParameter('ibexa.repositories')); + self::assertSame($repositories, $this->container->getParameter('ibexa.repositories')); } /** @@ -387,15 +388,15 @@ public function testRepositoriesConfiguration() public function testRepositoriesConfigurationFieldGroups($repositories, $expectedRepositories) { $this->load(['repositories' => $repositories]); - $this->assertTrue($this->container->hasParameter('ibexa.repositories')); + self::assertTrue($this->container->hasParameter('ibexa.repositories')); $repositoriesPar = $this->container->getParameter('ibexa.repositories'); - $this->assertEquals(count($repositories), count($repositoriesPar)); + self::assertEquals(count($repositories), count($repositoriesPar)); foreach ($repositoriesPar as $key => $repo) { - $this->assertArrayHasKey($key, $expectedRepositories); - $this->assertArrayHasKey('fields_groups', $repo); - $this->assertEqualsCanonicalizing($expectedRepositories[$key]['fields_groups'], $repo['fields_groups'], 'Invalid fields groups element'); + self::assertArrayHasKey($key, $expectedRepositories); + self::assertArrayHasKey('fields_groups', $repo); + self::assertEqualsCanonicalizing($expectedRepositories[$key]['fields_groups'], $repo['fields_groups'], 'Invalid fields groups element'); } } @@ -547,9 +548,9 @@ public function testRepositoriesConfigurationEmpty() ], ]; $this->load(['repositories' => $repositories]); - $this->assertTrue($this->container->hasParameter('ibexa.repositories')); + self::assertTrue($this->container->hasParameter('ibexa.repositories')); - $this->assertSame( + self::assertSame( $expectedRepositories, $this->container->getParameter('ibexa.repositories') ); @@ -588,9 +589,9 @@ public function testRepositoriesConfigurationStorageEmpty() ], ]; $this->load(['repositories' => $repositories]); - $this->assertTrue($this->container->hasParameter('ibexa.repositories')); + self::assertTrue($this->container->hasParameter('ibexa.repositories')); - $this->assertSame( + self::assertSame( $expectedRepositories, $this->container->getParameter('ibexa.repositories') ); @@ -629,9 +630,9 @@ public function testRepositoriesConfigurationSearchEmpty() ], ]; $this->load(['repositories' => $repositories]); - $this->assertTrue($this->container->hasParameter('ibexa.repositories')); + self::assertTrue($this->container->hasParameter('ibexa.repositories')); - $this->assertSame( + self::assertSame( $expectedRepositories, $this->container->getParameter('ibexa.repositories') ); @@ -700,9 +701,9 @@ public function testRepositoriesConfigurationCompatibility() ], ]; $this->load(['repositories' => $repositories]); - $this->assertTrue($this->container->hasParameter('ibexa.repositories')); + self::assertTrue($this->container->hasParameter('ibexa.repositories')); - $this->assertSame( + self::assertSame( $expectedRepositories, $this->container->getParameter('ibexa.repositories') ); @@ -739,9 +740,9 @@ public function testRepositoriesConfigurationCompatibility2() ], ]; $this->load(['repositories' => $repositories]); - $this->assertTrue($this->container->hasParameter('ibexa.repositories')); + self::assertTrue($this->container->hasParameter('ibexa.repositories')); - $this->assertSame( + self::assertSame( $expectedRepositories, $this->container->getParameter('ibexa.repositories') ); @@ -827,7 +828,7 @@ public function testUrlAliasConfiguration() ], ]); $parsedConfig = $this->container->getParameter('ibexa.url_alias.slug_converter'); - $this->assertSame( + self::assertSame( $configuration, $parsedConfig ); diff --git a/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php b/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php index a8c7b11634..2091945493 100644 --- a/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php +++ b/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Security\PolicyProvider; use Ibexa\Bundle\Core\DependencyInjection\Security\PolicyProvider\PoliciesConfigBuilder; diff --git a/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProviderTest.php b/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProviderTest.php index 29547bd69c..06167b7f5d 100644 --- a/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProviderTest.php +++ b/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProviderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Security\PolicyProvider; use Ibexa\Bundle\Core\DependencyInjection\Configuration\ConfigBuilderInterface; @@ -31,12 +32,12 @@ public function testSingleYaml() $configBuilder = $this->createMock(ConfigBuilderInterface::class); foreach ($files as $file) { $configBuilder - ->expects($this->once()) + ->expects(self::once()) ->method('addResource') - ->with($this->equalTo(new FileResource($file))); + ->with(self::equalTo(new FileResource($file))); } $configBuilder - ->expects($this->once()) + ->expects(self::once()) ->method('addConfig') ->with($expectedConfig); @@ -67,14 +68,14 @@ public function testMultipleYaml() $configBuilder = $this->createMock(ConfigBuilderInterface::class); $configBuilder - ->expects($this->exactly(count($files))) + ->expects(self::exactly(count($files))) ->method('addResource') ->willReturnMap([ - [$this->equalTo(new FileResource($file1)), null], - [$this->equalTo(new FileResource($file2)), null], + [self::equalTo(new FileResource($file1)), null], + [self::equalTo(new FileResource($file2)), null], ]); $configBuilder - ->expects($this->once()) + ->expects(self::once()) ->method('addConfig') ->with($expectedConfig); diff --git a/tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryType/TestQueryType.php b/tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryType/TestQueryType.php index 46a6465741..f1bfd78440 100644 --- a/tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryType/TestQueryType.php +++ b/tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryType/TestQueryType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Stub\QueryTypeBundle\QueryType; use Ibexa\Core\QueryType\QueryType; diff --git a/tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryTypeBundle.php b/tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryTypeBundle.php index 0cec57d2b6..3f926a0df8 100644 --- a/tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryTypeBundle.php +++ b/tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryTypeBundle.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Stub\QueryTypeBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; diff --git a/tests/bundle/Core/DependencyInjection/Stub/StubPolicyProvider.php b/tests/bundle/Core/DependencyInjection/Stub/StubPolicyProvider.php index b0e3251468..411f7d0369 100644 --- a/tests/bundle/Core/DependencyInjection/Stub/StubPolicyProvider.php +++ b/tests/bundle/Core/DependencyInjection/Stub/StubPolicyProvider.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Stub; use Ibexa\Bundle\Core\DependencyInjection\Configuration\ConfigBuilderInterface; diff --git a/tests/bundle/Core/DependencyInjection/Stub/StubYamlPolicyProvider.php b/tests/bundle/Core/DependencyInjection/Stub/StubYamlPolicyProvider.php index 8057d5b2e3..7bc6e421e0 100644 --- a/tests/bundle/Core/DependencyInjection/Stub/StubYamlPolicyProvider.php +++ b/tests/bundle/Core/DependencyInjection/Stub/StubYamlPolicyProvider.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Stub; use Ibexa\Bundle\Core\DependencyInjection\Security\PolicyProvider\YamlPolicyProvider; diff --git a/tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php b/tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php index c5cfc6ebbf..a7f2cb09bf 100644 --- a/tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php +++ b/tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\EventListener; use Ibexa\Bundle\Core\EventListener\BackgroundIndexingTerminateListener; @@ -85,34 +86,34 @@ public function testIndexing(array $values = null, $logger = null) { $contentHandlerMock = $this->createMock(Content\Handler::class); $this->persistenceMock - ->expects($this->once()) + ->expects(self::once()) ->method('contentHandler') ->willReturn($contentHandlerMock); if ($values) { $contentHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadContentInfo') ->with(33) ->willReturn(new ContentInfo(['id' => 33, 'currentVersionNo' => 2, 'isPublished' => true])); $contentHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('load') ->with(33, 2) ->willReturn(new Content()); $this->searchMock - ->expects($this->once()) + ->expects(self::once()) ->method('indexContent') - ->with($this->isInstanceOf(Content::class)); + ->with(self::isInstanceOf(Content::class)); - $this->searchMock->expects($this->never())->method('indexLocation'); - $this->searchMock->expects($this->never())->method('deleteContent'); - $this->searchMock->expects($this->never())->method('deleteLocation'); + $this->searchMock->expects(self::never())->method('indexLocation'); + $this->searchMock->expects(self::never())->method('deleteContent'); + $this->searchMock->expects(self::never())->method('deleteLocation'); } else { - $contentHandlerMock->expects($this->never())->method($this->anything()); - $this->searchMock->expects($this->never())->method($this->anything()); + $contentHandlerMock->expects(self::never())->method(self::anything()); + $this->searchMock->expects(self::never())->method(self::anything()); } foreach ((array) $values as $value) { @@ -127,11 +128,11 @@ public function testIndexing(array $values = null, $logger = null) $this->listener->setLogger($logger); if ($values) { - $logger->expects($this->once()) + $logger->expects(self::once()) ->method('warning') - ->with($this->isType('string')); + ->with(self::isType('string')); } else { - $logger->expects($this->never()) + $logger->expects(self::never()) ->method('warning'); } } @@ -144,9 +145,9 @@ public function indexDeleteProvider() $location = new Location(['id' => 44, 'contentId' => 33]); $info = new ContentInfo(['id' => 33, 'currentVersionNo' => 2, 'isPublished' => true]); - $infoReturn = $this->returnValue($info); - $infoReturnUnPublished = $this->returnValue(new ContentInfo(['id' => 33, 'currentVersionNo' => 2])); - $returnThrow = $this->throwException(new NotFoundException('content', '33')); + $infoReturn = self::returnValue($info); + $infoReturnUnPublished = self::returnValue(new ContentInfo(['id' => 33, 'currentVersionNo' => 2])); + $returnThrow = self::throwException(new NotFoundException('content', '33')); return [ [$location, $infoReturn, $returnThrow], @@ -170,30 +171,30 @@ public function testIndexDelete($value, $infoReturn, $contentReturn = null) { $contentHandlerMock = $this->createMock(Content\Handler::class); $this->persistenceMock - ->expects($this->once()) + ->expects(self::once()) ->method('contentHandler') ->willReturn($contentHandlerMock); $contentHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadContentInfo') ->with(33) ->will($infoReturn); if ($contentReturn) { $contentHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('load') ->with(33, 2) ->will($contentReturn); } else { $contentHandlerMock - ->expects($this->never()) + ->expects(self::never()) ->method('load'); } - $this->searchMock->expects($this->never())->method('indexContent'); - $this->searchMock->expects($this->never())->method('indexLocation'); + $this->searchMock->expects(self::never())->method('indexContent'); + $this->searchMock->expects(self::never())->method('indexLocation'); if ($value instanceof Location) { $contentId = $value->contentId; @@ -206,17 +207,17 @@ public function testIndexDelete($value, $infoReturn, $contentReturn = null) } $this->searchMock - ->expects($this->once()) + ->expects(self::once()) ->method('deleteContent') ->with($contentId); if ($locationId) { $this->searchMock - ->expects($this->once()) + ->expects(self::once()) ->method('deleteLocation') ->with($locationId); } else { - $this->searchMock->expects($this->never())->method('deleteLocation'); + $this->searchMock->expects(self::never())->method('deleteLocation'); } $this->listener->reindex(); diff --git a/tests/bundle/Core/EventListener/BackwardCompatibleCommandListenerTest.php b/tests/bundle/Core/EventListener/BackwardCompatibleCommandListenerTest.php index 56288b4132..c42ce15f20 100644 --- a/tests/bundle/Core/EventListener/BackwardCompatibleCommandListenerTest.php +++ b/tests/bundle/Core/EventListener/BackwardCompatibleCommandListenerTest.php @@ -42,7 +42,7 @@ protected function setUp(): void public function testGetSubscribedEvents(): void { - $this->assertSame( + self::assertSame( [ ConsoleEvents::COMMAND => [['onConsoleCommand', 128]], ], @@ -95,14 +95,14 @@ public function testDeprecationWarningIsEmittedForDeprecatedAlias(): void private function assertOutputNotContainsDeprecationWarning(BufferedOutput $output): void { // Output buffer should be empty - $this->assertEquals('', $output->fetch()); + self::assertEquals('', $output->fetch()); } private function assertOutputContainsDeprecationWarning(BufferedOutput $output): void { $outputString = trim(preg_replace(self::MORE_THAN_2_WHITESPACES_AND_NEW_LINES, ' ', $output->fetch())); - $this->assertEquals( + self::assertEquals( '[WARNING] Command alias "ezplatform:command" is deprecated since 3.3 and will be removed in in 4.0. Use "ibexa:command" instead.', $outputString ); diff --git a/tests/bundle/Core/EventListener/ConfigScopeListenerTest.php b/tests/bundle/Core/EventListener/ConfigScopeListenerTest.php index 9fa06d9a31..f1ab814569 100644 --- a/tests/bundle/Core/EventListener/ConfigScopeListenerTest.php +++ b/tests/bundle/Core/EventListener/ConfigScopeListenerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\EventListener; use Ibexa\Bundle\Core\EventListener\ConfigScopeListener; @@ -39,7 +40,7 @@ protected function setUp(): void public function testGetSubscribedEvents() { - $this->assertSame( + self::assertSame( [ MVCEvents::CONFIG_SCOPE_CHANGE => ['onConfigScopeChange', 100], MVCEvents::CONFIG_SCOPE_RESTORE => ['onConfigScopeChange', 100], @@ -53,17 +54,17 @@ public function testOnConfigScopeChange() $siteAccess = new SiteAccess('test'); $event = new ScopeChangeEvent($siteAccess); $this->configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('setDefaultScope') ->with($siteAccess->name); $this->viewManager - ->expects($this->once()) + ->expects(self::once()) ->method('setSiteAccess') ->with($siteAccess); foreach ($this->viewProviders as $viewProvider) { $viewProvider - ->expects($this->once()) + ->expects(self::once()) ->method('setSiteAccess') ->with($siteAccess); } @@ -71,7 +72,7 @@ public function testOnConfigScopeChange() $listener = new ConfigScopeListener([$this->configResolver], $this->viewManager); $listener->setViewProviders($this->viewProviders); $listener->onConfigScopeChange($event); - $this->assertSame($siteAccess, $event->getSiteAccess()); + self::assertSame($siteAccess, $event->getSiteAccess()); } } diff --git a/tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php b/tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php index e622883af0..32a4636527 100644 --- a/tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php +++ b/tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\EventListener; use Ibexa\Bundle\Core\EventListener\ConsoleCommandListener; @@ -57,7 +58,7 @@ protected function setUp(): void public function testGetSubscribedEvents() { - $this->assertSame( + self::assertSame( [ ConsoleEvents::COMMAND => [['onConsoleCommand', 128]], ], @@ -70,7 +71,7 @@ public function testInvalidSiteAccessDev() $this->expectException(InvalidSiteAccessException::class); $this->expectExceptionMessageMatches('/^Invalid SiteAccess \'foo\', matched by .+\\. Valid SiteAccesses are/'); - $this->dispatcher->expects($this->never()) + $this->dispatcher->expects(self::never()) ->method('dispatch'); $input = new ArrayInput(['--siteaccess' => 'foo'], $this->inputDefinition); $event = new ConsoleCommandEvent($this->command, $input, $this->testOutput); @@ -83,7 +84,7 @@ public function testInvalidSiteAccessProd() $this->expectException(InvalidSiteAccessException::class); $this->expectExceptionMessageMatches('/^Invalid SiteAccess \'foo\', matched by .+\\.$/'); - $this->dispatcher->expects($this->never()) + $this->dispatcher->expects(self::never()) ->method('dispatch'); $input = new ArrayInput(['--siteaccess' => 'foo'], $this->inputDefinition); $event = new ConsoleCommandEvent($this->command, $input, $this->testOutput); @@ -93,22 +94,22 @@ public function testInvalidSiteAccessProd() public function testValidSiteAccess() { - $this->dispatcher->expects($this->once()) + $this->dispatcher->expects(self::once()) ->method('dispatch'); $input = new ArrayInput(['--siteaccess' => 'site1'], $this->inputDefinition); $event = new ConsoleCommandEvent($this->command, $input, $this->testOutput); $this->listener->onConsoleCommand($event); - $this->assertEquals(new SiteAccess('site1', 'cli'), $this->siteAccess); + self::assertEquals(new SiteAccess('site1', 'cli'), $this->siteAccess); } public function testDefaultSiteAccess() { - $this->dispatcher->expects($this->once()) + $this->dispatcher->expects(self::once()) ->method('dispatch'); $input = new ArrayInput([], $this->inputDefinition); $event = new ConsoleCommandEvent($this->command, $input, $this->testOutput); $this->listener->onConsoleCommand($event); - $this->assertEquals(new SiteAccess('default', 'cli'), $this->siteAccess); + self::assertEquals(new SiteAccess('default', 'cli'), $this->siteAccess); } private function getSiteAccessProviderMock(): SiteAccess\SiteAccessProviderInterface diff --git a/tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php b/tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php index dbbcf820e7..0d5411352f 100644 --- a/tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php +++ b/tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\EventListener; use Ibexa\Bundle\Core\EventListener\ContentDownloadRouteReferenceListener; @@ -101,9 +102,9 @@ public function testGeneratesCorrectRouteReference() $this ->translationHelperMock - ->expects($this->once()) + ->expects(self::once()) ->method('getTranslatedField') - ->will($this->returnValue($content->getField('file', 'eng-GB'))); + ->will(self::returnValue($content->getField('file', 'eng-GB'))); $eventListener->onRouteReferenceGeneration($event); self::assertEquals('42', $routeReference->get(ContentDownloadRouteReferenceListener::OPT_CONTENT_ID)); diff --git a/tests/bundle/Core/EventListener/ExceptionListenerTest.php b/tests/bundle/Core/EventListener/ExceptionListenerTest.php index b5588dbd2b..2e4a3a0a04 100644 --- a/tests/bundle/Core/EventListener/ExceptionListenerTest.php +++ b/tests/bundle/Core/EventListener/ExceptionListenerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\EventListener; use Exception; @@ -84,7 +85,7 @@ public function testNotFoundException() $translatedMessage = 'translated message'; $this->translator - ->expects($this->once()) + ->expects(self::once()) ->method('trans') ->with($messageTemplate, $translationParams) ->willReturn($translatedMessage); @@ -107,7 +108,7 @@ public function testUnauthorizedException() $translatedMessage = 'translated message'; $this->translator - ->expects($this->once()) + ->expects(self::once()) ->method('trans') ->with($messageTemplate, $translationParams) ->willReturn($translatedMessage); @@ -134,7 +135,7 @@ public function testBadRequestException(Exception $exception) $translatedMessage = 'translated message'; $this->translator - ->expects($this->once()) + ->expects(self::once()) ->method('trans') ->with($messageTemplate, $translationParams) ->willReturn($translatedMessage); @@ -171,7 +172,7 @@ public function testOtherRepositoryException(Exception $exception) $translatedMessage = 'translated message'; $this->translator - ->expects($this->once()) + ->expects(self::once()) ->method('trans') ->with($messageTemplate, $translationParams) ->willReturn($translatedMessage); @@ -204,7 +205,7 @@ public function testUntouchedException() $exception = new \RuntimeException('foo'); $event = $this->generateExceptionEvent($exception); $this->translator - ->expects($this->never()) + ->expects(self::never()) ->method('trans'); $this->listener->onKernelException($event); diff --git a/tests/bundle/Core/EventListener/IndexRequestListenerTest.php b/tests/bundle/Core/EventListener/IndexRequestListenerTest.php index 9b7ea21ae8..1bf3e56cbd 100644 --- a/tests/bundle/Core/EventListener/IndexRequestListenerTest.php +++ b/tests/bundle/Core/EventListener/IndexRequestListenerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\EventListener; use Ibexa\Bundle\Core\EventListener\IndexRequestListener; @@ -54,7 +55,7 @@ protected function setUp(): void public function testSubscribedEvents() { - $this->assertSame( + self::assertSame( [ KernelEvents::REQUEST => [ ['onKernelRequestIndex', 40], @@ -70,14 +71,14 @@ public function testSubscribedEvents() public function testOnKernelRequestIndexOnIndexPage($requestPath, $configuredIndexPath, $expectedIndexPath) { $this->configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('index_page') - ->will($this->returnValue($configuredIndexPath)); + ->will(self::returnValue($configuredIndexPath)); $this->request->attributes->set('semanticPathinfo', $requestPath); $this->indexRequestEventListener->onKernelRequestIndex($this->event); - $this->assertEquals($expectedIndexPath, $this->request->attributes->get('semanticPathinfo')); - $this->assertTrue($this->request->attributes->get('needsRedirect')); + self::assertEquals($expectedIndexPath, $this->request->attributes->get('semanticPathinfo')); + self::assertTrue($this->request->attributes->get('needsRedirect')); } public function indexPageProvider() @@ -97,7 +98,7 @@ public function testOnKernelRequestIndexNotOnIndexPage() { $this->request->attributes->set('semanticPathinfo', '/anyContent'); $this->indexRequestEventListener->onKernelRequestIndex($this->event); - $this->assertFalse($this->request->attributes->has('needsRedirect')); + self::assertFalse($this->request->attributes->has('needsRedirect')); } } diff --git a/tests/bundle/Core/EventListener/LocaleListenerTest.php b/tests/bundle/Core/EventListener/LocaleListenerTest.php index 0f31f7a755..d361a5323a 100644 --- a/tests/bundle/Core/EventListener/LocaleListenerTest.php +++ b/tests/bundle/Core/EventListener/LocaleListenerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\EventListener; use Ibexa\Bundle\Core\EventListener\LocaleListener; @@ -35,7 +36,7 @@ protected function setUp(): void $this->requestStack = new RequestStack(); $parameterBagMock = $this->createMock(ParameterBag::class); - $parameterBagMock->expects($this->never())->method($this->anything()); + $parameterBagMock->expects(self::never())->method(self::anything()); $requestMock = $this->createMock(Request::class); $requestMock->attributes = $parameterBagMock; @@ -49,16 +50,16 @@ protected function setUp(): void public function testOnKernelRequest(array $configuredLanguages, array $convertedLocalesValueMap, $expectedLocale): void { $this->configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('languages') - ->will($this->returnValue($configuredLanguages)); + ->will(self::returnValue($configuredLanguages)); $this->localeConverter - ->expects($this->atLeastOnce()) + ->expects(self::atLeastOnce()) ->method('convertToPOSIX') ->will( - $this->returnValueMap($convertedLocalesValueMap) + self::returnValueMap($convertedLocalesValueMap) ); $defaultLocale = 'en'; @@ -73,7 +74,7 @@ public function testOnKernelRequest(array $configuredLanguages, array $converted HttpKernelInterface::MASTER_REQUEST ) ); - $this->assertSame($expectedLocale, $request->attributes->get('_locale')); + self::assertSame($expectedLocale, $request->attributes->get('_locale')); } public function onKernelRequestProvider(): array diff --git a/tests/bundle/Core/EventListener/OriginalRequestListenerTest.php b/tests/bundle/Core/EventListener/OriginalRequestListenerTest.php index 9f5fd12a12..392fc4c4e3 100644 --- a/tests/bundle/Core/EventListener/OriginalRequestListenerTest.php +++ b/tests/bundle/Core/EventListener/OriginalRequestListenerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\EventListener; use Ibexa\Bundle\Core\EventListener\OriginalRequestListener; @@ -18,7 +19,7 @@ class OriginalRequestListenerTest extends TestCase { public function testGetSubscribedEvents() { - $this->assertSame( + self::assertSame( [ KernelEvents::REQUEST => ['onKernelRequest', 200], ], @@ -37,7 +38,7 @@ public function testOnKernelRequestNotMaster() $listener = new OriginalRequestListener(); $listener->onKernelRequest($event); - $this->assertFalse($request->attributes->has('_ez_original_request')); + self::assertFalse($request->attributes->has('_ez_original_request')); } public function testOnKernelRequestNoOriginalRequest() @@ -51,7 +52,7 @@ public function testOnKernelRequestNoOriginalRequest() $listener = new OriginalRequestListener(); $listener->onKernelRequest($event); - $this->assertFalse($request->attributes->has('_ez_original_request')); + self::assertFalse($request->attributes->has('_ez_original_request')); } public function testOnKernelRequestWithOriginalRequest() @@ -79,7 +80,7 @@ public function testOnKernelRequestWithOriginalRequest() $listener = new OriginalRequestListener(); $listener->onKernelRequest($event); - $this->assertEquals($expectedOriginalRequest, $request->attributes->get('_ez_original_request')); + self::assertEquals($expectedOriginalRequest, $request->attributes->get('_ez_original_request')); ClockMock::withClockMock(false); } diff --git a/tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php b/tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php index 671d5aa046..d527fee9a2 100644 --- a/tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php +++ b/tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php @@ -34,7 +34,7 @@ protected function setUp(): void public function testSubscribedEvents(): void { - $this->assertSame( + self::assertSame( [ KernelEvents::REQUEST => [ ['onKernelRequest', 255], @@ -46,6 +46,7 @@ public function testSubscribedEvents(): void /** * @dataProvider validRequestDataProvider + * * @doesNotPerformAssertions */ public function testOnKernelRequest(Request $request): void diff --git a/tests/bundle/Core/EventListener/RequestEventListenerTest.php b/tests/bundle/Core/EventListener/RequestEventListenerTest.php index 259c6e390d..47b798c0e5 100644 --- a/tests/bundle/Core/EventListener/RequestEventListenerTest.php +++ b/tests/bundle/Core/EventListener/RequestEventListenerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\EventListener; use Ibexa\Bundle\Core\EventListener\RequestEventListener; @@ -68,7 +69,7 @@ protected function setUp(): void public function testSubscribedEvents() { - $this->assertSame( + self::assertSame( [ KernelEvents::REQUEST => [ ['onKernelRequestForward', 10], @@ -82,7 +83,7 @@ public function testSubscribedEvents() public function testOnKernelRequestForwardSubRequest() { $this->httpKernel - ->expects($this->never()) + ->expects(self::never()) ->method('handle'); $event = new RequestEvent($this->httpKernel, new Request(), HttpKernelInterface::SUB_REQUEST); @@ -107,15 +108,15 @@ public function testOnKernelRequestForward() $response = new Response('Success!'); $this->httpKernel - ->expects($this->once()) + ->expects(self::once()) ->method('handle') - ->with($this->equalTo($expectedForwardRequest)) - ->will($this->returnValue($response)); + ->with(self::equalTo($expectedForwardRequest)) + ->will(self::returnValue($response)); $event = new RequestEvent($this->httpKernel, $request, HttpKernelInterface::MASTER_REQUEST); $this->requestEventListener->onKernelRequestForward($event); - $this->assertSame($response, $event->getResponse()); - $this->assertTrue($event->isPropagationStopped()); + self::assertSame($response, $event->getResponse()); + self::assertTrue($event->isPropagationStopped()); ClockMock::withClockMock(false); } @@ -124,7 +125,7 @@ public function testOnKernelRequestRedirectSubRequest() { $event = new RequestEvent($this->httpKernel, new Request(), HttpKernelInterface::SUB_REQUEST); $this->requestEventListener->onKernelRequestRedirect($event); - $this->assertFalse($event->hasResponse()); + self::assertFalse($event->hasResponse()); } public function testOnKernelRequestRedirect() @@ -139,13 +140,13 @@ public function testOnKernelRequestRedirect() $event = new RequestEvent($this->httpKernel, $request, HttpKernelInterface::MASTER_REQUEST); $this->requestEventListener->onKernelRequestRedirect($event); - $this->assertTrue($event->hasResponse()); + self::assertTrue($event->hasResponse()); /** @var \Symfony\Component\HttpFoundation\RedirectResponse $response */ $response = $event->getResponse(); - $this->assertInstanceOf(RedirectResponse::class, $response); - $this->assertSame("$semanticPathinfo?some=thing", $response->getTargetUrl()); - $this->assertSame(301, $response->getStatusCode()); - $this->assertTrue($event->isPropagationStopped()); + self::assertInstanceOf(RedirectResponse::class, $response); + self::assertSame("$semanticPathinfo?some=thing", $response->getTargetUrl()); + self::assertSame(301, $response->getStatusCode()); + self::assertTrue($event->isPropagationStopped()); } public function testOnKernelRequestRedirectWithLocationId() @@ -161,14 +162,14 @@ public function testOnKernelRequestRedirectWithLocationId() $event = new RequestEvent($this->httpKernel, $request, HttpKernelInterface::MASTER_REQUEST); $this->requestEventListener->onKernelRequestRedirect($event); - $this->assertTrue($event->hasResponse()); + self::assertTrue($event->hasResponse()); /** @var \Symfony\Component\HttpFoundation\RedirectResponse $response */ $response = $event->getResponse(); - $this->assertInstanceOf(RedirectResponse::class, $response); - $this->assertSame("$semanticPathinfo?some=thing", $response->getTargetUrl()); - $this->assertSame(301, $response->getStatusCode()); - $this->assertEquals(123, $response->headers->get('X-Location-Id')); - $this->assertTrue($event->isPropagationStopped()); + self::assertInstanceOf(RedirectResponse::class, $response); + self::assertSame("$semanticPathinfo?some=thing", $response->getTargetUrl()); + self::assertSame(301, $response->getStatusCode()); + self::assertEquals(123, $response->headers->get('X-Location-Id')); + self::assertTrue($event->isPropagationStopped()); } public function testOnKernelRequestRedirectPrependSiteaccess() @@ -187,20 +188,20 @@ public function testOnKernelRequestRedirectPrependSiteaccess() $expectedURI = "/test$semanticPathinfo"; $siteaccessMatcher - ->expects($this->once()) + ->expects(self::once()) ->method('analyseLink') ->with($semanticPathinfo) - ->will($this->returnValue($expectedURI)); + ->will(self::returnValue($expectedURI)); $event = new RequestEvent($this->httpKernel, $request, HttpKernelInterface::MASTER_REQUEST); $this->requestEventListener->onKernelRequestRedirect($event); - $this->assertTrue($event->hasResponse()); + self::assertTrue($event->hasResponse()); /** @var \Symfony\Component\HttpFoundation\RedirectResponse $response */ $response = $event->getResponse(); - $this->assertInstanceOf(RedirectResponse::class, $response); - $this->assertSame("$expectedURI?some=thing", $response->getTargetUrl()); - $this->assertSame(301, $response->getStatusCode()); - $this->assertTrue($event->isPropagationStopped()); + self::assertInstanceOf(RedirectResponse::class, $response); + self::assertSame("$expectedURI?some=thing", $response->getTargetUrl()); + self::assertSame(301, $response->getStatusCode()); + self::assertTrue($event->isPropagationStopped()); } } diff --git a/tests/bundle/Core/EventListener/RoutingListenerTest.php b/tests/bundle/Core/EventListener/RoutingListenerTest.php index f171163834..e6dbf63ee7 100644 --- a/tests/bundle/Core/EventListener/RoutingListenerTest.php +++ b/tests/bundle/Core/EventListener/RoutingListenerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\EventListener; use Ibexa\Bundle\Core\EventListener\RoutingListener; @@ -41,7 +42,7 @@ protected function setUp(): void public function testGetSubscribedEvents() { $listener = new RoutingListener($this->configResolver, $this->urlAliasRouter, $this->urlAliasGenerator); - $this->assertSame( + self::assertSame( [ MVCEvents::SITEACCESS => ['onSiteAccessMatch', 200], ], @@ -54,10 +55,10 @@ public function testOnSiteAccessMatch() $rootLocationId = 123; $excludedUriPrefixes = ['/foo/bar', '/baz']; $this->configResolver - ->expects($this->any()) + ->expects(self::any()) ->method('getParameter') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['content.tree_root.location_id', null, null, $rootLocationId], ['content.tree_root.excluded_uri_prefixes', null, null, $excludedUriPrefixes], @@ -66,15 +67,15 @@ public function testOnSiteAccessMatch() ); $this->urlAliasRouter - ->expects($this->once()) + ->expects(self::once()) ->method('setRootLocationId') ->with($rootLocationId); $this->urlAliasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('setRootLocationId') ->with($rootLocationId); $this->urlAliasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('setExcludedUriPrefixes') ->with($excludedUriPrefixes); diff --git a/tests/bundle/Core/EventListener/SessionInitByPostListenerTest.php b/tests/bundle/Core/EventListener/SessionInitByPostListenerTest.php index 764624af71..c47cc1f2d4 100644 --- a/tests/bundle/Core/EventListener/SessionInitByPostListenerTest.php +++ b/tests/bundle/Core/EventListener/SessionInitByPostListenerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\EventListener; use Ibexa\Bundle\Core\EventListener\SessionInitByPostListener; @@ -30,7 +31,7 @@ protected function setUp(): void public function testGetSubscribedEvents() { - $this->assertSame( + self::assertSame( [ MVCEvents::SITEACCESS => ['onSiteAccessMatch', 249], ], @@ -45,14 +46,14 @@ public function testOnSiteAccessMatchNoSessionService() $event = new PostSiteAccessMatchEvent(new SiteAccess('test'), $request, HttpKernelInterface::MAIN_REQUEST); $listener = new SessionInitByPostListener(); - $this->assertNull($listener->onSiteAccessMatch($event)); + self::assertNull($listener->onSiteAccessMatch($event)); } public function testOnSiteAccessMatchSubRequest() { $session = $this->createMock(SessionInterface::class); $session - ->expects($this->never()) + ->expects(self::never()) ->method('getName'); $request = new Request(); @@ -69,16 +70,16 @@ public function testOnSiteAccessMatchRequestNoSessionName() $session = $this->createMock(SessionInterface::class); $session ->method('getName') - ->will($this->returnValue($sessionName)); + ->will(self::returnValue($sessionName)); $session - ->expects($this->once()) + ->expects(self::once()) ->method('isStarted') - ->will($this->returnValue(false)); + ->will(self::returnValue(false)); $session - ->expects($this->never()) + ->expects(self::never()) ->method('setId'); $session - ->expects($this->never()) + ->expects(self::never()) ->method('start'); $request = new Request(); @@ -97,17 +98,17 @@ public function testOnSiteAccessMatchNewSessionName() $session ->method('getName') - ->will($this->returnValue($sessionName)); + ->will(self::returnValue($sessionName)); $session - ->expects($this->once()) + ->expects(self::once()) ->method('isStarted') - ->will($this->returnValue(false)); + ->will(self::returnValue(false)); $session - ->expects($this->once()) + ->expects(self::once()) ->method('setId') ->with($sessionId); $session - ->expects($this->once()) + ->expects(self::once()) ->method('start'); $request = new Request(); diff --git a/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php b/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php index e7c93d7a76..7654eae3b7 100644 --- a/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php +++ b/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\EventListener; use Ibexa\Bundle\Core\EventListener\SessionSetDynamicNameListener; @@ -52,7 +53,7 @@ protected function setUp(): void public function testGetSubscribedEvents() { $listener = new SessionSetDynamicNameListener($this->configResolver, $this->sessionStorageFactory); - $this->assertSame( + self::assertSame( [ MVCEvents::SITEACCESS => ['onSiteAccessMatch', 250], ], @@ -65,7 +66,7 @@ public function testOnSiteAccessMatchNoSession() $request = new Request(); $this->sessionStorage - ->expects($this->never()) + ->expects(self::never()) ->method('setOptions'); $listener = new SessionSetDynamicNameListener($this->configResolver, $this->sessionStorageFactory); $listener->onSiteAccessMatch(new PostSiteAccessMatchEvent(new SiteAccess('test'), $request, HttpKernelInterface::MASTER_REQUEST)); @@ -74,7 +75,7 @@ public function testOnSiteAccessMatchNoSession() public function testOnSiteAccessMatchSubRequest() { $this->sessionStorage - ->expects($this->never()) + ->expects(self::never()) ->method('setOptions'); $listener = new SessionSetDynamicNameListener($this->configResolver, $this->sessionStorageFactory); $listener->onSiteAccessMatch(new PostSiteAccessMatchEvent(new SiteAccess('test'), new Request(), HttpKernelInterface::SUB_REQUEST)); @@ -83,7 +84,7 @@ public function testOnSiteAccessMatchSubRequest() public function testOnSiteAccessMatchNonNativeSessionStorage() { $this->configResolver - ->expects($this->never()) + ->expects(self::never()) ->method('getParameter'); $listener = new SessionSetDynamicNameListener( $this->configResolver, @@ -101,14 +102,14 @@ public function testOnSiteAccessMatch(SiteAccess $siteAccess, $configuredSession $request->setSession(new Session(new MockArraySessionStorage())); $this->sessionStorage - ->expects($this->once()) + ->expects(self::once()) ->method('setOptions') ->with($expectedSessionStorageOptions); $this->configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('session') - ->will($this->returnValue($configuredSessionStorageOptions)); + ->will(self::returnValue($configuredSessionStorageOptions)); $listener = new SessionSetDynamicNameListener($this->configResolver, $this->sessionStorageFactory); $listener->onSiteAccessMatch(new PostSiteAccessMatchEvent($siteAccess, $request, HttpKernelInterface::MAIN_REQUEST)); @@ -154,14 +155,14 @@ public function testOnSiteAccessMatchNoConfiguredSessionName() $sessionOptions = $configuredSessionStorageOptions + ['name' => "eZSESSID_$sessionName"]; $this->sessionStorage - ->expects($this->once()) + ->expects(self::once()) ->method('setOptions') ->with($sessionOptions); $this->configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('session') - ->will($this->returnValue($configuredSessionStorageOptions)); + ->will(self::returnValue($configuredSessionStorageOptions)); $listener = new SessionSetDynamicNameListener($this->configResolver, $this->sessionStorageFactory); $listener->onSiteAccessMatch(new PostSiteAccessMatchEvent(new SiteAccess('test'), $request, HttpKernelInterface::MAIN_REQUEST)); diff --git a/tests/bundle/Core/EventListener/SiteAccessListenerTest.php b/tests/bundle/Core/EventListener/SiteAccessListenerTest.php index 7f2156b7fd..6f11eae33e 100644 --- a/tests/bundle/Core/EventListener/SiteAccessListenerTest.php +++ b/tests/bundle/Core/EventListener/SiteAccessListenerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\EventListener; use Ibexa\Bundle\Core\EventListener\SiteAccessListener; @@ -33,7 +34,7 @@ protected function setUp(): void public function testGetSubscribedEvents() { - $this->assertSame( + self::assertSame( [ MVCEvents::SITEACCESS => ['onSiteAccessMatch', 255], ], @@ -74,10 +75,10 @@ public function testOnSiteAccessMatchMasterRequest( $semanticPathinfo = substr($uri, $semanticPathinfoPos); $matcher = $this->createMock(SiteAccess\URILexer::class); $matcher - ->expects($this->once()) + ->expects(self::once()) ->method('analyseURI') ->with($uri) - ->will($this->returnValue($semanticPathinfo)); + ->will(self::returnValue($semanticPathinfo)); } else { $matcher = $this->createMock(SiteAccess\Matcher::class); } diff --git a/tests/bundle/Core/EventListener/Stubs/FooServiceInterface.php b/tests/bundle/Core/EventListener/Stubs/FooServiceInterface.php index ae9a05f613..25fe0825eb 100644 --- a/tests/bundle/Core/EventListener/Stubs/FooServiceInterface.php +++ b/tests/bundle/Core/EventListener/Stubs/FooServiceInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\EventListener\Stubs; interface FooServiceInterface diff --git a/tests/bundle/Core/EventListener/Stubs/TestOutput.php b/tests/bundle/Core/EventListener/Stubs/TestOutput.php index 6840ff7ce6..f8c58522d2 100644 --- a/tests/bundle/Core/EventListener/Stubs/TestOutput.php +++ b/tests/bundle/Core/EventListener/Stubs/TestOutput.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\EventListener\Stubs; use Symfony\Component\Console\Output\Output; diff --git a/tests/bundle/Core/EventListener/Stubs/ViewManager.php b/tests/bundle/Core/EventListener/Stubs/ViewManager.php index 5ce6a82cdf..3e64a90b80 100644 --- a/tests/bundle/Core/EventListener/Stubs/ViewManager.php +++ b/tests/bundle/Core/EventListener/Stubs/ViewManager.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\EventListener\Stubs; use Ibexa\Contracts\Core\Repository\Values\Content\Content; diff --git a/tests/bundle/Core/EventListener/Stubs/ViewProvider.php b/tests/bundle/Core/EventListener/Stubs/ViewProvider.php index ed0ce528c3..43911d0643 100644 --- a/tests/bundle/Core/EventListener/Stubs/ViewProvider.php +++ b/tests/bundle/Core/EventListener/Stubs/ViewProvider.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\EventListener\Stubs; use Ibexa\Core\MVC\Symfony\SiteAccess; diff --git a/tests/bundle/Core/EventListener/ViewControllerListenerTest.php b/tests/bundle/Core/EventListener/ViewControllerListenerTest.php index 3bb0e06cf0..eca0f8c9f1 100644 --- a/tests/bundle/Core/EventListener/ViewControllerListenerTest.php +++ b/tests/bundle/Core/EventListener/ViewControllerListenerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\EventListener; use Ibexa\Bundle\Core\EventListener\ViewControllerListener; @@ -75,7 +76,7 @@ protected function setUp(): void public function testGetSubscribedEvents() { - $this->assertSame( + self::assertSame( [KernelEvents::CONTROLLER => ['getController', 10]], $this->controllerListener::getSubscribedEvents() ); @@ -87,7 +88,7 @@ public function testGetControllerNoBuilder() $this->request->attributes->set('_controller', $initialController); $this->viewBuilderRegistry - ->expects($this->once()) + ->expects(self::once()) ->method('getFromRegistry') ->with('Foo::bar') ->willReturn(null); @@ -101,7 +102,7 @@ public function testGetControllerWithClosure() $this->request->attributes->set('_controller', $initialController); $this->viewBuilderRegistry - ->expects($this->once()) + ->expects(self::once()) ->method('getFromRegistry') ->with($initialController) ->willReturn(null); @@ -128,31 +129,31 @@ public function testGetControllerMatchedView() ); $this->viewBuilderRegistry - ->expects($this->once()) + ->expects(self::once()) ->method('getFromRegistry') - ->will($this->returnValue($this->viewBuilderMock)); + ->will(self::returnValue($this->viewBuilderMock)); $viewObject = new ContentView($templateIdentifier); $viewObject->setControllerReference(new ControllerReference($customController)); $this->viewBuilderMock - ->expects($this->once()) + ->expects(self::once()) ->method('buildView') - ->will($this->returnValue($viewObject)); + ->will(self::returnValue($viewObject)); $this->controllerResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getController') - ->will($this->returnValue(static function () {})); + ->will(self::returnValue(static function () {})); $this->controllerListener->getController($this->event); - $this->assertEquals($customController, $this->request->attributes->get('_controller')); + self::assertEquals($customController, $this->request->attributes->get('_controller')); $expectedView = new ContentView(); $expectedView->setTemplateIdentifier($templateIdentifier); $expectedView->setControllerReference(new ControllerReference($customController)); - $this->assertEquals($expectedView, $this->request->attributes->get('view')); + self::assertEquals($expectedView, $this->request->attributes->get('view')); } public function testGetControllerEmitsProperEvents(): void @@ -161,26 +162,26 @@ public function testGetControllerEmitsProperEvents(): void }; $this->viewBuilderRegistry - ->expects($this->once()) + ->expects(self::once()) ->method('getFromRegistry') ->willReturn($this->viewBuilderMock); $this->viewBuilderMock - ->expects($this->once()) + ->expects(self::once()) ->method('buildView') ->willReturn($viewObject); $this->eventDispatcher - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('dispatch') ->withConsecutive( [ - $this->isInstanceOf(FilterViewBuilderParametersEvent::class), - $this->identicalTo(ViewEvents::FILTER_BUILDER_PARAMETERS), + self::isInstanceOf(FilterViewBuilderParametersEvent::class), + self::identicalTo(ViewEvents::FILTER_BUILDER_PARAMETERS), ], [ - $this->isInstanceOf(PostBuildViewEvent::class), - $this->isNull(), + self::isInstanceOf(PostBuildViewEvent::class), + self::isNull(), ] ) ->willReturnArgument(0); diff --git a/tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php b/tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php index e4b73994ee..66e3bc5c14 100644 --- a/tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php +++ b/tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\EventSubscriber; use Ibexa\Bundle\Core\EventSubscriber\CrowdinRequestLocaleSubscriber; @@ -28,7 +29,7 @@ public function testSetLocale(Request $request, $shouldHaveCustomLocale) $subscriber = new CrowdinRequestLocaleSubscriber(); $subscriber->setInContextAcceptLanguage($event); - $this->assertEquals( + self::assertEquals( $shouldHaveCustomLocale, 'ach_UG' === $event->getRequest()->getPreferredLanguage(), 'The custom ach_UG locale was expected to be set by the event subscriber' diff --git a/tests/bundle/Core/Fragment/DecoratedFragmentRendererTest.php b/tests/bundle/Core/Fragment/DecoratedFragmentRendererTest.php index f43f8e4cd9..f3cc7c9d48 100644 --- a/tests/bundle/Core/Fragment/DecoratedFragmentRendererTest.php +++ b/tests/bundle/Core/Fragment/DecoratedFragmentRendererTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Fragment; use Ibexa\Bundle\Core\Fragment\DecoratedFragmentRenderer; @@ -30,7 +31,7 @@ public function testSetFragmentPathNotRoutableRenderer() $matcher = $this->createMock(SiteAccess\URILexer::class); $siteAccess = new SiteAccess('test', 'test', $matcher); $matcher - ->expects($this->never()) + ->expects(self::never()) ->method('analyseLink'); $renderer = new DecoratedFragmentRenderer($this->innerRenderer); @@ -43,14 +44,14 @@ public function testSetFragmentPath() $matcher = $this->createMock(SiteAccess\URILexer::class); $siteAccess = new SiteAccess('test', 'test', $matcher); $matcher - ->expects($this->once()) + ->expects(self::once()) ->method('analyseLink') ->with('/foo') - ->will($this->returnValue('/bar/foo')); + ->will(self::returnValue('/bar/foo')); $innerRenderer = $this->createMock(RoutableFragmentRenderer::class); $innerRenderer - ->expects($this->once()) + ->expects(self::once()) ->method('setFragmentPath') ->with('/bar/foo'); $renderer = new DecoratedFragmentRenderer($innerRenderer); @@ -62,12 +63,12 @@ public function testGetName() { $name = 'test'; $this->innerRenderer - ->expects($this->once()) + ->expects(self::once()) ->method('getName') - ->will($this->returnValue($name)); + ->will(self::returnValue($name)); $renderer = new DecoratedFragmentRenderer($this->innerRenderer); - $this->assertSame($name, $renderer->getName()); + self::assertSame($name, $renderer->getName()); } public function testRendererAbsoluteUrl() @@ -77,13 +78,13 @@ public function testRendererAbsoluteUrl() $options = ['foo' => 'bar']; $expectedReturn = '/_fragment?foo=bar'; $this->innerRenderer - ->expects($this->once()) + ->expects(self::once()) ->method('render') ->with($url, $request, $options) - ->will($this->returnValue($expectedReturn)); + ->will(self::returnValue($expectedReturn)); $renderer = new DecoratedFragmentRenderer($this->innerRenderer); - $this->assertSame($expectedReturn, $renderer->render($url, $request, $options)); + self::assertSame($expectedReturn, $renderer->render($url, $request, $options)); } public function testRendererControllerReference() @@ -100,18 +101,18 @@ public function testRendererControllerReference() $options = ['foo' => 'bar']; $expectedReturn = '/_fragment?foo=bar'; $this->innerRenderer - ->expects($this->once()) + ->expects(self::once()) ->method('render') ->with($reference, $request, $options) - ->will($this->returnValue($expectedReturn)); + ->will(self::returnValue($expectedReturn)); $renderer = new DecoratedFragmentRenderer($this->innerRenderer); - $this->assertSame($expectedReturn, $renderer->render($reference, $request, $options)); - $this->assertTrue(isset($reference->attributes['serialized_siteaccess'])); + self::assertSame($expectedReturn, $renderer->render($reference, $request, $options)); + self::assertTrue(isset($reference->attributes['serialized_siteaccess'])); $serializedSiteAccess = json_encode($siteAccess); - $this->assertSame($serializedSiteAccess, $reference->attributes['serialized_siteaccess']); - $this->assertTrue(isset($reference->attributes['serialized_siteaccess_matcher'])); - $this->assertSame( + self::assertSame($serializedSiteAccess, $reference->attributes['serialized_siteaccess']); + self::assertTrue(isset($reference->attributes['serialized_siteaccess_matcher'])); + self::assertSame( $this->getSerializer()->serialize( $siteAccess->matcher, 'json', diff --git a/tests/bundle/Core/Fragment/DirectFragmentRendererTest.php b/tests/bundle/Core/Fragment/DirectFragmentRendererTest.php index 8d18c1aacf..821570169d 100644 --- a/tests/bundle/Core/Fragment/DirectFragmentRendererTest.php +++ b/tests/bundle/Core/Fragment/DirectFragmentRendererTest.php @@ -29,9 +29,9 @@ public function testSubRequestBuilding(): void { $controllerResolver = $this->getControllerResolverInterfaceMock(); $controllerResolver - ->expects($this->any()) + ->expects(self::any()) ->method('getController') - ->with($this->callback(function (Request $request) { + ->with(self::callback(function (Request $request) { $this->assertEquals('/_fragment', $request->getPathInfo()); $this->assertEquals('some::controller', $request->attributes->get('_controller')); $this->assertEquals('attribute_value', $request->attributes->get('some')); @@ -65,8 +65,8 @@ public function testSubRequestBuilding(): void $directFragmentRenderer = $this->getDirectFragmentRenderer($controllerResolver); $response = $directFragmentRenderer->render($controllerReference, $request); - $this->assertInstanceOf(Response::class, $response); - $this->assertSame('rendered_response', $response->getContent()); + self::assertInstanceOf(Response::class, $response); + self::assertSame('rendered_response', $response->getContent()); } public function testControllerResponse(): void @@ -82,8 +82,8 @@ public function testControllerResponse(): void $directFragmentRenderer = $this->getDirectFragmentRenderer($controllerResolver); $response = $directFragmentRenderer->render('', new Request(), []); - $this->assertInstanceOf(Response::class, $response); - $this->assertSame('response_body', $response->getContent()); + self::assertInstanceOf(Response::class, $response); + self::assertSame('response_body', $response->getContent()); } public function testControllerViewResponse(): void @@ -102,7 +102,7 @@ public function testControllerViewResponse(): void $templateRendererMock = $this->getTemplateRendererMock(); $templateRendererMock - ->expects($this->once()) + ->expects(self::once()) ->method('render') ->with($contentView) ->willReturn('rendered_' . $contentView->getTemplateIdentifier()); @@ -113,8 +113,8 @@ public function testControllerViewResponse(): void ); $response = $directFragmentRenderer->render('', new Request(), []); - $this->assertInstanceOf(Response::class, $response); - $this->assertSame('rendered_template_identifier', $response->getContent()); + self::assertInstanceOf(Response::class, $response); + self::assertSame('rendered_template_identifier', $response->getContent()); } public function testControllerStringResponse(): void @@ -130,8 +130,8 @@ public function testControllerStringResponse(): void $directFragmentRenderer = $this->getDirectFragmentRenderer($controllerResolver); $response = $directFragmentRenderer->render('', new Request(), []); - $this->assertInstanceOf(Response::class, $response); - $this->assertSame('some_prerendered_response', $response->getContent()); + self::assertInstanceOf(Response::class, $response); + self::assertSame('some_prerendered_response', $response->getContent()); } public function testControllerUnhandledStringResponse(): void diff --git a/tests/bundle/Core/Fragment/FragmentListenerFactoryTest.php b/tests/bundle/Core/Fragment/FragmentListenerFactoryTest.php index b9c9f276e9..c5bd583a58 100644 --- a/tests/bundle/Core/Fragment/FragmentListenerFactoryTest.php +++ b/tests/bundle/Core/Fragment/FragmentListenerFactoryTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Fragment; use Ibexa\Bundle\Core\Fragment\FragmentListenerFactory; @@ -31,15 +32,15 @@ public function testBuildFragmentListener($requestUri, $isFragmentCandidate) $factory = new FragmentListenerFactory(); $factory->setRequestStack($requestStack); $listener = $factory->buildFragmentListener($uriSigner, $baseFragmentPath, $listenerClass); - $this->assertInstanceOf($listenerClass, $listener); + self::assertInstanceOf($listenerClass, $listener); $refListener = new ReflectionObject($listener); $refFragmentPath = $refListener->getProperty('fragmentPath'); $refFragmentPath->setAccessible(true); if ($isFragmentCandidate) { - $this->assertSame($requestUri, $refFragmentPath->getValue($listener)); + self::assertSame($requestUri, $refFragmentPath->getValue($listener)); } else { - $this->assertSame($baseFragmentPath, $refFragmentPath->getValue($listener)); + self::assertSame($baseFragmentPath, $refFragmentPath->getValue($listener)); } } @@ -66,7 +67,7 @@ public function testBuildFragmentListenerNoRequest() FragmentListener::class ); - $this->assertNull($listener); + self::assertNull($listener); } } diff --git a/tests/bundle/Core/Fragment/FragmentRendererBaseTest.php b/tests/bundle/Core/Fragment/FragmentRendererBaseTest.php index c62c68b6df..7687cdc7ec 100644 --- a/tests/bundle/Core/Fragment/FragmentRendererBaseTest.php +++ b/tests/bundle/Core/Fragment/FragmentRendererBaseTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Fragment; use Ibexa\Core\MVC\Symfony\Component\Serializer\SerializerTrait; @@ -37,18 +38,18 @@ public function testRendererControllerReferenceWithCompoundMatcher(): Controller $options = ['foo' => 'bar']; $expectedReturn = '/_fragment?foo=bar'; $this->innerRenderer - ->expects($this->once()) + ->expects(self::once()) ->method('render') ->with($reference, $request, $options) - ->will($this->returnValue($expectedReturn)); + ->will(self::returnValue($expectedReturn)); $renderer = $this->getRenderer(); - $this->assertSame($expectedReturn, $renderer->render($reference, $request, $options)); - $this->assertArrayHasKey('serialized_siteaccess', $reference->attributes); + self::assertSame($expectedReturn, $renderer->render($reference, $request, $options)); + self::assertArrayHasKey('serialized_siteaccess', $reference->attributes); $serializedSiteAccess = json_encode($siteAccess); - $this->assertSame($serializedSiteAccess, $reference->attributes['serialized_siteaccess']); - $this->assertArrayHasKey('serialized_siteaccess_matcher', $reference->attributes); - $this->assertSame( + self::assertSame($serializedSiteAccess, $reference->attributes['serialized_siteaccess']); + self::assertArrayHasKey('serialized_siteaccess_matcher', $reference->attributes); + self::assertSame( $this->getSerializer()->serialize( $siteAccess->matcher, 'json', @@ -56,9 +57,9 @@ public function testRendererControllerReferenceWithCompoundMatcher(): Controller ), $reference->attributes['serialized_siteaccess_matcher'] ); - $this->assertArrayHasKey('serialized_siteaccess_sub_matchers', $reference->attributes); + self::assertArrayHasKey('serialized_siteaccess_sub_matchers', $reference->attributes); foreach ($siteAccess->matcher->getSubMatchers() as $subMatcher) { - $this->assertSame( + self::assertSame( $this->getSerializer()->serialize( $subMatcher, 'json', diff --git a/tests/bundle/Core/Fragment/InlineFragmentRendererTest.php b/tests/bundle/Core/Fragment/InlineFragmentRendererTest.php index 461504678f..9f06e83014 100644 --- a/tests/bundle/Core/Fragment/InlineFragmentRendererTest.php +++ b/tests/bundle/Core/Fragment/InlineFragmentRendererTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Fragment; use Ibexa\Bundle\Core\Fragment\InlineFragmentRenderer; @@ -31,18 +32,18 @@ public function testRendererControllerReference() $options = ['foo' => 'bar']; $expectedReturn = '/_fragment?foo=bar'; $this->innerRenderer - ->expects($this->once()) + ->expects(self::once()) ->method('render') ->with($reference, $request, $options) - ->will($this->returnValue($expectedReturn)); + ->will(self::returnValue($expectedReturn)); $renderer = new InlineFragmentRenderer($this->innerRenderer); - $this->assertSame($expectedReturn, $renderer->render($reference, $request, $options)); - $this->assertTrue(isset($reference->attributes['serialized_siteaccess'])); + self::assertSame($expectedReturn, $renderer->render($reference, $request, $options)); + self::assertTrue(isset($reference->attributes['serialized_siteaccess'])); $serializedSiteAccess = json_encode($siteAccess); - $this->assertSame($serializedSiteAccess, $reference->attributes['serialized_siteaccess']); - $this->assertTrue(isset($reference->attributes['serialized_siteaccess_matcher'])); - $this->assertSame( + self::assertSame($serializedSiteAccess, $reference->attributes['serialized_siteaccess']); + self::assertTrue(isset($reference->attributes['serialized_siteaccess_matcher'])); + self::assertSame( $this->getSerializer()->serialize( $siteAccess->matcher, 'json', @@ -50,20 +51,20 @@ public function testRendererControllerReference() ), $reference->attributes['serialized_siteaccess_matcher'] ); - $this->assertTrue(isset($reference->attributes['semanticPathinfo'])); - $this->assertSame('/foo/bar', $reference->attributes['semanticPathinfo']); - $this->assertTrue(isset($reference->attributes['viewParametersString'])); - $this->assertSame('/(foo)/bar', $reference->attributes['viewParametersString']); + self::assertTrue(isset($reference->attributes['semanticPathinfo'])); + self::assertSame('/foo/bar', $reference->attributes['semanticPathinfo']); + self::assertTrue(isset($reference->attributes['viewParametersString'])); + self::assertSame('/(foo)/bar', $reference->attributes['viewParametersString']); } public function testRendererControllerReferenceWithCompoundMatcher(): ControllerReference { $reference = parent::testRendererControllerReferenceWithCompoundMatcher(); - $this->assertArrayHasKey('semanticPathinfo', $reference->attributes); - $this->assertSame('/foo/bar', $reference->attributes['semanticPathinfo']); - $this->assertArrayHasKey('viewParametersString', $reference->attributes); - $this->assertSame('/(foo)/bar', $reference->attributes['viewParametersString']); + self::assertArrayHasKey('semanticPathinfo', $reference->attributes); + self::assertSame('/foo/bar', $reference->attributes['semanticPathinfo']); + self::assertArrayHasKey('viewParametersString', $reference->attributes); + self::assertSame('/(foo)/bar', $reference->attributes['viewParametersString']); return $reference; } diff --git a/tests/bundle/Core/Imagine/AliasCleanerTest.php b/tests/bundle/Core/Imagine/AliasCleanerTest.php index 87f33fc186..cb1b3b4224 100644 --- a/tests/bundle/Core/Imagine/AliasCleanerTest.php +++ b/tests/bundle/Core/Imagine/AliasCleanerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine; use Ibexa\Bundle\Core\Imagine\AliasCleaner; @@ -29,7 +30,7 @@ public function testRemoveAliases() { $originalPath = 'foo/bar/test.jpg'; $this->resolver - ->expects($this->once()) + ->expects(self::once()) ->method('remove') ->with([$originalPath], []); diff --git a/tests/bundle/Core/Imagine/AliasGeneratorTest.php b/tests/bundle/Core/Imagine/AliasGeneratorTest.php index 4b7e278ade..6ec452ff9e 100644 --- a/tests/bundle/Core/Imagine/AliasGeneratorTest.php +++ b/tests/bundle/Core/Imagine/AliasGeneratorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine; use Ibexa\Bundle\Core\Imagine\AliasGenerator; @@ -109,7 +110,7 @@ protected function setUp(): void */ public function testSupportsValue($value, $isSupported) { - $this->assertSame($isSupported, $this->aliasGenerator->supportsValue($value)); + self::assertSame($isSupported, $this->aliasGenerator->supportsValue($value)); } /** @@ -155,28 +156,28 @@ public function testGetVariationNotStored() $expectedUrl = "http://localhost/foo/bar/image_$variationName.jpg"; $this->ioResolver - ->expects($this->once()) + ->expects(self::once()) ->method('isStored') ->with($originalPath, $variationName) - ->will($this->returnValue(false)); + ->will(self::returnValue(false)); $this->logger - ->expects($this->once()) + ->expects(self::once()) ->method('debug'); $binary = $this->createMock(BinaryInterface::class); $this->dataLoader - ->expects($this->once()) + ->expects(self::once()) ->method('find') ->with($originalPath) - ->will($this->returnValue($binary)); + ->will(self::returnValue($binary)); $this->filterManager - ->expects($this->once()) + ->expects(self::once()) ->method('applyFilter') ->with($binary, $variationName) - ->will($this->returnValue($binary)); + ->will(self::returnValue($binary)); $this->ioResolver - ->expects($this->once()) + ->expects(self::once()) ->method('store') ->with($binary, $originalPath, $variationName); @@ -210,20 +211,20 @@ public function testGetVariationOriginal() $expectedUrl = 'http://localhost/foo/bar/image.jpg'; $this->ioResolver - ->expects($this->never()) + ->expects(self::never()) ->method('isStored') ->with($originalPath, $variationName) - ->will($this->returnValue(false)); + ->will(self::returnValue(false)); $this->logger - ->expects($this->once()) + ->expects(self::once()) ->method('debug'); $this->ioResolver - ->expects($this->once()) + ->expects(self::once()) ->method('resolve') ->with($originalPath, $variationName) - ->will($this->returnValue($expectedUrl)); + ->will(self::returnValue($expectedUrl)); $expected = new ImageVariation( [ @@ -236,7 +237,7 @@ public function testGetVariationOriginal() 'width' => $imageWidth, ] ); - $this->assertEquals($expected, $this->decoratedAliasGenerator->getVariation($field, new VersionInfo(), $variationName)); + self::assertEquals($expected, $this->decoratedAliasGenerator->getVariation($field, new VersionInfo(), $variationName)); } /** @@ -262,41 +263,41 @@ public function testGetVariationNotStoredHavingReferences() $expectedUrl = "http://localhost/foo/bar/image_$variationName.jpg"; $this->ioResolver - ->expects($this->once()) + ->expects(self::once()) ->method('isStored') ->with($originalPath, $variationName) - ->will($this->returnValue(false)); + ->will(self::returnValue(false)); $this->logger - ->expects($this->once()) + ->expects(self::once()) ->method('debug'); $binary = $this->createMock(BinaryInterface::class); $this->dataLoader - ->expects($this->once()) + ->expects(self::once()) ->method('find') ->with($originalPath) - ->will($this->returnValue($binary)); + ->will(self::returnValue($binary)); // Filter manager is supposed to be called 3 times to generate references, and then passed variation. $this->filterManager - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('applyFilter') ->with($binary, $reference2) - ->will($this->returnValue($binary)); + ->will(self::returnValue($binary)); $this->filterManager - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('applyFilter') ->with($binary, $reference1) - ->will($this->returnValue($binary)); + ->will(self::returnValue($binary)); $this->filterManager - ->expects($this->at(2)) + ->expects(self::at(2)) ->method('applyFilter') ->with($binary, $variationName) - ->will($this->returnValue($binary)); + ->will(self::returnValue($binary)); $this->ioResolver - ->expects($this->once()) + ->expects(self::once()) ->method('store') ->with($binary, $originalPath, $variationName); @@ -325,23 +326,23 @@ public function testGetVariationAlreadyStored() $expectedUrl = "http://localhost/foo/bar/image_$variationName.jpg"; $this->ioResolver - ->expects($this->once()) + ->expects(self::once()) ->method('isStored') ->with($originalPath, $variationName) - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); $this->logger - ->expects($this->once()) + ->expects(self::once()) ->method('debug'); $this->dataLoader - ->expects($this->never()) + ->expects(self::never()) ->method('find'); $this->filterManager - ->expects($this->never()) + ->expects(self::never()) ->method('applyFilter'); $this->ioResolver - ->expects($this->never()) + ->expects(self::never()) ->method('store'); $this->assertImageVariationIsCorrect( @@ -359,9 +360,9 @@ public function testGetVariationOriginalNotFound() $this->expectException(SourceImageNotFoundException::class); $this->dataLoader - ->expects($this->once()) + ->expects(self::once()) ->method('find') - ->will($this->throwException(new NotLoadableException())); + ->will(self::throwException(new NotLoadableException())); $field = new Field(['value' => new ImageValue()]); $this->aliasGenerator->getVariation($field, new VersionInfo(), 'foo'); @@ -378,30 +379,30 @@ public function testGetVariationInvalidVariation() $field = new Field(['value' => $imageValue]); $this->ioResolver - ->expects($this->once()) + ->expects(self::once()) ->method('isStored') ->with($originalPath, $variationName) - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); $this->logger - ->expects($this->once()) + ->expects(self::once()) ->method('debug'); $this->dataLoader - ->expects($this->never()) + ->expects(self::never()) ->method('find'); $this->filterManager - ->expects($this->never()) + ->expects(self::never()) ->method('applyFilter'); $this->ioResolver - ->expects($this->never()) + ->expects(self::never()) ->method('store'); $this->ioResolver - ->expects($this->once()) + ->expects(self::once()) ->method('resolve') ->with($originalPath, $variationName) - ->will($this->throwException(new NotResolvableException())); + ->will(self::throwException(new NotResolvableException())); $this->aliasGenerator->getVariation($field, new VersionInfo(), $variationName); } @@ -436,47 +437,47 @@ protected function assertImageVariationIsCorrect( ); $this->ioResolver - ->expects($this->once()) + ->expects(self::once()) ->method('resolve') ->with($originalPath, $variationName) - ->will($this->returnValue($expectedUrl)); + ->will(self::returnValue($expectedUrl)); $this->variationPathGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('getVariationPath') ->with($originalPath, $variationName) ->willReturn($binaryFile->uri); $this->ioService - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFile') ->withAnyParameters() ->willReturn($binaryFile); $this->ioService - ->expects($this->once()) + ->expects(self::once()) ->method('getFileContents') ->with($binaryFile) ->willReturn('file contents mock'); $this->imagine - ->expects($this->once()) + ->expects(self::once()) ->method('load') ->with('file contents mock') - ->will($this->returnValue($this->image)); + ->will(self::returnValue($this->image)); $this->image - ->expects($this->once()) + ->expects(self::once()) ->method('getSize') - ->will($this->returnValue($this->box)); + ->will(self::returnValue($this->box)); $this->box - ->expects($this->once()) + ->expects(self::once()) ->method('getWidth') - ->will($this->returnValue($imageWidth)); + ->will(self::returnValue($imageWidth)); $this->box - ->expects($this->once()) + ->expects(self::once()) ->method('getHeight') - ->will($this->returnValue($imageHeight)); + ->will(self::returnValue($imageHeight)); $expected = new ImageVariation( [ @@ -489,7 +490,7 @@ protected function assertImageVariationIsCorrect( 'width' => $imageWidth, ] ); - $this->assertEquals( + self::assertEquals( $expected, $this->decoratedAliasGenerator->getVariation($field, new VersionInfo(), $variationName) ); diff --git a/tests/bundle/Core/Imagine/BinaryLoaderTest.php b/tests/bundle/Core/Imagine/BinaryLoaderTest.php index 61feb41f99..d3e0dcaffe 100644 --- a/tests/bundle/Core/Imagine/BinaryLoaderTest.php +++ b/tests/bundle/Core/Imagine/BinaryLoaderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine; use Ibexa\Bundle\Core\Imagine\BinaryLoader; @@ -38,10 +39,10 @@ public function testFindNotFound() $path = 'something.jpg'; $this->ioService - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFile') ->with($path) - ->will($this->throwException(new NotFoundException('foo', 'bar'))); + ->will(self::throwException(new NotFoundException('foo', 'bar'))); $this->binaryLoader->find($path); } @@ -52,10 +53,10 @@ public function testFindMissing() $path = 'something.jpg'; $this->ioService - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFile') ->with($path) - ->will($this->returnValue(new MissingBinaryFile())); + ->will(self::returnValue(new MissingBinaryFile())); $this->binaryLoader->find($path); } @@ -64,15 +65,15 @@ public function testFindBadPathRoot() { $path = 'var/site/storage/images/1/2/3/123-name/name.png'; $this->ioService - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFile') ->with($path) - ->will($this->throwException(new InvalidBinaryFileIdException($path))); + ->will(self::throwException(new InvalidBinaryFileIdException($path))); try { $this->binaryLoader->find($path); } catch (NotLoadableException $e) { - $this->assertStringContainsString( + self::assertStringContainsString( "Suggested value: '1/2/3/123-name/name.png'", $e->getMessage() ); diff --git a/tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php b/tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php index 8eb840485a..51789640ed 100644 --- a/tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php +++ b/tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\Cache\Resolver; use Ibexa\Bundle\Core\Imagine\Cache\Resolver\ProxyResolver; @@ -37,14 +38,14 @@ public function testResolveUsingProxyHostWithTrailingSlash() $resolvedPath = 'http://ibexa.co/var/site/storage/images/_aliases/medium/7/4/2/0/247-1-eng-GB/img_0885.jpg'; $this->resolver - ->expects($this->once()) + ->expects(self::once()) ->method('resolve') ->with($this->path, $this->filter) ->willReturn($resolvedPath); $expected = 'http://ezplatform.com/var/site/storage/images/_aliases/medium/7/4/2/0/247-1-eng-GB/img_0885.jpg'; - $this->assertEquals($expected, $proxyResolver->resolve($this->path, $this->filter)); + self::assertEquals($expected, $proxyResolver->resolve($this->path, $this->filter)); } public function testResolveAndRemovePortUsingProxyHost() @@ -55,14 +56,14 @@ public function testResolveAndRemovePortUsingProxyHost() $resolvedPath = 'http://ibexa.co:8060/var/site/storage/images/_aliases/medium/7/4/2/0/247-1-eng-GB/img_0885.jpg'; $this->resolver - ->expects($this->once()) + ->expects(self::once()) ->method('resolve') ->with($this->path, $this->filter) ->willReturn($resolvedPath); $expected = 'http://ibexa.co/var/site/storage/images/_aliases/medium/7/4/2/0/247-1-eng-GB/img_0885.jpg'; - $this->assertEquals($expected, $proxyResolver->resolve($this->path, $this->filter)); + self::assertEquals($expected, $proxyResolver->resolve($this->path, $this->filter)); } public function testResolveAndRemovePortUsingProxyHostWithTrailingSlash() @@ -73,14 +74,14 @@ public function testResolveAndRemovePortUsingProxyHostWithTrailingSlash() $resolvedPath = 'http://ezplatform.com:8080/var/site/storage/images/_aliases/medium/7/4/2/0/247-1-eng-GB/img_0885.jpg'; $this->resolver - ->expects($this->once()) + ->expects(self::once()) ->method('resolve') ->with($this->path, $this->filter) ->willReturn($resolvedPath); $expected = 'http://ibexa.co/var/site/storage/images/_aliases/medium/7/4/2/0/247-1-eng-GB/img_0885.jpg'; - $this->assertEquals($expected, $proxyResolver->resolve($this->path, $this->filter)); + self::assertEquals($expected, $proxyResolver->resolve($this->path, $this->filter)); } } diff --git a/tests/bundle/Core/Imagine/Cache/Resolver/RelativeResolverTest.php b/tests/bundle/Core/Imagine/Cache/Resolver/RelativeResolverTest.php index daeb67a9c6..076a558350 100644 --- a/tests/bundle/Core/Imagine/Cache/Resolver/RelativeResolverTest.php +++ b/tests/bundle/Core/Imagine/Cache/Resolver/RelativeResolverTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\Cache\Resolver; use Ibexa\Bundle\Core\Imagine\Cache\Resolver\RelativeResolver; @@ -32,12 +33,12 @@ public function testResolve() $expected = '/var/site/storage/images/_aliases/big/7/4/2/0/247-1-eng-GB/test.png'; $this->liipResolver - ->expects($this->once()) + ->expects(self::once()) ->method('resolve') ->with($path, $filter) ->willReturn($absolute); - $this->assertSame($expected, $resolver->resolve($path, $filter)); + self::assertSame($expected, $resolver->resolve($path, $filter)); } } diff --git a/tests/bundle/Core/Imagine/Cache/ResolverFactoryTest.php b/tests/bundle/Core/Imagine/Cache/ResolverFactoryTest.php index be4b5b7529..477e881673 100644 --- a/tests/bundle/Core/Imagine/Cache/ResolverFactoryTest.php +++ b/tests/bundle/Core/Imagine/Cache/ResolverFactoryTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\Cache; use Ibexa\Bundle\Core\Imagine\Cache\Resolver\RelativeResolver; @@ -40,7 +41,7 @@ protected function setUp(): void public function testCreateProxyCacheResolver() { $this->configResolver - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('hasParameter') ->with('image_host') ->willReturn(true); @@ -48,20 +49,20 @@ public function testCreateProxyCacheResolver() $host = 'http://ibexa.co'; $this->configResolver - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('getParameter') ->with('image_host') ->willReturn($host); $expected = new ProxyResolver($this->resolver, [$host]); - $this->assertEquals($expected, $this->factory->createCacheResolver()); + self::assertEquals($expected, $this->factory->createCacheResolver()); } public function testCreateRelativeCacheResolver() { $this->configResolver - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('hasParameter') ->with('image_host') ->willReturn(true); @@ -69,14 +70,14 @@ public function testCreateRelativeCacheResolver() $host = '/'; $this->configResolver - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('getParameter') ->with('image_host') ->willReturn($host); $expected = new RelativeResolver($this->resolver); - $this->assertEquals($expected, $this->factory->createCacheResolver()); + self::assertEquals($expected, $this->factory->createCacheResolver()); } } diff --git a/tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php b/tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php index e9bef8727f..5773c6490f 100644 --- a/tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php +++ b/tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\Filter; use Ibexa\Bundle\Core\Imagine\Filter\AbstractFilter; @@ -27,10 +28,10 @@ protected function getFilter() public function testGetSetOptions() { - $this->assertSame([], $this->filter->getOptions()); + self::assertSame([], $this->filter->getOptions()); $options = ['foo' => 'bar', 'some' => ['thing']]; $this->filter->setOptions($options); - $this->assertSame($options, $this->filter->getOptions()); + self::assertSame($options, $this->filter->getOptions()); } /** @@ -38,11 +39,11 @@ public function testGetSetOptions() */ public function testGetSetOptionNoDefaultValue($optionName, $value) { - $this->assertFalse($this->filter->hasOption($optionName)); - $this->assertNull($this->filter->getOption($optionName)); + self::assertFalse($this->filter->hasOption($optionName)); + self::assertNull($this->filter->getOption($optionName)); $this->filter->setOption($optionName, $value); - $this->assertTrue($this->filter->hasOption($optionName)); - $this->assertSame($value, $this->filter->getOption($optionName)); + self::assertTrue($this->filter->hasOption($optionName)); + self::assertSame($value, $this->filter->getOption($optionName)); } public function getSetOptionNoDefaulValueProvider() @@ -62,11 +63,11 @@ public function getSetOptionNoDefaulValueProvider() */ public function testGetSetOptionWithDefaultValue($optionName, $value, $defaultValue) { - $this->assertFalse($this->filter->hasOption($optionName)); - $this->assertSame($defaultValue, $this->filter->getOption($optionName, $defaultValue)); + self::assertFalse($this->filter->hasOption($optionName)); + self::assertSame($defaultValue, $this->filter->getOption($optionName, $defaultValue)); $this->filter->setOption($optionName, $value); - $this->assertTrue($this->filter->hasOption($optionName)); - $this->assertSame($value, $this->filter->getOption($optionName)); + self::assertTrue($this->filter->hasOption($optionName)); + self::assertSame($value, $this->filter->getOption($optionName)); } public function getSetOptionWithDefaulValueProvider() diff --git a/tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php b/tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php index 9b4f3e0b6f..d3e5383afd 100644 --- a/tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php +++ b/tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\Filter; use Ibexa\Bundle\Core\Imagine\Filter\FilterConfiguration; @@ -34,13 +35,13 @@ public function testGetOnlyImagineFilters() $this->filterConfiguration->set('bar', $barConfig); $this->configResolver - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('getParameter') ->with('image_variations') - ->will($this->returnValue([])); + ->will(self::returnValue([])); - $this->assertSame($fooConfig, $this->filterConfiguration->get('foo')); - $this->assertSame($barConfig, $this->filterConfiguration->get('bar')); + self::assertSame($fooConfig, $this->filterConfiguration->get('foo')); + self::assertSame($barConfig, $this->filterConfiguration->get('bar')); } public function testGetNoEzVariationInvalidImagineFilter() @@ -53,10 +54,10 @@ public function testGetNoEzVariationInvalidImagineFilter() $this->filterConfiguration->set('bar', $barConfig); $this->configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('image_variations') - ->will($this->returnValue([])); + ->will(self::returnValue([])); $this->filterConfiguration->get('foobar'); } @@ -72,10 +73,10 @@ public function testGetWithEzVariationNullConfiguration(): void 'some_variation' => null, ]; $this->configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('image_variations') - ->will($this->returnValue($variations)); + ->will(self::returnValue($variations)); self::assertSame( [ @@ -101,12 +102,12 @@ public function testGetEzVariationNoReference() 'some_variation' => ['filters' => $filters], ]; $this->configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('image_variations') - ->will($this->returnValue($variations)); + ->will(self::returnValue($variations)); - $this->assertSame( + self::assertSame( [ 'cache' => 'ibexa', 'data_loader' => 'ibexa', @@ -131,12 +132,12 @@ public function testGetEzVariationWithReference() 'some_variation' => ['filters' => $filters, 'reference' => $reference], ]; $this->configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('image_variations') - ->will($this->returnValue($variations)); + ->will(self::returnValue($variations)); - $this->assertSame( + self::assertSame( [ 'cache' => 'ibexa', 'data_loader' => 'ibexa', @@ -159,12 +160,12 @@ public function testGetEzVariationImagineFilters() 'some_variation' => ['reference' => $reference], ]; $this->configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('image_variations') - ->will($this->returnValue($variations)); + ->will(self::returnValue($variations)); - $this->assertSame( + self::assertSame( [ 'cache' => 'ibexa', 'data_loader' => 'ibexa', @@ -190,12 +191,12 @@ public function testGetEzVariationImagineOptions() 'some_variation' => ['reference' => $reference, 'filters' => $filters], ]; $this->configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('image_variations') - ->will($this->returnValue($variations)); + ->will(self::returnValue($variations)); - $this->assertSame( + self::assertSame( [ 'cache' => 'ibexa', 'data_loader' => 'ibexa', @@ -222,12 +223,12 @@ public function testAll() $eZVariationConfig = ['filters' => $filters, 'reference' => $reference]; $variations = ['some_variation' => $eZVariationConfig]; $this->configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('image_variations') - ->will($this->returnValue($variations)); + ->will(self::returnValue($variations)); - $this->assertEquals( + self::assertEquals( [ 'foo' => $fooConfig, 'bar' => $barConfig, diff --git a/tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php index 2c0e5c33cf..9f24739e42 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\Filter\Loader; use Ibexa\Bundle\Core\Imagine\Filter\Loader\BorderFilterLoader; @@ -44,41 +45,41 @@ public function testLoadDefaultColor() $palette = $this->createMock(PaletteInterface::class); $image - ->expects($this->once()) + ->expects(self::once()) ->method('palette') - ->will($this->returnValue($palette)); + ->will(self::returnValue($palette)); $palette - ->expects($this->once()) + ->expects(self::once()) ->method('color') ->with(BorderFilterLoader::DEFAULT_BORDER_COLOR) - ->will($this->returnValue($this->createMock(ColorInterface::class))); + ->will(self::returnValue($this->createMock(ColorInterface::class))); $box = $this->createMock(BoxInterface::class); $image - ->expects($this->once()) + ->expects(self::once()) ->method('getSize') - ->will($this->returnValue($box)); + ->will(self::returnValue($box)); $box - ->expects($this->any()) + ->expects(self::any()) ->method('getWidth') - ->will($this->returnValue(100)); + ->will(self::returnValue(100)); $box - ->expects($this->any()) + ->expects(self::any()) ->method('getHeight') - ->will($this->returnValue(100)); + ->will(self::returnValue(100)); $drawer = $this->createMock(DrawerInterface::class); $image - ->expects($this->once()) + ->expects(self::once()) ->method('draw') - ->will($this->returnValue($drawer)); + ->will(self::returnValue($drawer)); $drawer - ->expects($this->any()) + ->expects(self::any()) ->method('line') - ->will($this->returnValue($drawer)); + ->will(self::returnValue($drawer)); $loader = new BorderFilterLoader(); - $this->assertSame($image, $loader->load($image, $options)); + self::assertSame($image, $loader->load($image, $options)); } /** @@ -91,41 +92,41 @@ public function testLoad($thickX, $thickY, $color) $palette = $this->createMock(PaletteInterface::class); $image - ->expects($this->once()) + ->expects(self::once()) ->method('palette') - ->will($this->returnValue($palette)); + ->will(self::returnValue($palette)); $palette - ->expects($this->once()) + ->expects(self::once()) ->method('color') ->with($color) - ->will($this->returnValue($this->createMock(ColorInterface::class))); + ->will(self::returnValue($this->createMock(ColorInterface::class))); $box = $this->createMock(BoxInterface::class); $image - ->expects($this->once()) + ->expects(self::once()) ->method('getSize') - ->will($this->returnValue($box)); + ->will(self::returnValue($box)); $box - ->expects($this->any()) + ->expects(self::any()) ->method('getWidth') - ->will($this->returnValue(1000)); + ->will(self::returnValue(1000)); $box - ->expects($this->any()) + ->expects(self::any()) ->method('getHeight') - ->will($this->returnValue(1000)); + ->will(self::returnValue(1000)); $drawer = $this->createMock(DrawerInterface::class); $image - ->expects($this->once()) + ->expects(self::once()) ->method('draw') - ->will($this->returnValue($drawer)); + ->will(self::returnValue($drawer)); $drawer - ->expects($this->any()) + ->expects(self::any()) ->method('line') - ->will($this->returnValue($drawer)); + ->will(self::returnValue($drawer)); $loader = new BorderFilterLoader(); - $this->assertSame($image, $loader->load($image, $options)); + self::assertSame($image, $loader->load($image, $options)); } public function loadProvider() diff --git a/tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php index 304560dbb1..20c51c9d99 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\Filter\Loader; use Ibexa\Bundle\Core\Imagine\Filter\Loader\CropFilterLoader; @@ -58,12 +59,12 @@ public function testLoad() $image = $this->createMock(ImageInterface::class); $this->innerLoader - ->expects($this->once()) + ->expects(self::once()) ->method('load') ->with($image, ['size' => [$width, $height], 'start' => [$offsetX, $offsetY]]) - ->will($this->returnValue($image)); + ->will(self::returnValue($image)); - $this->assertSame($image, $this->loader->load($image, [$width, $height, $offsetX, $offsetY])); + self::assertSame($image, $this->loader->load($image, [$width, $height, $offsetX, $offsetY])); } } diff --git a/tests/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoaderTest.php index 5dbb38fe79..3130af9172 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoaderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\Filter\Loader; use Ibexa\Bundle\Core\Imagine\Filter\Loader\GrayscaleFilterLoader; @@ -18,16 +19,16 @@ public function testLoad() $image = $this->createMock(ImageInterface::class); $effects = $this->createMock(EffectsInterface::class); $image - ->expects($this->once()) + ->expects(self::once()) ->method('effects') - ->will($this->returnValue($effects)); + ->will(self::returnValue($effects)); $effects - ->expects($this->once()) + ->expects(self::once()) ->method('grayscale') - ->will($this->returnValue($effects)); + ->will(self::returnValue($effects)); $loader = new GrayscaleFilterLoader(); - $this->assertSame($image, $loader->load($image)); + self::assertSame($image, $loader->load($image)); } } diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoaderTest.php index 4a12e39d21..12bb24086a 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoaderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\Filter\Loader; use Ibexa\Bundle\Core\Imagine\Filter\FilterInterface; diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php index e831ea28a8..b673faae5d 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\Filter\Loader; use Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleDownOnlyFilterLoader; @@ -52,12 +53,12 @@ public function testLoad() $options = [123, 456]; $image = $this->createMock(ImageInterface::class); $this->innerLoader - ->expects($this->once()) + ->expects(self::once()) ->method('load') - ->with($image, $this->equalTo(['size' => $options, 'mode' => 'inset'])) - ->will($this->returnValue($image)); + ->with($image, self::equalTo(['size' => $options, 'mode' => 'inset'])) + ->will(self::returnValue($image)); - $this->assertSame($image, $this->loader->load($image, $options)); + self::assertSame($image, $this->loader->load($image, $options)); } } diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php index c0b197c55d..18fb21d62f 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\Filter\Loader; use Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleExactFilterLoader; @@ -52,12 +53,12 @@ public function testLoad() $options = [123, 456]; $image = $this->createMock(ImageInterface::class); $this->innerLoader - ->expects($this->once()) + ->expects(self::once()) ->method('load') ->with($image, ['size' => $options]) - ->will($this->returnValue($image)); + ->will(self::returnValue($image)); - $this->assertSame($image, $this->loader->load($image, $options)); + self::assertSame($image, $this->loader->load($image, $options)); } } diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php index 2e1b0565d1..4694a13611 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\Filter\Loader; use Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleFilterLoader; @@ -58,17 +59,17 @@ public function testLoadHeighten() $image = $this->createMock(ImageInterface::class); $image - ->expects($this->once()) + ->expects(self::once()) ->method('getSize') - ->will($this->returnValue($box)); + ->will(self::returnValue($box)); $this->innerLoader - ->expects($this->once()) + ->expects(self::once()) ->method('load') - ->with($image, $this->equalTo(['heighten' => $height])) - ->will($this->returnValue($image)); + ->with($image, self::equalTo(['heighten' => $height])) + ->will(self::returnValue($image)); - $this->assertSame($image, $this->loader->load($image, [$width, $height])); + self::assertSame($image, $this->loader->load($image, [$width, $height])); } public function testLoadWiden() @@ -81,17 +82,17 @@ public function testLoadWiden() $image = $this->createMock(ImageInterface::class); $image - ->expects($this->once()) + ->expects(self::once()) ->method('getSize') - ->will($this->returnValue($box)); + ->will(self::returnValue($box)); $this->innerLoader - ->expects($this->once()) + ->expects(self::once()) ->method('load') - ->with($image, $this->equalTo(['widen' => $width])) - ->will($this->returnValue($image)); + ->with($image, self::equalTo(['widen' => $width])) + ->will(self::returnValue($image)); - $this->assertSame($image, $this->loader->load($image, [$width, $height])); + self::assertSame($image, $this->loader->load($image, [$width, $height])); } } diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoaderTest.php index 1ef1db37cc..66eb355e5f 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoaderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\Filter\Loader; use Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleHeightDownOnlyFilterLoader; @@ -40,12 +41,12 @@ public function testLoad() $height = 123; $image = $this->createMock(ImageInterface::class); $this->innerLoader - ->expects($this->once()) + ->expects(self::once()) ->method('load') - ->with($image, $this->equalTo(['size' => [null, $height], 'mode' => 'inset'])) - ->will($this->returnValue($image)); + ->with($image, self::equalTo(['size' => [null, $height], 'mode' => 'inset'])) + ->will(self::returnValue($image)); - $this->assertSame($image, $this->loader->load($image, [$height])); + self::assertSame($image, $this->loader->load($image, [$height])); } } diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoaderTest.php index eb5c7a1c79..01ee8ee52f 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoaderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\Filter\Loader; use Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleHeightFilterLoader; @@ -40,12 +41,12 @@ public function testLoad() $height = 123; $image = $this->createMock(ImageInterface::class); $this->innerLoader - ->expects($this->once()) + ->expects(self::once()) ->method('load') - ->with($image, $this->equalTo(['heighten' => $height])) - ->will($this->returnValue($image)); + ->with($image, self::equalTo(['heighten' => $height])) + ->will(self::returnValue($image)); - $this->assertSame($image, $this->loader->load($image, [$height])); + self::assertSame($image, $this->loader->load($image, [$height])); } } diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php index 386701ad92..8f864ed075 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\Filter\Loader; use Ibexa\Bundle\Core\Imagine\Filter\Loader\ScalePercentFilterLoader; @@ -60,17 +61,17 @@ public function testLoad() $box = new Box($origWidth, $origHeight); $image = $this->createMock(ImageInterface::class); $image - ->expects($this->once()) + ->expects(self::once()) ->method('getSize') - ->will($this->returnValue($box)); + ->will(self::returnValue($box)); $this->innerLoader - ->expects($this->once()) + ->expects(self::once()) ->method('load') - ->with($image, $this->equalTo(['size' => [$expectedWidth, $expectedHeight]])) - ->will($this->returnValue($image)); + ->with($image, self::equalTo(['size' => [$expectedWidth, $expectedHeight]])) + ->will(self::returnValue($image)); - $this->assertSame($image, $this->loader->load($image, [$widthPercent, $heightPercent])); + self::assertSame($image, $this->loader->load($image, [$widthPercent, $heightPercent])); } } diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoaderTest.php index 215d771d03..d9b8cb51a4 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoaderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\Filter\Loader; use Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleWidthDownOnlyFilterLoader; @@ -40,12 +41,12 @@ public function testLoad() $width = 123; $image = $this->createMock(ImageInterface::class); $this->innerLoader - ->expects($this->once()) + ->expects(self::once()) ->method('load') - ->with($image, $this->equalTo(['size' => [$width, null], 'mode' => 'inset'])) - ->will($this->returnValue($image)); + ->with($image, self::equalTo(['size' => [$width, null], 'mode' => 'inset'])) + ->will(self::returnValue($image)); - $this->assertSame($image, $this->loader->load($image, [$width])); + self::assertSame($image, $this->loader->load($image, [$width])); } } diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoaderTest.php index 5cfd9a4bd6..e253d70dd7 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoaderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\Filter\Loader; use Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleWidthFilterLoader; @@ -40,12 +41,12 @@ public function testLoad() $width = 123; $image = $this->createMock(ImageInterface::class); $this->innerLoader - ->expects($this->once()) + ->expects(self::once()) ->method('load') - ->with($image, $this->equalTo(['widen' => $width])) - ->will($this->returnValue($image)); + ->with($image, self::equalTo(['widen' => $width])) + ->will(self::returnValue($image)); - $this->assertSame($image, $this->loader->load($image, [$width])); + self::assertSame($image, $this->loader->load($image, [$width])); } } diff --git a/tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php index e750a7d828..22c75881cf 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\Filter\Loader; use Ibexa\Bundle\Core\Imagine\Filter\FilterInterface; @@ -30,16 +31,16 @@ public function testLoadNoOption() { $image = $this->createMock(ImageInterface::class); $this->filter - ->expects($this->never()) + ->expects(self::never()) ->method('setOption'); $this->filter - ->expects($this->once()) + ->expects(self::once()) ->method('apply') ->with($image) - ->will($this->returnValue($image)); + ->will(self::returnValue($image)); - $this->assertSame($image, $this->loader->load($image)); + self::assertSame($image, $this->loader->load($image)); } /** @@ -49,17 +50,17 @@ public function testLoadWithOption($degrees) { $image = $this->createMock(ImageInterface::class); $this->filter - ->expects($this->once()) + ->expects(self::once()) ->method('setOption') ->with('degrees', $degrees); $this->filter - ->expects($this->once()) + ->expects(self::once()) ->method('apply') ->with($image) - ->will($this->returnValue($image)); + ->will(self::returnValue($image)); - $this->assertSame($image, $this->loader->load($image, [$degrees])); + self::assertSame($image, $this->loader->load($image, [$degrees])); } public function loadWithOptionProvider() diff --git a/tests/bundle/Core/Imagine/Filter/UnsupportedFilterTest.php b/tests/bundle/Core/Imagine/Filter/UnsupportedFilterTest.php index 3f77e33bee..f98a59d847 100644 --- a/tests/bundle/Core/Imagine/Filter/UnsupportedFilterTest.php +++ b/tests/bundle/Core/Imagine/Filter/UnsupportedFilterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\Filter; use Ibexa\Bundle\Core\Imagine\Filter\UnsupportedFilter; diff --git a/tests/bundle/Core/Imagine/IORepositoryResolverTest.php b/tests/bundle/Core/Imagine/IORepositoryResolverTest.php index aac66be802..5ca63f16e4 100644 --- a/tests/bundle/Core/Imagine/IORepositoryResolverTest.php +++ b/tests/bundle/Core/Imagine/IORepositoryResolverTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine; use Ibexa\Bundle\Core\Imagine\Filter\FilterConfiguration; @@ -70,11 +71,11 @@ protected function setUp(): void public function testGetFilePath($path, $filter, $expected) { $this->variationPathGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('getVariationPath') ->with($path, $filter) ->willReturn($expected); - $this->assertSame($expected, $this->imageResolver->getFilePath($path, $filter)); + self::assertSame($expected, $this->imageResolver->getFilePath($path, $filter)); } public function getFilePathProvider() @@ -94,18 +95,18 @@ public function testIsStoredImageExists() $aliasPath = 'Tardis/bigger/in-the-inside/RiverSong_thumbnail.jpg'; $this->variationPathGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('getVariationPath') ->with($path, $filter) ->willReturn($aliasPath); $this->ioService - ->expects($this->once()) + ->expects(self::once()) ->method('exists') ->with($aliasPath) - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); - $this->assertTrue($this->imageResolver->isStored($path, $filter)); + self::assertTrue($this->imageResolver->isStored($path, $filter)); } public function testIsStoredImageDoesntExist() @@ -115,18 +116,18 @@ public function testIsStoredImageDoesntExist() $aliasPath = 'Tardis/bigger/in-the-inside/RiverSong_thumbnail.jpg'; $this->variationPathGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('getVariationPath') ->with($path, $filter) ->willReturn($aliasPath); $this->ioService - ->expects($this->once()) + ->expects(self::once()) ->method('exists') ->with($aliasPath) - ->will($this->returnValue(false)); + ->will(self::returnValue(false)); - $this->assertFalse($this->imageResolver->isStored($path, $filter)); + self::assertFalse($this->imageResolver->isStored($path, $filter)); } /** @@ -139,17 +140,17 @@ public function testResolve($path, $filter, $variationPath, $requestUrl, $expect } $this->ioService - ->expects($this->any()) + ->expects(self::any()) ->method('loadBinaryFile') - ->will($this->returnValue(new BinaryFile(['uri' => $variationPath]))); + ->will(self::returnValue(new BinaryFile(['uri' => $variationPath]))); $this->variationPathGenerator - ->expects($this->any()) + ->expects(self::any()) ->method('getVariationPath') ->willReturn($variationPath); $result = $this->imageResolver->resolve($path, $filter); - $this->assertSame($expected, $result); + self::assertSame($expected, $result); } public function testResolveMissing() @@ -158,10 +159,10 @@ public function testResolveMissing() $path = 'foo/something.jpg'; $this->ioService - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFile') ->with($path) - ->will($this->returnValue(new MissingBinaryFile())); + ->will(self::returnValue(new MissingBinaryFile())); $this->imageResolver->resolve($path, 'some_filter'); } @@ -172,10 +173,10 @@ public function testResolveNotFound() $path = 'foo/something.jpg'; $this->ioService - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFile') ->with($path) - ->will($this->throwException(new NotFoundException('foo', 'bar'))); + ->will(self::throwException(new NotFoundException('foo', 'bar'))); $this->imageResolver->resolve($path, 'some_filter'); } @@ -244,12 +245,12 @@ public function testStore() $createStruct = new BinaryFileCreateStruct(); $this->ioService - ->expects($this->once()) + ->expects(self::once()) ->method('newBinaryCreateStructFromLocalFile') - ->will($this->returnValue($createStruct)); + ->will(self::returnValue($createStruct)); $this->ioService - ->expects($this->once()) + ->expects(self::once()) ->method('createBinaryFile'); $this->imageResolver->store($binary, $path, $filter); @@ -261,16 +262,16 @@ public function testRemoveEmptyFilters() $filters = ['filter1' => true, 'filter2' => true, 'chaud_cacao' => true]; $this->configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('image_variations') - ->will($this->returnValue($filters)); + ->will(self::returnValue($filters)); $this->variationPathGenerator - ->expects($this->exactly(count($filters))) + ->expects(self::exactly(count($filters))) ->method('getVariationPath') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['foo/bar/test.jpg', 'filter1', 'foo/bar/test_filter1.jpg '], ['foo/bar/test.jpg', 'filter2', 'foo/bar/test_filter2.jpg '], @@ -281,10 +282,10 @@ public function testRemoveEmptyFilters() $fileToDelete = 'foo/bar/test_chaud_cacao.jpg'; $this->ioService - ->expects($this->exactly(count($filters))) + ->expects(self::exactly(count($filters))) ->method('exists') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['foo/bar/test_filter1.jpg', false], ['foo/bar/test_filter2.jpg', false], @@ -295,13 +296,13 @@ public function testRemoveEmptyFilters() $binaryFile = new BinaryFile(['id' => $fileToDelete]); $this->ioService - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFile') ->with($fileToDelete) - ->will($this->returnValue($binaryFile)); + ->will(self::returnValue($binaryFile)); $this->ioService - ->expects($this->once()) + ->expects(self::once()) ->method('deleteBinaryFile') ->with($binaryFile); @@ -314,16 +315,16 @@ public function testRemoveWithFilters() $filters = ['filter1', 'filter2', 'chaud_cacao']; $this->configResolver - ->expects($this->never()) + ->expects(self::never()) ->method('getParameter') ->with('image_variations') - ->will($this->returnValue([])); + ->will(self::returnValue([])); $this->variationPathGenerator - ->expects($this->exactly(count($filters))) + ->expects(self::exactly(count($filters))) ->method('getVariationPath') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['foo/bar/test.jpg', 'filter1', 'foo/bar/test_filter1.jpg '], ['foo/bar/test.jpg', 'filter2', 'foo/bar/test_filter2.jpg '], @@ -334,10 +335,10 @@ public function testRemoveWithFilters() $fileToDelete = 'foo/bar/test_chaud_cacao.jpg'; $this->ioService - ->expects($this->exactly(count($filters))) + ->expects(self::exactly(count($filters))) ->method('exists') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['foo/bar/test_filter1.jpg', false], ['foo/bar/test_filter2.jpg', false], @@ -348,13 +349,13 @@ public function testRemoveWithFilters() $binaryFile = new BinaryFile(['id' => $fileToDelete]); $this->ioService - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFile') ->with($fileToDelete) - ->will($this->returnValue($binaryFile)); + ->will(self::returnValue($binaryFile)); $this->ioService - ->expects($this->once()) + ->expects(self::once()) ->method('deleteBinaryFile') ->with($binaryFile); diff --git a/tests/bundle/Core/Imagine/ImageAsset/AliasGeneratorTest.php b/tests/bundle/Core/Imagine/ImageAsset/AliasGeneratorTest.php index 2ac431b7e4..516b901a50 100644 --- a/tests/bundle/Core/Imagine/ImageAsset/AliasGeneratorTest.php +++ b/tests/bundle/Core/Imagine/ImageAsset/AliasGeneratorTest.php @@ -69,19 +69,19 @@ public function testGetVariationOfImageAsset() $expectedVariation = new Variation(); $this->contentService - ->expects($this->once()) + ->expects(self::once()) ->method('loadContent') ->with($assetField->value->destinationContentId) ->willReturn($imageContent); $this->assetMapper - ->expects($this->once()) + ->expects(self::once()) ->method('getAssetField') ->with($imageContent) ->willReturn($imageField); $this->innerAliasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('getVariation') ->with($imageField, $imageVersionInfo, $variationName, $parameters) ->willReturn($expectedVariation); @@ -93,7 +93,7 @@ public function testGetVariationOfImageAsset() $parameters ); - $this->assertEquals($expectedVariation, $actualVariation); + self::assertEquals($expectedVariation, $actualVariation); } public function testGetVariationOfNonImageAsset() @@ -111,15 +111,15 @@ public function testGetVariationOfNonImageAsset() $expectedVariation = new Variation(); $this->contentService - ->expects($this->never()) + ->expects(self::never()) ->method('loadContent'); $this->assetMapper - ->expects($this->never()) + ->expects(self::never()) ->method('getAssetField'); $this->innerAliasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('getVariation') ->with($imageField, $imageVersionInfo, $variationName, $parameters) ->willReturn($expectedVariation); @@ -131,13 +131,13 @@ public function testGetVariationOfNonImageAsset() $parameters ); - $this->assertEquals($expectedVariation, $actualVariation); + self::assertEquals($expectedVariation, $actualVariation); } public function testSupport() { - $this->assertTrue($this->aliasGenerator->supportsValue(new ImageAsset\Value())); - $this->assertFalse($this->aliasGenerator->supportsValue(new Image\Value())); + self::assertTrue($this->aliasGenerator->supportsValue(new ImageAsset\Value())); + self::assertFalse($this->aliasGenerator->supportsValue(new Image\Value())); } } diff --git a/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorConfiguratorTest.php b/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorConfiguratorTest.php index d23754057f..eab3f721da 100644 --- a/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorConfiguratorTest.php +++ b/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorConfiguratorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine; use Ibexa\Bundle\Core\Imagine\PlaceholderAliasGenerator; @@ -27,7 +28,7 @@ public function testConfigure() { $configResolver = $this->createMock(ConfigResolverInterface::class); $configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('io.binarydata_handler') ->willReturn(self::BINARY_HANDLER_NAME); @@ -36,7 +37,7 @@ public function testConfigure() $providerRegistry = $this->createMock(PlaceholderProviderRegistry::class); $providerRegistry - ->expects($this->once()) + ->expects(self::once()) ->method('getProvider') ->with(self::PROVIDER_TYPE) ->willReturn($provider); @@ -50,7 +51,7 @@ public function testConfigure() $generator = $this->createMock(PlaceholderAliasGenerator::class); $generator - ->expects($this->once()) + ->expects(self::once()) ->method('setPlaceholderProvider') ->with($provider, self::PROVIDER_OPTIONS); diff --git a/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php b/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php index dbd3586c73..cc4719c933 100644 --- a/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php +++ b/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine; use Ibexa\Bundle\Core\Imagine\IORepositoryResolver; @@ -86,17 +87,17 @@ public function testGetVariationSkipsPlaceholderGeneration(Field $field, APIVers $expectedVariation = $this->createMock(ImageVariation::class); $this->ioResolver - ->expects($this->never()) + ->expects(self::never()) ->method('resolve') ->with($field->value->id, IORepositoryResolver::VARIATION_ORIGINAL); $this->placeholderProvider - ->expects($this->never()) + ->expects(self::never()) ->method('getPlaceholder') ->with($field->value, $this->placeholderOptions); $this->innerAliasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('getVariation') ->with($field, $versionInfo, $variationName, $parameters) ->willReturn($expectedVariation); @@ -108,7 +109,7 @@ public function testGetVariationSkipsPlaceholderGeneration(Field $field, APIVers $parameters ); - $this->assertEquals($expectedVariation, $actualVariation); + self::assertEquals($expectedVariation, $actualVariation); } /** @@ -119,12 +120,12 @@ public function testGetVariationOriginalFound(Field $field, APIVersionInfo $vers $expectedVariation = $this->createMock(ImageVariation::class); $this->ioResolver - ->expects($this->once()) + ->expects(self::once()) ->method('resolve') ->with($field->value->id, IORepositoryResolver::VARIATION_ORIGINAL); $this->innerAliasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('getVariation') ->with($field, $versionInfo, $variationName, $parameters) ->willReturn($expectedVariation); @@ -141,7 +142,7 @@ public function testGetVariationOriginalFound(Field $field, APIVersionInfo $vers $parameters ); - $this->assertEquals($expectedVariation, $actualVariation); + self::assertEquals($expectedVariation, $actualVariation); } /** @@ -154,25 +155,25 @@ public function testGetVariationOriginalNotFound(Field $field, APIVersionInfo $v $expectedVariation = $this->createMock(ImageVariation::class); $this->ioResolver - ->expects($this->once()) + ->expects(self::once()) ->method('resolve') ->with($field->value->id, IORepositoryResolver::VARIATION_ORIGINAL) ->willThrowException($this->createMock(NotResolvableException::class)); $this->placeholderProvider - ->expects($this->once()) + ->expects(self::once()) ->method('getPlaceholder') ->with($field->value, $this->placeholderOptions) ->willReturn($placeholderPath); $this->ioService - ->expects($this->once()) + ->expects(self::once()) ->method('newBinaryCreateStructFromLocalFile') ->with($placeholderPath) ->willReturn($binaryCreateStruct); $this->ioService - ->expects($this->once()) + ->expects(self::once()) ->method('createBinaryFile') ->with($binaryCreateStruct); @@ -182,7 +183,7 @@ public function testGetVariationOriginalNotFound(Field $field, APIVersionInfo $v ); $this->innerAliasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('getVariation') ->with($field, $versionInfo, $variationName, $parameters) ->willReturn($expectedVariation); @@ -194,8 +195,8 @@ public function testGetVariationOriginalNotFound(Field $field, APIVersionInfo $v $parameters ); - $this->assertEquals($field->value->id, $binaryCreateStruct->id); - $this->assertEquals($expectedVariation, $actualVariation); + self::assertEquals($field->value->id, $binaryCreateStruct->id); + self::assertEquals($expectedVariation, $actualVariation); } /** @@ -215,7 +216,7 @@ public function testGetVariationReturnsPlaceholderIfBinaryDataIsNotAvailable( $binaryFile = $this->createMock(BinaryFile::class); $this->ioResolver - ->expects($this->once()) + ->expects(self::once()) ->method('resolve') ->with($field->value->id, IORepositoryResolver::VARIATION_ORIGINAL) ->willReturn('/path/to/original/image.png'); @@ -231,19 +232,19 @@ public function testGetVariationReturnsPlaceholderIfBinaryDataIsNotAvailable( ->willThrowException($this->createMock(NotFoundException::class)); $this->placeholderProvider - ->expects($this->once()) + ->expects(self::once()) ->method('getPlaceholder') ->with($field->value, $this->placeholderOptions) ->willReturn($placeholderPath); $this->ioService - ->expects($this->once()) + ->expects(self::once()) ->method('newBinaryCreateStructFromLocalFile') ->with($placeholderPath) ->willReturn($binaryCreateStruct); $this->ioService - ->expects($this->once()) + ->expects(self::once()) ->method('createBinaryFile') ->with($binaryCreateStruct); @@ -253,7 +254,7 @@ public function testGetVariationReturnsPlaceholderIfBinaryDataIsNotAvailable( ); $this->innerAliasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('getVariation') ->with($field, $versionInfo, $variationName, $parameters) ->willReturn($expectedVariation); @@ -265,8 +266,8 @@ public function testGetVariationReturnsPlaceholderIfBinaryDataIsNotAvailable( $parameters ); - $this->assertEquals($field->value->id, $binaryCreateStruct->id); - $this->assertEquals($expectedVariation, $actualVariation); + self::assertEquals($field->value->id, $binaryCreateStruct->id); + self::assertEquals($expectedVariation, $actualVariation); } /** @@ -274,7 +275,7 @@ public function testGetVariationReturnsPlaceholderIfBinaryDataIsNotAvailable( */ public function testSupportsValue(Value $value, bool $isSupported) { - $this->assertSame($isSupported, $this->aliasGenerator->supportsValue($value)); + self::assertSame($isSupported, $this->aliasGenerator->supportsValue($value)); } public function supportsValueProvider(): array diff --git a/tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php b/tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php index 61a160d593..3954c82f7b 100644 --- a/tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php +++ b/tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\PlaceholderProvider; use Ibexa\Bundle\Core\Imagine\PlaceholderProvider\GenericProvider; @@ -27,7 +28,7 @@ public function testGetPlaceholder(ImageValue $value, $expectedText, array $opti $imagine = $this->createMock(ImagineInterface::class); $imagine - ->expects($this->atLeastOnce()) + ->expects(self::atLeastOnce()) ->method('font') ->willReturnCallback(function ($fontpath, $fontsize, ColorInterface $foreground) use ($options, $font) { $this->assertEquals($options['fontpath'], $fontpath); @@ -38,14 +39,14 @@ public function testGetPlaceholder(ImageValue $value, $expectedText, array $opti }); $font - ->expects($this->any()) + ->expects(self::any()) ->method('box') ->willReturn($this->createMock(BoxInterface::class)); $image = $this->createMock(ImageInterface::class); $imagine - ->expects($this->atLeastOnce()) + ->expects(self::atLeastOnce()) ->method('create') ->willReturnCallback(function (BoxInterface $size, ColorInterface $background) use ($value, $options, $image) { $this->assertSizeEquals([$value->width, $value->height], $size); @@ -56,12 +57,12 @@ public function testGetPlaceholder(ImageValue $value, $expectedText, array $opti $drawer = $this->createMock(DrawerInterface::class); $image - ->expects($this->any()) + ->expects(self::any()) ->method('draw') ->willReturn($drawer); $drawer - ->expects($this->atLeastOnce()) + ->expects(self::atLeastOnce()) ->method('text') ->with($expectedText, $font); @@ -92,13 +93,13 @@ public function getPlaceholderDataProvider() private function assertSizeEquals(array $expected, BoxInterface $actual) { - $this->assertEquals($expected[0], $actual->getWidth()); - $this->assertEquals($expected[1], $actual->getHeight()); + self::assertEquals($expected[0], $actual->getWidth()); + self::assertEquals($expected[1], $actual->getHeight()); } private function assertColorEquals($expected, ColorInterface $actual) { - $this->assertEquals(strtolower($expected), strtolower((string)$actual)); + self::assertEquals(strtolower($expected), strtolower((string)$actual)); } } diff --git a/tests/bundle/Core/Imagine/PlaceholderProviderRegistryTest.php b/tests/bundle/Core/Imagine/PlaceholderProviderRegistryTest.php index f42f68926e..961f088dfe 100644 --- a/tests/bundle/Core/Imagine/PlaceholderProviderRegistryTest.php +++ b/tests/bundle/Core/Imagine/PlaceholderProviderRegistryTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine; use Ibexa\Bundle\Core\Imagine\PlaceholderProvider; @@ -30,8 +31,8 @@ public function testConstructor() $registry = new PlaceholderProviderRegistry($providers); - $this->assertSame($providers[self::FOO], $registry->getProvider(self::FOO)); - $this->assertSame($providers[self::BAR], $registry->getProvider(self::BAR)); + self::assertSame($providers[self::FOO], $registry->getProvider(self::FOO)); + self::assertSame($providers[self::BAR], $registry->getProvider(self::BAR)); } /** @@ -44,7 +45,7 @@ public function testAddProvider(): void $registry = new PlaceholderProviderRegistry(); $registry->addProvider(self::FOO, $provider); - $this->assertSame($provider, $registry->getProvider(self::FOO)); + self::assertSame($provider, $registry->getProvider(self::FOO)); } public function testSupports() @@ -53,8 +54,8 @@ public function testSupports() 'supported' => $this->getPlaceholderProviderMock(), ]); - $this->assertTrue($registry->supports('supported')); - $this->assertFalse($registry->supports('unsupported')); + self::assertTrue($registry->supports('supported')); + self::assertFalse($registry->supports('unsupported')); } public function testGetProviderKnown() @@ -65,7 +66,7 @@ public function testGetProviderKnown() self::FOO => $provider, ]); - $this->assertEquals($provider, $registry->getProvider(self::FOO)); + self::assertEquals($provider, $registry->getProvider(self::FOO)); } public function testGetProviderUnknown() diff --git a/tests/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGeneratorTest.php b/tests/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGeneratorTest.php index 59d2911a3b..93d25717de 100644 --- a/tests/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGeneratorTest.php +++ b/tests/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGeneratorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\VariationPathGenerator; use Ibexa\Bundle\Core\Imagine\VariationPathGenerator\AliasDirectoryVariationPathGenerator; diff --git a/tests/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGeneratorTest.php b/tests/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGeneratorTest.php index 010a1d46b2..bfa3ddbf0b 100644 --- a/tests/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGeneratorTest.php +++ b/tests/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGeneratorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\VariationPathGenerator; use Ibexa\Bundle\Core\Imagine\VariationPathGenerator\OriginalDirectoryVariationPathGenerator; diff --git a/tests/bundle/Core/Imagine/VariationPurger/IOVariationPurgerTest.php b/tests/bundle/Core/Imagine/VariationPurger/IOVariationPurgerTest.php index c171551138..46123cfb62 100644 --- a/tests/bundle/Core/Imagine/VariationPurger/IOVariationPurgerTest.php +++ b/tests/bundle/Core/Imagine/VariationPurger/IOVariationPurgerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\VariationPurger; use Ibexa\Bundle\Core\Imagine\Cache\AliasGeneratorDecorator; diff --git a/tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php b/tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php index 5282d7d070..b4e8d77490 100644 --- a/tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php +++ b/tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Imagine\VariationPurger; use ArrayIterator; @@ -40,7 +41,7 @@ public function testIteratesOverItems() ); $this->pathGeneratorMock - ->expects($this->exactly(4)) + ->expects(self::exactly(4)) ->method('getVariationPath') ->withConsecutive( ['path/to/1st/image.jpg', 'large'], @@ -59,24 +60,24 @@ public function testPurgesExistingItem() ); $this->pathGeneratorMock - ->expects($this->once()) + ->expects(self::once()) ->method('getVariationPath') - ->will($this->returnValue('path/to/file_large.png')); + ->will(self::returnValue('path/to/file_large.png')); $this->ioServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('exists') - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); $this->ioServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFile') - ->will($this->returnValue(new BinaryFile())); + ->will(self::returnValue(new BinaryFile())); $this->ioServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('deleteBinaryFile') - ->with($this->isInstanceOf(BinaryFile::class)); + ->with(self::isInstanceOf(BinaryFile::class)); $purger->purge(['large']); } @@ -88,21 +89,21 @@ public function testDoesNotPurgeNotExistingItem() ); $this->pathGeneratorMock - ->expects($this->once()) + ->expects(self::once()) ->method('getVariationPath') - ->will($this->returnValue('path/to/file_large.png')); + ->will(self::returnValue('path/to/file_large.png')); $this->ioServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('exists') - ->will($this->returnValue(false)); + ->will(self::returnValue(false)); $this->ioServiceMock - ->expects($this->never()) + ->expects(self::never()) ->method('loadBinaryFile'); $this->ioServiceMock - ->expects($this->never()) + ->expects(self::never()) ->method('deleteBinaryFile'); $purger->purge(['large']); diff --git a/tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php b/tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php index 83f76265cc..854d565624 100644 --- a/tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php +++ b/tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php @@ -74,10 +74,10 @@ public function testImageIdTransformation() private function configureRowReaderMock(array $fileList) { - $mockInvocator = $this->rowReaderMock->expects($this->any())->method('getRow'); + $mockInvocator = $this->rowReaderMock->expects(self::any())->method('getRow'); call_user_func_array([$mockInvocator, 'willReturnOnConsecutiveCalls'], $fileList); - $this->rowReaderMock->expects($this->any())->method('getCount')->willReturn(count($fileList)); + $this->rowReaderMock->expects(self::any())->method('getCount')->willReturn(count($fileList)); } } diff --git a/tests/bundle/Core/Matcher/ViewMatcherRegistryTest.php b/tests/bundle/Core/Matcher/ViewMatcherRegistryTest.php index 93bb44aba6..5ff4fb7b81 100644 --- a/tests/bundle/Core/Matcher/ViewMatcherRegistryTest.php +++ b/tests/bundle/Core/Matcher/ViewMatcherRegistryTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Matcher; use Ibexa\Bundle\Core\Matcher\ViewMatcherRegistry; diff --git a/tests/bundle/Core/Routing/DefaultRouterTest.php b/tests/bundle/Core/Routing/DefaultRouterTest.php index 8b288e069a..5f14dbb6e4 100644 --- a/tests/bundle/Core/Routing/DefaultRouterTest.php +++ b/tests/bundle/Core/Routing/DefaultRouterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Routing; use Ibexa\Bundle\Core\Routing\DefaultRouter; @@ -86,7 +87,7 @@ public function testMatchRequestWithSemanticPathinfo() ->method('getMatcher') ->willReturn($matcher); - $this->assertSame($matchedParameters, $router->matchRequest($request)); + self::assertSame($matchedParameters, $router->matchRequest($request)); } public function testMatchRequestRegularPathinfo() @@ -96,7 +97,7 @@ public function testMatchRequestRegularPathinfo() $request = Request::create($pathinfo); - $this->configResolver->expects($this->never())->method('getParameter'); + $this->configResolver->expects(self::never())->method('getParameter'); /** @var \PHPUnit\Framework\MockObject\MockObject&\Ibexa\Bundle\Core\Routing\DefaultRouter $router */ $router = $this->generateRouter(['getMatcher']); @@ -112,7 +113,7 @@ public function testMatchRequestRegularPathinfo() ->method('getMatcher') ->willReturn($matcher); - $this->assertSame($matchedParameters, $router->matchRequest($request)); + self::assertSame($matchedParameters, $router->matchRequest($request)); } /** @@ -134,7 +135,7 @@ public function testGenerateNoSiteAccess($url) ->method('getGenerator') ->willReturn($generator); - $this->assertSame($url, $router->generate(__METHOD__)); + self::assertSame($url, $router->generate(__METHOD__)); } public function providerGenerateNoSiteAccess() @@ -189,7 +190,7 @@ public function testGenerateWithSiteAccess($urlGenerated, $relevantUri, $expecte } else { // Non-siteaccess aware route, it's not supposed to be analysed $matcher - ->expects($this->never()) + ->expects(self::never()) ->method('analyseLink'); } } else { @@ -216,7 +217,7 @@ public function testGenerateWithSiteAccess($urlGenerated, $relevantUri, $expecte $router->setContext($requestContext); $router->setNonSiteAccessAwareRoutes($nonSiteAccessAwareRoutes); - $this->assertSame($expectedUrl, $router->generate($routeName, [], $referenceType)); + self::assertSame($expectedUrl, $router->generate($routeName, [], $referenceType)); } public function providerGenerateWithSiteAccess() @@ -285,7 +286,7 @@ public function testGenerateReverseSiteAccessMatch() $refGenerator->setAccessible(true); $refGenerator->setValue($router, $generator); - $this->assertSame( + self::assertSame( $urlGenerated, $router->generate($routeName, ['siteaccess' => $siteAccessName], DefaultRouter::ABSOLUTE_PATH) ); diff --git a/tests/bundle/Core/Routing/UrlAliasRouterTest.php b/tests/bundle/Core/Routing/UrlAliasRouterTest.php index 97b86e88d4..e4327497fd 100644 --- a/tests/bundle/Core/Routing/UrlAliasRouterTest.php +++ b/tests/bundle/Core/Routing/UrlAliasRouterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Routing; use Ibexa\Bundle\Core\Routing\UrlAliasRouter; @@ -30,10 +31,10 @@ protected function setUp(): void { $this->configResolver = $this->createMock(ConfigResolverInterface::class); $this->configResolver - ->expects($this->any()) + ->expects(self::any()) ->method('getParameter') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['url_alias_router', null, null, true], ['content.tree_root.location_id', null, null, null], @@ -68,10 +69,10 @@ public function testMatchRequestDeactivatedUrlAlias() $this->resetConfigResolver(); $this->configResolver - ->expects($this->any()) + ->expects(self::any()) ->method('getParameter') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['url_alias_router', null, null, false], ] @@ -85,10 +86,10 @@ public function testMatchRequestWithRootLocation() $rootLocationId = 123; $this->resetConfigResolver(); $this->configResolver - ->expects($this->any()) + ->expects(self::any()) ->method('getParameter') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['url_alias_router', null, null, true], ] @@ -98,10 +99,10 @@ public function testMatchRequestWithRootLocation() $prefix = '/root/prefix'; $this->urlALiasGenerator - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('getPathPrefixByRootLocationId') ->with($rootLocationId) - ->will($this->returnValue($prefix)); + ->will(self::returnValue($prefix)); $locationId = 789; $path = '/foo/bar'; @@ -114,15 +115,15 @@ public function testMatchRequestWithRootLocation() ] ); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('lookup') ->with($prefix . $path) - ->will($this->returnValue($urlAlias)); + ->will(self::returnValue($urlAlias)); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') - ->will($this->returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); + ->will(self::returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); $expected = [ '_route' => UrlAliasRouter::URL_ALIAS_ROUTE_NAME, @@ -133,7 +134,7 @@ public function testMatchRequestWithRootLocation() 'layout' => true, ]; $request = $this->getRequestByPathInfo($path); - $this->assertEquals($expected, $this->router->matchRequest($request)); + self::assertEquals($expected, $this->router->matchRequest($request)); } public function testMatchRequestLocationCaseRedirectWithRootLocation() @@ -141,10 +142,10 @@ public function testMatchRequestLocationCaseRedirectWithRootLocation() $rootLocationId = 123; $this->resetConfigResolver(); $this->configResolver - ->expects($this->any()) + ->expects(self::any()) ->method('getParameter') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['url_alias_router', null, null, true], ] @@ -154,14 +155,14 @@ public function testMatchRequestLocationCaseRedirectWithRootLocation() $prefix = '/root/prefix'; $this->urlALiasGenerator - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('getPathPrefixByRootLocationId') ->with($rootLocationId) - ->will($this->returnValue($prefix)); + ->will(self::returnValue($prefix)); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') - ->will($this->returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); + ->will(self::returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); $locationId = 789; $path = '/foo/bar'; @@ -175,10 +176,10 @@ public function testMatchRequestLocationCaseRedirectWithRootLocation() ] ); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('lookup') ->with($prefix . $requestedPath) - ->will($this->returnValue($urlAlias)); + ->will(self::returnValue($urlAlias)); $expected = [ '_route' => UrlAliasRouter::URL_ALIAS_ROUTE_NAME, @@ -191,7 +192,7 @@ public function testMatchRequestLocationCaseRedirectWithRootLocation() 'needsRedirect' => true, ]; $request = $this->getRequestByPathInfo($requestedPath); - $this->assertEquals($expected, $this->router->matchRequest($request)); + self::assertEquals($expected, $this->router->matchRequest($request)); } public function testMatchRequestLocationCaseRedirectWithRootRootLocation() @@ -199,10 +200,10 @@ public function testMatchRequestLocationCaseRedirectWithRootRootLocation() $rootLocationId = 123; $this->resetConfigResolver(); $this->configResolver - ->expects($this->any()) + ->expects(self::any()) ->method('getParameter') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['url_alias_router', null, null, true], ] @@ -212,10 +213,10 @@ public function testMatchRequestLocationCaseRedirectWithRootRootLocation() $prefix = '/'; $this->urlALiasGenerator - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('getPathPrefixByRootLocationId') ->with($rootLocationId) - ->will($this->returnValue($prefix)); + ->will(self::returnValue($prefix)); $locationId = 789; $path = '/foo/bar'; @@ -229,14 +230,14 @@ public function testMatchRequestLocationCaseRedirectWithRootRootLocation() ] ); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('lookup') ->with($requestedPath) - ->will($this->returnValue($urlAlias)); + ->will(self::returnValue($urlAlias)); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') - ->will($this->returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); + ->will(self::returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); $expected = [ '_route' => UrlAliasRouter::URL_ALIAS_ROUTE_NAME, @@ -249,7 +250,7 @@ public function testMatchRequestLocationCaseRedirectWithRootRootLocation() 'needsRedirect' => true, ]; $request = $this->getRequestByPathInfo($requestedPath); - $this->assertEquals($expected, $this->router->matchRequest($request)); + self::assertEquals($expected, $this->router->matchRequest($request)); } public function testMatchRequestResourceCaseRedirectWithRootLocation() @@ -257,10 +258,10 @@ public function testMatchRequestResourceCaseRedirectWithRootLocation() $rootLocationId = 123; $this->resetConfigResolver(); $this->configResolver - ->expects($this->any()) + ->expects(self::any()) ->method('getParameter') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['url_alias_router', null, null, true], ] @@ -270,10 +271,10 @@ public function testMatchRequestResourceCaseRedirectWithRootLocation() $prefix = '/root/prefix'; $this->urlALiasGenerator - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('getPathPrefixByRootLocationId') ->with($rootLocationId) - ->will($this->returnValue($prefix)); + ->will(self::returnValue($prefix)); $path = '/foo/bar'; $requestedPath = '/Foo/Bar'; @@ -286,10 +287,10 @@ public function testMatchRequestResourceCaseRedirectWithRootLocation() ] ); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('lookup') ->with($prefix . $requestedPath) - ->will($this->returnValue($urlAlias)); + ->will(self::returnValue($urlAlias)); $expected = [ '_route' => UrlAliasRouter::URL_ALIAS_ROUTE_NAME, @@ -297,7 +298,7 @@ public function testMatchRequestResourceCaseRedirectWithRootLocation() 'needsRedirect' => true, ]; $request = $this->getRequestByPathInfo($requestedPath); - $this->assertEquals($expected, $this->router->matchRequest($request)); + self::assertEquals($expected, $this->router->matchRequest($request)); } public function testMatchRequestVirtualCaseRedirectWithRootLocation() @@ -305,10 +306,10 @@ public function testMatchRequestVirtualCaseRedirectWithRootLocation() $rootLocationId = 123; $this->resetConfigResolver(); $this->configResolver - ->expects($this->any()) + ->expects(self::any()) ->method('getParameter') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['url_alias_router', null, null, true], ] @@ -318,10 +319,10 @@ public function testMatchRequestVirtualCaseRedirectWithRootLocation() $prefix = '/root/prefix'; $this->urlALiasGenerator - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('getPathPrefixByRootLocationId') ->with($rootLocationId) - ->will($this->returnValue($prefix)); + ->will(self::returnValue($prefix)); $path = '/foo/bar'; $requestedPath = '/Foo/Bar'; @@ -332,10 +333,10 @@ public function testMatchRequestVirtualCaseRedirectWithRootLocation() ] ); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('lookup') ->with($prefix . $requestedPath) - ->will($this->returnValue($urlAlias)); + ->will(self::returnValue($urlAlias)); $expected = [ '_route' => UrlAliasRouter::URL_ALIAS_ROUTE_NAME, @@ -343,17 +344,17 @@ public function testMatchRequestVirtualCaseRedirectWithRootLocation() 'needsRedirect' => true, ]; $request = $this->getRequestByPathInfo($requestedPath); - $this->assertEquals($expected, $this->router->matchRequest($request)); + self::assertEquals($expected, $this->router->matchRequest($request)); } public function testMatchRequestWithRootLocationAndExclusion() { $this->resetConfigResolver(); $this->configResolver - ->expects($this->any()) + ->expects(self::any()) ->method('getParameter') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['url_alias_router', null, null, true], ['content.tree_root.location_id', null, null, 123], @@ -366,10 +367,10 @@ public function testMatchRequestWithRootLocationAndExclusion() $pathInfo = '/shared/content/foo-bar'; $destinationId = 789; $this->urlALiasGenerator - ->expects($this->any()) + ->expects(self::any()) ->method('isUriPrefixExcluded') ->with($pathInfo) - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); $urlAlias = new URLAlias( [ @@ -381,14 +382,14 @@ public function testMatchRequestWithRootLocationAndExclusion() ); $request = $this->getRequestByPathInfo($pathInfo); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('lookup') ->with($pathInfo) - ->will($this->returnValue($urlAlias)); + ->will(self::returnValue($urlAlias)); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') - ->will($this->returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); + ->will(self::returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); $expected = [ '_route' => UrlAliasRouter::URL_ALIAS_ROUTE_NAME, @@ -398,7 +399,7 @@ public function testMatchRequestWithRootLocationAndExclusion() 'viewType' => ViewManager::VIEW_TYPE_FULL, 'layout' => true, ]; - $this->assertEquals($expected, $this->router->matchRequest($request)); + self::assertEquals($expected, $this->router->matchRequest($request)); } } diff --git a/tests/bundle/Core/SiteAccess/Config/IOConfigResolverTest.php b/tests/bundle/Core/SiteAccess/Config/IOConfigResolverTest.php index 127aa52df6..3d79a05889 100644 --- a/tests/bundle/Core/SiteAccess/Config/IOConfigResolverTest.php +++ b/tests/bundle/Core/SiteAccess/Config/IOConfigResolverTest.php @@ -62,7 +62,7 @@ public function testGetUrlPrefix(): void $complexConfigProcessor ); - $this->assertEquals('var/demo_site/storage', $ioConfigResolver->getUrlPrefix()); + self::assertEquals('var/demo_site/storage', $ioConfigResolver->getUrlPrefix()); } public function testGetLegacyUrlPrefix(): void @@ -92,7 +92,7 @@ public function testGetLegacyUrlPrefix(): void $complexConfigProcessor ); - $this->assertEquals('var/demo_site/legacy_storage', $ioConfigResolver->getLegacyUrlPrefix()); + self::assertEquals('var/demo_site/legacy_storage', $ioConfigResolver->getLegacyUrlPrefix()); } public function testGetRootDir(): void @@ -122,7 +122,7 @@ public function testGetRootDir(): void $complexConfigProcessor ); - $this->assertEquals('/path/to/ibexa/web/var/demo_site/legacy_storage', $ioConfigResolver->getRootDir()); + self::assertEquals('/path/to/ibexa/web/var/demo_site/legacy_storage', $ioConfigResolver->getRootDir()); } } diff --git a/tests/bundle/Core/SiteAccess/MatcherBuilderTest.php b/tests/bundle/Core/SiteAccess/MatcherBuilderTest.php index bbbfa0ae4c..302ab0cf0d 100644 --- a/tests/bundle/Core/SiteAccess/MatcherBuilderTest.php +++ b/tests/bundle/Core/SiteAccess/MatcherBuilderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\SiteAccess; use Ibexa\Bundle\Core\SiteAccess\Matcher as CoreMatcher; @@ -30,12 +31,12 @@ protected function setUp(): void public function testBuildMatcherNoService() { $this->siteAccessMatcherRegistry - ->expects($this->never()) + ->expects(self::never()) ->method('getMatcher'); $matcherBuilder = new MatcherBuilder($this->siteAccessMatcherRegistry); $matcher = $this->createMock(Matcher::class); $builtMatcher = $matcherBuilder->buildMatcher('\\' . get_class($matcher), [], new SimplifiedRequest()); - $this->assertInstanceOf(get_class($matcher), $builtMatcher); + self::assertInstanceOf(get_class($matcher), $builtMatcher); } public function testBuildMatcherServiceWrongInterface() @@ -44,10 +45,10 @@ public function testBuildMatcherServiceWrongInterface() $serviceId = 'foo'; $this->siteAccessMatcherRegistry - ->expects($this->once()) + ->expects(self::once()) ->method('getMatcher') ->with($serviceId) - ->will($this->returnValue($this->createMock(Matcher::class))); + ->will(self::returnValue($this->createMock(Matcher::class))); $matcherBuilder = new MatcherBuilder($this->siteAccessMatcherRegistry); $matcherBuilder->buildMatcher("@$serviceId", [], new SimplifiedRequest()); } @@ -57,19 +58,19 @@ public function testBuildMatcherService() $serviceId = 'foo'; $matcher = $this->createMock(CoreMatcher::class); $this->siteAccessMatcherRegistry - ->expects($this->once()) + ->expects(self::once()) ->method('getMatcher') ->with($serviceId) - ->will($this->returnValue($matcher)); + ->will(self::returnValue($matcher)); $matchingConfig = ['foo' => 'bar']; $request = new SimplifiedRequest(); $matcher - ->expects($this->once()) + ->expects(self::once()) ->method('setMatchingConfiguration') ->with($matchingConfig); $matcher - ->expects($this->once()) + ->expects(self::once()) ->method('setRequest') ->with($request); diff --git a/tests/bundle/Core/SiteAccess/SiteAccessMatcherRegistryTest.php b/tests/bundle/Core/SiteAccess/SiteAccessMatcherRegistryTest.php index 167f30e62c..3fb7f56d7e 100644 --- a/tests/bundle/Core/SiteAccess/SiteAccessMatcherRegistryTest.php +++ b/tests/bundle/Core/SiteAccess/SiteAccessMatcherRegistryTest.php @@ -22,7 +22,7 @@ public function testGetMatcher(): void $matcher = $this->getMatcherMock(); $registry = new SiteAccessMatcherRegistry([self::MATCHER_NAME => $matcher]); - $this->assertSame($matcher, $registry->getMatcher(self::MATCHER_NAME)); + self::assertSame($matcher, $registry->getMatcher(self::MATCHER_NAME)); } public function testSetMatcher(): void @@ -32,7 +32,7 @@ public function testSetMatcher(): void $registry->setMatcher(self::MATCHER_NAME, $matcher); - $this->assertSame($matcher, $registry->getMatcher(self::MATCHER_NAME)); + self::assertSame($matcher, $registry->getMatcher(self::MATCHER_NAME)); } public function testSetMatcherOverride(): void @@ -43,7 +43,7 @@ public function testSetMatcherOverride(): void $registry->setMatcher(self::MATCHER_NAME, $newMatcher); - $this->assertSame($newMatcher, $registry->getMatcher(self::MATCHER_NAME)); + self::assertSame($newMatcher, $registry->getMatcher(self::MATCHER_NAME)); } public function testGetMatcherNotFound(): void diff --git a/tests/bundle/Core/Translation/GlobCollectorTest.php b/tests/bundle/Core/Translation/GlobCollectorTest.php index 059bc6c0f1..7ea44df31c 100644 --- a/tests/bundle/Core/Translation/GlobCollectorTest.php +++ b/tests/bundle/Core/Translation/GlobCollectorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\Translation; use Ibexa\Bundle\Core\Translation\GlobCollector; diff --git a/tests/bundle/Core/URLChecker/URLCheckerTest.php b/tests/bundle/Core/URLChecker/URLCheckerTest.php index 3290c6e75c..34fedb03cf 100644 --- a/tests/bundle/Core/URLChecker/URLCheckerTest.php +++ b/tests/bundle/Core/URLChecker/URLCheckerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Core\URLChecker; use Ibexa\Bundle\Core\URLChecker\URLChecker; @@ -32,7 +33,7 @@ protected function setUp(): void { $this->urlService = $this->createMock(URLService::class); $this->urlService - ->expects($this->any()) + ->expects(self::any()) ->method('createUpdateStruct') ->willReturnCallback(static function () { return new URLUpdateStruct(); @@ -48,7 +49,7 @@ public function testCheck() $groups = $this->createGroupedUrls(['http', 'https']); $this->urlService - ->expects($this->once()) + ->expects(self::once()) ->method('findUrls') ->with($query) ->willReturn($this->createSearchResults($groups)); @@ -60,7 +61,7 @@ public function testCheck() foreach ($handlers as $scheme => $handler) { $handler - ->expects($this->once()) + ->expects(self::once()) ->method('validate') ->willReturnCallback(function (array $urls) use ($scheme, $groups) { $this->assertEqualsCanonicalizing($groups[$scheme], $urls); @@ -79,13 +80,13 @@ public function testCheckUnsupported() $groups = $this->createGroupedUrls(['http', 'https'], 10); $this->urlService - ->expects($this->once()) + ->expects(self::once()) ->method('findUrls') ->with($query) ->willReturn($this->createSearchResults($groups)); $this->logger - ->expects($this->atLeastOnce()) + ->expects(self::atLeastOnce()) ->method('error') ->with('Unsupported URL schema: https'); @@ -95,7 +96,7 @@ public function testCheckUnsupported() foreach ($handlers as $scheme => $handler) { $handler - ->expects($this->once()) + ->expects(self::once()) ->method('validate') ->willReturnCallback(function (array $urls) use ($scheme, $groups) { $this->assertEqualsCanonicalizing($groups[$scheme], $urls); diff --git a/tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php b/tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php index 23cc5756cc..854e8f185e 100644 --- a/tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php +++ b/tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Debug\Collector; use Exception; @@ -29,12 +30,12 @@ public function testAddGetCollector() $collector = $this->getDataCollectorMock(); $name = 'foobar'; $collector - ->expects($this->once()) + ->expects(self::once()) ->method('getName') - ->will($this->returnValue($name)); + ->will(self::returnValue($name)); $this->mainCollector->addCollector($collector); - $this->assertSame($collector, $this->mainCollector->getCollector($name)); + self::assertSame($collector, $this->mainCollector->getCollector($name)); } public function testGetInvalidCollector() @@ -43,7 +44,7 @@ public function testGetInvalidCollector() $collector = $this->getDataCollectorMock(); $this->mainCollector->addCollector($collector); - $this->assertSame($collector, $this->mainCollector->getCollector('foo')); + self::assertSame($collector, $this->mainCollector->getCollector('foo')); } public function testGetAllCollectors() @@ -51,15 +52,15 @@ public function testGetAllCollectors() $collector1 = $this->getDataCollectorMock(); $nameCollector1 = 'collector1'; $collector1 - ->expects($this->once()) + ->expects(self::once()) ->method('getName') - ->will($this->returnValue($nameCollector1)); + ->will(self::returnValue($nameCollector1)); $collector2 = $this->getDataCollectorMock(); $nameCollector2 = 'collector2'; $collector2 - ->expects($this->once()) + ->expects(self::once()) ->method('getName') - ->will($this->returnValue($nameCollector2)); + ->will(self::returnValue($nameCollector2)); $allCollectors = [ $nameCollector1 => $collector1, @@ -70,7 +71,7 @@ public function testGetAllCollectors() $this->mainCollector->addCollector($collector); } - $this->assertSame($allCollectors, $this->mainCollector->getAllCollectors()); + self::assertSame($allCollectors, $this->mainCollector->getAllCollectors()); } public function testGetToolbarTemplateNothing() @@ -78,11 +79,11 @@ public function testGetToolbarTemplateNothing() $collector = $this->getDataCollectorMock(); $name = 'foobar'; $collector - ->expects($this->once()) + ->expects(self::once()) ->method('getName') - ->will($this->returnValue($name)); + ->will(self::returnValue($name)); $this->mainCollector->addCollector($collector); - $this->assertNull($this->mainCollector->getToolbarTemplate($name)); + self::assertNull($this->mainCollector->getToolbarTemplate($name)); } public function testGetToolbarTemplate() @@ -90,13 +91,13 @@ public function testGetToolbarTemplate() $collector = $this->getDataCollectorMock(); $name = 'foobar'; $collector - ->expects($this->once()) + ->expects(self::once()) ->method('getName') - ->will($this->returnValue($name)); + ->will(self::returnValue($name)); $toolbarTemplate = 'toolbar.html.twig'; $this->mainCollector->addCollector($collector, 'foo', $toolbarTemplate); - $this->assertSame($toolbarTemplate, $this->mainCollector->getToolbarTemplate($name)); + self::assertSame($toolbarTemplate, $this->mainCollector->getToolbarTemplate($name)); } public function testGetPanelTemplateNothing() @@ -104,11 +105,11 @@ public function testGetPanelTemplateNothing() $collector = $this->getDataCollectorMock(); $name = 'foobar'; $collector - ->expects($this->once()) + ->expects(self::once()) ->method('getName') - ->will($this->returnValue($name)); + ->will(self::returnValue($name)); $this->mainCollector->addCollector($collector); - $this->assertNull($this->mainCollector->getPanelTemplate($name)); + self::assertNull($this->mainCollector->getPanelTemplate($name)); } public function testGetPanelTemplate() @@ -116,13 +117,13 @@ public function testGetPanelTemplate() $collector = $this->getDataCollectorMock(); $name = 'foobar'; $collector - ->expects($this->once()) + ->expects(self::once()) ->method('getName') - ->will($this->returnValue($name)); + ->will(self::returnValue($name)); $panelTemplate = 'toolbar.html.twig'; $this->mainCollector->addCollector($collector, $panelTemplate, 'foo'); - $this->assertSame($panelTemplate, $this->mainCollector->getPanelTemplate($name)); + self::assertSame($panelTemplate, $this->mainCollector->getPanelTemplate($name)); } public function testCollect() @@ -130,15 +131,15 @@ public function testCollect() $collector1 = $this->getDataCollectorMock(); $nameCollector1 = 'collector1'; $collector1 - ->expects($this->once()) + ->expects(self::once()) ->method('getName') - ->will($this->returnValue($nameCollector1)); + ->will(self::returnValue($nameCollector1)); $collector2 = $this->getDataCollectorMock(); $nameCollector2 = 'collector2'; $collector2 - ->expects($this->once()) + ->expects(self::once()) ->method('getName') - ->will($this->returnValue($nameCollector2)); + ->will(self::returnValue($nameCollector2)); $allCollectors = [ $nameCollector1 => $collector1, @@ -153,7 +154,7 @@ public function testCollect() foreach ($allCollectors as $name => $collector) { $this->mainCollector->addCollector($collector); $collector - ->expects($this->once()) + ->expects(self::once()) ->method('collect') ->with($request, $response, $exception); } diff --git a/tests/bundle/Debug/DependencyInjection/Compiler/DataCollectorPassTest.php b/tests/bundle/Debug/DependencyInjection/Compiler/DataCollectorPassTest.php index c42e41f2e2..1e0d69cc99 100644 --- a/tests/bundle/Debug/DependencyInjection/Compiler/DataCollectorPassTest.php +++ b/tests/bundle/Debug/DependencyInjection/Compiler/DataCollectorPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\Debug\DependencyInjection\Compiler; use Ibexa\Bundle\Debug\Collector\IbexaCoreCollector; diff --git a/tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php b/tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php index 78d0c633e3..61842ffb75 100644 --- a/tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php +++ b/tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\IO\DependencyInjection\Compiler; use ArrayObject; @@ -79,9 +80,9 @@ public function testBinarydataHandler() ); $this->binarydataConfigurationFactoryMock - ->expects($this->once()) + ->expects(self::once()) ->method('getParentServiceId') - ->will($this->returnValue('test.io.binarydata_handler.test_handler')); + ->will(self::returnValue('test.io.binarydata_handler.test_handler')); $this->compile(); @@ -99,9 +100,9 @@ public function testMetadataHandler() ); $this->metadataConfigurationFactoryMock - ->expects($this->once()) + ->expects(self::once()) ->method('getParentServiceId') - ->will($this->returnValue('test.io.metadata_handler.test_handler')); + ->will(self::returnValue('test.io.metadata_handler.test_handler')); $this->compile(); diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTest.php index bb6236d146..ede0f45304 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\IO\DependencyInjection\ConfigurationFactory; use Ibexa\Tests\Bundle\IO\DependencyInjection\ConfigurationFactoryTest; diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/FlysystemTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/FlysystemTest.php index fbfea92f59..9653f1ff76 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/FlysystemTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/FlysystemTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\IO\DependencyInjection\ConfigurationFactory\BinarydataHandler; use Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory\BinarydataHandler\Flysystem; diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/FlysystemTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/FlysystemTest.php index 237f59c86e..ea78f2e86a 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/FlysystemTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/FlysystemTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\IO\DependencyInjection\ConfigurationFactory\MetadataHandler; use Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory\MetadataHandler\Flysystem; diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php index cbfec45317..8a64a14d1a 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\IO\DependencyInjection\ConfigurationFactory\MetadataHandler; use Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory\MetadataHandler\LegacyDFSCluster; diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php index fd7c0d0a1a..68b751123e 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\IO\DependencyInjection; use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractContainerBuilderTestCase; @@ -46,7 +47,7 @@ public function testAddConfiguration() { $node = new ArrayNodeDefinition('handler'); $this->factory->addConfiguration($node); - $this->assertInstanceOf(ArrayNodeDefinition::class, $node); + self::assertInstanceOf(ArrayNodeDefinition::class, $node); // @todo customized testing of configuration node ? } diff --git a/tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php b/tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php index 42585c5fab..2e8e905679 100644 --- a/tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php +++ b/tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\IO\DependencyInjection; use Ibexa\Bundle\Core\DependencyInjection\Compiler\ChainConfigResolverPass; diff --git a/tests/bundle/IO/EventListener/StreamFileListenerTest.php b/tests/bundle/IO/EventListener/StreamFileListenerTest.php index 89f0072961..dba3fdf215 100644 --- a/tests/bundle/IO/EventListener/StreamFileListenerTest.php +++ b/tests/bundle/IO/EventListener/StreamFileListenerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Bundle\IO\EventListener; use DateTime; @@ -44,7 +45,7 @@ public function testDoesNotRespondToNonIoUri() $this->configureIoUrlPrefix('var/test/storage'); $this->ioServiceMock - ->expects($this->never()) + ->expects(self::never()) ->method('loadBinaryFileByUri'); $this->eventListener->onKernelRequest($event); @@ -59,7 +60,7 @@ public function testDoesNotRespondToNoIoRequest() $this->configureIoUrlPrefix('http://foo.com/var/test/storage'); $this->ioServiceMock - ->expects($this->never()) + ->expects(self::never()) ->method('loadBinaryFileByUri'); $this->eventListener->onKernelRequest($event); @@ -78,10 +79,10 @@ public function testRespondsToIoUri() $binaryFile = new BinaryFile(['mtime' => new DateTime()]); $this->ioServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFileByUri') ->with($uri) - ->will($this->returnValue($binaryFile)); + ->will(self::returnValue($binaryFile)); $this->eventListener->onKernelRequest($event); @@ -110,10 +111,10 @@ public function testRespondsToIoRequest() $binaryFile = new BinaryFile(['mtime' => new DateTime()]); $this->ioServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFileByUri') ->with(sprintf('http://%s%s', $host, $uri)) - ->will($this->returnValue($binaryFile)); + ->will(self::returnValue($binaryFile)); $this->eventListener->onKernelRequest($event); diff --git a/tests/integration/Core/BaseCoreFieldTypeIntegrationTest.php b/tests/integration/Core/BaseCoreFieldTypeIntegrationTest.php index f82d97aa64..27323e8659 100644 --- a/tests/integration/Core/BaseCoreFieldTypeIntegrationTest.php +++ b/tests/integration/Core/BaseCoreFieldTypeIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core; use Doctrine\DBAL\Connection; diff --git a/tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php b/tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php index 468fcc2562..df7e0aa385 100644 --- a/tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php +++ b/tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php @@ -88,7 +88,7 @@ public function testStoreFieldData(VersionInfo $versionInfo, Field $field): void $this->ioServiceMock ->expects(self::once()) ->method('newBinaryCreateStructFromLocalFile') - ->will($this->returnValue($binaryFileCreateStruct)); + ->will(self::returnValue($binaryFileCreateStruct)); $this->pathGeneratorMock ->expects(self::once()) diff --git a/tests/integration/Core/Repository/BaseContentServiceTest.php b/tests/integration/Core/Repository/BaseContentServiceTest.php index ba8bb49f25..d8e0c29954 100644 --- a/tests/integration/Core/Repository/BaseContentServiceTest.php +++ b/tests/integration/Core/Repository/BaseContentServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\Values\Content\Location; diff --git a/tests/integration/Core/Repository/BaseContentTypeServiceTest.php b/tests/integration/Core/Repository/BaseContentTypeServiceTest.php index 7c59c01cf9..c7089d440d 100644 --- a/tests/integration/Core/Repository/BaseContentTypeServiceTest.php +++ b/tests/integration/Core/Repository/BaseContentTypeServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\Values\Content\Location; diff --git a/tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php b/tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php index 857905bb5c..87a0b41252 100644 --- a/tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php +++ b/tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Core\FieldType\TextLine\Value as TextLineValue; diff --git a/tests/integration/Core/Repository/BaseTest.php b/tests/integration/Core/Repository/BaseTest.php index ccad7d3862..834fc0c696 100644 --- a/tests/integration/Core/Repository/BaseTest.php +++ b/tests/integration/Core/Repository/BaseTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use ArrayObject; @@ -55,13 +56,13 @@ protected function setUp(): void // Use setup factory instance here w/o clearing data in case test don't need to $this->getSetupFactory()->getRepository(false); } catch (PDOException $e) { - $this->fail( + self::fail( 'The communication with the database cannot be established. ' . "This is required in order to perform the tests.\n\n" . 'Exception: ' . $e ); } catch (Exception $e) { - $this->fail( + self::fail( 'Cannot create a repository with predefined user. ' . 'Check the UserService or RoleService implementation. ' . PHP_EOL . PHP_EOL . @@ -302,7 +303,7 @@ private function assertPropertiesEqual($propertyName, $expectedValue, $actualVal $this->sortItems($expectedValue); } - $this->assertEquals( + self::assertEquals( $expectedValue, $actualValue, sprintf('Object property "%s" incorrect.', $propertyName) diff --git a/tests/integration/Core/Repository/BaseTrashServiceTest.php b/tests/integration/Core/Repository/BaseTrashServiceTest.php index ecdad092a0..78ad78a3f7 100644 --- a/tests/integration/Core/Repository/BaseTrashServiceTest.php +++ b/tests/integration/Core/Repository/BaseTrashServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Doctrine\DBAL\ParameterType; diff --git a/tests/integration/Core/Repository/BaseURLServiceTest.php b/tests/integration/Core/Repository/BaseURLServiceTest.php index bd98cd5201..dd4ce0443e 100644 --- a/tests/integration/Core/Repository/BaseURLServiceTest.php +++ b/tests/integration/Core/Repository/BaseURLServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\ContentTypeService; @@ -30,20 +31,20 @@ protected function doTestFindUrls(URLQuery $query, array $expectedUrls, ?int $ex $searchResult = $repository->getURLService()->findUrls($query); /* END: Use Case */ - $this->assertInstanceOf(SearchResult::class, $searchResult); - $this->assertSame($expectedTotalCount, $searchResult->totalCount); + self::assertInstanceOf(SearchResult::class, $searchResult); + self::assertSame($expectedTotalCount, $searchResult->totalCount); $this->assertSearchResultItems($searchResult, $expectedUrls, $ignoreOrder); } protected function assertSearchResultItems(SearchResult $searchResult, array $expectedUrls, $ignoreOrder) { - $this->assertCount(count($expectedUrls), $searchResult->items); + self::assertCount(count($expectedUrls), $searchResult->items); foreach ($searchResult->items as $i => $item) { if ($ignoreOrder) { - $this->assertContains($item->url, $expectedUrls); + self::assertContains($item->url, $expectedUrls); } else { - $this->assertEquals($expectedUrls[$i], $item->url); + self::assertEquals($expectedUrls[$i], $item->url); } } } @@ -53,7 +54,7 @@ protected function assertSearchResultItemsAreUnique(SearchResult $results): void $visitedUrls = []; foreach ($results->items as $item) { - $this->assertNotContains( + self::assertNotContains( $item->url, $visitedUrls, 'Search results contains duplicated url: ' . $item->url @@ -65,9 +66,9 @@ protected function assertSearchResultItemsAreUnique(SearchResult $results): void protected function assertUsagesSearchResultItems(UsageSearchResult $searchResult, array $expectedContentInfoIds) { - $this->assertCount(count($expectedContentInfoIds), $searchResult->items); + self::assertCount(count($expectedContentInfoIds), $searchResult->items); foreach ($searchResult->items as $contentInfo) { - $this->assertContains($contentInfo->id, $expectedContentInfoIds); + self::assertContains($contentInfo->id, $expectedContentInfoIds); } } diff --git a/tests/integration/Core/Repository/BookmarkServiceTest.php b/tests/integration/Core/Repository/BookmarkServiceTest.php index b4d1542d59..1464a5f3a9 100644 --- a/tests/integration/Core/Repository/BookmarkServiceTest.php +++ b/tests/integration/Core/Repository/BookmarkServiceTest.php @@ -33,7 +33,7 @@ public function testIsBookmarked() $isBookmarked = $repository->getBookmarkService()->isBookmarked($location); /* END: Use Case */ - $this->assertTrue($isBookmarked); + self::assertTrue($isBookmarked); } /** @@ -48,7 +48,7 @@ public function testIsNotBookmarked() $isBookmarked = $repository->getBookmarkService()->isBookmarked($location); /* END: Use Case */ - $this->assertFalse($isBookmarked); + self::assertFalse($isBookmarked); } /** @@ -68,12 +68,13 @@ public function testCreateBookmark() $afterCreateBookmark = $bookmarkService->isBookmarked($location); /* END: Use Case */ - $this->assertFalse($beforeCreateBookmark); - $this->assertTrue($afterCreateBookmark); + self::assertFalse($beforeCreateBookmark); + self::assertTrue($afterCreateBookmark); } /** * @covers \Ibexa\Contracts\Core\Repository\BookmarkService::createBookmark + * * @depends testCreateBookmark */ public function testCreateBookmarkThrowsInvalidArgumentException() @@ -109,12 +110,13 @@ public function testDeleteBookmark() $afterDeleteBookmark = $bookmarkService->isBookmarked($location); /* END: Use Case */ - $this->assertTrue($beforeDeleteBookmark); - $this->assertFalse($afterDeleteBookmark); + self::assertTrue($beforeDeleteBookmark); + self::assertFalse($afterDeleteBookmark); } /** * @covers \Ibexa\Contracts\Core\Repository\BookmarkService::deleteBookmark + * * @depends testDeleteBookmark */ public function testDeleteBookmarkThrowsInvalidArgumentException() @@ -143,10 +145,10 @@ public function testLoadBookmarks() $bookmarks = $repository->getBookmarkService()->loadBookmarks(1, 3); /* END: Use Case */ - $this->assertInstanceOf(BookmarkList::class, $bookmarks); - $this->assertEquals($bookmarks->totalCount, 5); + self::assertInstanceOf(BookmarkList::class, $bookmarks); + self::assertEquals($bookmarks->totalCount, 5); // Assert bookmarks order: recently added should be first - $this->assertEquals([15, 13, 12], array_map(static function ($location) { + self::assertEquals([15, 13, 12], array_map(static function ($location) { return $location->id; }, $bookmarks->items)); } diff --git a/tests/integration/Core/Repository/Common/SlugConverter.php b/tests/integration/Core/Repository/Common/SlugConverter.php index 0a84515e43..e0b3c1d890 100644 --- a/tests/integration/Core/Repository/Common/SlugConverter.php +++ b/tests/integration/Core/Repository/Common/SlugConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Common; use Ibexa\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter as LegacySlugConverter; diff --git a/tests/integration/Core/Repository/Container/Compiler/SetAllServicesPublicPass.php b/tests/integration/Core/Repository/Container/Compiler/SetAllServicesPublicPass.php index 268d7c4ae3..898f5423f4 100644 --- a/tests/integration/Core/Repository/Container/Compiler/SetAllServicesPublicPass.php +++ b/tests/integration/Core/Repository/Container/Compiler/SetAllServicesPublicPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Container\Compiler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; diff --git a/tests/integration/Core/Repository/ContentServiceAuthorizationTest.php b/tests/integration/Core/Repository/ContentServiceAuthorizationTest.php index 37b17d95c3..2c97cba252 100644 --- a/tests/integration/Core/Repository/ContentServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/ContentServiceAuthorizationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -18,7 +19,9 @@ * Test case for operations in the ContentServiceAuthorization using in memory storage. * * @covers \Ibexa\Contracts\Core\Repository\ContentService + * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUser + * * @group integration * @group authorization */ @@ -62,6 +65,7 @@ public function setUp(): void * Test for the createContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCreateContent */ public function testCreateContentThrowsUnauthorizedException() @@ -88,6 +92,7 @@ public function testCreateContentThrowsUnauthorizedException() * Test for the createContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent($contentCreateStruct, $locationCreateStructs) + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCreateContent */ public function testCreateContentThrowsUnauthorizedExceptionWithSecondParameter() @@ -104,6 +109,7 @@ public function testCreateContentThrowsUnauthorizedExceptionWithSecondParameter( * Test for the loadContentInfo() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentInfo() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentInfo */ public function testLoadContentInfoThrowsUnauthorizedException() @@ -122,6 +128,7 @@ public function testLoadContentInfoThrowsUnauthorizedException() * Test for the sudo() method. * * @covers \Ibexa\Contracts\Core\Repository\Repository::sudo() + * * @depends testLoadContentInfoThrowsUnauthorizedException */ public function testSudo() @@ -134,7 +141,7 @@ public function testSudo() return $repository->getContentService()->loadContentInfo($contentId); }); - $this->assertInstanceOf( + self::assertInstanceOf( ContentInfo::class, $contentInfo ); @@ -144,6 +151,7 @@ public function testSudo() * Test for the loadContentInfoList() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentInfoList() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentInfoList */ public function testLoadContentInfoListSkipsUnauthorizedItems() @@ -151,13 +159,14 @@ public function testLoadContentInfoListSkipsUnauthorizedItems() $contentId = $this->generateId('object', 10); $this->setRestrictedEditorUser(); - $this->assertCount(0, $this->contentService->loadContentInfoList([$contentId])); + self::assertCount(0, $this->contentService->loadContentInfoList([$contentId])); } /** * Test for the loadContentInfoByRemoteId() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentInfoByRemoteId() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentInfoByRemoteId */ public function testLoadContentInfoByRemoteIdThrowsUnauthorizedException() @@ -176,6 +185,7 @@ public function testLoadContentInfoByRemoteIdThrowsUnauthorizedException() * Test for the loadVersionInfo() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfo() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadVersionInfo */ public function testLoadVersionInfoThrowsUnauthorizedException() @@ -194,6 +204,7 @@ public function testLoadVersionInfoThrowsUnauthorizedException() * Test for the loadVersionInfo() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfo($contentInfo, $versionNo) + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadVersionInfoWithSecondParameter */ public function testLoadVersionInfoThrowsUnauthorizedExceptionWithSecondParameter() @@ -212,6 +223,7 @@ public function testLoadVersionInfoThrowsUnauthorizedExceptionWithSecondParamete * Test for the loadVersionInfoById() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadVersionInfoById */ public function testLoadVersionInfoByIdThrowsUnauthorizedException() @@ -229,6 +241,7 @@ public function testLoadVersionInfoByIdThrowsUnauthorizedException() * Test for the loadVersionInfoById() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById($contentId, $versionNo) + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadVersionInfoByIdWithSecondParameter */ public function testLoadVersionInfoByIdThrowsUnauthorizedExceptionWithSecondParameter() @@ -246,6 +259,7 @@ public function testLoadVersionInfoByIdThrowsUnauthorizedExceptionWithSecondPara * Test for the loadVersionInfoById() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById($contentId, $versionNo) + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadVersionInfoById */ public function testLoadVersionInfoByIdThrowsUnauthorizedExceptionForFirstDraft() @@ -268,6 +282,7 @@ public function testLoadVersionInfoByIdThrowsUnauthorizedExceptionForFirstDraft( * Test for the loadContentByContentInfo() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByContentInfo() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentByContentInfo */ public function testLoadContentByContentInfoThrowsUnauthorizedException() @@ -286,6 +301,7 @@ public function testLoadContentByContentInfoThrowsUnauthorizedException() * Test for the loadContentByContentInfo() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByContentInfo($contentInfo, $languages) + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentByContentInfoWithLanguageParameters */ public function testLoadContentByContentInfoThrowsUnauthorizedExceptionWithSecondParameter() @@ -304,6 +320,7 @@ public function testLoadContentByContentInfoThrowsUnauthorizedExceptionWithSecon * Test for the loadContentByContentInfo() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByContentInfo($contentInfo, $languages, $versionNo) + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentByContentInfoWithVersionNumberParameter */ public function testLoadContentByContentInfoThrowsUnauthorizedExceptionWithThirdParameter() @@ -322,6 +339,7 @@ public function testLoadContentByContentInfoThrowsUnauthorizedExceptionWithThird * Test for the loadContentByVersionInfo() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByVersionInfo() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentByVersionInfo */ public function testLoadContentByVersionInfoThrowsUnauthorizedException() @@ -342,6 +360,7 @@ public function testLoadContentByVersionInfoThrowsUnauthorizedException() * Test for the loadContentByVersionInfo() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByVersionInfo($versionInfo, $languages) + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentByVersionInfoWithSecondParameter */ public function testLoadContentByVersionInfoThrowsUnauthorizedExceptionWithSecondParameter() @@ -362,6 +381,7 @@ public function testLoadContentByVersionInfoThrowsUnauthorizedExceptionWithSecon * Test for the loadContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContent */ public function testLoadContentThrowsUnauthorizedException() @@ -379,6 +399,7 @@ public function testLoadContentThrowsUnauthorizedException() * Test for the loadContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContent($contentId, $languages) + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentWithPrioritizedLanguages */ public function testLoadContentThrowsUnauthorizedExceptionWithSecondParameter() @@ -396,6 +417,7 @@ public function testLoadContentThrowsUnauthorizedExceptionWithSecondParameter() * Test for the loadContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContent($contentId, $languages, $versionNo) + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentWithThirdParameter */ public function testLoadContentThrowsUnauthorizedExceptionWithThirdParameter() @@ -413,6 +435,7 @@ public function testLoadContentThrowsUnauthorizedExceptionWithThirdParameter() * Test for the loadContent() method on a draft. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContent */ public function testLoadContentThrowsUnauthorizedExceptionOnDrafts() @@ -440,6 +463,7 @@ public function testLoadContentThrowsUnauthorizedExceptionOnDrafts() * This test the version permission on loading archived versions * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContent */ public function testLoadContentThrowsUnauthorizedExceptionsOnArchives() @@ -484,6 +508,7 @@ public function testLoadContentThrowsUnauthorizedExceptionsOnArchives() * Test for the loadContentByRemoteId() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByRemoteId() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentByRemoteId */ public function testLoadContentByRemoteIdThrowsUnauthorizedException() @@ -502,6 +527,7 @@ public function testLoadContentByRemoteIdThrowsUnauthorizedException() * Test for the loadContentByRemoteId() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByRemoteId($remoteId, $languages) + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentByRemoteIdWithSecondParameter */ public function testLoadContentByRemoteIdThrowsUnauthorizedExceptionWithSecondParameter() @@ -520,6 +546,7 @@ public function testLoadContentByRemoteIdThrowsUnauthorizedExceptionWithSecondPa * Test for the loadContentByRemoteId() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByRemoteId($remoteId, $languages, $versionNo) + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentByRemoteIdWithThirdParameter */ public function testLoadContentByRemoteIdThrowsUnauthorizedExceptionWithThirdParameter() @@ -538,6 +565,7 @@ public function testLoadContentByRemoteIdThrowsUnauthorizedExceptionWithThirdPar * Test for the updateContentMetadata() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContentMetadata() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testUpdateContentMetadata */ public function testUpdateContentMetadataThrowsUnauthorizedException() @@ -569,6 +597,7 @@ public function testUpdateContentMetadataThrowsUnauthorizedException() * Test for the deleteContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testDeleteContent */ public function testDeleteContentThrowsUnauthorizedException() @@ -639,6 +668,7 @@ public function testDeleteContentWithLanguageLimitation(): void * Test for the createContentDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContentDraft() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCreateContentDraft */ public function testCreateContentDraftThrowsUnauthorizedException() @@ -659,6 +689,7 @@ public function testCreateContentDraftThrowsUnauthorizedException() * Test for the createContentDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContentDraft($contentInfo, $versionInfo) + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCreateContentDraftWithSecondParameter */ public function testCreateContentDraftThrowsUnauthorizedExceptionWithSecondParameter() @@ -685,13 +716,14 @@ public function testCountContentDraftsReturnZero() { $this->permissionResolver->setCurrentUserReference($this->anonymousUser); - $this->assertSame(0, $this->contentService->countContentDrafts()); + self::assertSame(0, $this->contentService->countContentDrafts()); } /** * Test for the loadContentDrafts() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentDrafts() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentDrafts * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentDrafts */ @@ -709,6 +741,7 @@ public function testLoadContentDraftsThrowsUnauthorizedException() * Test for the loadContentDrafts() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentDrafts($user) + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentDrafts */ public function testLoadContentDraftsThrowsUnauthorizedExceptionWithUser() @@ -725,6 +758,7 @@ public function testLoadContentDraftsThrowsUnauthorizedExceptionWithUser() * Test for the updateContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testUpdateContent */ public function testUpdateContentThrowsUnauthorizedException() @@ -753,6 +787,7 @@ public function testUpdateContentThrowsUnauthorizedException() * Test for the publishVersion() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::publishVersion() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testPublishVersion */ public function testPublishVersionThrowsUnauthorizedException() @@ -771,6 +806,7 @@ public function testPublishVersionThrowsUnauthorizedException() * Test for the deleteVersion() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteVersion() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testDeleteVersion */ public function testDeleteVersionThrowsUnauthorizedException() @@ -789,6 +825,7 @@ public function testDeleteVersionThrowsUnauthorizedException() * Test for the loadVersions() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersions() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadVersions */ public function testLoadVersionsThrowsUnauthorizedException() @@ -809,6 +846,7 @@ public function testLoadVersionsThrowsUnauthorizedException() * Test for the copyContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::copyContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCopyContent */ public function testCopyContentThrowsUnauthorizedException() @@ -845,6 +883,7 @@ public function testCopyContentThrowsUnauthorizedException() * Test for the copyContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::copyContent($contentInfo, $destinationLocationCreateStruct, $versionInfo) + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCopyContentWithGivenVersion */ public function testCopyContentThrowsUnauthorizedExceptionWithGivenVersion() @@ -878,6 +917,7 @@ public function testCopyContentThrowsUnauthorizedExceptionWithGivenVersion() * Test for the loadRelations() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadRelations() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadRelations */ public function testLoadRelationsThrowsUnauthorizedException() @@ -904,6 +944,7 @@ public function testLoadRelationsThrowsUnauthorizedException() * Test for the loadRelations() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadRelations() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadRelations */ public function testLoadRelationsForDraftVersionThrowsUnauthorizedException() @@ -922,6 +963,7 @@ public function testLoadRelationsForDraftVersionThrowsUnauthorizedException() * Test for the loadReverseRelations() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadReverseRelations() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadReverseRelations */ public function testLoadReverseRelationsThrowsUnauthorizedException() @@ -944,6 +986,7 @@ public function testLoadReverseRelationsThrowsUnauthorizedException() * Test for the addRelation() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::addRelation() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testAddRelation */ public function testAddRelationThrowsUnauthorizedException() @@ -971,6 +1014,7 @@ public function testAddRelationThrowsUnauthorizedException() * Test for the deleteRelation() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteRelation() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testDeleteRelation */ public function testDeleteRelationThrowsUnauthorizedException() @@ -1030,6 +1074,7 @@ private function createAnonymousWithEditorRole() * only that the non-readable related object(s) won't be loaded. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadRelations() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testAddRelation */ public function testLoadRelationsWithUnauthorizedRelations() @@ -1146,7 +1191,7 @@ public function testLoadRelationsWithUnauthorizedRelations() ]; // assert there are as many expected relations as actual ones - $this->assertEquals( + self::assertEquals( count($expectedRelations), count($actualRelations), "Expected '" . count($expectedRelations) @@ -1157,13 +1202,13 @@ public function testLoadRelationsWithUnauthorizedRelations() foreach ($actualRelations as $relation) { $destination = $relation->destinationContentInfo; $expected = $expectedRelations[$destination->id]->destinationContentInfo; - $this->assertNotEmpty($expected, "Non expected relation with '{$destination->id}' id found"); - $this->assertEquals( + self::assertNotEmpty($expected, "Non expected relation with '{$destination->id}' id found"); + self::assertEquals( $expected->id, $destination->id, "Expected relation with '{$expected->id}' id found '{$destination->id}' id" ); - $this->assertEquals( + self::assertEquals( $expected->name, $destination->name, "Expected relation with '{$expected->name}' name found '{$destination->name}' name" @@ -1174,7 +1219,7 @@ public function testLoadRelationsWithUnauthorizedRelations() } // verify all expected relations were found - $this->assertCount( + self::assertCount( 0, $expectedRelations, "Expected to find '" . (count($expectedRelations) + count($actualRelations)) diff --git a/tests/integration/Core/Repository/ContentServiceTest.php b/tests/integration/Core/Repository/ContentServiceTest.php index 91f42c9438..ff46b4e9c2 100644 --- a/tests/integration/Core/Repository/ContentServiceTest.php +++ b/tests/integration/Core/Repository/ContentServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Exception; @@ -37,6 +38,7 @@ * Test case for operations in the ContentService using in memory storage. * * @see \Ibexa\Contracts\Core\Repository\ContentService + * * @group content */ class ContentServiceTest extends BaseContentServiceTest @@ -83,7 +85,9 @@ public function setUp(): void * Test for the newContentCreateStruct() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::newContentCreateStruct() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testLoadContentTypeByIdentifier + * * @group user * @group field-type */ @@ -94,7 +98,7 @@ public function testNewContentCreateStruct() $contentCreate = $this->contentService->newContentCreateStruct($contentType, self::ENG_US); - $this->assertInstanceOf(ContentCreateStruct::class, $contentCreate); + self::assertInstanceOf(ContentCreateStruct::class, $contentCreate); } /** @@ -103,7 +107,9 @@ public function testNewContentCreateStruct() * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends testNewContentCreateStruct + * * @group user * @group field-type */ @@ -121,7 +127,7 @@ public function testCreateContent() $content = $this->contentService->createContent($contentCreate); - $this->assertInstanceOf(Content::class, $content); + self::assertInstanceOf(Content::class, $content); return $content; } @@ -133,6 +139,7 @@ public function testCreateContent() * and should have access to do that. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent + * * @group user * @group field-type */ @@ -189,11 +196,12 @@ public function testCreateContentAndPublishWithPrivilegedAnonymousUser(): void * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends testCreateContent */ public function testCreateContentSetsContentInfo($content) { - $this->assertInstanceOf(ContentInfo::class, $content->contentInfo); + self::assertInstanceOf(ContentInfo::class, $content->contentInfo); return $content; } @@ -204,13 +212,14 @@ public function testCreateContentSetsContentInfo($content) * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends testCreateContentSetsContentInfo */ public function testCreateContentSetsExpectedContentInfo($content) { $permissionResolver = $this->getRepository()->getPermissionResolver(); - $this->assertEquals( + self::assertEquals( [ $content->id, 28, // id of content type "forum" @@ -247,11 +256,12 @@ public function testCreateContentSetsExpectedContentInfo($content) * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends testCreateContent */ public function testCreateContentSetsVersionInfo($content) { - $this->assertInstanceOf(VersionInfo::class, $content->getVersionInfo()); + self::assertInstanceOf(VersionInfo::class, $content->getVersionInfo()); return $content; } @@ -262,13 +272,14 @@ public function testCreateContentSetsVersionInfo($content) * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends testCreateContentSetsVersionInfo */ public function testCreateContentSetsExpectedVersionInfo($content) { $currentUserReference = $this->getRepository()->getPermissionResolver()->getCurrentUserReference(); - $this->assertEquals( + self::assertEquals( [ 'status' => VersionInfo::STATUS_DRAFT, 'versionNo' => 1, @@ -282,9 +293,9 @@ public function testCreateContentSetsExpectedVersionInfo($content) 'initialLanguageCode' => $content->getVersionInfo()->initialLanguageCode, ] ); - $this->assertTrue($content->getVersionInfo()->isDraft()); - $this->assertFalse($content->getVersionInfo()->isPublished()); - $this->assertFalse($content->getVersionInfo()->isArchived()); + self::assertTrue($content->getVersionInfo()->isDraft()); + self::assertFalse($content->getVersionInfo()->isPublished()); + self::assertFalse($content->getVersionInfo()->isArchived()); } /** @@ -293,13 +304,14 @@ public function testCreateContentSetsExpectedVersionInfo($content) * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends testCreateContent */ public function testCreateContentSetsExpectedContentType($content) { $contentType = $content->getContentType(); - $this->assertEquals( + self::assertEquals( [ $contentType->id, // Won't match as it's set to true in createContentDraftVersion1() @@ -337,15 +349,16 @@ public function testCreateContentWithContentTypeDefaultOptions(): void $location = $publishedContent->contentInfo->getMainLocation(); - $this->assertEquals($contentType->defaultSortField, $location->sortField); - $this->assertEquals($contentType->defaultSortOrder, $location->sortOrder); - $this->assertEquals($contentType->defaultAlwaysAvailable, $publishedContent->contentInfo->alwaysAvailable); + self::assertEquals($contentType->defaultSortField, $location->sortField); + self::assertEquals($contentType->defaultSortOrder, $location->sortOrder); + self::assertEquals($contentType->defaultAlwaysAvailable, $publishedContent->contentInfo->alwaysAvailable); } /** * Test for the createContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends testCreateContent */ public function testCreateContentThrowsInvalidArgumentException() @@ -377,6 +390,7 @@ public function testCreateContentThrowsInvalidArgumentException() * Test for the createContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends testCreateContent */ public function testCreateContentThrowsInvalidArgumentExceptionOnFieldTypeNotAccept() @@ -397,6 +411,7 @@ public function testCreateContentThrowsInvalidArgumentExceptionOnFieldTypeNotAcc * Test for the createContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends testCreateContent */ public function testCreateContentThrowsContentFieldValidationException() @@ -420,6 +435,7 @@ public function testCreateContentThrowsContentFieldValidationException() * Test for the createContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends testCreateContent */ public function testCreateContentRequiredFieldMissing() @@ -444,7 +460,9 @@ public function testCreateContentRequiredFieldMissing() * here. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent + * * @depends testCreateContent + * * @group user */ public function testCreateContentWithLocationCreateParameterDoesNotCreateLocationImmediately() @@ -461,6 +479,7 @@ public function testCreateContentWithLocationCreateParameterDoesNotCreateLocatio * Test for the createContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent($contentCreateStruct, $locationCreateStructs) + * * @depends testCreateContentWithLocationCreateParameterDoesNotCreateLocationImmediately */ public function testCreateContentThrowsInvalidArgumentExceptionWithLocationCreateParameter() @@ -515,6 +534,7 @@ public function testCreateContentThrowsInvalidArgumentExceptionWithLocationCreat * Test for the loadContentInfo() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentInfo() + * * @group user */ public function testLoadContentInfo() @@ -524,7 +544,7 @@ public function testLoadContentInfo() // Load the ContentInfo for "Media" folder $contentInfo = $this->contentService->loadContentInfo($mediaFolderId); - $this->assertInstanceOf(ContentInfo::class, $contentInfo); + self::assertInstanceOf(ContentInfo::class, $contentInfo); return $contentInfo; } @@ -533,6 +553,7 @@ public function testLoadContentInfo() * Test for the returned value of the loadContentInfo() method. * * @depends testLoadContentInfo + * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentInfo * * @param \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo @@ -547,6 +568,7 @@ public function testLoadContentInfoSetsExpectedContentInfo(ContentInfo $contentI /** * @depends testLoadContentInfo + * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentInfo * * @param \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo @@ -555,12 +577,13 @@ public function testLoadContentInfoGetContentType(ContentInfo $contentInfo): voi { $contentType = $contentInfo->getContentType(); - $this->assertInstanceOf(ContentType::class, $contentType); - $this->assertEquals('folder', $contentType->identifier); + self::assertInstanceOf(ContentType::class, $contentType); + self::assertEquals('folder', $contentType->identifier); } /** * @depends testLoadContentInfo + * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentInfo * * @param \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo @@ -569,12 +592,13 @@ public function testLoadContentInfoGetSection(ContentInfo $contentInfo): void { $section = $contentInfo->getSection(); - $this->assertInstanceOf(Section::class, $section); - $this->assertEquals('media', $section->identifier); + self::assertInstanceOf(Section::class, $section); + self::assertEquals('media', $section->identifier); } /** * @depends testLoadContentInfo + * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentInfo * * @param \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo @@ -583,12 +607,13 @@ public function testLoadContentInfoGetMainLanguage(ContentInfo $contentInfo): vo { $language = $contentInfo->getMainLanguage(); - $this->assertInstanceOf(Language::class, $language); - $this->assertEquals('eng-US', $language->languageCode); + self::assertInstanceOf(Language::class, $language); + self::assertEquals('eng-US', $language->languageCode); } /** * @depends testLoadContentInfo + * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentInfo * * @param \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo @@ -597,12 +622,13 @@ public function testLoadContentInfoGetMainLocation(ContentInfo $contentInfo): vo { $mainLocation = $contentInfo->getMainLocation(); - $this->assertInstanceOf(Location::class, $mainLocation); - $this->assertEquals('75c715a51699d2d309a924eca6a95145', $mainLocation->remoteId); + self::assertInstanceOf(Location::class, $mainLocation); + self::assertEquals('75c715a51699d2d309a924eca6a95145', $mainLocation->remoteId); } /** * @depends testLoadContentInfo + * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentInfo * * @param \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo @@ -611,14 +637,15 @@ public function testLoadContentInfoSetsExpectedOwnerProxy(ContentInfo $contentIn { $owner = $contentInfo->getOwner(); - $this->assertInstanceOf(User::class, $owner); - $this->assertEquals('Administrator User', $owner->getName()); + self::assertInstanceOf(User::class, $owner); + self::assertEquals('Administrator User', $owner->getName()); } /** * Test for the loadContentInfo() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentInfo() + * * @depends testLoadContentInfo */ public function testLoadContentInfoThrowsNotFoundException() @@ -640,9 +667,9 @@ public function testLoadContentInfoList() $mediaFolderId = $this->generateId('object', self::MEDIA_CONTENT_ID); $list = $this->contentService->loadContentInfoList([$mediaFolderId]); - $this->assertCount(1, $list); - $this->assertEquals([$mediaFolderId], array_keys($list), 'Array key was not content id'); - $this->assertInstanceOf( + self::assertCount(1, $list); + self::assertEquals([$mediaFolderId], array_keys($list), 'Array key was not content id'); + self::assertInstanceOf( ContentInfo::class, $list[$mediaFolderId] ); @@ -652,6 +679,7 @@ public function testLoadContentInfoList() * Test for the loadContentInfoList() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentInfoList() + * * @depends testLoadContentInfoList */ public function testLoadContentInfoListSkipsNotFoundItems() @@ -659,7 +687,7 @@ public function testLoadContentInfoListSkipsNotFoundItems() $nonExistentContentId = $this->generateId('object', self::DB_INT_MAX); $list = $this->contentService->loadContentInfoList([$nonExistentContentId]); - $this->assertCount(0, $list); + self::assertCount(0, $list); } /** @@ -672,7 +700,7 @@ public function testLoadContentInfoByRemoteId() // Load the ContentInfo for "Media" folder $contentInfo = $this->contentService->loadContentInfoByRemoteId('faaeb9be3bd98ed09f606fc16d144eca'); - $this->assertInstanceOf(ContentInfo::class, $contentInfo); + self::assertInstanceOf(ContentInfo::class, $contentInfo); return $contentInfo; } @@ -681,6 +709,7 @@ public function testLoadContentInfoByRemoteId() * Test for the returned value of the loadContentInfoByRemoteId() method. * * @depends testLoadContentInfoByRemoteId + * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentInfoByRemoteId * * @param \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo @@ -711,6 +740,7 @@ public function testLoadContentInfoByRemoteIdSetsExpectedContentInfo(ContentInfo * Test for the loadContentInfoByRemoteId() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentInfoByRemoteId() + * * @depends testLoadContentInfoByRemoteId */ public function testLoadContentInfoByRemoteIdThrowsNotFoundException() @@ -724,7 +754,9 @@ public function testLoadContentInfoByRemoteIdThrowsNotFoundException() * Test for the loadVersionInfo() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfo() + * * @depends testLoadContentInfo + * * @group user */ public function testLoadVersionInfo() @@ -738,7 +770,7 @@ public function testLoadVersionInfo() // Now load the current version info of the "Media" folder $versionInfo = $this->contentService->loadVersionInfo($contentInfo); - $this->assertInstanceOf( + self::assertInstanceOf( VersionInfo::class, $versionInfo ); @@ -757,7 +789,7 @@ public function testLoadVersionInfoById() // Load the VersionInfo for "Media" folder $versionInfo = $this->contentService->loadVersionInfoById($mediaFolderId); - $this->assertInstanceOf( + self::assertInstanceOf( VersionInfo::class, $versionInfo ); @@ -769,6 +801,7 @@ public function testLoadVersionInfoById() * Test for the returned value of the loadVersionInfoById() method. * * @depends testLoadVersionInfoById + * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById * * @param \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo $versionInfo @@ -794,9 +827,9 @@ public function testLoadVersionInfoByIdSetsExpectedVersionInfo(VersionInfo $vers ], $versionInfo ); - $this->assertTrue($versionInfo->isPublished()); - $this->assertFalse($versionInfo->isDraft()); - $this->assertFalse($versionInfo->isArchived()); + self::assertTrue($versionInfo->isPublished()); + self::assertFalse($versionInfo->isDraft()); + self::assertFalse($versionInfo->isArchived()); } /** @@ -808,12 +841,13 @@ public function testLoadVersionInfoByIdGetCreator(VersionInfo $versionInfo): voi { $creator = $versionInfo->getCreator(); - $this->assertInstanceOf(User::class, $creator); - $this->assertEquals('Administrator User', $creator->getName()); + self::assertInstanceOf(User::class, $creator); + self::assertEquals('Administrator User', $creator->getName()); } /** * @depends testLoadVersionInfoById + * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById * * @param \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo $versionInfo @@ -822,8 +856,8 @@ public function testLoadVersionInfoByIdGetInitialLanguage(VersionInfo $versionIn { $initialLanguage = $versionInfo->getInitialLanguage(); - $this->assertInstanceOf(Language::class, $initialLanguage); - $this->assertEquals('eng-US', $initialLanguage->languageCode); + self::assertInstanceOf(Language::class, $initialLanguage); + self::assertEquals('eng-US', $initialLanguage->languageCode); } /** @@ -837,7 +871,7 @@ public function testLoadVersionInfoByIdGetLanguages(VersionInfo $versionInfo): v $expectedLanguages = ['eng-US']; foreach ($expectedLanguages as $i => $expectedLanguage) { - $this->assertEquals($expectedLanguage, $actualLanguages[$i]->languageCode); + self::assertEquals($expectedLanguage, $actualLanguages[$i]->languageCode); } } @@ -845,6 +879,7 @@ public function testLoadVersionInfoByIdGetLanguages(VersionInfo $versionInfo): v * Test for the loadVersionInfoById() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById() + * * @depends testLoadVersionInfoById */ public function testLoadVersionInfoByIdThrowsNotFoundException() @@ -860,6 +895,7 @@ public function testLoadVersionInfoByIdThrowsNotFoundException() * Test for the loadContentByContentInfo() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByContentInfo() + * * @depends testLoadContentInfo */ public function testLoadContentByContentInfo() @@ -873,7 +909,7 @@ public function testLoadContentByContentInfo() // Now load the current content version for the info instance $content = $this->contentService->loadContentByContentInfo($contentInfo); - $this->assertInstanceOf( + self::assertInstanceOf( Content::class, $content ); @@ -883,6 +919,7 @@ public function testLoadContentByContentInfo() * Test for the loadContentByVersionInfo() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByVersionInfo() + * * @depends testLoadVersionInfo */ public function testLoadContentByVersionInfo() @@ -899,7 +936,7 @@ public function testLoadContentByVersionInfo() // Now load the current content version for the info instance $content = $this->contentService->loadContentByVersionInfo($versionInfo); - $this->assertInstanceOf( + self::assertInstanceOf( Content::class, $content ); @@ -909,6 +946,7 @@ public function testLoadContentByVersionInfo() * Test for the loadContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContent() + * * @group user * @group field-type */ @@ -920,7 +958,7 @@ public function testLoadContent() // Load the Content for "Media" folder, any language and current version $content = $this->contentService->loadContent($mediaFolderId); - $this->assertInstanceOf( + self::assertInstanceOf( Content::class, $content ); @@ -930,6 +968,7 @@ public function testLoadContent() * Test for the loadContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContent() + * * @depends testLoadContent */ public function testLoadContentThrowsNotFoundException() @@ -964,6 +1003,7 @@ public function contentRemoteIdVersionLanguageProvider() * Test for the loadContentByRemoteId() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByRemoteId + * * @dataProvider contentRemoteIdVersionLanguageProvider * * @param string $remoteId @@ -974,22 +1014,23 @@ public function testLoadContentByRemoteId($remoteId, $languages, $versionNo) { $content = $this->contentService->loadContentByRemoteId($remoteId, $languages, $versionNo); - $this->assertInstanceOf( + self::assertInstanceOf( Content::class, $content ); - $this->assertEquals($remoteId, $content->contentInfo->remoteId); + self::assertEquals($remoteId, $content->contentInfo->remoteId); if ($languages !== null) { - $this->assertEquals($languages, $content->getVersionInfo()->languageCodes); + self::assertEquals($languages, $content->getVersionInfo()->languageCodes); } - $this->assertEquals($versionNo ?: 1, $content->getVersionInfo()->versionNo); + self::assertEquals($versionNo ?: 1, $content->getVersionInfo()->versionNo); } /** * Test for the loadContentByRemoteId() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByRemoteId() + * * @depends testLoadContentByRemoteId */ public function testLoadContentByRemoteIdThrowsNotFoundException() @@ -1006,10 +1047,12 @@ public function testLoadContentByRemoteIdThrowsNotFoundException() * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content * * @covers \Ibexa\Contracts\Core\Repository\ContentService::publishVersion() + * * @depends testLoadContent * @depends testLoadContentInfo * @depends testLoadVersionInfo * @depends testCreateContentWithLocationCreateParameterDoesNotCreateLocationImmediately + * * @group user * @group field-type */ @@ -1018,14 +1061,14 @@ public function testPublishVersion() $time = time(); $content = $this->createContentVersion1(); - $this->assertInstanceOf(Content::class, $content); - $this->assertTrue($content->contentInfo->published); - $this->assertEquals(VersionInfo::STATUS_PUBLISHED, $content->versionInfo->status); - $this->assertGreaterThanOrEqual($time, $content->contentInfo->publishedDate->getTimestamp()); - $this->assertGreaterThanOrEqual($time, $content->contentInfo->modificationDate->getTimestamp()); - $this->assertTrue($content->versionInfo->isPublished()); - $this->assertFalse($content->versionInfo->isDraft()); - $this->assertFalse($content->versionInfo->isArchived()); + self::assertInstanceOf(Content::class, $content); + self::assertTrue($content->contentInfo->published); + self::assertEquals(VersionInfo::STATUS_PUBLISHED, $content->versionInfo->status); + self::assertGreaterThanOrEqual($time, $content->contentInfo->publishedDate->getTimestamp()); + self::assertGreaterThanOrEqual($time, $content->contentInfo->modificationDate->getTimestamp()); + self::assertTrue($content->versionInfo->isPublished()); + self::assertFalse($content->versionInfo->isDraft()); + self::assertFalse($content->versionInfo->isArchived()); return $content; } @@ -1036,13 +1079,14 @@ public function testPublishVersion() * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content * * @covers \Ibexa\Contracts\Core\Repository\ContentService::publishVersion() + * * @depends testPublishVersion */ public function testPublishVersionSetsExpectedContentInfo($content) { $userReference = $this->getRepository()->getPermissionResolver()->getCurrentUserReference(); - $this->assertEquals( + self::assertEquals( [ $content->id, true, @@ -1063,9 +1107,9 @@ public function testPublishVersionSetsExpectedContentInfo($content) ] ); - $this->assertNotNull($content->contentInfo->mainLocationId); + self::assertNotNull($content->contentInfo->mainLocationId); $date = new \DateTime('1984/01/01'); - $this->assertGreaterThan( + self::assertGreaterThan( $date->getTimestamp(), $content->contentInfo->publishedDate->getTimestamp() ); @@ -1077,13 +1121,14 @@ public function testPublishVersionSetsExpectedContentInfo($content) * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content * * @covers \Ibexa\Contracts\Core\Repository\ContentService::publishVersion() + * * @depends testPublishVersion */ public function testPublishVersionSetsExpectedVersionInfo($content) { $currentUserReference = $this->getRepository()->getPermissionResolver()->getCurrentUserReference(); - $this->assertEquals( + self::assertEquals( [ $currentUserReference->getUserId(), self::ENG_US, @@ -1099,15 +1144,15 @@ public function testPublishVersionSetsExpectedVersionInfo($content) ); $date = new \DateTime('1984/01/01'); - $this->assertGreaterThan( + self::assertGreaterThan( $date->getTimestamp(), $content->getVersionInfo()->modificationDate->getTimestamp() ); - $this->assertNotNull($content->getVersionInfo()->modificationDate); - $this->assertTrue($content->getVersionInfo()->isPublished()); - $this->assertFalse($content->getVersionInfo()->isDraft()); - $this->assertFalse($content->getVersionInfo()->isArchived()); + self::assertNotNull($content->getVersionInfo()->modificationDate); + self::assertTrue($content->getVersionInfo()->isPublished()); + self::assertFalse($content->getVersionInfo()->isDraft()); + self::assertFalse($content->getVersionInfo()->isArchived()); } /** @@ -1116,13 +1161,14 @@ public function testPublishVersionSetsExpectedVersionInfo($content) * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content * * @covers \Ibexa\Contracts\Core\Repository\ContentService::publishVersion() + * * @depends testPublishVersion */ public function testPublishVersionSetsExpectedContentType($content) { $contentType = $content->getContentType(); - $this->assertEquals( + self::assertEquals( [ $contentType->id, // won't be a match as it's set to true in createContentDraftVersion1() @@ -1152,7 +1198,7 @@ public function testPublishVersionCreatesLocationsDefinedOnCreate(): array '0123456789abcdef0123456789abcdef' ); - $this->assertEquals( + self::assertEquals( $location->getContentInfo(), $content->getVersionInfo()->getContentInfo() ); @@ -1164,6 +1210,7 @@ public function testPublishVersionCreatesLocationsDefinedOnCreate(): array * Test for the publishVersion() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::publishVersion() + * * @depends testPublishVersionCreatesLocationsDefinedOnCreate */ public function testCreateContentWithLocationCreateParameterCreatesExpectedLocation(array $testData) @@ -1197,6 +1244,7 @@ public function testCreateContentWithLocationCreateParameterCreatesExpectedLocat * Test for the publishVersion() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::publishVersion() + * * @depends testPublishVersion */ public function testPublishVersionThrowsBadStateException() @@ -1230,11 +1278,11 @@ public function testPublishVersionDoesNotChangePublishedDate() $contentDraft = $this->contentService->updateContent($contentDraft->versionInfo, $contentUpdateStruct); $republishedContent = $this->contentService->publishVersion($contentDraft->versionInfo); - $this->assertEquals( + self::assertEquals( $publishedContent->contentInfo->publishedDate->getTimestamp(), $republishedContent->contentInfo->publishedDate->getTimestamp() ); - $this->assertGreaterThan( + self::assertGreaterThan( $publishedContent->contentInfo->modificationDate->getTimestamp(), $republishedContent->contentInfo->modificationDate->getTimestamp() ); @@ -1246,7 +1294,9 @@ public function testPublishVersionDoesNotChangePublishedDate() * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContentDraft() + * * @depends testPublishVersion + * * @group user */ public function testCreateContentDraft() @@ -1256,7 +1306,7 @@ public function testCreateContentDraft() // Now we create a new draft from the published content $draftedContent = $this->contentService->createContentDraft($content->contentInfo); - $this->assertInstanceOf( + self::assertInstanceOf( Content::class, $draftedContent ); @@ -1283,8 +1333,8 @@ public function testCreateContentDraftInOtherLanguage() $language ); - $this->assertEquals('eng-US', $content->versionInfo->initialLanguageCode); - $this->assertEquals('eng-GB', $draftedContent->versionInfo->initialLanguageCode); + self::assertEquals('eng-US', $content->versionInfo->initialLanguageCode); + self::assertEquals('eng-GB', $draftedContent->versionInfo->initialLanguageCode); } /** @@ -1294,7 +1344,9 @@ public function testCreateContentDraftInOtherLanguage() * Note: Editors have access to version_read, which is needed to load content drafts. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContentDraft() + * * @depends testPublishVersion + * * @group user */ public function testCreateContentDraftAndLoadAccess() @@ -1310,7 +1362,7 @@ public function testCreateContentDraftAndLoadAccess() // Try to load the draft $loadedDraft = $this->contentService->loadContent($draft->id); - $this->assertEquals($draft->id, $loadedDraft->id); + self::assertEquals($draft->id, $loadedDraft->id); } /** @@ -1319,11 +1371,12 @@ public function testCreateContentDraftAndLoadAccess() * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $draft * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContentDraft() + * * @depends testCreateContentDraft */ public function testCreateContentDraftSetsExpectedProperties($draft) { - $this->assertEquals( + self::assertEquals( [ 'fieldCount' => 1, 'relationCount' => 0, @@ -1341,6 +1394,7 @@ public function testCreateContentDraftSetsExpectedProperties($draft) * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $draft * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContentDraft() + * * @depends testCreateContentDraft */ public function testCreateContentDraftSetsContentInfo($draft) @@ -1348,7 +1402,7 @@ public function testCreateContentDraftSetsContentInfo($draft) $contentInfo = $draft->contentInfo; $currentUserReference = $this->getRepository()->getPermissionResolver()->getCurrentUserReference(); - $this->assertEquals( + self::assertEquals( [ $draft->id, true, @@ -1376,6 +1430,7 @@ public function testCreateContentDraftSetsContentInfo($draft) * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $draft * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContentDraft() + * * @depends testCreateContentDraft */ public function testCreateContentDraftSetsVersionInfo($draft) @@ -1383,7 +1438,7 @@ public function testCreateContentDraftSetsVersionInfo($draft) $versionInfo = $draft->getVersionInfo(); $currentUserReference = $this->getRepository()->getPermissionResolver()->getCurrentUserReference(); - $this->assertEquals( + self::assertEquals( [ 'creatorId' => $currentUserReference->getUserId(), 'initialLanguageCode' => self::ENG_US, @@ -1399,9 +1454,9 @@ public function testCreateContentDraftSetsVersionInfo($draft) 'versionNo' => $versionInfo->versionNo, ] ); - $this->assertTrue($versionInfo->isDraft()); - $this->assertFalse($versionInfo->isPublished()); - $this->assertFalse($versionInfo->isArchived()); + self::assertTrue($versionInfo->isDraft()); + self::assertFalse($versionInfo->isPublished()); + self::assertFalse($versionInfo->isArchived()); } /** @@ -1410,6 +1465,7 @@ public function testCreateContentDraftSetsVersionInfo($draft) * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $draft * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContentDraft() + * * @depends testCreateContentDraft * @depends testLoadVersionInfo */ @@ -1423,13 +1479,14 @@ public function testCreateContentDraftLoadVersionInfoStillLoadsPublishedVersion( // This call will still load the published version $versionInfoPublished = $this->contentService->loadVersionInfo($content->contentInfo); - $this->assertEquals(1, $versionInfoPublished->versionNo); + self::assertEquals(1, $versionInfoPublished->versionNo); } /** * Test for the createContentDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContentDraft() + * * @depends testLoadContent * @depends testCreateContentDraft */ @@ -1443,13 +1500,14 @@ public function testCreateContentDraftLoadContentStillLoadsPublishedVersion() // This call will still load the published content version $contentPublished = $this->contentService->loadContent($content->id); - $this->assertEquals(1, $contentPublished->getVersionInfo()->versionNo); + self::assertEquals(1, $contentPublished->getVersionInfo()->versionNo); } /** * Test for the createContentDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContentDraft() + * * @depends testLoadContentByRemoteId * @depends testCreateContentDraft */ @@ -1463,13 +1521,14 @@ public function testCreateContentDraftLoadContentByRemoteIdStillLoadsPublishedVe // This call will still load the published content version $contentPublished = $this->contentService->loadContentByRemoteId('abcdef0123456789abcdef0123456789'); - $this->assertEquals(1, $contentPublished->getVersionInfo()->versionNo); + self::assertEquals(1, $contentPublished->getVersionInfo()->versionNo); } /** * Test for the createContentDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContentDraft() + * * @depends testLoadContentByContentInfo * @depends testCreateContentDraft */ @@ -1483,20 +1542,21 @@ public function testCreateContentDraftLoadContentByContentInfoStillLoadsPublishe // This call will still load the published content version $contentPublished = $this->contentService->loadContentByContentInfo($content->contentInfo); - $this->assertEquals(1, $contentPublished->getVersionInfo()->versionNo); + self::assertEquals(1, $contentPublished->getVersionInfo()->versionNo); } /** * Test for the newContentUpdateStruct() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::newContentUpdateStruct + * * @group user */ public function testNewContentUpdateStruct() { $updateStruct = $this->contentService->newContentUpdateStruct(); - $this->assertInstanceOf( + self::assertInstanceOf( ContentUpdateStruct::class, $updateStruct ); @@ -1516,8 +1576,10 @@ public function testNewContentUpdateStruct() * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent() + * * @depends testNewContentUpdateStruct * @depends testCreateContentDraft + * * @group user * @group field-type */ @@ -1525,12 +1587,12 @@ public function testUpdateContent() { $draftVersion2 = $this->createUpdatedDraftVersion2(); - $this->assertInstanceOf( + self::assertInstanceOf( Content::class, $draftVersion2 ); - $this->assertEquals( + self::assertEquals( $this->generateId('user', 10), $draftVersion2->versionInfo->creatorId, 'creatorId is not properly set on new Version' @@ -1545,8 +1607,10 @@ public function testUpdateContent() * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent() + * * @depends testNewContentUpdateStruct * @depends testCreateContentDraft + * * @group user * @group field-type */ @@ -1554,12 +1618,12 @@ public function testUpdateContentWithDifferentUser() { $arrayWithDraftVersion2 = $this->createUpdatedDraftVersion2NotAdmin(); - $this->assertInstanceOf( + self::assertInstanceOf( Content::class, $arrayWithDraftVersion2[0] ); - $this->assertEquals( + self::assertEquals( $this->generateId('user', $arrayWithDraftVersion2[1]), $arrayWithDraftVersion2[0]->versionInfo->creatorId, 'creatorId is not properly set on new Version' @@ -1574,6 +1638,7 @@ public function testUpdateContentWithDifferentUser() * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent() + * * @depends testUpdateContent */ public function testUpdateContentSetsExpectedFields($content) @@ -1601,13 +1666,14 @@ public function testUpdateContentSetsExpectedFields($content) ), ]; - $this->assertEquals($expected, $actual); + self::assertEquals($expected, $actual); } /** * Test for the updateContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent() + * * @depends testUpdateContent */ public function testUpdateContentThrowsBadStateException() @@ -1634,6 +1700,7 @@ public function testUpdateContentThrowsBadStateException() * Test for the updateContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent() + * * @depends testUpdateContent */ public function testUpdateContentThrowsInvalidArgumentExceptionWhenFieldTypeDoesNotAccept() @@ -1657,6 +1724,7 @@ public function testUpdateContentThrowsInvalidArgumentExceptionWhenFieldTypeDoes * Test for the updateContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent() + * * @depends testUpdateContent */ public function testUpdateContentWhenMandatoryFieldIsEmpty() @@ -1683,6 +1751,7 @@ public function testUpdateContentWhenMandatoryFieldIsEmpty() * Test for the updateContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent() + * * @depends testUpdateContent */ public function testUpdateContentThrowsContentFieldValidationException() @@ -1709,6 +1778,7 @@ public function testUpdateContentThrowsContentFieldValidationException() * Test for the updateContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent() + * * @depends testUpdateContent */ public function testUpdateContentValidatorIgnoresRequiredFieldsOfNotUpdatedLanguages() @@ -1750,6 +1820,7 @@ public function testUpdateContentValidatorIgnoresRequiredFieldsOfNotUpdatedLangu * Test for the updateContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent() + * * @depends testUpdateContent */ public function testUpdateContentWithNotUpdatingMandatoryField() @@ -1775,7 +1846,7 @@ public function testUpdateContentWithNotUpdatingMandatoryField() return; } } - $this->fail( + self::fail( 'Field with identifier "name" in language "eng-US" could not be found or has empty value.' ); } @@ -1784,6 +1855,7 @@ public function testUpdateContentWithNotUpdatingMandatoryField() * Test for the createContentDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContentDraft($contentInfo, $versionInfo) + * * @depends testUpdateContent */ public function testCreateContentDraftWithSecondParameter() @@ -1796,7 +1868,7 @@ public function testCreateContentDraftWithSecondParameter() $contentVersion2->getVersionInfo() ); - $this->assertEquals(3, $draftedContentReloaded->getVersionInfo()->versionNo); + self::assertEquals(3, $draftedContentReloaded->getVersionInfo()->versionNo); } /** @@ -1815,7 +1887,7 @@ public function testCreateContentDraftWithThirdParameter() $user ); - $this->assertInstanceOf( + self::assertInstanceOf( Content::class, $draftContent ); @@ -1825,6 +1897,7 @@ public function testCreateContentDraftWithThirdParameter() * Test for the publishVersion() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::publishVersion() + * * @depends testPublishVersion * @depends testUpdateContent */ @@ -1834,7 +1907,7 @@ public function testPublishVersionFromContentDraft() $versionInfo = $this->contentService->loadVersionInfo($contentVersion2->contentInfo); - $this->assertEquals( + self::assertEquals( [ 'status' => VersionInfo::STATUS_PUBLISHED, 'versionNo' => 2, @@ -1844,15 +1917,16 @@ public function testPublishVersionFromContentDraft() 'versionNo' => $versionInfo->versionNo, ] ); - $this->assertTrue($versionInfo->isPublished()); - $this->assertFalse($versionInfo->isDraft()); - $this->assertFalse($versionInfo->isArchived()); + self::assertTrue($versionInfo->isPublished()); + self::assertFalse($versionInfo->isDraft()); + self::assertFalse($versionInfo->isArchived()); } /** * Test for the publishVersion() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::publishVersion() + * * @depends testPublishVersionFromContentDraft */ public function testPublishVersionFromContentDraftArchivesOldVersion() @@ -1861,7 +1935,7 @@ public function testPublishVersionFromContentDraftArchivesOldVersion() $versionInfo = $this->contentService->loadVersionInfo($contentVersion2->contentInfo, 1); - $this->assertEquals( + self::assertEquals( [ 'status' => VersionInfo::STATUS_ARCHIVED, 'versionNo' => 1, @@ -1871,28 +1945,30 @@ public function testPublishVersionFromContentDraftArchivesOldVersion() 'versionNo' => $versionInfo->versionNo, ] ); - $this->assertTrue($versionInfo->isArchived()); - $this->assertFalse($versionInfo->isDraft()); - $this->assertFalse($versionInfo->isPublished()); + self::assertTrue($versionInfo->isArchived()); + self::assertFalse($versionInfo->isDraft()); + self::assertFalse($versionInfo->isPublished()); } /** * Test for the publishVersion() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::publishVersion() + * * @depends testPublishVersionFromContentDraft */ public function testPublishVersionFromContentDraftUpdatesContentInfoCurrentVersion() { $contentVersion2 = $this->createContentVersion2(); - $this->assertEquals(2, $contentVersion2->contentInfo->currentVersionNo); + self::assertEquals(2, $contentVersion2->contentInfo->currentVersionNo); } /** * Test for the publishVersion() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::publishVersion() + * * @depends testPublishVersionFromContentDraft */ public function testPublishVersionFromOldContentDraftArchivesNewerVersionNo() @@ -1912,7 +1988,7 @@ public function testPublishVersionFromOldContentDraftArchivesNewerVersionNo() // currentVersionNo is now 2, versionNo 3 will be archived $publishedDraft = $this->contentService->publishVersion($draftedContentVersion2->getVersionInfo()); - $this->assertEquals(2, $publishedDraft->contentInfo->currentVersionNo); + self::assertEquals(2, $publishedDraft->contentInfo->currentVersionNo); } /** @@ -1921,6 +1997,7 @@ public function testPublishVersionFromOldContentDraftArchivesNewerVersionNo() * @todo Adapt this when per content type archive limited is added on repository content type model. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::publishVersion() + * * @depends testPublishVersionFromContentDraft */ public function testPublishVersionNotCreatingUnlimitedArchives() @@ -1929,8 +2006,8 @@ public function testPublishVersionNotCreatingUnlimitedArchives() // load first to make sure list gets updated also (cache) $versionInfoList = $this->contentService->loadVersions($content->contentInfo); - $this->assertCount(1, $versionInfoList); - $this->assertEquals(1, $versionInfoList[0]->versionNo); + self::assertCount(1, $versionInfoList); + self::assertEquals(1, $versionInfoList[0]->versionNo); // Create a new draft with versionNo = 2 $draftedContentVersion = $this->contentService->createContentDraft($content->contentInfo); @@ -1958,11 +2035,11 @@ public function testPublishVersionNotCreatingUnlimitedArchives() $versionInfoList = $this->contentService->loadVersions($content->contentInfo); - $this->assertCount(6, $versionInfoList); - $this->assertEquals(2, $versionInfoList[0]->versionNo); - $this->assertEquals(7, $versionInfoList[5]->versionNo); + self::assertCount(6, $versionInfoList); + self::assertEquals(2, $versionInfoList[0]->versionNo); + self::assertEquals(7, $versionInfoList[5]->versionNo); - $this->assertEquals( + self::assertEquals( [ VersionInfo::STATUS_ARCHIVED, VersionInfo::STATUS_ARCHIVED, @@ -1986,6 +2063,7 @@ public function testPublishVersionNotCreatingUnlimitedArchives() * Test for the newContentMetadataUpdateStruct() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::newContentMetadataUpdateStruct + * * @group user */ public function testNewContentMetadataUpdateStruct() @@ -1994,14 +2072,14 @@ public function testNewContentMetadataUpdateStruct() $metadataUpdate = $this->contentService->newContentMetadataUpdateStruct(); foreach ($metadataUpdate as $propertyName => $propertyValue) { - $this->assertNull($propertyValue, "Property '{$propertyName}' initial value should be null'"); + self::assertNull($propertyValue, "Property '{$propertyName}' initial value should be null'"); } $metadataUpdate->remoteId = 'aaaabbbbccccddddeeeeffff11112222'; $metadataUpdate->mainLanguageCode = self::ENG_GB; $metadataUpdate->alwaysAvailable = false; - $this->assertInstanceOf( + self::assertInstanceOf( ContentMetadataUpdateStruct::class, $metadataUpdate ); @@ -2013,8 +2091,10 @@ public function testNewContentMetadataUpdateStruct() * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContentMetadata() + * * @depends testPublishVersion * @depends testNewContentMetadataUpdateStruct + * * @group user */ public function testUpdateContentMetadata() @@ -2036,7 +2116,7 @@ public function testUpdateContentMetadata() $metadataUpdate ); - $this->assertInstanceOf( + self::assertInstanceOf( Content::class, $content ); @@ -2050,6 +2130,7 @@ public function testUpdateContentMetadata() * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContentMetadata() + * * @depends testUpdateContentMetadata */ public function testUpdateContentMetadataSetsExpectedProperties($content) @@ -2057,7 +2138,7 @@ public function testUpdateContentMetadataSetsExpectedProperties($content) $contentInfo = $content->contentInfo; $currentUserReference = $this->getRepository()->getPermissionResolver()->getCurrentUserReference(); - $this->assertEquals( + self::assertEquals( [ 'remoteId' => 'aaaabbbbccccddddeeeeffff11112222', 'sectionId' => $this->generateId('section', 1), @@ -2089,17 +2170,19 @@ public function testUpdateContentMetadataSetsExpectedProperties($content) * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContentMetadata() + * * @depends testUpdateContentMetadata */ public function testUpdateContentMetadataNotUpdatesContentVersion($content) { - $this->assertEquals(1, $content->getVersionInfo()->versionNo); + self::assertEquals(1, $content->getVersionInfo()->versionNo); } /** * Test for the updateContentMetadata() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContentMetadata() + * * @depends testUpdateContentMetadata */ public function testUpdateContentMetadataThrowsInvalidArgumentExceptionOnDuplicateRemoteId() @@ -2226,6 +2309,7 @@ public function testUpdateContentMainTranslation(): void * Test for the deleteContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteContent() + * * @depends testPublishVersionFromContentDraft */ public function testDeleteContent() @@ -2252,6 +2336,7 @@ public function testDeleteContent() * "contentService: Unable to delete a content with an empty file attribute" * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteContent() + * * @depends testPublishVersionFromContentDraft */ public function testDeleteContentWithEmptyBinaryField() @@ -2273,7 +2358,7 @@ public function testDeleteContentWithEmptyBinaryField() public function testCountContentDraftsReturnsZeroByDefault(): void { - $this->assertSame(0, $this->contentService->countContentDrafts()); + self::assertSame(0, $this->contentService->countContentDrafts()); } public function testCountContentDrafts(): void @@ -2281,7 +2366,7 @@ public function testCountContentDrafts(): void // Create 5 drafts $this->createContentDrafts(5); - $this->assertSame(5, $this->contentService->countContentDrafts()); + self::assertSame(5, $this->contentService->countContentDrafts()); } public function testCountContentDraftsForUsers(): void @@ -2312,8 +2397,8 @@ public function testCountContentDraftsForUsers(): void $newUserDrafts = $this->contentService->countContentDrafts($newUser); $previousUserDrafts = $this->contentService->countContentDrafts(); - $this->assertSame(1, $newUserDrafts); - $this->assertSame(0, $previousUserDrafts); + self::assertSame(1, $newUserDrafts); + self::assertSame(0, $previousUserDrafts); } /** @@ -2325,13 +2410,14 @@ public function testLoadContentDraftsReturnsEmptyArrayByDefault() { $contentDrafts = $this->contentService->loadContentDrafts(); - $this->assertSame([], $contentDrafts); + self::assertSame([], $contentDrafts); } /** * Test for the loadContentDrafts() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentDrafts() + * * @depends testCreateContentDraft */ public function testLoadContentDrafts() @@ -2357,7 +2443,7 @@ public function testLoadContentDrafts() ]; sort($actual, SORT_STRING); - $this->assertEquals( + self::assertEquals( [ VersionInfo::STATUS_DRAFT, VersionInfo::STATUS_DRAFT, @@ -2396,9 +2482,9 @@ public function testLoadContentDraftsWithFirstParameter() $newCurrentUserDrafts = $this->contentService->loadContentDrafts($user); $oldCurrentUserDrafts = $this->contentService->loadContentDrafts(); - $this->assertSame([], $oldCurrentUserDrafts); + self::assertSame([], $oldCurrentUserDrafts); - $this->assertEquals( + self::assertEquals( [ VersionInfo::STATUS_DRAFT, self::MEDIA_REMOTE_ID, @@ -2408,9 +2494,9 @@ public function testLoadContentDraftsWithFirstParameter() $newCurrentUserDrafts[0]->getContentInfo()->remoteId, ] ); - $this->assertTrue($newCurrentUserDrafts[0]->isDraft()); - $this->assertFalse($newCurrentUserDrafts[0]->isArchived()); - $this->assertFalse($newCurrentUserDrafts[0]->isPublished()); + self::assertTrue($newCurrentUserDrafts[0]->isDraft()); + self::assertFalse($newCurrentUserDrafts[0]->isArchived()); + self::assertFalse($newCurrentUserDrafts[0]->isPublished()); } /** @@ -2431,12 +2517,12 @@ public function testLoadContentDraftListWithPaginationParameters() $draftsOnPage1 = $this->contentService->loadContentDraftList(null, 0, 2); $draftsOnPage2 = $this->contentService->loadContentDraftList(null, 2, 2); - $this->assertSame(5, $draftsOnPage1->totalCount); - $this->assertSame(5, $draftsOnPage2->totalCount); - $this->assertEquals($draftContentE->getVersionInfo(), $draftsOnPage1->items[0]->getVersionInfo()); - $this->assertEquals($draftContentD->getVersionInfo(), $draftsOnPage1->items[1]->getVersionInfo()); - $this->assertEquals($draftContentC->getVersionInfo(), $draftsOnPage2->items[0]->getVersionInfo()); - $this->assertEquals($draftContentB->getVersionInfo(), $draftsOnPage2->items[1]->getVersionInfo()); + self::assertSame(5, $draftsOnPage1->totalCount); + self::assertSame(5, $draftsOnPage2->totalCount); + self::assertEquals($draftContentE->getVersionInfo(), $draftsOnPage1->items[0]->getVersionInfo()); + self::assertEquals($draftContentD->getVersionInfo(), $draftsOnPage1->items[1]->getVersionInfo()); + self::assertEquals($draftContentC->getVersionInfo(), $draftsOnPage2->items[0]->getVersionInfo()); + self::assertEquals($draftContentB->getVersionInfo(), $draftsOnPage2->items[1]->getVersionInfo()); } /** @@ -2461,10 +2547,10 @@ public function testLoadContentDraftListWithForUserWithLimitation() $contentDraftB = $this->contentService->createContentDraft($content->contentInfo); $newUserDraftList = $this->contentService->loadContentDraftList($newUser, 0); - $this->assertSame(3, $newUserDraftList->totalCount); - $this->assertEquals($contentDraftB->getVersionInfo(), $newUserDraftList->items[0]->getVersionInfo()); - $this->assertEquals($contentDraftA->getVersionInfo(), $newUserDraftList->items[1]->getVersionInfo()); - $this->assertEquals( + self::assertSame(3, $newUserDraftList->totalCount); + self::assertEquals($contentDraftB->getVersionInfo(), $newUserDraftList->items[0]->getVersionInfo()); + self::assertEquals($contentDraftA->getVersionInfo(), $newUserDraftList->items[1]->getVersionInfo()); + self::assertEquals( new UnauthorizedContentDraftListItem('content', 'versionread', ['contentId' => $contentDraftUnauthorized->id]), $newUserDraftList->items[2] ); @@ -2474,8 +2560,8 @@ public function testLoadContentDraftListWithForUserWithLimitation() $oldUserDraftList = $this->contentService->loadContentDraftList(); - $this->assertSame(0, $oldUserDraftList->totalCount); - $this->assertSame([], $oldUserDraftList->items); + self::assertSame(0, $oldUserDraftList->totalCount); + self::assertSame([], $oldUserDraftList->items); } /** @@ -2488,13 +2574,14 @@ public function testLoadAllContentDrafts() // Create more drafts then default pagination limit $this->createContentDrafts(12); - $this->assertCount(12, $this->contentService->loadContentDraftList()); + self::assertCount(12, $this->contentService->loadContentDraftList()); } /** * Test for the loadVersionInfo() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfo($contentInfo, $versionNo) + * * @depends testPublishVersionFromContentDraft */ public function testLoadVersionInfoWithSecondParameter() @@ -2506,10 +2593,10 @@ public function testLoadVersionInfoWithSecondParameter() // Will return the VersionInfo of the $draftContent $versionInfo = $this->contentService->loadVersionInfoById($publishedContent->id, 2); - $this->assertEquals(2, $versionInfo->versionNo); + self::assertEquals(2, $versionInfo->versionNo); // Check that ContentInfo contained in VersionInfo has correct main Location id set - $this->assertEquals( + self::assertEquals( $publishedContent->getVersionInfo()->getContentInfo()->mainLocationId, $versionInfo->getContentInfo()->mainLocationId ); @@ -2519,6 +2606,7 @@ public function testLoadVersionInfoWithSecondParameter() * Test for the loadVersionInfo() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfo($contentInfo, $versionNo) + * * @depends testLoadVersionInfoWithSecondParameter */ public function testLoadVersionInfoThrowsNotFoundExceptionWithSecondParameter() @@ -2535,6 +2623,7 @@ public function testLoadVersionInfoThrowsNotFoundExceptionWithSecondParameter() * Test for the loadVersionInfoById() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById($contentId, $versionNo) + * * @depends testLoadVersionInfoWithSecondParameter */ public function testLoadVersionInfoByIdWithSecondParameter() @@ -2546,10 +2635,10 @@ public function testLoadVersionInfoByIdWithSecondParameter() // Will return the VersionInfo of the $draftContent $versionInfo = $this->contentService->loadVersionInfoById($publishedContent->id, 2); - $this->assertEquals(2, $versionInfo->versionNo); + self::assertEquals(2, $versionInfo->versionNo); // Check that ContentInfo contained in VersionInfo has correct main Location id set - $this->assertEquals( + self::assertEquals( $publishedContent->getVersionInfo()->getContentInfo()->mainLocationId, $versionInfo->getContentInfo()->mainLocationId ); @@ -2564,6 +2653,7 @@ public function testLoadVersionInfoByIdWithSecondParameter() * Test for the returned value of the loadVersionInfoById() method. * * @depends testLoadVersionInfoByIdWithSecondParameter + * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById * * @param array $data @@ -2629,6 +2719,7 @@ public function testLoadVersionInfoByIdThrowsNotFoundExceptionWithSecondParamete * Test for the loadContentByVersionInfo() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByVersionInfo($versionInfo, $languages) + * * @depends testCreateContent * @depends testLoadContentByVersionInfo */ @@ -2698,13 +2789,14 @@ static function ($field1, $field2) { ), ]; - $this->assertEquals($expected, $actual); + self::assertEquals($expected, $actual); } /** * Test for the loadContentByContentInfo() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByContentInfo($contentInfo, $languages) + * * @depends testLoadContentByContentInfo */ public function testLoadContentByContentInfoWithLanguageParameters() @@ -2755,7 +2847,7 @@ public function testLoadContentByContentInfoWithLanguageParameters() ), ]; - $this->assertEquals($expected, $actual); + self::assertEquals($expected, $actual); // Will return a content instance with fields in "eng-GB" (versions prior to 6.0.0-beta9 returned "eng-US" also) $reloadedContent = $this->contentService->loadContentByContentInfo( @@ -2781,7 +2873,7 @@ public function testLoadContentByContentInfoWithLanguageParameters() ), ]; - $this->assertEquals($expected, $actual); + self::assertEquals($expected, $actual); // Will return a content instance with fields in main language "eng-US", as "fre-FR" does not exists $reloadedContent = $this->contentService->loadContentByContentInfo( @@ -2807,13 +2899,14 @@ public function testLoadContentByContentInfoWithLanguageParameters() ), ]; - $this->assertEquals($expected, $actual); + self::assertEquals($expected, $actual); } /** * Test for the loadContentByContentInfo() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByContentInfo($contentInfo, $languages, $versionNo) + * * @depends testLoadContentByContentInfo */ public function testLoadContentByContentInfoWithVersionNumberParameter() @@ -2829,13 +2922,13 @@ public function testLoadContentByContentInfoWithVersionNumberParameter() 2 ); - $this->assertEquals( + self::assertEquals( 2, $draftContentReloaded->getVersionInfo()->versionNo ); // Check that ContentInfo contained in reloaded draft Content has correct main Location id set - $this->assertEquals( + self::assertEquals( $publishedContent->versionInfo->contentInfo->mainLocationId, $draftContentReloaded->versionInfo->contentInfo->mainLocationId ); @@ -2845,6 +2938,7 @@ public function testLoadContentByContentInfoWithVersionNumberParameter() * Test for the loadContentByContentInfo() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByContentInfo($contentInfo, $languages, $versionNo) + * * @depends testLoadContentByContentInfoWithVersionNumberParameter */ public function testLoadContentByContentInfoThrowsNotFoundExceptionWithVersionNumberParameter() @@ -2861,6 +2955,7 @@ public function testLoadContentByContentInfoThrowsNotFoundExceptionWithVersionNu * Test for the loadContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContent($contentId, $languages) + * * @depends testPublishVersionFromContentDraft */ public function testLoadContentWithPrioritizedLanguages() @@ -2893,6 +2988,7 @@ public function testLoadContentWithPrioritizedLanguagesThrowsNotFoundException(C * Test for the loadContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContent + * * @depends testLoadContentWithPrioritizedLanguages */ public function testLoadContentPassTroughPrioritizedLanguagesToContentType(Content $content): void @@ -2904,13 +3000,14 @@ public function testLoadContentPassTroughPrioritizedLanguagesToContentType(Conte [self::ENG_GB] ); - $this->assertEquals($contentType, $content->getContentType()); + self::assertEquals($contentType, $content->getContentType()); } /** * Test for the loadContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContent($contentId, $languages, $versionNo) + * * @depends testPublishVersionFromContentDraft */ public function testLoadContentWithThirdParameter() @@ -2922,10 +3019,10 @@ public function testLoadContentWithThirdParameter() // This content instance is identical to $draftContent $draftContentReloaded = $this->contentService->loadContent($publishedContent->id, null, 2); - $this->assertEquals(2, $draftContentReloaded->getVersionInfo()->versionNo); + self::assertEquals(2, $draftContentReloaded->getVersionInfo()->versionNo); // Check that ContentInfo contained in reloaded draft Content has correct main Location id set - $this->assertEquals( + self::assertEquals( $publishedContent->versionInfo->contentInfo->mainLocationId, $draftContentReloaded->versionInfo->contentInfo->mainLocationId ); @@ -2935,6 +3032,7 @@ public function testLoadContentWithThirdParameter() * Test for the loadContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContent($contentId, $languages, $versionNo) + * * @depends testLoadContentWithThirdParameter */ public function testLoadContentThrowsNotFoundExceptionWithThirdParameter() @@ -2951,6 +3049,7 @@ public function testLoadContentThrowsNotFoundExceptionWithThirdParameter() * Test for the loadContentByRemoteId() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByRemoteId($remoteId, $languages) + * * @depends testPublishVersionFromContentDraft */ public function testLoadContentByRemoteIdWithSecondParameter() @@ -2974,6 +3073,7 @@ public function testLoadContentByRemoteIdWithSecondParameter() * Test for the loadContentByRemoteId() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByRemoteId($remoteId, $languages, $versionNo) + * * @depends testPublishVersionFromContentDraft */ public function testLoadContentByRemoteIdWithThirdParameter() @@ -2989,10 +3089,10 @@ public function testLoadContentByRemoteIdWithThirdParameter() 2 ); - $this->assertEquals(2, $draftContentReloaded->getVersionInfo()->versionNo); + self::assertEquals(2, $draftContentReloaded->getVersionInfo()->versionNo); // Check that ContentInfo contained in reloaded draft Content has correct main Location id set - $this->assertEquals( + self::assertEquals( $publishedContent->versionInfo->contentInfo->mainLocationId, $draftContentReloaded->versionInfo->contentInfo->mainLocationId ); @@ -3002,6 +3102,7 @@ public function testLoadContentByRemoteIdWithThirdParameter() * Test for the loadContentByRemoteId() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByRemoteId($remoteId, $languages, $versionNo) + * * @depends testLoadContentByRemoteIdWithThirdParameter */ public function testLoadContentByRemoteIdThrowsNotFoundExceptionWithThirdParameter() @@ -3059,6 +3160,7 @@ public function getPrioritizedLanguageList() * Test for the deleteVersion() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteVersion() + * * @depends testLoadContent * @depends testCreateContent * @depends testPublishVersion @@ -3078,8 +3180,8 @@ public function testDeleteVersion() $versions = $this->contentService->loadVersions($content->getVersionInfo()->getContentInfo()); - $this->assertCount(1, $versions); - $this->assertEquals( + self::assertCount(1, $versions); + self::assertEquals( $content->getVersionInfo()->id, $versions[0]->id ); @@ -3089,6 +3191,7 @@ public function testDeleteVersion() * Test for the deleteVersion() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteVersion() + * * @depends testLoadContent * @depends testCreateContent * @depends testPublishVersion @@ -3107,6 +3210,7 @@ public function testDeleteVersionThrowsBadStateExceptionOnPublishedVersion() * Test for the deleteVersion() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteVersion() + * * @depends testLoadContent * @depends testCreateContent * @depends testPublishVersion @@ -3128,6 +3232,7 @@ public function testDeleteVersionWorksIfOnlyVersionIsDraft() * Test for the loadVersions() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersions() + * * @depends testPublishVersion * * @return \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo[] @@ -3144,7 +3249,7 @@ public function testLoadVersions() $this->contentService->loadVersionInfo($contentVersion2->contentInfo, 2), ]; - $this->assertEquals($expectedVersionsOrder, $versions); + self::assertEquals($expectedVersionsOrder, $versions); return $versions; } @@ -3153,13 +3258,14 @@ public function testLoadVersions() * Test for the loadVersions() method. * * @depends testLoadVersions + * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersions * * @param \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo[] $versions */ public function testLoadVersionsSetsExpectedVersionInfo(array $versions) { - $this->assertCount(2, $versions); + self::assertCount(2, $versions); $expectedVersions = [ [ @@ -3180,32 +3286,34 @@ public function testLoadVersionsSetsExpectedVersionInfo(array $versions) $this->assertPropertiesCorrect($expectedVersions[0], $versions[0]); $this->assertPropertiesCorrect($expectedVersions[1], $versions[1]); - $this->assertEqualsWithDelta( + self::assertEqualsWithDelta( $versions[0]->creationDate->getTimestamp(), $versions[1]->creationDate->getTimestamp(), 2, 'Creation time did not match within delta of 2 seconds', ); - $this->assertEqualsWithDelta( + self::assertEqualsWithDelta( $versions[0]->modificationDate->getTimestamp(), $versions[1]->modificationDate->getTimestamp(), 2, 'Creation time did not match within delta of 2 seconds', ); - $this->assertTrue($versions[0]->isArchived()); - $this->assertFalse($versions[0]->isDraft()); - $this->assertFalse($versions[0]->isPublished()); + self::assertTrue($versions[0]->isArchived()); + self::assertFalse($versions[0]->isDraft()); + self::assertFalse($versions[0]->isPublished()); - $this->assertTrue($versions[1]->isPublished()); - $this->assertFalse($versions[1]->isDraft()); - $this->assertFalse($versions[1]->isArchived()); + self::assertTrue($versions[1]->isPublished()); + self::assertFalse($versions[1]->isDraft()); + self::assertFalse($versions[1]->isArchived()); } /** * Test for the copyContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::copyContent() + * * @depends testPublishVersionFromContentDraft + * * @group field-type */ public function testCopyContent() @@ -3229,33 +3337,33 @@ public function testCopyContent() $targetLocationCreate ); - $this->assertInstanceOf( + self::assertInstanceOf( Content::class, $contentCopied ); - $this->assertNotEquals( + self::assertNotEquals( $contentVersion2->contentInfo->remoteId, $contentCopied->contentInfo->remoteId ); - $this->assertNotEquals( + self::assertNotEquals( $contentVersion2->id, $contentCopied->id ); - $this->assertCount( + self::assertCount( 2, $this->contentService->loadVersions($contentCopied->contentInfo) ); - $this->assertEquals(2, $contentCopied->getVersionInfo()->versionNo); + self::assertEquals(2, $contentCopied->getVersionInfo()->versionNo); $this->assertAllFieldsEquals($contentCopied->getFields()); $this->assertDefaultContentStates($contentCopied->contentInfo); - $this->assertNotNull( + self::assertNotNull( $contentCopied->contentInfo->mainLocationId, 'Expected main location to be set given we provided a LocationCreateStruct' ); @@ -3266,7 +3374,9 @@ public function testCopyContent() * See settings/test/integration_legacy.yml for service override. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::copyContent() + * * @depends testPublishVersionFromContentDraft + * * @group field-type */ public function testCopyContentWithNewOwner() @@ -3302,20 +3412,20 @@ public function testCopyContentWithNewOwner() $targetLocationCreate ); - $this->assertEquals( + self::assertEquals( $owner->id, $contentVersion2->contentInfo->ownerId ); $newOwnerId = $userService->loadUserByLogin('admin')->getUserId(); - $this->assertEquals( + self::assertEquals( $newOwnerId, $contentCopied->contentInfo->ownerId ); $versions = $this->contentService->loadVersions($contentCopied->contentInfo); - $this->assertCount(2, $versions); + self::assertCount(2, $versions); foreach ($versions as $version) { - $this->assertEquals( + self::assertEquals( $newOwnerId, $version->creatorId ); @@ -3326,6 +3436,7 @@ public function testCopyContentWithNewOwner() * Test for the copyContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::copyContent($contentInfo, $destinationLocationCreateStruct, $versionInfo) + * * @depends testCopyContent */ public function testCopyContentWithGivenVersion() @@ -3350,29 +3461,29 @@ public function testCopyContentWithGivenVersion() $this->contentService->loadVersionInfo($contentVersion2->contentInfo, 1) ); - $this->assertInstanceOf( + self::assertInstanceOf( Content::class, $contentCopied ); - $this->assertNotEquals( + self::assertNotEquals( $contentVersion2->contentInfo->remoteId, $contentCopied->contentInfo->remoteId ); - $this->assertNotEquals( + self::assertNotEquals( $contentVersion2->id, $contentCopied->id ); - $this->assertCount( + self::assertCount( 1, $this->contentService->loadVersions($contentCopied->contentInfo) ); - $this->assertEquals(1, $contentCopied->getVersionInfo()->versionNo); + self::assertEquals(1, $contentCopied->getVersionInfo()->versionNo); - $this->assertNotNull( + self::assertNotNull( $contentCopied->contentInfo->mainLocationId, 'Expected main location to be set given we provided a LocationCreateStruct' ); @@ -3412,11 +3523,12 @@ public function testAddRelation(): array * @param \Ibexa\Contracts\Core\Repository\Values\Content\Relation[] $relations * * @covers \Ibexa\Contracts\Core\Repository\ContentService::addRelation() + * * @depends testAddRelation */ public function testAddRelationAddsRelationToContent($relations) { - $this->assertCount( + self::assertCount( 1, $relations ); @@ -3427,7 +3539,7 @@ public function testAddRelationAddsRelationToContent($relations) */ protected function assertExpectedRelations($relations) { - $this->assertEquals( + self::assertEquals( [ 'type' => Relation::COMMON, 'sourceFieldDefinitionIdentifier' => null, @@ -3449,6 +3561,7 @@ protected function assertExpectedRelations($relations) * @param \Ibexa\Contracts\Core\Repository\Values\Content\Relation[] $relations * * @covers \Ibexa\Contracts\Core\Repository\ContentService::addRelation() + * * @depends testAddRelation */ public function testAddRelationSetsExpectedRelations($relations) @@ -3462,6 +3575,7 @@ public function testAddRelationSetsExpectedRelations($relations) * @return \Ibexa\Contracts\Core\Repository\Values\Content\Relation[] * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContentDraft + * * @depends testAddRelationSetsExpectedRelations */ public function testCreateContentDraftWithRelations() @@ -3487,11 +3601,12 @@ public function testCreateContentDraftWithRelations() * @param \Ibexa\Contracts\Core\Repository\Values\Content\Relation[] $relations * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Relation[] + * * @depends testCreateContentDraftWithRelations */ public function testCreateContentDraftWithRelationsCreatesRelations(array $relations): array { - $this->assertCount( + self::assertCount( 1, $relations ); @@ -3515,6 +3630,7 @@ public function testCreateContentDraftWithRelationsCreatesExpectedRelations($rel * Test for the addRelation() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::addRelation() + * * @depends testAddRelation */ public function testAddRelationThrowsBadStateException() @@ -3536,6 +3652,7 @@ public function testAddRelationThrowsBadStateException() * Test for the loadRelations() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadRelations() + * * @depends testAddRelation */ public function testLoadRelations() @@ -3554,7 +3671,7 @@ static function ($rel1, $rel2) { } ); - $this->assertEquals( + self::assertEquals( [ [ 'sourceContentInfo' => 'abcdef0123456789abcdef0123456789', @@ -3582,6 +3699,7 @@ static function ($rel1, $rel2) { * Test for the loadRelations() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadRelations() + * * @depends testAddRelation * @depends testLoadRelations */ @@ -3616,8 +3734,8 @@ public function testLoadRelationsSkipsArchivedContent() // Load all relations $relations = $this->contentService->loadRelations($draft->getVersionInfo()); - $this->assertCount(1, $relations); - $this->assertEquals( + self::assertCount(1, $relations); + self::assertEquals( [ [ 'sourceContentInfo' => 'abcdef0123456789abcdef0123456789', @@ -3637,6 +3755,7 @@ public function testLoadRelationsSkipsArchivedContent() * Test for the loadRelations() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadRelations() + * * @depends testAddRelation * @depends testLoadRelations */ @@ -3666,8 +3785,8 @@ public function testLoadRelationsSkipsDraftContent() $relations = $this->contentService->loadRelations($mediaDraft->getVersionInfo()); - $this->assertCount(1, $relations); - $this->assertEquals( + self::assertCount(1, $relations); + self::assertEquals( [ [ 'sourceContentInfo' => self::MEDIA_REMOTE_ID, @@ -3779,7 +3898,7 @@ public function testCountReverseRelations(): void $contentInfo = $contentWithReverseRelations->content->getVersionInfo()->getContentInfo(); - $this->assertEquals(2, $this->contentService->countReverseRelations($contentInfo)); + self::assertEquals(2, $this->contentService->countReverseRelations($contentInfo)); } /** @@ -3791,7 +3910,7 @@ public function testCountReverseRelationsReturnsZeroByDefault(): void { $draft = $this->createContentDraftVersion1(); - $this->assertSame(0, $this->contentService->countReverseRelations($draft->getVersionInfo()->getContentInfo())); + self::assertSame(0, $this->contentService->countReverseRelations($draft->getVersionInfo()->getContentInfo())); } /** @@ -3811,13 +3930,14 @@ public function testCountReverseRelationsForUnauthorizedUser(): void $contentInfo = $contentWithReverseRelations->content->contentInfo; - $this->assertSame(0, $this->contentService->countReverseRelations($contentInfo)); + self::assertSame(0, $this->contentService->countReverseRelations($contentInfo)); } /** * Test for the loadReverseRelations() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadReverseRelations() + * * @depends testAddRelation */ public function testLoadReverseRelations() @@ -3852,14 +3972,14 @@ public function testLoadReverseRelations() $relations = $this->contentService->loadRelations($versionInfo); $reverseRelations = $this->contentService->loadReverseRelations($contentInfo); - $this->assertEquals($contentInfo->id, $relation1->getDestinationContentInfo()->id); - $this->assertEquals($mediaDraft->id, $relation1->getSourceContentInfo()->id); + self::assertEquals($contentInfo->id, $relation1->getDestinationContentInfo()->id); + self::assertEquals($mediaDraft->id, $relation1->getSourceContentInfo()->id); - $this->assertEquals($contentInfo->id, $relation2->getDestinationContentInfo()->id); - $this->assertEquals($demoDesignDraft->id, $relation2->getSourceContentInfo()->id); + self::assertEquals($contentInfo->id, $relation2->getDestinationContentInfo()->id); + self::assertEquals($demoDesignDraft->id, $relation2->getSourceContentInfo()->id); - $this->assertCount(0, $relations); - $this->assertCount(2, $reverseRelations); + self::assertCount(0, $relations); + self::assertCount(2, $reverseRelations); usort( $reverseRelations, @@ -3871,7 +3991,7 @@ static function ($rel1, $rel2) { } ); - $this->assertEquals( + self::assertEquals( [ [ 'sourceContentInfo' => self::MEDIA_REMOTE_ID, @@ -3899,6 +4019,7 @@ static function ($rel1, $rel2) { * Test for the loadReverseRelations() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadReverseRelations() + * * @depends testAddRelation * @depends testLoadReverseRelations */ @@ -3943,16 +4064,16 @@ public function testLoadReverseRelationsSkipsArchivedContent() $relations = $this->contentService->loadRelations($versionInfo); $reverseRelations = $this->contentService->loadReverseRelations($contentInfo); - $this->assertEquals($contentInfo->id, $relation1->getDestinationContentInfo()->id); - $this->assertEquals($mediaDraft->id, $relation1->getSourceContentInfo()->id); + self::assertEquals($contentInfo->id, $relation1->getDestinationContentInfo()->id); + self::assertEquals($mediaDraft->id, $relation1->getSourceContentInfo()->id); - $this->assertEquals($contentInfo->id, $relation2->getDestinationContentInfo()->id); - $this->assertEquals($demoDesignDraft->id, $relation2->getSourceContentInfo()->id); + self::assertEquals($contentInfo->id, $relation2->getDestinationContentInfo()->id); + self::assertEquals($demoDesignDraft->id, $relation2->getSourceContentInfo()->id); - $this->assertCount(0, $relations); - $this->assertCount(1, $reverseRelations); + self::assertCount(0, $relations); + self::assertCount(1, $reverseRelations); - $this->assertEquals( + self::assertEquals( [ [ 'sourceContentInfo' => self::MEDIA_REMOTE_ID, @@ -3972,6 +4093,7 @@ public function testLoadReverseRelationsSkipsArchivedContent() * Test for the loadReverseRelations() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadReverseRelations() + * * @depends testAddRelation * @depends testLoadReverseRelations */ @@ -4006,16 +4128,16 @@ public function testLoadReverseRelationsSkipsDraftContent() $relations = $this->contentService->loadRelations($media->versionInfo); $reverseRelations = $this->contentService->loadReverseRelations($media->contentInfo); - $this->assertEquals($media->contentInfo->id, $relation1->getDestinationContentInfo()->id); - $this->assertEquals($newDraftVersionInfo->contentInfo->id, $relation1->getSourceContentInfo()->id); + self::assertEquals($media->contentInfo->id, $relation1->getDestinationContentInfo()->id); + self::assertEquals($newDraftVersionInfo->contentInfo->id, $relation1->getSourceContentInfo()->id); - $this->assertEquals($media->contentInfo->id, $relation2->getDestinationContentInfo()->id); - $this->assertEquals($demoDesignDraft->id, $relation2->getSourceContentInfo()->id); + self::assertEquals($media->contentInfo->id, $relation2->getDestinationContentInfo()->id); + self::assertEquals($demoDesignDraft->id, $relation2->getSourceContentInfo()->id); - $this->assertCount(0, $relations); - $this->assertCount(1, $reverseRelations); + self::assertCount(0, $relations); + self::assertCount(1, $reverseRelations); - $this->assertEquals( + self::assertEquals( [ [ 'sourceContentInfo' => self::DEMO_DESIGN_REMOTE_ID, @@ -4056,16 +4178,16 @@ public function testLoadReverseRelationList(): void $reverseRelationList = $this->contentService->loadReverseRelationList($contentInfo); - $this->assertSame(3, $reverseRelationList->totalCount); - $this->assertEquals( + self::assertSame(3, $reverseRelationList->totalCount); + self::assertEquals( $contentWithReverseRelations->reverseRelations[2]->contentInfo, $reverseRelationList->items[0]->getRelation()->sourceContentInfo ); - $this->assertEquals( + self::assertEquals( $contentWithReverseRelations->reverseRelations[1]->contentInfo, $reverseRelationList->items[1]->getRelation()->sourceContentInfo ); - $this->assertEquals( + self::assertEquals( $contentWithReverseRelations->reverseRelations[0]->contentInfo, $reverseRelationList->items[2]->getRelation()->sourceContentInfo ); @@ -4096,17 +4218,17 @@ public function testLoadReverseRelationListWithPagination(): void $reverseRelationPage1 = $this->contentService->loadReverseRelationList($contentInfo, 0, 2); $reverseRelationPage2 = $this->contentService->loadReverseRelationList($contentInfo, 2, 2); - $this->assertSame(3, $reverseRelationPage1->totalCount); - $this->assertSame(3, $reverseRelationPage2->totalCount); - $this->assertEquals( + self::assertSame(3, $reverseRelationPage1->totalCount); + self::assertSame(3, $reverseRelationPage2->totalCount); + self::assertEquals( $contentWithReverseRelations->reverseRelations[2]->contentInfo, $reverseRelationPage1->items[0]->getRelation()->sourceContentInfo ); - $this->assertEquals( + self::assertEquals( $contentWithReverseRelations->reverseRelations[1]->contentInfo, $reverseRelationPage1->items[1]->getRelation()->sourceContentInfo ); - $this->assertEquals( + self::assertEquals( $contentWithReverseRelations->reverseRelations[0]->contentInfo, $reverseRelationPage2->items[0]->getRelation()->sourceContentInfo ); @@ -4143,12 +4265,12 @@ public function testLoadReverseRelationListSkipsArchivedContent(): void $contentInfo = $contentWithReverseRelations->content->contentInfo; $reverseRelationList = $this->contentService->loadReverseRelationList($contentInfo); - $this->assertSame(2, $reverseRelationList->totalCount); - $this->assertEquals( + self::assertSame(2, $reverseRelationList->totalCount); + self::assertEquals( $contentWithReverseRelations->reverseRelations[1]->contentInfo, $reverseRelationList->items[0]->getRelation()->sourceContentInfo ); - $this->assertEquals( + self::assertEquals( $contentWithReverseRelations->reverseRelations[0]->contentInfo, $reverseRelationList->items[1]->getRelation()->sourceContentInfo ); @@ -4178,8 +4300,8 @@ public function testLoadReverseRelationListSkipsDraftContent() $reverseRelationList = $this->contentService->loadReverseRelationList($contentInfo); - $this->assertSame(1, $reverseRelationList->totalCount); - $this->assertEquals( + self::assertSame(1, $reverseRelationList->totalCount); + self::assertEquals( $contentWithReverseRelations->reverseRelations[0]->contentInfo, $reverseRelationList->items[0]->getRelation()->sourceContentInfo ); @@ -4189,6 +4311,7 @@ public function testLoadReverseRelationListSkipsDraftContent() * Test for the deleteRelation() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteRelation() + * * @depends testLoadRelations */ public function testDeleteRelation() @@ -4208,13 +4331,14 @@ public function testDeleteRelation() // The relations array now contains only one element $relations = $this->contentService->loadRelations($draft->getVersionInfo()); - $this->assertCount(1, $relations); + self::assertCount(1, $relations); } /** * Test for the deleteRelation() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteRelation() + * * @depends testDeleteRelation */ public function testDeleteRelationThrowsBadStateException() @@ -4248,6 +4372,7 @@ public function testDeleteRelationThrowsBadStateException() * Test for the deleteRelation() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteRelation() + * * @depends testDeleteRelation */ public function testDeleteRelationThrowsInvalidArgumentException() @@ -4269,6 +4394,7 @@ public function testDeleteRelationThrowsInvalidArgumentException() * Test for the createContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends testCreateContent * @depends testLoadContent */ @@ -4310,13 +4436,14 @@ public function testCreateContentInTransactionWithRollback() return; } - $this->fail('Content object still exists after rollback.'); + self::fail('Content object still exists after rollback.'); } /** * Test for the createContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends testCreateContent * @depends testLoadContent */ @@ -4353,13 +4480,14 @@ public function testCreateContentInTransactionWithCommit() // Load the new content object $content = $this->contentService->loadContent($contentId); - $this->assertEquals($contentId, $content->id); + self::assertEquals($contentId, $content->id); } /** * Test for the createContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent($contentCreateStruct, $locationCreateStructs) + * * @depends testCreateContentWithLocationCreateParameterDoesNotCreateLocationImmediately * @depends testLoadContentThrowsNotFoundException */ @@ -4390,13 +4518,14 @@ public function testCreateContentWithLocationCreateParameterInTransactionWithRol return; } - $this->fail('Can still load content object after rollback.'); + self::fail('Can still load content object after rollback.'); } /** * Test for the createContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent($contentCreateStruct, $locationCreateStructs) + * * @depends testCreateContentWithLocationCreateParameterDoesNotCreateLocationImmediately * @depends testLoadContentThrowsNotFoundException */ @@ -4423,13 +4552,14 @@ public function testCreateContentWithLocationCreateParameterInTransactionWithCom // Load the new content object $content = $this->contentService->loadContent($contentId); - $this->assertEquals($contentId, $content->id); + self::assertEquals($contentId, $content->id); } /** * Test for the createContentDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContentDraft() + * * @depends testCreateContentDraft * @depends testLoadContent */ @@ -4467,13 +4597,14 @@ public function testCreateContentDraftInTransactionWithRollback() return; } - $this->fail('Can still load content draft after rollback'); + self::fail('Can still load content draft after rollback'); } /** * Test for the createContentDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContentDraft() + * * @depends testCreateContentDraft * @depends testLoadContent */ @@ -4506,7 +4637,7 @@ public function testCreateContentDraftInTransactionWithCommit() $content = $this->contentService->loadContent($contentId, null, $versionNo); - $this->assertEquals( + self::assertEquals( $versionNo, $content->getVersionInfo()->versionNo ); @@ -4516,6 +4647,7 @@ public function testCreateContentDraftInTransactionWithCommit() * Test for the publishVersion() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::publishVersion() + * * @depends testPublishVersion * @depends testLoadContent */ @@ -4555,13 +4687,14 @@ public function testPublishVersionInTransactionWithRollback() return; } - $this->fail('Can still load content draft after rollback'); + self::fail('Can still load content draft after rollback'); } /** * Test for the publishVersion() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::publishVersion() + * * @depends testPublishVersion * @depends testLoadVersionInfo */ @@ -4595,13 +4728,14 @@ public function testPublishVersionInTransactionWithCommit() // Load current version info $versionInfo = $this->contentService->loadVersionInfo($content->contentInfo); - $this->assertEquals($versionNo, $versionInfo->versionNo); + self::assertEquals($versionNo, $versionInfo->versionNo); } /** * Test for the updateContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent() + * * @depends testUpdateContent * @depends testLoadContent * @depends testLoadContentInfo @@ -4645,13 +4779,14 @@ public function testUpdateContentInTransactionWithRollback() // Name will still be "Administrator users" $name = $this->contentService->loadContent($contentId)->getFieldValue('name'); - $this->assertEquals('Administrator users', $name); + self::assertEquals('Administrator users', $name); } /** * Test for the updateContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent() + * * @depends testUpdateContent * @depends testLoadContent * @depends testLoadContentInfo @@ -4695,13 +4830,14 @@ public function testUpdateContentInTransactionWithCommit() // Name is now "Administrators" $name = $this->contentService->loadContent($contentId)->getFieldValue('name', self::ENG_US); - $this->assertEquals(self::ADMINISTRATORS_USER_GROUP_NAME, $name); + self::assertEquals(self::ADMINISTRATORS_USER_GROUP_NAME, $name); } /** * Test for the updateContentMetadata() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContentMetadata() + * * @depends testUpdateContentMetadata * @depends testLoadContentInfo */ @@ -4742,13 +4878,14 @@ public function testUpdateContentMetadataInTransactionWithRollback() // Load current remoteId $remoteIdReloaded = $this->contentService->loadContentInfo($contentId)->remoteId; - $this->assertEquals($remoteId, $remoteIdReloaded); + self::assertEquals($remoteId, $remoteIdReloaded); } /** * Test for the updateContentMetadata() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContentMetadata() + * * @depends testUpdateContentMetadata * @depends testLoadContentInfo */ @@ -4789,13 +4926,14 @@ public function testUpdateContentMetadataInTransactionWithCommit() // Load current remoteId $remoteIdReloaded = $this->contentService->loadContentInfo($contentId)->remoteId; - $this->assertNotEquals($remoteId, $remoteIdReloaded); + self::assertNotEquals($remoteId, $remoteIdReloaded); } /** * Test for the updateContentMetadata() method, and how cache + transactions play together. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContentMetadata() + * * @depends testUpdateContentMetadata * @depends testLoadContentInfo */ @@ -4827,7 +4965,7 @@ public function testUpdateContentMetadataCheckWithinTransaction() // Check that it's been updated $remoteIdReloaded = $contentService->loadContentInfo($contentId)->remoteId; - $this->assertNotEquals($remoteId, $remoteIdReloaded); + self::assertNotEquals($remoteId, $remoteIdReloaded); // Commit all changes. $repository->commit(); @@ -4842,6 +4980,7 @@ public function testUpdateContentMetadataCheckWithinTransaction() * Test for the deleteVersion() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteVersion() + * * @depends testCreateContent * @depends testLoadContentInfo * @depends testLoadContentDrafts @@ -4874,13 +5013,14 @@ public function testDeleteVersionInTransactionWithRollback() // This array will be empty $drafts = $this->contentService->loadContentDrafts(); - $this->assertSame([], $drafts); + self::assertSame([], $drafts); } /** * Test for the deleteVersion() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteVersion() + * * @depends testCreateContent * @depends testLoadContentInfo * @depends testLoadContentDrafts @@ -4913,13 +5053,14 @@ public function testDeleteVersionInTransactionWithCommit() // This array will contain no element $drafts = $this->contentService->loadContentDrafts(); - $this->assertSame([], $drafts); + self::assertSame([], $drafts); } /** * Test for the deleteContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteContent() + * * @depends testDeleteContent * @depends testLoadContentInfo */ @@ -4950,13 +5091,14 @@ public function testDeleteContentInTransactionWithRollback() // This call will return the original content object $contentInfo = $this->contentService->loadContentInfo($contentId); - $this->assertEquals($contentId, $contentInfo->id); + self::assertEquals($contentId, $contentInfo->id); } /** * Test for the deleteContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteContent() + * * @depends testDeleteContent * @depends testLoadContentInfo */ @@ -4991,13 +5133,14 @@ public function testDeleteContentInTransactionWithCommit() return; } - $this->fail('Can still load ContentInfo after commit.'); + self::fail('Can still load ContentInfo after commit.'); } /** * Test for the copyContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::copyContent() + * * @depends testCopyContent */ public function testCopyContentInTransactionWithRollback() @@ -5038,13 +5181,14 @@ public function testCopyContentInTransactionWithRollback() $this->locationService->loadLocation($locationId) )->locations; - $this->assertCount(1, $locations); + self::assertCount(1, $locations); } /** * Test for the copyContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::copyContent() + * * @depends testCopyContent */ public function testCopyContentInTransactionWithCommit() @@ -5085,7 +5229,7 @@ public function testCopyContentInTransactionWithCommit() $this->locationService->loadLocation($locationId) )->locations; - $this->assertCount(2, $locations); + self::assertCount(2, $locations); } public function testURLAliasesCreatedForNewContent() @@ -5250,7 +5394,7 @@ public function testUpdatingDraftDoesNotUpdateOldVersions() $loadedContent1 = $this->contentService->loadContent($contentVersion2->id, null, 1); $loadedContent2 = $this->contentService->loadContent($contentVersion2->id, null, 2); - $this->assertNotEquals( + self::assertNotEquals( $loadedContent1->getFieldValue('name', self::ENG_US), $loadedContent2->getFieldValue('name', self::ENG_US) ); @@ -5863,7 +6007,7 @@ public function testLoadVersionsAfterDeletingTwoDrafts() } } - $this->assertEquals($versions, $this->contentService->loadVersions($content->contentInfo)); + self::assertEquals($versions, $this->contentService->loadVersions($content->contentInfo)); } /** @@ -5879,7 +6023,7 @@ public function testLoadVersionsOfStatusDraft() $versions = $this->contentService->loadVersions($content->contentInfo, VersionInfo::STATUS_DRAFT); - $this->assertSame(\count($versions), 3); + self::assertSame(\count($versions), 3); } /** @@ -5897,7 +6041,7 @@ public function testLoadVersionsOfStatusArchived() $versions = $this->contentService->loadVersions($content->contentInfo, VersionInfo::STATUS_ARCHIVED); - $this->assertSame(\count($versions), 2); + self::assertSame(\count($versions), 2); } /** @@ -5911,7 +6055,7 @@ private function assertAliasesCorrect(array $expectedAliasProperties, array $act { foreach ($actualAliases as $actualAlias) { if (!isset($expectedAliasProperties[$actualAlias->path])) { - $this->fail( + self::fail( sprintf( 'Alias with path "%s" in languages "%s" not expected.', $actualAlias->path, @@ -5921,7 +6065,7 @@ private function assertAliasesCorrect(array $expectedAliasProperties, array $act } foreach ($expectedAliasProperties[$actualAlias->path] as $propertyName => $propertyValue) { - $this->assertEquals( + self::assertEquals( $propertyValue, $actualAlias->$propertyName, sprintf( @@ -5937,7 +6081,7 @@ private function assertAliasesCorrect(array $expectedAliasProperties, array $act } if (!empty($expectedAliasProperties)) { - $this->fail( + self::fail( sprintf( 'Missing expected aliases with paths "%s".', implode('", "', array_keys($expectedAliasProperties)) @@ -5956,7 +6100,7 @@ private function assertAllFieldsEquals(array $fields) $actual = $this->normalizeFields($fields); $expected = $this->normalizeFields($this->createFieldsFixture()); - $this->assertEquals($expected, $actual); + self::assertEquals($expected, $actual); } /** @@ -5978,7 +6122,7 @@ private function assertLocaleFieldsEquals(array $fields, $languageCode) $expected[] = $field; } - $this->assertEquals($expected, $actual); + self::assertEquals($expected, $actual); } /** @@ -6036,7 +6180,7 @@ private function assertDefaultContentStates(ContentInfo $contentInfo) $contentState = $objectStateService->getContentState($contentInfo, $objectStateGroup); foreach ($objectStateService->loadObjectStates($objectStateGroup, Language::ALL) as $objectState) { // Only check the first object state which is the default one. - $this->assertEquals( + self::assertEquals( $objectState, $contentState ); @@ -6161,14 +6305,14 @@ function (Location $parentLocation) { $locations = $this->locationService->loadLocations($publishedContent->contentInfo); // Sanity check - $this->assertCount(3, $locations); - $this->assertCount(0, $this->filterHiddenLocations($locations)); + self::assertCount(3, $locations); + self::assertCount(0, $this->filterHiddenLocations($locations)); $this->contentService->hideContent($publishedContent->contentInfo); $locations = $this->locationService->loadLocations($publishedContent->contentInfo); - $this->assertCount(3, $locations); - $this->assertCount(3, $this->filterHiddenLocations($locations)); + self::assertCount(3, $locations); + self::assertCount(3, $this->filterHiddenLocations($locations)); } /** @@ -6206,11 +6350,11 @@ function (Location $parentLocation) { // Sanity check $hiddenLocations = $this->filterHiddenLocations($locations); - $this->assertCount(3, $locations); - $this->assertCount(1, $hiddenLocations); + self::assertCount(3, $locations); + self::assertCount(1, $hiddenLocations); $this->contentService->hideContent($publishedContent->contentInfo); - $this->assertCount( + self::assertCount( 3, $this->filterHiddenLocations( $this->locationService->loadLocations($publishedContent->contentInfo) @@ -6221,9 +6365,9 @@ function (Location $parentLocation) { $locations = $this->locationService->loadLocations($publishedContent->contentInfo); $hiddenLocationsAfterReveal = $this->filterHiddenLocations($locations); - $this->assertCount(3, $locations); - $this->assertCount(1, $hiddenLocationsAfterReveal); - $this->assertEquals($hiddenLocations, $hiddenLocationsAfterReveal); + self::assertCount(3, $locations); + self::assertCount(1, $hiddenLocationsAfterReveal); + self::assertEquals($hiddenLocations, $hiddenLocationsAfterReveal); } /** @@ -6392,11 +6536,11 @@ public function testHideContentWithParentLocation() $childLocations = $this->locationService->loadLocations($publishedChildContent->contentInfo); - $this->assertTrue($locations[0]->hidden); - $this->assertTrue($locations[0]->invisible); + self::assertTrue($locations[0]->hidden); + self::assertTrue($locations[0]->invisible); - $this->assertFalse($childLocations[0]->hidden); - $this->assertTrue($childLocations[0]->invisible); + self::assertFalse($childLocations[0]->hidden); + self::assertTrue($childLocations[0]->invisible); } public function testChangeContentName() @@ -6417,8 +6561,8 @@ public function testChangeContentName() $updatedContent = $this->contentService->loadContent($publishedContent->id); - $this->assertEquals('Marco', $publishedContent->contentInfo->name); - $this->assertEquals('Polo', $updatedContent->contentInfo->name); + self::assertEquals('Marco', $publishedContent->contentInfo->name); + self::assertEquals('Polo', $updatedContent->contentInfo->name); } public function testCopyTranslationsFromPublishedToDraft() @@ -6445,7 +6589,7 @@ public function testCopyTranslationsFromPublishedToDraft() $deContent = $this->contentService->updateContent($deDraft->versionInfo, $contentUpdateStruct); $updatedContent = $this->contentService->loadContent($deContent->id, null, $deContent->versionInfo->versionNo); - $this->assertEquals( + self::assertEquals( [ self::ENG_US => 'Folder US', self::GER_DE => 'Folder GER', @@ -6465,7 +6609,7 @@ public function testCopyTranslationsFromPublishedToDraft() $gbContent = $this->contentService->updateContent($gbDraft->versionInfo, $contentUpdateStruct); $this->contentService->publishVersion($gbDraft->versionInfo); $updatedContent = $this->contentService->loadContent($gbContent->id, null, $gbContent->versionInfo->versionNo); - $this->assertEquals( + self::assertEquals( [ self::ENG_US => 'Folder US', self::ENG_GB => 'Folder GB', @@ -6474,7 +6618,7 @@ public function testCopyTranslationsFromPublishedToDraft() ); $dePublished = $this->contentService->publishVersion($deDraft->versionInfo); - $this->assertEquals( + self::assertEquals( [ self::ENG_US => 'Folder US', self::GER_DE => 'Folder GER', @@ -6553,7 +6697,7 @@ public function testCopyTranslationsFromInvalidPublishedContentToDraft() $publishedContent = $this->contentService->loadContent($deContent->id, null, $deContent->versionInfo->versionNo); - $this->assertEquals( + self::assertEquals( [ self::GER_DE => 'Folder GER', self::ENG_US => 'Folder US 2', @@ -6561,7 +6705,7 @@ public function testCopyTranslationsFromInvalidPublishedContentToDraft() $publishedContent->fields['name'] ); // Missing values were copied from last updated draft - $this->assertEquals( + self::assertEquals( [ self::GER_DE => 'Required field DE', self::ENG_US => 'Required field DE', @@ -6632,7 +6776,7 @@ public function testPublishVersionWithSelectedLanguages() $this->contentService->publishVersion($draft->versionInfo, ['ger-DE']); $content = $this->contentService->loadContent($draft->contentInfo->id); - $this->assertEquals( + self::assertEquals( [ self::ENG_US => 'Published US', self::GER_DE => 'Draft 1 DE', @@ -6650,7 +6794,7 @@ public function testCreateContentWithRomanianSpecialCharsInTitle() $urlAliasService = $this->getRepository()->getURLAliasService(); $urlAlias = $urlAliasService->lookup($expectedPath); - $this->assertSame($expectedPath, $urlAlias->path); + self::assertSame($expectedPath, $urlAlias->path); } /** diff --git a/tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php b/tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php index 7968a503b1..bccc5ad49e 100644 --- a/tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -12,7 +13,9 @@ * Test case for operations in the ContentTypeServiceAuthorization using in memory storage. * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService + * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUser + * * @group integration * @group authorization */ @@ -22,6 +25,7 @@ class ContentTypeServiceAuthorizationTest extends BaseContentTypeServiceTest * Test for the createContentTypeGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::createContentTypeGroup() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testCreateContentTypeGroup */ public function testCreateContentTypeGroupThrowsUnauthorizedException() @@ -63,6 +67,7 @@ public function testCreateContentTypeGroupThrowsUnauthorizedException() * Test for the updateContentTypeGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::updateContentTypeGroup() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testUpdateContentTypeGroup */ public function testUpdateContentTypeGroupThrowsUnauthorizedException() @@ -113,6 +118,7 @@ public function testUpdateContentTypeGroupThrowsUnauthorizedException() * Test for the deleteContentTypeGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::deleteContentTypeGroup() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testDeleteContentTypeGroup */ public function testDeleteContentTypeGroupThrowsUnauthorizedException() @@ -150,6 +156,7 @@ public function testDeleteContentTypeGroupThrowsUnauthorizedException() * Test for the createContentType() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::createContentType() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testCreateContentType */ public function testCreateContentTypeThrowsUnauthorizedException() @@ -207,6 +214,7 @@ public function testCreateContentTypeThrowsUnauthorizedException() * Test for the updateContentTypeDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::updateContentTypeDraft() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testUpdateContentTypeDraft */ public function testUpdateContentTypeDraftThrowsUnauthorizedException() @@ -259,6 +267,7 @@ public function testUpdateContentTypeDraftThrowsUnauthorizedException() * Test for the addFieldDefinition() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::addFieldDefinition() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testAddFieldDefinition */ public function testAddFieldDefinitionThrowsUnauthorizedException() @@ -315,6 +324,7 @@ public function testAddFieldDefinitionThrowsUnauthorizedException() * Test for the removeFieldDefinition() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::removeFieldDefinition() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testRemoveFieldDefinition */ public function testRemoveFieldDefinitionThrowsUnauthorizedException() @@ -348,6 +358,7 @@ public function testRemoveFieldDefinitionThrowsUnauthorizedException() * Test for the updateFieldDefinition() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::updateFieldDefinition() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testUpdateFieldDefinition */ public function testUpdateFieldDefinitionThrowsUnauthorizedException() @@ -406,6 +417,7 @@ public function testUpdateFieldDefinitionThrowsUnauthorizedException() * Test for the publishContentTypeDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::publishContentTypeDraft() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testPublishContentTypeDraft */ public function testPublishContentTypeDraftThrowsUnauthorizedException() @@ -437,6 +449,7 @@ public function testPublishContentTypeDraftThrowsUnauthorizedException() * Test for the createContentTypeDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::createContentTypeDraft() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testCreateContentTypeDraft */ public function testCreateContentTypeDraftThrowsUnauthorizedException() @@ -469,6 +482,7 @@ public function testCreateContentTypeDraftThrowsUnauthorizedException() * Test for the deleteContentType() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::deleteContentType() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testDeleteContentType */ public function testDeleteContentTypeThrowsUnauthorizedException() @@ -501,6 +515,7 @@ public function testDeleteContentTypeThrowsUnauthorizedException() * Test for the copyContentType() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::copyContentType() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testCopyContentType */ public function testCopyContentTypeThrowsUnauthorizedException() @@ -533,6 +548,7 @@ public function testCopyContentTypeThrowsUnauthorizedException() * Test for the assignContentTypeGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::assignContentTypeGroup() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testAssignContentTypeGroup */ public function testAssignContentTypeGroupThrowsUnauthorizedException() @@ -566,6 +582,7 @@ public function testAssignContentTypeGroupThrowsUnauthorizedException() * Test for the unassignContentTypeGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::unassignContentTypeGroup() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testUnassignContentTypeGroup */ public function testUnassignContentTypeGroupThrowsUnauthorizedException() diff --git a/tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php b/tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php index a2077819fb..5d89c6f9f3 100644 --- a/tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; @@ -142,7 +143,7 @@ public function getFieldName() */ public function assertFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( AuthorValue::class, $field->value ); @@ -223,7 +224,7 @@ public function getValidUpdateFieldData() */ public function assertUpdatedFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( AuthorValue::class, $field->value ); @@ -262,7 +263,7 @@ public function provideInvalidUpdateFieldData() */ public function assertCopiedFieldDataLoadedCorrectly(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( AuthorValue::class, $field->value ); diff --git a/tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php b/tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php index 8e3af2ead9..0323e176c9 100644 --- a/tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository; @@ -282,7 +283,7 @@ public function testCreateContentType() $this->getValidFieldConfiguration() ); - $this->assertNotNull($contentType->id); + self::assertNotNull($contentType->id); return $contentType; } @@ -383,22 +384,24 @@ protected function getOverride($key, array $overrideValues, $default) /** * @covers \Ibexa\Core\FieldType\FieldType::isEmptyValue + * * @dataProvider providerForTestIsEmptyValue */ public function testIsEmptyValue($value) { - $this->assertTrue($this->getRepository()->getFieldTypeService()->getFieldType($this->getTypeName())->isEmptyValue($value)); + self::assertTrue($this->getRepository()->getFieldTypeService()->getFieldType($this->getTypeName())->isEmptyValue($value)); } abstract public function providerForTestIsEmptyValue(); /** * @covers \Ibexa\Core\FieldType\FieldType::isEmptyValue + * * @dataProvider providerForTestIsNotEmptyValue */ public function testIsNotEmptyValue($value) { - $this->assertFalse($this->getRepository()->getFieldTypeService()->getFieldType($this->getTypeName())->isEmptyValue($value)); + self::assertFalse($this->getRepository()->getFieldTypeService()->getFieldType($this->getTypeName())->isEmptyValue($value)); } abstract public function providerForTestIsNotEmptyValue(); @@ -408,7 +411,7 @@ abstract public function providerForTestIsNotEmptyValue(); */ public function testContentTypeField($contentType) { - $this->assertSame( + self::assertSame( $this->getTypeName(), $contentType->fieldDefinitions[1]->fieldTypeIdentifier ); @@ -432,7 +435,7 @@ public function testLoadContentTypeField() */ public function testLoadContentTypeFieldType($contentType) { - $this->assertSame( + self::assertSame( $this->getTypeName(), $contentType->fieldDefinitions[1]->fieldTypeIdentifier ); @@ -446,7 +449,7 @@ public function testSettingsSchema() $fieldTypeService = $repository->getFieldTypeService(); $fieldType = $fieldTypeService->getFieldType($this->getTypeName()); - $this->assertEquals( + self::assertEquals( $this->getSettingsSchema(), $fieldType->getSettingsSchema() ); @@ -457,17 +460,17 @@ public function testSettingsSchema() */ public function testLoadContentTypeFieldData(FieldDefinition $fieldDefinition) { - $this->assertEquals( + self::assertEquals( $this->getTypeName(), $fieldDefinition->fieldTypeIdentifier, 'Loaded fieldTypeIdentifier does not match.' ); - $this->assertEquals( + self::assertEquals( $this->getValidFieldSettings(), $fieldDefinition->fieldSettings, 'Loaded fieldSettings do not match.' ); - $this->assertEquals( + self::assertEquals( $this->getValidValidatorConfiguration(), $fieldDefinition->validatorConfiguration, 'Loaded validatorConfiguration does not match.' @@ -493,7 +496,7 @@ public function testValidatorSchema() $fieldTypeService = $repository->getFieldTypeService(); $fieldType = $fieldTypeService->getFieldType($this->getTypeName()); - $this->assertEquals( + self::assertEquals( $this->getValidatorSchema(), $fieldType->getValidatorConfigurationSchema() ); @@ -605,7 +608,7 @@ public function testCreatedFieldType($content) } } - $this->fail('Custom field not found.'); + self::fail('Custom field not found.'); } /** @@ -616,7 +619,7 @@ public function testPublishContent() $draft = $this->testCreateContent(); if (!$draft->getVersionInfo()->isDraft()) { - $this->markTestSkipped('Provided content object is not a draft.'); + self::markTestSkipped('Provided content object is not a draft.'); } $repository = $this->getRepository(); @@ -636,7 +639,7 @@ public function testPublishedFieldType($content) } } - $this->fail('Custom field not found.'); + self::fail('Custom field not found.'); } /** @@ -644,7 +647,7 @@ public function testPublishedFieldType($content) */ public function testPublishedName(Content $content) { - $this->assertEquals( + self::assertEquals( $content->getFieldValue('name') . ' ' . $this->getFieldName(), $content->contentInfo->name ); @@ -676,7 +679,7 @@ public function testLoadFieldType() } } - $this->fail('Custom field not found.'); + self::fail('Custom field not found.'); } /** @@ -720,11 +723,12 @@ public function testCreatedEmptyFieldValue($content) } } - $this->fail('Custom field not found.'); + self::fail('Custom field not found.'); } /** * @depends testCreateContentWithEmptyFieldValue + * * @group xx */ public function testLoadEmptyFieldValue() @@ -748,7 +752,7 @@ public function testLoadEmptyFieldValueType($content) } } - $this->fail('Custom field not found.'); + self::fail('Custom field not found.'); } /** @@ -765,7 +769,7 @@ public function testLoadEmptyFieldValueData($field) $refProperty->setAccessible(true); $spiFieldType = $refProperty->getValue($fieldType); - $this->assertEquals( + self::assertEquals( $fieldType->getEmptyValue(), $spiFieldType->acceptValue($field->value) ); @@ -818,7 +822,7 @@ public function testUpdateTypeFieldStillAvailable($content) } } - $this->fail('Custom field not found.'); + self::fail('Custom field not found.'); } /** @@ -848,7 +852,7 @@ public function testUpdateNoNewContentTypeFieldStillAvailable($content) } } - $this->fail('Custom field not found.'); + self::fail('Custom field not found.'); } /** @@ -875,7 +879,7 @@ public function testCopyField($content) $copied = $contentService->copyContent($content->contentInfo, $locationCreate); - $this->assertNotSame( + self::assertNotSame( $content->contentInfo->id, $copied->contentInfo->id ); @@ -894,7 +898,7 @@ public function testCopiedFieldType($content) } } - $this->fail('Custom field not found.'); + self::fail('Custom field not found.'); } /** @@ -973,8 +977,8 @@ public function testRemoveFieldDefinition() { $content = $this->removeFieldDefinition(); - $this->assertCount(1, $content->getFields()); - $this->assertNull($content->getFieldValue('data')); + self::assertCount(1, $content->getFields()); + self::assertNull($content->getFieldValue('data')); } protected function addFieldDefinition() @@ -1010,9 +1014,9 @@ public function testAddFieldDefinition() { $content = $this->addFieldDefinition(); - $this->assertCount(2, $content->getFields()); + self::assertCount(2, $content->getFields()); - $this->assertTrue( + self::assertTrue( $this->getRepository()->getFieldTypeService()->getFieldType( $this->getTypeName() )->isEmptyValue( @@ -1030,7 +1034,7 @@ public function testToHash($value, $expectedHash) $fieldTypeService = $repository->getFieldTypeService(); $fieldType = $fieldTypeService->getFieldType($this->getTypeName()); - $this->assertEquals( + self::assertEquals( $expectedHash, $fieldType->toHash($value) ); @@ -1038,7 +1042,9 @@ public function testToHash($value, $expectedHash) /** * @depends testCreateContent + * * @dataProvider provideFromHashData + * * @todo: Requires correct registered FieldTypeService, needs to be * maintained! */ @@ -1048,7 +1054,7 @@ public function testFromHash($hash, $expectedValue) $fieldTypeService = $repository->getFieldTypeService(); $fieldType = $fieldTypeService->getFieldType($this->getTypeName()); - $this->assertEquals( + self::assertEquals( $expectedValue, $fieldType->fromHash($hash) ); diff --git a/tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php b/tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php index a50acfec0f..9ab6935591 100644 --- a/tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Values\Content\Field; @@ -182,7 +183,7 @@ public function getFieldName() */ public function assertFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( BinaryFileValue::class, $field->value ); @@ -194,13 +195,13 @@ public function assertFieldDataLoadedCorrect(Field $field) unset($expectedData['id']); $expectedData['inputUri'] = null; - $this->assertNotEmpty($field->value->id); + self::assertNotEmpty($field->value->id); $this->assertPropertiesCorrect( $expectedData, $field->value ); - $this->assertTrue( + self::assertTrue( $this->uriExistsOnIO($field->value->uri), "File {$field->value->uri} doesn't exist" ); @@ -249,7 +250,7 @@ public function getValidUpdateFieldData() */ public function assertUpdatedFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( BinaryFileValue::class, $field->value ); @@ -261,13 +262,13 @@ public function assertUpdatedFieldDataLoadedCorrect(Field $field) unset($expectedData['id']); $expectedData['inputUri'] = null; - $this->assertNotEmpty($field->value->id); + self::assertNotEmpty($field->value->id); $this->assertPropertiesCorrect( $expectedData, $field->value ); - $this->assertTrue( + self::assertTrue( $this->uriExistsOnIO($field->value->uri), "File {$field->value->uri} doesn't exist." ); @@ -290,7 +291,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field) { $this->assertFieldDataLoadedCorrect($field); - $this->assertEquals( + self::assertEquals( self::$loadedBinaryFilePath, $field->value->id ); @@ -394,7 +395,7 @@ protected function getValidSearchValueOne() protected function checkSearchEngineSupport() { if ($this->getSetupFactory() instanceof Legacy) { - $this->markTestSkipped( + self::markTestSkipped( "'ezbinaryfile' field type is not searchable with Legacy Search Engine" ); } @@ -414,6 +415,7 @@ protected function getValidSearchValueTwo() protected function getSearchTargetValueOne() { $value = $this->getValidSearchValueOne(); + // ensure case-insensitivity return strtoupper($value->fileName); } @@ -421,6 +423,7 @@ protected function getSearchTargetValueOne() protected function getSearchTargetValueTwo() { $value = $this->getValidSearchValueTwo(); + // ensure case-insensitivity return strtoupper($value->fileName); } diff --git a/tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php b/tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php index dcdf55d297..96cf46f389 100644 --- a/tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php @@ -322,6 +322,7 @@ public function getDataForTestFindContentFieldCriterion(): iterable /** * @dataProvider getDataForTestFindContentFieldCriterion + * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException diff --git a/tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php b/tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php index 3af6da08a0..b1720e3e97 100644 --- a/tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Exceptions\ContentFieldValidationException; @@ -139,7 +140,7 @@ public function getFieldName() */ public function assertFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( CountryValue::class, $field->value ); @@ -220,7 +221,7 @@ public function getValidUpdateFieldData() */ public function assertUpdatedFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( CountryValue::class, $field->value ); @@ -256,7 +257,7 @@ public function provideInvalidUpdateFieldData() */ public function assertCopiedFieldDataLoadedCorrectly(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( CountryValue::class, $field->value ); diff --git a/tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php b/tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php index 8b733ee841..00ef1ac6d1 100644 --- a/tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use DateTime; @@ -153,7 +154,7 @@ public function getFieldName() */ public function assertFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( DateAndTimeValue::class, $field->value ); @@ -195,7 +196,7 @@ public function getValidUpdateFieldData() */ public function assertUpdatedFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( DateAndTimeValue::class, $field->value ); @@ -241,7 +242,7 @@ public function testUpdateContentFails($failingValue, $expectedException) */ public function assertCopiedFieldDataLoadedCorrectly(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( DateAndTimeValue::class, $field->value ); diff --git a/tests/integration/Core/Repository/FieldType/DateIntegrationTest.php b/tests/integration/Core/Repository/FieldType/DateIntegrationTest.php index 2fc2508f44..32bfc438e8 100644 --- a/tests/integration/Core/Repository/FieldType/DateIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/DateIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use DateTime; @@ -142,7 +143,7 @@ public function getFieldName() */ public function assertFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( DateValue::class, $field->value ); @@ -187,7 +188,7 @@ public function getValidUpdateFieldData() */ public function assertUpdatedFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( DateValue::class, $field->value ); diff --git a/tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php b/tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php index 1d4a9b3c89..346146322f 100644 --- a/tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Values\Content\Field; @@ -129,7 +130,7 @@ public function getFieldName() */ public function assertFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( EmailAddressValue::class, $field->value ); @@ -192,7 +193,7 @@ public function getValidUpdateFieldData() */ public function assertUpdatedFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( EmailAddressValue::class, $field->value ); @@ -221,7 +222,7 @@ public function provideInvalidUpdateFieldData() */ public function assertCopiedFieldDataLoadedCorrectly(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( EmailAddressValue::class, $field->value ); diff --git a/tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php b/tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php index 17058af66e..9b00ad50d1 100644 --- a/tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use FilesystemIterator; diff --git a/tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php b/tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php index 47b0c1b337..45acf25fed 100644 --- a/tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Exceptions\ContentFieldValidationException; @@ -141,7 +142,7 @@ public function getFieldName() */ public function assertFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( FloatValue::class, $field->value ); @@ -190,7 +191,7 @@ public function getValidUpdateFieldData() */ public function assertUpdatedFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( FloatValue::class, $field->value ); @@ -219,7 +220,7 @@ public function provideInvalidUpdateFieldData() */ public function assertCopiedFieldDataLoadedCorrectly(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( FloatValue::class, $field->value ); diff --git a/tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php b/tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php index f98418b0cf..f7d661e9dd 100644 --- a/tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Exceptions\ContentFieldValidationException; @@ -130,14 +131,14 @@ public function getFieldName() */ public function assertFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( ISBNValue::class, $field->value ); $expectedData = '9789722514095'; - $this->assertEquals( + self::assertEquals( $expectedData, $field->value ); @@ -184,13 +185,13 @@ public function getValidUpdateFieldData() */ public function assertUpdatedFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( ISBNValue::class, $field->value ); $expectedData = '978-972-25-1409-5'; - $this->assertEquals( + self::assertEquals( $expectedData, $field->value ); @@ -211,14 +212,14 @@ public function provideInvalidUpdateFieldData() */ public function assertCopiedFieldDataLoadedCorrectly(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( ISBNValue::class, $field->value ); $expectedData = '9789722514095'; - $this->assertEquals( + self::assertEquals( $expectedData, $field->value ); diff --git a/tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php b/tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php index b11c4eaa23..8f3c5e7687 100644 --- a/tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Doctrine\DBAL\ParameterType; @@ -328,7 +329,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field): void { $this->assertFieldDataLoadedCorrect($field); - $this->assertEquals( + self::assertEquals( self::$loadedImagePath, $field->value->id ); @@ -461,12 +462,12 @@ public function testInherentCopyForNewLanguage(): void } } - $this->assertTrue( + self::assertTrue( isset($paths['eng-US']) && isset($paths['ger-DE']), 'Failed asserting that file path for all languages were found in draft' ); - $this->assertEquals( + self::assertEquals( $paths['eng-US'], $paths['ger-DE'] ); @@ -625,7 +626,7 @@ public function testUpdateImageAltTextOnly(): void protected function checkSearchEngineSupport(): void { if ($this->getSetupFactory() instanceof Legacy) { - $this->markTestSkipped( + self::markTestSkipped( "'ezimage' field type is not searchable with Legacy Search Engine" ); } diff --git a/tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php b/tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php index 2e33f371c8..443ad6d7e7 100644 --- a/tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Exceptions\ContentFieldValidationException; @@ -141,7 +142,7 @@ public function getFieldName() */ public function assertFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( IntegerValue::class, $field->value ); @@ -192,7 +193,7 @@ public function getValidUpdateFieldData() */ public function assertUpdatedFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( IntegerValue::class, $field->value ); @@ -221,7 +222,7 @@ public function provideInvalidUpdateFieldData() */ public function assertCopiedFieldDataLoadedCorrectly(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( IntegerValue::class, $field->value ); diff --git a/tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php b/tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php index aa0cc736dd..5059b4079e 100644 --- a/tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Values\Content\Field; @@ -144,12 +145,12 @@ public function getFieldName() */ public function assertFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( KeywordValue::class, $field->value ); - $this->assertEquals( + self::assertEquals( ['foo' => true, 'bar' => true, 'sindelfingen' => true], array_fill_keys($field->value->values, true) ); @@ -188,12 +189,12 @@ public function getValidUpdateFieldData() */ public function assertUpdatedFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( KeywordValue::class, $field->value ); - $this->assertEquals( + self::assertEquals( ['bielefeld' => true], array_fill_keys($field->value->values, true) ); @@ -214,12 +215,12 @@ public function provideInvalidUpdateFieldData() */ public function assertCopiedFieldDataLoadedCorrectly(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( KeywordValue::class, $field->value ); - $this->assertEquals( + self::assertEquals( ['foo' => true, 'bar' => true, 'sindelfingen' => true], array_fill_keys($field->value->values, true) ); @@ -367,7 +368,7 @@ private function assertContentFieldHasCorrectData($contentId, KeywordValue $valu $dataField = $loadedContent->getField('data'); sort($dataField->value->values); sort($value->values); - $this->assertEquals($value, $dataField->value); + self::assertEquals($value, $dataField->value); } /** @@ -393,7 +394,7 @@ public function testGoBackToDifferentVersionWithDifferentKeywords(): void // go back to the first version and check whether keywords are correct $contentDraft03 = $contentService->createContentDraft($publishedContent01->contentInfo, $contentDraft01->versionInfo); $contentService->deleteContent($publishedContent01->contentInfo); - $this->assertEqualsCanonicalizing($contentDraft03->getFieldValue('data'), $value01); + self::assertEqualsCanonicalizing($contentDraft03->getFieldValue('data'), $value01); } public function testKeywordsAreCaseSensitive() @@ -403,12 +404,12 @@ public function testKeywordsAreCaseSensitive() $publishedContent02 = $this->createAndPublishContent('foo', $contentType, md5(uniqid(__METHOD__, true))); $data = $publishedContent01->getField('data')->value; - $this->assertCount(1, $data->values); - $this->assertEquals('Foo', $data->values[0]); + self::assertCount(1, $data->values); + self::assertEquals('Foo', $data->values[0]); $data = $publishedContent02->getField('data')->value; - $this->assertCount(1, $data->values); - $this->assertEquals('foo', $data->values[0]); + self::assertCount(1, $data->values); + self::assertEquals('foo', $data->values[0]); } /** @@ -588,7 +589,7 @@ public function testFindContentFieldCriterion() $searchService = $repository->getSearchService(); $searchResult = $searchService->findContent($query); - $this->assertEquals(1, $searchResult->totalCount); + self::assertEquals(1, $searchResult->totalCount); } } diff --git a/tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php b/tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php index 36541ff5de..10e165f900 100644 --- a/tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Values\Content\Field; @@ -128,7 +129,7 @@ public function getFieldName() */ public function assertFieldDataLoadedCorrect(Field $field) { - $this->assertEquals( + self::assertEquals( $this->getValidCreationFieldData(), $field->value ); @@ -201,7 +202,7 @@ public function getValidUpdateFieldData() */ public function assertUpdatedFieldDataLoadedCorrect(Field $field) { - $this->assertEquals( + self::assertEquals( $this->getValidUpdateFieldData(), $field->value ); @@ -222,7 +223,7 @@ public function provideInvalidUpdateFieldData() */ public function assertCopiedFieldDataLoadedCorrectly(Field $field) { - $this->assertEquals( + self::assertEquals( $this->getValidCreationFieldData(), $field->value ); diff --git a/tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php b/tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php index b8b1d7a23e..6fd07dff31 100644 --- a/tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Values\Content\Field; @@ -194,7 +195,7 @@ public function getFieldName() */ public function assertFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( MediaValue::class, $field->value ); @@ -206,13 +207,13 @@ public function assertFieldDataLoadedCorrect(Field $field) unset($expectedData['id']); $expectedData['inputUri'] = null; - $this->assertNotEmpty($field->value->id); + self::assertNotEmpty($field->value->id); $this->assertPropertiesCorrect( $expectedData, $field->value ); - $this->assertTrue( + self::assertTrue( $this->uriExistsOnIO($field->value->uri), "File {$field->value->uri} doesn't exist." ); @@ -261,7 +262,7 @@ public function getValidUpdateFieldData() */ public function assertUpdatedFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( MediaValue::class, $field->value ); @@ -273,13 +274,13 @@ public function assertUpdatedFieldDataLoadedCorrect(Field $field) unset($expectedData['id']); $expectedData['inputUri'] = null; - $this->assertNotEmpty($field->value->id); + self::assertNotEmpty($field->value->id); $this->assertPropertiesCorrect( $expectedData, $field->value ); - $this->assertTrue( + self::assertTrue( $this->uriExistsOnIO($field->value->uri), "File {$field->value->uri} doesn't exist." ); @@ -302,7 +303,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field) { $this->assertFieldDataLoadedCorrect($field); - $this->assertEquals( + self::assertEquals( self::$loadedMediaPath, $field->value->id ); @@ -418,6 +419,7 @@ protected function getValidSearchValueTwo() protected function getSearchTargetValueOne() { $value = $this->getValidSearchValueOne(); + // ensure case-insensitivity return strtoupper($value->fileName); } @@ -425,6 +427,7 @@ protected function getSearchTargetValueOne() protected function getSearchTargetValueTwo() { $value = $this->getValidSearchValueTwo(); + // ensure case-insensitivity return strtoupper($value->fileName); } diff --git a/tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php b/tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php index a47546c4a7..d51cef9ee4 100644 --- a/tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Values\Content\Content; @@ -203,7 +204,7 @@ public function getFieldName() */ public function assertFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( RelationValue::class, $field->value ); @@ -272,7 +273,7 @@ public function provideInvalidUpdateFieldData() */ public function assertCopiedFieldDataLoadedCorrectly(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( RelationValue::class, $field->value ); diff --git a/tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php b/tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php index 6f9f861d1b..17c0969357 100644 --- a/tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Values\Content\Content; @@ -232,7 +233,7 @@ public function getFieldName() */ public function assertFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( RelationListValue::class, $field->value ); @@ -301,7 +302,7 @@ public function provideInvalidUpdateFieldData() */ public function assertCopiedFieldDataLoadedCorrectly(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( RelationListValue::class, $field->value ); diff --git a/tests/integration/Core/Repository/FieldType/RelationSearchBaseIntegrationTestTrait.php b/tests/integration/Core/Repository/FieldType/RelationSearchBaseIntegrationTestTrait.php index 161799afb9..8e451ecdbc 100644 --- a/tests/integration/Core/Repository/FieldType/RelationSearchBaseIntegrationTestTrait.php +++ b/tests/integration/Core/Repository/FieldType/RelationSearchBaseIntegrationTestTrait.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Values\Content\Content; diff --git a/tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php b/tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php index a9a647b06e..f966ee45c2 100644 --- a/tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Repository; @@ -210,7 +211,7 @@ protected function getAdditionallyIndexedFieldData() */ protected function getFullTextIndexedFieldData() { - $this->markTestSkipped( + self::markTestSkipped( 'Skipped by default, override in the concrete test case as required by the field type.' ); } @@ -248,7 +249,7 @@ protected function checkSearchEngineSupport() protected function checkCustomFieldsSupport() { if (get_class($this->getSetupFactory()) === Legacy::class) { - $this->markTestSkipped('Legacy Search Engine does not support custom fields'); + self::markTestSkipped('Legacy Search Engine does not support custom fields'); } } @@ -297,7 +298,7 @@ public function testCreateTestContent(): array $fieldType = $fieldTypeService->getFieldType($this->getTypeName()); if (!$fieldType->isSearchable()) { - $this->markTestSkipped("Field type '{$this->getTypeName()}' is not searchable."); + self::markTestSkipped("Field type '{$this->getTypeName()}' is not searchable."); } $this->checkSearchEngineSupport(); @@ -370,6 +371,7 @@ public function findProvider() * The result should contain Content One. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindEqualsOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -389,6 +391,7 @@ public function testFindEqualsOne($valueOne, $valueTwo, $filter, $content, $modi * The result should contain Content Two. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindNotEqualsOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -408,6 +411,7 @@ public function testFindNotEqualsOne($valueOne, $valueTwo, $filter, $content, $m * The result should contain Content Two. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindEqualsTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -427,6 +431,7 @@ public function testFindEqualsTwo($valueOne, $valueTwo, $filter, $content, $modi * The result should contain Content One. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindNotEqualsTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -446,6 +451,7 @@ public function testFindNotEqualsTwo($valueOne, $valueTwo, $filter, $content, $m * The result should contain Content One. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindInOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -465,6 +471,7 @@ public function testFindInOne($valueOne, $valueTwo, $filter, $content, $modifyFi * The result should contain Content Two. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindNotInOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -486,6 +493,7 @@ public function testFindNotInOne($valueOne, $valueTwo, $filter, $content, $modif * The result should contain Content Two. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindInTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -505,6 +513,7 @@ public function testFindInTwo($valueOne, $valueTwo, $filter, $content, $modifyFi * The result should contain Content One. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindNotInTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -526,6 +535,7 @@ public function testFindNotInTwo($valueOne, $valueTwo, $filter, $content, $modif * The result should contain both Content One and Content Two. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindInOneTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -552,6 +562,7 @@ public function testFindInOneTwo($valueOne, $valueTwo, $filter, $content, $modif * The result should be empty. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindNotInOneTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -580,6 +591,7 @@ public function testFindNotInOneTwo($valueOne, $valueTwo, $filter, $content, $mo * The result should contain Content Two. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindGreaterThanOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -599,6 +611,7 @@ public function testFindGreaterThanOne($valueOne, $valueTwo, $filter, $content, * The result should contain Content One. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindNotGreaterThanOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -618,6 +631,7 @@ public function testFindNotGreaterThanOne($valueOne, $valueTwo, $filter, $conten * The result should be empty. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindGreaterThanTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -637,6 +651,7 @@ public function testFindGreaterThanTwo($valueOne, $valueTwo, $filter, $content, * The result should contain both Content One and Content Two. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindNotGreaterThanTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -656,6 +671,7 @@ public function testFindNotGreaterThanTwo($valueOne, $valueTwo, $filter, $conten * The result should contain both Content One and Content Two. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindGreaterThanOrEqualOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -675,6 +691,7 @@ public function testFindGreaterThanOrEqualOne($valueOne, $valueTwo, $filter, $co * The result should be empty. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindNotGreaterThanOrEqual($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -694,6 +711,7 @@ public function testFindNotGreaterThanOrEqual($valueOne, $valueTwo, $filter, $co * The result should contain Content Two. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindGreaterThanOrEqualTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -713,6 +731,7 @@ public function testFindGreaterThanOrEqualTwo($valueOne, $valueTwo, $filter, $co * The result should contain Content One. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindNotGreaterThanOrEqualTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -732,6 +751,7 @@ public function testFindNotGreaterThanOrEqualTwo($valueOne, $valueTwo, $filter, * The result should be empty. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindLowerThanOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -751,6 +771,7 @@ public function testFindLowerThanOne($valueOne, $valueTwo, $filter, $content, $m * The result should contain both Content One and Content Two. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindNotLowerThanOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -770,6 +791,7 @@ public function testFindNotLowerThanOne($valueOne, $valueTwo, $filter, $content, * The result should contain Content One. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindLowerThanTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -789,6 +811,7 @@ public function testFindLowerThanTwo($valueOne, $valueTwo, $filter, $content, $m * The result should contain Content Two. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindNotLowerThanTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -808,6 +831,7 @@ public function testFindNotLowerThanTwo($valueOne, $valueTwo, $filter, $content, * The result should contain Content One. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindLowerThanOrEqualOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -827,6 +851,7 @@ public function testFindLowerThanOrEqualOne($valueOne, $valueTwo, $filter, $cont * The result should contain Content Two. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindNotLowerThanOrEqualOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -846,6 +871,7 @@ public function testFindNotLowerThanOrEqualOne($valueOne, $valueTwo, $filter, $c * The result should contain both Content One and Content Two. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindLowerThanOrEqualTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -865,6 +891,7 @@ public function testFindLowerThanOrEqualTwo($valueOne, $valueTwo, $filter, $cont * The result should be empty. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindNotLowerThanOrEqualTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -884,6 +911,7 @@ public function testFindNotLowerThanOrEqualTwo($valueOne, $valueTwo, $filter, $c * The result should contain both Content One and Content Two. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindBetweenOneTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -910,6 +938,7 @@ public function testFindBetweenOneTwo($valueOne, $valueTwo, $filter, $content, $ * The result should contain both Content One and Content Two. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindNotBetweenOneTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -938,6 +967,7 @@ public function testFindNotBetweenOneTwo($valueOne, $valueTwo, $filter, $content * The result should be empty. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindBetweenTwoOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -964,6 +994,7 @@ public function testFindBetweenTwoOne($valueOne, $valueTwo, $filter, $content, $ * The result should contain both Content One and Content Two. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindNotBetweenTwoOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -992,6 +1023,7 @@ public function testFindNotBetweenTwoOne($valueOne, $valueTwo, $filter, $content * The result should contain Content One. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindContainsOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -1011,6 +1043,7 @@ public function testFindContainsOne($valueOne, $valueTwo, $filter, $content, $mo * The result should contain Content Two. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindNotContainsOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -1030,6 +1063,7 @@ public function testFindNotContainsOne($valueOne, $valueTwo, $filter, $content, * The result should contain Content Two. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindContainsTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -1049,6 +1083,7 @@ public function testFindContainsTwo($valueOne, $valueTwo, $filter, $content, $mo * The result should contain Content One. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindNotContainsTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -1064,6 +1099,7 @@ public function testFindNotContainsTwo($valueOne, $valueTwo, $filter, $content, * Tests search with LIKE operator, with NO wildcard. * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindLikeOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -1080,6 +1116,7 @@ public function testFindLikeOne($valueOne, $valueTwo, $filter, $content, $modify * Tests search with LIKE operator, with wildcard at the end (on strings). * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindNotLikeOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -1099,6 +1136,7 @@ public function testFindNotLikeOne($valueOne, $valueTwo, $filter, $content, $mod * Tests search with LIKE operator, with wildcard at the start (on strings). * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindLikeTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -1116,6 +1154,7 @@ public function testFindLikeTwo($valueOne, $valueTwo, $filter, $content, $modify * Tests search with LIKE operator, with wildcard in the middle (on strings). * * @dataProvider findProvider + * * @depends testCreateTestContent */ public function testFindNotLikeTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) @@ -1238,6 +1277,7 @@ public function sortProvider() * Tests Content Search sort with Field sort clause on a field of specific field type. * * @dataProvider sortProvider + * * @depends testCreateTestContent */ public function testSort($ascending, $content, $modifyField, array $context) @@ -1288,6 +1328,7 @@ public function fullTextFindProvider() /** * @dataProvider fullTextFindProvider + * * @depends testCreateTestContent */ public function testFullTextFindOne($valueOne, $valueTwo, $filter, $content, array $context) @@ -1301,6 +1342,7 @@ public function testFullTextFindOne($valueOne, $valueTwo, $filter, $content, arr /** * @dataProvider fullTextFindProvider + * * @depends testCreateTestContent */ public function testFullTextFindTwo($valueOne, $valueTwo, $filter, $content, array $context) @@ -1497,29 +1539,29 @@ protected function assertFindResult( $contentIdList = $this->getResultContentIdList($searchResult); if ($includesOne && $includesTwo) { - $this->assertEquals(2, $searchResult->totalCount); - $this->assertNotEquals($contentIdList[0], $contentIdList[1]); + self::assertEquals(2, $searchResult->totalCount); + self::assertNotEquals($contentIdList[0], $contentIdList[1]); - $this->assertThat( + self::assertThat( $contentIdList[0], - $this->logicalOr($this->equalTo($contentOneId), $this->equalTo($contentTwoId)) + self::logicalOr(self::equalTo($contentOneId), self::equalTo($contentTwoId)) ); - $this->assertThat( + self::assertThat( $contentIdList[1], - $this->logicalOr($this->equalTo($contentOneId), $this->equalTo($contentTwoId)) + self::logicalOr(self::equalTo($contentOneId), self::equalTo($contentTwoId)) ); } elseif (!$includesOne && !$includesTwo) { - $this->assertEquals(0, $searchResult->totalCount); + self::assertEquals(0, $searchResult->totalCount); } else { - $this->assertEquals(1, $searchResult->totalCount); + self::assertEquals(1, $searchResult->totalCount); if ($includesOne) { - $this->assertEquals($contentOneId, $contentIdList[0]); + self::assertEquals($contentOneId, $contentIdList[0]); } if ($includesTwo) { - $this->assertEquals($contentTwoId, $contentIdList[0]); + self::assertEquals($contentTwoId, $contentIdList[0]); } } } @@ -1548,9 +1590,9 @@ protected function assertSortResult( $indexTwo = 0; } - $this->assertEquals(2, $searchResult->totalCount); - $this->assertEquals($contentOneId, $contentIdList[$indexOne]); - $this->assertEquals($contentTwoId, $contentIdList[$indexTwo]); + self::assertEquals(2, $searchResult->totalCount); + self::assertEquals($contentOneId, $contentIdList[$indexOne]); + self::assertEquals($contentTwoId, $contentIdList[$indexTwo]); } } diff --git a/tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php b/tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php index 7a5f0997e9..c82f0d95ce 100644 --- a/tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Field; @@ -115,7 +116,7 @@ protected function checkOperatorSupport($operator): void isset($this->legacyUnsupportedOperators[$operator]) && $this->getSetupFactory() instanceof Legacy ) { - $this->markTestSkipped( + self::markTestSkipped( 'Legacy Search Engine does not properly support multivalued fields ' . "with '{$this->legacyUnsupportedOperators[$operator]}' operator" ); @@ -147,7 +148,7 @@ public function testCreateMultivaluedTestContent(): array $fieldType = $fieldTypeService->getFieldType($this->getTypeName()); if (!$fieldType->isSearchable()) { - $this->markTestSkipped("Field type '{$this->getTypeName()}' is not searchable."); + self::markTestSkipped("Field type '{$this->getTypeName()}' is not searchable."); } $this->checkSearchEngineSupport(); @@ -220,6 +221,7 @@ public function findMultivaluedProvider() * The result should contain Content One. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedEqualsOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -243,6 +245,7 @@ public function testFindMultivaluedEqualsOne($valuesOne, $valuesTwo, $filter, $c * The result should contain Content Two. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedNotEqualsOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -266,6 +269,7 @@ public function testFindMultivaluedNotEqualsOne($valuesOne, $valuesTwo, $filter, * The result should contain Content One. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedInOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -287,6 +291,7 @@ public function testFindMultivaluedInOne($valuesOne, $valuesTwo, $filter, $conte * The result should contain Content Two. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedNotInOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -310,6 +315,7 @@ public function testFindMultivaluedNotInOne($valuesOne, $valuesTwo, $filter, $co * The result should contain both Content One and Content Two. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedInOneTwo($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -331,6 +337,7 @@ public function testFindMultivaluedInOneTwo($valuesOne, $valuesTwo, $filter, $co * The result should be empty. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedNotInOneTwo($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -354,6 +361,7 @@ public function testFindMultivaluedNotInOneTwo($valuesOne, $valuesTwo, $filter, * The result should contain Content One. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedContainsOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -377,6 +385,7 @@ public function testFindMultivaluedContainsOne($valuesOne, $valuesTwo, $filter, * The result should contain Content Two. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedNotContainsOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -400,6 +409,7 @@ public function testFindMultivaluedNotContainsOne($valuesOne, $valuesTwo, $filte * The result should contain both Content One and Content Two. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedGreaterThanOneFindsOneTwo($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -421,6 +431,7 @@ public function testFindMultivaluedGreaterThanOneFindsOneTwo($valuesOne, $values * The result should contain Content Two. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedGreaterThanOneFindsTwo($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -442,6 +453,7 @@ public function testFindMultivaluedGreaterThanOneFindsTwo($valuesOne, $valuesTwo * The result should be empty. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedNotGreaterThanOneFindsOneTwo($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -463,6 +475,7 @@ public function testFindMultivaluedNotGreaterThanOneFindsOneTwo($valuesOne, $val * The result should contain Content One. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedNotGreaterThanOneFindsTwo($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -484,6 +497,7 @@ public function testFindMultivaluedNotGreaterThanOneFindsTwo($valuesOne, $values * The result should contain both Content One and Content Two. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedGreaterThanOrEqualOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -507,6 +521,7 @@ public function testFindMultivaluedGreaterThanOrEqualOne($valuesOne, $valuesTwo, * The result should be empty. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedNotGreaterThanOrEqual($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -530,6 +545,7 @@ public function testFindMultivaluedNotGreaterThanOrEqual($valuesOne, $valuesTwo, * The result should be empty. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedLowerThanOneEmpty($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -551,6 +567,7 @@ public function testFindMultivaluedLowerThanOneEmpty($valuesOne, $valuesTwo, $fi * The result should contain Content One. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedLowerThanOneFindsOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -572,6 +589,7 @@ public function testFindMultivaluedLowerThanOneFindsOne($valuesOne, $valuesTwo, * The result should contain both Content One and Content Two. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedNotLowerThanOneEmpty($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -593,6 +611,7 @@ public function testFindMultivaluedNotLowerThanOneEmpty($valuesOne, $valuesTwo, * The result should contain Content Two. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedNotLowerThanOneFindsOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -614,6 +633,7 @@ public function testFindMultivaluedNotLowerThanOneFindsOne($valuesOne, $valuesTw * The result should contain Content One. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedLowerThanOrEqualOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -637,6 +657,7 @@ public function testFindMultivaluedLowerThanOrEqualOne($valuesOne, $valuesTwo, $ * The result should contain Content Two. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedNotLowerThanOrEqualOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -660,6 +681,7 @@ public function testFindMultivaluedNotLowerThanOrEqualOne($valuesOne, $valuesTwo * The result should contain both Content One and Content Two. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedBetweenOneTwo($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -692,6 +714,7 @@ public function testFindMultivaluedBetweenOneTwo($valuesOne, $valuesTwo, $filter * The result should contain both Content One and Content Two. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedNotBetweenOneTwo($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -726,6 +749,7 @@ public function testFindMultivaluedNotBetweenOneTwo($valuesOne, $valuesTwo, $fil * The result should be empty. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedBetweenTwoOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) @@ -758,6 +782,7 @@ public function testFindMultivaluedBetweenTwoOne($valuesOne, $valuesTwo, $filter * The result should contain both Content One and Content Two. * * @dataProvider findMultivaluedProvider + * * @depends testCreateMultivaluedTestContent */ public function testFindMultivaluedNotBetweenTwoOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) diff --git a/tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php b/tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php index a8395a6f0b..dc98f3ece9 100644 --- a/tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Exceptions\ContentFieldValidationException; @@ -168,7 +169,7 @@ public function getFieldName() */ public function assertFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( SelectionValue::class, $field->value ); @@ -215,7 +216,7 @@ public function getValidUpdateFieldData() */ public function assertUpdatedFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( SelectionValue::class, $field->value ); @@ -244,7 +245,7 @@ public function provideInvalidUpdateFieldData() */ public function assertCopiedFieldDataLoadedCorrectly(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( SelectionValue::class, $field->value ); diff --git a/tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php b/tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php index c062d374f6..f239a192bb 100644 --- a/tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; /** diff --git a/tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php b/tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php index 5c26890faf..11f45da53d 100644 --- a/tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Values\Content\Field; @@ -129,7 +130,7 @@ public function getFieldName() */ public function assertFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( TextBlockValue::class, $field->value ); @@ -172,7 +173,7 @@ public function getValidUpdateFieldData() */ public function assertUpdatedFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( TextBlockValue::class, $field->value ); @@ -201,7 +202,7 @@ public function provideInvalidUpdateFieldData() */ public function assertCopiedFieldDataLoadedCorrectly(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( TextBlockValue::class, $field->value ); diff --git a/tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php b/tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php index ee493d3a52..e25db83a85 100644 --- a/tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Exceptions\ContentFieldValidationException; @@ -141,7 +142,7 @@ public function getFieldName() */ public function assertFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( TextLineValue::class, $field->value ); @@ -192,7 +193,7 @@ public function getValidUpdateFieldData() */ public function assertUpdatedFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( TextLineValue::class, $field->value ); @@ -221,7 +222,7 @@ public function provideInvalidUpdateFieldData() */ public function assertCopiedFieldDataLoadedCorrectly(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( TextLineValue::class, $field->value ); diff --git a/tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php b/tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php index 87132350bf..05992bdeba 100644 --- a/tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use DateTime; @@ -147,7 +148,7 @@ public function getFieldName() */ public function assertFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( TimeValue::class, $field->value ); @@ -189,7 +190,7 @@ public function getValidUpdateFieldData() */ public function assertUpdatedFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( TimeValue::class, $field->value ); @@ -236,7 +237,7 @@ public function testUpdateContentFails($failingValue, $expectedException) */ public function assertCopiedFieldDataLoadedCorrectly(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( TimeValue::class, $field->value ); diff --git a/tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php b/tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php index 08616ef6a8..7243d0fbd7 100644 --- a/tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Values\Content\Field; @@ -122,7 +123,7 @@ public function getFieldName() */ public function assertFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( UrlValue::class, $field->value ); @@ -170,7 +171,7 @@ public function getValidUpdateFieldData() */ public function assertUpdatedFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( UrlValue::class, $field->value ); @@ -200,7 +201,7 @@ public function provideInvalidUpdateFieldData() */ public function assertCopiedFieldDataLoadedCorrectly(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( UrlValue::class, $field->value ); diff --git a/tests/integration/Core/Repository/FieldType/UserIntegrationTest.php b/tests/integration/Core/Repository/FieldType/UserIntegrationTest.php index 94578eac33..473d3c905d 100644 --- a/tests/integration/Core/Repository/FieldType/UserIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/UserIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Doctrine\DBAL\Exception\NotNullConstraintViolationException; @@ -169,7 +170,7 @@ public function getFieldName() */ public function assertFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( UserValue::class, $field->value ); @@ -187,7 +188,7 @@ public function assertFieldDataLoadedCorrect(Field $field) $field->value ); - $this->assertNotNull($field->value->contentId); + self::assertNotNull($field->value->contentId); } public function provideInvalidCreationFieldData() @@ -199,7 +200,7 @@ public function testCreateContentFails( $failingValue = null, ?string $expectedException = null ): void { - $this->markTestSkipped('Values are ignored on creation.'); + self::markTestSkipped('Values are ignored on creation.'); } /** @@ -230,7 +231,7 @@ public function getValidUpdateFieldData() */ public function assertUpdatedFieldDataLoadedCorrect(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( UserValue::class, $field->value ); @@ -248,7 +249,7 @@ public function assertUpdatedFieldDataLoadedCorrect(Field $field) $field->value ); - $this->assertNotNull($field->value->contentId); + self::assertNotNull($field->value->contentId); } public function provideInvalidUpdateFieldData() @@ -272,7 +273,7 @@ public function provideInvalidUpdateFieldData() */ public function assertCopiedFieldDataLoadedCorrectly(Field $field) { - $this->assertInstanceOf( + self::assertInstanceOf( UserValue::class, $field->value ); @@ -406,7 +407,7 @@ protected function createContent($fieldData, $contentType = null) public function testCreateContentWithEmptyFieldValue() { - $this->markTestSkipped('User field will never be created empty'); + self::markTestSkipped('User field will never be created empty'); } public function providerForTestIsEmptyValue() @@ -444,8 +445,8 @@ public function testRemoveFieldDefinition() $content = $contentService->loadContent($content->id); - $this->assertCount($countBeforeRemoval - 1, $content->getFields()); - $this->assertNull($content->getFieldValue($userFieldDefinition->identifier)); + self::assertCount($countBeforeRemoval - 1, $content->getFields()); + self::assertNull($content->getFieldValue($userFieldDefinition->identifier)); } public function testAddFieldDefinition() @@ -473,7 +474,7 @@ public function testCopyField($content) */ public function testCopiedFieldType($content) { - $this->markTestSkipped('Users cannot be copied, content is not passed to test.'); + self::markTestSkipped('Users cannot be copied, content is not passed to test.'); } /** @@ -481,7 +482,7 @@ public function testCopiedFieldType($content) */ public function testCopiedExternalData(Field $field) { - $this->markTestSkipped('Users cannot be copied, field is not passed to test.'); + self::markTestSkipped('Users cannot be copied, field is not passed to test.'); } /** @@ -507,7 +508,7 @@ public function testUpdateFieldDefinitionWithIncompleteSettingsSchema() $contentType = $contentTypeService->loadContentType($contentType->id); $userFieldDefinition = $this->getUserFieldDefinition($contentType); - $this->assertNull($userFieldDefinition->fieldSettings[Type::PASSWORD_TTL_WARNING_SETTING]); + self::assertNull($userFieldDefinition->fieldSettings[Type::PASSWORD_TTL_WARNING_SETTING]); } /** @@ -522,7 +523,7 @@ private function getUserFieldDefinition(ContentType $contentType): FieldDefiniti $fieldDefinition = $contentType->getFirstFieldDefinitionOfType('ezuser'); if ($fieldDefinition === null) { - $this->fail("'ezuser' field definition was not found"); + self::fail("'ezuser' field definition was not found"); } return $fieldDefinition; diff --git a/tests/integration/Core/Repository/FieldTypeServiceTest.php b/tests/integration/Core/Repository/FieldTypeServiceTest.php index 488114238d..22f0648a3b 100644 --- a/tests/integration/Core/Repository/FieldTypeServiceTest.php +++ b/tests/integration/Core/Repository/FieldTypeServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\FieldType; @@ -12,6 +13,7 @@ * Test case for operations in the FieldTypeService using in memory storage. * * @covers \Ibexa\Contracts\Core\Repository\FieldTypeService + * * @group field-type */ class FieldTypeServiceTest extends BaseTest @@ -33,10 +35,10 @@ public function testGetFieldTypes() /* END: Use Case */ // Require at least 1 field type - $this->assertNotCount(0, $fieldTypes); + self::assertNotCount(0, $fieldTypes); foreach ($fieldTypes as $fieldType) { - $this->assertInstanceOf( + self::assertInstanceOf( FieldType::class, $fieldType ); @@ -65,7 +67,7 @@ public function testGetFieldType() FieldType::class, $fieldType ); - $this->assertEquals( + self::assertEquals( 'ezurl', $fieldType->getFieldTypeIdentifier() ); @@ -106,7 +108,7 @@ public function testHasFieldTypeReturnsTrue() $typeExists = $fieldTypeService->hasFieldType('ezurl'); /* END: Use Case */ - $this->assertTrue($typeExists); + self::assertTrue($typeExists); } /** @@ -125,7 +127,7 @@ public function testHasFieldTypeReturnsFalse() $typeExists = $fieldTypeService->hasFieldType('sindelfingen'); /* END: Use Case */ - $this->assertFalse($typeExists); + self::assertFalse($typeExists); } } diff --git a/tests/integration/Core/Repository/IdManager.php b/tests/integration/Core/Repository/IdManager.php index e0811347e3..7ad67ae022 100644 --- a/tests/integration/Core/Repository/IdManager.php +++ b/tests/integration/Core/Repository/IdManager.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; /** diff --git a/tests/integration/Core/Repository/LanguageServiceAuthorizationTest.php b/tests/integration/Core/Repository/LanguageServiceAuthorizationTest.php index 6994389d0b..6756ee5acb 100644 --- a/tests/integration/Core/Repository/LanguageServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/LanguageServiceAuthorizationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -12,7 +13,9 @@ * Test case for operations in the LanguageService using in memory storage. * * @covers \Ibexa\Contracts\Core\Repository\LanguageService + * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUser + * * @group integration * @group authorization */ @@ -22,6 +25,7 @@ class LanguageServiceAuthorizationTest extends BaseTest * Test for the createLanguage() method. * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::createLanguage() + * * @depends testCreateLanguage */ public function testCreateLanguageThrowsUnauthorizedException() @@ -55,6 +59,7 @@ public function testCreateLanguageThrowsUnauthorizedException() * Test for the updateLanguageName() method. * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::updateLanguageName() + * * @depends testUpdateLanguageName */ public function testUpdateLanguageNameThrowsUnauthorizedException() @@ -92,6 +97,7 @@ public function testUpdateLanguageNameThrowsUnauthorizedException() * Test for the enableLanguage() method. * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::enableLanguage() + * * @depends testEnableLanguage */ public function testEnableLanguageThrowsUnauthorizedException() @@ -127,6 +133,7 @@ public function testEnableLanguageThrowsUnauthorizedException() * Test for the disableLanguage() method. * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::disableLanguage() + * * @depends testDisableLanguage */ public function testDisableLanguageThrowsUnauthorizedException() @@ -162,6 +169,7 @@ public function testDisableLanguageThrowsUnauthorizedException() * Test for the deleteLanguage() method. * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::deleteLanguage() + * * @depends testDeleteLanguage */ public function testDeleteLanguageThrowsUnauthorizedException() diff --git a/tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php b/tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php index 4fad195312..418e2360fe 100644 --- a/tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php +++ b/tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Test\Repository\SetupFactory\Legacy as LegacySetupFactory; @@ -12,6 +13,7 @@ * Test case for maximum number of languages supported in the LanguageService. * * @see \Ibexa\Contracts\Core\Repository\LanguageService + * * @group integration * @group language */ @@ -39,7 +41,7 @@ protected function setUp(): void if (\PHP_VERSION_ID < 50400 && PHP_INT_SIZE === 8) { $setupFactory = $this->getSetupFactory(); if ($setupFactory instanceof LegacySetupFactory && $setupFactory->getDB() === 'sqlite') { - $this->markTestSkipped('Skip on Sqlite, PHP 5.3 and 64bit, as int column is limited to 32bit on 64bit'); + self::markTestSkipped('Skip on Sqlite, PHP 5.3 and 64bit, as int column is limited to 32bit on 64bit'); } } diff --git a/tests/integration/Core/Repository/LanguageServiceTest.php b/tests/integration/Core/Repository/LanguageServiceTest.php index a0698f4682..82d74732c3 100644 --- a/tests/integration/Core/Repository/LanguageServiceTest.php +++ b/tests/integration/Core/Repository/LanguageServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Exception; @@ -16,6 +17,7 @@ * Test case for operations in the LanguageService using in memory storage. * * @covers \Ibexa\Contracts\Core\Repository\LanguageService + * * @group integration * @group language */ @@ -36,7 +38,7 @@ public function testNewLanguageCreateStruct() $languageCreate = $languageService->newLanguageCreateStruct(); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( LanguageCreateStruct::class, $languageCreate ); @@ -57,6 +59,7 @@ public function testNewLanguageCreateStruct() * @return \Ibexa\Contracts\Core\Repository\Values\Content\Language * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::createLanguage + * * @depends testNewLanguageCreateStruct */ public function testCreateLanguage() @@ -74,7 +77,7 @@ public function testCreateLanguage() $language = $languageService->createLanguage($languageCreate); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( Language::class, $language ); @@ -88,11 +91,12 @@ public function testCreateLanguage() * @param \Ibexa\Contracts\Core\Repository\Values\Content\Language $language * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::createLanguage + * * @depends testCreateLanguage */ public function testCreateLanguageSetsIdPropertyOnReturnedLanguage($language) { - $this->assertNotNull($language->id); + self::assertNotNull($language->id); } /** @@ -101,11 +105,12 @@ public function testCreateLanguageSetsIdPropertyOnReturnedLanguage($language) * @param \Ibexa\Contracts\Core\Repository\Values\Content\Language $language * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::createLanguage + * * @depends testCreateLanguage */ public function testCreateLanguageSetsExpectedProperties($language) { - $this->assertEquals( + self::assertEquals( [ true, 'English (New Zealand)', @@ -123,6 +128,7 @@ public function testCreateLanguageSetsExpectedProperties($language) * Test for the createLanguage() method. * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::createLanguage + * * @depends testCreateLanguage */ public function testCreateLanguageThrowsInvalidArgumentException() @@ -153,6 +159,7 @@ public function testCreateLanguageThrowsInvalidArgumentException() * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::loadLanguageById * @covers \Ibexa\Contracts\Core\Repository\LanguageService::loadLanguageListById + * * @depends testCreateLanguage */ public function testLoadLanguageById() @@ -170,16 +177,16 @@ public function testLoadLanguageById() $language = $languageService->loadLanguageById($languageId); - $this->assertInstanceOf( + self::assertInstanceOf( Language::class, $language ); $languages = $languageService->loadLanguageListById([$languageId]); - $this->assertIsIterable($languages); - $this->assertCount(1, $languages); - $this->assertInstanceOf(Language::class, $languages[$languageId]); + self::assertIsIterable($languages); + self::assertCount(1, $languages); + self::assertInstanceOf(Language::class, $languages[$languageId]); } /** @@ -187,6 +194,7 @@ public function testLoadLanguageById() * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::loadLanguageById * @covers \Ibexa\Contracts\Core\Repository\LanguageService::loadLanguageListById + * * @depends testLoadLanguageById */ public function testLoadLanguageByIdThrowsNotFoundException() @@ -199,8 +207,8 @@ public function testLoadLanguageByIdThrowsNotFoundException() $languages = $languageService->loadLanguageListById([$nonExistentLanguageId]); - $this->assertIsIterable($languages); - $this->assertCount(0, $languages); + self::assertIsIterable($languages); + self::assertCount(0, $languages); $this->expectException(NotFoundException::class); @@ -212,6 +220,7 @@ public function testLoadLanguageByIdThrowsNotFoundException() * Test for the updateLanguageName() method. * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::updateLanguageName + * * @depends testLoadLanguageById */ public function testUpdateLanguageName() @@ -237,7 +246,7 @@ public function testUpdateLanguageName() /* END: Use Case */ // Verify that the service returns an updated language instance. - $this->assertInstanceOf( + self::assertInstanceOf( Language::class, $updatedLanguage ); @@ -276,6 +285,7 @@ public function testUpdateLanguageNameThrowsInvalidArgumentException() * Test for the enableLanguage() method. * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::enableLanguage + * * @depends testLoadLanguageById */ public function testEnableLanguage() @@ -298,13 +308,14 @@ public function testEnableLanguage() $enabledLanguage = $languageService->loadLanguageById($language->id); /* END: Use Case */ - $this->assertTrue($enabledLanguage->enabled); + self::assertTrue($enabledLanguage->enabled); } /** * Test for the disableLanguage() method. * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::disableLanguage + * * @depends testLoadLanguageById */ public function testDisableLanguage() @@ -327,7 +338,7 @@ public function testDisableLanguage() $enabledLanguage = $languageService->loadLanguageById($language->id); /* END: Use Case */ - $this->assertFalse($enabledLanguage->enabled); + self::assertFalse($enabledLanguage->enabled); } /** @@ -335,6 +346,7 @@ public function testDisableLanguage() * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::loadLanguage * @covers \Ibexa\Contracts\Core\Repository\LanguageService::loadLanguageListByCode + * * @depends testCreateLanguage */ public function testLoadLanguage() @@ -367,8 +379,8 @@ public function testLoadLanguage() $languages = $languageService->loadLanguageListByCode(['eng-NZ']); - $this->assertIsIterable($languages); - $this->assertCount(1, $languages); + self::assertIsIterable($languages); + self::assertCount(1, $languages); $this->assertPropertiesCorrect( [ @@ -386,6 +398,7 @@ public function testLoadLanguage() * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::loadLanguage * @covers \Ibexa\Contracts\Core\Repository\LanguageService::loadLanguageListByCode + * * @depends testLoadLanguage */ public function testLoadLanguageThrowsNotFoundException() @@ -396,8 +409,8 @@ public function testLoadLanguageThrowsNotFoundException() $languages = $languageService->loadLanguageListByCode(['fre-FR']); - $this->assertIsIterable($languages); - $this->assertCount(0, $languages); + self::assertIsIterable($languages); + self::assertCount(0, $languages); $this->expectException(NotFoundException::class); @@ -423,6 +436,7 @@ public function testLoadLanguageThrowsInvalidArgumentException() * Test for the loadLanguages() method. * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::loadLanguages + * * @depends testCreateLanguage * @depends testLoadLanguage */ @@ -461,13 +475,14 @@ public function testLoadLanguages() /* END: Use Case */ // eng-US, eng-GB, ger-DE + 2 newly created - $this->assertCount(5, $languages); + self::assertCount(5, $languages); } /** * Test for the loadLanguages() method. * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::loadLanguages + * * @depends testCreateLanguage */ public function loadLanguagesReturnsAnEmptyArrayByDefault() @@ -476,13 +491,14 @@ public function loadLanguagesReturnsAnEmptyArrayByDefault() $languageService = $repository->getContentLanguageService(); - $this->assertSame([], $languageService->loadLanguages()); + self::assertSame([], $languageService->loadLanguages()); } /** * Test for the deleteLanguage() method. * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::deleteLanguage + * * @depends testLoadLanguages */ public function testDeleteLanguage() @@ -507,7 +523,7 @@ public function testDeleteLanguage() /* END: Use Case */ // +1 -1 - $this->assertEquals($beforeCount, count($languageService->loadLanguages())); + self::assertEquals($beforeCount, count($languageService->loadLanguages())); $this->expectException(NotFoundException::class); $this->expectExceptionMessage('Could not find \'Language\' with identifier \'eng-NZ\''); @@ -525,6 +541,7 @@ public function testDeleteLanguage() * we cannot declare them here. * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::deleteLanguage + * * @depends testDeleteLanguage */ public function testDeleteLanguageThrowsInvalidArgumentException() @@ -576,7 +593,7 @@ public function testGetDefaultLanguageCode() $repository = $this->getRepository(); $languageService = $repository->getContentLanguageService(); - $this->assertRegExp( + self::assertRegExp( '(^[a-z]{3}\-[A-Z]{2}$)', $languageService->getDefaultLanguageCode() ); @@ -586,6 +603,7 @@ public function testGetDefaultLanguageCode() * Test for the createLanguage() method. * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::createLanguage + * * @depends testCreateLanguage */ public function testCreateLanguageInTransactionWithRollback() @@ -624,13 +642,14 @@ public function testCreateLanguageInTransactionWithRollback() } /* END: Use Case */ - $this->assertTrue(isset($e), 'Can still load language after rollback'); + self::assertTrue(isset($e), 'Can still load language after rollback'); } /** * Test for the createLanguage() method. * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::createLanguage + * * @depends testCreateLanguage */ public function testCreateLanguageInTransactionWithCommit() @@ -665,13 +684,14 @@ public function testCreateLanguageInTransactionWithCommit() $language = $languageService->loadLanguage('eng-NZ'); /* END: Use Case */ - $this->assertEquals('eng-NZ', $language->languageCode); + self::assertEquals('eng-NZ', $language->languageCode); } /** * Test for the updateLanguageName() method. * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::updateLanguageName + * * @depends testUpdateLanguageName */ public function testUpdateLanguageNameInTransactionWithRollback() @@ -703,13 +723,14 @@ public function testUpdateLanguageNameInTransactionWithRollback() $updatedLanguage = $languageService->loadLanguage('eng-US'); /* END: Use Case */ - $this->assertEquals('English (American)', $updatedLanguage->name); + self::assertEquals('English (American)', $updatedLanguage->name); } /** * Test for the updateLanguageName() method. * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::updateLanguageName + * * @depends testUpdateLanguageName */ public function testUpdateLanguageNameInTransactionWithCommit() @@ -741,7 +762,7 @@ public function testUpdateLanguageNameInTransactionWithCommit() $updatedLanguage = $languageService->loadLanguage('eng-US'); /* END: Use Case */ - $this->assertEquals('My English', $updatedLanguage->name); + self::assertEquals('My English', $updatedLanguage->name); } } diff --git a/tests/integration/Core/Repository/LocationServiceAuthorizationTest.php b/tests/integration/Core/Repository/LocationServiceAuthorizationTest.php index f6d49e9257..c503f98966 100644 --- a/tests/integration/Core/Repository/LocationServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/LocationServiceAuthorizationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -16,7 +17,9 @@ * Test case for operations in the LocationService using in memory storage. * * @covers \Ibexa\Contracts\Core\Repository\LocationService + * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser + * * @group integration * @group authorization */ @@ -26,6 +29,7 @@ class LocationServiceAuthorizationTest extends BaseTest * Test for the createLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::createLocation() + * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testCreateLocation */ public function testCreateLocationThrowsUnauthorizedException() @@ -68,6 +72,7 @@ public function testCreateLocationThrowsUnauthorizedException() * Test for the createLocation() method. Tests a case when user doesn't have content/manage_locations policy for the new location ID. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::createLocation() + * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testCreateLocation */ public function testCreateLocationThrowsUnauthorizedExceptionDueToLackOfContentManageLocationsPolicy() @@ -128,6 +133,7 @@ public function testCreateLocationThrowsUnauthorizedExceptionDueToLackOfContentM * Test for the loadLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocation() + * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testLoadLocation */ public function testLoadLocationThrowsUnauthorizedException() @@ -177,6 +183,7 @@ public function testLoadLocationListFiltersUnauthorizedLocations(): void * Test for the loadLocationByRemoteId() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocationByRemoteId() + * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testLoadLocationByRemoteId */ public function testLoadLocationByRemoteIdThrowsUnauthorizedException() @@ -206,6 +213,7 @@ public function testLoadLocationByRemoteIdThrowsUnauthorizedException() * Test for the loadLocations() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocations() + * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testLoadLocations */ public function testLoadLocationsNoAccess() @@ -218,8 +226,8 @@ public function testLoadLocationsNoAccess() // this should return one location for admin $locations = $locationService->loadLocations($editorGroupContentInfo); - $this->assertCount(1, $locations); - $this->assertInstanceOf(Location::class, $locations[0]); + self::assertCount(1, $locations); + self::assertInstanceOf(Location::class, $locations[0]); $user = $this->createUserVersion1(); @@ -228,13 +236,14 @@ public function testLoadLocationsNoAccess() // This should return empty array given current user does not have read access $locations = $locationService->loadLocations($editorGroupContentInfo); - $this->assertEmpty($locations); + self::assertEmpty($locations); } /** * Test for the updateLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::updateLocation() + * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testUpdateLocation */ public function testUpdateLocationThrowsUnauthorizedException() @@ -274,6 +283,7 @@ public function testUpdateLocationThrowsUnauthorizedException() * Test for the swapLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::swapLocation() + * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testSwapLocation */ public function testSwapLocationThrowsUnauthorizedException() @@ -315,6 +325,7 @@ public function testSwapLocationThrowsUnauthorizedException() * Test for the hideLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::hideLocation() + * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testHideLocation */ public function testHideLocationThrowsUnauthorizedException() @@ -345,6 +356,7 @@ public function testHideLocationThrowsUnauthorizedException() * Test for the unhideLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::unhideLocation() + * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testUnhideLocation */ public function testUnhideLocationThrowsUnauthorizedException() @@ -378,6 +390,7 @@ public function testUnhideLocationThrowsUnauthorizedException() * Test for the deleteLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::deleteLocation() + * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testDeleteLocation */ public function testDeleteLocationThrowsUnauthorizedException() @@ -441,6 +454,7 @@ public function testDeleteLocationThrowsUnauthorizedExceptionWithLanguageLimitat * Test for the deleteLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::deleteLocation() + * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testDeleteLocation */ public function testDeleteLocationWithSubtreeThrowsUnauthorizedException() @@ -539,6 +553,7 @@ public function testDeleteLocationWithSubtreeThrowsUnauthorizedException() * Test for the copySubtree() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::copySubtree() + * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testCopySubtree */ public function testCopySubtreeThrowsUnauthorizedException() @@ -583,6 +598,7 @@ public function testCopySubtreeThrowsUnauthorizedException() * Test for the moveSubtree() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::moveSubtree() + * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testMoveSubtree */ public function testMoveSubtreeThrowsUnauthorizedException() diff --git a/tests/integration/Core/Repository/LocationServiceTest.php b/tests/integration/Core/Repository/LocationServiceTest.php index 350347bda4..709eef3a7d 100644 --- a/tests/integration/Core/Repository/LocationServiceTest.php +++ b/tests/integration/Core/Repository/LocationServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Exception; @@ -29,6 +30,7 @@ * Test case for operations in the LocationService using in memory storage. * * @covers \Ibexa\Contracts\Core\Repository\LocationService + * * @group location */ class LocationServiceTest extends BaseTest @@ -54,7 +56,7 @@ public function testNewLocationCreateStruct() ); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( LocationCreateStruct::class, $locationCreate ); @@ -68,6 +70,7 @@ public function testNewLocationCreateStruct() * @param \Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct $locationCreate * * @covers \Ibexa\Contracts\Core\Repository\LocationService::newLocationCreateStruct() + * * @depends testNewLocationCreateStruct */ public function testNewLocationCreateStructValues(LocationCreateStruct $locationCreate) @@ -90,6 +93,7 @@ public function testNewLocationCreateStructValues(LocationCreateStruct $location * Test for the createLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::createLocation() + * * @depends testNewLocationCreateStruct */ public function testCreateLocation() @@ -120,7 +124,7 @@ public function testCreateLocation() ); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( Location::class, $location ); @@ -137,6 +141,7 @@ public function testCreateLocation() * Test for the createLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::createLocation + * * @depends testCreateLocation * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testHideContent */ @@ -207,14 +212,15 @@ public function testCreateLocationWithContentTypeSortingOptions(): void $locationCreate ); - $this->assertEquals($contentType->defaultSortField, $location->sortField); - $this->assertEquals($contentType->defaultSortOrder, $location->sortOrder); + self::assertEquals($contentType->defaultSortField, $location->sortField); + self::assertEquals($contentType->defaultSortOrder, $location->sortOrder); } /** * Test for the createLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::createLocation() + * * @depends testCreateLocation */ public function testCreateLocationStructValues(array $data) @@ -239,13 +245,14 @@ public function testCreateLocationStructValues(array $data) $createdLocation ); - $this->assertNotNull($createdLocation->id); + self::assertNotNull($createdLocation->id); } /** * Test for the createLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::createLocation() + * * @depends testNewLocationCreateStruct */ public function testCreateLocationThrowsInvalidArgumentExceptionContentAlreadyBelowParent() @@ -280,6 +287,7 @@ public function testCreateLocationThrowsInvalidArgumentExceptionContentAlreadyBe * Test for the createLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::createLocation() + * * @depends testNewLocationCreateStruct */ public function testCreateLocationThrowsInvalidArgumentExceptionParentIsSubLocationOfContent() @@ -314,6 +322,7 @@ public function testCreateLocationThrowsInvalidArgumentExceptionParentIsSubLocat * Test for the createLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::createLocation() + * * @depends testNewLocationCreateStruct */ public function testCreateLocationThrowsInvalidArgumentExceptionRemoteIdExists() @@ -348,7 +357,9 @@ public function testCreateLocationThrowsInvalidArgumentExceptionRemoteIdExists() * Test for the createLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::createLocation() + * * @depends testNewLocationCreateStruct + * * @dataProvider dataProviderForOutOfRangeLocationPriority */ public function testCreateLocationThrowsInvalidArgumentExceptionPriorityIsOutOfRange($priority) @@ -392,6 +403,7 @@ public function dataProviderForOutOfRangeLocationPriority() * Test for the createLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::createLocation() + * * @depends testCreateLocation */ public function testCreateLocationInTransactionWithRollback() @@ -435,7 +447,7 @@ public function testCreateLocationInTransactionWithRollback() } /* END: Use Case */ - $this->fail('Objects still exists after rollback.'); + self::fail('Objects still exists after rollback.'); } /** @@ -444,6 +456,7 @@ public function testCreateLocationInTransactionWithRollback() * @return \Ibexa\Contracts\Core\Repository\Values\Content\Location * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocation + * * @depends testCreateLocation */ public function testLoadLocation() @@ -458,7 +471,7 @@ public function testLoadLocation() $location = $locationService->loadLocation($locationId); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( Location::class, $location ); @@ -471,6 +484,7 @@ public function testLoadLocation() * Test for the loadLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocation() + * * @depends testLoadLocation */ public function testLoadLocationRootStructValues() @@ -504,7 +518,7 @@ private function assertRootLocationStructValues(Location $location): void $legacyDateTime = new \DateTime(); $legacyDateTime->setTimestamp(1030968000); - $this->assertInstanceOf(Location::class, $location); + self::assertInstanceOf(Location::class, $location); $this->assertPropertiesCorrect( [ 'id' => $this->generateId('location', 1), @@ -522,7 +536,7 @@ private function assertRootLocationStructValues(Location $location): void $location ); - $this->assertInstanceOf(ContentInfo::class, $location->contentInfo); + self::assertInstanceOf(ContentInfo::class, $location->contentInfo); $this->assertPropertiesCorrect( [ 'id' => $this->generateId('content', 0), @@ -549,6 +563,7 @@ private function assertRootLocationStructValues(Location $location): void * @param \Ibexa\Contracts\Core\Repository\Values\Content\Location $location * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocation() + * * @depends testLoadLocation */ public function testLoadLocationStructValues(Location $location) @@ -569,18 +584,18 @@ public function testLoadLocationStructValues(Location $location) $location ); - $this->assertInstanceOf(ContentInfo::class, $location->contentInfo); - $this->assertEquals($this->generateId('object', 4), $location->contentInfo->id); + self::assertInstanceOf(ContentInfo::class, $location->contentInfo); + self::assertEquals($this->generateId('object', 4), $location->contentInfo->id); - $this->assertInstanceOf(Location::class, $location->getParentLocation()); - $this->assertEquals($this->generateId('location', 1), $location->getParentLocation()->id); + self::assertInstanceOf(Location::class, $location->getParentLocation()); + self::assertEquals($this->generateId('location', 1), $location->getParentLocation()->id); // Check lazy loaded proxy on ->content - $this->assertInstanceOf( + self::assertInstanceOf( Content::class, $content = $location->getContent() ); - $this->assertEquals(4, $content->contentInfo->id); + self::assertEquals(4, $content->contentInfo->id); } public function testLoadLocationPrioritizedLanguagesFallback() @@ -604,19 +619,19 @@ public function testLoadLocationPrioritizedLanguagesFallback() // Load with priority language (fallback will be the old one) $location = $locationService->loadLocation(5, ['nor-NO']); - $this->assertInstanceOf( + self::assertInstanceOf( Location::class, $location ); self::assertEquals(5, $location->id); - $this->assertInstanceOf( + self::assertInstanceOf( Content::class, $content = $location->getContent() ); - $this->assertEquals(4, $content->contentInfo->id); + self::assertEquals(4, $content->contentInfo->id); - $this->assertEquals($content->getVersionInfo()->getName(), 'Brukere'); - $this->assertEquals($content->getVersionInfo()->getName('eng-US'), 'Users'); + self::assertEquals($content->getVersionInfo()->getName(), 'Brukere'); + self::assertEquals($content->getVersionInfo()->getName('eng-US'), 'Users'); } /** @@ -641,6 +656,7 @@ public function testLoadLocationThrowsNotFoundExceptionForNotAvailableContent(): * Test for the loadLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocation() + * * @depends testCreateLocation */ public function testLoadLocationThrowsNotFoundException() @@ -683,6 +699,7 @@ public function testLoadLocationList(): void * Test for the loadLocationList() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocationList + * * @depends testLoadLocationList */ public function testLoadLocationListPrioritizedLanguagesFallback(): void @@ -703,6 +720,7 @@ public function testLoadLocationListPrioritizedLanguagesFallback(): void * Test for the loadLocationList() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocationList + * * @depends testLoadLocationListPrioritizedLanguagesFallback */ public function testLoadLocationListPrioritizedLanguagesFallbackAndAlwaysAvailable(): void @@ -770,6 +788,7 @@ public function testLoadLocationListInCorrectOrder() * Test for the loadLocationByRemoteId() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocationByRemoteId() + * * @depends testLoadLocation */ public function testLoadLocationByRemoteId() @@ -784,7 +803,7 @@ public function testLoadLocationByRemoteId() ); /* END: Use Case */ - $this->assertEquals( + self::assertEquals( $locationService->loadLocation($this->generateId('location', 5)), $location ); @@ -794,6 +813,7 @@ public function testLoadLocationByRemoteId() * Test for the loadLocationByRemoteId() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocationByRemoteId() + * * @depends testLoadLocation */ public function testLoadLocationByRemoteIdThrowsNotFoundException() @@ -816,6 +836,7 @@ public function testLoadLocationByRemoteIdThrowsNotFoundException() * Test for the loadLocations() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocations() + * * @depends testCreateLocation */ public function testLoadLocations() @@ -833,7 +854,7 @@ public function testLoadLocations() $locations = $locationService->loadLocations($contentInfo); /* END: Use Case */ - $this->assertIsArray($locations); + self::assertIsArray($locations); self::assertNotEmpty($locations); foreach ($locations as $location) { @@ -848,11 +869,12 @@ public function testLoadLocations() * Test for the loadLocations() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocations() + * * @depends testLoadLocations */ public function testLoadLocationsContent(array $locations) { - $this->assertCount(1, $locations); + self::assertCount(1, $locations); foreach ($locations as $loadedLocation) { self::assertInstanceOf(Location::class, $loadedLocation); } @@ -864,7 +886,7 @@ static function ($a, $b) { } ); - $this->assertEquals( + self::assertEquals( [$this->generateId('location', 5)], array_map( static function (Location $location) { @@ -881,6 +903,7 @@ static function (Location $location) { * @return \Ibexa\Contracts\Core\Repository\Values\Content\Location[] * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocations($contentInfo, $rootLocation) + * * @depends testLoadLocations */ public function testLoadLocationsLimitedSubtree() @@ -917,7 +940,7 @@ public function testLoadLocationsLimitedSubtree() ); /* END: Use Case */ - $this->assertIsArray($locations); + self::assertIsArray($locations); return $locations; } @@ -928,13 +951,14 @@ public function testLoadLocationsLimitedSubtree() * @param \Ibexa\Contracts\Core\Repository\Values\Content\Location[] $locations * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocations() + * * @depends testLoadLocationsLimitedSubtree */ public function testLoadLocationsLimitedSubtreeContent(array $locations) { - $this->assertCount(1, $locations); + self::assertCount(1, $locations); - $this->assertEquals( + self::assertEquals( $this->generateId('location', 54), reset($locations)->id ); @@ -944,6 +968,7 @@ public function testLoadLocationsLimitedSubtreeContent(array $locations) * Test for the loadLocations() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocations() + * * @depends testLoadLocations */ public function testLoadLocationsThrowsBadStateException() @@ -974,6 +999,7 @@ public function testLoadLocationsThrowsBadStateException() * Test for the loadLocations() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocations($contentInfo, $rootLocation) + * * @depends testLoadLocations */ public function testLoadLocationsThrowsBadStateExceptionLimitedSubtree() @@ -1009,6 +1035,7 @@ public function testLoadLocationsThrowsBadStateExceptionLimitedSubtree() * Test for the loadLocationChildren() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocationChildren + * * @depends testLoadLocation */ public function testLoadLocationChildren() @@ -1025,14 +1052,14 @@ public function testLoadLocationChildren() $childLocations = $locationService->loadLocationChildren($location); /* END: Use Case */ - $this->assertInstanceOf(LocationList::class, $childLocations); - $this->assertIsArray($childLocations->locations); - $this->assertNotEmpty($childLocations->locations); - $this->assertIsInt($childLocations->totalCount); + self::assertInstanceOf(LocationList::class, $childLocations); + self::assertIsArray($childLocations->locations); + self::assertNotEmpty($childLocations->locations); + self::assertIsInt($childLocations->totalCount); foreach ($childLocations->locations as $childLocation) { - $this->assertInstanceOf(Location::class, $childLocation); - $this->assertEquals($location->id, $childLocation->parentLocationId); + self::assertInstanceOf(Location::class, $childLocation); + self::assertEquals($location->id, $childLocation->parentLocationId); } return $childLocations; @@ -1099,6 +1126,7 @@ public function testLoadParentLocationsForDraftContentThrowsBadStateException(Co * Test for the getLocationChildCount() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::getLocationChildCount() + * * @depends testLoadLocation */ public function testGetLocationChildCount() @@ -1106,7 +1134,7 @@ public function testGetLocationChildCount() // $locationId is the ID of an existing location $locationService = $this->getRepository()->getLocationService(); - $this->assertSame( + self::assertSame( 5, $locationService->getLocationChildCount( $locationService->loadLocation($this->generateId('location', 5)) @@ -1118,21 +1146,22 @@ public function testGetLocationChildCount() * Test for the loadLocationChildren() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocationChildren() + * * @depends testLoadLocationChildren */ public function testLoadLocationChildrenData(LocationList $locations) { - $this->assertCount(5, $locations->locations); - $this->assertEquals(5, $locations->getTotalCount()); + self::assertCount(5, $locations->locations); + self::assertEquals(5, $locations->getTotalCount()); foreach ($locations->locations as $location) { - $this->assertInstanceOf( + self::assertInstanceOf( Location::class, $location ); } - $this->assertEquals( + self::assertEquals( [ $this->generateId('location', 12), $this->generateId('location', 13), @@ -1217,8 +1246,8 @@ public function testLoadLocationChildrenWithOffsetAndLimit(): LocationList $childLocations = $locationService->loadLocationChildren($location, 2, 2); - $this->assertIsArray($childLocations->locations); - $this->assertIsInt($childLocations->totalCount); + self::assertIsArray($childLocations->locations); + self::assertIsInt($childLocations->totalCount); return $childLocations; } @@ -1230,8 +1259,8 @@ public function testLoadLocationChildrenWithOffsetAndLimit(): LocationList */ public function testLoadLocationChildrenDataWithOffsetAndLimit(LocationList $locations): void { - $this->assertCount(2, $locations->locations); - $this->assertEquals(5, $locations->getTotalCount()); + self::assertCount(2, $locations->locations); + self::assertEquals(5, $locations->getTotalCount()); $actualLocationIds = []; foreach ($locations->locations as $location) { @@ -1239,7 +1268,7 @@ public function testLoadLocationChildrenDataWithOffsetAndLimit(LocationList $loc $actualLocationIds[] = $location->id; } - $this->assertEquals( + self::assertEquals( [ $this->generateId('location', 14), $this->generateId('location', 44), @@ -1393,7 +1422,7 @@ public function testNewLocationUpdateStruct() $updateStruct = $locationService->newLocationUpdateStruct(); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( LocationUpdateStruct::class, $updateStruct ); @@ -1413,6 +1442,7 @@ public function testNewLocationUpdateStruct() * Test for the updateLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::updateLocation() + * * @depends testLoadLocation */ public function testUpdateLocation() @@ -1435,7 +1465,7 @@ public function testUpdateLocation() $updatedLocation = $locationService->updateLocation($originalLocation, $updateStruct); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( Location::class, $updatedLocation ); @@ -1451,6 +1481,7 @@ public function testUpdateLocation() * Test for the updateLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::updateLocation() + * * @depends testUpdateLocation */ public function testUpdateLocationStructValues(array $data) @@ -1481,6 +1512,7 @@ public function testUpdateLocationStructValues(array $data) * Test for the updateLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::updateLocation() + * * @depends testLoadLocation */ public function testUpdateLocationWithSameRemoteId() @@ -1505,10 +1537,10 @@ public function testUpdateLocationWithSameRemoteId() $location = $locationService->updateLocation($originalLocation, $updateStruct); // Checks that the location was updated - $this->assertEquals(2, $location->priority); + self::assertEquals(2, $location->priority); // Checks that remoteId remains the same - $this->assertEquals($originalLocation->remoteId, $location->remoteId); + self::assertEquals($originalLocation->remoteId, $location->remoteId); /* END: Use Case */ } @@ -1516,6 +1548,7 @@ public function testUpdateLocationWithSameRemoteId() * Test for the updateLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::updateLocation() + * * @depends testLoadLocation */ public function testUpdateLocationThrowsInvalidArgumentException() @@ -1545,7 +1578,9 @@ public function testUpdateLocationThrowsInvalidArgumentException() * Test for the updateLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::updateLocation() + * * @depends testLoadLocation + * * @dataProvider dataProviderForOutOfRangeLocationPriority */ public function testUpdateLocationThrowsInvalidArgumentExceptionPriorityIsOutOfRange($priority) @@ -1576,6 +1611,7 @@ public function testUpdateLocationThrowsInvalidArgumentExceptionPriorityIsOutOfR * Ref EZP-23302: Update Location fails if no change is performed with the update. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::updateLocation() + * * @depends testLoadLocation */ public function testUpdateLocationTwice() @@ -1599,14 +1635,15 @@ public function testUpdateLocationTwice() $secondUpdatedLocation = $locationService->updateLocation($updatedLocation, $updateStruct); /* END: Use Case */ - $this->assertEquals($updatedLocation->priority, 42); - $this->assertEquals($secondUpdatedLocation->priority, 42); + self::assertEquals($updatedLocation->priority, 42); + self::assertEquals($secondUpdatedLocation->priority, 42); } /** * Test for the swapLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::swapLocation() + * * @depends testLoadLocation */ public function testSwapLocation() @@ -1642,21 +1679,21 @@ public function testSwapLocation() $mediaLocation = $locationService->loadLocation($demoDesignLocationId); // Assert Location's Content is updated - $this->assertEquals( + self::assertEquals( $mediaContentInfo->id, $mediaLocation->getContentInfo()->id ); - $this->assertEquals( + self::assertEquals( $demoDesignContentInfo->id, $demoDesignLocation->getContentInfo()->id ); // Assert URL aliases are updated - $this->assertEquals( + self::assertEquals( $mediaLocation->id, $repository->getURLAliasService()->lookup('/Design/Media')->destination ); - $this->assertEquals( + self::assertEquals( $demoDesignLocation->id, $repository->getURLAliasService()->lookup('/Ibexa-Demo-Design-without-demo-content')->destination ); @@ -1988,14 +2025,15 @@ public function testBookmarksAreSwappedAfterSwapLocation() $afterSwap = $bookmarkService->loadBookmarks(); /* END: Use Case */ - $this->assertEquals($beforeSwap->items[0]->id, $afterSwap->items[1]->id); - $this->assertEquals($beforeSwap->items[1]->id, $afterSwap->items[0]->id); + self::assertEquals($beforeSwap->items[0]->id, $afterSwap->items[1]->id); + self::assertEquals($beforeSwap->items[1]->id, $afterSwap->items[0]->id); } /** * Test for the hideLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::hideLocation() + * * @depends testLoadLocation */ public function testHideLocation() @@ -2012,12 +2050,12 @@ public function testHideLocation() $hiddenLocation = $locationService->hideLocation($visibleLocation); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( Location::class, $hiddenLocation ); - $this->assertTrue( + self::assertTrue( $hiddenLocation->hidden, sprintf( 'Location with ID "%s" is not hidden.', @@ -2051,7 +2089,7 @@ protected function assertSubtreeProperties(array $expectedValues, Location $loca } foreach ($expectedValues as $propertyName => $propertyValue) { - $this->assertEquals( + self::assertEquals( $propertyValue, $location->$propertyName ); @@ -2066,6 +2104,7 @@ protected function assertSubtreeProperties(array $expectedValues, Location $loca * Test for the unhideLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::unhideLocation() + * * @depends testHideLocation */ public function testUnhideLocation() @@ -2083,12 +2122,12 @@ public function testUnhideLocation() $unHiddenLocation = $locationService->unhideLocation($hiddenLocation); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( Location::class, $unHiddenLocation ); - $this->assertFalse( + self::assertFalse( $unHiddenLocation->hidden, sprintf( 'Location with ID "%s" is hidden.', @@ -2110,6 +2149,7 @@ public function testUnhideLocation() * Test for the unhideLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::unhideLocation() + * * @depends testUnhideLocation */ public function testUnhideLocationNotUnhidesHiddenSubtree() @@ -2132,12 +2172,12 @@ public function testUnhideLocationNotUnhidesHiddenSubtree() $unHiddenHigherLocation = $locationService->unhideLocation($hiddenHigherLocation); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( Location::class, $unHiddenHigherLocation ); - $this->assertFalse( + self::assertFalse( $unHiddenHigherLocation->hidden, sprintf( 'Location with ID "%s" is hidden.', @@ -2156,7 +2196,7 @@ public function testUnhideLocationNotUnhidesHiddenSubtree() } $stillHiddenLocation = $locationService->loadLocation($this->generateId('location', 13)); - $this->assertTrue( + self::assertTrue( $stillHiddenLocation->hidden, sprintf( 'Hidden sub-location with ID %s unhidden unexpectedly.', @@ -2175,6 +2215,7 @@ public function testUnhideLocationNotUnhidesHiddenSubtree() * Test for the deleteLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::deleteLocation() + * * @depends testLoadLocation */ public function testDeleteLocation() @@ -2194,7 +2235,7 @@ public function testDeleteLocation() try { $locationService->loadLocation($mediaLocationId); - $this->fail("Location $mediaLocationId not deleted."); + self::fail("Location $mediaLocationId not deleted."); } catch (NotFoundException $e) { } @@ -2203,7 +2244,7 @@ public function testDeleteLocation() foreach ([51, 52, 53] as $childLocationId) { try { $locationService->loadLocation($this->generateId('location', $childLocationId)); - $this->fail("Location $childLocationId not deleted."); + self::fail("Location $childLocationId not deleted."); } catch (NotFoundException $e) { } } @@ -2214,7 +2255,7 @@ public function testDeleteLocation() foreach ([49, 50, 51] as $childContentId) { try { $contentService->loadContentInfo($this->generateId('object', $childContentId)); - $this->fail("Content $childContentId not deleted."); + self::fail("Content $childContentId not deleted."); } catch (NotFoundException $e) { } } @@ -2224,6 +2265,7 @@ public function testDeleteLocation() * Test for the deleteLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::deleteLocation() + * * @depends testDeleteLocation */ public function testDeleteLocationDecrementsChildCountOnParent() @@ -2262,7 +2304,7 @@ public function testDeleteLocationDecrementsChildCountOnParent() $childCountAfter = $locationService->getLocationChildCount($parentLocation); /* END: Use Case */ - $this->assertEquals($childCountBefore - 1, $childCountAfter); + self::assertEquals($childCountBefore - 1, $childCountAfter); } /** @@ -2315,6 +2357,7 @@ public function testDeleteContentObjectLastLocation() * Test for the deleteLocation() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::deleteLocation + * * @depends testDeleteLocation */ public function testDeleteLocationDeletesRelatedBookmarks() @@ -2340,7 +2383,7 @@ public function testDeleteLocationDeletesRelatedBookmarks() // Location isn't bookmarked anymore foreach ($bookmarkService->loadBookmarks(0, 9999) as $bookmarkedLocation) { - $this->assertNotEquals($childLocation->id, $bookmarkedLocation->id); + self::assertNotEquals($childLocation->id, $bookmarkedLocation->id); } } @@ -2416,6 +2459,7 @@ public function testDeleteUnusedLocationWhichPreviousHadContentWithRelativeAlias * Test for the copySubtree() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::copySubtree() + * * @depends testLoadLocation */ public function testCopySubtree() @@ -2447,7 +2491,7 @@ public function testCopySubtree() ); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( Location::class, $copiedLocation ); @@ -2468,6 +2512,7 @@ public function testCopySubtree() * Test for the copySubtree() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::copySubtree() + * * @depends testLoadLocation */ public function testCopySubtreeWithAliases() @@ -2576,7 +2621,7 @@ private function assertDefaultContentStates(ContentInfo $contentInfo) $contentState = $objectStateService->getContentState($contentInfo, $objectStateGroup); foreach ($objectStateService->loadObjectStates($objectStateGroup, Language::ALL) as $objectState) { // Only check the first object state which is the default one. - $this->assertEquals( + self::assertEquals( $objectState, $contentState ); @@ -2589,6 +2634,7 @@ private function assertDefaultContentStates(ContentInfo $contentInfo) * Test for the copySubtree() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::copySubtree() + * * @depends testCopySubtree */ public function testCopySubtreeUpdatesSubtreeProperties() @@ -2636,15 +2682,15 @@ public function testCopySubtreeUpdatesSubtreeProperties() // Load Subtree properties after copy $actual = $this->loadSubtreeProperties($copiedLocation); - $this->assertEquals(count($expected), count($actual)); + self::assertEquals(count($expected), count($actual)); foreach ($actual as $properties) { - $this->assertNotContains($properties['id'], $beforeIds); - $this->assertStringStartsWith( + self::assertNotContains($properties['id'], $beforeIds); + self::assertStringStartsWith( $newParentLocation->pathString . $this->parseId('location', $copiedLocation->id) . '/', $properties['pathString'] ); - $this->assertStringEndsWith( + self::assertStringEndsWith( '/' . $this->parseId('location', $properties['id']) . '/', $properties['pathString'] ); @@ -2655,6 +2701,7 @@ public function testCopySubtreeUpdatesSubtreeProperties() * Test for the copySubtree() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::copySubtree() + * * @depends testCopySubtree */ public function testCopySubtreeIncrementsChildCountOfNewParent() @@ -2693,7 +2740,7 @@ public function testCopySubtreeIncrementsChildCountOfNewParent() $childCountAfter = $locationService->getLocationChildCount($locationService->loadLocation($demoDesignLocationId)); - $this->assertEquals($childCountBefore + 1, $childCountAfter); + self::assertEquals($childCountBefore + 1, $childCountAfter); } /** @@ -2743,6 +2790,7 @@ public function testCopySubtreeWithInvisibleChild(): void * Test for the copySubtree() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::copySubtree() + * * @depends testCopySubtree */ public function testCopySubtreeThrowsInvalidArgumentException() @@ -2779,6 +2827,7 @@ public function testCopySubtreeThrowsInvalidArgumentException() * Test for the moveSubtree() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::moveSubtree + * * @depends testLoadLocation */ public function testMoveSubtree(): void @@ -2829,6 +2878,7 @@ public function testMoveSubtree(): void * Test for the moveSubtree() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::moveSubtree + * * @depends testLoadLocation */ public function testMoveSubtreeToLocationWithoutContent(): void @@ -2864,6 +2914,7 @@ public function testMoveSubtreeToLocationWithoutContent(): void * Test for the moveSubtree() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::moveSubtree + * * @depends testLoadLocation */ public function testMoveSubtreeThrowsExceptionOnMoveNotIntoContainer(): void @@ -2897,6 +2948,7 @@ public function testMoveSubtreeThrowsExceptionOnMoveNotIntoContainer(): void * Test for the moveSubtree() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::moveSubtree + * * @depends testLoadLocation */ public function testMoveSubtreeThrowsExceptionOnMoveToSame(): void @@ -2926,6 +2978,7 @@ public function testMoveSubtreeThrowsExceptionOnMoveToSame(): void * Test for the moveSubtree() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::moveSubtree + * * @depends testMoveSubtree */ public function testMoveSubtreeHidden(): void @@ -2979,6 +3032,7 @@ public function testMoveSubtreeHidden(): void * Test for the moveSubtree() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::moveSubtree() + * * @depends testMoveSubtree */ public function testMoveSubtreeUpdatesSubtreeProperties() @@ -3033,13 +3087,14 @@ public function testMoveSubtreeUpdatesSubtreeProperties() // Load Subtree properties after move $actual = $this->loadSubtreeProperties($movedLocation); - $this->assertEquals($expected, $actual); + self::assertEquals($expected, $actual); } /** * Test for the moveSubtree() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::moveSubtree() + * * @depends testMoveSubtreeUpdatesSubtreeProperties */ public function testMoveSubtreeUpdatesSubtreePropertiesHidden() @@ -3098,13 +3153,14 @@ public function testMoveSubtreeUpdatesSubtreePropertiesHidden() // Load Subtree properties after move $actual = $this->loadSubtreeProperties($movedLocation); - $this->assertEquals($expected, $actual); + self::assertEquals($expected, $actual); } /** * Test for the moveSubtree() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::moveSubtree() + * * @depends testMoveSubtree */ public function testMoveSubtreeIncrementsChildCountOfNewParent() @@ -3155,14 +3211,15 @@ public function testMoveSubtreeIncrementsChildCountOfNewParent() $actual = $this->loadLocationProperties($newParentLocation); $childCountAfter = $locationService->getLocationChildCount($newParentLocation); - $this->assertEquals($expected, $actual); - $this->assertEquals($childCountBefore + 1, $childCountAfter); + self::assertEquals($expected, $actual); + self::assertEquals($childCountBefore + 1, $childCountAfter); } /** * Test for the moveSubtree() method. * * @covers \Ibexa\Contracts\Core\Repository\LocationService::moveSubtree() + * * @depends testMoveSubtree */ public function testMoveSubtreeDecrementsChildCountOfOldParent() @@ -3213,8 +3270,8 @@ public function testMoveSubtreeDecrementsChildCountOfOldParent() $actual = $this->loadLocationProperties($oldParentLocation); $childCountAfter = $locationService->getLocationChildCount($oldParentLocation); - $this->assertEquals($expected, $actual); - $this->assertEquals($childCountBefore - 1, $childCountAfter); + self::assertEquals($expected, $actual); + self::assertEquals($childCountBefore - 1, $childCountAfter); } /** @@ -3627,9 +3684,9 @@ private function assertAliasesBeforeCopy($urlAliasService, array $expectedSubIte foreach ($expectedSubItemAliases as $aliasUrl) { try { $urlAliasService->lookup($aliasUrl); - $this->fail('We didn\'t expect to find alias, but it was found'); + self::fail('We didn\'t expect to find alias, but it was found'); } catch (\Exception $e) { - $this->assertTrue(true); // OK - alias was not found + self::assertTrue(true); // OK - alias was not found } } } @@ -3691,7 +3748,7 @@ private function assertAliasExists( $articleAliasesBeforeDelete = $urlAliasService ->listLocationAliases($location); - $this->assertNotEmpty( + self::assertNotEmpty( array_filter( $articleAliasesBeforeDelete, static function (URLAlias $alias) use ($expectedAliasPath) { diff --git a/tests/integration/Core/Repository/NonRedundantFieldSetTest.php b/tests/integration/Core/Repository/NonRedundantFieldSetTest.php index 141ec36a26..502e088a39 100644 --- a/tests/integration/Core/Repository/NonRedundantFieldSetTest.php +++ b/tests/integration/Core/Repository/NonRedundantFieldSetTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\Values\Content\Content; @@ -16,6 +17,7 @@ * These tests depends on TextLine field type being functional. * * @covers \Ibexa\Contracts\Core\Repository\ContentService + * * @group content */ class NonRedundantFieldSetTest extends BaseNonRedundantFieldSetTest @@ -26,6 +28,7 @@ class NonRedundantFieldSetTest extends BaseNonRedundantFieldSetTest * Default values are stored. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCreateContent * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testCreateContentType * @@ -41,7 +44,7 @@ public function testCreateContentDefaultValues() $content = $this->createTestContent($mainLanguageCode, $fieldValues); - $this->assertInstanceOf(Content::class, $content); + self::assertInstanceOf(Content::class, $content); return $content; } @@ -50,21 +53,22 @@ public function testCreateContentDefaultValues() * Test for the createContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends testCreateContentDefaultValues * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ public function testCreateContentDefaultValuesFields(Content $content) { - $this->assertCount(1, $content->versionInfo->languageCodes); - $this->assertContains('eng-US', $content->versionInfo->languageCodes); - $this->assertCount(4, $content->getFields()); + self::assertCount(1, $content->versionInfo->languageCodes); + self::assertContains('eng-US', $content->versionInfo->languageCodes); + self::assertCount(4, $content->getFields()); // eng-US - $this->assertEquals('new value 1', $content->getFieldValue('field1', 'eng-US')); - $this->assertEquals('default value 2', $content->getFieldValue('field2', 'eng-US')); - $this->assertEquals('new value 3', $content->getFieldValue('field3', 'eng-US')); - $this->assertEquals('default value 4', $content->getFieldValue('field4', 'eng-US')); + self::assertEquals('new value 1', $content->getFieldValue('field1', 'eng-US')); + self::assertEquals('default value 2', $content->getFieldValue('field2', 'eng-US')); + self::assertEquals('new value 3', $content->getFieldValue('field3', 'eng-US')); + self::assertEquals('default value 4', $content->getFieldValue('field4', 'eng-US')); } /** @@ -73,6 +77,7 @@ public function testCreateContentDefaultValuesFields(Content $content) * Creating fields with empty values, no values being passed to storage. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCreateContent * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testCreateContentType * @@ -88,7 +93,7 @@ public function testCreateContentEmptyValues() $content = $this->createTestContent($mainLanguageCode, $fieldValues); - $this->assertInstanceOf(Content::class, $content); + self::assertInstanceOf(Content::class, $content); return $content; } @@ -97,6 +102,7 @@ public function testCreateContentEmptyValues() * Test for the createContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends testCreateContentEmptyValues * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content @@ -105,16 +111,16 @@ public function testCreateContentEmptyValuesFields(Content $content) { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); - $this->assertCount(1, $content->versionInfo->languageCodes); - $this->assertContains('eng-US', $content->versionInfo->languageCodes); - $this->assertCount(4, $content->getFields()); + self::assertCount(1, $content->versionInfo->languageCodes); + self::assertContains('eng-US', $content->versionInfo->languageCodes); + self::assertCount(4, $content->getFields()); // eng-US - $this->assertContains('eng-US', $content->versionInfo->languageCodes); - $this->assertEquals($emptyValue, $content->getFieldValue('field1', 'eng-US')); - $this->assertEquals($emptyValue, $content->getFieldValue('field2', 'eng-US')); - $this->assertEquals($emptyValue, $content->getFieldValue('field3', 'eng-US')); - $this->assertEquals($emptyValue, $content->getFieldValue('field4', 'eng-US')); + self::assertContains('eng-US', $content->versionInfo->languageCodes); + self::assertEquals($emptyValue, $content->getFieldValue('field1', 'eng-US')); + self::assertEquals($emptyValue, $content->getFieldValue('field2', 'eng-US')); + self::assertEquals($emptyValue, $content->getFieldValue('field3', 'eng-US')); + self::assertEquals($emptyValue, $content->getFieldValue('field4', 'eng-US')); } /** @@ -124,6 +130,7 @@ public function testCreateContentEmptyValuesFields(Content $content) * Case where additional language is not stored. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCreateContent * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testCreateContentType * @@ -139,7 +146,7 @@ public function testCreateContentEmptyValuesTranslationNotStored() $content = $this->createTestContent($mainLanguageCode, $fieldValues); - $this->assertInstanceOf(Content::class, $content); + self::assertInstanceOf(Content::class, $content); return $content; } @@ -148,6 +155,7 @@ public function testCreateContentEmptyValuesTranslationNotStored() * Test for the createContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends testCreateContentEmptyValuesTranslationNotStored * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content @@ -156,19 +164,19 @@ public function testCreateContentEmptyValuesTranslationNotStoredFields(Content $ { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); - $this->assertCount(1, $content->versionInfo->languageCodes); - $this->assertContains('eng-US', $content->versionInfo->languageCodes); - $this->assertCount(4, $content->getFields()); + self::assertCount(1, $content->versionInfo->languageCodes); + self::assertContains('eng-US', $content->versionInfo->languageCodes); + self::assertCount(4, $content->getFields()); // eng-US - $this->assertContains('eng-US', $content->versionInfo->languageCodes); - $this->assertEquals($emptyValue, $content->getFieldValue('field1', 'eng-US')); - $this->assertEquals($emptyValue, $content->getFieldValue('field2', 'eng-US')); - $this->assertEquals($emptyValue, $content->getFieldValue('field3', 'eng-US')); - $this->assertEquals($emptyValue, $content->getFieldValue('field4', 'eng-US')); + self::assertContains('eng-US', $content->versionInfo->languageCodes); + self::assertEquals($emptyValue, $content->getFieldValue('field1', 'eng-US')); + self::assertEquals($emptyValue, $content->getFieldValue('field2', 'eng-US')); + self::assertEquals($emptyValue, $content->getFieldValue('field3', 'eng-US')); + self::assertEquals($emptyValue, $content->getFieldValue('field4', 'eng-US')); // ger-DE is not stored! - $this->assertNotContains('ger-DE', $content->versionInfo->languageCodes); + self::assertNotContains('ger-DE', $content->versionInfo->languageCodes); } /** @@ -177,6 +185,7 @@ public function testCreateContentEmptyValuesTranslationNotStoredFields(Content $ * Creating with two languages, main language is always stored (even with all values being empty). * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCreateContent * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testCreateContentType * @@ -192,7 +201,7 @@ public function testCreateContentTwoLanguagesMainTranslationStored() $content = $this->createTestContent($mainLanguageCode, $fieldValues); - $this->assertInstanceOf(Content::class, $content); + self::assertInstanceOf(Content::class, $content); return $content; } @@ -201,6 +210,7 @@ public function testCreateContentTwoLanguagesMainTranslationStored() * Test for the createContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends testCreateContentTwoLanguagesMainTranslationStored * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content @@ -209,23 +219,23 @@ public function testCreateContentTwoLanguagesMainTranslationStoredFields(Content { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); - $this->assertCount(2, $content->versionInfo->languageCodes); - $this->assertContains('ger-DE', $content->versionInfo->languageCodes); - $this->assertContains('eng-US', $content->versionInfo->languageCodes); - $this->assertCount(8, $content->getFields()); + self::assertCount(2, $content->versionInfo->languageCodes); + self::assertContains('ger-DE', $content->versionInfo->languageCodes); + self::assertContains('eng-US', $content->versionInfo->languageCodes); + self::assertCount(8, $content->getFields()); // eng-US - $this->assertContains('eng-US', $content->versionInfo->languageCodes); - $this->assertEquals($emptyValue, $content->getFieldValue('field1', 'eng-US')); - $this->assertEquals($emptyValue, $content->getFieldValue('field2', 'eng-US')); - $this->assertEquals($emptyValue, $content->getFieldValue('field3', 'eng-US')); - $this->assertEquals($emptyValue, $content->getFieldValue('field4', 'eng-US')); + self::assertContains('eng-US', $content->versionInfo->languageCodes); + self::assertEquals($emptyValue, $content->getFieldValue('field1', 'eng-US')); + self::assertEquals($emptyValue, $content->getFieldValue('field2', 'eng-US')); + self::assertEquals($emptyValue, $content->getFieldValue('field3', 'eng-US')); + self::assertEquals($emptyValue, $content->getFieldValue('field4', 'eng-US')); // ger-DE - $this->assertEquals($emptyValue, $content->getFieldValue('field1', 'ger-DE')); - $this->assertEquals($emptyValue, $content->getFieldValue('field2', 'ger-DE')); - $this->assertEquals($emptyValue, $content->getFieldValue('field3', 'ger-DE')); - $this->assertEquals('new ger-DE value 4', $content->getFieldValue('field4', 'ger-DE')); + self::assertEquals($emptyValue, $content->getFieldValue('field1', 'ger-DE')); + self::assertEquals($emptyValue, $content->getFieldValue('field2', 'ger-DE')); + self::assertEquals($emptyValue, $content->getFieldValue('field3', 'ger-DE')); + self::assertEquals('new ger-DE value 4', $content->getFieldValue('field4', 'ger-DE')); } /** @@ -235,6 +245,7 @@ public function testCreateContentTwoLanguagesMainTranslationStoredFields(Content * for it being passed to the storage. Second language will not be stored. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCreateContent * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testCreateContentType * @@ -249,7 +260,7 @@ public function testCreateContentTwoLanguagesSecondTranslationNotStored() $content = $this->createTestContent($mainLanguageCode, $fieldValues); - $this->assertInstanceOf(Content::class, $content); + self::assertInstanceOf(Content::class, $content); return $content; } @@ -258,6 +269,7 @@ public function testCreateContentTwoLanguagesSecondTranslationNotStored() * Test for the createContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends testCreateContentTwoLanguagesSecondTranslationNotStored * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content @@ -266,18 +278,18 @@ public function testCreateContentTwoLanguagesSecondTranslationNotStoredFields(Co { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); - $this->assertCount(1, $content->versionInfo->languageCodes); - $this->assertContains('eng-US', $content->versionInfo->languageCodes); - $this->assertCount(4, $content->getFields()); + self::assertCount(1, $content->versionInfo->languageCodes); + self::assertContains('eng-US', $content->versionInfo->languageCodes); + self::assertCount(4, $content->getFields()); // eng-US - $this->assertEquals($emptyValue, $content->getFieldValue('field1', 'eng-US')); - $this->assertEquals('default value 2', $content->getFieldValue('field2', 'eng-US')); - $this->assertEquals($emptyValue, $content->getFieldValue('field3', 'eng-US')); - $this->assertEquals('default value 4', $content->getFieldValue('field4', 'eng-US')); + self::assertEquals($emptyValue, $content->getFieldValue('field1', 'eng-US')); + self::assertEquals('default value 2', $content->getFieldValue('field2', 'eng-US')); + self::assertEquals($emptyValue, $content->getFieldValue('field3', 'eng-US')); + self::assertEquals('default value 4', $content->getFieldValue('field4', 'eng-US')); // ger-DE is not stored! - $this->assertNotContains('ger-DE', $content->versionInfo->languageCodes); + self::assertNotContains('ger-DE', $content->versionInfo->languageCodes); } /** @@ -286,6 +298,7 @@ public function testCreateContentTwoLanguagesSecondTranslationNotStoredFields(Co * Creating with no fields in struct, using only default values. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCreateContent * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testCreateContentType * @@ -298,7 +311,7 @@ public function testCreateContentDefaultValuesNoStructFields() $content = $this->createTestContent($mainLanguageCode, $fieldValues); - $this->assertInstanceOf(Content::class, $content); + self::assertInstanceOf(Content::class, $content); return $content; } @@ -307,6 +320,7 @@ public function testCreateContentDefaultValuesNoStructFields() * Test for the createContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends testCreateContentDefaultValuesNoStructFields * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content @@ -315,15 +329,15 @@ public function testCreateContentDefaultValuesNoStructFieldsFields(Content $cont { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); - $this->assertCount(1, $content->versionInfo->languageCodes); - $this->assertContains('eng-US', $content->versionInfo->languageCodes); - $this->assertCount(4, $content->getFields()); + self::assertCount(1, $content->versionInfo->languageCodes); + self::assertContains('eng-US', $content->versionInfo->languageCodes); + self::assertCount(4, $content->getFields()); // eng-US - $this->assertEquals($emptyValue, $content->getFieldValue('field1', 'eng-US')); - $this->assertEquals('default value 2', $content->getFieldValue('field2', 'eng-US')); - $this->assertEquals($emptyValue, $content->getFieldValue('field3', 'eng-US')); - $this->assertEquals('default value 4', $content->getFieldValue('field4', 'eng-US')); + self::assertEquals($emptyValue, $content->getFieldValue('field1', 'eng-US')); + self::assertEquals('default value 2', $content->getFieldValue('field2', 'eng-US')); + self::assertEquals($emptyValue, $content->getFieldValue('field3', 'eng-US')); + self::assertEquals('default value 4', $content->getFieldValue('field4', 'eng-US')); } /** @@ -332,6 +346,7 @@ public function testCreateContentDefaultValuesNoStructFieldsFields(Content $cont * Creating in two languages with no given field values for main language. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCreateContent * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testCreateContentType * @@ -346,7 +361,7 @@ public function testCreateContentTwoLanguagesNoValuesForMainLanguage() $content = $this->createTestContent($mainLanguageCode, $fieldValues); - $this->assertInstanceOf(Content::class, $content); + self::assertInstanceOf(Content::class, $content); return $content; } @@ -355,6 +370,7 @@ public function testCreateContentTwoLanguagesNoValuesForMainLanguage() * Test for the createContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends testCreateContentTwoLanguagesNoValuesForMainLanguage * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content @@ -363,28 +379,29 @@ public function testCreateContentTwoLanguagesNoValuesForMainLanguageFields(Conte { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); - $this->assertCount(2, $content->versionInfo->languageCodes); - $this->assertContains('ger-DE', $content->versionInfo->languageCodes); - $this->assertContains('eng-US', $content->versionInfo->languageCodes); - $this->assertCount(8, $content->getFields()); + self::assertCount(2, $content->versionInfo->languageCodes); + self::assertContains('ger-DE', $content->versionInfo->languageCodes); + self::assertContains('eng-US', $content->versionInfo->languageCodes); + self::assertCount(8, $content->getFields()); // eng-US - $this->assertEquals($emptyValue, $content->getFieldValue('field1', 'eng-US')); - $this->assertEquals('default value 2', $content->getFieldValue('field2', 'eng-US')); - $this->assertEquals($emptyValue, $content->getFieldValue('field3', 'eng-US')); - $this->assertEquals('default value 4', $content->getFieldValue('field4', 'eng-US')); + self::assertEquals($emptyValue, $content->getFieldValue('field1', 'eng-US')); + self::assertEquals('default value 2', $content->getFieldValue('field2', 'eng-US')); + self::assertEquals($emptyValue, $content->getFieldValue('field3', 'eng-US')); + self::assertEquals('default value 4', $content->getFieldValue('field4', 'eng-US')); // ger-DE - $this->assertEquals($emptyValue, $content->getFieldValue('field1', 'ger-DE')); - $this->assertEquals('default value 2', $content->getFieldValue('field2', 'ger-DE')); - $this->assertEquals($emptyValue, $content->getFieldValue('field3', 'ger-DE')); - $this->assertEquals('new value 4', $content->getFieldValue('field4', 'ger-DE')); + self::assertEquals($emptyValue, $content->getFieldValue('field1', 'ger-DE')); + self::assertEquals('default value 2', $content->getFieldValue('field2', 'ger-DE')); + self::assertEquals($emptyValue, $content->getFieldValue('field3', 'ger-DE')); + self::assertEquals('new value 4', $content->getFieldValue('field4', 'ger-DE')); } /** * Test for the createContentDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContentDraft() + * * @depends testCreateContentTwoLanguagesMainTranslationStoredFields * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content[] @@ -414,24 +431,24 @@ public function testCreateContentDraftFields(array $data) { $content = $data[1]; - $this->assertEquals(VersionInfo::STATUS_DRAFT, $content->versionInfo->status); - $this->assertEquals(2, $content->versionInfo->versionNo); - $this->assertCount(2, $content->versionInfo->languageCodes); - $this->assertContains('eng-US', $content->versionInfo->languageCodes); - $this->assertContains('eng-GB', $content->versionInfo->languageCodes); - $this->assertCount(8, $content->getFields()); + self::assertEquals(VersionInfo::STATUS_DRAFT, $content->versionInfo->status); + self::assertEquals(2, $content->versionInfo->versionNo); + self::assertCount(2, $content->versionInfo->languageCodes); + self::assertContains('eng-US', $content->versionInfo->languageCodes); + self::assertContains('eng-GB', $content->versionInfo->languageCodes); + self::assertCount(8, $content->getFields()); // eng-US - $this->assertEquals('value 1', $content->getFieldValue('field1', 'eng-US')); - $this->assertEquals('value 2', $content->getFieldValue('field2', 'eng-US')); - $this->assertEquals('value 3', $content->getFieldValue('field3', 'eng-US')); - $this->assertEquals('value 4', $content->getFieldValue('field4', 'eng-US')); + self::assertEquals('value 1', $content->getFieldValue('field1', 'eng-US')); + self::assertEquals('value 2', $content->getFieldValue('field2', 'eng-US')); + self::assertEquals('value 3', $content->getFieldValue('field3', 'eng-US')); + self::assertEquals('value 4', $content->getFieldValue('field4', 'eng-US')); // eng-GB - $this->assertEquals('value 1', $content->getFieldValue('field1', 'eng-GB')); - $this->assertEquals('value 2', $content->getFieldValue('field2', 'eng-GB')); - $this->assertEquals('value 3 eng-GB', $content->getFieldValue('field3', 'eng-GB')); - $this->assertEquals('value 4 eng-GB', $content->getFieldValue('field4', 'eng-GB')); + self::assertEquals('value 1', $content->getFieldValue('field1', 'eng-GB')); + self::assertEquals('value 2', $content->getFieldValue('field2', 'eng-GB')); + self::assertEquals('value 3 eng-GB', $content->getFieldValue('field3', 'eng-GB')); + self::assertEquals('value 4 eng-GB', $content->getFieldValue('field4', 'eng-GB')); } /** @@ -456,6 +473,7 @@ public function testCreateContentDraftFieldsRetainsIds(array $data) * - value for new language is not empty * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCreateContent * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testCreateContentType * @@ -469,7 +487,7 @@ public function testUpdateContentWithNewLanguage() ]; $content = $this->updateTestContent($initialLanguageCode, $fieldValues); - $this->assertInstanceOf(Content::class, $content); + self::assertInstanceOf(Content::class, $content); return $content; } @@ -478,6 +496,7 @@ public function testUpdateContentWithNewLanguage() * Test for the updateContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent() + * * @depends testUpdateContentWithNewLanguage * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content @@ -486,29 +505,29 @@ public function testUpdateContentWithNewLanguageFields(Content $content) { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); - $this->assertCount(3, $content->versionInfo->languageCodes); - $this->assertContains('ger-DE', $content->versionInfo->languageCodes); - $this->assertContains('eng-US', $content->versionInfo->languageCodes); - $this->assertContains('eng-GB', $content->versionInfo->languageCodes); - $this->assertCount(12, $content->getFields()); + self::assertCount(3, $content->versionInfo->languageCodes); + self::assertContains('ger-DE', $content->versionInfo->languageCodes); + self::assertContains('eng-US', $content->versionInfo->languageCodes); + self::assertContains('eng-GB', $content->versionInfo->languageCodes); + self::assertCount(12, $content->getFields()); // eng-US - $this->assertEquals('value 1', $content->getFieldValue('field1', 'eng-US')); - $this->assertEquals('value 2', $content->getFieldValue('field2', 'eng-US')); - $this->assertEquals('value 3', $content->getFieldValue('field3', 'eng-US')); - $this->assertEquals('value 4', $content->getFieldValue('field4', 'eng-US')); + self::assertEquals('value 1', $content->getFieldValue('field1', 'eng-US')); + self::assertEquals('value 2', $content->getFieldValue('field2', 'eng-US')); + self::assertEquals('value 3', $content->getFieldValue('field3', 'eng-US')); + self::assertEquals('value 4', $content->getFieldValue('field4', 'eng-US')); // eng-GB - $this->assertEquals('value 1', $content->getFieldValue('field1', 'eng-GB')); - $this->assertEquals('value 2', $content->getFieldValue('field2', 'eng-GB')); - $this->assertEquals('value 3 eng-GB', $content->getFieldValue('field3', 'eng-GB')); - $this->assertEquals('value 4 eng-GB', $content->getFieldValue('field4', 'eng-GB')); + self::assertEquals('value 1', $content->getFieldValue('field1', 'eng-GB')); + self::assertEquals('value 2', $content->getFieldValue('field2', 'eng-GB')); + self::assertEquals('value 3 eng-GB', $content->getFieldValue('field3', 'eng-GB')); + self::assertEquals('value 4 eng-GB', $content->getFieldValue('field4', 'eng-GB')); // ger-DE - $this->assertEquals('value 1', $content->getFieldValue('field1', 'ger-DE')); - $this->assertEquals('value 2', $content->getFieldValue('field2', 'ger-DE')); - $this->assertEquals($emptyValue, $content->getFieldValue('field3', 'ger-DE')); - $this->assertEquals('new value 4', $content->getFieldValue('field4', 'ger-DE')); + self::assertEquals('value 1', $content->getFieldValue('field1', 'ger-DE')); + self::assertEquals('value 2', $content->getFieldValue('field2', 'ger-DE')); + self::assertEquals($emptyValue, $content->getFieldValue('field3', 'ger-DE')); + self::assertEquals('new value 4', $content->getFieldValue('field4', 'ger-DE')); } /** @@ -522,6 +541,7 @@ public function testUpdateContentWithNewLanguageFields(Content $content) * - existing language value not changed * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCreateContent * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testCreateContentType * @@ -536,7 +556,7 @@ public function testUpdateContentWithNewLanguageVariant() ]; $content = $this->updateTestContent($initialLanguageCode, $fieldValues); - $this->assertInstanceOf(Content::class, $content); + self::assertInstanceOf(Content::class, $content); return $content; } @@ -545,6 +565,7 @@ public function testUpdateContentWithNewLanguageVariant() * Test for the updateContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent() + * * @depends testUpdateContentWithNewLanguageVariant * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content @@ -553,29 +574,29 @@ public function testUpdateContentWithNewLanguageVariantFields(Content $content) { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); - $this->assertCount(3, $content->versionInfo->languageCodes); - $this->assertContains('ger-DE', $content->versionInfo->languageCodes); - $this->assertContains('eng-US', $content->versionInfo->languageCodes); - $this->assertContains('eng-GB', $content->versionInfo->languageCodes); - $this->assertCount(12, $content->getFields()); + self::assertCount(3, $content->versionInfo->languageCodes); + self::assertContains('ger-DE', $content->versionInfo->languageCodes); + self::assertContains('eng-US', $content->versionInfo->languageCodes); + self::assertContains('eng-GB', $content->versionInfo->languageCodes); + self::assertCount(12, $content->getFields()); // eng-US - $this->assertEquals($emptyValue, $content->getFieldValue('field1', 'eng-US')); - $this->assertEquals('value 2', $content->getFieldValue('field2', 'eng-US')); - $this->assertEquals('value 3', $content->getFieldValue('field3', 'eng-US')); - $this->assertEquals('value 4', $content->getFieldValue('field4', 'eng-US')); + self::assertEquals($emptyValue, $content->getFieldValue('field1', 'eng-US')); + self::assertEquals('value 2', $content->getFieldValue('field2', 'eng-US')); + self::assertEquals('value 3', $content->getFieldValue('field3', 'eng-US')); + self::assertEquals('value 4', $content->getFieldValue('field4', 'eng-US')); // eng-GB - $this->assertEquals($emptyValue, $content->getFieldValue('field1', 'eng-GB')); - $this->assertEquals('value 2', $content->getFieldValue('field2', 'eng-GB')); - $this->assertEquals('value 3 eng-GB', $content->getFieldValue('field3', 'eng-GB')); - $this->assertEquals('value 4 eng-GB', $content->getFieldValue('field4', 'eng-GB')); + self::assertEquals($emptyValue, $content->getFieldValue('field1', 'eng-GB')); + self::assertEquals('value 2', $content->getFieldValue('field2', 'eng-GB')); + self::assertEquals('value 3 eng-GB', $content->getFieldValue('field3', 'eng-GB')); + self::assertEquals('value 4 eng-GB', $content->getFieldValue('field4', 'eng-GB')); // ger-DE - $this->assertEquals($emptyValue, $content->getFieldValue('field1', 'ger-DE')); - $this->assertEquals('value 2', $content->getFieldValue('field2', 'ger-DE')); - $this->assertEquals($emptyValue, $content->getFieldValue('field3', 'ger-DE')); - $this->assertEquals('new value 4', $content->getFieldValue('field4', 'ger-DE')); + self::assertEquals($emptyValue, $content->getFieldValue('field1', 'ger-DE')); + self::assertEquals('value 2', $content->getFieldValue('field2', 'ger-DE')); + self::assertEquals($emptyValue, $content->getFieldValue('field3', 'ger-DE')); + self::assertEquals('new value 4', $content->getFieldValue('field4', 'ger-DE')); } /** @@ -584,6 +605,7 @@ public function testUpdateContentWithNewLanguageVariantFields(Content $content) * Updating with with new language and no field values given in the update struct. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCreateContent * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testCreateContentType * @@ -595,7 +617,7 @@ public function testUpdateContentWithNewLanguageNoValues() $fieldValues = []; $content = $this->updateTestContent($initialLanguageCode, $fieldValues); - $this->assertInstanceOf(Content::class, $content); + self::assertInstanceOf(Content::class, $content); return $content; } @@ -604,6 +626,7 @@ public function testUpdateContentWithNewLanguageNoValues() * Test for the updateContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent() + * * @depends testUpdateContentWithNewLanguageNoValues * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content @@ -612,29 +635,29 @@ public function testUpdateContentWithNewLanguageNoValuesFields(Content $content) { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); - $this->assertCount(3, $content->versionInfo->languageCodes); - $this->assertContains('ger-DE', $content->versionInfo->languageCodes); - $this->assertContains('eng-US', $content->versionInfo->languageCodes); - $this->assertContains('eng-GB', $content->versionInfo->languageCodes); - $this->assertCount(12, $content->getFields()); + self::assertCount(3, $content->versionInfo->languageCodes); + self::assertContains('ger-DE', $content->versionInfo->languageCodes); + self::assertContains('eng-US', $content->versionInfo->languageCodes); + self::assertContains('eng-GB', $content->versionInfo->languageCodes); + self::assertCount(12, $content->getFields()); // eng-US - $this->assertEquals('value 1', $content->getFieldValue('field1', 'eng-US')); - $this->assertEquals('value 2', $content->getFieldValue('field2', 'eng-US')); - $this->assertEquals('value 3', $content->getFieldValue('field3', 'eng-US')); - $this->assertEquals('value 4', $content->getFieldValue('field4', 'eng-US')); + self::assertEquals('value 1', $content->getFieldValue('field1', 'eng-US')); + self::assertEquals('value 2', $content->getFieldValue('field2', 'eng-US')); + self::assertEquals('value 3', $content->getFieldValue('field3', 'eng-US')); + self::assertEquals('value 4', $content->getFieldValue('field4', 'eng-US')); // eng-GB - $this->assertEquals('value 1', $content->getFieldValue('field1', 'eng-GB')); - $this->assertEquals('value 2', $content->getFieldValue('field2', 'eng-GB')); - $this->assertEquals('value 3 eng-GB', $content->getFieldValue('field3', 'eng-GB')); - $this->assertEquals('value 4 eng-GB', $content->getFieldValue('field4', 'eng-GB')); + self::assertEquals('value 1', $content->getFieldValue('field1', 'eng-GB')); + self::assertEquals('value 2', $content->getFieldValue('field2', 'eng-GB')); + self::assertEquals('value 3 eng-GB', $content->getFieldValue('field3', 'eng-GB')); + self::assertEquals('value 4 eng-GB', $content->getFieldValue('field4', 'eng-GB')); // ger-DE - $this->assertEquals('value 1', $content->getFieldValue('field1', 'ger-DE')); - $this->assertEquals('value 2', $content->getFieldValue('field2', 'ger-DE')); - $this->assertEquals($emptyValue, $content->getFieldValue('field3', 'ger-DE')); - $this->assertEquals('default value 4', $content->getFieldValue('field4', 'ger-DE')); + self::assertEquals('value 1', $content->getFieldValue('field1', 'ger-DE')); + self::assertEquals('value 2', $content->getFieldValue('field2', 'ger-DE')); + self::assertEquals($emptyValue, $content->getFieldValue('field3', 'ger-DE')); + self::assertEquals('default value 4', $content->getFieldValue('field4', 'ger-DE')); } /** @@ -644,6 +667,7 @@ public function testUpdateContentWithNewLanguageNoValuesFields(Content $content) * for non-main language. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCreateContent * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testCreateContentType * @@ -658,7 +682,7 @@ public function testUpdateContentUpdatingNonTranslatableFieldUpdatesFieldCopy() ]; $content = $this->updateTestContent($initialLanguageCode, $fieldValues); - $this->assertInstanceOf(Content::class, $content); + self::assertInstanceOf(Content::class, $content); return $content; } @@ -667,6 +691,7 @@ public function testUpdateContentUpdatingNonTranslatableFieldUpdatesFieldCopy() * Test for the updateContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent() + * * @depends testUpdateContentUpdatingNonTranslatableFieldUpdatesFieldCopy * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content @@ -675,22 +700,22 @@ public function testUpdateContentUpdatingNonTranslatableFieldUpdatesFieldCopyFie { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); - $this->assertCount(2, $content->versionInfo->languageCodes); - $this->assertContains('eng-US', $content->versionInfo->languageCodes); - $this->assertContains('eng-GB', $content->versionInfo->languageCodes); - $this->assertCount(8, $content->getFields()); + self::assertCount(2, $content->versionInfo->languageCodes); + self::assertContains('eng-US', $content->versionInfo->languageCodes); + self::assertContains('eng-GB', $content->versionInfo->languageCodes); + self::assertCount(8, $content->getFields()); // eng-US - $this->assertEquals('new value 1', $content->getFieldValue('field1', 'eng-US')); - $this->assertEquals($emptyValue, $content->getFieldValue('field2', 'eng-US')); - $this->assertEquals('value 3', $content->getFieldValue('field3', 'eng-US')); - $this->assertEquals('value 4', $content->getFieldValue('field4', 'eng-US')); + self::assertEquals('new value 1', $content->getFieldValue('field1', 'eng-US')); + self::assertEquals($emptyValue, $content->getFieldValue('field2', 'eng-US')); + self::assertEquals('value 3', $content->getFieldValue('field3', 'eng-US')); + self::assertEquals('value 4', $content->getFieldValue('field4', 'eng-US')); // eng-GB - $this->assertEquals('new value 1', $content->getFieldValue('field1', 'eng-GB')); - $this->assertEquals($emptyValue, $content->getFieldValue('field2', 'eng-GB')); - $this->assertEquals('value 3 eng-GB', $content->getFieldValue('field3', 'eng-GB')); - $this->assertEquals('value 4 eng-GB', $content->getFieldValue('field4', 'eng-GB')); + self::assertEquals('new value 1', $content->getFieldValue('field1', 'eng-GB')); + self::assertEquals($emptyValue, $content->getFieldValue('field2', 'eng-GB')); + self::assertEquals('value 3 eng-GB', $content->getFieldValue('field3', 'eng-GB')); + self::assertEquals('value 4 eng-GB', $content->getFieldValue('field4', 'eng-GB')); } /** @@ -699,6 +724,7 @@ public function testUpdateContentUpdatingNonTranslatableFieldUpdatesFieldCopyFie * Updating with two languages, initial language is always stored (even with all values being empty). * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCreateContent * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testCreateContentType * @@ -714,7 +740,7 @@ public function testUpdateContentWithTwoLanguagesInitialLanguageTranslationNotCr ]; $content = $this->updateTestContent($initialLanguageCode, $fieldValues); - $this->assertInstanceOf(Content::class, $content); + self::assertInstanceOf(Content::class, $content); return $content; } @@ -723,6 +749,7 @@ public function testUpdateContentWithTwoLanguagesInitialLanguageTranslationNotCr * Test for the updateContent() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent() + * * @depends testUpdateContentWithTwoLanguagesInitialLanguageTranslationNotCreated * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content @@ -731,29 +758,29 @@ public function testUpdateContentWithTwoLanguagesInitialLanguageTranslationNotCr { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); - $this->assertCount(3, $content->versionInfo->languageCodes); - $this->assertContains('ger-DE', $content->versionInfo->languageCodes); - $this->assertContains('eng-US', $content->versionInfo->languageCodes); - $this->assertContains('eng-GB', $content->versionInfo->languageCodes); - $this->assertCount(12, $content->getFields()); + self::assertCount(3, $content->versionInfo->languageCodes); + self::assertContains('ger-DE', $content->versionInfo->languageCodes); + self::assertContains('eng-US', $content->versionInfo->languageCodes); + self::assertContains('eng-GB', $content->versionInfo->languageCodes); + self::assertCount(12, $content->getFields()); // eng-US - $this->assertEquals($emptyValue, $content->getFieldValue('field1', 'eng-US')); - $this->assertEquals($emptyValue, $content->getFieldValue('field2', 'eng-US')); - $this->assertEquals('value 3', $content->getFieldValue('field3', 'eng-US')); - $this->assertEquals('value 4', $content->getFieldValue('field4', 'eng-US')); + self::assertEquals($emptyValue, $content->getFieldValue('field1', 'eng-US')); + self::assertEquals($emptyValue, $content->getFieldValue('field2', 'eng-US')); + self::assertEquals('value 3', $content->getFieldValue('field3', 'eng-US')); + self::assertEquals('value 4', $content->getFieldValue('field4', 'eng-US')); // eng-GB - $this->assertEquals($emptyValue, $content->getFieldValue('field1', 'eng-GB')); - $this->assertEquals($emptyValue, $content->getFieldValue('field2', 'eng-GB')); - $this->assertEquals('value 3 eng-GB', $content->getFieldValue('field3', 'eng-GB')); - $this->assertEquals('value 4 eng-GB', $content->getFieldValue('field4', 'eng-GB')); + self::assertEquals($emptyValue, $content->getFieldValue('field1', 'eng-GB')); + self::assertEquals($emptyValue, $content->getFieldValue('field2', 'eng-GB')); + self::assertEquals('value 3 eng-GB', $content->getFieldValue('field3', 'eng-GB')); + self::assertEquals('value 4 eng-GB', $content->getFieldValue('field4', 'eng-GB')); // ger-DE - $this->assertEquals($emptyValue, $content->getFieldValue('field1', 'ger-DE')); - $this->assertEquals($emptyValue, $content->getFieldValue('field2', 'ger-DE')); - $this->assertEquals($emptyValue, $content->getFieldValue('field3', 'ger-DE')); - $this->assertEquals($emptyValue, $content->getFieldValue('field4', 'ger-DE')); + self::assertEquals($emptyValue, $content->getFieldValue('field1', 'ger-DE')); + self::assertEquals($emptyValue, $content->getFieldValue('field2', 'ger-DE')); + self::assertEquals($emptyValue, $content->getFieldValue('field3', 'ger-DE')); + self::assertEquals($emptyValue, $content->getFieldValue('field4', 'ger-DE')); } protected function assertFieldIds(Content $content1, Content $content2) @@ -763,7 +790,7 @@ protected function assertFieldIds(Content $content1, Content $content2) foreach ($fields1 as $fieldDefinitionIdentifier => $languageFieldIds) { foreach ($languageFieldIds as $languageCode => $fieldId) { - $this->assertEquals( + self::assertEquals( $fields2[$fieldDefinitionIdentifier][$languageCode], $fieldId ); diff --git a/tests/integration/Core/Repository/NotificationServiceTest.php b/tests/integration/Core/Repository/NotificationServiceTest.php index 7b13a4c6ff..ecdb333b49 100644 --- a/tests/integration/Core/Repository/NotificationServiceTest.php +++ b/tests/integration/Core/Repository/NotificationServiceTest.php @@ -33,10 +33,10 @@ public function testLoadNotifications() $notificationList = $notificationService->loadNotifications(0, 25); /* END: Use Case */ - $this->assertInstanceOf(NotificationList::class, $notificationList); - $this->assertIsArray($notificationList->items); - $this->assertIsInt($notificationList->totalCount); - $this->assertEquals(5, $notificationList->totalCount); + self::assertInstanceOf(NotificationList::class, $notificationList); + self::assertIsArray($notificationList->items); + self::assertIsInt($notificationList->totalCount); + self::assertEquals(5, $notificationList->totalCount); } /** @@ -54,8 +54,8 @@ public function testGetNotification() $notification = $notificationService->getNotification($notificationId); /* END: Use Case */ - $this->assertInstanceOf(Notification::class, $notification); - $this->assertEquals($notificationId, $notification->id); + self::assertInstanceOf(Notification::class, $notification); + self::assertEquals($notificationId, $notification->id); } /** @@ -74,7 +74,7 @@ public function testMarkNotificationAsRead() $notification = $notificationService->getNotification($notificationId); /* END: Use Case */ - $this->assertFalse($notification->isPending); + self::assertFalse($notification->isPending); } /** @@ -89,7 +89,7 @@ public function testGetPendingNotificationCount() $notificationPendingCount = $notificationService->getPendingNotificationCount(); /* END: Use Case */ - $this->assertEquals(3, $notificationPendingCount); + self::assertEquals(3, $notificationPendingCount); } /** @@ -104,7 +104,7 @@ public function testGetNotificationCount() $notificationCount = $notificationService->getNotificationCount(); /* END: Use Case */ - $this->assertEquals(5, $notificationCount); + self::assertEquals(5, $notificationCount); } /** @@ -123,7 +123,7 @@ public function testDeleteNotification() try { $notificationService->getNotification($notificationId); - $this->fail('Notification ' . $notificationId . ' not deleted.'); + self::fail('Notification ' . $notificationId . ' not deleted.'); } catch (NotFoundException $e) { } } @@ -152,12 +152,13 @@ public function testCreateNotification() $notification = $notificationService->createNotification($createStruct); /* END: Use Case */ - $this->assertInstanceOf(Notification::class, $notification); - $this->assertGreaterThan(0, $notification->id); + self::assertInstanceOf(Notification::class, $notification); + self::assertGreaterThan(0, $notification->id); } /** * @covers \Ibexa\Contracts\Core\Repository\NotificationService::createNotification() + * * @depends testCreateNotification */ public function testCreateNotificationThrowsInvalidArgumentExceptionOnMissingOwner() @@ -180,6 +181,7 @@ public function testCreateNotificationThrowsInvalidArgumentExceptionOnMissingOwn /** * @covers \Ibexa\Contracts\Core\Repository\NotificationService::createNotification() + * * @depends testCreateNotification */ public function testCreateNotificationThrowsInvalidArgumentExceptionOnMissingType() diff --git a/tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php b/tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php index 1a7ade9c56..66811e9b9f 100644 --- a/tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -12,6 +13,7 @@ * Test case for operations in the ObjectStateService using in memory storage. * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService + * * @group integration * @group authorization */ @@ -21,6 +23,7 @@ class ObjectStateServiceAuthorizationTest extends BaseTest * Test for the createObjectStateGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::createObjectStateGroup() + * * @depends Ibexa\Tests\Integration\Core\Repository\ObjectStateServiceTest::testCreateObjectStateGroup */ public function testCreateObjectStateGroupThrowsUnauthorizedException() @@ -65,6 +68,7 @@ public function testCreateObjectStateGroupThrowsUnauthorizedException() * Test for the updateObjectStateGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::updateObjectStateGroup() + * * @depends Ibexa\Tests\Integration\Core\Repository\ObjectStateServiceTest::testUpdateObjectStateGroup */ public function testUpdateObjectStateGroupThrowsUnauthorizedException() @@ -114,6 +118,7 @@ public function testUpdateObjectStateGroupThrowsUnauthorizedException() * Test for the deleteObjectStateGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::deleteObjectStateGroup() + * * @depends Ibexa\Tests\Integration\Core\Repository\ObjectStateServiceTest::testDeleteObjectStateGroup */ public function testDeleteObjectStateGroupThrowsUnauthorizedException() @@ -150,6 +155,7 @@ public function testDeleteObjectStateGroupThrowsUnauthorizedException() * Test for the createObjectState() method. * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::createObjectState() + * * @depends Ibexa\Tests\Integration\Core\Repository\ObjectStateServiceTest::testCreateObjectState */ public function testCreateObjectStateThrowsUnauthorizedException() @@ -201,6 +207,7 @@ public function testCreateObjectStateThrowsUnauthorizedException() * Test for the updateObjectState() method. * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::updateObjectState() + * * @depends Ibexa\Tests\Integration\Core\Repository\ObjectStateServiceTest::testUpdateObjectState */ public function testUpdateObjectStateThrowsUnauthorizedException() @@ -251,6 +258,7 @@ public function testUpdateObjectStateThrowsUnauthorizedException() * Test for the setPriorityOfObjectState() method. * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::setPriorityOfObjectState() + * * @depends Ibexa\Tests\Integration\Core\Repository\ObjectStateServiceTest::testSetPriorityOfObjectState */ public function testSetPriorityOfObjectStateThrowsUnauthorizedException() @@ -289,6 +297,7 @@ public function testSetPriorityOfObjectStateThrowsUnauthorizedException() * Test for the deleteObjectState() method. * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::deleteObjectState() + * * @depends Ibexa\Tests\Integration\Core\Repository\ObjectStateServiceTest::testDeleteObjectState */ public function testDeleteObjectStateThrowsUnauthorizedException() @@ -323,6 +332,7 @@ public function testDeleteObjectStateThrowsUnauthorizedException() * Test for the setContentState() method. * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::setContentState() + * * @depends Ibexa\Tests\Integration\Core\Repository\ObjectStateServiceTest::testSetContentState */ public function testSetContentStateThrowsUnauthorizedException() diff --git a/tests/integration/Core/Repository/ObjectStateServiceTest.php b/tests/integration/Core/Repository/ObjectStateServiceTest.php index b67b08d23c..e283dfd97f 100644 --- a/tests/integration/Core/Repository/ObjectStateServiceTest.php +++ b/tests/integration/Core/Repository/ObjectStateServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; @@ -20,6 +21,7 @@ * Test case for operations in the ObjectStateService using in memory storage. * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService + * * @group object-state */ class ObjectStateServiceTest extends BaseTest @@ -48,7 +50,7 @@ public function testNewObjectStateGroupCreateStruct() ); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( ObjectStateGroupCreateStruct::class, $objectStateGroupCreate ); @@ -61,7 +63,6 @@ public function testNewObjectStateGroupCreateStruct() * * @param \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroupCreateStruct $objectStateGroupCreate * - * * @depends testNewObjectStateGroupCreateStruct */ public function testNewObjectStateGroupCreateStructValues(ObjectStateGroupCreateStruct $objectStateGroupCreate) @@ -93,7 +94,7 @@ public function testNewObjectStateGroupUpdateStruct() $objectStateGroupUpdate = $objectStateService->newObjectStateGroupUpdateStruct(); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( ObjectStateGroupUpdateStruct::class, $objectStateGroupUpdate ); @@ -106,7 +107,6 @@ public function testNewObjectStateGroupUpdateStruct() * * @param \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroupUpdateStruct $objectStateGroupUpdate * - * * @depends testNewObjectStateGroupUpdateStruct */ public function testNewObjectStateGroupUpdateStructValues(ObjectStateGroupUpdateStruct $objectStateGroupUpdate) @@ -140,7 +140,7 @@ public function testNewObjectStateCreateStruct() ); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( ObjectStateCreateStruct::class, $objectStateCreate ); @@ -153,7 +153,6 @@ public function testNewObjectStateCreateStruct() * * @param \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateCreateStruct $objectStateCreate * - * * @depends testNewObjectStateCreateStruct */ public function testNewObjectStateCreateStructValues(ObjectStateCreateStruct $objectStateCreate) @@ -186,7 +185,7 @@ public function testNewObjectStateUpdateStruct() $objectStateUpdate = $objectStateService->newObjectStateUpdateStruct(); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( ObjectStateUpdateStruct::class, $objectStateUpdate ); @@ -199,7 +198,6 @@ public function testNewObjectStateUpdateStruct() * * @param \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateUpdateStruct $objectStateUpdate * - * * @depends testNewObjectStateUpdateStruct */ public function testNewObjectStateUpdateStructValues(ObjectStateUpdateStruct $objectStateUpdate) @@ -220,6 +218,7 @@ public function testNewObjectStateUpdateStructValues(ObjectStateUpdateStruct $ob * * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::createObjectStateGroup() + * * @depends testNewObjectStateGroupCreateStructValues */ public function testCreateObjectStateGroup() @@ -247,7 +246,7 @@ public function testCreateObjectStateGroup() ); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( ObjectStateGroup::class, $createdObjectStateGroup ); @@ -260,7 +259,6 @@ public function testCreateObjectStateGroup() * * @param \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroup $createdObjectStateGroup * - * * @depends testCreateObjectStateGroup */ public function testCreateObjectStateGroupStructValues(ObjectStateGroup $createdObjectStateGroup) @@ -281,7 +279,7 @@ public function testCreateObjectStateGroupStructValues(ObjectStateGroup $created ], $createdObjectStateGroup ); - $this->assertNotNull($createdObjectStateGroup->id); + self::assertNotNull($createdObjectStateGroup->id); } /** @@ -289,6 +287,7 @@ public function testCreateObjectStateGroupStructValues(ObjectStateGroup $created * * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::createObjectStateGroup() + * * @depends testCreateObjectStateGroup */ public function testCreateObjectStateGroupThrowsInvalidArgumentException() @@ -339,7 +338,7 @@ public function testLoadObjectStateGroup() ); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( ObjectStateGroup::class, $loadedObjectStateGroup ); @@ -362,6 +361,7 @@ public function testLoadObjectStateGroup() * * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::loadObjectStateGroup() + * * @depends testLoadObjectStateGroup */ public function testLoadObjectStateGroupThrowsNotFoundException() @@ -396,7 +396,7 @@ public function testLoadObjectStateGroupByIdentifier(): void self::EXISTING_OBJECT_STATE_GROUP_IDENTIFIER ); - $this->assertInstanceOf( + self::assertInstanceOf( ObjectStateGroup::class, $loadedObjectStateGroup ); @@ -439,6 +439,7 @@ public function testLoadObjectStateGroupByIdentifierThrowsNotFoundException(): v * * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::loadObjectStateGroups() + * * @depends testLoadObjectStateGroup */ public function testLoadObjectStateGroups() @@ -454,7 +455,7 @@ public function testLoadObjectStateGroups() $loadedObjectStateGroups = $objectStateService->loadObjectStateGroups(); /* END: Use Case */ - $this->assertIsArray($loadedObjectStateGroups); + self::assertIsArray($loadedObjectStateGroups); $this->assertObjectsLoadedByIdentifiers( $expectedGroupIdentifiers, @@ -513,7 +514,7 @@ protected function assertObjectsLoadedByIdentifiers(array $expectedIdentifiers, { foreach ($loadedObjects as $loadedObject) { if (!isset($expectedIdentifiers[$loadedObject->identifier])) { - $this->fail( + self::fail( sprintf( 'Loaded unexpected %s with identifier "%s"', $class, @@ -525,7 +526,7 @@ protected function assertObjectsLoadedByIdentifiers(array $expectedIdentifiers, } if (!empty($expectedIdentifiers)) { - $this->fail( + self::fail( sprintf( 'Expected %ss with identifiers "%s" not loaded.', $class, @@ -540,6 +541,7 @@ protected function assertObjectsLoadedByIdentifiers(array $expectedIdentifiers, * * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::loadObjectStateGroups($offset) + * * @depends testLoadObjectStateGroups */ public function testLoadObjectStateGroupsWithOffset() @@ -559,7 +561,7 @@ public function testLoadObjectStateGroupsWithOffset() $loadedObjectStateGroups = $objectStateService->loadObjectStateGroups(2); /* END: Use Case */ - $this->assertIsArray($loadedObjectStateGroups); + self::assertIsArray($loadedObjectStateGroups); $this->assertObjectsLoadedByIdentifiers( array_slice($existingGroupIdentifiers, 2), @@ -592,6 +594,7 @@ static function ($group) { * * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::loadObjectStateGroups($offset, $limit) + * * @depends testLoadObjectStateGroupsWithOffset */ public function testLoadObjectStateGroupsWithOffsetAndLimit() @@ -609,7 +612,7 @@ public function testLoadObjectStateGroupsWithOffsetAndLimit() $loadedObjectStateGroups = $objectStateService->loadObjectStateGroups(1, 2); /* END: Use Case */ - $this->assertIsArray($loadedObjectStateGroups); + self::assertIsArray($loadedObjectStateGroups); $this->assertObjectsLoadedByIdentifiers( array_slice($existingGroupIdentifiers, 1, 2), @@ -623,6 +626,7 @@ public function testLoadObjectStateGroupsWithOffsetAndLimit() * * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::loadObjectStates() + * * @depends testLoadObjectStateGroup */ public function testLoadObjectStates() @@ -643,7 +647,7 @@ public function testLoadObjectStates() $loadedObjectStates = $objectStateService->loadObjectStates($objectStateGroup); /* END: Use Case */ - $this->assertIsArray( + self::assertIsArray( $loadedObjectStates ); $this->assertObjectsLoadedByIdentifiers( @@ -657,6 +661,7 @@ public function testLoadObjectStates() * Test for the updateObjectStateGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::updateObjectStateGroup + * * @depends testLoadObjectStateGroup */ public function testUpdateObjectStateGroup() @@ -696,7 +701,7 @@ public function testUpdateObjectStateGroup() $allObjectGroups = $objectStateService->loadObjectStateGroups(); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( ObjectStateGroup::class, $updatedObjectStateGroup ); @@ -713,6 +718,7 @@ public function testUpdateObjectStateGroup() * Test service method for partially updating object state group. * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::updateObjectStateGroup + * * @depends testLoadObjectStateGroup */ public function testUpdateObjectStateGroupChosenFieldsOnly() @@ -728,7 +734,7 @@ public function testUpdateObjectStateGroupChosenFieldsOnly() $updatedGroup = $objectStateService->updateObjectStateGroup($group, $groupUpdateStruct); - $this->assertInstanceOf( + self::assertInstanceOf( ObjectStateGroup::class, $updatedGroup ); @@ -754,6 +760,7 @@ public function testUpdateObjectStateGroupChosenFieldsOnly() * * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::updateObjectStateGroup() + * * @depends testUpdateObjectStateGroup */ public function testUpdateObjectStateGroupThrowsInvalidArgumentException() @@ -805,7 +812,6 @@ public function testUpdateObjectStateGroupThrowsInvalidArgumentException() * * @param array $testData * - * * @depends testUpdateObjectStateGroup */ public function testUpdateObjectStateGroupStructValues(array $testData) @@ -822,8 +828,8 @@ public function testUpdateObjectStateGroupStructValues(array $testData) $updatedObjectStateGroup ); - $this->assertContainsEquals($updatedObjectStateGroup, $allObjectGroups, ''); - $this->assertNotContainsEquals($loadedObjectStateGroup, $allObjectGroups, ''); + self::assertContainsEquals($updatedObjectStateGroup, $allObjectGroups, ''); + self::assertNotContainsEquals($loadedObjectStateGroup, $allObjectGroups, ''); } /** @@ -831,6 +837,7 @@ public function testUpdateObjectStateGroupStructValues(array $testData) * * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::createObjectState() + * * @depends testLoadObjectStateGroup * @depends testNewObjectStateCreateStruct */ @@ -871,7 +878,7 @@ public function testCreateObjectState() ); /* END: Use Case */ - $this->assertInstanceOf(ObjectState::class, $createdObjectState); + self::assertInstanceOf(ObjectState::class, $createdObjectState); // Object sequences are renumbered $objectStateCreateStruct->priority = 2; @@ -910,12 +917,12 @@ public function testCreateObjectStateInEmptyGroup() $stateCreateStruct ); - $this->assertInstanceOf( + self::assertInstanceOf( ObjectState::class, $createdState ); - $this->assertNotNull($createdState->id); + self::assertNotNull($createdState->id); $this->assertPropertiesCorrect( [ 'identifier' => 'test', @@ -929,13 +936,13 @@ public function testCreateObjectStateInEmptyGroup() ); $objectStateGroup = $createdState->getObjectStateGroup(); - $this->assertInstanceOf( + self::assertInstanceOf( ObjectStateGroup::class, $objectStateGroup ); - $this->assertEquals($createdGroup->id, $objectStateGroup->id); - $this->assertGreaterThan(0, $objectStateService->getContentCount($createdState)); + self::assertEquals($createdGroup->id, $objectStateGroup->id); + self::assertGreaterThan(0, $objectStateService->getContentCount($createdState)); } /** @@ -943,6 +950,7 @@ public function testCreateObjectStateInEmptyGroup() * * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::createObjectState() + * * @depends testLoadObjectStateGroup * @depends testCreateObjectState */ @@ -987,7 +995,6 @@ public function testCreateObjectStateThrowsInvalidArgumentException() * * @param array $testData * - * * @depends testCreateObjectState */ public function testCreateObjectStateStructValues(array $testData) @@ -1003,9 +1010,9 @@ public function testCreateObjectStateStructValues(array $testData) $createdObjectState ); - $this->assertNotNull($createdObjectState->id); + self::assertNotNull($createdObjectState->id); - $this->assertEquals( + self::assertEquals( $loadedObjectStateGroup, $createdObjectState->getObjectStateGroup() ); @@ -1016,6 +1023,7 @@ public function testCreateObjectStateStructValues(array $testData) * * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::loadObjectState() + * * @depends testLoadObjectStateGroup */ public function testLoadObjectState() @@ -1032,7 +1040,7 @@ public function testLoadObjectState() ); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( ObjectState::class, $loadedObjectState ); @@ -1058,7 +1066,7 @@ public function testLoadObjectStateByIdentifier(): void self::EXISTING_OBJECT_STATE_IDENTIFIER ); - $this->assertInstanceOf( + self::assertInstanceOf( ObjectState::class, $loadedObjectState ); @@ -1107,7 +1115,6 @@ public function testLoadObjectStateByIdentifierThrowsNotFoundException(): void * * @param \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectState $loadedObjectState * - * * @depends testLoadObjectState */ public function testLoadObjectStateStructValues(ObjectState $loadedObjectState) @@ -1130,7 +1137,7 @@ public function testLoadObjectStateStructValues(ObjectState $loadedObjectState) $loadedObjectState ); - $this->assertEquals( + self::assertEquals( $this->getRepository()->getObjectStateService()->loadObjectStateGroup(2), $loadedObjectState->getObjectStateGroup() ); @@ -1141,6 +1148,7 @@ public function testLoadObjectStateStructValues(ObjectState $loadedObjectState) * * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::loadObjectState() + * * @depends testLoadObjectState */ public function testLoadObjectStateThrowsNotFoundException() @@ -1351,6 +1359,7 @@ public function testLoadObjectStatesWithPrioritizedLanguagesList($languageCodes, * Test for the updateObjectState() method. * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::updateObjectState + * * @depends testLoadObjectState */ public function testUpdateObjectState() @@ -1389,7 +1398,7 @@ public function testUpdateObjectState() $allObjectStates = $objectStateService->loadObjectStates($loadedObjectState->getObjectStateGroup()); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( ObjectState::class, $updatedObjectState ); @@ -1406,6 +1415,7 @@ public function testUpdateObjectState() * Test service method for partially updating object state. * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::updateObjectState + * * @depends testLoadObjectState */ public function testUpdateObjectStateChosenFieldsOnly() @@ -1421,7 +1431,7 @@ public function testUpdateObjectStateChosenFieldsOnly() $updatedState = $objectStateService->updateObjectState($state, $stateUpdateStruct); - $this->assertInstanceOf( + self::assertInstanceOf( ObjectState::class, $updatedState ); @@ -1440,12 +1450,12 @@ public function testUpdateObjectStateChosenFieldsOnly() $updatedState ); - $this->assertInstanceOf( + self::assertInstanceOf( ObjectStateGroup::class, $updatedState->getObjectStateGroup() ); - $this->assertEquals($state->getObjectStateGroup()->id, $updatedState->getObjectStateGroup()->id); + self::assertEquals($state->getObjectStateGroup()->id, $updatedState->getObjectStateGroup()->id); } /** @@ -1453,6 +1463,7 @@ public function testUpdateObjectStateChosenFieldsOnly() * * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::updateObjectState() + * * @depends testUpdateObjectState */ public function testUpdateObjectStateThrowsInvalidArgumentException() @@ -1495,7 +1506,6 @@ public function testUpdateObjectStateThrowsInvalidArgumentException() * * @param array $testData * - * * @depends testUpdateObjectState */ public function testUpdateObjectStateStructValues(array $testData) @@ -1520,13 +1530,13 @@ public function testUpdateObjectStateStructValues(array $testData) $updatedObjectState ); - $this->assertEquals( + self::assertEquals( $loadedObjectState->getObjectStateGroup(), $updatedObjectState->getObjectStateGroup() ); - $this->assertContainsEquals($updatedObjectState, $allObjectStates, ''); - $this->assertNotContainsEquals($loadedObjectState, $allObjectStates, ''); + self::assertContainsEquals($updatedObjectState, $allObjectStates, ''); + self::assertNotContainsEquals($loadedObjectState, $allObjectStates, ''); } /** @@ -1534,6 +1544,7 @@ public function testUpdateObjectStateStructValues(array $testData) * * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::setPriorityOfObjectState + * * @depends testLoadObjectState */ public function testSetPriorityOfObjectState() @@ -1561,11 +1572,11 @@ public function testSetPriorityOfObjectState() ); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( ObjectState::class, $loadedObjectState ); - $this->assertEquals(1, $loadedObjectState->priority); + self::assertEquals(1, $loadedObjectState->priority); } /** @@ -1573,6 +1584,7 @@ public function testSetPriorityOfObjectState() * * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::getContentState() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentInfo * @depends testLoadObjectState */ @@ -1600,11 +1612,11 @@ public function testGetContentState() ); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( ObjectState::class, $ezLockObjectState ); - $this->assertEquals('not_locked', $ezLockObjectState->identifier); + self::assertEquals('not_locked', $ezLockObjectState->identifier); } /** @@ -1664,13 +1676,13 @@ public function testGetInitialObjectState() ); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( ObjectState::class, $initialObjectState ); - $this->assertEquals('sindelfingen', $initialObjectState->identifier); - $this->assertEquals(['eng-US' => 'Sindelfingen'], $initialObjectState->names); - $this->assertEquals('eng-US', $initialObjectState->defaultLanguageCode); + self::assertEquals('sindelfingen', $initialObjectState->identifier); + self::assertEquals(['eng-US' => 'Sindelfingen'], $initialObjectState->names); + self::assertEquals('eng-US', $initialObjectState->defaultLanguageCode); } /** @@ -1678,6 +1690,7 @@ public function testGetInitialObjectState() * * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::setContentState() + * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentInfo * @depends testLoadObjectState */ @@ -1716,13 +1729,14 @@ public function testSetContentState() $ezLockObjectStateGroup ); - $this->assertEquals('locked', $ezLockObjectState->identifier); + self::assertEquals('locked', $ezLockObjectState->identifier); } /** * Test for the setContentState() method. * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::setContentState + * * @depends testSetContentState */ public function testSetContentStateThrowsInvalidArgumentException() @@ -1767,6 +1781,7 @@ public function testSetContentStateThrowsInvalidArgumentException() * * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::getContentCount() + * * @depends testLoadObjectState */ public function testGetContentCount() @@ -1783,7 +1798,7 @@ public function testGetContentCount() $objectCount = $objectStateService->getContentCount($notLockedObjectState); /* END: Use Case */ - $this->assertEquals(18, $objectCount); + self::assertEquals(18, $objectCount); } /** @@ -1791,6 +1806,7 @@ public function testGetContentCount() * * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::deleteObjectState() + * * @depends testLoadObjectState */ public function testDeleteObjectState() @@ -1813,7 +1829,7 @@ public function testDeleteObjectState() $lockedObjectState = $objectStateService->loadObjectState($lockedObjectStateId); // All objects transferred - $this->assertEquals( + self::assertEquals( 18, $objectStateService->getContentCount($lockedObjectState) ); @@ -1824,6 +1840,7 @@ public function testDeleteObjectState() * * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::deleteObjectStateGroup() + * * @depends testLoadObjectStateGroup */ public function testDeleteObjectStateGroup() @@ -1845,7 +1862,7 @@ public function testDeleteObjectStateGroup() try { $objectStateService->loadObjectStateGroup($objectStateGroupId); - $this->fail( + self::fail( sprintf( 'Object state group with ID "%s" not deleted.', $objectStateGroupId diff --git a/tests/integration/Core/Repository/Parallel/BaseParallelTestCase.php b/tests/integration/Core/Repository/Parallel/BaseParallelTestCase.php index 6bf573cbe3..6f95602cc5 100644 --- a/tests/integration/Core/Repository/Parallel/BaseParallelTestCase.php +++ b/tests/integration/Core/Repository/Parallel/BaseParallelTestCase.php @@ -22,7 +22,7 @@ protected function setUp(): void $dbms = $connection->getDatabasePlatform()->getName(); if ($dbms == 'sqlite') { - $this->markTestSkipped('Can not run parallel test on sqlite'); + self::markTestSkipped('Can not run parallel test on sqlite'); } } diff --git a/tests/integration/Core/Repository/Parallel/ContentServiceTest.php b/tests/integration/Core/Repository/Parallel/ContentServiceTest.php index 08d0ec0830..71a2dc0822 100644 --- a/tests/integration/Core/Repository/Parallel/ContentServiceTest.php +++ b/tests/integration/Core/Repository/Parallel/ContentServiceTest.php @@ -48,7 +48,7 @@ public function testPublishMultipleVersions(): void $version1 = $contentService->loadVersionInfo($version1->contentInfo, 2); $version2 = $contentService->loadVersionInfo($version2->contentInfo, 3); - $this->assertTrue( + self::assertTrue( $version1->isPublished() && $version2->isDraft() || $version1->isDraft() && $version2->isPublished(), 'One of the versions should be published and the other should be draft' ); diff --git a/tests/integration/Core/Repository/PermissionResolverTest.php b/tests/integration/Core/Repository/PermissionResolverTest.php index 3cfeb6d70b..e9785fe175 100644 --- a/tests/integration/Core/Repository/PermissionResolverTest.php +++ b/tests/integration/Core/Repository/PermissionResolverTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use function array_filter; @@ -24,6 +25,7 @@ * Test case for operations in the PermissionResolver. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver + * * @group integration * @group permission */ @@ -61,6 +63,7 @@ public function testGetCurrentUserReferenceReturnsAnonymousUserReference() * Test for the setCurrentUserReference() method. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::setCurrentUserReference() + * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService */ public function testSetCurrentUserReference() @@ -88,12 +91,12 @@ public function testSetCurrentUserReference() $permissionResolver->setCurrentUserReference($administratorUser); /* END: Use Case */ - $this->assertEquals( + self::assertEquals( $administratorUserId, $permissionResolver->getCurrentUserReference()->getUserId() ); - $this->assertSame( + self::assertSame( $administratorUser, $permissionResolver->getCurrentUserReference() ); @@ -103,6 +106,7 @@ public function testSetCurrentUserReference() * Test for the hasAccess() method. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::hasAccess() + * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService */ public function testHasAccessWithAnonymousUserNo() @@ -126,13 +130,14 @@ public function testHasAccessWithAnonymousUserNo() $hasAccess = $permissionResolver->hasAccess('content', 'remove', $anonymousUser); /* END: Use Case */ - $this->assertFalse($hasAccess); + self::assertFalse($hasAccess); } /** * Test for the hasAccess() method. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::hasAccess() + * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService * @depends testHasAccessWithAnonymousUserNo */ @@ -160,13 +165,14 @@ public function testHasAccessForCurrentUserNo() $hasAccess = $permissionResolver->hasAccess('content', 'remove'); /* END: Use Case */ - $this->assertFalse($hasAccess); + self::assertFalse($hasAccess); } /** * Test for the hasAccess() method. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::hasAccess() + * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService */ public function testHasAccessWithAdministratorUser() @@ -188,13 +194,14 @@ public function testHasAccessWithAdministratorUser() $hasAccess = $permissionResolver->hasAccess('content', 'read', $administratorUser); /* END: Use Case */ - $this->assertTrue($hasAccess); + self::assertTrue($hasAccess); } /** * Test for the hasAccess() method. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::hasAccess() + * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService * @depends testSetCurrentUserReference * @depends testHasAccessWithAdministratorUser @@ -221,13 +228,14 @@ public function testHasAccessForCurrentUserYes() $hasAccess = $permissionResolver->hasAccess('content', 'read'); /* END: Use Case */ - $this->assertTrue($hasAccess); + self::assertTrue($hasAccess); } /** * Test for the hasAccess() method. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::hasAccess() + * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService * @depends testSetCurrentUserReference */ @@ -248,16 +256,17 @@ public function testHasAccessLimited() $permissionSets = $permissionResolver->hasAccess('content', 'read'); /* END: Use Case */ - $this->assertIsArray( + self::assertIsArray( $permissionSets ); - $this->assertNotEmpty($permissionSets); + self::assertNotEmpty($permissionSets); } /** * Test for the canUser() method. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::canUser() + * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentService * @depends testHasAccessForCurrentUserNo @@ -304,6 +313,7 @@ public function testCanUserForAnonymousUserNo() * Test for the canUser() method. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::canUser() + * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentService * @depends testHasAccessForCurrentUserYes @@ -341,7 +351,7 @@ public function testCanUserForAdministratorUser() $contentService->deleteContent($contentInfo); /* END: Use Case */ - $this->assertTrue($canUser); + self::assertTrue($canUser); $contentService->loadContent($homeId); } @@ -349,6 +359,7 @@ public function testCanUserForAdministratorUser() * Test for the canUser() method. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::canUser() + * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentService * @depends testHasAccessLimited @@ -378,13 +389,14 @@ public function testCanUserWithLimitationYes() $canUser = $permissionResolver->canUser('content', 'read', $imagesFolder); /* END: Use Case */ - $this->assertTrue($canUser); + self::assertTrue($canUser); } /** * Test for the canUser() method. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::canUser() + * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentService * @depends testHasAccessLimited @@ -429,6 +441,7 @@ public function testCanUserWithLimitationNo() * Test for the canUser() method. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::canUser() + * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentTypeService * @depends testSetCurrentUserReference @@ -468,6 +481,7 @@ public function testCanUserThrowsInvalidArgumentException() * Test for the canUser() method. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::canUser() + * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentService * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentTypeService @@ -518,8 +532,8 @@ public function testCanUserWithTargetYes() ); /* END: Use Case */ - $this->assertTrue($canUser); - $this->assertEquals( + self::assertTrue($canUser); + self::assertEquals( 'My awesome forums', $contentDraft->getFieldValue('title')->text ); @@ -529,6 +543,7 @@ public function testCanUserWithTargetYes() * Test for the canUser() method. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::canUser() + * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentService * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentTypeService @@ -589,6 +604,7 @@ public function testCanUserWithTargetNo() * Test for the canUser() method. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::canUser() + * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentService * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentTypeService @@ -640,8 +656,8 @@ public function testCanUserWithMultipleTargetsYes() $contentDraft = $contentService->createContent($contentCreateStruct, $locationCreateStructs); /* END: Use Case */ - $this->assertTrue($canUser); - $this->assertEquals( + self::assertTrue($canUser); + self::assertEquals( 'My multipurpose folder', $contentDraft->getFieldValue('name')->text ); @@ -651,6 +667,7 @@ public function testCanUserWithMultipleTargetsYes() * Test for the canUser() method. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::canUser() + * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentService * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentTypeService @@ -712,6 +729,7 @@ public function testCanUserWithMultipleTargetsNo() * Test for the canUser() method. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::canUser() + * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentService * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentTypeService @@ -766,7 +784,7 @@ public function testCanUserThrowsBadStateException() { $this->expectException(BadStateException::class); - $this->markTestIncomplete( + self::markTestIncomplete( 'Cannot be tested on current fixture since policy with unsupported limitation value is not available.' ); } @@ -881,6 +899,7 @@ public function getDataForTestCanUserWithLimitations() * Test for the lookupLimitations() method. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::lookupLimitations() + * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentService * @depends Ibexa\Tests\Integration\Core\Repository\PermissionResolverTest::testHasAccessForCurrentUserNo @@ -916,15 +935,16 @@ public function testLookupLimitationsForAnonymousUserHasNoAccess(): void $lookupLimitations = $permissionResolver->lookupLimitations('content', 'remove', $contentInfo); /* END: Use Case */ - $this->assertFalse($lookupLimitations->hasAccess); - $this->assertEquals($lookupLimitations->roleLimitations, []); - $this->assertEquals($lookupLimitations->lookupPolicyLimitations, []); + self::assertFalse($lookupLimitations->hasAccess); + self::assertEquals($lookupLimitations->roleLimitations, []); + self::assertEquals($lookupLimitations->lookupPolicyLimitations, []); } /** * Test for the lookupLimitations() method. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::lookupLimitations() + * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentService * @depends Ibexa\Tests\Integration\Core\Repository\PermissionResolverTest::testHasAccessForCurrentUserYes @@ -957,15 +977,16 @@ public function testLookupLimitationsForAdministratorUser(): void $lookupLimitations = $permissionResolver->lookupLimitations('content', 'remove', $contentInfo); /* END: Use Case */ - $this->assertTrue($lookupLimitations->hasAccess); - $this->assertEquals($lookupLimitations->roleLimitations, []); - $this->assertEquals($lookupLimitations->lookupPolicyLimitations, []); + self::assertTrue($lookupLimitations->hasAccess); + self::assertEquals($lookupLimitations->roleLimitations, []); + self::assertEquals($lookupLimitations->lookupPolicyLimitations, []); } /** * When one of policy pass then all limitation should be returned. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::lookupLimitations() + * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentService * @depends Ibexa\Tests\Integration\Core\Repository\PermissionResolverTest::testHasAccessForCurrentUserYes @@ -1027,6 +1048,7 @@ public function testLookupLimitationsWithLimitations(): void * When one of policy pass then only filtered limitation should be returned. * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::lookupLimitations() + * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentService * @depends Ibexa\Tests\Integration\Core\Repository\PermissionResolverTest::testHasAccessForCurrentUserYes diff --git a/tests/integration/Core/Repository/Regression/EZP20018LanguageTest.php b/tests/integration/Core/Repository/Regression/EZP20018LanguageTest.php index d5b46d5c10..9f5fef50d0 100644 --- a/tests/integration/Core/Repository/Regression/EZP20018LanguageTest.php +++ b/tests/integration/Core/Repository/Regression/EZP20018LanguageTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Regression; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; @@ -66,7 +67,7 @@ public function testSearchOnNotExistingLanguageGivesException() $setupFactory = $this->getSetupFactory(); if ($setupFactory instanceof LegacySetupFactory) { - $this->markTestSkipped('Skipped on Solr as it is not clear that SPI search should have to validate Criterion values, in this case language code'); + self::markTestSkipped('Skipped on Solr as it is not clear that SPI search should have to validate Criterion values, in this case language code'); } $query = new Query(); @@ -83,8 +84,8 @@ public function testSearchOnUsedLanguageGivesOneResult() $query->filter = new LanguageCode(['por-PT'], false); $results = $this->getRepository()->getSearchService()->findContent($query); - $this->assertEquals(1, $results->totalCount); - $this->assertCount(1, $results->searchHits); + self::assertEquals(1, $results->totalCount); + self::assertCount(1, $results->searchHits); } /** @@ -97,8 +98,8 @@ public function testSearchOnStandardLanguageGivesManyResult() $query->limit = 50; $results = $this->getRepository()->getSearchService()->findContent($query); - $this->assertEquals(16, $results->totalCount); - $this->assertEquals($results->totalCount, count($results->searchHits)); + self::assertEquals(16, $results->totalCount); + self::assertEquals($results->totalCount, count($results->searchHits)); } /** @@ -110,8 +111,8 @@ public function testSearchOnNotUsedInstalledLanguageGivesNoResult() $query->filter = new LanguageCode(['eng-GB'], false); $results = $this->getRepository()->getSearchService()->findContent($query); - $this->assertEquals(2, $results->totalCount); - $this->assertEquals($results->totalCount, count($results->searchHits)); + self::assertEquals(2, $results->totalCount); + self::assertEquals($results->totalCount, count($results->searchHits)); } } diff --git a/tests/integration/Core/Repository/Regression/EZP20018ObjectStateTest.php b/tests/integration/Core/Repository/Regression/EZP20018ObjectStateTest.php index c6782fc312..edab5ef2b1 100644 --- a/tests/integration/Core/Repository/Regression/EZP20018ObjectStateTest.php +++ b/tests/integration/Core/Repository/Regression/EZP20018ObjectStateTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Regression; use Ibexa\Contracts\Core\Repository\Values\Content\Query; @@ -27,8 +28,8 @@ public function testSearchForNonUsedObjectState() $query->filter = new ObjectStateId(2); $results1 = $repository->getSearchService()->findContent($query); - $this->assertEquals(0, $results1->totalCount); - $this->assertCount(0, $results1->searchHits); + self::assertEquals(0, $results1->totalCount); + self::assertCount(0, $results1->searchHits); // Assign and make sure it updates $stateService = $repository->getObjectStateService(); @@ -43,8 +44,8 @@ public function testSearchForNonUsedObjectState() $results2 = $repository->getSearchService()->findContent($query); - $this->assertEquals(1, $results2->totalCount); - $this->assertCount($results2->totalCount, $results2->searchHits); + self::assertEquals(1, $results2->totalCount); + self::assertCount($results2->totalCount, $results2->searchHits); } public function testSearchForUsedObjectState() @@ -56,8 +57,8 @@ public function testSearchForUsedObjectState() $query->limit = 50; $results1 = $repository->getSearchService()->findContent($query); - $this->assertEquals(18, $results1->totalCount); - $this->assertEquals($results1->totalCount, count($results1->searchHits)); + self::assertEquals(18, $results1->totalCount); + self::assertEquals($results1->totalCount, count($results1->searchHits)); // Assign and make sure it updates $stateService = $repository->getObjectStateService(); @@ -72,8 +73,8 @@ public function testSearchForUsedObjectState() $results2 = $repository->getSearchService()->findContent($query); - $this->assertEquals(17, $results2->totalCount); - $this->assertCount($results2->totalCount, $results2->searchHits); + self::assertEquals(17, $results2->totalCount); + self::assertCount($results2->totalCount, $results2->searchHits); } } diff --git a/tests/integration/Core/Repository/Regression/EZP20018VisibilityTest.php b/tests/integration/Core/Repository/Regression/EZP20018VisibilityTest.php index d184c09f9c..b805ad65fa 100644 --- a/tests/integration/Core/Repository/Regression/EZP20018VisibilityTest.php +++ b/tests/integration/Core/Repository/Regression/EZP20018VisibilityTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Regression; use Ibexa\Contracts\Core\Repository\Values\Content\Query; @@ -27,8 +28,8 @@ public function testSearchForHiddenContent() $query->filter = new Visibility(Visibility::HIDDEN); $results1 = $repository->getSearchService()->findContent($query); - $this->assertEquals(0, $results1->totalCount); - $this->assertCount(0, $results1->searchHits); + self::assertEquals(0, $results1->totalCount); + self::assertCount(0, $results1->searchHits); // Hide "Images" Folder $locationService = $repository->getLocationService(); @@ -39,8 +40,8 @@ public function testSearchForHiddenContent() // Assert updated values $results2 = $repository->getSearchService()->findContent($query); - $this->assertEquals(1, $results2->totalCount); - $this->assertCount(1, $results2->searchHits); + self::assertEquals(1, $results2->totalCount); + self::assertCount(1, $results2->searchHits); } public function testSearchForVisibleContent() @@ -52,8 +53,8 @@ public function testSearchForVisibleContent() $query->limit = 50; $results1 = $repository->getSearchService()->findContent($query); - $this->assertEquals(18, $results1->totalCount); - $this->assertEquals($results1->totalCount, count($results1->searchHits)); + self::assertEquals(18, $results1->totalCount); + self::assertEquals($results1->totalCount, count($results1->searchHits)); // Hide "Images" Folder $locationService = $repository->getLocationService(); @@ -64,8 +65,8 @@ public function testSearchForVisibleContent() // Assert updated values $results2 = $repository->getSearchService()->findContent($query); - $this->assertEquals($results1->totalCount - 1, $results2->totalCount); - $this->assertEquals($results2->totalCount, count($results2->searchHits)); + self::assertEquals($results1->totalCount - 1, $results2->totalCount); + self::assertEquals($results2->totalCount, count($results2->searchHits)); } } diff --git a/tests/integration/Core/Repository/Regression/EZP21069Test.php b/tests/integration/Core/Repository/Regression/EZP21069Test.php index 851ee3b591..8d2ceba13d 100644 --- a/tests/integration/Core/Repository/Regression/EZP21069Test.php +++ b/tests/integration/Core/Repository/Regression/EZP21069Test.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Regression; use Ibexa\Contracts\Core\Repository\Values\Content\Query; @@ -89,8 +90,8 @@ public function testSearchOnPreviousAttributeContentGivesNoResult() $query->filter = new Field('name', Operator::EQ, 'TheOriginalNews'); $results = $this->getRepository()->getSearchService()->findContent($query); - $this->assertEquals(0, $results->totalCount); - $this->assertEmpty($results->searchHits); + self::assertEquals(0, $results->totalCount); + self::assertEmpty($results->searchHits); } public function testSearchOnCurrentAttributeContentGivesOnesResult() @@ -99,8 +100,8 @@ public function testSearchOnCurrentAttributeContentGivesOnesResult() $query->filter = new Field('name', Operator::EQ, 'TheUpdatedNews'); $results = $this->getRepository()->getSearchService()->findContent($query); - $this->assertEquals(1, $results->totalCount); - $this->assertCount(1, $results->searchHits); + self::assertEquals(1, $results->totalCount); + self::assertCount(1, $results->searchHits); } public function testSearchOnDraftAttributeContentGivesNoResult() @@ -109,8 +110,8 @@ public function testSearchOnDraftAttributeContentGivesNoResult() $query->filter = new Field('name', Operator::EQ, 'TheDraftNews'); $results = $this->getRepository()->getSearchService()->findContent($query); - $this->assertEquals(0, $results->totalCount); - $this->assertEmpty($results->searchHits); + self::assertEquals(0, $results->totalCount); + self::assertEmpty($results->searchHits); } } diff --git a/tests/integration/Core/Repository/Regression/EZP21089Test.php b/tests/integration/Core/Repository/Regression/EZP21089Test.php index 70b6d9a826..e41559e0e3 100644 --- a/tests/integration/Core/Repository/Regression/EZP21089Test.php +++ b/tests/integration/Core/Repository/Regression/EZP21089Test.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Regression; use DateTime; diff --git a/tests/integration/Core/Repository/Regression/EZP21109EzIntegerTest.php b/tests/integration/Core/Repository/Regression/EZP21109EzIntegerTest.php index 420c2a2046..33d02b7e95 100644 --- a/tests/integration/Core/Repository/Regression/EZP21109EzIntegerTest.php +++ b/tests/integration/Core/Repository/Regression/EZP21109EzIntegerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Regression; use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; @@ -67,9 +68,9 @@ public function testEzIntegerWithDefaultValues($integerValue) /** @var \Ibexa\Core\FieldType\Integer\Value $fieldValue */ $fieldValue = $content->getFieldValue('test'); - $this->assertInstanceOf(Value::class, $fieldValue); + self::assertInstanceOf(Value::class, $fieldValue); - $this->assertEquals($integerValue, $fieldValue->value); + self::assertEquals($integerValue, $fieldValue->value); $contentService->deleteContent($content->versionInfo->contentInfo); } diff --git a/tests/integration/Core/Repository/Regression/EZP21771EzStringTest.php b/tests/integration/Core/Repository/Regression/EZP21771EzStringTest.php index 605a4087d3..ae38b987b6 100644 --- a/tests/integration/Core/Repository/Regression/EZP21771EzStringTest.php +++ b/tests/integration/Core/Repository/Regression/EZP21771EzStringTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Regression; use Ibexa\Tests\Integration\Core\Repository\BaseTest; @@ -48,7 +49,7 @@ public function test11NumbersOnEzString() $content = $contentService->loadContent($draft->versionInfo->contentInfo->id); // finaly test if the value is done right - $this->assertEquals( + self::assertEquals( $content->versionInfo->names, ['eng-GB' => '12345678901'] ); diff --git a/tests/integration/Core/Repository/Regression/EZP21798Test.php b/tests/integration/Core/Repository/Regression/EZP21798Test.php index b19588a7c5..ea7221b4f2 100644 --- a/tests/integration/Core/Repository/Regression/EZP21798Test.php +++ b/tests/integration/Core/Repository/Regression/EZP21798Test.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Regression; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\SectionLimitation; @@ -89,7 +90,7 @@ public function testRoleChanges() } } while ($numPolicies > 0 && !$found); - $this->assertTrue($found, "Couldn't find policy with module 'content' and function 'read'"); + self::assertTrue($found, "Couldn't find policy with module 'content' and function 'read'"); $newPolicy = $roleService->newPolicyUpdateStruct(); $newLimitation = new SectionLimitation(); diff --git a/tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php b/tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php index 4b18b4ec55..e3435bcf7f 100644 --- a/tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php +++ b/tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Regression; use Ibexa\Contracts\Core\Repository\Values\Content\Query; @@ -66,8 +67,8 @@ protected function setUp(): void public function testSearchContentMultipleLocations(Query $query, $expectedResultCount) { $result = $this->getRepository()->getSearchService()->findContent($query); - $this->assertSame($expectedResultCount, $result->totalCount); - $this->assertSame($expectedResultCount, count($result->searchHits)); + self::assertSame($expectedResultCount, $result->totalCount); + self::assertSame($expectedResultCount, count($result->searchHits)); } public function searchContentQueryProvider() diff --git a/tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php b/tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php index f6fcb51f43..ad04aefdde 100644 --- a/tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php +++ b/tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Regression; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinitionCreateStruct; @@ -39,7 +40,7 @@ public function testRelationListIsUpdatedWhenRelatedObjectIsDeleted() $reloadedReferenceObject = $contentService->loadContent($referenceObject->id); /** @var \Ibexa\Core\FieldType\RelationList\Value */ $relationListValue = $reloadedReferenceObject->getFieldValue('relation_list'); - $this->assertSame([$targetObject2->id], $relationListValue->destinationContentIds); + self::assertSame([$targetObject2->id], $relationListValue->destinationContentIds); } public function testSingleRelationIsUpdatedWhenRelatedObjectIsDeleted() @@ -57,7 +58,7 @@ public function testSingleRelationIsUpdatedWhenRelatedObjectIsDeleted() $reloadedReferenceObject = $contentService->loadContent($referenceObject->id); /** @var \Ibexa\Core\FieldType\Relation\Value */ $relationValue = $reloadedReferenceObject->getFieldValue('single_relation'); - $this->assertEmpty($relationValue->destinationContentId); + self::assertEmpty($relationValue->destinationContentId); } private function createTestContentType() diff --git a/tests/integration/Core/Repository/Regression/EZP22409RelationListTypeStateTest.php b/tests/integration/Core/Repository/Regression/EZP22409RelationListTypeStateTest.php index 1b71d055a3..2c8933e351 100644 --- a/tests/integration/Core/Repository/Regression/EZP22409RelationListTypeStateTest.php +++ b/tests/integration/Core/Repository/Regression/EZP22409RelationListTypeStateTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Regression; use DateTime; diff --git a/tests/integration/Core/Repository/Regression/EZP22612URLAliasTranslations.php b/tests/integration/Core/Repository/Regression/EZP22612URLAliasTranslations.php index 837f92c35f..8623383b92 100644 --- a/tests/integration/Core/Repository/Regression/EZP22612URLAliasTranslations.php +++ b/tests/integration/Core/Repository/Regression/EZP22612URLAliasTranslations.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Regression; use Ibexa\Contracts\Core\Repository\Values\Content\URLAlias; @@ -54,7 +55,7 @@ public function testURLAliasLoadedInRightLanguage() $aliasService = $this->getRepository()->getURLAliasService(); $alias = $aliasService->lookup('common/alias'); - $this->assertInstanceOf( + self::assertInstanceOf( URLAlias::class, $alias ); diff --git a/tests/integration/Core/Repository/Regression/EZP22840RoleLimitations.php b/tests/integration/Core/Repository/Regression/EZP22840RoleLimitations.php index 66611cf4b5..6e9f64e5a2 100644 --- a/tests/integration/Core/Repository/Regression/EZP22840RoleLimitations.php +++ b/tests/integration/Core/Repository/Regression/EZP22840RoleLimitations.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Regression; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\NewObjectStateLimitation; @@ -81,7 +82,7 @@ public function testSectionRoleAssignLimitation() $permissionResolver->setCurrentUserReference($user); // try to login - $this->assertTrue( + self::assertTrue( $permissionResolver->canUser('user', 'login', new SiteAccess('test')), 'Could not verify that user can login with section limitation' ); diff --git a/tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php b/tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php index 721a21600c..96e5343265 100644 --- a/tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php +++ b/tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Regression; use Ibexa\Contracts\Core\Repository\Values\Content\Query; diff --git a/tests/integration/Core/Repository/Regression/EZP26327UrlAliasHistorizationTest.php b/tests/integration/Core/Repository/Regression/EZP26327UrlAliasHistorizationTest.php index ee9513e659..6fddc007a8 100644 --- a/tests/integration/Core/Repository/Regression/EZP26327UrlAliasHistorizationTest.php +++ b/tests/integration/Core/Repository/Regression/EZP26327UrlAliasHistorizationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Regression; use Ibexa\Tests\Integration\Core\Repository\BaseTest; @@ -48,8 +49,8 @@ public function testHistorization() $activeAlias = $urlAliasService->lookup('/name-gb'); $historyAlias = $urlAliasService->lookup('/name-us'); - $this->assertFalse($activeAlias->isHistory); - $this->assertTrue($historyAlias->isHistory); + self::assertFalse($activeAlias->isHistory); + self::assertTrue($historyAlias->isHistory); } } diff --git a/tests/integration/Core/Repository/Regression/EZP26367UrlAliasHistoryRedirectLoopTest.php b/tests/integration/Core/Repository/Regression/EZP26367UrlAliasHistoryRedirectLoopTest.php index b2b5d28aec..860906fc6d 100644 --- a/tests/integration/Core/Repository/Regression/EZP26367UrlAliasHistoryRedirectLoopTest.php +++ b/tests/integration/Core/Repository/Regression/EZP26367UrlAliasHistoryRedirectLoopTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Regression; use Ibexa\Tests\Integration\Core\Repository\BaseTest; @@ -64,8 +65,8 @@ public function testReverseLookupReturnsHistoryAlias() $urlAliasHistorized = $urlAliasService->lookup($historyPath); - $this->assertEquals($historyPath, $urlAliasHistorized->path); - $this->assertTrue($urlAliasHistorized->isHistory); + self::assertEquals($historyPath, $urlAliasHistorized->path); + self::assertTrue($urlAliasHistorized->isHistory); // Reverse lookup once to warm-up URL alias ID cache by Location ID @@ -73,8 +74,8 @@ public function testReverseLookupReturnsHistoryAlias() $locationService->loadLocation($article->contentInfo->mainLocationId) ); - $this->assertEquals($activePath, $urlAlias->path); - $this->assertFalse($urlAlias->isHistory); + self::assertEquals($activePath, $urlAlias->path); + self::assertFalse($urlAlias->isHistory); // Reverse lookup again to trigger return of URL alias object lookup cache by ID, // through URL alias ID cache by Location ID @@ -83,8 +84,8 @@ public function testReverseLookupReturnsHistoryAlias() $locationService->loadLocation($article->contentInfo->mainLocationId) ); - $this->assertEquals($activePath, $urlAlias->path); - $this->assertFalse($urlAlias->isHistory); + self::assertEquals($activePath, $urlAlias->path); + self::assertFalse($urlAlias->isHistory); } public function testLookupHistoryUrlReturnsActiveAlias() @@ -134,30 +135,30 @@ public function testLookupHistoryUrlReturnsActiveAlias() $locationService->loadLocation($article->contentInfo->mainLocationId) ); - $this->assertEquals($activePath, $urlAlias->path); - $this->assertFalse($urlAlias->isHistory); + self::assertEquals($activePath, $urlAlias->path); + self::assertFalse($urlAlias->isHistory); $urlAlias = $urlAliasService->reverseLookup( $locationService->loadLocation($article->contentInfo->mainLocationId) ); - $this->assertEquals($activePath, $urlAlias->path); - $this->assertFalse($urlAlias->isHistory); + self::assertEquals($activePath, $urlAlias->path); + self::assertFalse($urlAlias->isHistory); // Lookup history URL one to warm-up URL alias ID cache by URL $urlAliasHistorized = $urlAliasService->lookup($historyPath); - $this->assertEquals($historyPath, $urlAliasHistorized->path); - $this->assertTrue($urlAliasHistorized->isHistory); + self::assertEquals($historyPath, $urlAliasHistorized->path); + self::assertTrue($urlAliasHistorized->isHistory); // Lookup history URL again to trigger return of URL alias object reverse lookup cache by ID, // through URL alias ID cache by URL $urlAliasHistorized = $urlAliasService->lookup($historyPath); - $this->assertEquals($historyPath, $urlAliasHistorized->path); - $this->assertTrue($urlAliasHistorized->isHistory); + self::assertEquals($historyPath, $urlAliasHistorized->path); + self::assertTrue($urlAliasHistorized->isHistory); } } diff --git a/tests/integration/Core/Repository/Regression/EZP26551DeleteContentTypeDraftTest.php b/tests/integration/Core/Repository/Regression/EZP26551DeleteContentTypeDraftTest.php index c2f3ad147e..65ad643479 100644 --- a/tests/integration/Core/Repository/Regression/EZP26551DeleteContentTypeDraftTest.php +++ b/tests/integration/Core/Repository/Regression/EZP26551DeleteContentTypeDraftTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Regression; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; @@ -11,6 +12,7 @@ /** * @issue https://issues.ibexa.co/browse/EZP-26551 + * * @group regression * @group ezp26551 */ @@ -43,7 +45,7 @@ public function testDeleteContentTypeGroup() try { $contentTypeService->deleteContentTypeGroup($contentTypeGroup); } catch (InvalidArgumentException $e) { - $this->fail( + self::fail( "ContentTypeGroup can't be deleted because it has ContentType instances" ); } diff --git a/tests/integration/Core/Repository/Regression/EZP28799SubtreeSearchTest.php b/tests/integration/Core/Repository/Regression/EZP28799SubtreeSearchTest.php index 5d28154928..ae0f128a92 100644 --- a/tests/integration/Core/Repository/Regression/EZP28799SubtreeSearchTest.php +++ b/tests/integration/Core/Repository/Regression/EZP28799SubtreeSearchTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Regression; use Ibexa\Contracts\Core\Repository\Values\Content\Query; @@ -79,7 +80,7 @@ public function testConflictingConditions() $searchService = $this->getRepository()->getSearchService(); $result = $searchService->findContent($query); - $this->assertSame(0, $result->totalCount); + self::assertSame(0, $result->totalCount); } public function testNegativeSubtree() @@ -100,7 +101,7 @@ public function testNegativeSubtree() $searchService = $this->getRepository()->getSearchService(); $result = $searchService->findContent($query); - $this->assertSame(0, $result->totalCount); + self::assertSame(0, $result->totalCount); } } diff --git a/tests/integration/Core/Repository/Regression/EnvTest.php b/tests/integration/Core/Repository/Regression/EnvTest.php index ec7a08559d..88ef62da4c 100644 --- a/tests/integration/Core/Repository/Regression/EnvTest.php +++ b/tests/integration/Core/Repository/Regression/EnvTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Regression; use Ibexa\Core\Persistence\Cache\Adapter\TransactionalInMemoryCacheAdapter; @@ -24,22 +25,22 @@ public function testVerifyCacheDriver() { $pool = $this->getSetupFactory()->getServiceContainer()->get('ibexa.cache_pool'); - $this->assertInstanceOf(TransactionalInMemoryCacheAdapter::class, $pool); + self::assertInstanceOf(TransactionalInMemoryCacheAdapter::class, $pool); $reflectionDecoratedPool = new \ReflectionProperty($pool, 'sharedPool'); $reflectionDecoratedPool->setAccessible(true); $pool = $reflectionDecoratedPool->getValue($pool); - $this->assertInstanceOf(TagAwareAdapter::class, $pool); + self::assertInstanceOf(TagAwareAdapter::class, $pool); $reflectionPool = new \ReflectionProperty($pool, 'pool'); $reflectionPool->setAccessible(true); $innerPool = $reflectionPool->getValue($pool); if (getenv('CUSTOM_CACHE_POOL') === 'singleredis') { - $this->assertInstanceOf(RedisAdapter::class, $innerPool); + self::assertInstanceOf(RedisAdapter::class, $innerPool); } else { - $this->assertInstanceOf(ArrayAdapter::class, $innerPool); + self::assertInstanceOf(ArrayAdapter::class, $innerPool); } } } diff --git a/tests/integration/Core/Repository/Regression/PureNegativeQueryTest.php b/tests/integration/Core/Repository/Regression/PureNegativeQueryTest.php index 5e507e5b15..783866aefe 100644 --- a/tests/integration/Core/Repository/Regression/PureNegativeQueryTest.php +++ b/tests/integration/Core/Repository/Regression/PureNegativeQueryTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Regression; use Ibexa\Contracts\Core\Repository\Values\Content\LocationQuery; @@ -24,7 +25,7 @@ public function providerForTestMatchAll() $query = new Query(['filter' => new Criterion\MatchAll()]); $result = $this->getRepository()->getSearchService()->findContent($query); // Sanity check - $this->assertGreaterThan(0, $result->totalCount); + self::assertGreaterThan(0, $result->totalCount); $totalCount = $result->totalCount; $contentId = 12; @@ -228,7 +229,7 @@ public function testMatchAllContentInfoQuery($criterion, $totalCount) $result = $this->getRepository()->getSearchService()->findContentInfo($query); - $this->assertEquals($totalCount, $result->totalCount); + self::assertEquals($totalCount, $result->totalCount); } /** @@ -247,7 +248,7 @@ public function testMatchAllContentInfoFilter($criterion, $totalCount) $result = $this->getRepository()->getSearchService()->findContentInfo($query); - $this->assertEquals($totalCount, $result->totalCount); + self::assertEquals($totalCount, $result->totalCount); } /** @@ -266,7 +267,7 @@ public function testMatchAllLocationQuery($criterion, $totalCount) $result = $this->getRepository()->getSearchService()->findLocations($query); - $this->assertEquals($totalCount, $result->totalCount); + self::assertEquals($totalCount, $result->totalCount); } /** @@ -285,7 +286,7 @@ public function testMatchAllLocationFilter($criterion, $totalCount) $result = $this->getRepository()->getSearchService()->findLocations($query); - $this->assertEquals($totalCount, $result->totalCount); + self::assertEquals($totalCount, $result->totalCount); } } diff --git a/tests/integration/Core/Repository/RepositoryTest.php b/tests/integration/Core/Repository/RepositoryTest.php index 8b66866183..5e0e2a3dc6 100644 --- a/tests/integration/Core/Repository/RepositoryTest.php +++ b/tests/integration/Core/Repository/RepositoryTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Exception; @@ -28,6 +29,7 @@ * Test case for operations in the Repository using in memory storage. * * @covers \Ibexa\Contracts\Core\Repository\Repository + * * @group integration */ class RepositoryTest extends BaseTest @@ -37,7 +39,7 @@ class RepositoryTest extends BaseTest */ public function testGetRepository() { - $this->assertInstanceOf(Repository::class, $this->getSetupFactory()->getRepository(true)); + self::assertInstanceOf(Repository::class, $this->getSetupFactory()->getRepository(true)); } /** @@ -137,7 +139,7 @@ public function testGetUserService() public function testGetNotificationService() { $repository = $this->getRepository(); - $this->assertInstanceOf( + self::assertInstanceOf( NotificationService::class, $repository->getNotificationService() ); diff --git a/tests/integration/Core/Repository/RoleServiceAuthorizationTest.php b/tests/integration/Core/Repository/RoleServiceAuthorizationTest.php index 7f6ff1873b..58e76ab082 100644 --- a/tests/integration/Core/Repository/RoleServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/RoleServiceAuthorizationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -13,6 +14,7 @@ * Test case for operations in the RoleService using in memory storage. * * @covers \Ibexa\Contracts\Core\Repository\RoleService + * * @group integration * @group authorization */ @@ -22,6 +24,7 @@ class RoleServiceAuthorizationTest extends BaseTest * Test for the createRole() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::createRole() + * * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testCreateRole * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ @@ -53,6 +56,7 @@ public function testCreateRoleThrowsUnauthorizedException() * Test for the loadRole() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::loadRole() + * * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testLoadRole * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ @@ -81,6 +85,7 @@ public function testLoadRoleThrowsUnauthorizedException() * Test for the loadRoleByIdentifier() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::loadRoleByIdentifier() + * * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testLoadRoleByIdentifier * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ @@ -125,7 +130,7 @@ public function testLoadRolesLoadsEmptyListForAnonymousUser() $roleService = $repository->getRoleService(); /* END: Use Case */ - $this->assertEquals([], $roleService->loadRoles()); + self::assertEquals([], $roleService->loadRoles()); } /** @@ -155,13 +160,14 @@ public function testLoadRolesForUserWithSubtreeLimitation() $repository->getPermissionResolver()->setCurrentUserReference($user); /* END: Use Case */ - $this->assertCount(6, $roleService->loadRoles()); + self::assertCount(6, $roleService->loadRoles()); } /** * Test for the deleteRole() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::deleteRole() + * * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testDeleteRole * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ @@ -190,6 +196,7 @@ public function testDeleteRoleThrowsUnauthorizedException() * Test for the updatePolicy() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::updatePolicyByRoleDraft() + * * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testUpdatePolicyByRoleDraft * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ @@ -237,6 +244,7 @@ public function testUpdatePolicyByRoleDraftThrowsUnauthorizedException() * Test for the removePolicy() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::removePolicy() + * * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testRemovePolicyByRoleDraft * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ @@ -279,6 +287,7 @@ public function testRemovePolicyThrowsUnauthorizedException() * Test for the removePolicyByRoleDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::removePolicyByRoleDraft() + * * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testRemovePolicyByRoleDraft * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ @@ -312,6 +321,7 @@ public function testDeletePolicyThrowsUnauthorizedException() * Test for the assignRoleToUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::assignRoleToUserGroup() + * * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testAssignRoleToUserGroup * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ @@ -346,6 +356,7 @@ public function testAssignRoleToUserGroupThrowsUnauthorizedException() * Test for the assignRoleToUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::assignRoleToUserGroup($role, $userGroup, $roleLimitation) + * * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testAssignRoleToUserGroup * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ @@ -387,6 +398,7 @@ public function testAssignRoleToUserGroupThrowsUnauthorizedExceptionWithRoleLimi * Test for the removeRoleAssignment() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::removeRoleAssignment() + * * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testRemoveRoleAssignmentFromUserGroup * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ @@ -430,6 +442,7 @@ public function testRemoveRoleAssignmentFromUserGroupThrowsUnauthorizedException * Test for the assignRoleToUser() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::assignRoleToUser() + * * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testAssignRoleToUser * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ @@ -458,6 +471,7 @@ public function testAssignRoleToUserThrowsUnauthorizedException() * Test for the assignRoleToUser() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::assignRoleToUser($role, $user, $roleLimitation) + * * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testAssignRoleToUser * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ @@ -493,6 +507,7 @@ public function testAssignRoleToUserThrowsUnauthorizedExceptionWithRoleLimitatio * Test for the removeRoleAssignment() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::removeRoleAssignment() + * * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testRemoveRoleAssignment * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ @@ -529,6 +544,7 @@ public function testRemoveRoleAssignmentThrowsUnauthorizedException() * Test for the getRoleAssignments() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::getRoleAssignments() + * * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testGetRoleAssignments * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ @@ -572,7 +588,7 @@ public function testGetRoleAssignmentsForUserLoadsEmptyListForAnonymousUser() $repository->getPermissionResolver()->setCurrentUserReference($user); /* END: Use Case */ - $this->assertSame([], $roleService->getRoleAssignmentsForUser($user)); + self::assertSame([], $roleService->getRoleAssignmentsForUser($user)); } /** @@ -598,16 +614,17 @@ public function testGetRoleAssignmentsForUserWithSubtreeLimitation() /* END: Use Case */ $roleAssignments = $roleService->getRoleAssignmentsForUser($user); - $this->assertCount(1, $roleAssignments); + self::assertCount(1, $roleAssignments); $roleAssignment = $roleAssignments[0]; - $this->assertSame($user, $roleAssignment->user); + self::assertSame($user, $roleAssignment->user); } /** * Test for the getRoleAssignmentsForUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::getRoleAssignmentsForUserGroup() + * * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testGetRoleAssignmentsForUserGroup * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ diff --git a/tests/integration/Core/Repository/RoleServiceTest.php b/tests/integration/Core/Repository/RoleServiceTest.php index 09d1aebd5c..63658b8206 100644 --- a/tests/integration/Core/Repository/RoleServiceTest.php +++ b/tests/integration/Core/Repository/RoleServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Exception; @@ -48,6 +49,7 @@ *
    * * @covers \Ibexa\Contracts\Core\Repository\RoleService + * * @group role */ class RoleServiceTest extends BaseTest @@ -64,7 +66,7 @@ public function testNewRoleCreateStruct() $roleService = $repository->getRoleService(); $roleCreate = $roleService->newRoleCreateStruct('roleName'); - $this->assertInstanceOf(RoleCreateStruct::class, $roleCreate); + self::assertInstanceOf(RoleCreateStruct::class, $roleCreate); } /** @@ -77,14 +79,15 @@ public function testNewRoleCopyStruct(): void $roleService = $repository->getRoleService(); $roleCopy = $roleService->newRoleCopyStruct('copiedRole'); - $this->assertSame('copiedRole', $roleCopy->newIdentifier); - $this->assertSame([], $roleCopy->getPolicies()); + self::assertSame('copiedRole', $roleCopy->newIdentifier); + self::assertSame([], $roleCopy->getPolicies()); } /** * Test for the newRoleCreateStruct() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::newRoleCreateStruct() + * * @depends testNewRoleCreateStruct */ public function testNewRoleCreateStructSetsNamePropertyOnStruct() @@ -98,13 +101,14 @@ public function testNewRoleCreateStructSetsNamePropertyOnStruct() /* END: Use Case */ - $this->assertEquals('roleName', $roleCreate->identifier); + self::assertEquals('roleName', $roleCreate->identifier); } /** * Test for the createRole() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::createRole() + * * @depends testNewRoleCreateStruct */ public function testCreateRole() @@ -138,6 +142,7 @@ public function testCreateRole() * Test for the createRole() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::createRole() + * * @depends testCreateRole */ public function testRoleCreateStructValues(array $data) @@ -145,7 +150,7 @@ public function testRoleCreateStructValues(array $data) $createStruct = $data['createStruct']; $role = $data['role']; - $this->assertEquals( + self::assertEquals( [ 'identifier' => $createStruct->identifier, 'policies' => $createStruct->policies, @@ -155,7 +160,7 @@ public function testRoleCreateStructValues(array $data) 'policies' => $role->policies, ] ); - $this->assertNotNull($role->id); + self::assertNotNull($role->id); return $data; } @@ -164,6 +169,7 @@ public function testRoleCreateStructValues(array $data) * Test for the createRole() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::createRole() + * * @depends testNewRoleCreateStruct */ public function testCreateRoleWithPolicy() @@ -196,7 +202,7 @@ public function testCreateRoleWithPolicy() /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( RoleDraft::class, $role ); @@ -211,6 +217,7 @@ public function testCreateRoleWithPolicy() * Test for the createRole() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::createRole() + * * @depends testCreateRoleWithPolicy */ public function testRoleCreateStructValuesWithPolicy(array $data) @@ -218,7 +225,7 @@ public function testRoleCreateStructValuesWithPolicy(array $data) $createStruct = $data['createStruct']; $role = $data['role']; - $this->assertEquals( + self::assertEquals( [ 'identifier' => $createStruct->identifier, 'policy_module' => $createStruct->policies[0]->module, @@ -232,7 +239,7 @@ public function testRoleCreateStructValuesWithPolicy(array $data) 'policy_limitation' => array_values($role->policies[0]->limitations), ] ); - $this->assertNotNull($role->id); + self::assertNotNull($role->id); return $data; } @@ -332,6 +339,7 @@ public function testCreateRoleWithMultiplePolicies() * Test for the createRoleDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::createRoleDraft() + * * @depends testNewRoleCreateStruct */ public function testCreateRoleDraft() @@ -353,7 +361,7 @@ public function testCreateRoleDraft() /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( RoleDraft::class, $newRoleDraft ); @@ -363,6 +371,7 @@ public function testCreateRoleDraft() * Test for the createRole() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::createRole() + * * @depends testCreateRole */ public function testCreateRoleThrowsInvalidArgumentException() @@ -389,6 +398,7 @@ public function testCreateRoleThrowsInvalidArgumentException() * Test for the createRoleDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::createRoleDraft() + * * @depends testCreateRoleDraft */ public function testCreateRoleDraftThrowsInvalidArgumentException() @@ -460,6 +470,7 @@ public function testCreateRoleThrowsLimitationValidationException() * Test for the createRole() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::createRole() + * * @depends testNewRoleCreateStruct */ public function testCreateRoleInTransactionWithRollback() @@ -489,13 +500,14 @@ public function testCreateRoleInTransactionWithRollback() } /* END: Use Case */ - $this->fail('Role object still exists after rollback.'); + self::fail('Role object still exists after rollback.'); } /** * Test for the createRoleDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::createRoleDraft() + * * @depends testNewRoleCreateStruct */ public function testCreateRoleDraftInTransactionWithRollback() @@ -525,7 +537,7 @@ public function testCreateRoleDraftInTransactionWithRollback() } /* END: Use Case */ - $this->fail('Role draft object still exists after rollback.'); + self::fail('Role draft object still exists after rollback.'); } public function providerForCopyRoleTests(): array @@ -572,6 +584,7 @@ public function providerForCopyRoleTests(): array * @dataProvider providerForCopyRoleTests * * @covers \Ibexa\Contracts\Core\Repository\RoleService::copyRole + * * @depends testNewRoleCopyStruct * @depends testLoadRoleByIdentifier * @@ -597,9 +610,9 @@ public function testCopyRole(RoleCreateStruct $roleCreateStruct, RoleCopyStruct // Now verify that our change was saved $role = $roleService->loadRoleByIdentifier('copiedRole'); - $this->assertEquals($role->id, $copiedRole->id); - $this->assertEquals('copiedRole', $role->identifier); - $this->assertEmpty($role->getPolicies()); + self::assertEquals($role->id, $copiedRole->id); + self::assertEquals('copiedRole', $role->identifier); + self::assertEmpty($role->getPolicies()); } /** @@ -608,6 +621,7 @@ public function testCopyRole(RoleCreateStruct $roleCreateStruct, RoleCopyStruct * @dataProvider providerForCopyRoleTests * * @covers \Ibexa\Contracts\Core\Repository\RoleService::copyRole + * * @depends testNewRoleCopyStruct * @depends testLoadRoleByIdentifier * @@ -642,7 +656,7 @@ public function testCopyRoleWithPolicies( // Now verify that our change was saved $role = $roleService->loadRoleByIdentifier('copiedRole'); - $this->assertEquals($role->getPolicies(), $copiedRole->getPolicies()); + self::assertEquals($role->getPolicies(), $copiedRole->getPolicies()); } /** @@ -651,6 +665,7 @@ public function testCopyRoleWithPolicies( * @dataProvider providerForCopyRoleTests * * @covers \Ibexa\Contracts\Core\Repository\RoleService::copyRole + * * @depends testNewRoleCopyStruct * @depends testLoadRoleByIdentifier * @@ -695,9 +710,9 @@ public function testCopyRoleWithPoliciesAndLimitations( $limitationsCopied[$policy->function] = $policy->getLimitations(); } - $this->assertEquals($role->getPolicies(), $copiedRole->getPolicies()); + self::assertEquals($role->getPolicies(), $copiedRole->getPolicies()); foreach ($limitations as $policy => $limitation) { - $this->assertEquals($limitation, $limitationsCopied[$policy]); + self::assertEquals($limitation, $limitationsCopied[$policy]); } } @@ -705,6 +720,7 @@ public function testCopyRoleWithPoliciesAndLimitations( * Test for the loadRole() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::loadRole() + * * @depends testCreateRole */ public function testLoadRole() @@ -727,7 +743,7 @@ public function testLoadRole() /* END: Use Case */ - $this->assertEquals('roleName', $role->identifier); + self::assertEquals('roleName', $role->identifier); } /** @@ -754,7 +770,7 @@ public function testLoadRoleDraft() /* END: Use Case */ - $this->assertEquals('roleName', $role->identifier); + self::assertEquals('roleName', $role->identifier); } public function testLoadRoleDraftByRoleId() @@ -787,6 +803,7 @@ public function testLoadRoleDraftByRoleId() * Test for the loadRole() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::loadRole() + * * @depends testLoadRole */ public function testLoadRoleThrowsNotFoundException() @@ -810,6 +827,7 @@ public function testLoadRoleThrowsNotFoundException() * Test for the loadRoleDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::loadRoleDraft() + * * @depends testLoadRoleDraft */ public function testLoadRoleDraftThrowsNotFoundException() @@ -850,6 +868,7 @@ public function testLoadRoleDraftByRoleIdThrowsNotFoundException() * Test for the loadRoleByIdentifier() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::loadRoleByIdentifier() + * * @depends testCreateRole */ public function testLoadRoleByIdentifier() @@ -872,13 +891,14 @@ public function testLoadRoleByIdentifier() /* END: Use Case */ - $this->assertEquals('roleName', $role->identifier); + self::assertEquals('roleName', $role->identifier); } /** * Test for the loadRoleByIdentifier() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::loadRoleByIdentifier() + * * @depends testLoadRoleByIdentifier */ public function testLoadRoleByIdentifierThrowsNotFoundException() @@ -901,6 +921,7 @@ public function testLoadRoleByIdentifierThrowsNotFoundException() * Test for the loadRoles() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::loadRoles() + * * @depends testCreateRole */ public function testLoadRoles() @@ -930,13 +951,14 @@ public function testLoadRoles() /* END: Use Case */ - $this->assertEquals('roleName', $role->identifier); + self::assertEquals('roleName', $role->identifier); } /** * Test for the loadRoles() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::loadRoles() + * * @depends testLoadRoles */ public function testLoadRolesReturnsExpectedSetOfDefaultRoles() @@ -954,7 +976,7 @@ public function testLoadRolesReturnsExpectedSetOfDefaultRoles() } /* END: Use Case */ - $this->assertEqualsCanonicalizing( + self::assertEqualsCanonicalizing( [ 'Administrator', 'Anonymous', @@ -987,6 +1009,7 @@ public function testNewRoleUpdateStruct() * Test for the updateRoleDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::updateRoleDraft() + * * @depends testNewRoleUpdateStruct * @depends testLoadRoleDraft */ @@ -1012,13 +1035,14 @@ public function testUpdateRoleDraft() // Now verify that our change was saved $role = $roleService->loadRoleDraft($updatedRole->id); - $this->assertEquals($role->identifier, 'updatedRole'); + self::assertEquals($role->identifier, 'updatedRole'); } /** * Test for the updateRoleDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::updateRoleDraft() + * * @depends testUpdateRoleDraft */ public function testUpdateRoleDraftThrowsInvalidArgumentException() @@ -1048,6 +1072,7 @@ public function testUpdateRoleDraftThrowsInvalidArgumentException() * Test for the deleteRole() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::deleteRole() + * * @depends testCreateRole * @depends testLoadRoles */ @@ -1069,13 +1094,14 @@ public function testDeleteRole() $roleService->deleteRole($role); /* END: Use Case */ - $this->assertCount(5, $roleService->loadRoles()); + self::assertCount(5, $roleService->loadRoles()); } /** * Test for the deleteRoleDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::deleteRoleDraft() + * * @depends testLoadRoleDraft */ public function testDeleteRoleDraft() @@ -1121,6 +1147,7 @@ public function testNewPolicyCreateStruct() * Test for the newPolicyCreateStruct() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::newPolicyCreateStruct() + * * @depends testNewPolicyCreateStruct */ public function testNewPolicyCreateStructSetsStructProperties() @@ -1132,7 +1159,7 @@ public function testNewPolicyCreateStructSetsStructProperties() $policyCreate = $roleService->newPolicyCreateStruct('content', 'create'); /* END: Use Case */ - $this->assertEquals( + self::assertEquals( ['content', 'create'], [$policyCreate->module, $policyCreate->function] ); @@ -1142,6 +1169,7 @@ public function testNewPolicyCreateStructSetsStructProperties() * Test for the addPolicyByRoleDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::addPolicyByRoleDraft() + * * @depends testCreateRoleDraft * @depends testNewPolicyCreateStruct */ @@ -1183,7 +1211,7 @@ static function ($p1, $p2) { } ); - $this->assertEquals( + self::assertEquals( [ [ 'module' => 'content', @@ -1204,6 +1232,7 @@ static function ($p1, $p2) { * @return array [\Ibexa\Contracts\Core\Repository\Values\User\RoleDraft, \Ibexa\Contracts\Core\Repository\Values\User\Policy] * * @covers \Ibexa\Contracts\Core\Repository\RoleService::addPolicyByRoleDraft() + * * @depends testAddPolicyByRoleDraft */ public function testAddPolicyByRoleDraftUpdatesRole() @@ -1231,7 +1260,7 @@ public function testAddPolicyByRoleDraftUpdatesRole() } /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( Policy::class, $policy ); @@ -1245,13 +1274,14 @@ public function testAddPolicyByRoleDraftUpdatesRole() * @param array $roleAndPolicy * * @covers \Ibexa\Contracts\Core\Repository\RoleService::addPolicyByRoleDraft() + * * @depends testAddPolicyByRoleDraftUpdatesRole */ public function testAddPolicyByRoleDraftSetsPolicyProperties($roleAndPolicy) { list($role, $policy) = $roleAndPolicy; - $this->assertEquals( + self::assertEquals( [$role->id, 'content', 'create'], [$policy->roleId, $policy->module, $policy->function] ); @@ -1261,6 +1291,7 @@ public function testAddPolicyByRoleDraftSetsPolicyProperties($roleAndPolicy) * Test for the addPolicyByRoleDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::addPolicyByRoleDraft() + * * @depends testNewPolicyCreateStruct * @depends testCreateRoleDraft */ @@ -1301,6 +1332,7 @@ public function testAddPolicyByRoleDraftThrowsLimitationValidationException() * Test for the createRole() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::createRole() + * * @depends testAddPolicyByRoleDraftUpdatesRole */ public function testCreateRoleWithAddPolicy() @@ -1342,7 +1374,7 @@ public function testCreateRoleWithAddPolicy() /* END: Use Case */ array_multisort($policies); - $this->assertEquals( + self::assertEquals( [ [ 'module' => 'content', @@ -1361,6 +1393,7 @@ public function testCreateRoleWithAddPolicy() * Test for the createRoleDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::createRoleDraft() + * * @depends testAddPolicyByRoleDraftUpdatesRole */ public function testCreateRoleDraftWithAddPolicy() @@ -1399,7 +1432,7 @@ public function testCreateRoleDraftWithAddPolicy() } /* END: Use Case */ - $this->assertEquals( + self::assertEquals( [ [ 'module' => 'content', @@ -1480,7 +1513,7 @@ public function testUpdatePolicyByRoleDraftNoLimitation() /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( Policy::class, $policy ); @@ -1492,6 +1525,7 @@ public function testUpdatePolicyByRoleDraftNoLimitation() * @return array * * @covers \Ibexa\Contracts\Core\Repository\RoleService::updatePolicyByRoleDraft() + * * @depends testAddPolicyByRoleDraft * @depends testNewPolicyUpdateStruct */ @@ -1557,7 +1591,7 @@ public function testUpdatePolicyByRoleDraft() /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( Policy::class, $policy ); @@ -1569,13 +1603,14 @@ public function testUpdatePolicyByRoleDraft() * @param array $roleAndPolicy * * @covers \Ibexa\Contracts\Core\Repository\RoleService::testUpdatePolicyByRoleDraft() + * * @depends testUpdatePolicyByRoleDraft */ public function testUpdatePolicyUpdatesLimitations($roleAndPolicy) { list($role, $policy) = $roleAndPolicy; - $this->assertEquals( + self::assertEquals( [ new ContentTypeLimitation( [ @@ -1595,6 +1630,7 @@ public function testUpdatePolicyUpdatesLimitations($roleAndPolicy) * @param \Ibexa\Contracts\Core\Repository\Values\User\Role $role * * @covers \Ibexa\Contracts\Core\Repository\RoleService::updatePolicyByRoleDraft() + * * @depends testUpdatePolicyUpdatesLimitations */ public function testUpdatePolicyUpdatesRole($role) @@ -1606,8 +1642,8 @@ public function testUpdatePolicyUpdatesRole($role) } } - $this->assertCount(1, $limitations); - $this->assertInstanceOf( + self::assertCount(1, $limitations); + self::assertInstanceOf( Limitation::class, $limitations[0] ); @@ -1625,6 +1661,7 @@ public function testUpdatePolicyUpdatesRole($role) * Test for the updatePolicy() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::updatePolicyByRoleDraft() + * * @depends testAddPolicyByRoleDraft * @depends testNewPolicyCreateStruct * @depends testNewPolicyUpdateStruct @@ -1698,6 +1735,7 @@ public function testUpdatePolicyByRoleDraftThrowsLimitationValidationException() * Test for the removePolicyByRoleDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::removePolicyByRoleDraft() + * * @depends testAddPolicyByRoleDraft */ public function testRemovePolicyByRoleDraft() @@ -1730,7 +1768,7 @@ public function testRemovePolicyByRoleDraft() } /* END: Use Case */ - $this->assertSame([], $roleDraft->getPolicies()); + self::assertSame([], $roleDraft->getPolicies()); } /** @@ -1775,7 +1813,7 @@ public function testAddPolicyWithRoleAssignment() $roleAssignmentsAfterNewPolicy = $roleService->getRoleAssignments($roleAfterUpdate)[0]; /* END: Use Case */ - $this->assertNotEquals($roleAssignmentsBeforeNewPolicy->id, $roleAssignmentsAfterNewPolicy->id); + self::assertNotEquals($roleAssignmentsBeforeNewPolicy->id, $roleAssignmentsAfterNewPolicy->id); } /** @@ -1794,7 +1832,7 @@ public function testLoadRoleAssignment() $user = $repository->getUserService()->loadUser(14); // Check initial empty assignments (also warms up potential cache to validate it is correct below) - $this->assertCount(0, $roleService->getRoleAssignmentsForUser($user)); + self::assertCount(0, $roleService->getRoleAssignmentsForUser($user)); // Assignment to user group $groupRoleAssignment = $roleService->loadRoleAssignment(25); @@ -1809,7 +1847,7 @@ public function testLoadRoleAssignment() self::assertInstanceOf(UserGroupRoleAssignment::class, $groupRoleAssignment); - $this->assertEquals( + self::assertEquals( [ 12, 2, @@ -1834,6 +1872,7 @@ public function testLoadRoleAssignment() * @return \Ibexa\Contracts\Core\Repository\Values\User\RoleAssignment[] * * @covers \Ibexa\Contracts\Core\Repository\RoleService::getRoleAssignments() + * * @depends testLoadRoleByIdentifier */ public function testGetRoleAssignments() @@ -1851,12 +1890,12 @@ public function testGetRoleAssignments() /* END: Use Case */ - $this->assertCount(2, $roleAssignments); - $this->assertInstanceOf( + self::assertCount(2, $roleAssignments); + self::assertInstanceOf( UserGroupRoleAssignment::class, $roleAssignments[0] ); - $this->assertInstanceOf( + self::assertInstanceOf( UserGroupRoleAssignment::class, $roleAssignments[1] ); @@ -1870,11 +1909,12 @@ public function testGetRoleAssignments() * @param \Ibexa\Contracts\Core\Repository\Values\User\RoleAssignment[] $roleAssignments * * @covers \Ibexa\Contracts\Core\Repository\RoleService::getRoleAssignments + * * @depends testGetRoleAssignments */ public function testGetRoleAssignmentsContainExpectedLimitation(array $roleAssignments) { - $this->assertEquals( + self::assertEquals( 'Subtree', reset($roleAssignments)->limitation->getIdentifier() ); @@ -1978,6 +2018,7 @@ public function testCountRoleAssignmentsAfterDeletingUser(): void * Test for the assignRoleToUser() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::assignRoleToUser() + * * @depends testGetRoleAssignments */ public function testAssignRoleToUser() @@ -1999,13 +2040,14 @@ public function testAssignRoleToUser() /* END: Use Case */ // Administrator + Example User - $this->assertCount(2, $roleAssignments); + self::assertCount(2, $roleAssignments); } /** * Test for the assignRoleToUser() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::assignRoleToUser($role, $user, $roleLimitation) + * * @depends testAssignRoleToUser */ public function testAssignRoleToUserWithRoleLimitation() @@ -2035,14 +2077,14 @@ public function testAssignRoleToUserWithRoleLimitation() /* END: Use Case */ // Members + Partners + Anonymous + Example User - $this->assertCount(4, $roleAssignments); + self::assertCount(4, $roleAssignments); // Get the role limitation $roleLimitation = null; foreach ($roleAssignments as $roleAssignment) { $roleLimitation = $roleAssignment->getRoleLimitation(); if ($roleLimitation) { - $this->assertInstanceOf( + self::assertInstanceOf( UserRoleAssignment::class, $roleAssignment ); @@ -2050,7 +2092,7 @@ public function testAssignRoleToUserWithRoleLimitation() } } - $this->assertEquals( + self::assertEquals( new SubtreeLimitation( [ 'limitationValues' => ['/1/43/'], @@ -2074,14 +2116,14 @@ public function testAssignRoleToUserWithRoleLimitation() $roleAssignments = $roleService->getRoleAssignments($role); // Members + Partners + Anonymous + Example User - $this->assertCount(5, $roleAssignments); + self::assertCount(5, $roleAssignments); // Get the role limitation $roleLimitations = []; foreach ($roleAssignments as $roleAssignment) { $roleLimitation = $roleAssignment->getRoleLimitation(); if ($roleLimitation) { - $this->assertInstanceOf( + self::assertInstanceOf( UserRoleAssignment::class, $roleAssignment ); @@ -2090,7 +2132,7 @@ public function testAssignRoleToUserWithRoleLimitation() } array_multisort($roleLimitations); - $this->assertEquals( + self::assertEquals( [ new SubtreeLimitation( [ @@ -2111,6 +2153,7 @@ public function testAssignRoleToUserWithRoleLimitation() * Test for the assignRoleToUser() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::assignRoleToUser($role, $user, $roleLimitation) + * * @depends testAssignRoleToUser * @depends testLoadRoleByIdentifier */ @@ -2152,6 +2195,7 @@ public function testAssignRoleToUserWithRoleLimitationThrowsLimitationValidation * Makes sure assigning role several times throws. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::assignRoleToUser($role, $user, $roleLimitation) + * * @depends testAssignRoleToUser * @depends testLoadRoleByIdentifier */ @@ -2179,7 +2223,7 @@ public function testAssignRoleToUserThrowsInvalidArgumentException() $currentUser ); } catch (Exception $e) { - $this->fail('Got exception at first valid attempt to assign role'); + self::fail('Got exception at first valid attempt to assign role'); } // Re-Assign the "Anonymous" role to the current user @@ -2197,6 +2241,7 @@ public function testAssignRoleToUserThrowsInvalidArgumentException() * Makes sure assigning role several times with same limitations throws. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::assignRoleToUser($role, $user, $roleLimitation) + * * @depends testAssignRoleToUser * @depends testLoadRoleByIdentifier */ @@ -2229,7 +2274,7 @@ public function testAssignRoleToUserWithRoleLimitationThrowsInvalidArgumentExcep ) ); } catch (Exception $e) { - $this->fail('Got exception at first valid attempt to assign role'); + self::fail('Got exception at first valid attempt to assign role'); } // Re-Assign the "Anonymous" role to the current user @@ -2250,6 +2295,7 @@ public function testAssignRoleToUserWithRoleLimitationThrowsInvalidArgumentExcep * Test for the removeRoleAssignment() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::removeRoleAssignment() + * * @depends testAssignRoleToUser */ public function testRemoveRoleAssignment() @@ -2278,13 +2324,14 @@ public function testRemoveRoleAssignment() /* END: Use Case */ // Members + Editors + Partners - $this->assertCount(3, $roleAssignments); + self::assertCount(3, $roleAssignments); } /** * Test for the getRoleAssignmentsForUser() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::getRoleAssignmentsForUser() + * * @depends testAssignRoleToUser * @depends testCreateRoleWithAddPolicy */ @@ -2318,8 +2365,8 @@ public function testGetRoleAssignmentsForUserDirect() $role = $roleService->loadRole($roleDraft->id); // Check inital empty assigments (also warms up potential cache to validate it is correct below) - $this->assertCount(0, $roleService->getRoleAssignmentsForUser($user)); - $this->assertCount(0, $roleService->getRoleAssignments($role)); + self::assertCount(0, $roleService->getRoleAssignmentsForUser($user)); + self::assertCount(0, $roleService->getRoleAssignments($role)); // Assign role to new user $roleService->assignRoleToUser($role, $user); @@ -2328,18 +2375,19 @@ public function testGetRoleAssignmentsForUserDirect() $roleAssignments = $roleService->getRoleAssignmentsForUser($user); /* END: Use Case */ - $this->assertCount(1, $roleAssignments); - $this->assertInstanceOf( + self::assertCount(1, $roleAssignments); + self::assertInstanceOf( UserRoleAssignment::class, reset($roleAssignments) ); - $this->assertCount(1, $roleService->getRoleAssignments($role)); + self::assertCount(1, $roleService->getRoleAssignments($role)); } /** * Test for the getRoleAssignmentsForUser() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::getRoleAssignmentsForUser() + * * @depends testAssignRoleToUser * @depends testCreateRoleWithAddPolicy */ @@ -2357,13 +2405,14 @@ public function testGetRoleAssignmentsForUserEmpty() $roleAssignments = $roleService->getRoleAssignmentsForUser($adminUser); /* END: Use Case */ - $this->assertCount(0, $roleAssignments); + self::assertCount(0, $roleAssignments); } /** * Test for the getRoleAssignmentsForUser() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::getRoleAssignmentsForUser() + * * @depends testAssignRoleToUser * @depends testCreateRoleWithAddPolicy */ @@ -2381,8 +2430,8 @@ public function testGetRoleAssignmentsForUserInherited() $roleAssignments = $roleService->getRoleAssignmentsForUser($adminUser, true); /* END: Use Case */ - $this->assertCount(1, $roleAssignments); - $this->assertInstanceOf( + self::assertCount(1, $roleAssignments); + self::assertInstanceOf( UserGroupRoleAssignment::class, reset($roleAssignments) ); @@ -2392,6 +2441,7 @@ public function testGetRoleAssignmentsForUserInherited() * Test for the assignRoleToUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::assignRoleToUserGroup() + * * @depends testGetRoleAssignments */ public function testAssignRoleToUserGroup() @@ -2413,7 +2463,7 @@ public function testAssignRoleToUserGroup() /* END: Use Case */ // Administrator + Example Group - $this->assertCount(2, $roleAssignments); + self::assertCount(2, $roleAssignments); } /** @@ -2442,14 +2492,15 @@ public function testAssignRoleToUserGroupAffectsRoleAssignmentsForUser() $updatedRoleAssignments = $roleService->getRoleAssignmentsForUser($user, true); /* END: Use Case */ - $this->assertEmpty($initRoleAssignments); - $this->assertCount(1, $updatedRoleAssignments); + self::assertEmpty($initRoleAssignments); + self::assertCount(1, $updatedRoleAssignments); } /** * Test for the assignRoleToUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::assignRoleToUserGroup($role, $userGroup, $roleLimitation) + * * @depends testAssignRoleToUserGroup */ public function testAssignRoleToUserGroupWithRoleLimitation() @@ -2479,7 +2530,7 @@ public function testAssignRoleToUserGroupWithRoleLimitation() /* END: Use Case */ // Members + Partners + Anonymous + Example Group - $this->assertCount(4, $roleAssignments); + self::assertCount(4, $roleAssignments); // Get the role limitation $roleLimitation = null; @@ -2490,7 +2541,7 @@ public function testAssignRoleToUserGroupWithRoleLimitation() } } - $this->assertEquals( + self::assertEquals( new SubtreeLimitation( [ 'limitationValues' => ['/1/43/'], @@ -2514,14 +2565,14 @@ public function testAssignRoleToUserGroupWithRoleLimitation() $roleAssignments = $roleService->getRoleAssignments($role); // Members + Partners + Anonymous + Example User - $this->assertCount(5, $roleAssignments); + self::assertCount(5, $roleAssignments); // Get the role limitation $roleLimitations = []; foreach ($roleAssignments as $roleAssignment) { $roleLimitation = $roleAssignment->getRoleLimitation(); if ($roleLimitation) { - $this->assertInstanceOf( + self::assertInstanceOf( UserGroupRoleAssignment::class, $roleAssignment ); @@ -2530,7 +2581,7 @@ public function testAssignRoleToUserGroupWithRoleLimitation() } array_multisort($roleLimitations); - $this->assertEquals( + self::assertEquals( [ new SubtreeLimitation( [ @@ -2551,6 +2602,7 @@ public function testAssignRoleToUserGroupWithRoleLimitation() * Test for the assignRoleToUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::assignRoleToUserGroup($role, $userGroup, $roleLimitation) + * * @depends testLoadRoleByIdentifier * @depends testAssignRoleToUserGroup */ @@ -2593,6 +2645,7 @@ public function testAssignRoleToUserGroupWithRoleLimitationThrowsLimitationValid * Makes sure assigning role several times throws. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::assignRoleToUserGroup($role, $userGroup, $roleLimitation) + * * @depends testLoadRoleByIdentifier * @depends testAssignRoleToUserGroup */ @@ -2621,7 +2674,7 @@ public function testAssignRoleToUserGroupThrowsInvalidArgumentException() $userGroup ); } catch (Exception $e) { - $this->fail('Got exception at first valid attempt to assign role'); + self::fail('Got exception at first valid attempt to assign role'); } // Re-Assign the "Anonymous" role to the newly created user group @@ -2639,6 +2692,7 @@ public function testAssignRoleToUserGroupThrowsInvalidArgumentException() * Makes sure assigning role several times with same limitations throws. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::assignRoleToUserGroup($role, $userGroup, $roleLimitation) + * * @depends testLoadRoleByIdentifier * @depends testAssignRoleToUserGroup */ @@ -2672,7 +2726,7 @@ public function testAssignRoleToUserGroupWithRoleLimitationThrowsInvalidArgument ) ); } catch (Exception $e) { - $this->fail('Got exception at first valid attempt to assign role'); + self::fail('Got exception at first valid attempt to assign role'); } // Re-Assign the "Anonymous" role to the newly created user group @@ -2693,6 +2747,7 @@ public function testAssignRoleToUserGroupWithRoleLimitationThrowsInvalidArgument * Test for the removeRoleAssignment() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::removeRoleAssignment() + * * @depends testAssignRoleToUserGroup */ public function testRemoveRoleAssignmentFromUserGroup() @@ -2723,7 +2778,7 @@ public function testRemoveRoleAssignmentFromUserGroup() /* END: Use Case */ // Members + Editors + Partners - $this->assertCount(3, $roleAssignments); + self::assertCount(3, $roleAssignments); } /** @@ -2807,6 +2862,7 @@ public function testUnassignRoleByAssignmentThrowsNotFoundException() * Test for the getRoleAssignmentsForUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::getRoleAssignmentsForUserGroup() + * * @depends testAssignRoleToUserGroup * @depends testCreateRoleWithAddPolicy */ @@ -2846,8 +2902,8 @@ public function testGetRoleAssignmentsForUserGroup() $roleAssignments = $roleService->getRoleAssignmentsForUserGroup($userGroup); /* END: Use Case */ - $this->assertCount(1, $roleAssignments); - $this->assertInstanceOf( + self::assertCount(1, $roleAssignments); + self::assertInstanceOf( UserGroupRoleAssignment::class, reset($roleAssignments) ); @@ -2857,6 +2913,7 @@ public function testGetRoleAssignmentsForUserGroup() * Test for the getRoleAssignmentsForUser() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::getRoleAssignmentsForUser() + * * @depends testAssignRoleToUser * @depends testAssignRoleToUserGroup */ @@ -2912,7 +2969,7 @@ public function testLoadPoliciesByUserId() /* END: Use Case */ array_multisort($simplePolicyList); - $this->assertEquals( + self::assertEquals( [ [1, 'content', 'pdf'], [1, 'content', 'read'], @@ -2934,6 +2991,7 @@ public function testLoadPoliciesByUserId() * Test for the publishRoleDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::publishRoleDraft() + * * @depends testCreateRoleDraft */ public function testPublishRoleDraft() @@ -2961,7 +3019,7 @@ public function testPublishRoleDraft() $roleService->publishRoleDraft($roleDraft); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( Role::class, $roleService->loadRoleByIdentifier($roleCreate->identifier) ); @@ -2971,6 +3029,7 @@ public function testPublishRoleDraft() * Test for the publishRoleDraft() method. * * @covers \Ibexa\Contracts\Core\Repository\RoleService::publishRoleDraft() + * * @depends testCreateRoleDraft * @depends testAddPolicyByRoleDraft */ @@ -3014,7 +3073,7 @@ static function ($p1, $p2) { } ); - $this->assertEquals( + self::assertEquals( [ [ 'module' => 'content', diff --git a/tests/integration/Core/Repository/SearchEngineIndexingTest.php b/tests/integration/Core/Repository/SearchEngineIndexingTest.php index 8fe3092741..a75cafe039 100644 --- a/tests/integration/Core/Repository/SearchEngineIndexingTest.php +++ b/tests/integration/Core/Repository/SearchEngineIndexingTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use DateTime; @@ -44,9 +45,9 @@ public function testFindContentInfoFullTextIsSearchable() $searchResult = $searchService->findContentInfo($query); - $this->assertEquals(1, $searchResult->totalCount); + self::assertEquals(1, $searchResult->totalCount); $contentInfo = $searchResult->searchHits[0]->valueObject; - $this->assertEquals($content->id, $contentInfo->id); + self::assertEquals($content->id, $contentInfo->id); return $contentInfo; } @@ -73,8 +74,8 @@ public function testFindLocationsFullTextIsSearchable(ContentInfo $contentInfo) $searchResult = $searchService->findLocations($query); - $this->assertEquals(1, $searchResult->totalCount); - $this->assertEquals( + self::assertEquals(1, $searchResult->totalCount); + self::assertEquals( $contentInfo->mainLocationId, $searchResult->searchHits[0]->valueObject->id ); @@ -101,7 +102,7 @@ public function testFindContentInfoFullTextIsNotSearchable() $searchResult = $searchService->findContentInfo($query); - $this->assertEquals(0, $searchResult->totalCount); + self::assertEquals(0, $searchResult->totalCount); } /** @@ -124,7 +125,7 @@ public function testFindLocationsFullTextIsNotSearchable() $searchResult = $searchService->findLocations($query); - $this->assertEquals(0, $searchResult->totalCount); + self::assertEquals(0, $searchResult->totalCount); } /** @@ -202,8 +203,8 @@ public function testDeleteVersion() $criterion = new Criterion\LocationId($contentInfo->mainLocationId); $query = new Query(['filter' => $criterion]); $result = $searchService->findContentInfo($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $contentInfo->id, $result->searchHits[0]->valueObject->id ); @@ -229,7 +230,7 @@ public function testDeleteContent() $criterion = new Criterion\ParentLocationId($contentInfo->mainLocationId); $query = new LocationQuery(['filter' => $criterion]); $result = $searchService->findLocations($query); - $this->assertEquals(0, $result->totalCount); + self::assertEquals(0, $result->totalCount); } /** @@ -252,7 +253,7 @@ public function testDeleteUser() $criterion = new Criterion\ContentId($user->id); $query = new Query(['filter' => $criterion]); $result = $searchService->findContentInfo($query); - $this->assertEquals(0, $result->totalCount); + self::assertEquals(0, $result->totalCount); } /** @@ -275,7 +276,7 @@ public function testDeleteUserGroup() $criterion = new Criterion\ContentId($userGroup->id); $query = new Query(['filter' => $criterion]); $result = $searchService->findContentInfo($query); - $this->assertEquals(0, $result->totalCount); + self::assertEquals(0, $result->totalCount); } /** @@ -311,7 +312,7 @@ public function testCreateUser() $criterion = new Criterion\ContentId($user->id); $query = new Query(['filter' => $criterion]); $result = $searchService->findContentInfo($query); - $this->assertEquals(1, $result->totalCount); + self::assertEquals(1, $result->totalCount); } /** @@ -343,7 +344,7 @@ public function testUpdateUser() ); $result = $searchService->findContentInfo($query); - $this->assertEquals(1, $result->totalCount); + self::assertEquals(1, $result->totalCount); } /** @@ -373,7 +374,7 @@ public function testCreateUserGroup() $criterion = new Criterion\ContentId($userGroup->id); $query = new Query(['filter' => $criterion]); $result = $searchService->findContentInfo($query); - $this->assertEquals(1, $result->totalCount); + self::assertEquals(1, $result->totalCount); } /** @@ -391,8 +392,8 @@ public function testCreateLocation() $criterion = new Criterion\LocationId($membersLocation->id); $query = new LocationQuery(['filter' => $criterion]); $result = $searchService->findLocations($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $membersLocation->id, $result->searchHits[0]->valueObject->id ); @@ -417,8 +418,8 @@ public function testHideSubtree() $criterion = new Criterion\LocationId($locationId); $query = new LocationQuery(['filter' => $criterion]); $result = $searchService->findLocations($query); - $this->assertEquals(1, $result->totalCount); - $this->assertTrue($result->searchHits[0]->valueObject->hidden); + self::assertEquals(1, $result->totalCount); + self::assertTrue($result->searchHits[0]->valueObject->hidden); // Check if children locations are invisible $this->assertSubtreeInvisibleProperty($searchService, $locationId, true); @@ -445,8 +446,8 @@ public function testRevealSubtree() $criterion = new Criterion\LocationId($locationId); $query = new LocationQuery(['filter' => $criterion]); $result = $searchService->findLocations($query); - $this->assertEquals(1, $result->totalCount); - $this->assertFalse($result->searchHits[0]->valueObject->hidden); + self::assertEquals(1, $result->totalCount); + self::assertFalse($result->searchHits[0]->valueObject->hidden); // Check if children locations are not invisible $this->assertSubtreeInvisibleProperty($searchService, $locationId, false); @@ -485,8 +486,8 @@ public function testCopySubtree() $criterion = new Criterion\ParentLocationId($membersLocation->id); $query = new LocationQuery(['filter' => $criterion]); $result = $searchService->findLocations($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $adminsLocation->id, $result->searchHits[0]->valueObject->id ); @@ -495,8 +496,8 @@ public function testCopySubtree() $criterion = new Criterion\ParentLocationId($editorsLocation->id); $query = new LocationQuery(['filter' => $criterion]); $result = $searchService->findLocations($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $copiedLocation->id, $result->searchHits[0]->valueObject->id ); @@ -534,14 +535,14 @@ public function testMoveSubtree() $criterion = new Criterion\ParentLocationId($editorsLocation->id); $query = new LocationQuery(['filter' => $criterion]); $result = $searchService->findLocations($query); - $this->assertEquals(0, $result->totalCount); + self::assertEquals(0, $result->totalCount); // Found under Members $criterion = new Criterion\ParentLocationId($membersLocation->id); $query = new LocationQuery(['filter' => $criterion]); $result = $searchService->findLocations($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $adminsLocation->id, $result->searchHits[0]->valueObject->id ); @@ -553,8 +554,8 @@ public function testMoveSubtree() $criterion = new Criterion\ParentLocationId($editorsLocation->id); $query = new LocationQuery(['filter' => $criterion]); $result = $searchService->findLocations($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $adminsLocation->id, $result->searchHits[0]->valueObject->id ); @@ -563,7 +564,7 @@ public function testMoveSubtree() $criterion = new Criterion\ParentLocationId($membersLocation->id); $query = new LocationQuery(['filter' => $criterion]); $result = $searchService->findLocations($query); - $this->assertEquals(0, $result->totalCount); + self::assertEquals(0, $result->totalCount); } /** @@ -616,8 +617,8 @@ public function testIndexContentWithNullField() $criterion = new Criterion\ContentId($content->id); $query = new Query(['filter' => $criterion]); $result = $searchService->findContent($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $content->id, $result->searchHits[0]->valueObject->id ); @@ -643,7 +644,7 @@ public function testUpdateLocation() $query = new LocationQuery(['filter' => $criterion]); $result = $searchService->findLocations($query); - $this->assertEquals(0, $result->totalCount); + self::assertEquals(0, $result->totalCount); $locationUpdateStruct = $locationService->newLocationUpdateStruct(); $locationUpdateStruct->priority = 4; @@ -653,8 +654,8 @@ public function testUpdateLocation() $result = $searchService->findLocations($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $locationToUpdate->id, $result->searchHits[0]->valueObject->id ); @@ -711,8 +712,8 @@ public function testPublishVersion() $query = new Query(['filter' => $criterion]); $result = $searchService->findContent($query); - $this->assertCount(1, $result->searchHits); - $this->assertEquals($publishedContent->contentInfo->id, $result->searchHits[0]->valueObject->contentInfo->id); + self::assertCount(1, $result->searchHits); + self::assertEquals($publishedContent->contentInfo->id, $result->searchHits[0]->valueObject->contentInfo->id); // Searching for children of locationId=2 should also hit this content $criterion = new Criterion\ParentLocationId(2); @@ -724,7 +725,7 @@ public function testPublishVersion() return; } } - $this->fail('Parent location sub-items do not contain published content'); + self::fail('Parent location sub-items do not contain published content'); } /** @@ -746,14 +747,14 @@ public function testRecoverLocation() $criterion = new Criterion\LocationId($location->id); $query = new LocationQuery(['filter' => $criterion]); $locations = $searchService->findLocations($query); - $this->assertEquals(0, $locations->totalCount); + self::assertEquals(0, $locations->totalCount); $trashItem = $trashService->loadTrashItem($location->id); $trashService->recover($trashItem); $this->refreshSearch($repository); $locations = $searchService->findLocations($query); - $this->assertEquals(0, $locations->totalCount); + self::assertEquals(0, $locations->totalCount); $this->assertContentIdSearch($publishedContent->contentInfo->id, 1); } @@ -772,12 +773,12 @@ public function testCopyContent() $criterion = new Criterion\FullText('copyTest'); $query = new Query(['filter' => $criterion]); $result = $searchService->findContent($query); - $this->assertCount(1, $result->searchHits); + self::assertCount(1, $result->searchHits); $copiedContent = $contentService->copyContent($publishedContent->contentInfo, $locationService->newLocationCreateStruct(2)); $this->refreshSearch($repository); $result = $searchService->findContent($query); - $this->assertCount(2, $result->searchHits); + self::assertCount(2, $result->searchHits); $this->assertContentIdSearch($publishedContent->contentInfo->id, 1); $this->assertContentIdSearch($copiedContent->contentInfo->id, 1); @@ -815,6 +816,7 @@ public function testSetContentState() * @param string $text Content Item field value text (to be indexed) * @param string $searchForText text based on which Content Item should be found * @param array $ignoreForSetupFactories list of SetupFactories to be ignored + * * @dataProvider getSpecialFullTextCases */ public function testIndexingSpecialFullTextCases($text, $searchForText) @@ -957,13 +959,13 @@ public function testRemovedContentFieldValueIsNotFound() $criterion = new Criterion\FullText('descriptionToBeRemoved'); $query = new Query(['filter' => $criterion]); $results = $searchService->findContent($query); - $this->assertEquals(0, $results->totalCount); + self::assertEquals(0, $results->totalCount); // Should be found $criterion = new Criterion\FullText('testRemovedContentFieldValueIsNotFound'); $query = new Query(['filter' => $criterion]); $results = $searchService->findContent($query); - $this->assertEquals(1, $results->totalCount); + self::assertEquals(1, $results->totalCount); } /** @@ -979,7 +981,7 @@ private function assertSubtreeInvisibleProperty(SearchService $searchService, $p $query = new LocationQuery(['filter' => $criterion]); $result = $searchService->findLocations($query); foreach ($result->searchHits as $searchHit) { - $this->assertEquals($expected, $searchHit->valueObject->invisible, sprintf('Location %s is not hidden', $searchHit->valueObject->id)); + self::assertEquals($expected, $searchHit->valueObject->invisible, sprintf('Location %s is not hidden', $searchHit->valueObject->id)); // Perform recursive check for children locations $this->assertSubtreeInvisibleProperty($searchService, $searchHit->valueObject->id, $expected); } @@ -1007,15 +1009,15 @@ public function testSwapLocation() $criterion = new Criterion\LocationId($location01->id); $query = new Query(['filter' => $criterion]); $results = $searchService->findContent($query); - $this->assertEquals(1, $results->totalCount); - $this->assertEquals($content02->id, $results->searchHits[0]->valueObject->id); + self::assertEquals(1, $results->totalCount); + self::assertEquals($content02->id, $results->searchHits[0]->valueObject->id); // content01 should be at location02 $criterion = new Criterion\LocationId($location02->id); $query = new Query(['filter' => $criterion]); $results = $searchService->findContent($query); - $this->assertEquals(1, $results->totalCount); - $this->assertEquals($content01->id, $results->searchHits[0]->valueObject->id); + self::assertEquals(1, $results->totalCount); + self::assertEquals($content01->id, $results->searchHits[0]->valueObject->id); } /** @@ -1046,27 +1048,27 @@ public function testUpdateContentMetadata() $criterion = new Criterion\ContentId($publishedContent->id); $query = new Query(['filter' => $criterion]); $results = $searchService->findContentInfo($query); - $this->assertEquals(1, $results->totalCount); - $this->assertEquals($publishedContent->contentInfo->id, $results->searchHits[0]->valueObject->id); + self::assertEquals(1, $results->totalCount); + self::assertEquals($publishedContent->contentInfo->id, $results->searchHits[0]->valueObject->id); // find Content using updated RemoteId $criterion = new Criterion\RemoteId($newContentMetadataUpdateStruct->remoteId); $query = new Query(['filter' => $criterion]); $results = $searchService->findContent($query); - $this->assertEquals(1, $results->totalCount); + self::assertEquals(1, $results->totalCount); $foundContentInfo = $results->searchHits[0]->valueObject->contentInfo; /** @var \Ibexa\Core\Repository\Values\Content\Content $foundContentInfo */ - $this->assertEquals($publishedContent->id, $foundContentInfo->id); - $this->assertEquals($newContentMetadataUpdateStruct->publishedDate->getTimestamp(), $foundContentInfo->publishedDate->getTimestamp()); - $this->assertEquals($newLocation->id, $foundContentInfo->mainLocationId); - $this->assertEquals($newContentMetadataUpdateStruct->remoteId, $foundContentInfo->remoteId); + self::assertEquals($publishedContent->id, $foundContentInfo->id); + self::assertEquals($newContentMetadataUpdateStruct->publishedDate->getTimestamp(), $foundContentInfo->publishedDate->getTimestamp()); + self::assertEquals($newLocation->id, $foundContentInfo->mainLocationId); + self::assertEquals($newContentMetadataUpdateStruct->remoteId, $foundContentInfo->remoteId); // find Content using old main location $criterion = new Criterion\LocationId($originalMainLocationId); $query = new LocationQuery(['filter' => $criterion]); $results = $searchService->findLocations($query); - $this->assertEquals(1, $results->totalCount); - $this->assertEquals($newContentMetadataUpdateStruct->remoteId, $results->searchHits[0]->valueObject->contentInfo->remoteId); + self::assertEquals(1, $results->totalCount); + self::assertEquals($newContentMetadataUpdateStruct->remoteId, $results->searchHits[0]->valueObject->contentInfo->remoteId); } /** @@ -1345,12 +1347,12 @@ protected function assertContentIdSearch($contentId, $expectedCount) $query = new Query(['filter' => $criterion]); $result = $searchService->findContent($query); - $this->assertEquals($expectedCount, $result->totalCount); + self::assertEquals($expectedCount, $result->totalCount); if ($expectedCount == 0) { return; } - $this->assertEquals( + self::assertEquals( $contentId, $result->searchHits[0]->valueObject->id ); diff --git a/tests/integration/Core/Repository/SearchService/DeleteTranslationTest.php b/tests/integration/Core/Repository/SearchService/DeleteTranslationTest.php index acbf0b80d0..2a6fb1d88a 100644 --- a/tests/integration/Core/Repository/SearchService/DeleteTranslationTest.php +++ b/tests/integration/Core/Repository/SearchService/DeleteTranslationTest.php @@ -21,6 +21,7 @@ * Test case for delete content translation with the SearchService. * * @covers \Ibexa\Contracts\Core\Repository\SearchService + * * @group integration * @group search */ @@ -95,12 +96,12 @@ public function testDeleteContentTranslation(): void $this->refreshSearch($repository); $searchResult = $this->findContent('Kontakt', 'ger-DE'); - $this->assertEquals(1, $searchResult->totalCount); + self::assertEquals(1, $searchResult->totalCount); $contentService->deleteTranslation($testContent->contentInfo, 'ger-DE'); $this->refreshSearch($repository); $searchResult = $this->findContent('Kontakt', 'ger-DE'); - $this->assertEquals( + self::assertEquals( 0, $searchResult->totalCount, 'Found reference to the deleted Content translation' @@ -108,7 +109,7 @@ public function testDeleteContentTranslation(): void // check if unrelated items were not affected $searchResult = $this->findContent('OtherGerContent', 'ger-DE'); - $this->assertEquals(1, $searchResult->totalCount, 'Unrelated translation was deleted'); + self::assertEquals(1, $searchResult->totalCount, 'Unrelated translation was deleted'); } /** @@ -129,12 +130,12 @@ public function testDeleteContentTranslationWithContentRemovePolicy(): void $searchResult = $this->findContent('Kontakt', 'ger-DE'); - $this->assertEquals(1, $searchResult->totalCount); + self::assertEquals(1, $searchResult->totalCount); $contentService->deleteTranslation($testContent->contentInfo, 'ger-DE'); $this->refreshSearch($repository); $searchResult = $this->findContent('Kontakt', 'ger-DE'); - $this->assertEquals(0, $searchResult->totalCount); + self::assertEquals(0, $searchResult->totalCount); } /** diff --git a/tests/integration/Core/Repository/SearchServiceAuthorizationTest.php b/tests/integration/Core/Repository/SearchServiceAuthorizationTest.php index 43fc1fb583..c34d3713c9 100644 --- a/tests/integration/Core/Repository/SearchServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/SearchServiceAuthorizationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; @@ -15,7 +16,9 @@ * Test case for operations in the SearchService. * * @covers \Ibexa\Contracts\Core\Repository\SearchService + * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUser + * * @group integration * @group authorization */ @@ -25,6 +28,7 @@ class SearchServiceAuthorizationTest extends BaseTest * Test for the findContent() method but with anonymous user. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\SearchServiceTest::testFindContentFiltered */ public function testFindContent() @@ -55,6 +59,7 @@ public function testFindContent() * Test for the findContent() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() + * * @depends Ibexa\Tests\Integration\Core\Repository\SearchServiceTest::testFindContentFiltered */ public function testFindContentEmptyResult() @@ -88,6 +93,7 @@ public function testFindContentEmptyResult() * Test for the findSingle() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findSingle() + * * @depends Ibexa\Tests\Integration\Core\Repository\SearchServiceTest::testFindSingle */ public function testFindSingleThrowsNotFoundException() @@ -120,6 +126,7 @@ public function testFindSingleThrowsNotFoundException() * Test for the findContent() method, verifying disabling permissions. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::findContent($query, $languageFilter, $filterOnUserPermissions) + * * @depends Ibexa\Tests\Integration\Core\Repository\SearchServiceAuthorizationTest::testFindContent */ public function testFindContentWithUserPermissionFilter() @@ -150,14 +157,15 @@ public function testFindContentWithUserPermissionFilter() $searchResultWithPermissions = $searchService->findContent($query, []); /* END: Use Case */ - $this->assertEquals(1, $searchResultWithoutPermissions->totalCount); - $this->assertEquals(0, $searchResultWithPermissions->totalCount); + self::assertEquals(1, $searchResultWithoutPermissions->totalCount); + self::assertEquals(0, $searchResultWithPermissions->totalCount); } /** * Test for the findSingle() method disabling permission filtering. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::findSingle($query, $languageFilter, $filterOnUserPermissions) + * * @depends Ibexa\Tests\Integration\Core\Repository\SearchServiceAuthorizationTest::testFindContent */ public function testFindSingleWithUserPermissionFilter() @@ -189,6 +197,7 @@ public function testFindSingleWithUserPermissionFilter() * Test for the findSingle() method. * * @covers \Ibexa\Contracts\Core\Repository\ContentService::findSingle($query, $languageFilter, $filterOnUserPermissions) + * * @depends Ibexa\Tests\Integration\Core\Repository\SearchServiceAuthorizationTest::testFindContent */ public function testFindSingleThrowsNotFoundExceptionWithUserPermissionFilter() diff --git a/tests/integration/Core/Repository/SearchServiceFulltextTest.php b/tests/integration/Core/Repository/SearchServiceFulltextTest.php index a1af8b37a8..6f9be645af 100644 --- a/tests/integration/Core/Repository/SearchServiceFulltextTest.php +++ b/tests/integration/Core/Repository/SearchServiceFulltextTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\SearchService; @@ -20,6 +21,7 @@ * Test case for full text search in the SearchService. * * @covers \Ibexa\Contracts\Core\Repository\SearchService + * * @group integration * @group search * @group fulltext @@ -35,7 +37,7 @@ protected function setUp(): void ->getRepository(false) ->getSearchService()->supports(SearchService::CAPABILITY_ADVANCED_FULLTEXT) ) { - $this->markTestSkipped('Engine says it does not support advance fulltext format'); + self::markTestSkipped('Engine says it does not support advance fulltext format'); } } @@ -180,12 +182,13 @@ public function providerForTestFulltextSearchSolr7(): array * @param array $idMap * * @depends testPrepareContent + * * @dataProvider providerForTestFulltextSearchSolr7 */ public function testFulltextContentSearchSolr7(string $searchString, array $expectedKeys, array $idMap): void { if (false === $this->isSolrMajorVersionInRange('7.0.0', '8.0.0')) { - $this->markTestSkipped('This test is only relevant for Solr >= 7'); + self::markTestSkipped('This test is only relevant for Solr >= 7'); } $this->doTestFulltextContentSearch($searchString, $expectedKeys, $idMap); @@ -210,12 +213,13 @@ private function doTestFulltextContentSearch(string $searchString, array $expect * @param array $idMap * * @depends testPrepareContent + * * @dataProvider providerForTestFulltextSearchSolr7 */ public function testFulltextLocationSearchSolr7($searchString, array $expectedKeys, array $idMap): void { if (false === $this->isSolrMajorVersionInRange('7.0.0', '8.0.0')) { - $this->markTestSkipped('This test is only relevant for Solr >= 7'); + self::markTestSkipped('This test is only relevant for Solr >= 7'); } $this->doTestFulltextLocationSearch($searchString, $expectedKeys, $idMap); @@ -241,7 +245,7 @@ private function doTestFulltextLocationSearch($searchString, array $expectedKeys */ public function assertFulltextSearch(SearchResult $searchResult, array $expectedKeys, array $idMap) { - $this->assertEquals( + self::assertEquals( array_reduce( $expectedKeys, static function ($carry, $item) { @@ -257,7 +261,7 @@ static function ($carry, $item) { $expectedIds = $this->mapKeysToIds($expectedKeys, $idMap); $actualIds = $this->mapSearchResultToIds($searchResult); - $this->assertEquals($expectedIds, $actualIds); + self::assertEquals($expectedIds, $actualIds); } /** diff --git a/tests/integration/Core/Repository/SearchServiceLocationTest.php b/tests/integration/Core/Repository/SearchServiceLocationTest.php index 374ae91784..44290ec70a 100644 --- a/tests/integration/Core/Repository/SearchServiceLocationTest.php +++ b/tests/integration/Core/Repository/SearchServiceLocationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; @@ -23,6 +24,7 @@ * Test case for Location operations in the SearchService. * * @covers \Ibexa\Contracts\Core\Repository\SearchService + * * @group integration * @group search */ @@ -221,14 +223,14 @@ public function testFieldIsEmptyInLocation() $searchService = $repository->getSearchService(); $result = $searchService->findLocations($query); - $this->assertEquals(2, $result->totalCount); + self::assertEquals(2, $result->totalCount); - $this->assertEquals( + self::assertEquals( $testContents[0]->contentInfo->mainLocationId, $result->searchHits[0]->valueObject->id ); - $this->assertEquals( + self::assertEquals( $testContents[1]->contentInfo->mainLocationId, $result->searchHits[1]->valueObject->id ); @@ -256,9 +258,9 @@ public function testFieldIsNotEmptyInLocation() $searchService = $repository->getSearchService(); $result = $searchService->findLocations($query); - $this->assertEquals(1, $result->totalCount); + self::assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals( $testContents[2]->contentInfo->mainLocationId, $result->searchHits[0]->valueObject->id ); @@ -287,8 +289,8 @@ public function testFieldCollectionContains() $searchService = $repository->getSearchService(); $result = $searchService->findLocations($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $testContent->contentInfo->mainLocationId, $result->searchHits[0]->valueObject->id ); @@ -298,6 +300,7 @@ public function testFieldCollectionContains() * Test for the findLocations() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() + * * @depends Ibexa\Tests\Integration\Core\Repository\SearchServiceTest::testFieldCollectionContains */ public function testFieldCollectionContainsNoMatch() @@ -317,7 +320,7 @@ public function testFieldCollectionContainsNoMatch() $searchService = $repository->getSearchService(); $result = $searchService->findLocations($query); - $this->assertEquals(0, $result->totalCount); + self::assertEquals(0, $result->totalCount); } /** @@ -344,8 +347,8 @@ public function testNonPrintableUtf8Characters(): void $searchService = $repository->getSearchService(); $result = $searchService->findLocations($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $folder->contentInfo->mainLocationId, $result->searchHits[0]->valueObject->id ); @@ -364,7 +367,7 @@ public function testEscapedNonPrintableUtf8Characters(): void $setupFactory = $this->getSetupFactory(); if (!$setupFactory instanceof LegacySolrSetupFactory) { - $this->markTestIncomplete( + self::markTestIncomplete( 'Field Value mappers are used only with Solr and Elastic search engines' ); } @@ -384,7 +387,7 @@ public function testEscapedNonPrintableUtf8Characters(): void $searchService = $repository->getSearchService(); $result = $searchService->findLocations($query); - $this->assertEquals(1, $result->totalCount); + self::assertEquals(1, $result->totalCount); } public function testInvalidFieldIdentifierRange() @@ -503,7 +506,7 @@ public function testQueryModifiedField() { // Check using get_class since the others extend SetupFactory\Legacy if ($this->getSetupFactory() instanceof Legacy) { - $this->markTestIncomplete( + self::markTestIncomplete( 'Custom fields not supported by LegacySE ' . '(@todo: Legacy should fallback to just querying normal field so this should be tested here)' ); @@ -566,6 +569,7 @@ protected function createTestPlaceContentType() * Test for the findLocations() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() + * * @group maplocation */ public function testMapLocationDistanceLessThanOrEqual() @@ -636,8 +640,8 @@ public function testMapLocationDistanceLessThanOrEqual() $searchService = $repository->getSearchService(); $result = $searchService->findLocations($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $wildBoars->contentInfo->mainLocationId, $result->searchHits[0]->valueObject->id ); @@ -647,6 +651,7 @@ public function testMapLocationDistanceLessThanOrEqual() * Test for the findLocations() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() + * * @group maplocation */ public function testMapLocationDistanceGreaterThanOrEqual() @@ -717,8 +722,8 @@ public function testMapLocationDistanceGreaterThanOrEqual() $searchService = $repository->getSearchService(); $result = $searchService->findLocations($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $tree->contentInfo->mainLocationId, $result->searchHits[0]->valueObject->id ); @@ -728,6 +733,7 @@ public function testMapLocationDistanceGreaterThanOrEqual() * Test for the findLocations() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() + * * @group maplocation */ public function testMapLocationDistanceBetween() @@ -814,8 +820,8 @@ public function testMapLocationDistanceBetween() $searchService = $repository->getSearchService(); $result = $searchService->findLocations($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $mushrooms->contentInfo->mainLocationId, $result->searchHits[0]->valueObject->id ); @@ -825,6 +831,7 @@ public function testMapLocationDistanceBetween() * Test for the findLocations() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() + * * @group maplocation */ public function testMapLocationDistanceSortAscending() @@ -924,16 +931,16 @@ public function testMapLocationDistanceSortAscending() $searchService = $repository->getSearchService(); $result = $searchService->findLocations($query); - $this->assertEquals(3, $result->totalCount); - $this->assertEquals( + self::assertEquals(3, $result->totalCount); + self::assertEquals( $wildBoars->contentInfo->mainLocationId, $result->searchHits[0]->valueObject->id ); - $this->assertEquals( + self::assertEquals( $mushrooms->contentInfo->mainLocationId, $result->searchHits[1]->valueObject->id ); - $this->assertEquals( + self::assertEquals( $tree->contentInfo->mainLocationId, $result->searchHits[2]->valueObject->id ); @@ -943,6 +950,7 @@ public function testMapLocationDistanceSortAscending() * Test for the findLocations() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() + * * @group maplocation */ public function testMapLocationDistanceSortDescending() @@ -1042,16 +1050,16 @@ public function testMapLocationDistanceSortDescending() $searchService = $repository->getSearchService(); $result = $searchService->findLocations($query); - $this->assertEquals(3, $result->totalCount); - $this->assertEquals( + self::assertEquals(3, $result->totalCount); + self::assertEquals( $wildBoars->contentInfo->mainLocationId, $result->searchHits[2]->valueObject->id ); - $this->assertEquals( + self::assertEquals( $mushrooms->contentInfo->mainLocationId, $result->searchHits[1]->valueObject->id ); - $this->assertEquals( + self::assertEquals( $tree->contentInfo->mainLocationId, $result->searchHits[0]->valueObject->id ); @@ -1061,6 +1069,7 @@ public function testMapLocationDistanceSortDescending() * Test for the findLocations() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() + * * @group maplocation */ public function testMapLocationDistanceWithCustomField() @@ -1134,8 +1143,8 @@ public function testMapLocationDistanceWithCustomField() $searchService = $repository->getSearchService(); $result = $searchService->findLocations($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $wildBoars->contentInfo->mainLocationId, $result->searchHits[0]->valueObject->id ); @@ -1145,6 +1154,7 @@ public function testMapLocationDistanceWithCustomField() * Test for the findLocations() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() + * * @group maplocation */ public function testMapLocationDistanceWithCustomFieldSort() @@ -1247,16 +1257,16 @@ public function testMapLocationDistanceWithCustomFieldSort() $searchService = $repository->getSearchService(); $result = $searchService->findLocations($query); - $this->assertEquals(3, $result->totalCount); - $this->assertEquals( + self::assertEquals(3, $result->totalCount); + self::assertEquals( $wildBoars->contentInfo->mainLocationId, $result->searchHits[2]->valueObject->id ); - $this->assertEquals( + self::assertEquals( $mushrooms->contentInfo->mainLocationId, $result->searchHits[1]->valueObject->id ); - $this->assertEquals( + self::assertEquals( $tree->contentInfo->mainLocationId, $result->searchHits[0]->valueObject->id ); @@ -1333,14 +1343,14 @@ public function testVisibilityCriterionWithHiddenContent() //Sanity check for visible locations $result = $searchService->findLocations($query); - $this->assertEquals(3, $result->totalCount); + self::assertEquals(3, $result->totalCount); //Hide main content $contentService->hideContent($publishedContent->contentInfo); $this->refreshSearch($repository); $result = $searchService->findLocations($query); - $this->assertEquals(1, $result->totalCount); + self::assertEquals(1, $result->totalCount); //Query for invisible content $hiddenQuery = new LocationQuery([ @@ -1355,7 +1365,7 @@ public function testVisibilityCriterionWithHiddenContent() ]); $result = $searchService->findLocations($hiddenQuery); - $this->assertEquals(2, $result->totalCount); + self::assertEquals(2, $result->totalCount); } /** @@ -1373,7 +1383,7 @@ protected function assertQueryFixture(LocationQuery $query, $fixture, $closure = $result = $searchService->findLocations($query); $this->simplifySearchResult($result); } catch (NotImplementedException $e) { - $this->markTestSkipped( + self::markTestSkipped( 'This feature is not supported by the current search backend: ' . $e->getMessage() ); } @@ -1384,9 +1394,9 @@ protected function assertQueryFixture(LocationQuery $query, $fixture, $closure = $record = $fixture . '.recording', "markTestIncomplete("No fixture available. Result recorded at $record. Result: \n" . $this->printResult($result)); + self::markTestIncomplete("No fixture available. Result recorded at $record. Result: \n" . $this->printResult($result)); } else { - $this->markTestIncomplete("No fixture available. Set \$_ENV['ibexa_tests_record'] to generate:\n " . $fixture); + self::markTestIncomplete("No fixture available. Set \$_ENV['ibexa_tests_record'] to generate:\n " . $fixture); } } @@ -1422,7 +1432,7 @@ protected function assertQueryFixture(LocationQuery $query, $fixture, $closure = } } - $this->assertEqualsWithDelta( + self::assertEqualsWithDelta( $fixture, $result, .2, // Be quite generous regarding delay -- most important for scores diff --git a/tests/integration/Core/Repository/SearchServiceTest.php b/tests/integration/Core/Repository/SearchServiceTest.php index 87f59cc671..be8f186870 100644 --- a/tests/integration/Core/Repository/SearchServiceTest.php +++ b/tests/integration/Core/Repository/SearchServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use function count; @@ -28,6 +29,7 @@ * Test case for operations in the SearchService. * * @covers \Ibexa\Contracts\Core\Repository\SearchService + * * @group integration * @group search */ @@ -1204,6 +1206,7 @@ public function testRelationContentCreation() * @dataProvider getRelationFieldFilterSearches * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContentInfo() + * * @depends testRelationContentCreation */ public function testFindRelationFieldContentInfoFiltered($queryData, $fixture) @@ -1219,6 +1222,7 @@ public function testFindRelationFieldContentInfoFiltered($queryData, $fixture) * @dataProvider getRelationFieldFilterSearches * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() + * * @depends testRelationContentCreation */ public function testFindRelationFieldLocationsFiltered($queryData, $fixture) @@ -1239,7 +1243,7 @@ public function testFindSingle() ) ); - $this->assertEquals( + self::assertEquals( 4, $content->id ); @@ -1259,11 +1263,11 @@ public function testFindNoPerformCount() $searchHit = $searchService->findContent($query); if ($this->isRunningOnLegacySetup()) { - $this->assertNull( + self::assertNull( $searchHit->totalCount ); } else { - $this->assertEquals( + self::assertEquals( 2, $searchHit->totalCount ); @@ -1275,7 +1279,7 @@ public function testFindNoPerformCountException() $this->expectException(\RuntimeException::class); if (!$this->isRunningOnLegacySetup()) { - $this->markTestSkipped('Only applicable to Legacy/DB based search'); + self::markTestSkipped('Only applicable to Legacy/DB based search'); } $repository = $this->getRepository(); @@ -1305,11 +1309,11 @@ public function testFindLocationsNoPerformCount() $searchHit = $searchService->findLocations($query); if ($this->isRunningOnLegacySetup()) { - $this->assertNull( + self::assertNull( $searchHit->totalCount ); } else { - $this->assertEquals( + self::assertEquals( 2, $searchHit->totalCount ); @@ -1321,7 +1325,7 @@ public function testFindLocationsNoPerformCountException() $this->expectException(\RuntimeException::class); if (!$this->isRunningOnLegacySetup()) { - $this->markTestSkipped('Only applicable to Legacy/DB based search'); + self::markTestSkipped('Only applicable to Legacy/DB based search'); } $repository = $this->getRepository(); @@ -1481,13 +1485,13 @@ public function testFieldIsEmpty() $searchService = $repository->getSearchService(); $result = $searchService->findContent($query, ['eng-GB']); - $this->assertEquals(2, $result->totalCount); + self::assertEquals(2, $result->totalCount); - $this->assertEquals( + self::assertEquals( $testContents[0]->id, $result->searchHits[0]->valueObject->id ); - $this->assertEquals( + self::assertEquals( $testContents[1]->id, $result->searchHits[1]->valueObject->id ); @@ -1517,8 +1521,8 @@ public function testFieldIsNotEmpty() $searchService = $repository->getSearchService(); $result = $searchService->findContent($query, ['eng-GB']); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $testContents[2]->id, $result->searchHits[0]->valueObject->id ); @@ -1547,8 +1551,8 @@ public function testFieldCollectionContains() $searchService = $repository->getSearchService(); $result = $searchService->findContent($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $testContent->id, $result->searchHits[0]->valueObject->id ); @@ -1558,6 +1562,7 @@ public function testFieldCollectionContains() * Test for the findContent() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() + * * @depends testFieldCollectionContains */ public function testFieldCollectionContainsNoMatch() @@ -1577,7 +1582,7 @@ public function testFieldCollectionContainsNoMatch() $searchService = $repository->getSearchService(); $result = $searchService->findContent($query); - $this->assertEquals(0, $result->totalCount); + self::assertEquals(0, $result->totalCount); } public function testInvalidFieldIdentifierRange() @@ -2352,6 +2357,7 @@ public function providerForTestMultilingualFieldSort() * Test for the findContent() method. * * @group rrr + * * @dataProvider providerForTestMultilingualFieldSort * * @param array $contentDataList @@ -2377,6 +2383,7 @@ public function testMultilingualFieldSortContent( * Test for the findLocations() method. * * @group rrr + * * @dataProvider providerForTestMultilingualFieldSort * * @param array $contentDataList @@ -2467,14 +2474,14 @@ protected function assertMultilingualFieldSort( $result = $searchService->findLocations($query, $languageSettings); } - $this->assertEquals(count($expected), $result->totalCount); + self::assertEquals(count($expected), $result->totalCount); $expectedIdList = []; foreach ($expected as $contentNumber) { $expectedIdList[] = $contentIdList[$contentNumber]; } - $this->assertEquals($expectedIdList, $this->mapResultContentIds($result)); + self::assertEquals($expectedIdList, $this->mapResultContentIds($result)); } public function providerForTestMultilingualFieldFilter() @@ -2640,6 +2647,7 @@ public function providerForTestMultilingualFieldFilter() * Test for the findContent() method. * * @group ttt + * * @dataProvider providerForTestMultilingualFieldFilter * * @param array $contentDataList @@ -2665,6 +2673,7 @@ public function testMultilingualFieldFilterContent( * Test for the findLocations() method. * * @group ttt + * * @dataProvider providerForTestMultilingualFieldFilter * * @param array $contentDataList @@ -2760,14 +2769,14 @@ protected function assertMultilingualFieldFilter( $result = $searchService->findLocations($query, $languageSettings); } - $this->assertEquals(count($expected), $result->totalCount); + self::assertEquals(count($expected), $result->totalCount); $expectedIdList = []; foreach ($expected as $contentNumber) { $expectedIdList[] = $contentIdList[$contentNumber]; } - $this->assertEquals($expectedIdList, $this->mapResultContentIds($result)); + self::assertEquals($expectedIdList, $this->mapResultContentIds($result)); } /** @@ -2903,7 +2912,7 @@ public function testQueryModifiedField() { // Check using get_class since the others extend SetupFactory\Legacy if ($this->getSetupFactory() instanceof Legacy) { - $this->markTestIncomplete( + self::markTestIncomplete( 'Custom fields not supported by LegacySE ' . '(@todo: Legacy should fallback to just querying normal field so this should be tested here)' ); @@ -2943,7 +2952,7 @@ public function testSortModifiedField() { // Check using get_class since the others extend SetupFactory\Legacy if ($this->getSetupFactory() instanceof Legacy) { - $this->markTestIncomplete( + self::markTestIncomplete( 'Custom field sort not supported by LegacySE ' . '(@todo: Legacy should fallback to just querying normal field so this should be tested here)' ); @@ -3005,6 +3014,7 @@ protected function createTestPlaceContentType() * Test for the findContent() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() + * * @group maplocation */ public function testMapLocationDistanceLessThanOrEqual() @@ -3074,8 +3084,8 @@ public function testMapLocationDistanceLessThanOrEqual() $searchService = $repository->getSearchService(); $result = $searchService->findContent($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $wildBoars->id, $result->searchHits[0]->valueObject->id ); @@ -3085,6 +3095,7 @@ public function testMapLocationDistanceLessThanOrEqual() * Test for the findContent() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() + * * @group maplocation */ public function testMapLocationDistanceGreaterThanOrEqual() @@ -3154,8 +3165,8 @@ public function testMapLocationDistanceGreaterThanOrEqual() $searchService = $repository->getSearchService(); $result = $searchService->findContent($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $tree->id, $result->searchHits[0]->valueObject->id ); @@ -3165,6 +3176,7 @@ public function testMapLocationDistanceGreaterThanOrEqual() * Test for the findContent() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() + * * @group maplocation */ public function testMapLocationDistanceBetween() @@ -3250,8 +3262,8 @@ public function testMapLocationDistanceBetween() $searchService = $repository->getSearchService(); $result = $searchService->findContent($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $mushrooms->id, $result->searchHits[0]->valueObject->id ); @@ -3269,6 +3281,7 @@ public function testMapLocationDistanceBetween() * (always very precise) and flat Earth (very imprecise for this use case) models. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() + * * @group maplocation */ public function testMapLocationDistanceBetweenPolar() @@ -3322,8 +3335,8 @@ public function testMapLocationDistanceBetweenPolar() $searchService = $repository->getSearchService(); $result = $searchService->findContent($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $polarBear->id, $result->searchHits[0]->valueObject->id ); @@ -3333,6 +3346,7 @@ public function testMapLocationDistanceBetweenPolar() * Test for the findContent() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() + * * @group maplocation */ public function testMapLocationDistanceSortAscending() @@ -3431,16 +3445,16 @@ public function testMapLocationDistanceSortAscending() $searchService = $repository->getSearchService(); $result = $searchService->findContent($query); - $this->assertEquals(3, $result->totalCount); - $this->assertEquals( + self::assertEquals(3, $result->totalCount); + self::assertEquals( $wildBoars->id, $result->searchHits[0]->valueObject->id ); - $this->assertEquals( + self::assertEquals( $mushrooms->id, $result->searchHits[1]->valueObject->id ); - $this->assertEquals( + self::assertEquals( $tree->id, $result->searchHits[2]->valueObject->id ); @@ -3450,6 +3464,7 @@ public function testMapLocationDistanceSortAscending() * Test for the findContent() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() + * * @group maplocation */ public function testMapLocationDistanceSortDescending() @@ -3548,16 +3563,16 @@ public function testMapLocationDistanceSortDescending() $searchService = $repository->getSearchService(); $result = $searchService->findContent($query); - $this->assertEquals(3, $result->totalCount); - $this->assertEquals( + self::assertEquals(3, $result->totalCount); + self::assertEquals( $wildBoars->id, $result->searchHits[2]->valueObject->id ); - $this->assertEquals( + self::assertEquals( $mushrooms->id, $result->searchHits[1]->valueObject->id ); - $this->assertEquals( + self::assertEquals( $tree->id, $result->searchHits[0]->valueObject->id ); @@ -3567,6 +3582,7 @@ public function testMapLocationDistanceSortDescending() * Test for the findContent() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() + * * @group maplocation */ public function testMapLocationDistanceWithCustomField() @@ -3639,8 +3655,8 @@ public function testMapLocationDistanceWithCustomField() $searchService = $repository->getSearchService(); $result = $searchService->findContent($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals(1, $result->totalCount); + self::assertEquals( $wildBoars->id, $result->searchHits[0]->valueObject->id ); @@ -3650,6 +3666,7 @@ public function testMapLocationDistanceWithCustomField() * Test for the findContent() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() + * * @group maplocation */ public function testMapLocationDistanceWithCustomFieldSort() @@ -3751,16 +3768,16 @@ public function testMapLocationDistanceWithCustomFieldSort() $searchService = $repository->getSearchService(); $result = $searchService->findContent($query); - $this->assertEquals(3, $result->totalCount); - $this->assertEquals( + self::assertEquals(3, $result->totalCount); + self::assertEquals( $wildBoars->id, $result->searchHits[2]->valueObject->id ); - $this->assertEquals( + self::assertEquals( $mushrooms->id, $result->searchHits[1]->valueObject->id ); - $this->assertEquals( + self::assertEquals( $tree->id, $result->searchHits[0]->valueObject->id ); @@ -3807,8 +3824,8 @@ public function testFindMainLocation() $searchService = $repository->getSearchService(); $result = $searchService->findLocations($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals($plainSiteLocationId, $result->searchHits[0]->valueObject->id); + self::assertEquals(1, $result->totalCount); + self::assertEquals($plainSiteLocationId, $result->searchHits[0]->valueObject->id); } /** @@ -3851,8 +3868,8 @@ public function testFindNonMainLocation() $searchService = $repository->getSearchService(); $result = $searchService->findLocations($query); - $this->assertEquals(1, $result->totalCount); - $this->assertEquals($newLocation->id, $result->searchHits[0]->valueObject->id); + self::assertEquals(1, $result->totalCount); + self::assertEquals($newLocation->id, $result->searchHits[0]->valueObject->id); } /** @@ -3893,9 +3910,9 @@ public function testSortMainLocationAscending() $searchService = $repository->getSearchService(); $result = $searchService->findLocations($query); - $this->assertEquals(2, $result->totalCount); - $this->assertEquals($newLocation->id, $result->searchHits[0]->valueObject->id); - $this->assertEquals($plainSiteLocationId, $result->searchHits[1]->valueObject->id); + self::assertEquals(2, $result->totalCount); + self::assertEquals($newLocation->id, $result->searchHits[0]->valueObject->id); + self::assertEquals($plainSiteLocationId, $result->searchHits[1]->valueObject->id); } /** @@ -3936,9 +3953,9 @@ public function testSortMainLocationDescending() $searchService = $repository->getSearchService(); $result = $searchService->findLocations($query); - $this->assertEquals(2, $result->totalCount); - $this->assertEquals($plainSiteLocationId, $result->searchHits[0]->valueObject->id); - $this->assertEquals($newLocation->id, $result->searchHits[1]->valueObject->id); + self::assertEquals(2, $result->totalCount); + self::assertEquals($plainSiteLocationId, $result->searchHits[0]->valueObject->id); + self::assertEquals($newLocation->id, $result->searchHits[1]->valueObject->id); } /** @@ -3978,15 +3995,15 @@ public function testContentWithMultipleLocations() $searchService = $repository->getSearchService(); $result = $searchService->findLocations($query); - $this->assertEquals(2, $result->totalCount); + self::assertEquals(2, $result->totalCount); $locationIds = array_map( static function (SearchHit $searchHit): int { return $searchHit->valueObject->id; }, $result->searchHits ); - $this->assertContains($location1->id, $locationIds); - $this->assertContains($location2->id, $locationIds); + self::assertContains($location1->id, $locationIds); + self::assertContains($location2->id, $locationIds); } protected function createContentForTestUserMetadataGroupHorizontal() @@ -4095,9 +4112,9 @@ public function testUserMetadataGroupHorizontalFilterContent($queryType = null) // in listeners yet, and also miss SPI methods to do it without using Search (also // needed to decouple services), because as indexing is asynchronous Search // should not eat its own dog food for reindexing. - $this->assertEquals(1, $result->totalCount); + self::assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals( $content->id, $result->searchHits[0]->valueObject->id ); @@ -4111,10 +4128,10 @@ public function testUserMetadataGroupHorizontalFilterContent($queryType = null) // and not present it base fixture. $foundContent1 = array_pop($result->searchHits); $result->totalCount = $result->totalCount - 1; - $this->assertEquals($content->id, $foundContent1->valueObject->id); + self::assertEquals($content->id, $foundContent1->valueObject->id); $this->simplifySearchResult($result); - $this->assertEqualsWithDelta( + self::assertEqualsWithDelta( include $this->getFixtureDir() . '/UserMetadata.php', $result, .1, // Be quite generous regarding delay -- most important for scores @@ -4185,9 +4202,9 @@ public function testUserMetadataGroupHorizontalFilterLocation($queryType = null) // in listeners yet, and also miss SPI methods to do it without using Search (also // needed to decouple services), because as indexing is asynchronous Search // should not eat its own dog food for reindexing. - $this->assertEquals(1, $result->totalCount); + self::assertEquals(1, $result->totalCount); - $this->assertEquals( + self::assertEquals( $content->contentInfo->mainLocationId, $result->searchHits[0]->valueObject->id ); @@ -4204,17 +4221,17 @@ public function testUserMetadataGroupHorizontalFilterLocation($queryType = null) // Remove additional Administrators UserGroup Location array_pop($result->searchHits); $result->totalCount = $result->totalCount - 2; - $this->assertEquals( + self::assertEquals( $content->versionInfo->contentInfo->mainLocationId, $foundLocation1->valueObject->id ); - $this->assertEquals( + self::assertEquals( $permissionResolver->getCurrentUserReference()->getUserId(), $foundLocation2->valueObject->contentId ); $this->simplifySearchResult($result); - $this->assertEqualsWithDelta( + self::assertEqualsWithDelta( include $this->getFixtureDir() . '/UserMetadataLocation.php', $result, .1, // Be quite generous regarding delay -- most important for scores @@ -4270,8 +4287,8 @@ public function testFullTextOnNewContent() $searchResult = $searchService->findContentInfo($query); - $this->assertEquals(1, $searchResult->totalCount); - $this->assertEquals($englishContent->id, $searchResult->searchHits[0]->valueObject->id); + self::assertEquals(1, $searchResult->totalCount); + self::assertEquals($englishContent->id, $searchResult->searchHits[0]->valueObject->id); } /** @@ -4281,7 +4298,7 @@ public function testFullTextOnNewContent() */ public function testLanguageAnalysisSeparateContent() { - $this->markTestSkipped('Language analysis is currently not supported'); + self::markTestSkipped('Language analysis is currently not supported'); $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -4334,8 +4351,8 @@ public function testLanguageAnalysisSeparateContent() $searchResult = $searchService->findContent($query); - $this->assertEquals(1, $searchResult->totalCount); - $this->assertEquals($englishContent->id, $searchResult->searchHits[0]->valueObject->id); + self::assertEquals(1, $searchResult->totalCount); + self::assertEquals($englishContent->id, $searchResult->searchHits[0]->valueObject->id); } /** @@ -4345,7 +4362,7 @@ public function testLanguageAnalysisSeparateContent() */ public function testLanguageAnalysisSameContent() { - $this->markTestSkipped('Language analysis is currently not supported'); + self::markTestSkipped('Language analysis is currently not supported'); $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -4384,8 +4401,8 @@ public function testLanguageAnalysisSameContent() $searchResult = $searchService->findContent($query); - $this->assertEquals(1, $searchResult->totalCount); - $this->assertEquals($mixedContent->id, $searchResult->searchHits[0]->valueObject->id); + self::assertEquals(1, $searchResult->totalCount); + self::assertEquals($mixedContent->id, $searchResult->searchHits[0]->valueObject->id); } /** @@ -4395,7 +4412,7 @@ public function testLanguageAnalysisSameContent() */ public function testLanguageAnalysisSameContentNotFound() { - $this->markTestSkipped('Language analysis is currently not supported'); + self::markTestSkipped('Language analysis is currently not supported'); $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -4436,7 +4453,7 @@ public function testLanguageAnalysisSameContentNotFound() // not be correctly stemmed $searchResult = $searchService->findContent($query, ['languages' => ['eng-GB']]); - $this->assertEquals(0, $searchResult->totalCount); + self::assertEquals(0, $searchResult->totalCount); } /** @@ -4462,15 +4479,16 @@ public function testFindContentWithLanguageFilter() ); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( SearchResult::class, $searchResult ); - $this->assertEquals(1, $searchResult->totalCount); - $this->assertCount($searchResult->totalCount, $searchResult->searchHits); + self::assertEquals(1, $searchResult->totalCount); + self::assertNotNull($searchResult->totalCount); + self::assertCount($searchResult->totalCount, $searchResult->searchHits); foreach ($searchResult->searchHits as $searchHit) { - $this->assertInstanceOf( + self::assertInstanceOf( SearchHit::class, $searchHit ); @@ -4552,6 +4570,7 @@ public function testFulltextComplex() * Test for the findContent() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() + * * @depends testFulltextComplex * * @param array $data @@ -4569,34 +4588,35 @@ public function testFulltextContentSearchComplex(array $data) ); $searchHits = $searchResult->searchHits; - $this->assertEquals(3, $searchResult->totalCount); + self::assertEquals(3, $searchResult->totalCount); // Legacy search engine does have scoring, sorting the results by ID in that case $setupFactory = $this->getSetupFactory(); if ($setupFactory instanceof Legacy) { $this->sortSearchHitsById($searchHits); - $this->assertEquals($content1->id, $searchHits[0]->valueObject->id); - $this->assertEquals($content2->id, $searchHits[1]->valueObject->id); - $this->assertEquals($content3->id, $searchHits[2]->valueObject->id); + self::assertEquals($content1->id, $searchHits[0]->valueObject->id); + self::assertEquals($content2->id, $searchHits[1]->valueObject->id); + self::assertEquals($content3->id, $searchHits[2]->valueObject->id); return; } // Assert scores are descending - $this->assertGreaterThan($searchHits[1]->score, $searchHits[0]->score); - $this->assertGreaterThan($searchHits[2]->score, $searchHits[1]->score); + self::assertGreaterThan($searchHits[1]->score, $searchHits[0]->score); + self::assertGreaterThan($searchHits[2]->score, $searchHits[1]->score); // Assert order - $this->assertEquals($content1->id, $searchHits[0]->valueObject->id); - $this->assertEquals($content3->id, $searchHits[1]->valueObject->id); - $this->assertEquals($content2->id, $searchHits[2]->valueObject->id); + self::assertEquals($content1->id, $searchHits[0]->valueObject->id); + self::assertEquals($content3->id, $searchHits[1]->valueObject->id); + self::assertEquals($content2->id, $searchHits[2]->valueObject->id); } /** * Test for the findContent() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() + * * @depends testFulltextComplex * * @param array $data @@ -4613,6 +4633,7 @@ public function testFulltextContentTranslationSearch(array $data) * Test for the findLocations() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() + * * @depends testFulltextComplex * * @param array $data @@ -4621,7 +4642,7 @@ public function testFulltextLocationSearchComplex(array $data) { $setupFactory = $this->getSetupFactory(); if ($setupFactory instanceof LegacySolrSetupFactory && getenv('SOLR_VERSION') === '4.10.4') { - $this->markTestSkipped('Skipping location search score test on Solr 4.10, you need Solr 6 for this!'); + self::markTestSkipped('Skipping location search score test on Solr 4.10, you need Solr 6 for this!'); } // Do not initialize from scratch @@ -4635,34 +4656,35 @@ public function testFulltextLocationSearchComplex(array $data) ); $searchHits = $searchResult->searchHits; - $this->assertEquals(3, $searchResult->totalCount); + self::assertEquals(3, $searchResult->totalCount); // Legacy search engine does have scoring, sorting the results by ID in that case $setupFactory = $this->getSetupFactory(); if ($setupFactory instanceof Legacy) { $this->sortSearchHitsById($searchHits); - $this->assertEquals($content1->id, $searchHits[0]->valueObject->contentId); - $this->assertEquals($content2->id, $searchHits[1]->valueObject->contentId); - $this->assertEquals($content3->id, $searchHits[2]->valueObject->contentId); + self::assertEquals($content1->id, $searchHits[0]->valueObject->contentId); + self::assertEquals($content2->id, $searchHits[1]->valueObject->contentId); + self::assertEquals($content3->id, $searchHits[2]->valueObject->contentId); return; } // Assert scores are descending - $this->assertGreaterThan($searchHits[1]->score, $searchHits[0]->score); - $this->assertGreaterThan($searchHits[2]->score, $searchHits[1]->score); + self::assertGreaterThan($searchHits[1]->score, $searchHits[0]->score); + self::assertGreaterThan($searchHits[2]->score, $searchHits[1]->score); // Assert order - $this->assertEquals($content1->id, $searchHits[0]->valueObject->contentId); - $this->assertEquals($content3->id, $searchHits[1]->valueObject->contentId); - $this->assertEquals($content2->id, $searchHits[2]->valueObject->contentId); + self::assertEquals($content1->id, $searchHits[0]->valueObject->contentId); + self::assertEquals($content3->id, $searchHits[1]->valueObject->contentId); + self::assertEquals($content2->id, $searchHits[2]->valueObject->contentId); } /** * Test for the findLocations() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() + * * @depends testFulltextComplex * * @param array $data @@ -4924,7 +4946,7 @@ public function testFieldCriterionForContentsWithIdenticalFieldIdentifiers() $searchService = $repository->getSearchService(); $result = $searchService->findContent($query); - $this->assertTrue(($result->totalCount === 1 || $result->totalCount === 2)); + self::assertTrue(($result->totalCount === 1 || $result->totalCount === 2)); } private function createContentWithFieldType( @@ -5014,7 +5036,7 @@ public function testRandomSortContent(?int $firstSeed, ?int $secondSeed) $searchService->findContent($secondQuery)->searchHits ); } catch (NotImplementedException $e) { - $this->markTestSkipped( + self::markTestSkipped( 'This feature is not supported by the current search backend: ' . $e->getMessage() ); } @@ -5060,7 +5082,7 @@ public function testRandomSortLocation(?int $firstSeed, ?int $secondSeed) $searchService->findLocations($secondQuery)->searchHits ); } catch (NotImplementedException $e) { - $this->markTestSkipped( + self::markTestSkipped( 'This feature is not supported by the current search backend: ' . $e->getMessage() ); } @@ -5094,7 +5116,7 @@ private function skipIfSeedNotImplemented() $db = $setupFactory->getDB(); if (in_array($db, ['sqlite', 'pgsql'])) { - $this->markTestSkipped( + self::markTestSkipped( 'Seed function is not implemented in ' . $db . '.' ); } @@ -5145,41 +5167,41 @@ private function assertFulltextSearchForTranslations(string $findMethod, Query $ * Search in German translations without always available */ $searchResult = $this->find($findMethod, $query, ['ger-DE'], false); - $this->assertEquals(1, $searchResult->totalCount); + self::assertEquals(1, $searchResult->totalCount); $this->assertSearchResultMatchTranslations($searchResult, ['ger-DE']); /* * Search in German translations with always available */ $searchResult = $this->find($findMethod, $query, ['ger-DE'], true); - $this->assertEquals(4, $searchResult->totalCount); + self::assertEquals(4, $searchResult->totalCount); $this->assertSearchResultMatchTranslations($searchResult, ['eng-GB', 'eng-GB', 'eng-GB', 'ger-DE']); /* * Search in multiple (ger-DE, eng-GB) translations without always available */ $searchResult = $this->find($findMethod, $query, ['ger-DE', 'eng-GB'], false); - $this->assertEquals(4, $searchResult->totalCount); + self::assertEquals(4, $searchResult->totalCount); $this->assertSearchResultMatchTranslations($searchResult, ['eng-GB', 'eng-GB', 'eng-GB', 'ger-DE']); /* * Search in multiple (eng-US, ger-DE) translations without always available */ $searchResult = $this->find($findMethod, $query, ['eng-US', 'ger-DE'], false); - $this->assertEquals(1, $searchResult->totalCount); + self::assertEquals(1, $searchResult->totalCount); $this->assertSearchResultMatchTranslations($searchResult, ['ger-DE']); /* * Search in eng-US translations without always available */ $searchResult = $this->find($findMethod, $query, ['eng-US'], false); - $this->assertEquals(0, $searchResult->totalCount); + self::assertEquals(0, $searchResult->totalCount); /* * Search in eng-US translations with always available */ $searchResult = $this->find($findMethod, $query, ['eng-US'], true); - $this->assertEquals(3, $searchResult->totalCount); + self::assertEquals(3, $searchResult->totalCount); $this->assertSearchResultMatchTranslations($searchResult, ['eng-GB', 'eng-GB', 'eng-GB']); } @@ -5207,7 +5229,7 @@ private function assertSearchResultMatchTranslations( $this->sortSearchHitsById($searchHits); for ($i = 0; $i < $searchResult->totalCount; ++$i) { - $this->assertEquals( + self::assertEquals( $translationsToMatch[$i], $searchHits[$i]->matchedTranslation ); diff --git a/tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php b/tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php index f9a919e276..16b5bdb2fd 100644 --- a/tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php +++ b/tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use DateTime; @@ -19,6 +20,7 @@ * Test case for field filtering operations in the SearchService. * * @covers \Ibexa\Contracts\Core\Repository\SearchService + * * @group integration * @group search * @group language_fallback @@ -1707,6 +1709,7 @@ protected function getIndexName($indexMap) /** * @dataProvider providerForTestFind + * * @depends testCreateTestContent * * @param array $languageSettings @@ -1733,7 +1736,7 @@ public function testFindContent( $languageSettings ); - $this->assertEquals(count($contentDataList), $searchResult->totalCount); + self::assertEquals(count($contentDataList), $searchResult->totalCount); foreach ($contentDataList as $index => $contentData) { list($contentNo, $translationLanguageCode, $indexMap) = $contentData; @@ -1742,12 +1745,12 @@ public function testFindContent( /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ $content = $searchResult->searchHits[$index]->valueObject; - $this->assertEquals( + self::assertEquals( $data[$contentNo]['content']->id, $content->id ); $this->assertIndexName($indexMap, $searchResult->searchHits[$index]); - $this->assertEquals( + self::assertEquals( $translationLanguageCode, $searchResult->searchHits[$index]->matchedTranslation ); @@ -1756,6 +1759,7 @@ public function testFindContent( /** * @dataProvider providerForTestFind + * * @depends testCreateTestContent * * @param array $languageSettings @@ -1787,7 +1791,7 @@ public function testFindLocationsSingle( $languageSettings ); - $this->assertEquals(count($contentDataList), $searchResult->totalCount); + self::assertEquals(count($contentDataList), $searchResult->totalCount); foreach ($contentDataList as $index => $contentData) { list($contentNo, $translationLanguageCode, $indexMap) = $contentData; @@ -1796,12 +1800,12 @@ public function testFindLocationsSingle( /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location $location */ $location = $searchResult->searchHits[$index]->valueObject; - $this->assertEquals( + self::assertEquals( $data[$contentNo]['locations'][0]->id, $location->id ); $this->assertIndexName($indexMap, $searchResult->searchHits[$index]); - $this->assertEquals( + self::assertEquals( $translationLanguageCode, $searchResult->searchHits[$index]->matchedTranslation ); @@ -1810,6 +1814,7 @@ public function testFindLocationsSingle( /** * @dataProvider providerForTestFind + * * @depends testCreateTestContent * * @param array $languageSettings @@ -1837,7 +1842,7 @@ public function testFindLocationsMultiple( $languageSettings ); - $this->assertEquals(count($contentDataList) * 2, $searchResult->totalCount); + self::assertEquals(count($contentDataList) * 2, $searchResult->totalCount); foreach ($contentDataList as $index => $contentData) { list($contentNo, $translationLanguageCode, $indexMap) = $contentData; @@ -1846,12 +1851,12 @@ public function testFindLocationsMultiple( /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location $location */ $location = $searchResult->searchHits[$index]->valueObject; - $this->assertEquals( + self::assertEquals( $data[$contentNo]['locations'][0]->id, $location->id ); $this->assertIndexName($indexMap, $searchResult->searchHits[$index]); - $this->assertEquals( + self::assertEquals( $translationLanguageCode, $searchResult->searchHits[$index]->matchedTranslation ); @@ -1865,12 +1870,12 @@ public function testFindLocationsMultiple( /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location $location */ $location = $searchResult->searchHits[$realIndex]->valueObject; - $this->assertEquals( + self::assertEquals( $data[$contentNo]['locations'][1]->id, $location->id ); $this->assertIndexName($indexMap, $searchResult->searchHits[$realIndex]); - $this->assertEquals( + self::assertEquals( $translationLanguageCode, $searchResult->searchHits[$realIndex]->matchedTranslation ); @@ -1882,9 +1887,9 @@ private function assertIndexName(array $indexMap, SearchHit $searchHit): void $indexName = $this->getIndexName($indexMap); if ($indexName === null) { - $this->assertNull($searchHit->index); + self::assertNull($searchHit->index); } else { - $this->assertRegExp('~^' . $indexName . '$~', $searchHit->index); + self::assertRegExp('~^' . $indexName . '$~', $searchHit->index); } } diff --git a/tests/integration/Core/Repository/SectionServiceAuthorizationTest.php b/tests/integration/Core/Repository/SectionServiceAuthorizationTest.php index 29baeae5fb..26f1ca8531 100644 --- a/tests/integration/Core/Repository/SectionServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/SectionServiceAuthorizationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -13,6 +14,7 @@ * Test case for operations in the SectionService using in memory storage. * * @covers \Ibexa\Contracts\Core\Repository\SectionService + * * @group integration * @group authorization */ @@ -150,7 +152,7 @@ public function testLoadSectionsLoadsEmptyListForAnonymousUser() $sections = $sectionService->loadSections(); /* END: Use Case */ - $this->assertEquals([], $sections); + self::assertEquals([], $sections); } /** @@ -195,7 +197,7 @@ public function testLoadSectionFiltersSections() /* END: Use Case */ // Only Sections the user has access to should be loaded - $this->assertEquals([$expectedSection], $sections); + self::assertEquals([$expectedSection], $sections); } /** diff --git a/tests/integration/Core/Repository/SectionServiceTest.php b/tests/integration/Core/Repository/SectionServiceTest.php index 8ff940b9ca..65013edb14 100644 --- a/tests/integration/Core/Repository/SectionServiceTest.php +++ b/tests/integration/Core/Repository/SectionServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Exception; @@ -19,6 +20,7 @@ * Test case for operations in the SectionService using in memory storage. * * @covers \Ibexa\Contracts\Core\Repository\SectionService + * * @group integration * @group section */ @@ -51,14 +53,14 @@ protected function setUp(): void ); if (false === is_object($contentInfo)) { - $this->markTestSkipped( + self::markTestSkipped( 'This test cannot be executed, because the utilized ' . 'ContentService::loadContentInfoByRemoteId() does not ' . 'return an object.' ); } } catch (Exception $e) { - $this->markTestSkipped( + self::markTestSkipped( 'This test cannot be executed, because the utilized ' . 'ContentService::loadContentInfoByRemoteId() failed with ' . PHP_EOL . PHP_EOL . @@ -85,13 +87,14 @@ public function testNewSectionCreateStruct() $sectionCreate = $sectionService->newSectionCreateStruct(); /* END: Use Case */ - $this->assertInstanceOf(SectionCreateStruct::class, $sectionCreate); + self::assertInstanceOf(SectionCreateStruct::class, $sectionCreate); } /** * Test for the createSection() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::createSection() + * * @depends testNewSectionCreateStruct */ public function testCreateSection() @@ -108,13 +111,14 @@ public function testCreateSection() $section = $sectionService->createSection($sectionCreate); /* END: Use Case */ - $this->assertInstanceOf(Section::class, $section); + self::assertInstanceOf(Section::class, $section); } /** * Test for the createSection() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::createSection() + * * @depends testNewSectionCreateStruct */ public function testCreateSectionForUserWithSectionLimitation() @@ -145,14 +149,15 @@ public function testCreateSectionForUserWithSectionLimitation() $section = $sectionService->createSection($sectionCreate); /* END: Use Case */ - $this->assertInstanceOf(Section::class, $section); - $this->assertSame(self::SECTION_UNIQUE_KEY, $section->identifier); + self::assertInstanceOf(Section::class, $section); + self::assertSame(self::SECTION_UNIQUE_KEY, $section->identifier); } /** * Test for the createSection() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::createSection() + * * @depends testCreateSection */ public function testCreateSectionThrowsInvalidArgumentException() @@ -183,6 +188,7 @@ public function testCreateSectionThrowsInvalidArgumentException() * Test for the loadSection() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::loadSection() + * * @depends testCreateSection */ public function testLoadSection() @@ -198,7 +204,7 @@ public function testLoadSection() $section = $sectionService->loadSection($sectionId); /* END: Use Case */ - $this->assertEquals('users', $section->identifier); + self::assertEquals('users', $section->identifier); } /** @@ -237,13 +243,14 @@ public function testNewSectionUpdateStruct() $sectionUpdate = $sectionService->newSectionUpdateStruct(); /* END: Use Case */ - $this->assertInstanceOf(SectionUpdateStruct::class, $sectionUpdate); + self::assertInstanceOf(SectionUpdateStruct::class, $sectionUpdate); } /** * Test for the updateSection() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::updateSection() + * * @depends testCreateSection * @depends testLoadSection * @depends testNewSectionUpdateStruct @@ -269,18 +276,19 @@ public function testUpdateSection() /* END: Use Case */ // Verify that service returns an instance of Section - $this->assertInstanceOf(Section::class, $updatedSection); + self::assertInstanceOf(Section::class, $updatedSection); // Verify that the service also persists the changes $updatedSection = $sectionService->loadSection($standardSectionId); - $this->assertEquals('New section name', $updatedSection->name); + self::assertEquals('New section name', $updatedSection->name); } /** * Test for the updateSection() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::updateSection() + * * @depends testCreateSection * @depends testLoadSection * @depends testNewSectionUpdateStruct @@ -321,7 +329,7 @@ public function testUpdateSectionForUserWithSectionLimitation() /* END: Use Case */ // Verify that service returns an instance of Section - $this->assertInstanceOf(Section::class, $updatedSection); + self::assertInstanceOf(Section::class, $updatedSection); // Load section as an administrator $administratorUser = $userService->loadUser($administratorUserId); @@ -330,14 +338,15 @@ public function testUpdateSectionForUserWithSectionLimitation() // Verify that the service also persists the changes $updatedSection = $sectionService->loadSection($section->id); - $this->assertEquals('New section name', $updatedSection->name); - $this->assertEquals('newUniqueKey', $updatedSection->identifier); + self::assertEquals('New section name', $updatedSection->name); + self::assertEquals('newUniqueKey', $updatedSection->identifier); } /** * Test for the updateSection() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::updateSection() + * * @depends testUpdateSection */ public function testUpdateSectionKeepsSectionIdentifierOnNameUpdate() @@ -358,13 +367,14 @@ public function testUpdateSectionKeepsSectionIdentifierOnNameUpdate() $updatedSection = $sectionService->updateSection($section, $sectionUpdate); /* END: Use Case */ - $this->assertEquals('standard', $updatedSection->identifier); + self::assertEquals('standard', $updatedSection->identifier); } /** * Test for the updateSection() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::updateSection() + * * @depends testUpdateSection */ public function testUpdateSectionWithSectionIdentifierOnNameUpdate() @@ -388,13 +398,14 @@ public function testUpdateSectionWithSectionIdentifierOnNameUpdate() $updatedSection = $sectionService->updateSection($section, $sectionUpdate); /* END: Use Case */ - $this->assertEquals('standard', $updatedSection->identifier); + self::assertEquals('standard', $updatedSection->identifier); } /** * Test for the updateSection() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::updateSection() + * * @depends testUpdateSection */ public function testUpdateSectionKeepsSectionNameOnIdentifierUpdate() @@ -416,13 +427,14 @@ public function testUpdateSectionKeepsSectionNameOnIdentifierUpdate() $updatedSection = $sectionService->updateSection($section, $sectionUpdate); /* END: Use Case */ - $this->assertEquals('Standard', $updatedSection->name); + self::assertEquals('Standard', $updatedSection->name); } /** * Test for the updateSection() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::updateSection() + * * @depends testUpdateSection */ public function testUpdateSectionThrowsInvalidArgumentException() @@ -460,6 +472,7 @@ public function testUpdateSectionThrowsInvalidArgumentException() * Test for the loadSections() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::loadSections() + * * @depends testCreateSection */ public function testLoadSections() @@ -475,13 +488,14 @@ public function testLoadSections() } /* END: Use Case */ - $this->assertCount(6, $sections); + self::assertCount(6, $sections); } /** * Test for the loadSections() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::loadSections() + * * @depends testCreateSection */ public function testLoadSectionsReturnsDefaultSectionsByDefault() @@ -490,7 +504,7 @@ public function testLoadSectionsReturnsDefaultSectionsByDefault() $sectionService = $repository->getSectionService(); - $this->assertEquals( + self::assertEquals( [ new Section( [ @@ -543,6 +557,7 @@ public function testLoadSectionsReturnsDefaultSectionsByDefault() * Test for the loadSectionByIdentifier() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::loadSectionByIdentifier() + * * @depends testCreateSection */ public function testLoadSectionByIdentifier() @@ -561,7 +576,7 @@ public function testLoadSectionByIdentifier() $section = $sectionService->loadSectionByIdentifier(self::SECTION_UNIQUE_KEY); /* END: Use Case */ - $this->assertEquals($sectionId, $section->id); + self::assertEquals($sectionId, $section->id); } /** @@ -606,7 +621,7 @@ public function testCountAssignedContents() ); /* END: Use Case */ - $this->assertEquals( + self::assertEquals( 2, // Taken from the fixture $numberOfAssignedContent ); @@ -635,7 +650,7 @@ public function testIsSectionUsed() ); /* END: Use Case */ - $this->assertTrue( + self::assertTrue( // Taken from the fixture $isSectionUsed ); @@ -645,6 +660,7 @@ public function testIsSectionUsed() * Test for the assignSection() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::assignSection() + * * @depends testCountAssignedContents */ public function testAssignSection() @@ -684,13 +700,13 @@ public function testAssignSection() $sectionService->assignSection($contentInfo, $section); /* END: Use Case */ - $this->assertEquals( + self::assertEquals( $beforeStandardCount + 1, $sectionService->countAssignedContents( $sectionService->loadSection($standardSectionId) ) ); - $this->assertEquals( + self::assertEquals( $beforeMediaCount - 1, $sectionService->countAssignedContents( $sectionService->loadSection($mediaSectionId) @@ -702,6 +718,7 @@ public function testAssignSection() * Test for the assignSectionToSubtree() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::assignSectionToSubtree() + * * @depends testCreateSection */ public function testAssignSectionToSubtree() @@ -736,13 +753,13 @@ public function testAssignSectionToSubtree() $sectionService->assignSectionToSubtree($location, $section); /* END: Use Case */ - $this->assertEquals( + self::assertEquals( $beforeStandardCount + 4, $sectionService->countAssignedContents( $sectionService->loadSection($standardSectionId) ) ); - $this->assertEquals( + self::assertEquals( $beforeMediaCount - 4, $sectionService->countAssignedContents( $sectionService->loadSection($mediaSectionId) @@ -754,6 +771,7 @@ public function testAssignSectionToSubtree() * Test for the countAssignedContents() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::countAssignedContents() + * * @depends testCreateSection */ public function testCountAssignedContentsReturnsZeroByDefault() @@ -773,13 +791,14 @@ public function testCountAssignedContentsReturnsZeroByDefault() $assignedContents = $sectionService->countAssignedContents($section); /* END: Use Case */ - $this->assertSame(0, $assignedContents); + self::assertSame(0, $assignedContents); } /** * Test for the isSectionUsed() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::isSectionUsed() + * * @depends testCreateSection */ public function testIsSectionUsedReturnsZeroByDefault() @@ -799,13 +818,14 @@ public function testIsSectionUsedReturnsZeroByDefault() $isSectionUsed = $sectionService->isSectionUsed($section); /* END: Use Case */ - $this->assertFalse($isSectionUsed); + self::assertFalse($isSectionUsed); } /** * Test for the deleteSection() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::deleteSection() + * * @depends testLoadSections */ public function testDeleteSection() @@ -825,13 +845,14 @@ public function testDeleteSection() $sectionService->deleteSection($section); /* END: Use Case */ - $this->assertCount(6, $sectionService->loadSections()); + self::assertCount(6, $sectionService->loadSections()); } /** * Test for the deleteSection() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::deleteSection() + * * @depends testDeleteSection */ public function testDeleteSectionThrowsNotFoundException() @@ -861,6 +882,7 @@ public function testDeleteSectionThrowsNotFoundException() * Test for the deleteSection() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::deleteSection() + * * @depends testAssignSection */ public function testDeleteSectionThrowsBadStateException() @@ -898,6 +920,7 @@ public function testDeleteSectionThrowsBadStateException() * Test for the createSection() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::createSection() + * * @depends testCreateSection * @depends testLoadSectionByIdentifier */ @@ -936,13 +959,14 @@ public function testCreateSectionInTransactionWithRollback() } /* END: Use Case */ - $this->assertTrue(isset($e), 'Can still load section after rollback.'); + self::assertTrue(isset($e), 'Can still load section after rollback.'); } /** * Test for the createSection() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::createSection() + * * @depends testCreateSection * @depends testLoadSectionByIdentifier */ @@ -977,13 +1001,14 @@ public function testCreateSectionInTransactionWithCommit() $section = $sectionService->loadSectionByIdentifier(self::SECTION_UNIQUE_KEY); /* END: Use Case */ - $this->assertEquals(self::SECTION_UNIQUE_KEY, $section->identifier); + self::assertEquals(self::SECTION_UNIQUE_KEY, $section->identifier); } /** * Test for the createSection() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::createSection() + * * @depends testUpdateSection * @depends testLoadSectionByIdentifier */ @@ -1020,13 +1045,14 @@ public function testUpdateSectionInTransactionWithRollback() $updatedStandard = $sectionService->loadSectionByIdentifier('standard'); /* END: Use Case */ - $this->assertEquals('Standard', $updatedStandard->name); + self::assertEquals('Standard', $updatedStandard->name); } /** * Test for the createSection() method. * * @covers \Ibexa\Contracts\Core\Repository\SectionService::createSection() + * * @depends testUpdateSection * @depends testLoadSectionByIdentifier */ @@ -1063,7 +1089,7 @@ public function testUpdateSectionInTransactionWithCommit() $updatedStandard = $sectionService->loadSectionByIdentifier('standard'); /* END: Use Case */ - $this->assertEquals('My Standard', $updatedStandard->name); + self::assertEquals('My Standard', $updatedStandard->name); } } diff --git a/tests/integration/Core/Repository/SettingServiceTest.php b/tests/integration/Core/Repository/SettingServiceTest.php index e19688b9c4..612cf8e72f 100644 --- a/tests/integration/Core/Repository/SettingServiceTest.php +++ b/tests/integration/Core/Repository/SettingServiceTest.php @@ -17,6 +17,7 @@ * Test case for operations in the SettingService using in memory storage. * * @covers \Ibexa\Contracts\Core\Repository\SettingService + * * @group integration * @group setting */ diff --git a/tests/integration/Core/Repository/TrashServiceAuthorizationTest.php b/tests/integration/Core/Repository/TrashServiceAuthorizationTest.php index c05865e438..0bf404e336 100644 --- a/tests/integration/Core/Repository/TrashServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/TrashServiceAuthorizationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -16,6 +17,7 @@ * Test case for operations in the TrashService using in memory storage. * * @covers \Ibexa\Contracts\Core\Repository\TrashService + * * @group integration * @group authorization */ @@ -25,6 +27,7 @@ class TrashServiceAuthorizationTest extends BaseTrashServiceTest * Test for the loadTrashItem() method. * * @covers \Ibexa\Contracts\Core\Repository\TrashService::loadTrashItem() + * * @depends Ibexa\Tests\Integration\Core\Repository\TrashServiceTest::testLoadTrashItem * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUser */ @@ -146,6 +149,7 @@ public function testTrashRequiresContentRemovePolicy() * Test for the recover() method. * * @covers \Ibexa\Contracts\Core\Repository\TrashService::recover() + * * @depends Ibexa\Tests\Integration\Core\Repository\TrashServiceTest::testRecover * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUser */ @@ -177,6 +181,7 @@ public function testRecoverThrowsUnauthorizedException() * Test for the recover() method. * * @covers \Ibexa\Contracts\Core\Repository\TrashService::recover($trashItem, $newParentLocation) + * * @depends Ibexa\Tests\Integration\Core\Repository\TrashServiceTest::testRecover * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUser */ @@ -216,6 +221,7 @@ public function testRecoverThrowsUnauthorizedExceptionWithNewParentLocationParam * Test for the emptyTrash() method. * * @covers \Ibexa\Contracts\Core\Repository\TrashService::emptyTrash() + * * @depends Ibexa\Tests\Integration\Core\Repository\TrashServiceTest::testEmptyTrash * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUser */ @@ -247,6 +253,7 @@ public function testEmptyTrashThrowsUnauthorizedException() * Test for the deleteTrashItem() method. * * @covers \Ibexa\Contracts\Core\Repository\TrashService::deleteTrashItem() + * * @depends Ibexa\Tests\Integration\Core\Repository\TrashServiceTest::testDeleteTrashItem * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUser */ diff --git a/tests/integration/Core/Repository/TrashServiceTest.php b/tests/integration/Core/Repository/TrashServiceTest.php index ffb2bc5446..a080bc3b45 100644 --- a/tests/integration/Core/Repository/TrashServiceTest.php +++ b/tests/integration/Core/Repository/TrashServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use DateTime; @@ -28,6 +29,7 @@ * Test case for operations in the TrashService using in memory storage. * * @covers \Ibexa\Contracts\Core\Repository\TrashService + * * @group integration * @group trash */ @@ -44,7 +46,7 @@ public function testTrash() $trashItem = $this->createTrashItem(); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( TrashItem::class, $trashItem ); @@ -130,13 +132,13 @@ public function testTrashRemovesChildLocationsFromMainStorage() foreach ($remoteIds as $remoteId) { try { $locationService->loadLocationByRemoteId($remoteId); - $this->fail("Location '{$remoteId}' should exist.'"); + self::fail("Location '{$remoteId}' should exist.'"); } catch (NotFoundException $e) { // echo $e->getFile(), ' +', $e->getLine(), PHP_EOL; } } - $this->assertGreaterThan( + self::assertGreaterThan( 0, count($remoteIds), "There should be at least one 'Community' child location." @@ -163,7 +165,7 @@ public function testTrashDecrementsChildCountOnParentLocation() $this->refreshSearch($repository); - $this->assertEquals( + self::assertEquals( $childCount - 1, $locationService->getLocationChildCount($location) ); @@ -235,36 +237,36 @@ public function testLoadTrashItem() $trashItemReloaded = $trashService->loadTrashItem($trashItem->id); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( APITrashItem::class, $trashItemReloaded ); - $this->assertEquals( + self::assertEquals( $trashItem->pathString, $trashItemReloaded->pathString ); - $this->assertInstanceOf( + self::assertInstanceOf( DateTime::class, $trashItemReloaded->trashed ); - $this->assertEquals( + self::assertEquals( $trashItem->trashed->getTimestamp(), $trashItemReloaded->trashed->getTimestamp() ); - $this->assertGreaterThan( + self::assertGreaterThan( 0, $trashItemReloaded->trashed->getTimestamp() ); - $this->assertInstanceOf( + self::assertInstanceOf( Content::class, $content = $trashItemReloaded->getContent() ); - $this->assertEquals($trashItem->contentId, $content->contentInfo->id); + self::assertEquals($trashItem->contentId, $content->contentInfo->id); } /** @@ -313,19 +315,19 @@ public function testRecover() ); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( APILocation::class, $location ); - $this->assertEquals( + self::assertEquals( $location, $locationReloaded ); try { $trashService->loadTrashItem($trashItem->id); - $this->fail('Trash item was not removed after being recovered.'); + self::fail('Trash item was not removed after being recovered.'); } catch (NotFoundException $e) { // All well } @@ -402,7 +404,7 @@ public function testAliasesForRemovedItems() $createdLocationAlias = $urlAliasService->lookup('/Media'); - $this->assertNotEquals( + self::assertNotEquals( $trashedLocationAlias->destination, $createdLocationAlias->destination, 'Destination for /media url should changed' @@ -412,10 +414,10 @@ public function testAliasesForRemovedItems() $recoveredLocationAlias = $urlAliasService->lookup('/Media2'); $recoveredLocationAliasReverse = $urlAliasService->reverseLookup($recoveredLocation); - $this->assertEquals($recoveredLocationAlias->destination, $recoveredLocationAliasReverse->destination); + self::assertEquals($recoveredLocationAlias->destination, $recoveredLocationAliasReverse->destination); - $this->assertNotEquals($recoveredLocationAliasReverse->destination, $trashedLocationAlias->destination); - $this->assertNotEquals($recoveredLocationAliasReverse->destination, $createdLocationAlias->destination); + self::assertNotEquals($recoveredLocationAliasReverse->destination, $trashedLocationAlias->destination); + self::assertNotEquals($recoveredLocationAliasReverse->destination, $createdLocationAlias->destination); } /** @@ -438,7 +440,7 @@ public function testRecoverDoesNotRestoreChildLocations() $trashService->recover($trashItem); - $this->assertGreaterThan( + self::assertGreaterThan( 0, count($remoteIds), "There should be at least one 'Community' child location." @@ -448,7 +450,7 @@ public function testRecoverDoesNotRestoreChildLocations() foreach ($remoteIds as $remoteId) { try { $locationService->loadLocationByRemoteId($remoteId); - $this->fail( + self::fail( sprintf( 'Location with remote ID "%s" unexpectedly restored.', $remoteId @@ -461,7 +463,7 @@ public function testRecoverDoesNotRestoreChildLocations() try { $trashService->loadTrashItem($trashItem->id); - $this->fail('Trash item was not removed after being recovered.'); + self::fail('Trash item was not removed after being recovered.'); } catch (NotFoundException $e) { // All well } @@ -512,7 +514,7 @@ public function testRecoverWithLocationCreateStructParameter() try { $trashService->loadTrashItem($trashItem->id); - $this->fail('Trash item was not removed after being recovered.'); + self::fail('Trash item was not removed after being recovered.'); } catch (NotFoundException $e) { // All well } @@ -544,14 +546,14 @@ public function testRecoverIncrementsChildCountOnOriginalParent() $this->refreshSearch($repository); - $this->assertEquals( + self::assertEquals( $childCount + 1, $locationService->getLocationChildCount($location) ); try { $trashService->loadTrashItem($trashItem->id); - $this->fail('Trash item was not removed after being recovered.'); + self::fail('Trash item was not removed after being recovered.'); } catch (NotFoundException $e) { // All well } @@ -589,14 +591,14 @@ public function testRecoverWithLocationCreateStructParameterIncrementsChildCount $this->refreshSearch($repository); - $this->assertEquals( + self::assertEquals( $childCount + 1, $locationService->getLocationChildCount($location) ); try { $trashService->loadTrashItem($trashItem->id); - $this->fail('Trash item was not removed after being recovered.'); + self::fail('Trash item was not removed after being recovered.'); } catch (NotFoundException $e) { // All well } @@ -650,7 +652,7 @@ public function testFindTrashItems( $searchResult = $trashService->findTrashItems($query); - $this->assertEquals($expectedCount, $searchResult->totalCount); + self::assertEquals($expectedCount, $searchResult->totalCount); } /** @@ -717,7 +719,7 @@ public function testFindTrashItemsSort(array $sortClausesClasses): void $ascResultsIds[] = $result->contentInfo->id; } - $this->assertGreaterThanOrEqual($expectedCount, count($ascResultsIds)); + self::assertGreaterThanOrEqual($expectedCount, count($ascResultsIds)); foreach ($sortClausesClasses as $sortClauseClass) { $descQuery->sortClauses[] = new $sortClauseClass(Query::SORT_DESC); @@ -728,12 +730,12 @@ public function testFindTrashItemsSort(array $sortClausesClasses): void $descResultsIds[] = $result->contentInfo->id; } - $this->assertNotSame($descResultsIds, $ascResultsIds); + self::assertNotSame($descResultsIds, $ascResultsIds); krsort($descResultsIds); $descResultsIds = array_values($descResultsIds); - $this->assertSame($descResultsIds, $ascResultsIds); + self::assertSame($descResultsIds, $ascResultsIds); } /** @@ -755,15 +757,15 @@ public function testFindTrashItemsLimits() // Load all trashed locations $searchResult = $trashService->findTrashItems($query); - $this->assertInstanceOf( + self::assertInstanceOf( SearchResult::class, $searchResult ); // 4 trashed locations from the sub tree, but only 2 in results - $this->assertCount(2, $searchResult->items); - $this->assertEquals(4, $searchResult->count); - $this->assertEquals(4, $searchResult->totalCount); + self::assertCount(2, $searchResult->items); + self::assertEquals(4, $searchResult->count); + self::assertEquals(4, $searchResult->totalCount); } /** @@ -803,13 +805,13 @@ public function testFindTrashItemsLimitedAccess() $searchResult = $trashService->findTrashItems($query); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( SearchResult::class, $searchResult ); // 0 trashed locations found, though 4 exist - $this->assertEquals(0, $searchResult->count); + self::assertEquals(0, $searchResult->count); } /** @@ -859,12 +861,12 @@ public function testFindTrashItemsSubtreeLimitation() // Load all trashed locations $searchResult = $trashService->findTrashItems($query); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( SearchResult::class, $searchResult ); - $this->assertEquals(1, count($searchResult->items)); + self::assertEquals(1, count($searchResult->items)); } /** @@ -891,7 +893,7 @@ public function testEmptyTrash() $searchResult = $trashService->findTrashItems($query); /* END: Use Case */ - $this->assertEquals(0, $searchResult->count); + self::assertEquals(0, $searchResult->count); // Try to load content $this->expectException(NotFoundException::class); @@ -935,7 +937,7 @@ public function testEmptyTrashForUserWithSubtreeLimitation() $searchResult = $trashService->findTrashItems($query); /* END: Use Case */ - $this->assertEquals(0, $searchResult->totalCount); + self::assertEquals(0, $searchResult->totalCount); // Try to load content $this->expectException(NotFoundException::class); @@ -983,8 +985,8 @@ static function ($trashItem) { $searchResult->items ); - $this->assertEquals(4, $searchResult->count); - $this->assertTrue( + self::assertEquals(4, $searchResult->count); + self::assertTrue( in_array($demoDesignLocationId, $foundIds) ); @@ -1277,9 +1279,9 @@ private function assertAliasNotExists(URLAliasService $urlAliasService, $urlPath { try { $this->getRepository()->getURLAliasService()->lookup($urlPath); - $this->fail(sprintf('Alias [%s] should not exist', $urlPath)); + self::fail(sprintf('Alias [%s] should not exist', $urlPath)); } catch (NotFoundException $e) { - $this->assertTrue(true); + self::assertTrue(true); } } diff --git a/tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php b/tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php index c4bed8b4dd..08a0ba678a 100644 --- a/tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -14,6 +15,7 @@ class URLAliasServiceAuthorizationTest extends BaseTest * Test for the createUrlAlias() method. * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::createUrlAlias() + * * @depends Ibexa\Tests\Integration\Core\Repository\URLAliasServiceTest::testCreateUrlAlias */ public function testCreateUrlAliasThrowsUnauthorizedException() @@ -47,6 +49,7 @@ public function testCreateUrlAliasThrowsUnauthorizedException() * Test for the createGlobalUrlAlias() method. * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::createGlobalUrlAlias() + * * @depends Ibexa\Tests\Integration\Core\Repository\URLAliasServiceTest::testCreateGlobalUrlAlias */ public function testCreateGlobalUrlAliasThrowsUnauthorizedException() @@ -74,6 +77,7 @@ public function testCreateGlobalUrlAliasThrowsUnauthorizedException() * Test for the removeAliases() method. * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::removeAliases() + * * @depends Ibexa\Tests\Integration\Core\Repository\URLAliasServiceTest::testRemoveAliases */ public function testRemoveAliasesThrowsUnauthorizedException() diff --git a/tests/integration/Core/Repository/URLAliasServiceTest.php b/tests/integration/Core/Repository/URLAliasServiceTest.php index c4284521f2..ce03cf089b 100644 --- a/tests/integration/Core/Repository/URLAliasServiceTest.php +++ b/tests/integration/Core/Repository/URLAliasServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Doctrine\DBAL\Connection; @@ -22,6 +23,7 @@ * Test case for operations in the URLAliasService using in memory storage. * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService + * * @group url-alias */ class URLAliasServiceTest extends BaseTest @@ -47,14 +49,14 @@ protected function setUp(): void ); if (false === is_object($location)) { - $this->markTestSkipped( + self::markTestSkipped( 'This test cannot be executed, because the utilized ' . 'LocationService::loadLocation() does not ' . 'return an object.' ); } } catch (Exception $e) { - $this->markTestSkipped( + self::markTestSkipped( 'This test cannot be executed, because the utilized ' . 'LocationService::loadLocation() failed with ' . PHP_EOL . PHP_EOL . @@ -85,7 +87,7 @@ public function testCreateUrlAlias() $createdUrlAlias = $urlAliasService->createUrlAlias($location, '/Home/My-New-Site', 'eng-US'); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( URLAlias::class, $createdUrlAlias ); @@ -154,7 +156,7 @@ public function testCreateUrlAliasPropertyValues(array $testData) { [$createdUrlAlias, $locationId] = $testData; - $this->assertNotNull($createdUrlAlias->id); + self::assertNotNull($createdUrlAlias->id); $this->assertPropertiesCorrect( [ @@ -175,6 +177,7 @@ public function testCreateUrlAliasPropertyValues(array $testData) * Test for the createUrlAlias() method. * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::createUrlAlias($location, $path, $languageCode, $forwarding) + * * @depends testCreateUrlAliasPropertyValues */ public function testCreateUrlAliasWithForwarding() @@ -194,7 +197,7 @@ public function testCreateUrlAliasWithForwarding() $createdUrlAlias = $urlAliasService->createUrlAlias($location, '/Home/My-New-Site', 'eng-US', true); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( URLAlias::class, $createdUrlAlias ); @@ -211,7 +214,7 @@ public function testCreateUrlAliasPropertyValuesWithForwarding(array $testData) { [$createdUrlAlias, $locationId] = $testData; - $this->assertNotNull($createdUrlAlias->id); + self::assertNotNull($createdUrlAlias->id); $this->assertPropertiesCorrect( [ @@ -250,7 +253,7 @@ public function testCreateUrlAliasWithAlwaysAvailable() $createdUrlAlias = $urlAliasService->createUrlAlias($location, '/Home/My-New-Site', 'eng-US', false, true); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( URLAlias::class, $createdUrlAlias ); @@ -267,7 +270,7 @@ public function testCreateUrlAliasPropertyValuesWithAlwaysAvailable(array $testD { [$createdUrlAlias, $locationId] = $testData; - $this->assertNotNull($createdUrlAlias->id); + self::assertNotNull($createdUrlAlias->id); $this->assertPropertiesCorrect( [ @@ -330,7 +333,7 @@ public function testCreateGlobalUrlAlias() ); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( URLAlias::class, $createdUrlAlias ); @@ -345,7 +348,7 @@ public function testCreateGlobalUrlAlias() */ public function testCreateGlobalUrlAliasPropertyValues(URLAlias $createdUrlAlias) { - $this->assertNotNull($createdUrlAlias->id); + self::assertNotNull($createdUrlAlias->id); $this->assertPropertiesCorrect( [ @@ -382,7 +385,7 @@ public function testCreateGlobalUrlAliasWithForward() ); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( URLAlias::class, $createdUrlAlias ); @@ -397,7 +400,7 @@ public function testCreateGlobalUrlAliasWithForward() */ public function testCreateGlobalUrlAliasWithForwardPropertyValues(URLAlias $createdUrlAlias) { - $this->assertNotNull($createdUrlAlias->id); + self::assertNotNull($createdUrlAlias->id); $this->assertPropertiesCorrect( [ @@ -435,7 +438,7 @@ public function testCreateGlobalUrlAliasWithAlwaysAvailable() ); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( URLAlias::class, $createdUrlAlias ); @@ -450,7 +453,7 @@ public function testCreateGlobalUrlAliasWithAlwaysAvailable() */ public function testCreateGlobalUrlAliasWithAlwaysAvailablePropertyValues(URLAlias $createdUrlAlias) { - $this->assertNotNull($createdUrlAlias->id); + self::assertNotNull($createdUrlAlias->id); $this->assertPropertiesCorrect( [ @@ -494,7 +497,7 @@ public function testCreateGlobalUrlAliasForLocation() ); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( URLAlias::class, $createdUrlAlias ); @@ -529,7 +532,7 @@ public function testCreateGlobalUrlAliasForLocationVariation() ); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( URLAlias::class, $createdUrlAlias ); @@ -546,7 +549,7 @@ public function testCreateGlobalUrlAliasForLocationPropertyValues($testData) { [$createdUrlAlias, $locationId] = $testData; - $this->assertNotNull($createdUrlAlias->id); + self::assertNotNull($createdUrlAlias->id); $this->assertPropertiesCorrect( [ @@ -622,10 +625,10 @@ public function testListLocationAliases() $loadedAliases = $urlAliasService->listLocationAliases($location); /* END: Use Case */ - $this->assertIsArray($loadedAliases); + self::assertIsArray($loadedAliases); // Only 1 non-history alias - $this->assertCount(1, $loadedAliases); + self::assertCount(1, $loadedAliases); return [$loadedAliases, $location]; } @@ -640,11 +643,11 @@ public function testListLocationAliasesLoadsCorrectly(array $testData) [$loadedAliases, $location] = $testData; foreach ($loadedAliases as $loadedAlias) { - $this->assertInstanceOf( + self::assertInstanceOf( URLAlias::class, $loadedAlias ); - $this->assertEquals( + self::assertEquals( $location->id, $loadedAlias->destination ); @@ -676,8 +679,8 @@ public function testListLocationAliasesWithCustomFilter() $loadedAliases = $urlAliasService->listLocationAliases($location, false, 'eng-US'); /* END: Use Case */ - $this->assertIsArray($loadedAliases); - $this->assertCount(1, $loadedAliases); + self::assertIsArray($loadedAliases); + self::assertCount(1, $loadedAliases); } /** @@ -704,8 +707,8 @@ public function testListLocationAliasesWithLanguageCodeFilter() $loadedAliases = $urlAliasService->listLocationAliases($location, true, 'eng-US'); /* END: Use Case */ - $this->assertIsArray($loadedAliases); - $this->assertCount(1, $loadedAliases); + self::assertIsArray($loadedAliases); + self::assertCount(1, $loadedAliases); } /** @@ -727,8 +730,8 @@ public function testListGlobalAliases() $loadedAliases = $urlAliasService->listGlobalAliases(); /* END: Use Case */ - $this->assertIsArray($loadedAliases); - $this->assertCount(3, $loadedAliases); + self::assertIsArray($loadedAliases); + self::assertCount(3, $loadedAliases); } /** @@ -777,8 +780,8 @@ public function testListGlobalAliasesWithLanguageFilter() $loadedAliases = $urlAliasService->listGlobalAliases('eng-US'); /* END: Use Case */ - $this->assertIsArray($loadedAliases); - $this->assertCount(2, $loadedAliases); + self::assertIsArray($loadedAliases); + self::assertCount(2, $loadedAliases); } /** @@ -800,8 +803,8 @@ public function testListGlobalAliasesWithOffset() $loadedAliases = $urlAliasService->listGlobalAliases(null, 1); /* END: Use Case */ - $this->assertIsArray($loadedAliases); - $this->assertCount(2, $loadedAliases); + self::assertIsArray($loadedAliases); + self::assertCount(2, $loadedAliases); } /** @@ -823,8 +826,8 @@ public function testListGlobalAliasesWithLimit() $loadedAliases = $urlAliasService->listGlobalAliases(null, 0, 1); /* END: Use Case */ - $this->assertIsArray($loadedAliases); - $this->assertCount(1, $loadedAliases); + self::assertIsArray($loadedAliases); + self::assertCount(1, $loadedAliases); } /** @@ -862,7 +865,7 @@ public function testRemoveAliases() $urlAliasService->removeAliases($customAliases); /* END: Use Case */ - $this->assertEquals( + self::assertEquals( $initialAliases, $urlAliasService->listLocationAliases($someLocation) ); @@ -912,7 +915,7 @@ public function testLookUp() $loadedAlias = $urlAliasService->lookup('/Setup2'); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( URLAlias::class, $loadedAlias ); @@ -938,11 +941,11 @@ public function testLookUpWithLanguageFilter() $loadedAlias = $urlAliasService->lookup('/My/Special-Support', 'eng-US'); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( URLAlias::class, $loadedAlias ); - $this->assertEquals( + self::assertEquals( 'content/search?SearchText=Ibexa', $loadedAlias->destination ); @@ -1009,6 +1012,7 @@ public function testLookUpThrowsInvalidArgumentException() * Test for the lookUp() method after renaming parent which is a part of the lookup path. * * @see https://issues.ibexa.co/browse/EZP-28046 + * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::lookUp * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::listLocationAliases */ @@ -1062,7 +1066,7 @@ public function testLookupOnRenamedParent() $urlAliasService->lookup('/My-Folder/My-Article'); $aliases = $urlAliasService->listLocationAliases($articleLocation, false); - $this->assertEquals('/My-Folder-Modified/My-Article', $aliases[0]->path); + self::assertEquals('/My-Folder-Modified/My-Article', $aliases[0]->path); } /** @@ -1657,7 +1661,7 @@ protected function changeContentTypeUrlAliasSchema($contentTypeIdentifier, $newU private function assertUrlAliasPropertiesSame(array $expectedValues, URLAlias $urlAlias): void { - $this->assertSame( + self::assertSame( $expectedValues, [ 'type' => $urlAlias->type, diff --git a/tests/integration/Core/Repository/URLServiceAuthorizationTest.php b/tests/integration/Core/Repository/URLServiceAuthorizationTest.php index 578e79a484..c5a73c928b 100644 --- a/tests/integration/Core/Repository/URLServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/URLServiceAuthorizationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; diff --git a/tests/integration/Core/Repository/URLServiceTest.php b/tests/integration/Core/Repository/URLServiceTest.php index e9dc181353..09a9d55065 100644 --- a/tests/integration/Core/Repository/URLServiceTest.php +++ b/tests/integration/Core/Repository/URLServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use DateTime; @@ -21,6 +22,7 @@ * Test case for operations in the UserService using in memory storage. * * @covers \Ibexa\Contracts\Core\Repository\URLService + * * @group integration * @group url */ @@ -243,6 +245,7 @@ public function testFindUrlsWithoutCounting() * Test for URLService::findUrls() method. * * @covers \Ibexa\Contracts\Core\Repository\URLService::findUrls() + * * @depends testFindUrls */ public function testFindUrlsUsingMatchNone() @@ -257,6 +260,7 @@ public function testFindUrlsUsingMatchNone() * Test for URLService::findUrls() method. * * @covers \Ibexa\Contracts\Core\Repository\URLService::findUrls() + * * @depends testFindUrls */ public function testFindUrlsUsingPatternCriterion() @@ -279,6 +283,7 @@ public function testFindUrlsUsingPatternCriterion() * Test for URLService::findUrls() method. * * @covers \Ibexa\Contracts\Core\Repository\URLService::findUrls() + * * @depends testFindUrls */ public function testFindUrlsUsingValidityCriterionValid() @@ -315,6 +320,7 @@ public function testFindUrlsUsingValidityCriterionValid() * Test for URLService::findUrls() method. * * @covers \Ibexa\Contracts\Core\Repository\URLService::findUrls + * * @depends testFindUrls */ public function testFindUrlsUsingSectionIdCriterion(): void @@ -335,6 +341,7 @@ public function testFindUrlsUsingSectionIdCriterion(): void * Test for URLService::findUrls() method. * * @covers \Ibexa\Contracts\Core\Repository\URLService::findUrls() + * * @depends testFindUrls */ public function testFindUrlsUsingSectionIdAndValidityCriterionValid(): void @@ -358,6 +365,7 @@ public function testFindUrlsUsingSectionIdAndValidityCriterionValid(): void * Test for URLService::findUrls() method. * * @covers \Ibexa\Contracts\Core\Repository\URLService::findUrls + * * @depends testFindUrls */ public function testFindUrlsUsingSectionIdentifierCriterion(): void @@ -378,6 +386,7 @@ public function testFindUrlsUsingSectionIdentifierCriterion(): void * Test for URLService::findUrls() method. * * @covers \Ibexa\Contracts\Core\Repository\URLService::findUrls() + * * @depends testFindUrls */ public function testFindUrlsUsingSectionIdentifierAndValidityCriterionValid(): void @@ -403,6 +412,7 @@ public function testFindUrlsUsingSectionIdentifierAndValidityCriterionValid(): v * Test for URLService::findUrls() method. * * @covers \Ibexa\Contracts\Core\Repository\URLService::findUrls() + * * @depends testFindUrls */ public function testFindUrlsUsingSectionIdentifierOrSectionIdCriterion(): void @@ -428,6 +438,7 @@ public function testFindUrlsUsingSectionIdentifierOrSectionIdCriterion(): void * Test for URLService::findUrls() method. * * @covers \Ibexa\Contracts\Core\Repository\URLService::findUrls() + * * @depends testFindUrls */ public function testFindUrlsUsingValidityCriterionInvalid() @@ -446,6 +457,7 @@ public function testFindUrlsUsingValidityCriterionInvalid() * Test for URLService::findUrls() method. * * @covers \Ibexa\Contracts\Core\Repository\URLService::findUrls() + * * @depends testFindUrls */ public function testFindUrlsUsingVisibleOnlyCriterion() @@ -545,6 +557,7 @@ public function testFindUrlsWithInvalidLimitThrowsInvalidArgumentException() * Test for URLService::findUrls() method. * * @covers \Ibexa\Contracts\Core\Repository\URLService::findUrls() + * * @depends testFindUrls */ public function testFindUrlsWithOffset() @@ -574,6 +587,7 @@ public function testFindUrlsWithOffset() * Test for URLService::findUrls() method. * * @covers \Ibexa\Contracts\Core\Repository\URLService::findUrls() + * * @depends testFindUrls */ public function testFindUrlsWithOffsetAndLimit() @@ -597,6 +611,7 @@ public function testFindUrlsWithOffsetAndLimit() * Test for URLService::findUrls() method. * * @covers \Ibexa\Contracts\Core\Repository\URLService::findUrls() + * * @depends testFindUrls */ public function testFindUrlsWithLimitZero() @@ -612,7 +627,9 @@ public function testFindUrlsWithLimitZero() * Test for URLService::findUrls() method. * * @covers \Ibexa\Contracts\Core\Repository\URLService::findUrls() + * * @depends testFindUrls + * * @dataProvider dataProviderForFindUrlsWithSorting */ public function testFindUrlsWithSorting(SortClause $sortClause, array $expectedUrls) @@ -681,7 +698,7 @@ public function testUpdateUrl() $urlAfterUpdate = $urlService->updateUrl($urlBeforeUpdate, $updateStruct); /* END: Use Case */ - $this->assertInstanceOf(URL::class, $urlAfterUpdate); + self::assertInstanceOf(URL::class, $urlAfterUpdate); $this->assertPropertiesCorrect([ 'id' => 23, 'url' => 'https://someurl.com/', @@ -690,7 +707,7 @@ public function testUpdateUrl() 'lastChecked' => null, 'created' => new DateTime('@1343140541'), ], $urlAfterUpdate); - $this->assertGreaterThanOrEqual($urlBeforeUpdate->modified, $urlAfterUpdate->modified); + self::assertGreaterThanOrEqual($urlBeforeUpdate->modified, $urlAfterUpdate->modified); } /** @@ -717,7 +734,7 @@ public function testUpdateUrlStatus() $urlAfterUpdate = $urlService->updateUrl($urlBeforeUpdate, $updateStruct); /* END: Use Case */ - $this->assertInstanceOf(URL::class, $urlAfterUpdate); + self::assertInstanceOf(URL::class, $urlAfterUpdate); $this->assertPropertiesCorrect([ 'id' => $id, 'url' => '/content/view/sitemap/2', @@ -726,13 +743,14 @@ public function testUpdateUrlStatus() 'lastChecked' => $checked, 'created' => new DateTime('@1343140541'), ], $urlAfterUpdate); - $this->assertGreaterThanOrEqual($urlBeforeUpdate->modified, $urlAfterUpdate->modified); + self::assertGreaterThanOrEqual($urlBeforeUpdate->modified, $urlAfterUpdate->modified); } /** * Test for URLService::updateUrl() method. * * @covers \Ibexa\Contracts\Core\Repository\URLService::updateUrl() + * * @depends testUpdateUrl */ public function testUpdateUrlWithNonUniqueUrl() @@ -772,7 +790,7 @@ public function testLoadById() $url = $urlService->loadById($id); /* END: Use Case */ - $this->assertInstanceOf(URL::class, $url); + self::assertInstanceOf(URL::class, $url); $this->assertPropertiesCorrect([ 'id' => 23, 'url' => '/content/view/sitemap/2', @@ -787,6 +805,7 @@ public function testLoadById() * Test for URLService::loadById() method. * * @covers \Ibexa\Contracts\Core\Repository\URLService::loadById + * * @depends testLoadById */ public function testLoadByIdThrowsNotFoundException() @@ -819,7 +838,7 @@ public function testLoadByUrl() /* END: Use Case */ - $this->assertInstanceOf(URL::class, $url); + self::assertInstanceOf(URL::class, $url); $this->assertPropertiesCorrect([ 'id' => 23, 'url' => '/content/view/sitemap/2', @@ -834,6 +853,7 @@ public function testLoadByUrl() * Test for URLService::loadByUrl() method. * * @covers \Ibexa\Contracts\Core\Repository\URLService::loadByUrl + * * @depends testLoadByUrl */ public function testLoadByUrlThrowsNotFoundException() @@ -865,7 +885,7 @@ public function testCreateUpdateStruct() $updateStruct = $urlService->createUpdateStruct(); /* END: Use Case */ - $this->assertInstanceOf(URLUpdateStruct::class, $updateStruct); + self::assertInstanceOf(URLUpdateStruct::class, $updateStruct); return $updateStruct; } @@ -874,6 +894,7 @@ public function testCreateUpdateStruct() * Test for URLService::createUpdateStruct() method. * * @param \Ibexa\Contracts\Core\Repository\Values\URL\URLUpdateStruct $updateStruct + * * @depends testCreateUpdateStruct */ public function testCreateUpdateStructValues(URLUpdateStruct $updateStruct) @@ -889,6 +910,7 @@ public function testCreateUpdateStructValues(URLUpdateStruct $updateStruct) * Test for URLService::testFindUsages() method. * * @depends testLoadById + * * @dataProvider dataProviderForFindUsages */ public function testFindUsages($urlId, $offset, $limit, array $expectedContentInfos, $expectedTotalCount = null) @@ -904,8 +926,8 @@ public function testFindUsages($urlId, $offset, $limit, array $expectedContentIn $usagesSearchResults = $urlService->findUsages($loadedUrl, $offset, $limit); /* END: Use Case */ - $this->assertInstanceOf(UsageSearchResult::class, $usagesSearchResults); - $this->assertEquals($expectedTotalCount, $usagesSearchResults->totalCount); + self::assertInstanceOf(UsageSearchResult::class, $usagesSearchResults); + self::assertEquals($expectedTotalCount, $usagesSearchResults->totalCount); $this->assertUsagesSearchResultItems($usagesSearchResults, $expectedContentInfos); } @@ -936,7 +958,7 @@ public function testFindUsagesReturnsEmptySearchResults() $usagesSearchResults = $urlService->findUsages($loadedUrl); /* END: Use Case */ - $this->assertInstanceOf(UsageSearchResult::class, $usagesSearchResults); + self::assertInstanceOf(UsageSearchResult::class, $usagesSearchResults); $this->assertPropertiesCorrect([ 'totalCount' => 0, 'items' => [], diff --git a/tests/integration/Core/Repository/URLWildcardService/CriterionTest.php b/tests/integration/Core/Repository/URLWildcardService/CriterionTest.php index f44887ac4d..c5cccd7dc9 100644 --- a/tests/integration/Core/Repository/URLWildcardService/CriterionTest.php +++ b/tests/integration/Core/Repository/URLWildcardService/CriterionTest.php @@ -19,6 +19,7 @@ * Test case criterion for URLWildcard. * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService + * * @group url-wildcard */ class CriterionTest extends BaseTest diff --git a/tests/integration/Core/Repository/URLWildcardServiceAuthorizationTest.php b/tests/integration/Core/Repository/URLWildcardServiceAuthorizationTest.php index dd0f093b90..ed098462bc 100644 --- a/tests/integration/Core/Repository/URLWildcardServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/URLWildcardServiceAuthorizationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -12,6 +13,7 @@ * Test case for operations in the URLWildcardService. * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService + * * @group integration * @group authorization */ @@ -19,6 +21,7 @@ class URLWildcardServiceAuthorizationTest extends BaseTest { /** * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::create + * * @depends Ibexa\Tests\Integration\Core\Repository\URLWildcardServiceTest::testCreate */ public function testCreateThrowsUnauthorizedException(): void @@ -46,6 +49,7 @@ public function testCreateThrowsUnauthorizedException(): void * Test for the remove() method. * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::remove() + * * @depends Ibexa\Tests\Integration\Core\Repository\URLWildcardServiceTest::testRemove */ public function testRemoveThrowsUnauthorizedException() diff --git a/tests/integration/Core/Repository/URLWildcardServiceTest.php b/tests/integration/Core/Repository/URLWildcardServiceTest.php index 2e6e6871ad..4526cccfd1 100644 --- a/tests/integration/Core/Repository/URLWildcardServiceTest.php +++ b/tests/integration/Core/Repository/URLWildcardServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\Exceptions\ContentValidationException; @@ -17,6 +18,7 @@ * Test case for operations in the URLWildcardService. * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService + * * @group url-wildcard */ class URLWildcardServiceTest extends BaseTest @@ -39,7 +41,7 @@ public function testCreate() $urlWildcard = $urlWildcardService->create('/articles/*', '/content/{1}'); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( URLWildcard::class, $urlWildcard ); @@ -53,11 +55,12 @@ public function testCreate() * @param \Ibexa\Contracts\Core\Repository\Values\Content\URLWildcard $urlWildcard * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::create() + * * @depends testCreate */ public function testCreateSetsIdPropertyOnURLWildcard(URLWildcard $urlWildcard) { - $this->assertNotNull($urlWildcard->id); + self::assertNotNull($urlWildcard->id); } /** @@ -66,6 +69,7 @@ public function testCreateSetsIdPropertyOnURLWildcard(URLWildcard $urlWildcard) * @param \Ibexa\Contracts\Core\Repository\Values\Content\URLWildcard $urlWildcard * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::create() + * * @depends testCreate */ public function testCreateSetsPropertiesOnURLWildcard(URLWildcard $urlWildcard) @@ -84,6 +88,7 @@ public function testCreateSetsPropertiesOnURLWildcard(URLWildcard $urlWildcard) * Test for the create() method. * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::create() + * * @depends testCreate */ public function testCreateWithOptionalForwardParameter() @@ -111,6 +116,7 @@ public function testCreateWithOptionalForwardParameter() * Test for the create() method. * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::create() + * * @depends testCreate */ public function testCreateThrowsInvalidArgumentExceptionOnDuplicateSourceUrl() @@ -135,6 +141,7 @@ public function testCreateThrowsInvalidArgumentExceptionOnDuplicateSourceUrl() * Test for the create() method. * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::create() + * * @depends testCreate */ public function testCreateThrowsContentValidationExceptionWhenPatternsAndPlaceholdersNotMatch() @@ -156,6 +163,7 @@ public function testCreateThrowsContentValidationExceptionWhenPatternsAndPlaceho * Test for the create() method. * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::create() + * * @depends testCreate */ public function testCreateThrowsContentValidationExceptionWhenPlaceholdersNotValidNumberSequence() @@ -179,6 +187,7 @@ public function testCreateThrowsContentValidationExceptionWhenPlaceholdersNotVal * @return \Ibexa\Contracts\Core\Repository\Values\Content\URLWildcard * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::load() + * * @depends testCreate */ public function testLoad() @@ -195,7 +204,7 @@ public function testLoad() $urlWildcard = $urlWildcardService->load($urlWildcardId); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( URLWildcard::class, $urlWildcard ); @@ -209,6 +218,7 @@ public function testLoad() * @param \Ibexa\Contracts\Core\Repository\Values\Content\URLWildcard $urlWildcard * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::load() + * * @depends testLoad */ public function testLoadSetsPropertiesOnURLWildcard(URLWildcard $urlWildcard) @@ -229,6 +239,7 @@ public function testLoadSetsPropertiesOnURLWildcard(URLWildcard $urlWildcard) * @param \Ibexa\Contracts\Core\Repository\Values\Content\URLWildcard $urlWildcard * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::load() + * * @depends testLoad */ public function testLoadThrowsNotFoundException(URLWildcard $urlWildcard) @@ -273,7 +284,7 @@ public function testUpdate(): void $urlWildcardUpdated = $urlWildcardService->load($urlWildcard->id); - $this->assertEquals( + self::assertEquals( [ $urlWildcard->id, $updateStruct->sourceUrl, @@ -293,6 +304,7 @@ public function testUpdate(): void * Test for the remove() method. * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::remove() + * * @depends testLoad */ public function testRemove() @@ -322,6 +334,7 @@ public function testRemove() * Test for the loadAll() method. * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::loadAll() + * * @depends testCreate */ public function testLoadAll() @@ -339,7 +352,7 @@ public function testLoadAll() $allUrlWildcards = $urlWildcardService->loadAll(); /* END: Use Case */ - $this->assertEquals( + self::assertEquals( [ $urlWildcardOne, $urlWildcardTwo, @@ -352,6 +365,7 @@ public function testLoadAll() * Test for the loadAll() method. * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::loadAll() + * * @depends testLoadAll */ public function testLoadAllWithOffsetParameter() @@ -369,13 +383,14 @@ public function testLoadAllWithOffsetParameter() $allUrlWildcards = $urlWildcardService->loadAll(1); /* END: Use Case */ - $this->assertEquals([$urlWildcardTwo], $allUrlWildcards); + self::assertEquals([$urlWildcardTwo], $allUrlWildcards); } /** * Test for the loadAll() method. * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::loadAll() + * * @depends testLoadAll */ public function testLoadAllWithOffsetAndLimitParameter() @@ -393,13 +408,14 @@ public function testLoadAllWithOffsetAndLimitParameter() $allUrlWildcards = $urlWildcardService->loadAll(0, 1); /* END: Use Case */ - $this->assertEquals([$urlWildcardOne], $allUrlWildcards); + self::assertEquals([$urlWildcardOne], $allUrlWildcards); } /** * Test for the loadAll() method. * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::loadAll() + * * @depends testLoadAll */ public function testLoadAllReturnsEmptyArrayByDefault() @@ -413,7 +429,7 @@ public function testLoadAllReturnsEmptyArrayByDefault() $allUrlWildcards = $urlWildcardService->loadAll(); /* END: Use Case */ - $this->assertSame([], $allUrlWildcards); + self::assertSame([], $allUrlWildcards); } /** @@ -422,6 +438,7 @@ public function testLoadAllReturnsEmptyArrayByDefault() * @return \Ibexa\Contracts\Core\Repository\Values\Content\URLWildcardTranslationResult * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::translate() + * * @depends testCreate */ public function testTranslate() @@ -438,7 +455,7 @@ public function testTranslate() $result = $urlWildcardService->translate('/articles/2012/05/sindelfingen'); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( URLWildcardTranslationResult::class, $result ); @@ -452,6 +469,7 @@ public function testTranslate() * @param \Ibexa\Contracts\Core\Repository\Values\Content\URLWildcardTranslationResult $result * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::translate() + * * @depends testTranslate */ public function testTranslateSetsPropertiesOnTranslationResult(URLWildcardTranslationResult $result) @@ -469,6 +487,7 @@ public function testTranslateSetsPropertiesOnTranslationResult(URLWildcardTransl * Test for the translate() method. * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::translate() + * * @depends testTranslate */ public function testTranslateWithForwardSetToTrue() @@ -498,6 +517,7 @@ public function testTranslateWithForwardSetToTrue() * Test for the translate() method. * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::translate() + * * @depends testTranslate */ public function testTranslateReturnsLongestMatchingWildcard() @@ -515,13 +535,14 @@ public function testTranslateReturnsLongestMatchingWildcard() $result = $urlWildcardService->translate('/articles/2012/05/sindelfingen/42'); /* END: Use Case */ - $this->assertEquals('/content/42/bar/2012', $result->uri); + self::assertEquals('/content/42/bar/2012', $result->uri); } /** * Test for the translate() method. * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::translate() + * * @depends testTranslate */ public function testTranslateThrowsNotFoundExceptionWhenNotAliasOrWildcardMatches() @@ -544,7 +565,7 @@ public function testCountAllReturnsZeroByDefault(): void $repository = $this->getRepository(); $urlWildcardService = $repository->getURLWildcardService(); - $this->assertSame(0, $urlWildcardService->countAll()); + self::assertSame(0, $urlWildcardService->countAll()); } public function testCountAll(): void @@ -554,7 +575,7 @@ public function testCountAll(): void $urlWildcardService->create('/articles/*', '/content/{1}'); - $this->assertSame(1, $urlWildcardService->countAll()); + self::assertSame(1, $urlWildcardService->countAll()); } } diff --git a/tests/integration/Core/Repository/UserPreferenceServiceTest.php b/tests/integration/Core/Repository/UserPreferenceServiceTest.php index 808c9ba2b2..6ad5bb6876 100644 --- a/tests/integration/Core/Repository/UserPreferenceServiceTest.php +++ b/tests/integration/Core/Repository/UserPreferenceServiceTest.php @@ -32,10 +32,10 @@ public function testLoadUserPreferences() $userPreferenceList = $userPreferenceService->loadUserPreferences(0, 25); /* END: Use Case */ - $this->assertInstanceOf(UserPreferenceList::class, $userPreferenceList); - $this->assertIsArray($userPreferenceList->items); - $this->assertIsInt($userPreferenceList->totalCount); - $this->assertEquals(5, $userPreferenceList->totalCount); + self::assertInstanceOf(UserPreferenceList::class, $userPreferenceList); + self::assertIsArray($userPreferenceList->items); + self::assertIsInt($userPreferenceList->totalCount); + self::assertEquals(5, $userPreferenceList->totalCount); } /** @@ -53,12 +53,13 @@ public function testGetUserPreference() $userPreference = $userPreferenceService->getUserPreference($userPreferenceName); /* END: Use Case */ - $this->assertInstanceOf(UserPreference::class, $userPreference); - $this->assertEquals($userPreferenceName, $userPreference->name); + self::assertInstanceOf(UserPreference::class, $userPreference); + self::assertEquals($userPreferenceName, $userPreference->name); } /** * @covers \Ibexa\Contracts\Core\Repository\UserPreferenceService::setUserPreference() + * * @depends testGetUserPreference */ public function testSetUserPreference() @@ -79,12 +80,13 @@ public function testSetUserPreference() $userPreference = $userPreferenceService->getUserPreference($userPreferenceName); /* END: Use Case */ - $this->assertInstanceOf(UserPreference::class, $userPreference); - $this->assertEquals($userPreferenceName, $userPreference->name); + self::assertInstanceOf(UserPreference::class, $userPreference); + self::assertEquals($userPreferenceName, $userPreference->name); } /** * @covers \Ibexa\Contracts\Core\Repository\UserPreferenceService::setUserPreference() + * * @depends testSetUserPreference */ public function testSetUserPreferenceThrowsInvalidArgumentExceptionOnInvalidValue() @@ -108,6 +110,7 @@ public function testSetUserPreferenceThrowsInvalidArgumentExceptionOnInvalidValu /** * @covers \Ibexa\Contracts\Core\Repository\UserPreferenceService::setUserPreference() + * * @depends testSetUserPreference */ public function testSetUserPreferenceThrowsInvalidArgumentExceptionOnEmptyName() @@ -140,7 +143,7 @@ public function testGetUserPreferenceCount() $userPreferenceCount = $userPreferenceService->getUserPreferenceCount(); /* END: Use Case */ - $this->assertEquals(5, $userPreferenceCount); + self::assertEquals(5, $userPreferenceCount); } } diff --git a/tests/integration/Core/Repository/UserServiceAuthorizationTest.php b/tests/integration/Core/Repository/UserServiceAuthorizationTest.php index 865301f4e3..7a45131194 100644 --- a/tests/integration/Core/Repository/UserServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/UserServiceAuthorizationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -12,6 +13,7 @@ * Test case for operations in the UserService using in memory storage. * * @covers \Ibexa\Contracts\Core\Repository\UserService + * * @group integration * @group authorization */ @@ -21,6 +23,7 @@ class UserServiceAuthorizationTest extends BaseTest * Test for the loadUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUserGroup() + * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUserGroup */ public function testLoadUserGroupThrowsUnauthorizedException() @@ -48,6 +51,7 @@ public function testLoadUserGroupThrowsUnauthorizedException() * Test for the loadUserGroupByRemoteId() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUserGroupByRemoteId() + * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUserGroupByRemoteId */ public function testLoadUserGroupByRemoteIdThrowsUnauthorizedException(): void @@ -73,6 +77,7 @@ public function testLoadUserGroupByRemoteIdThrowsUnauthorizedException(): void * Test for the loadSubUserGroups() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadSubUserGroups() + * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadSubUserGroups */ public function testLoadSubUserGroupsThrowsUnauthorizedException() @@ -100,6 +105,7 @@ public function testLoadSubUserGroupsThrowsUnauthorizedException() * Test for the createUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::createUserGroup() + * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUserGroup */ public function testCreateUserGroupThrowsUnauthorizedException() @@ -134,6 +140,7 @@ public function testCreateUserGroupThrowsUnauthorizedException() * Test for the deleteUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::deleteUserGroup() + * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testDeleteUserGroup */ public function testDeleteUserGroupThrowsUnauthorizedException() @@ -161,6 +168,7 @@ public function testDeleteUserGroupThrowsUnauthorizedException() * Test for the moveUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::moveUserGroup() + * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testMoveUserGroup */ public function testMoveUserGroupThrowsUnauthorizedException() @@ -195,6 +203,7 @@ public function testMoveUserGroupThrowsUnauthorizedException() * Test for the updateUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::updateUserGroup() + * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testUpdateUserGroup */ public function testUpdateUserGroupThrowsUnauthorizedException() @@ -232,6 +241,7 @@ public function testUpdateUserGroupThrowsUnauthorizedException() * Test for the createUser() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::createUser() + * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ public function testCreateUserThrowsUnauthorizedException() @@ -275,6 +285,7 @@ public function testCreateUserThrowsUnauthorizedException() * Test for the deleteUser() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::deleteUser() + * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testDeleteUser */ public function testDeleteUserThrowsUnauthorizedException() @@ -353,6 +364,7 @@ public function testUpdateUserPasswordThrowsUnauthorizedException(): void * Test for the assignUserToUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::assignUserToUserGroup() + * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testAssignUserToUserGroup */ public function testAssignUserToUserGroupThrowsUnauthorizedException() @@ -385,6 +397,7 @@ public function testAssignUserToUserGroupThrowsUnauthorizedException() * Test for the unAssignUssrFromUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::unAssignUssrFromUserGroup() + * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testUnAssignUserFromUserGroup */ public function testUnAssignUserFromUserGroupThrowsUnauthorizedException() @@ -425,6 +438,7 @@ public function testUnAssignUserFromUserGroupThrowsUnauthorizedException() * Test for the loadUserGroupsOfUser() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUserGroupsOfUser() + * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUserGroupsOfUser */ public function testLoadUserGroupsOfUserThrowsUnauthorizedException() @@ -451,6 +465,7 @@ public function testLoadUserGroupsOfUserThrowsUnauthorizedException() * Test for the loadUsersOfUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUsersOfUserGroup() + * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUsersOfUserGroup */ public function testLoadUsersOfUserGroupThrowsUnauthorizedException() diff --git a/tests/integration/Core/Repository/UserServiceTest.php b/tests/integration/Core/Repository/UserServiceTest.php index d1d02f8fdd..3665012aa3 100644 --- a/tests/integration/Core/Repository/UserServiceTest.php +++ b/tests/integration/Core/Repository/UserServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository; use DateInterval; @@ -39,6 +40,7 @@ * Test case for operations in the UserService using in memory storage. * * @covers \Ibexa\Contracts\Core\Repository\UserService + * * @group integration * @group user */ @@ -68,12 +70,12 @@ public function testLoadUserGroup() $userGroup = $userService->loadUserGroup($mainGroupId); /* END: Use Case */ - $this->assertInstanceOf(UserGroup::class, $userGroup); + self::assertInstanceOf(UserGroup::class, $userGroup); // User group happens to also be a Content; isUserGroup() should be true and isUser() should be false - $this->assertTrue($userService->isUserGroup($userGroup), 'isUserGroup() => false on a user group'); - $this->assertFalse($userService->isUser($userGroup), 'isUser() => true on a user group'); - $this->assertSame(0, $userGroup->parentId, 'parentId should be equal `0` because it is top level node'); + self::assertTrue($userService->isUserGroup($userGroup), 'isUserGroup() => false on a user group'); + self::assertFalse($userService->isUser($userGroup), 'isUser() => true on a user group'); + self::assertSame(0, $userGroup->parentId, 'parentId should be equal `0` because it is top level node'); } /** @@ -88,11 +90,11 @@ public function testLoadUserGroupByRemoteId(): void $userService = $this->getRepository()->getUserService(); $userGroup = $userService->loadUserGroupByRemoteId($existingRemoteId); - $this->assertInstanceOf(UserGroup::class, $userGroup); - $this->assertEquals($existingRemoteId, $userGroup->contentInfo->remoteId); + self::assertInstanceOf(UserGroup::class, $userGroup); + self::assertEquals($existingRemoteId, $userGroup->contentInfo->remoteId); // User group happens to also be a Content; isUserGroup() should be true and isUser() should be false - $this->assertTrue($userService->isUserGroup($userGroup), 'isUserGroup() => false on a user group'); - $this->assertFalse($userService->isUser($userGroup), 'isUser() => true on a user group'); + self::assertTrue($userService->isUserGroup($userGroup), 'isUserGroup() => false on a user group'); + self::assertFalse($userService->isUser($userGroup), 'isUser() => true on a user group'); } /** @@ -123,18 +125,19 @@ public function testLoadUserGroupWithNoAccessToParent() $userGroup = $userService->loadUserGroup($mainGroupId); /* END: Use Case */ - $this->assertInstanceOf(UserGroup::class, $userGroup); + self::assertInstanceOf(UserGroup::class, $userGroup); // User group happens to also be a Content; isUserGroup() should be true and isUser() should be false - $this->assertTrue($userService->isUserGroup($userGroup), 'isUserGroup() => false on a user group'); - $this->assertFalse($userService->isUser($userGroup), 'isUser() => true on a user group'); - $this->assertSame(0, $userGroup->parentId, 'parentId should be equal `0` because it is top level node'); + self::assertTrue($userService->isUserGroup($userGroup), 'isUserGroup() => false on a user group'); + self::assertFalse($userService->isUser($userGroup), 'isUser() => true on a user group'); + self::assertSame(0, $userGroup->parentId, 'parentId should be equal `0` because it is top level node'); } /** * Test for the loadUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUserGroup() + * * @depends testLoadUserGroup */ public function testLoadUserGroupThrowsNotFoundException() @@ -156,6 +159,7 @@ public function testLoadUserGroupThrowsNotFoundException() * Test for the loadUserGroupByRemoteId() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUserGroupByRemoteId() + * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUserGroupByRemoteId */ public function testLoadUserGroupByRemoteIdThrowsNotFoundException(): void @@ -172,6 +176,7 @@ public function testLoadUserGroupByRemoteIdThrowsNotFoundException(): void * Test for the loadSubUserGroups() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadSubUserGroups() + * * @depends testLoadUserGroup */ public function testLoadSubUserGroups() @@ -189,7 +194,7 @@ public function testLoadSubUserGroups() $subUserGroups = $userService->loadSubUserGroups($userGroup); foreach ($subUserGroups as $subUserGroup) { // Do something with the $subUserGroup - $this->assertInstanceOf(UserGroup::class, $subUserGroup); + self::assertInstanceOf(UserGroup::class, $subUserGroup); } /* END: Use Case */ } @@ -256,11 +261,12 @@ public function testNewUserGroupCreateStruct() * @param \Ibexa\Contracts\Core\Repository\Values\User\UserGroupCreateStruct $groupCreate * * @covers \Ibexa\Contracts\Core\Repository\UserService::newUserGroupCreateStruct() + * * @depends testNewUserGroupCreateStruct */ public function testNewUserGroupCreateStructSetsMainLanguageCode($groupCreate) { - $this->assertEquals('eng-US', $groupCreate->mainLanguageCode); + self::assertEquals('eng-US', $groupCreate->mainLanguageCode); } /** @@ -269,11 +275,12 @@ public function testNewUserGroupCreateStructSetsMainLanguageCode($groupCreate) * @param \Ibexa\Contracts\Core\Repository\Values\User\UserGroupCreateStruct $groupCreate * * @covers \Ibexa\Contracts\Core\Repository\UserService::newUserGroupCreateStruct() + * * @depends testNewUserGroupCreateStruct */ public function testNewUserGroupCreateStructSetsContentType($groupCreate) { - $this->assertInstanceOf( + self::assertInstanceOf( ContentType::class, $groupCreate->contentType ); @@ -283,6 +290,7 @@ public function testNewUserGroupCreateStructSetsContentType($groupCreate) * Test for the newUserGroupCreateStruct() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::newUserGroupCreateStruct($mainLanguageCode, $contentType) + * * @depends testNewUserGroupCreateStruct */ public function testNewUserGroupCreateStructWithSecondParameter() @@ -303,7 +311,7 @@ public function testNewUserGroupCreateStructWithSecondParameter() ); /* END: Use Case */ - $this->assertSame($groupType, $groupCreate->contentType); + self::assertSame($groupType, $groupCreate->contentType); } /** @@ -312,6 +320,7 @@ public function testNewUserGroupCreateStructWithSecondParameter() * @return \Ibexa\Contracts\Core\Repository\Values\User\UserGroup * * @covers \Ibexa\Contracts\Core\Repository\UserService::createUserGroup() + * * @depends testNewUserGroupCreateStruct * @depends testLoadUserGroup */ @@ -321,15 +330,15 @@ public function testCreateUserGroup() $userGroup = $this->createUserGroupVersion1(); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( UserGroup::class, $userGroup ); $versionInfo = $userGroup->getVersionInfo(); - $this->assertEquals(APIVersionInfo::STATUS_PUBLISHED, $versionInfo->status); - $this->assertEquals(1, $versionInfo->versionNo); + self::assertEquals(APIVersionInfo::STATUS_PUBLISHED, $versionInfo->status); + self::assertEquals(1, $versionInfo->versionNo); return $userGroup; } @@ -340,11 +349,12 @@ public function testCreateUserGroup() * @param \Ibexa\Contracts\Core\Repository\Values\User\UserGroup $userGroup * * @covers \Ibexa\Contracts\Core\Repository\UserService::createUserGroup() + * * @depends testCreateUserGroup */ public function testCreateUserGroupSetsExpectedProperties($userGroup) { - $this->assertEquals( + self::assertEquals( [ 'parentId' => $this->generateId('group', 4), ], @@ -358,6 +368,7 @@ public function testCreateUserGroupSetsExpectedProperties($userGroup) * Test for the createUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::createUserGroup() + * * @depends testCreateUserGroup */ public function testCreateUserGroupThrowsInvalidArgumentException() @@ -393,6 +404,7 @@ public function testCreateUserGroupThrowsInvalidArgumentException() * Test for the createUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::createUserGroup() + * * @depends testCreateUserGroup */ public function testCreateUserGroupThrowsInvalidArgumentExceptionFieldTypeNotAccept() @@ -427,6 +439,7 @@ public function testCreateUserGroupThrowsInvalidArgumentExceptionFieldTypeNotAcc * Test for the createUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::createUserGroup() + * * @depends testCreateUserGroup */ public function testCreateUserGroupWhenMissingField() @@ -457,6 +470,7 @@ public function testCreateUserGroupWhenMissingField() * Test for the createUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::createUserGroup + * * @depends testNewUserGroupCreateStruct * @depends testLoadUserGroup */ @@ -501,13 +515,14 @@ public function testCreateUserGroupInTransactionWithRollback(): void } /* END: Use Case */ - $this->fail('User group object still exists after rollback.'); + self::fail('User group object still exists after rollback.'); } /** * Test for the deleteUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::deleteUserGroup() + * * @depends testCreateUserGroup */ public function testDeleteUserGroup() @@ -559,6 +574,7 @@ public function testDeleteUserGroupThrowsNotFoundException() * Test for the moveUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::moveUserGroup() + * * @depends testCreateUserGroup * @depends testLoadSubUserGroups */ @@ -598,8 +614,8 @@ static function ($content) { $subUserGroups ); - $this->assertEquals($membersGroupId, $userGroup->parentId); - $this->assertEquals([$userGroup->id], $subUserGroupIds); + self::assertEquals($membersGroupId, $userGroup->parentId); + self::assertEquals([$userGroup->id], $subUserGroupIds); } /** @@ -656,19 +672,20 @@ public function testNewUserGroupUpdateStruct() $groupUpdate = $userService->newUserGroupUpdateStruct(); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( UserGroupUpdateStruct::class, $groupUpdate ); - $this->assertNull($groupUpdate->contentUpdateStruct); - $this->assertNull($groupUpdate->contentMetadataUpdateStruct); + self::assertNull($groupUpdate->contentUpdateStruct); + self::assertNull($groupUpdate->contentMetadataUpdateStruct); } /** * Test for the updateUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::updateUserGroup() + * * @depends testCreateUserGroup * @depends testNewUserGroupUpdateStruct */ @@ -690,18 +707,19 @@ public function testUpdateUserGroup() ); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( UserGroup::class, $userGroup ); - $this->assertEquals(1, $userGroup->getVersionInfo()->versionNo); + self::assertEquals(1, $userGroup->getVersionInfo()->versionNo); } /** * Test for the updateUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::updateUserGroup() + * * @depends testUpdateUserGroup */ public function testUpdateUserGroupWithSubContentUpdateStruct() @@ -730,18 +748,19 @@ public function testUpdateUserGroupWithSubContentUpdateStruct() ); /* END: Use Case */ - $this->assertEquals('Sindelfingen', $userGroup->getFieldValue('name', 'eng-US')); + self::assertEquals('Sindelfingen', $userGroup->getFieldValue('name', 'eng-US')); $versionInfo = $userGroup->getVersionInfo(); - $this->assertEquals(APIVersionInfo::STATUS_PUBLISHED, $versionInfo->status); - $this->assertEquals(2, $versionInfo->versionNo); + self::assertEquals(APIVersionInfo::STATUS_PUBLISHED, $versionInfo->status); + self::assertEquals(2, $versionInfo->versionNo); } /** * Test for the updateUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::updateUserGroup() + * * @depends testUpdateUserGroup */ public function testUpdateUserGroupWithSubContentMetadataUpdateStruct() @@ -770,21 +789,22 @@ public function testUpdateUserGroupWithSubContentMetadataUpdateStruct() ); /* END: Use Case */ - $this->assertEquals( + self::assertEquals( '3c61299780663bafa3af2101e52125da', $userGroup->contentInfo->remoteId ); $versionInfo = $userGroup->getVersionInfo(); - $this->assertEquals(APIVersionInfo::STATUS_PUBLISHED, $versionInfo->status); - $this->assertEquals(1, $versionInfo->versionNo); + self::assertEquals(APIVersionInfo::STATUS_PUBLISHED, $versionInfo->status); + self::assertEquals(1, $versionInfo->versionNo); } /** * Test for the updateUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::updateUserGroup() + * * @depends testUpdateUserGroup */ public function testUpdateUserGroupThrowsInvalidArgumentExceptionOnFieldTypeNotAccept() @@ -870,11 +890,12 @@ public function testUpdateUserGroupThrowsContentFieldValidationExceptionOnRequir * @param \Ibexa\Contracts\Core\Repository\Values\User\UserCreateStruct $userCreate * * @covers \Ibexa\Contracts\Core\Repository\UserService::newUserCreateStruct() + * * @depends testNewUserCreateStruct */ public function testNewUserCreateStructSetsExpectedProperties($userCreate) { - $this->assertEquals( + self::assertEquals( [ 'login' => 'user', 'email' => 'user@example.com', @@ -894,6 +915,7 @@ public function testNewUserCreateStructSetsExpectedProperties($userCreate) * Test for the newUserCreateStruct() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::newUserCreateStruct($login, $email, $password, $mainLanguageCode, $contentType) + * * @depends testNewUserCreateStruct */ public function testNewUserCreateStructWithFifthParameter() @@ -915,7 +937,7 @@ public function testNewUserCreateStructWithFifthParameter() ); /* END: Use Case */ - $this->assertSame($userType, $userCreate->contentType); + self::assertSame($userType, $userCreate->contentType); } public function testNewUserWithDomainName(): void @@ -937,6 +959,7 @@ public function testNewUserWithDomainName(): void * @return \Ibexa\Contracts\Core\Repository\Values\User\User * * @covers \Ibexa\Contracts\Core\Repository\UserService::createUser() + * * @depends testLoadUserGroup * @depends testNewUserCreateStruct */ @@ -946,7 +969,7 @@ public function testCreateUser() $user = $this->createUserVersion1(); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( User::class, $user ); @@ -960,11 +983,12 @@ public function testCreateUser() * @param \Ibexa\Contracts\Core\Repository\Values\User\User $user * * @covers \Ibexa\Contracts\Core\Repository\UserService::createUser() + * * @depends testCreateUser */ public function testCreateUserSetsExpectedProperties(User $user) { - $this->assertEquals( + self::assertEquals( [ 'login' => 'user', 'email' => 'user@example.com', @@ -982,6 +1006,7 @@ public function testCreateUserSetsExpectedProperties(User $user) * Test for the createUser() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::createUser() + * * @depends testCreateUser */ public function testCreateUserWhenMissingField() @@ -1022,6 +1047,7 @@ public function testCreateUserWhenMissingField() * Test for the createUser() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::createUser() + * * @depends testCreateUser */ public function testCreateUserThrowsInvalidArgumentExceptionOnFieldTypeNotAccept() @@ -1062,6 +1088,7 @@ public function testCreateUserThrowsInvalidArgumentExceptionOnFieldTypeNotAccept * Test for the createUser() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::createUser + * * @depends testCreateUser */ public function testCreateUserThrowsInvalidArgumentException() @@ -1103,13 +1130,14 @@ public function testCreateUserThrowsInvalidArgumentException() return; } - $this->fail('Expected ValidationError messages did not occur.'); + self::fail('Expected ValidationError messages did not occur.'); } /** * Test for the createUser() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::createUser + * * @depends testCreateUser */ public function testCreateUserWithEmailAlreadyTaken(): void @@ -1160,13 +1188,14 @@ public function testCreateUserWithEmailAlreadyTaken(): void return; } - $this->fail('Expected ValidationError messages did not occur.'); + self::fail('Expected ValidationError messages did not occur.'); } /** * Test for the createUser() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::createUser + * * @depends testCreateUser */ public function testCreateInvalidFormatUsername(): void @@ -1211,13 +1240,14 @@ public function testCreateInvalidFormatUsername(): void return; } - $this->fail('Expected ValidationError messages did not occur.'); + self::fail('Expected ValidationError messages did not occur.'); } /** * Test for the createUser() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::createUser + * * @depends testLoadUserGroup * @depends testNewUserCreateStruct */ @@ -1247,7 +1277,7 @@ public function testCreateUserInTransactionWithRollback(): void } /* END: Use Case */ - $this->fail('User object still exists after rollback.'); + self::fail('User object still exists after rollback.'); } /** @@ -1311,7 +1341,7 @@ public function testCreateUserWithWeakPasswordThrowsUserPasswordValidationExcept return; } - $this->fail('Expected ValidationError messages did not occur.'); + self::fail('Expected ValidationError messages did not occur.'); } /** @@ -1327,7 +1357,7 @@ public function testCreateUserWithStrongPassword() $user = $this->createTestUserWithPassword('H@xxi0r!', $userContentType); /* END: Use Case */ - $this->assertInstanceOf(User::class, $user); + self::assertInstanceOf(User::class, $user); } /** @@ -1361,6 +1391,7 @@ public function testLoadUser(): void * Test for the loadUser() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUser() + * * @depends testLoadUser */ public function testLoadUserThrowsNotFoundException() @@ -1381,6 +1412,7 @@ public function testLoadUserThrowsNotFoundException() /** * @covers \Ibexa\Contracts\Core\Repository\UserService::checkUserCredentials() + * * @depends testCreateUser */ public function testCheckUserCredentialsValid(): void @@ -1396,11 +1428,12 @@ public function testCheckUserCredentialsValid(): void $credentialsValid = $userService->checkUserCredentials($user, 'VerySecret@Password.1234'); /* END: Use Case */ - $this->assertTrue($credentialsValid); + self::assertTrue($credentialsValid); } /** * @covers \Ibexa\Contracts\Core\Repository\UserService::checkUserCredentials() + * * @depends testCreateUser */ public function testCheckUserCredentialsInvalid(): void @@ -1416,13 +1449,14 @@ public function testCheckUserCredentialsInvalid(): void $credentialsValid = $userService->checkUserCredentials($user, 'NotSoSecretPassword'); /* END: Use Case */ - $this->assertFalse($credentialsValid); + self::assertFalse($credentialsValid); } /** * Test for the loadUserByLogin() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUserByLogin() + * * @depends testCreateUser */ public function testLoadUserByLogin() @@ -1459,6 +1493,7 @@ public function testLoadUserByLogin() * Test for the loadUserByLogin() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUserByLogin() + * * @depends testLoadUserByLogin */ public function testLoadUserByLoginThrowsNotFoundExceptionForUnknownLogin() @@ -1482,6 +1517,7 @@ public function testLoadUserByLoginThrowsNotFoundExceptionForUnknownLogin() * Test for the loadUserByLogin() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUserByLogin() + * * @depends testLoadUserByLogin */ public function testLoadUserByLoginWorksForLoginWithWrongCase() @@ -1520,6 +1556,7 @@ public function testLoadUserByLoginWorksForLoginWithWrongCase() * In some cases people use email as login name, make sure system works as exepcted when asking for user by email. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUserByLogin() + * * @depends testLoadUserByLogin */ public function testLoadUserByLoginThrowsNotFoundExceptionForUnknownLoginByEmail() @@ -1562,6 +1599,7 @@ public function testLoadUserByEmail(): void * Test for the loadUsersByEmail() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUsersByEmail() + * * @depends testLoadUserByEmail */ public function testLoadUserByEmailReturnsEmptyInUnknownEmail() @@ -1578,13 +1616,14 @@ public function testLoadUserByEmailReturnsEmptyInUnknownEmail() $emptyUserList = $userService->loadUsersByEmail('user42@example.com'); /* END: Use Case */ - $this->assertEquals([], $emptyUserList); + self::assertEquals([], $emptyUserList); } /** * Test for the deleteUser() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::deleteUser() + * * @depends testCreateUser * @depends testLoadUser */ @@ -1611,6 +1650,7 @@ public function testDeleteUser() * Test for the deleteUser() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::deleteUser() + * * @depends testCreateUser * @depends testLoadUser */ @@ -1639,7 +1679,7 @@ public function testDeleteUserDeletesRelatedBookmarks() $repository->getPermissionResolver()->setCurrentUserReference($user); /* END: Use Case */ - $this->assertEquals(0, $bookmarkService->loadBookmarks(0, 9999)->totalCount); + self::assertEquals(0, $bookmarkService->loadBookmarks(0, 9999)->totalCount); } /** @@ -1658,13 +1698,13 @@ public function testNewUserUpdateStruct() $userUpdate = $userService->newUserUpdateStruct(); /* END: Use Case */ - $this->assertInstanceOf( + self::assertInstanceOf( UserUpdateStruct::class, $userUpdate ); - $this->assertNull($userUpdate->contentUpdateStruct); - $this->assertNull($userUpdate->contentMetadataUpdateStruct); + self::assertNull($userUpdate->contentUpdateStruct); + self::assertNull($userUpdate->contentMetadataUpdateStruct); $this->assertPropertiesCorrect( [ @@ -1683,6 +1723,7 @@ public function testNewUserUpdateStruct() * @return \Ibexa\Contracts\Core\Repository\Values\User\User * * @covers \Ibexa\Contracts\Core\Repository\UserService::updateUser() + * * @depends testCreateUser * @depends testNewUserUpdateStruct */ @@ -1707,7 +1748,7 @@ public function testUpdateUser() $userVersion2 = $userService->updateUser($user, $userUpdate); /* END: Use Case */ - $this->assertInstanceOf(User::class, $userVersion2); + self::assertInstanceOf(User::class, $userVersion2); return $userVersion2; } @@ -1725,22 +1766,23 @@ public function testUpdateUserEmail(): void // Check we get what we expect (and implicit warmup any kind of cache) $users = $userService->loadUsersByEmail('user2@example.com'); - $this->assertCount(0, $users); + self::assertCount(0, $users); // Update user with the given email address $userUpdate = $userService->newUserUpdateStruct(); $userUpdate->email = 'user2@example.com'; $updatedUser = $userService->updateUser($user, $userUpdate); - $this->assertInstanceOf(User::class, $updatedUser); + self::assertInstanceOf(User::class, $updatedUser); // Check that we can load user by email $users = $userService->loadUsersByEmail('user2@example.com'); - $this->assertCount(1, $users); - $this->assertInstanceOf(User::class, $users[0]); + self::assertCount(1, $users); + self::assertInstanceOf(User::class, $users[0]); } /** * @covers \Ibexa\Contracts\Core\Repository\UserService::updateUser + * * @depends testCreateUser * @depends testNewUserUpdateStruct */ @@ -1763,9 +1805,9 @@ public function testUpdateUserNoPassword(): void $userVersion2 = $userService->updateUser($user, $userUpdate); /* END: Use Case */ - $this->assertInstanceOf(User::class, $user); + self::assertInstanceOf(User::class, $user); - $this->assertEquals( + self::assertEquals( [ 'login' => $user->login, 'email' => $user->email, @@ -1791,11 +1833,12 @@ public function testUpdateUserNoPassword(): void * @param \Ibexa\Contracts\Core\Repository\Values\User\User $user * * @covers \Ibexa\Contracts\Core\Repository\UserService::updateUser() + * * @depends testUpdateUser */ public function testUpdateUserUpdatesExpectedProperties(User $user) { - $this->assertEquals( + self::assertEquals( [ 'login' => 'user', 'email' => 'user@example.com', @@ -1811,8 +1854,8 @@ public function testUpdateUserUpdatesExpectedProperties(User $user) ); // Make sure passwordUpdatedAt field has been updated together with password - $this->assertNotNull($user->passwordUpdatedAt); - $this->assertEqualsWithDelta( + self::assertNotNull($user->passwordUpdatedAt); + self::assertEqualsWithDelta( $user->getVersionInfo()->modificationDate->getTimestamp(), $user->passwordUpdatedAt->getTimestamp(), 2.0 @@ -1825,11 +1868,12 @@ public function testUpdateUserUpdatesExpectedProperties(User $user) * @param \Ibexa\Contracts\Core\Repository\Values\User\User $user * * @covers \Ibexa\Contracts\Core\Repository\UserService::updateUser() + * * @depends testUpdateUser */ public function testUpdateUserReturnsPublishedVersion(User $user) { - $this->assertEquals( + self::assertEquals( APIVersionInfo::STATUS_PUBLISHED, $user->getVersionInfo()->status ); @@ -1839,6 +1883,7 @@ public function testUpdateUserReturnsPublishedVersion(User $user) * Test for the updateUser() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::updateUser() + * * @depends testUpdateUser */ public function testUpdateUserWithContentMetadataUpdateStruct() @@ -1870,13 +1915,14 @@ public function testUpdateUserWithContentMetadataUpdateStruct() $remoteId = $userVersion2->contentInfo->remoteId; /* END: Use Case */ - $this->assertEquals('85e10037d1ac0a00aa75443ced483e08', $remoteId); + self::assertEquals('85e10037d1ac0a00aa75443ced483e08', $remoteId); } /** * Test for the updateUser() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::updateUser() + * * @depends testUpdateUser */ public function testUpdateUserWithContentUpdateStruct() @@ -1912,13 +1958,14 @@ public function testUpdateUserWithContentUpdateStruct() ); /* END: Use Case */ - $this->assertEquals('Hello World', $name); + self::assertEquals('Hello World', $name); } /** * Test for the updateUser() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::updateUser() + * * @depends testUpdateUser */ public function testUpdateUserWhenMissingField() @@ -1956,6 +2003,7 @@ public function testUpdateUserWhenMissingField() * Test for the updateUser() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::updateUser() + * * @depends testUpdateUser */ public function testUpdateUserThrowsInvalidArgumentExceptionOnFieldTypeNotAccept() @@ -2021,7 +2069,7 @@ public function testUpdateUserWithWeakPasswordThrowsUserPasswordValidationExcept return; } - $this->fail('Expected ValidationError messages did not occur.'); + self::fail('Expected ValidationError messages did not occur.'); } /** @@ -2043,7 +2091,7 @@ public function testUpdateUserWithStrongPassword() $user = $userService->updateUser($user, $userUpdate); /* END: Use Case */ - $this->assertInstanceOf(User::class, $user); + self::assertInstanceOf(User::class, $user); } /** @@ -2104,7 +2152,7 @@ public function testUpdateUserPasswordWorksWithUserPasswordRole(): void $userService->updateUserPassword($user, 'new password'); $user = $userService->loadUserByLogin('with_role_password'); - $this->assertNotEquals($previousHash, $user->passwordHash); + self::assertNotEquals($previousHash, $user->passwordHash); } /** @@ -2135,6 +2183,7 @@ public function testUpdateUserPasswordWithUnsupportedHashType(): void * Test for the loadUserGroupsOfUser() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUserGroupsOfUser + * * @depends testCreateUser */ public function testLoadUserGroupsOfUser() @@ -2149,18 +2198,19 @@ public function testLoadUserGroupsOfUser() // This array will contain the "Editors" user group name $userGroupNames = []; foreach ($userService->loadUserGroupsOfUser($user) as $userGroup) { - $this->assertInstanceOf(UserGroup::class, $userGroup); + self::assertInstanceOf(UserGroup::class, $userGroup); $userGroupNames[] = $userGroup->getFieldValue('name'); } /* END: Use Case */ - $this->assertEquals(['Editors'], $userGroupNames); + self::assertEquals(['Editors'], $userGroupNames); } /** * Test for the loadUsersOfUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUsersOfUserGroup + * * @depends testCreateUser */ public function testLoadUsersOfUserGroup() @@ -2178,17 +2228,18 @@ public function testLoadUsersOfUserGroup() // This array will contain the email of the newly created "Editor" user $email = []; foreach ($userService->loadUsersOfUserGroup($group) as $user) { - $this->assertInstanceOf(User::class, $user); + self::assertInstanceOf(User::class, $user); $email[] = $user->email; } /* END: Use Case */ - $this->assertEquals(['user@example.com'], $email); + self::assertEquals(['user@example.com'], $email); } /** * Test for the assignUserToUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::assignUserToUserGroup() + * * @depends testLoadUserGroupsOfUser */ public function testAssignUserToUserGroup() @@ -2218,7 +2269,7 @@ public function testAssignUserToUserGroup() sort($userGroupNames, SORT_STRING); - $this->assertEquals( + self::assertEquals( [ 'Administrator users', 'Editors', @@ -2231,6 +2282,7 @@ public function testAssignUserToUserGroup() * Test for the assignUserToUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::assignUserToUserGroup + * * @depends testAssignUserToUserGroup */ public function testAssignUserToUserGroupThrowsInvalidArgumentException() @@ -2293,6 +2345,7 @@ public function testAssignUserToGroupWithLocationsValidation(): void * Test for the unAssignUssrFromUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::unAssignUssrFromUserGroup() + * * @depends testLoadUserGroupsOfUser */ public function testUnAssignUserFromUserGroup() @@ -2328,13 +2381,14 @@ public function testUnAssignUserFromUserGroup() } /* END: Use Case */ - $this->assertEquals(['Anonymous users'], $userGroupNames); + self::assertEquals(['Anonymous users'], $userGroupNames); } /** * Test for the unAssignUserFromUserGroup() method. * * @covers \Ibexa\Contracts\Core\Repository\UserService::unAssignUserFromUserGroup() + * * @depends testUnAssignUserFromUserGroup */ public function testUnAssignUserFromUserGroupThrowsInvalidArgumentException() @@ -2363,6 +2417,7 @@ public function testUnAssignUserFromUserGroupThrowsInvalidArgumentException() * Test for the unAssignUserFromUserGroup() method removing user from the last group. * * @covers \Ibexa\Contracts\Core\Repository\UserService::unAssignUserFromUserGroup + * * @depends testUnAssignUserFromUserGroup */ public function testUnAssignUserFromUserGroupThrowsBadStateArgumentException() @@ -2432,6 +2487,7 @@ public function testUnAssignUserToGroupWithLocationValidation(): void * Test that multi-language logic for the loadUserGroup method respects prioritized language list. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUserGroup + * * @dataProvider getPrioritizedLanguageList * * @param string[] $prioritizedLanguages @@ -2465,6 +2521,7 @@ public function testLoadUserGroupWithPrioritizedLanguagesList( * Test that multi-language logic works correctly after updating user group main language. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUserGroup + * * @dataProvider getPrioritizedLanguageList * * @param string[] $prioritizedLanguages @@ -2505,6 +2562,7 @@ public function testLoadUserGroupWithPrioritizedLanguagesListAfterMainLanguageUp * Test that multi-language logic for the loadSubUserGroups method respects prioritized language list. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadSubUserGroups + * * @dataProvider getPrioritizedLanguageList * * @param string[] $prioritizedLanguages @@ -2546,6 +2604,7 @@ public function testLoadSubUserGroupsWithPrioritizedLanguagesList( * Test that multi-language logic for the loadUser method respects prioritized language list. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUser + * * @dataProvider getPrioritizedLanguageList * * @param string[] $prioritizedLanguages @@ -2583,6 +2642,7 @@ public function testLoadUserWithPrioritizedLanguagesList( * user content main language. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUserGroup + * * @dataProvider getPrioritizedLanguageList * * @param string[] $prioritizedLanguages @@ -2627,6 +2687,7 @@ public function testLoadUserWithPrioritizedLanguagesListAfterMainLanguageUpdate( * Test that multi-language logic for the loadUserByLogin method respects prioritized language list. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUserByLogin + * * @dataProvider getPrioritizedLanguageList * * @param string[] $prioritizedLanguages @@ -2664,6 +2725,7 @@ public function testLoadUserByLoginWithPrioritizedLanguagesList( * prioritized language list. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUsersByEmail + * * @dataProvider getPrioritizedLanguageList * * @param string[] $prioritizedLanguages @@ -2703,6 +2765,7 @@ public function testLoadUsersByEmailWithPrioritizedLanguagesList( * prioritized language list. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUserGroupsOfUser + * * @dataProvider getPrioritizedLanguageList * * @param string[] $prioritizedLanguages @@ -2735,6 +2798,7 @@ public function testLoadUserGroupsOfUserWithPrioritizedLanguagesList( * prioritized language list. * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUsersOfUserGroup + * * @dataProvider getPrioritizedLanguageList * * @param string[] $prioritizedLanguages @@ -2923,7 +2987,7 @@ public function testCreateUserWithDefaultPasswordHashTypeWhenHashTypeIsUnsupport } if (!$userFieldDef) { - $this->fail('User FieldType not found in userCreateStruct!'); + self::fail('User FieldType not found in userCreateStruct!'); } /** @var \Ibexa\Core\FieldType\User\Value $userValue */ @@ -3037,11 +3101,12 @@ public function testValidatePasswordWithDefaultContext() $errors = $userService->validatePassword('pass'); /* END: Use Case */ - $this->assertEmpty($errors); + self::assertEmpty($errors); } /** * @covers \Ibexa\Contracts\Core\Repository\UserService::validatePassword() + * * @dataProvider dataProviderForValidatePassword */ public function testValidatePassword(string $password, array $expectedErrors) @@ -3057,7 +3122,7 @@ public function testValidatePassword(string $password, array $expectedErrors) $actualErrors = $userService->validatePassword($password, $context); /* END: Use Case */ - $this->assertEquals($expectedErrors, $actualErrors); + self::assertEquals($expectedErrors, $actualErrors); } public function testValidatePasswordReturnsErrorWhenOldPasswordIsReused(): void @@ -3077,7 +3142,7 @@ public function testValidatePasswordReturnsErrorWhenOldPasswordIsReused(): void $actualErrors = $userService->validatePassword($password, $context); - $this->assertEquals( + self::assertEquals( [new ValidationError('New password cannot be the same as old password', null, [], 'password')], $actualErrors ); @@ -3207,7 +3272,7 @@ public function testGetPasswordInfo(): void new DateInterval(sprintf('P%dD', self::EXAMPLE_PASSWORD_TTL - self::EXAMPLE_PASSWORD_TTL_WARNING)) ); - $this->assertEquals(new PasswordInfo( + self::assertEquals(new PasswordInfo( $expectedPasswordExpirationDate, $expectedPasswordExpirationWarningDate ), $passwordInfo); @@ -3224,7 +3289,7 @@ public function testGetPasswordInfoIfExpirationIsDisabled(): void $passwordInfo = $userService->getPasswordInfo($user); /* END: Use Case */ - $this->assertEquals(new PasswordInfo(), $passwordInfo); + self::assertEquals(new PasswordInfo(), $passwordInfo); } public function testGetPasswordInfoIfExpirationWarningIsDisabled(): void @@ -3247,7 +3312,7 @@ public function testGetPasswordInfoIfExpirationWarningIsDisabled(): void new DateInterval(sprintf('P%dD', self::EXAMPLE_PASSWORD_TTL)) ); - $this->assertEquals(new PasswordInfo($expectedPasswordExpirationDate, null), $passwordInfo); + self::assertEquals(new PasswordInfo($expectedPasswordExpirationDate, null), $passwordInfo); } public function createTestUser(ContentType $contentType): User diff --git a/tests/integration/Core/Repository/Values/User/Limitation/BaseLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/BaseLimitationTest.php index 0dc2300afd..cefdd9cddb 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/BaseLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/BaseLimitationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Values\Content\Content; diff --git a/tests/integration/Core/Repository/Values/User/Limitation/ChangeOwnerLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/ChangeOwnerLimitationTest.php index 81f1ff6e97..1180f31a51 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/ChangeOwnerLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/ChangeOwnerLimitationTest.php @@ -21,6 +21,7 @@ /** * @covers \Ibexa\Contracts\Core\Repository\Values\User\Limitation\ChangeOwnerLimitation + * * @group integration * @group limitation */ diff --git a/tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php index e98cfc7e6c..8230b83db7 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -11,6 +12,7 @@ /** * @covers \Ibexa\Contracts\Core\Repository\Values\User\Limitation\ContentTypeLimitation + * * @group integration * @group limitation */ @@ -80,7 +82,7 @@ public function testContentTypeLimitationAllow() ); /* END: Use Case */ - $this->assertEquals( + self::assertEquals( 'Your wiki page', $updateContent->getFieldValue('title')->text ); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php index ccad8afbfc..22c4609ade 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php @@ -389,7 +389,7 @@ public function testPublishVersionTranslation(): void $permissionResolver->setCurrentUserReference($admin); $content = $contentService->loadContent($draft->contentInfo->id); - $this->assertEquals( + self::assertEquals( [ self::ENG_US => 'Published US', self::GER_DE => 'Draft 1 DE', diff --git a/tests/integration/Core/Repository/Values/User/Limitation/LocationLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/LocationLimitationTest.php index b7089c4248..f6fdbe96e7 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/LocationLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/LocationLimitationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -11,6 +12,7 @@ /** * @covers \Ibexa\Contracts\Core\Repository\Values\User\Limitation\LocationLimitation + * * @group integration * @group limitation */ @@ -48,7 +50,7 @@ public function testLocationLimitationAllow() $draft = $this->createWikiPageDraft(); /* END: Use Case */ - $this->assertEquals( + self::assertEquals( 'An awesome wiki page', $draft->getFieldValue('title')->text ); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/NewObjectStateLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/NewObjectStateLimitationTest.php index 32cb00d697..46df7d0a86 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/NewObjectStateLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/NewObjectStateLimitationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -11,6 +12,7 @@ /** * @covers \Ibexa\Contracts\Core\Repository\Values\User\Limitation\NewObjectStateLimitation + * * @group integration * @group limitation */ diff --git a/tests/integration/Core/Repository/Values/User/Limitation/NewSectionLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/NewSectionLimitationTest.php index e5f4d1e6a4..fce555f8a5 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/NewSectionLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/NewSectionLimitationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -11,6 +12,7 @@ /** * @covers \Ibexa\Contracts\Core\Repository\Values\User\Limitation\NewSectionLimitation + * * @group integration * @group limitation */ @@ -61,7 +63,7 @@ public function testNewSectionLimitationAllow() ); /* END: Use Case */ - $this->assertSame( + self::assertSame( $sectionId, $contentService->loadContentInfo($contentId)->getSectionId() ); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/ObjectStateLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/ObjectStateLimitationTest.php index 512cc06a47..ff4bcacbfb 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/ObjectStateLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/ObjectStateLimitationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; diff --git a/tests/integration/Core/Repository/Values/User/Limitation/OwnerLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/OwnerLimitationTest.php index 30a35ee928..b37e378818 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/OwnerLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/OwnerLimitationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; @@ -12,6 +13,7 @@ /** * @covers \Ibexa\Contracts\Core\Repository\Values\User\Limitation\OwnerLimitation + * * @group integration * @group limitation */ diff --git a/tests/integration/Core/Repository/Values/User/Limitation/ParentContentTypeLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/ParentContentTypeLimitationTest.php index 998cff0a1d..724edc6bbb 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/ParentContentTypeLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/ParentContentTypeLimitationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -12,6 +13,7 @@ /** * @covers \Ibexa\Contracts\Core\Repository\Values\User\Limitation\ParentContentTypeLimitation + * * @group integration * @group limitation */ @@ -59,7 +61,7 @@ public function testParentContentTypeLimitationAllow() $content = $contentService->publishVersion($draft->versionInfo); /* END: Use Case */ - $this->assertEquals( + self::assertEquals( 'An awesome wiki page', $content->getFieldValue('title')->text ); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/ParentDepthLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/ParentDepthLimitationTest.php index 46a83de63b..5a1a85ae28 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/ParentDepthLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/ParentDepthLimitationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -12,6 +13,7 @@ /** * @covers \Ibexa\Contracts\Core\Repository\Values\User\Limitation\ParentDepthLimitation + * * @group integration * @group limitation */ @@ -51,7 +53,7 @@ public function testParentDepthLimitationForbid() $draft = $this->createWikiPageDraft(); /* END: Use Case */ - $this->assertEquals( + self::assertEquals( 'An awesome wiki page', $draft->getFieldValue('title')->text ); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/ParentOwnerLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/ParentOwnerLimitationTest.php index 6ddc4b6c2d..a5752f61a7 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/ParentOwnerLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/ParentOwnerLimitationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -11,6 +12,7 @@ /** * @covers \Ibexa\Contracts\Core\Repository\Values\User\Limitation\ParentOwnerLimitation + * * @group integration * @group limitation */ @@ -53,7 +55,7 @@ public function testParentOwnerLimitationAllow() $draft = $this->createWikiPageDraft(); /* END: Use Case */ - $this->assertEquals( + self::assertEquals( 'An awesome wiki page', $draft->getFieldValue('title')->text ); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/ParentUserGroupLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/ParentUserGroupLimitationTest.php index 142e85dac9..fede641c40 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/ParentUserGroupLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/ParentUserGroupLimitationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -11,6 +12,7 @@ /** * @covers \Ibexa\Contracts\Core\Repository\Values\User\Limitation\ParentUserGroupLimitation + * * @group integration * @group limitation */ @@ -72,7 +74,7 @@ public function testParentUserGroupLimitationAllow() $draft = $this->createWikiPageDraft(); /* END: Use Case */ - $this->assertEquals( + self::assertEquals( 'An awesome wiki page', $draft->getFieldValue('title')->text ); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/RolePolicyLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/RolePolicyLimitationTest.php index 909bf0be17..c6c84e2022 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/RolePolicyLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/RolePolicyLimitationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Values\Content\LocationQuery; @@ -23,7 +24,7 @@ public function providerForTestRolePoliciesWithOverlappingLimitations() { // get actual locations count for the given subtree when user is (by default) an admin $actualSubtreeLocationsCount = $this->getSubtreeLocationsCount('/1/2/'); - $this->assertGreaterThan(0, $actualSubtreeLocationsCount); + self::assertGreaterThan(0, $actualSubtreeLocationsCount); return [ [$actualSubtreeLocationsCount, 'content', '*'], @@ -90,10 +91,10 @@ public function testRolePoliciesWithOverlappingLimitations( $this->refreshSearch($repository); // check if searching by subtree returns the same result as for an admin - $this->assertEquals($expectedSubtreeLocationsCount, $this->getSubtreeLocationsCount($subtreePathString)); + self::assertEquals($expectedSubtreeLocationsCount, $this->getSubtreeLocationsCount($subtreePathString)); // check if searching by subtree which is not a part of role assignment limitation does not return results - $this->assertEquals(0, $this->getSubtreeLocationsCount('/1/5/')); + self::assertEquals(0, $this->getSubtreeLocationsCount('/1/5/')); } /** diff --git a/tests/integration/Core/Repository/Values/User/Limitation/SectionLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/SectionLimitationTest.php index e3f6e48068..b8c9ab94c0 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/SectionLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/SectionLimitationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -11,6 +12,7 @@ /** * @covers \Ibexa\Contracts\Core\Repository\Values\User\Limitation\SectionLimitation + * * @group integration * @group limitation */ @@ -68,7 +70,7 @@ public function testSectionLimitationAllow() $images = $contentService->loadContentByRemoteId('e7ff633c6b8e0fd3531e74c6e712bead'); /* END: Use Case */ - $this->assertEquals( + self::assertEquals( 'Images', $images->getFieldValue('name')->text ); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/StatusLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/StatusLimitationTest.php index a2b5481b71..e947bc50d0 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/StatusLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/StatusLimitationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -12,6 +13,7 @@ /** * @covers \Ibexa\Contracts\Core\Repository\Values\User\Limitation\StatusLimitation + * * @group integration * @group limitation */ @@ -72,7 +74,7 @@ public function testStatusLimitationAllow() ); /* END: Use Case */ - $this->assertEquals( + self::assertEquals( 'An awesome wiki page', $loadedDraft->getFieldValue('title')->text ); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php index 0fd2fa41d4..6f78d4a62c 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -13,6 +14,7 @@ /** * @covers \Ibexa\Contracts\Core\Repository\Values\User\Limitation\SubtreeLimitation + * * @group integration * @group limitation */ @@ -50,7 +52,7 @@ public function testSubtreeLimitationAllow() $userService->updateUserGroup($userGroup, $groupUpdate); /* END: Use Case */ - $this->assertEquals( + self::assertEquals( 'Ibexa Editors', $userService->loadUserGroup($userGroupId) ->getFieldValue('name') diff --git a/tests/integration/Core/Repository/Values/User/Limitation/UserGroupLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/UserGroupLimitationTest.php index 8f7fe568b5..842b3d4a66 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/UserGroupLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/UserGroupLimitationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; @@ -13,6 +14,7 @@ /** * @covers \Ibexa\Contracts\Core\Repository\Values\User\Limitation\UserGroupLimitation + * * @group integration * @group limitation */ @@ -36,7 +38,7 @@ public function testUserGroupLimitationAllow() $draft = $this->prepareLimitationAndContent($user, $userGroup); /* END: Use Case */ - $this->assertEquals( + self::assertEquals( 'An awesome wiki page', $draft->getFieldValue('title')->text ); diff --git a/tests/integration/Core/User/UserStorage/UserStorageGatewayTest.php b/tests/integration/Core/User/UserStorage/UserStorageGatewayTest.php index 4725712a56..0236ac340d 100644 --- a/tests/integration/Core/User/UserStorage/UserStorageGatewayTest.php +++ b/tests/integration/Core/User/UserStorage/UserStorageGatewayTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Integration\Core\User\UserStorage; use Ibexa\Contracts\Core\Test\Persistence\Fixture\FixtureImporter; diff --git a/tests/lib/Base/Container/Compiler/FieldTypeRegistryPassTest.php b/tests/lib/Base/Container/Compiler/FieldTypeRegistryPassTest.php index 9eb8e855bc..fe7b747785 100644 --- a/tests/lib/Base/Container/Compiler/FieldTypeRegistryPassTest.php +++ b/tests/lib/Base/Container/Compiler/FieldTypeRegistryPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Base\Container\Compiler; use Ibexa\Core\Base\Container\Compiler\FieldTypeRegistryPass; diff --git a/tests/lib/Base/Container/Compiler/Search/FieldTypeRegistryPassTest.php b/tests/lib/Base/Container/Compiler/Search/FieldTypeRegistryPassTest.php index f3aa1f4720..a0f410457b 100644 --- a/tests/lib/Base/Container/Compiler/Search/FieldTypeRegistryPassTest.php +++ b/tests/lib/Base/Container/Compiler/Search/FieldTypeRegistryPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Base\Container\Compiler\Search; use Ibexa\Core\Base\Container\Compiler\Search\FieldRegistryPass; diff --git a/tests/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPassTest.php b/tests/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPassTest.php index e0baf23b1c..2681e2efaa 100644 --- a/tests/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPassTest.php +++ b/tests/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Base\Container\Compiler\Search\Legacy; use Ibexa\Core\Base\Container\Compiler\Search\Legacy\CriteriaConverterPass; diff --git a/tests/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPassTest.php b/tests/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPassTest.php index e7a62c26bd..e9151158c9 100644 --- a/tests/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPassTest.php +++ b/tests/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Base\Container\Compiler\Search\Legacy; use Ibexa\Core\Base\Container\Compiler\Search\Legacy\CriterionFieldValueHandlerRegistryPass; diff --git a/tests/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPassTest.php b/tests/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPassTest.php index d4f5ca5e27..3e4f5e3c51 100644 --- a/tests/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPassTest.php +++ b/tests/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Base\Container\Compiler\Search\Legacy; use Ibexa\Core\Base\Container\Compiler\Search\Legacy\SortClauseConverterPass; diff --git a/tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php b/tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php index 8e22e13311..2a69585ed3 100644 --- a/tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php +++ b/tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Base\Container\Compiler\Storage; use Ibexa\Core\Base\Container\Compiler\Storage\ExternalStorageRegistryPass; diff --git a/tests/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPassTest.php b/tests/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPassTest.php index 5fb61ebc96..30e890a5d0 100644 --- a/tests/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPassTest.php +++ b/tests/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Base\Container\Compiler\Storage\Legacy; use Ibexa\Core\Base\Container\Compiler\Storage\Legacy\FieldValueConverterRegistryPass; diff --git a/tests/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPassTest.php b/tests/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPassTest.php index 95f9e1db5c..8d5ec2d4a6 100644 --- a/tests/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPassTest.php +++ b/tests/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Base\Container\Compiler\Storage\Legacy; use Ibexa\Core\Base\Container\Compiler\Storage\Legacy\RoleLimitationConverterPass; diff --git a/tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php b/tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php index f25b98a7a5..e20ddf153f 100644 --- a/tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php +++ b/tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Base\Container\Compiler\Stubs; use Ibexa\Contracts\Core\Persistence\Content\Field; diff --git a/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIteratorTest.php b/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIteratorTest.php index 936d947ce7..effbe631c2 100644 --- a/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIteratorTest.php +++ b/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIteratorTest.php @@ -67,7 +67,7 @@ public function testGetIterator(): void self::EXAMPLE_DEPRECATED_SERVICE_TAG ); - $this->assertEquals([ + self::assertEquals([ 'app.service.foo' => [ ['alias' => 'foo'], ], @@ -95,7 +95,7 @@ private function assertDeprecationError(string $expectedMessage): void } } - $this->fail(sprintf( + self::fail(sprintf( 'Failed asserting that deprecation warning with message "%s" has been triggered', $expectedMessage )); diff --git a/tests/lib/Event/AbstractServiceTest.php b/tests/lib/Event/AbstractServiceTest.php index 8dd461c73c..28781248ea 100644 --- a/tests/lib/Event/AbstractServiceTest.php +++ b/tests/lib/Event/AbstractServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Event; use Ibexa\Contracts\Core\Repository\Event\AfterEvent; diff --git a/tests/lib/Event/BookmarkServiceTest.php b/tests/lib/Event/BookmarkServiceTest.php index e052c50b13..c87848a866 100644 --- a/tests/lib/Event/BookmarkServiceTest.php +++ b/tests/lib/Event/BookmarkServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Event; use Ibexa\Contracts\Core\Repository\BookmarkService as BookmarkServiceInterface; @@ -34,11 +35,11 @@ public function testCreateBookmarkEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeCreateBookmarkEvent::class, 0], [CreateBookmarkEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCreateBookmarkStopPropagationInBeforeEvents() @@ -64,10 +65,10 @@ public function testCreateBookmarkStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeCreateBookmarkEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCreateBookmarkEvent::class, 0], [CreateBookmarkEvent::class, 0], ]); @@ -91,11 +92,11 @@ public function testDeleteBookmarkEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteBookmarkEvent::class, 0], [DeleteBookmarkEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testDeleteBookmarkStopPropagationInBeforeEvents() @@ -121,10 +122,10 @@ public function testDeleteBookmarkStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteBookmarkEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeDeleteBookmarkEvent::class, 0], [DeleteBookmarkEvent::class, 0], ]); diff --git a/tests/lib/Event/ContentServiceTest.php b/tests/lib/Event/ContentServiceTest.php index 3a5761249b..c58032f77f 100644 --- a/tests/lib/Event/ContentServiceTest.php +++ b/tests/lib/Event/ContentServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Event; use Ibexa\Contracts\Core\Repository\ContentService as ContentServiceInterface; @@ -66,12 +67,12 @@ public function testDeleteContentEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($locations, $result); - $this->assertSame($calledListeners, [ + self::assertSame($locations, $result); + self::assertSame($calledListeners, [ [BeforeDeleteContentEvent::class, 0], [DeleteContentEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnDeleteContentResultInBeforeEvents() @@ -99,13 +100,13 @@ public function testReturnDeleteContentResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventLocations, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventLocations, $result); + self::assertSame($calledListeners, [ [BeforeDeleteContentEvent::class, 10], [BeforeDeleteContentEvent::class, 0], [DeleteContentEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testDeleteContentStopPropagationInBeforeEvents() @@ -135,11 +136,11 @@ public function testDeleteContentStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventLocations, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventLocations, $result); + self::assertSame($calledListeners, [ [BeforeDeleteContentEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeDeleteContentEvent::class, 0], [DeleteContentEvent::class, 0], ]); @@ -167,12 +168,12 @@ public function testCopyContentEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($content, $result); - $this->assertSame($calledListeners, [ + self::assertSame($content, $result); + self::assertSame($calledListeners, [ [BeforeCopyContentEvent::class, 0], [CopyContentEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCopyContentResultInBeforeEvents() @@ -202,13 +203,13 @@ public function testReturnCopyContentResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventContent, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventContent, $result); + self::assertSame($calledListeners, [ [BeforeCopyContentEvent::class, 10], [BeforeCopyContentEvent::class, 0], [CopyContentEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCopyContentStopPropagationInBeforeEvents() @@ -240,11 +241,11 @@ public function testCopyContentStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventContent, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventContent, $result); + self::assertSame($calledListeners, [ [BeforeCopyContentEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCopyContentEvent::class, 0], [CopyContentEvent::class, 0], ]); @@ -271,12 +272,12 @@ public function testUpdateContentEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($content, $result); - $this->assertSame($calledListeners, [ + self::assertSame($content, $result); + self::assertSame($calledListeners, [ [BeforeUpdateContentEvent::class, 0], [UpdateContentEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnUpdateContentResultInBeforeEvents() @@ -305,13 +306,13 @@ public function testReturnUpdateContentResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventContent, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventContent, $result); + self::assertSame($calledListeners, [ [BeforeUpdateContentEvent::class, 10], [BeforeUpdateContentEvent::class, 0], [UpdateContentEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testUpdateContentStopPropagationInBeforeEvents() @@ -342,11 +343,11 @@ public function testUpdateContentStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventContent, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventContent, $result); + self::assertSame($calledListeners, [ [BeforeUpdateContentEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeUpdateContentEvent::class, 0], [UpdateContentEvent::class, 0], ]); @@ -371,11 +372,11 @@ public function testDeleteRelationEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteRelationEvent::class, 0], [DeleteRelationEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testDeleteRelationStopPropagationInBeforeEvents() @@ -402,10 +403,10 @@ public function testDeleteRelationStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteRelationEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeDeleteRelationEvent::class, 0], [DeleteRelationEvent::class, 0], ]); @@ -432,12 +433,12 @@ public function testCreateContentEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($content, $result); - $this->assertSame($calledListeners, [ + self::assertSame($content, $result); + self::assertSame($calledListeners, [ [BeforeCreateContentEvent::class, 0], [CreateContentEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCreateContentResultInBeforeEvents() @@ -466,13 +467,13 @@ public function testReturnCreateContentResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventContent, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventContent, $result); + self::assertSame($calledListeners, [ [BeforeCreateContentEvent::class, 10], [BeforeCreateContentEvent::class, 0], [CreateContentEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCreateContentStopPropagationInBeforeEvents() @@ -503,11 +504,11 @@ public function testCreateContentStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventContent, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventContent, $result); + self::assertSame($calledListeners, [ [BeforeCreateContentEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCreateContentEvent::class, 0], [CreateContentEvent::class, 0], ]); @@ -531,11 +532,11 @@ public function testHideContentEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeHideContentEvent::class, 0], [HideContentEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testHideContentStopPropagationInBeforeEvents() @@ -561,10 +562,10 @@ public function testHideContentStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeHideContentEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeHideContentEvent::class, 0], [HideContentEvent::class, 0], ]); @@ -588,11 +589,11 @@ public function testDeleteVersionEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteVersionEvent::class, 0], [DeleteVersionEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testDeleteVersionStopPropagationInBeforeEvents() @@ -618,10 +619,10 @@ public function testDeleteVersionStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteVersionEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeDeleteVersionEvent::class, 0], [DeleteVersionEvent::class, 0], ]); @@ -648,12 +649,12 @@ public function testAddRelationEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($relation, $result); - $this->assertSame($calledListeners, [ + self::assertSame($relation, $result); + self::assertSame($calledListeners, [ [BeforeAddRelationEvent::class, 0], [AddRelationEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnAddRelationResultInBeforeEvents() @@ -682,13 +683,13 @@ public function testReturnAddRelationResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventRelation, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventRelation, $result); + self::assertSame($calledListeners, [ [BeforeAddRelationEvent::class, 10], [BeforeAddRelationEvent::class, 0], [AddRelationEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testAddRelationStopPropagationInBeforeEvents() @@ -719,11 +720,11 @@ public function testAddRelationStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventRelation, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventRelation, $result); + self::assertSame($calledListeners, [ [BeforeAddRelationEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [AddRelationEvent::class, 0], [BeforeAddRelationEvent::class, 0], ]); @@ -750,12 +751,12 @@ public function testUpdateContentMetadataEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($content, $result); - $this->assertSame($calledListeners, [ + self::assertSame($content, $result); + self::assertSame($calledListeners, [ [BeforeUpdateContentMetadataEvent::class, 0], [UpdateContentMetadataEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnUpdateContentMetadataResultInBeforeEvents() @@ -784,13 +785,13 @@ public function testReturnUpdateContentMetadataResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventContent, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventContent, $result); + self::assertSame($calledListeners, [ [BeforeUpdateContentMetadataEvent::class, 10], [BeforeUpdateContentMetadataEvent::class, 0], [UpdateContentMetadataEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testUpdateContentMetadataStopPropagationInBeforeEvents() @@ -821,11 +822,11 @@ public function testUpdateContentMetadataStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventContent, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventContent, $result); + self::assertSame($calledListeners, [ [BeforeUpdateContentMetadataEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeUpdateContentMetadataEvent::class, 0], [UpdateContentMetadataEvent::class, 0], ]); @@ -850,11 +851,11 @@ public function testDeleteTranslationEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteTranslationEvent::class, 0], [DeleteTranslationEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testDeleteTranslationStopPropagationInBeforeEvents() @@ -881,10 +882,10 @@ public function testDeleteTranslationStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteTranslationEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeDeleteTranslationEvent::class, 0], [DeleteTranslationEvent::class, 0], ]); @@ -911,12 +912,12 @@ public function testPublishVersionEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($content, $result); - $this->assertSame($calledListeners, [ + self::assertSame($content, $result); + self::assertSame($calledListeners, [ [BeforePublishVersionEvent::class, 0], [PublishVersionEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnPublishVersionResultInBeforeEvents() @@ -945,13 +946,13 @@ public function testReturnPublishVersionResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventContent, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventContent, $result); + self::assertSame($calledListeners, [ [BeforePublishVersionEvent::class, 10], [BeforePublishVersionEvent::class, 0], [PublishVersionEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testPublishVersionStopPropagationInBeforeEvents() @@ -982,11 +983,11 @@ public function testPublishVersionStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventContent, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventContent, $result); + self::assertSame($calledListeners, [ [BeforePublishVersionEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforePublishVersionEvent::class, 0], [PublishVersionEvent::class, 0], ]); @@ -1014,12 +1015,12 @@ public function testCreateContentDraftEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($contentDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($contentDraft, $result); + self::assertSame($calledListeners, [ [BeforeCreateContentDraftEvent::class, 0], [CreateContentDraftEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCreateContentDraftResultInBeforeEvents() @@ -1049,13 +1050,13 @@ public function testReturnCreateContentDraftResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventContentDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventContentDraft, $result); + self::assertSame($calledListeners, [ [BeforeCreateContentDraftEvent::class, 10], [BeforeCreateContentDraftEvent::class, 0], [CreateContentDraftEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCreateContentDraftStopPropagationInBeforeEvents() @@ -1087,11 +1088,11 @@ public function testCreateContentDraftStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventContentDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventContentDraft, $result); + self::assertSame($calledListeners, [ [BeforeCreateContentDraftEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCreateContentDraftEvent::class, 0], [CreateContentDraftEvent::class, 0], ]); @@ -1115,11 +1116,11 @@ public function testRevealContentEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeRevealContentEvent::class, 0], [RevealContentEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testRevealContentStopPropagationInBeforeEvents() @@ -1145,10 +1146,10 @@ public function testRevealContentStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeRevealContentEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeRevealContentEvent::class, 0], [RevealContentEvent::class, 0], ]); diff --git a/tests/lib/Event/ContentTypeServiceTest.php b/tests/lib/Event/ContentTypeServiceTest.php index baac131341..0679fcdba0 100644 --- a/tests/lib/Event/ContentTypeServiceTest.php +++ b/tests/lib/Event/ContentTypeServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Event; use Ibexa\Contracts\Core\Repository\ContentTypeService as ContentTypeServiceInterface; @@ -71,11 +72,11 @@ public function testAddFieldDefinitionEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeAddFieldDefinitionEvent::class, 0], [AddFieldDefinitionEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testAddFieldDefinitionStopPropagationInBeforeEvents() @@ -102,10 +103,10 @@ public function testAddFieldDefinitionStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeAddFieldDefinitionEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [AddFieldDefinitionEvent::class, 0], [BeforeAddFieldDefinitionEvent::class, 0], ]); @@ -129,11 +130,11 @@ public function testDeleteContentTypeGroupEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteContentTypeGroupEvent::class, 0], [DeleteContentTypeGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testDeleteContentTypeGroupStopPropagationInBeforeEvents() @@ -159,10 +160,10 @@ public function testDeleteContentTypeGroupStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteContentTypeGroupEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeDeleteContentTypeGroupEvent::class, 0], [DeleteContentTypeGroupEvent::class, 0], ]); @@ -188,12 +189,12 @@ public function testCreateContentTypeDraftEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($contentTypeDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($contentTypeDraft, $result); + self::assertSame($calledListeners, [ [BeforeCreateContentTypeDraftEvent::class, 0], [CreateContentTypeDraftEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCreateContentTypeDraftResultInBeforeEvents() @@ -221,13 +222,13 @@ public function testReturnCreateContentTypeDraftResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventContentTypeDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventContentTypeDraft, $result); + self::assertSame($calledListeners, [ [BeforeCreateContentTypeDraftEvent::class, 10], [BeforeCreateContentTypeDraftEvent::class, 0], [CreateContentTypeDraftEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCreateContentTypeDraftStopPropagationInBeforeEvents() @@ -257,11 +258,11 @@ public function testCreateContentTypeDraftStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventContentTypeDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventContentTypeDraft, $result); + self::assertSame($calledListeners, [ [BeforeCreateContentTypeDraftEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCreateContentTypeDraftEvent::class, 0], [CreateContentTypeDraftEvent::class, 0], ]); @@ -287,12 +288,12 @@ public function testCreateContentTypeGroupEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($contentTypeGroup, $result); - $this->assertSame($calledListeners, [ + self::assertSame($contentTypeGroup, $result); + self::assertSame($calledListeners, [ [BeforeCreateContentTypeGroupEvent::class, 0], [CreateContentTypeGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCreateContentTypeGroupResultInBeforeEvents() @@ -320,13 +321,13 @@ public function testReturnCreateContentTypeGroupResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventContentTypeGroup, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventContentTypeGroup, $result); + self::assertSame($calledListeners, [ [BeforeCreateContentTypeGroupEvent::class, 10], [BeforeCreateContentTypeGroupEvent::class, 0], [CreateContentTypeGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCreateContentTypeGroupStopPropagationInBeforeEvents() @@ -356,11 +357,11 @@ public function testCreateContentTypeGroupStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventContentTypeGroup, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventContentTypeGroup, $result); + self::assertSame($calledListeners, [ [BeforeCreateContentTypeGroupEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCreateContentTypeGroupEvent::class, 0], [CreateContentTypeGroupEvent::class, 0], ]); @@ -385,11 +386,11 @@ public function testUpdateContentTypeGroupEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeUpdateContentTypeGroupEvent::class, 0], [UpdateContentTypeGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testUpdateContentTypeGroupStopPropagationInBeforeEvents() @@ -416,10 +417,10 @@ public function testUpdateContentTypeGroupStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeUpdateContentTypeGroupEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeUpdateContentTypeGroupEvent::class, 0], [UpdateContentTypeGroupEvent::class, 0], ]); @@ -446,12 +447,12 @@ public function testCreateContentTypeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($contentTypeDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($contentTypeDraft, $result); + self::assertSame($calledListeners, [ [BeforeCreateContentTypeEvent::class, 0], [CreateContentTypeEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCreateContentTypeResultInBeforeEvents() @@ -480,13 +481,13 @@ public function testReturnCreateContentTypeResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventContentTypeDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventContentTypeDraft, $result); + self::assertSame($calledListeners, [ [BeforeCreateContentTypeEvent::class, 10], [BeforeCreateContentTypeEvent::class, 0], [CreateContentTypeEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCreateContentTypeStopPropagationInBeforeEvents() @@ -517,11 +518,11 @@ public function testCreateContentTypeStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventContentTypeDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventContentTypeDraft, $result); + self::assertSame($calledListeners, [ [BeforeCreateContentTypeEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCreateContentTypeEvent::class, 0], [CreateContentTypeEvent::class, 0], ]); @@ -548,12 +549,12 @@ public function testRemoveContentTypeTranslationEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($newContentTypeDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($newContentTypeDraft, $result); + self::assertSame($calledListeners, [ [BeforeRemoveContentTypeTranslationEvent::class, 0], [RemoveContentTypeTranslationEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnRemoveContentTypeTranslationResultInBeforeEvents() @@ -582,13 +583,13 @@ public function testReturnRemoveContentTypeTranslationResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventNewContentTypeDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventNewContentTypeDraft, $result); + self::assertSame($calledListeners, [ [BeforeRemoveContentTypeTranslationEvent::class, 10], [BeforeRemoveContentTypeTranslationEvent::class, 0], [RemoveContentTypeTranslationEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testRemoveContentTypeTranslationStopPropagationInBeforeEvents() @@ -619,11 +620,11 @@ public function testRemoveContentTypeTranslationStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventNewContentTypeDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventNewContentTypeDraft, $result); + self::assertSame($calledListeners, [ [BeforeRemoveContentTypeTranslationEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeRemoveContentTypeTranslationEvent::class, 0], [RemoveContentTypeTranslationEvent::class, 0], ]); @@ -648,11 +649,11 @@ public function testUnassignContentTypeGroupEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeUnassignContentTypeGroupEvent::class, 0], [UnassignContentTypeGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testUnassignContentTypeGroupStopPropagationInBeforeEvents() @@ -679,10 +680,10 @@ public function testUnassignContentTypeGroupStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeUnassignContentTypeGroupEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeUnassignContentTypeGroupEvent::class, 0], [UnassignContentTypeGroupEvent::class, 0], ]); @@ -706,11 +707,11 @@ public function testPublishContentTypeDraftEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforePublishContentTypeDraftEvent::class, 0], [PublishContentTypeDraftEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testPublishContentTypeDraftStopPropagationInBeforeEvents() @@ -736,10 +737,10 @@ public function testPublishContentTypeDraftStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforePublishContentTypeDraftEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforePublishContentTypeDraftEvent::class, 0], [PublishContentTypeDraftEvent::class, 0], ]); @@ -765,11 +766,11 @@ public function testUpdateFieldDefinitionEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeUpdateFieldDefinitionEvent::class, 0], [UpdateFieldDefinitionEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testUpdateFieldDefinitionStopPropagationInBeforeEvents() @@ -797,10 +798,10 @@ public function testUpdateFieldDefinitionStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeUpdateFieldDefinitionEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeUpdateFieldDefinitionEvent::class, 0], [UpdateFieldDefinitionEvent::class, 0], ]); @@ -825,11 +826,11 @@ public function testRemoveFieldDefinitionEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeRemoveFieldDefinitionEvent::class, 0], [RemoveFieldDefinitionEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testRemoveFieldDefinitionStopPropagationInBeforeEvents() @@ -856,10 +857,10 @@ public function testRemoveFieldDefinitionStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeRemoveFieldDefinitionEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeRemoveFieldDefinitionEvent::class, 0], [RemoveFieldDefinitionEvent::class, 0], ]); @@ -884,11 +885,11 @@ public function testAssignContentTypeGroupEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeAssignContentTypeGroupEvent::class, 0], [AssignContentTypeGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testAssignContentTypeGroupStopPropagationInBeforeEvents() @@ -915,10 +916,10 @@ public function testAssignContentTypeGroupStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeAssignContentTypeGroupEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [AssignContentTypeGroupEvent::class, 0], [BeforeAssignContentTypeGroupEvent::class, 0], ]); @@ -943,11 +944,11 @@ public function testUpdateContentTypeDraftEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeUpdateContentTypeDraftEvent::class, 0], [UpdateContentTypeDraftEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testUpdateContentTypeDraftStopPropagationInBeforeEvents() @@ -974,10 +975,10 @@ public function testUpdateContentTypeDraftStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeUpdateContentTypeDraftEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeUpdateContentTypeDraftEvent::class, 0], [UpdateContentTypeDraftEvent::class, 0], ]); @@ -1001,11 +1002,11 @@ public function testDeleteContentTypeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteContentTypeEvent::class, 0], [DeleteContentTypeEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testDeleteContentTypeStopPropagationInBeforeEvents() @@ -1031,10 +1032,10 @@ public function testDeleteContentTypeStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteContentTypeEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeDeleteContentTypeEvent::class, 0], [DeleteContentTypeEvent::class, 0], ]); @@ -1061,12 +1062,12 @@ public function testCopyContentTypeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($contentTypeCopy, $result); - $this->assertSame($calledListeners, [ + self::assertSame($contentTypeCopy, $result); + self::assertSame($calledListeners, [ [BeforeCopyContentTypeEvent::class, 0], [CopyContentTypeEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCopyContentTypeResultInBeforeEvents() @@ -1095,13 +1096,13 @@ public function testReturnCopyContentTypeResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventContentTypeCopy, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventContentTypeCopy, $result); + self::assertSame($calledListeners, [ [BeforeCopyContentTypeEvent::class, 10], [BeforeCopyContentTypeEvent::class, 0], [CopyContentTypeEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCopyContentTypeStopPropagationInBeforeEvents() @@ -1132,11 +1133,11 @@ public function testCopyContentTypeStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventContentTypeCopy, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventContentTypeCopy, $result); + self::assertSame($calledListeners, [ [BeforeCopyContentTypeEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCopyContentTypeEvent::class, 0], [CopyContentTypeEvent::class, 0], ]); diff --git a/tests/lib/Event/LanguageServiceTest.php b/tests/lib/Event/LanguageServiceTest.php index 0995fca95a..ae40b2ca40 100644 --- a/tests/lib/Event/LanguageServiceTest.php +++ b/tests/lib/Event/LanguageServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Event; use Ibexa\Contracts\Core\Repository\Events\Language\BeforeCreateLanguageEvent; @@ -41,11 +42,11 @@ public function testDeleteLanguageEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteLanguageEvent::class, 0], [DeleteLanguageEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testDeleteLanguageStopPropagationInBeforeEvents() @@ -71,10 +72,10 @@ public function testDeleteLanguageStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteLanguageEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeDeleteLanguageEvent::class, 0], [DeleteLanguageEvent::class, 0], ]); @@ -100,12 +101,12 @@ public function testCreateLanguageEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($language, $result); - $this->assertSame($calledListeners, [ + self::assertSame($language, $result); + self::assertSame($calledListeners, [ [BeforeCreateLanguageEvent::class, 0], [CreateLanguageEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCreateLanguageResultInBeforeEvents() @@ -133,13 +134,13 @@ public function testReturnCreateLanguageResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventLanguage, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventLanguage, $result); + self::assertSame($calledListeners, [ [BeforeCreateLanguageEvent::class, 10], [BeforeCreateLanguageEvent::class, 0], [CreateLanguageEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCreateLanguageStopPropagationInBeforeEvents() @@ -169,11 +170,11 @@ public function testCreateLanguageStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventLanguage, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventLanguage, $result); + self::assertSame($calledListeners, [ [BeforeCreateLanguageEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCreateLanguageEvent::class, 0], [CreateLanguageEvent::class, 0], ]); @@ -200,12 +201,12 @@ public function testUpdateLanguageNameEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($updatedLanguage, $result); - $this->assertSame($calledListeners, [ + self::assertSame($updatedLanguage, $result); + self::assertSame($calledListeners, [ [BeforeUpdateLanguageNameEvent::class, 0], [UpdateLanguageNameEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnUpdateLanguageNameResultInBeforeEvents() @@ -234,13 +235,13 @@ public function testReturnUpdateLanguageNameResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventUpdatedLanguage, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedLanguage, $result); + self::assertSame($calledListeners, [ [BeforeUpdateLanguageNameEvent::class, 10], [BeforeUpdateLanguageNameEvent::class, 0], [UpdateLanguageNameEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testUpdateLanguageNameStopPropagationInBeforeEvents() @@ -271,11 +272,11 @@ public function testUpdateLanguageNameStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventUpdatedLanguage, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedLanguage, $result); + self::assertSame($calledListeners, [ [BeforeUpdateLanguageNameEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeUpdateLanguageNameEvent::class, 0], [UpdateLanguageNameEvent::class, 0], ]); @@ -301,12 +302,12 @@ public function testDisableLanguageEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($disabledLanguage, $result); - $this->assertSame($calledListeners, [ + self::assertSame($disabledLanguage, $result); + self::assertSame($calledListeners, [ [BeforeDisableLanguageEvent::class, 0], [DisableLanguageEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnDisableLanguageResultInBeforeEvents() @@ -334,13 +335,13 @@ public function testReturnDisableLanguageResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventDisabledLanguage, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventDisabledLanguage, $result); + self::assertSame($calledListeners, [ [BeforeDisableLanguageEvent::class, 10], [BeforeDisableLanguageEvent::class, 0], [DisableLanguageEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testDisableLanguageStopPropagationInBeforeEvents() @@ -370,11 +371,11 @@ public function testDisableLanguageStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventDisabledLanguage, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventDisabledLanguage, $result); + self::assertSame($calledListeners, [ [BeforeDisableLanguageEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeDisableLanguageEvent::class, 0], [DisableLanguageEvent::class, 0], ]); @@ -400,12 +401,12 @@ public function testEnableLanguageEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($enabledLanguage, $result); - $this->assertSame($calledListeners, [ + self::assertSame($enabledLanguage, $result); + self::assertSame($calledListeners, [ [BeforeEnableLanguageEvent::class, 0], [EnableLanguageEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnEnableLanguageResultInBeforeEvents() @@ -433,13 +434,13 @@ public function testReturnEnableLanguageResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventEnabledLanguage, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventEnabledLanguage, $result); + self::assertSame($calledListeners, [ [BeforeEnableLanguageEvent::class, 10], [BeforeEnableLanguageEvent::class, 0], [EnableLanguageEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testEnableLanguageStopPropagationInBeforeEvents() @@ -469,11 +470,11 @@ public function testEnableLanguageStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventEnabledLanguage, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventEnabledLanguage, $result); + self::assertSame($calledListeners, [ [BeforeEnableLanguageEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeEnableLanguageEvent::class, 0], [EnableLanguageEvent::class, 0], ]); diff --git a/tests/lib/Event/LocationServiceTest.php b/tests/lib/Event/LocationServiceTest.php index 277fbe6b19..81bb2f752b 100644 --- a/tests/lib/Event/LocationServiceTest.php +++ b/tests/lib/Event/LocationServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Event; use Ibexa\Contracts\Core\Repository\Events\Location\BeforeCopySubtreeEvent; @@ -52,12 +53,12 @@ public function testCopySubtreeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($location, $result); - $this->assertSame($calledListeners, [ + self::assertSame($location, $result); + self::assertSame($calledListeners, [ [BeforeCopySubtreeEvent::class, 0], [CopySubtreeEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCopySubtreeResultInBeforeEvents() @@ -86,13 +87,13 @@ public function testReturnCopySubtreeResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventLocation, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventLocation, $result); + self::assertSame($calledListeners, [ [BeforeCopySubtreeEvent::class, 10], [BeforeCopySubtreeEvent::class, 0], [CopySubtreeEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCopySubtreeStopPropagationInBeforeEvents() @@ -123,11 +124,11 @@ public function testCopySubtreeStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventLocation, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventLocation, $result); + self::assertSame($calledListeners, [ [BeforeCopySubtreeEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCopySubtreeEvent::class, 0], [CopySubtreeEvent::class, 0], ]); @@ -151,11 +152,11 @@ public function testDeleteLocationEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteLocationEvent::class, 0], [DeleteLocationEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testDeleteLocationStopPropagationInBeforeEvents() @@ -181,10 +182,10 @@ public function testDeleteLocationStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteLocationEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeDeleteLocationEvent::class, 0], [DeleteLocationEvent::class, 0], ]); @@ -210,12 +211,12 @@ public function testUnhideLocationEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($revealedLocation, $result); - $this->assertSame($calledListeners, [ + self::assertSame($revealedLocation, $result); + self::assertSame($calledListeners, [ [BeforeUnhideLocationEvent::class, 0], [UnhideLocationEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnUnhideLocationResultInBeforeEvents() @@ -243,13 +244,13 @@ public function testReturnUnhideLocationResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventRevealedLocation, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventRevealedLocation, $result); + self::assertSame($calledListeners, [ [BeforeUnhideLocationEvent::class, 10], [BeforeUnhideLocationEvent::class, 0], [UnhideLocationEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testUnhideLocationStopPropagationInBeforeEvents() @@ -279,11 +280,11 @@ public function testUnhideLocationStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventRevealedLocation, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventRevealedLocation, $result); + self::assertSame($calledListeners, [ [BeforeUnhideLocationEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeUnhideLocationEvent::class, 0], [UnhideLocationEvent::class, 0], ]); @@ -309,12 +310,12 @@ public function testHideLocationEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($hiddenLocation, $result); - $this->assertSame($calledListeners, [ + self::assertSame($hiddenLocation, $result); + self::assertSame($calledListeners, [ [BeforeHideLocationEvent::class, 0], [HideLocationEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnHideLocationResultInBeforeEvents() @@ -342,13 +343,13 @@ public function testReturnHideLocationResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventHiddenLocation, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventHiddenLocation, $result); + self::assertSame($calledListeners, [ [BeforeHideLocationEvent::class, 10], [BeforeHideLocationEvent::class, 0], [HideLocationEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testHideLocationStopPropagationInBeforeEvents() @@ -378,11 +379,11 @@ public function testHideLocationStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventHiddenLocation, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventHiddenLocation, $result); + self::assertSame($calledListeners, [ [BeforeHideLocationEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeHideLocationEvent::class, 0], [HideLocationEvent::class, 0], ]); @@ -407,11 +408,11 @@ public function testSwapLocationEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeSwapLocationEvent::class, 0], [SwapLocationEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testSwapLocationStopPropagationInBeforeEvents() @@ -438,10 +439,10 @@ public function testSwapLocationStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeSwapLocationEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeSwapLocationEvent::class, 0], [SwapLocationEvent::class, 0], ]); @@ -466,11 +467,11 @@ public function testMoveSubtreeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeMoveSubtreeEvent::class, 0], [MoveSubtreeEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testMoveSubtreeStopPropagationInBeforeEvents() @@ -497,10 +498,10 @@ public function testMoveSubtreeStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeMoveSubtreeEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeMoveSubtreeEvent::class, 0], [MoveSubtreeEvent::class, 0], ]); @@ -527,12 +528,12 @@ public function testUpdateLocationEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($updatedLocation, $result); - $this->assertSame($calledListeners, [ + self::assertSame($updatedLocation, $result); + self::assertSame($calledListeners, [ [BeforeUpdateLocationEvent::class, 0], [UpdateLocationEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnUpdateLocationResultInBeforeEvents() @@ -561,13 +562,13 @@ public function testReturnUpdateLocationResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventUpdatedLocation, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedLocation, $result); + self::assertSame($calledListeners, [ [BeforeUpdateLocationEvent::class, 10], [BeforeUpdateLocationEvent::class, 0], [UpdateLocationEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testUpdateLocationStopPropagationInBeforeEvents() @@ -598,11 +599,11 @@ public function testUpdateLocationStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventUpdatedLocation, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedLocation, $result); + self::assertSame($calledListeners, [ [BeforeUpdateLocationEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeUpdateLocationEvent::class, 0], [UpdateLocationEvent::class, 0], ]); @@ -629,12 +630,12 @@ public function testCreateLocationEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($location, $result); - $this->assertSame($calledListeners, [ + self::assertSame($location, $result); + self::assertSame($calledListeners, [ [BeforeCreateLocationEvent::class, 0], [CreateLocationEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCreateLocationResultInBeforeEvents() @@ -663,13 +664,13 @@ public function testReturnCreateLocationResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventLocation, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventLocation, $result); + self::assertSame($calledListeners, [ [BeforeCreateLocationEvent::class, 10], [BeforeCreateLocationEvent::class, 0], [CreateLocationEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCreateLocationStopPropagationInBeforeEvents() @@ -700,11 +701,11 @@ public function testCreateLocationStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventLocation, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventLocation, $result); + self::assertSame($calledListeners, [ [BeforeCreateLocationEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCreateLocationEvent::class, 0], [CreateLocationEvent::class, 0], ]); diff --git a/tests/lib/Event/NotificationServiceTest.php b/tests/lib/Event/NotificationServiceTest.php index eb032d16a6..4d136553eb 100644 --- a/tests/lib/Event/NotificationServiceTest.php +++ b/tests/lib/Event/NotificationServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Event; use Ibexa\Contracts\Core\Repository\Events\Notification\BeforeCreateNotificationEvent; @@ -39,12 +40,12 @@ public function testCreateNotificationEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($notification, $result); - $this->assertSame($calledListeners, [ + self::assertSame($notification, $result); + self::assertSame($calledListeners, [ [BeforeCreateNotificationEvent::class, 0], [CreateNotificationEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCreateNotificationResultInBeforeEvents() @@ -72,13 +73,13 @@ public function testReturnCreateNotificationResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventNotification, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventNotification, $result); + self::assertSame($calledListeners, [ [BeforeCreateNotificationEvent::class, 10], [BeforeCreateNotificationEvent::class, 0], [CreateNotificationEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCreateNotificationStopPropagationInBeforeEvents() @@ -108,11 +109,11 @@ public function testCreateNotificationStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventNotification, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventNotification, $result); + self::assertSame($calledListeners, [ [BeforeCreateNotificationEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCreateNotificationEvent::class, 0], [CreateNotificationEvent::class, 0], ]); @@ -136,11 +137,11 @@ public function testDeleteNotificationEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteNotificationEvent::class, 0], [DeleteNotificationEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testDeleteNotificationStopPropagationInBeforeEvents() @@ -166,10 +167,10 @@ public function testDeleteNotificationStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteNotificationEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeDeleteNotificationEvent::class, 0], [DeleteNotificationEvent::class, 0], ]); @@ -193,11 +194,11 @@ public function testMarkNotificationAsReadEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeMarkNotificationAsReadEvent::class, 0], [MarkNotificationAsReadEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testMarkNotificationAsReadStopPropagationInBeforeEvents() @@ -223,10 +224,10 @@ public function testMarkNotificationAsReadStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeMarkNotificationAsReadEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeMarkNotificationAsReadEvent::class, 0], [MarkNotificationAsReadEvent::class, 0], ]); diff --git a/tests/lib/Event/ObjectStateServiceTest.php b/tests/lib/Event/ObjectStateServiceTest.php index 3efb09df1d..4f9a3b0d03 100644 --- a/tests/lib/Event/ObjectStateServiceTest.php +++ b/tests/lib/Event/ObjectStateServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Event; use Ibexa\Contracts\Core\Repository\Events\ObjectState\BeforeCreateObjectStateEvent; @@ -54,11 +55,11 @@ public function testSetContentStateEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeSetContentStateEvent::class, 0], [SetContentStateEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testSetContentStateStopPropagationInBeforeEvents() @@ -86,10 +87,10 @@ public function testSetContentStateStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeSetContentStateEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeSetContentStateEvent::class, 0], [SetContentStateEvent::class, 0], ]); @@ -115,12 +116,12 @@ public function testCreateObjectStateGroupEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($objectStateGroup, $result); - $this->assertSame($calledListeners, [ + self::assertSame($objectStateGroup, $result); + self::assertSame($calledListeners, [ [BeforeCreateObjectStateGroupEvent::class, 0], [CreateObjectStateGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCreateObjectStateGroupResultInBeforeEvents() @@ -148,13 +149,13 @@ public function testReturnCreateObjectStateGroupResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventObjectStateGroup, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventObjectStateGroup, $result); + self::assertSame($calledListeners, [ [BeforeCreateObjectStateGroupEvent::class, 10], [BeforeCreateObjectStateGroupEvent::class, 0], [CreateObjectStateGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCreateObjectStateGroupStopPropagationInBeforeEvents() @@ -184,11 +185,11 @@ public function testCreateObjectStateGroupStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventObjectStateGroup, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventObjectStateGroup, $result); + self::assertSame($calledListeners, [ [BeforeCreateObjectStateGroupEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCreateObjectStateGroupEvent::class, 0], [CreateObjectStateGroupEvent::class, 0], ]); @@ -215,12 +216,12 @@ public function testUpdateObjectStateEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($updatedObjectState, $result); - $this->assertSame($calledListeners, [ + self::assertSame($updatedObjectState, $result); + self::assertSame($calledListeners, [ [BeforeUpdateObjectStateEvent::class, 0], [UpdateObjectStateEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnUpdateObjectStateResultInBeforeEvents() @@ -249,13 +250,13 @@ public function testReturnUpdateObjectStateResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventUpdatedObjectState, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedObjectState, $result); + self::assertSame($calledListeners, [ [BeforeUpdateObjectStateEvent::class, 10], [BeforeUpdateObjectStateEvent::class, 0], [UpdateObjectStateEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testUpdateObjectStateStopPropagationInBeforeEvents() @@ -286,11 +287,11 @@ public function testUpdateObjectStateStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventUpdatedObjectState, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedObjectState, $result); + self::assertSame($calledListeners, [ [BeforeUpdateObjectStateEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeUpdateObjectStateEvent::class, 0], [UpdateObjectStateEvent::class, 0], ]); @@ -317,12 +318,12 @@ public function testCreateObjectStateEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($objectState, $result); - $this->assertSame($calledListeners, [ + self::assertSame($objectState, $result); + self::assertSame($calledListeners, [ [BeforeCreateObjectStateEvent::class, 0], [CreateObjectStateEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCreateObjectStateResultInBeforeEvents() @@ -351,13 +352,13 @@ public function testReturnCreateObjectStateResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventObjectState, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventObjectState, $result); + self::assertSame($calledListeners, [ [BeforeCreateObjectStateEvent::class, 10], [BeforeCreateObjectStateEvent::class, 0], [CreateObjectStateEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCreateObjectStateStopPropagationInBeforeEvents() @@ -388,11 +389,11 @@ public function testCreateObjectStateStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventObjectState, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventObjectState, $result); + self::assertSame($calledListeners, [ [BeforeCreateObjectStateEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCreateObjectStateEvent::class, 0], [CreateObjectStateEvent::class, 0], ]); @@ -419,12 +420,12 @@ public function testUpdateObjectStateGroupEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($updatedObjectStateGroup, $result); - $this->assertSame($calledListeners, [ + self::assertSame($updatedObjectStateGroup, $result); + self::assertSame($calledListeners, [ [BeforeUpdateObjectStateGroupEvent::class, 0], [UpdateObjectStateGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnUpdateObjectStateGroupResultInBeforeEvents() @@ -453,13 +454,13 @@ public function testReturnUpdateObjectStateGroupResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventUpdatedObjectStateGroup, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedObjectStateGroup, $result); + self::assertSame($calledListeners, [ [BeforeUpdateObjectStateGroupEvent::class, 10], [BeforeUpdateObjectStateGroupEvent::class, 0], [UpdateObjectStateGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testUpdateObjectStateGroupStopPropagationInBeforeEvents() @@ -490,11 +491,11 @@ public function testUpdateObjectStateGroupStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventUpdatedObjectStateGroup, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedObjectStateGroup, $result); + self::assertSame($calledListeners, [ [BeforeUpdateObjectStateGroupEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeUpdateObjectStateGroupEvent::class, 0], [UpdateObjectStateGroupEvent::class, 0], ]); @@ -519,11 +520,11 @@ public function testSetPriorityOfObjectStateEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeSetPriorityOfObjectStateEvent::class, 0], [SetPriorityOfObjectStateEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testSetPriorityOfObjectStateStopPropagationInBeforeEvents() @@ -550,10 +551,10 @@ public function testSetPriorityOfObjectStateStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeSetPriorityOfObjectStateEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeSetPriorityOfObjectStateEvent::class, 0], [SetPriorityOfObjectStateEvent::class, 0], ]); @@ -577,11 +578,11 @@ public function testDeleteObjectStateGroupEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteObjectStateGroupEvent::class, 0], [DeleteObjectStateGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testDeleteObjectStateGroupStopPropagationInBeforeEvents() @@ -607,10 +608,10 @@ public function testDeleteObjectStateGroupStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteObjectStateGroupEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeDeleteObjectStateGroupEvent::class, 0], [DeleteObjectStateGroupEvent::class, 0], ]); @@ -634,11 +635,11 @@ public function testDeleteObjectStateEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteObjectStateEvent::class, 0], [DeleteObjectStateEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testDeleteObjectStateStopPropagationInBeforeEvents() @@ -664,10 +665,10 @@ public function testDeleteObjectStateStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteObjectStateEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeDeleteObjectStateEvent::class, 0], [DeleteObjectStateEvent::class, 0], ]); diff --git a/tests/lib/Event/RoleServiceTest.php b/tests/lib/Event/RoleServiceTest.php index a4a33e1439..d2c5f88ad0 100644 --- a/tests/lib/Event/RoleServiceTest.php +++ b/tests/lib/Event/RoleServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Event; use Ibexa\Contracts\Core\Repository\Events\Role\AddPolicyByRoleDraftEvent; @@ -64,11 +65,11 @@ public function testPublishRoleDraftEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforePublishRoleDraftEvent::class, 0], [PublishRoleDraftEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testPublishRoleDraftStopPropagationInBeforeEvents() @@ -94,10 +95,10 @@ public function testPublishRoleDraftStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforePublishRoleDraftEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforePublishRoleDraftEvent::class, 0], [PublishRoleDraftEvent::class, 0], ]); @@ -123,11 +124,11 @@ public function testAssignRoleToUserEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeAssignRoleToUserEvent::class, 0], [AssignRoleToUserEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testAssignRoleToUserStopPropagationInBeforeEvents() @@ -155,10 +156,10 @@ public function testAssignRoleToUserStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeAssignRoleToUserEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [AssignRoleToUserEvent::class, 0], [BeforeAssignRoleToUserEvent::class, 0], ]); @@ -185,12 +186,12 @@ public function testUpdateRoleDraftEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($updatedRoleDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($updatedRoleDraft, $result); + self::assertSame($calledListeners, [ [BeforeUpdateRoleDraftEvent::class, 0], [UpdateRoleDraftEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnUpdateRoleDraftResultInBeforeEvents() @@ -219,13 +220,13 @@ public function testReturnUpdateRoleDraftResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventUpdatedRoleDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedRoleDraft, $result); + self::assertSame($calledListeners, [ [BeforeUpdateRoleDraftEvent::class, 10], [BeforeUpdateRoleDraftEvent::class, 0], [UpdateRoleDraftEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testUpdateRoleDraftStopPropagationInBeforeEvents() @@ -256,11 +257,11 @@ public function testUpdateRoleDraftStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventUpdatedRoleDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedRoleDraft, $result); + self::assertSame($calledListeners, [ [BeforeUpdateRoleDraftEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeUpdateRoleDraftEvent::class, 0], [UpdateRoleDraftEvent::class, 0], ]); @@ -286,11 +287,11 @@ public function testAssignRoleToUserGroupEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeAssignRoleToUserGroupEvent::class, 0], [AssignRoleToUserGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testAssignRoleToUserGroupStopPropagationInBeforeEvents() @@ -318,10 +319,10 @@ public function testAssignRoleToUserGroupStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeAssignRoleToUserGroupEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [AssignRoleToUserGroupEvent::class, 0], [BeforeAssignRoleToUserGroupEvent::class, 0], ]); @@ -349,12 +350,12 @@ public function testUpdatePolicyByRoleDraftEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($updatedPolicyDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($updatedPolicyDraft, $result); + self::assertSame($calledListeners, [ [BeforeUpdatePolicyByRoleDraftEvent::class, 0], [UpdatePolicyByRoleDraftEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnUpdatePolicyByRoleDraftResultInBeforeEvents() @@ -384,13 +385,13 @@ public function testReturnUpdatePolicyByRoleDraftResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventUpdatedPolicyDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedPolicyDraft, $result); + self::assertSame($calledListeners, [ [BeforeUpdatePolicyByRoleDraftEvent::class, 10], [BeforeUpdatePolicyByRoleDraftEvent::class, 0], [UpdatePolicyByRoleDraftEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testUpdatePolicyByRoleDraftStopPropagationInBeforeEvents() @@ -422,11 +423,11 @@ public function testUpdatePolicyByRoleDraftStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventUpdatedPolicyDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedPolicyDraft, $result); + self::assertSame($calledListeners, [ [BeforeUpdatePolicyByRoleDraftEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeUpdatePolicyByRoleDraftEvent::class, 0], [UpdatePolicyByRoleDraftEvent::class, 0], ]); @@ -452,12 +453,12 @@ public function testCreateRoleEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($roleDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($roleDraft, $result); + self::assertSame($calledListeners, [ [BeforeCreateRoleEvent::class, 0], [CreateRoleEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCreateRoleResultInBeforeEvents() @@ -485,13 +486,13 @@ public function testReturnCreateRoleResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventRoleDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventRoleDraft, $result); + self::assertSame($calledListeners, [ [BeforeCreateRoleEvent::class, 10], [BeforeCreateRoleEvent::class, 0], [CreateRoleEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCreateRoleStopPropagationInBeforeEvents() @@ -521,11 +522,11 @@ public function testCreateRoleStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventRoleDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventRoleDraft, $result); + self::assertSame($calledListeners, [ [BeforeCreateRoleEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCreateRoleEvent::class, 0], [CreateRoleEvent::class, 0], ]); @@ -552,12 +553,12 @@ public function testRemovePolicyByRoleDraftEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($updatedRoleDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($updatedRoleDraft, $result); + self::assertSame($calledListeners, [ [BeforeRemovePolicyByRoleDraftEvent::class, 0], [RemovePolicyByRoleDraftEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnRemovePolicyByRoleDraftResultInBeforeEvents() @@ -586,13 +587,13 @@ public function testReturnRemovePolicyByRoleDraftResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventUpdatedRoleDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedRoleDraft, $result); + self::assertSame($calledListeners, [ [BeforeRemovePolicyByRoleDraftEvent::class, 10], [BeforeRemovePolicyByRoleDraftEvent::class, 0], [RemovePolicyByRoleDraftEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testRemovePolicyByRoleDraftStopPropagationInBeforeEvents() @@ -623,11 +624,11 @@ public function testRemovePolicyByRoleDraftStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventUpdatedRoleDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedRoleDraft, $result); + self::assertSame($calledListeners, [ [BeforeRemovePolicyByRoleDraftEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeRemovePolicyByRoleDraftEvent::class, 0], [RemovePolicyByRoleDraftEvent::class, 0], ]); @@ -654,12 +655,12 @@ public function testAddPolicyByRoleDraftEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($updatedRoleDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($updatedRoleDraft, $result); + self::assertSame($calledListeners, [ [BeforeAddPolicyByRoleDraftEvent::class, 0], [AddPolicyByRoleDraftEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnAddPolicyByRoleDraftResultInBeforeEvents() @@ -688,13 +689,13 @@ public function testReturnAddPolicyByRoleDraftResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventUpdatedRoleDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedRoleDraft, $result); + self::assertSame($calledListeners, [ [BeforeAddPolicyByRoleDraftEvent::class, 10], [BeforeAddPolicyByRoleDraftEvent::class, 0], [AddPolicyByRoleDraftEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testAddPolicyByRoleDraftStopPropagationInBeforeEvents() @@ -725,11 +726,11 @@ public function testAddPolicyByRoleDraftStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventUpdatedRoleDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedRoleDraft, $result); + self::assertSame($calledListeners, [ [BeforeAddPolicyByRoleDraftEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [AddPolicyByRoleDraftEvent::class, 0], [BeforeAddPolicyByRoleDraftEvent::class, 0], ]); @@ -753,11 +754,11 @@ public function testDeleteRoleEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteRoleEvent::class, 0], [DeleteRoleEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testDeleteRoleStopPropagationInBeforeEvents() @@ -783,10 +784,10 @@ public function testDeleteRoleStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteRoleEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeDeleteRoleEvent::class, 0], [DeleteRoleEvent::class, 0], ]); @@ -810,11 +811,11 @@ public function testDeleteRoleDraftEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteRoleDraftEvent::class, 0], [DeleteRoleDraftEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testDeleteRoleDraftStopPropagationInBeforeEvents() @@ -840,10 +841,10 @@ public function testDeleteRoleDraftStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteRoleDraftEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeDeleteRoleDraftEvent::class, 0], [DeleteRoleDraftEvent::class, 0], ]); @@ -867,11 +868,11 @@ public function testRemoveRoleAssignmentEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeRemoveRoleAssignmentEvent::class, 0], [RemoveRoleAssignmentEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testRemoveRoleAssignmentStopPropagationInBeforeEvents() @@ -897,10 +898,10 @@ public function testRemoveRoleAssignmentStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeRemoveRoleAssignmentEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeRemoveRoleAssignmentEvent::class, 0], [RemoveRoleAssignmentEvent::class, 0], ]); @@ -926,12 +927,12 @@ public function testCreateRoleDraftEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($roleDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($roleDraft, $result); + self::assertSame($calledListeners, [ [BeforeCreateRoleDraftEvent::class, 0], [CreateRoleDraftEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCreateRoleDraftResultInBeforeEvents() @@ -959,13 +960,13 @@ public function testReturnCreateRoleDraftResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventRoleDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventRoleDraft, $result); + self::assertSame($calledListeners, [ [BeforeCreateRoleDraftEvent::class, 10], [BeforeCreateRoleDraftEvent::class, 0], [CreateRoleDraftEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCreateRoleDraftStopPropagationInBeforeEvents() @@ -995,11 +996,11 @@ public function testCreateRoleDraftStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventRoleDraft, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventRoleDraft, $result); + self::assertSame($calledListeners, [ [BeforeCreateRoleDraftEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCreateRoleDraftEvent::class, 0], [CreateRoleDraftEvent::class, 0], ]); diff --git a/tests/lib/Event/SectionServiceTest.php b/tests/lib/Event/SectionServiceTest.php index e988fe6c00..56c0f02622 100644 --- a/tests/lib/Event/SectionServiceTest.php +++ b/tests/lib/Event/SectionServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Event; use Ibexa\Contracts\Core\Repository\Events\Section\AssignSectionEvent; @@ -45,11 +46,11 @@ public function testAssignSectionEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeAssignSectionEvent::class, 0], [AssignSectionEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testAssignSectionStopPropagationInBeforeEvents() @@ -76,10 +77,10 @@ public function testAssignSectionStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeAssignSectionEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [AssignSectionEvent::class, 0], [BeforeAssignSectionEvent::class, 0], ]); @@ -106,12 +107,12 @@ public function testUpdateSectionEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($updatedSection, $result); - $this->assertSame($calledListeners, [ + self::assertSame($updatedSection, $result); + self::assertSame($calledListeners, [ [BeforeUpdateSectionEvent::class, 0], [UpdateSectionEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnUpdateSectionResultInBeforeEvents() @@ -140,13 +141,13 @@ public function testReturnUpdateSectionResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventUpdatedSection, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedSection, $result); + self::assertSame($calledListeners, [ [BeforeUpdateSectionEvent::class, 10], [BeforeUpdateSectionEvent::class, 0], [UpdateSectionEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testUpdateSectionStopPropagationInBeforeEvents() @@ -177,11 +178,11 @@ public function testUpdateSectionStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventUpdatedSection, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedSection, $result); + self::assertSame($calledListeners, [ [BeforeUpdateSectionEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeUpdateSectionEvent::class, 0], [UpdateSectionEvent::class, 0], ]); @@ -206,11 +207,11 @@ public function testAssignSectionToSubtreeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeAssignSectionToSubtreeEvent::class, 0], [AssignSectionToSubtreeEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testAssignSectionToSubtreeStopPropagationInBeforeEvents() @@ -237,10 +238,10 @@ public function testAssignSectionToSubtreeStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeAssignSectionToSubtreeEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [AssignSectionToSubtreeEvent::class, 0], [BeforeAssignSectionToSubtreeEvent::class, 0], ]); @@ -264,11 +265,11 @@ public function testDeleteSectionEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteSectionEvent::class, 0], [DeleteSectionEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testDeleteSectionStopPropagationInBeforeEvents() @@ -294,10 +295,10 @@ public function testDeleteSectionStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeDeleteSectionEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeDeleteSectionEvent::class, 0], [DeleteSectionEvent::class, 0], ]); @@ -323,12 +324,12 @@ public function testCreateSectionEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($section, $result); - $this->assertSame($calledListeners, [ + self::assertSame($section, $result); + self::assertSame($calledListeners, [ [BeforeCreateSectionEvent::class, 0], [CreateSectionEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCreateSectionResultInBeforeEvents() @@ -356,13 +357,13 @@ public function testReturnCreateSectionResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventSection, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventSection, $result); + self::assertSame($calledListeners, [ [BeforeCreateSectionEvent::class, 10], [BeforeCreateSectionEvent::class, 0], [CreateSectionEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCreateSectionStopPropagationInBeforeEvents() @@ -392,11 +393,11 @@ public function testCreateSectionStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventSection, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventSection, $result); + self::assertSame($calledListeners, [ [BeforeCreateSectionEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCreateSectionEvent::class, 0], [CreateSectionEvent::class, 0], ]); diff --git a/tests/lib/Event/SettingServiceTest.php b/tests/lib/Event/SettingServiceTest.php index 6e0779a0a6..709117966f 100644 --- a/tests/lib/Event/SettingServiceTest.php +++ b/tests/lib/Event/SettingServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Event; use Ibexa\Contracts\Core\Repository\Events\Setting\BeforeCreateSettingEvent; diff --git a/tests/lib/Event/TrashServiceTest.php b/tests/lib/Event/TrashServiceTest.php index 34fddd915a..3329daef28 100644 --- a/tests/lib/Event/TrashServiceTest.php +++ b/tests/lib/Event/TrashServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Event; use Ibexa\Contracts\Core\Repository\Events\Trash\BeforeDeleteTrashItemEvent; @@ -42,12 +43,12 @@ public function testEmptyTrashEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($resultList, $result); - $this->assertSame($calledListeners, [ + self::assertSame($resultList, $result); + self::assertSame($calledListeners, [ [BeforeEmptyTrashEvent::class, 0], [EmptyTrashEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnEmptyTrashResultInBeforeEvents() @@ -74,13 +75,13 @@ public function testReturnEmptyTrashResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventResultList, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventResultList, $result); + self::assertSame($calledListeners, [ [BeforeEmptyTrashEvent::class, 10], [BeforeEmptyTrashEvent::class, 0], [EmptyTrashEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testEmptyTrashStopPropagationInBeforeEvents() @@ -109,11 +110,11 @@ public function testEmptyTrashStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventResultList, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventResultList, $result); + self::assertSame($calledListeners, [ [BeforeEmptyTrashEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeEmptyTrashEvent::class, 0], [EmptyTrashEvent::class, 0], ]); @@ -139,12 +140,12 @@ public function testTrashEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($trashItem, $result); - $this->assertSame($calledListeners, [ + self::assertSame($trashItem, $result); + self::assertSame($calledListeners, [ [BeforeTrashEvent::class, 0], [TrashEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnTrashResultInBeforeEvents() @@ -172,13 +173,13 @@ public function testReturnTrashResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventTrashItem, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventTrashItem, $result); + self::assertSame($calledListeners, [ [BeforeTrashEvent::class, 10], [BeforeTrashEvent::class, 0], [TrashEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testTrashStopPropagationInBeforeEvents() @@ -208,11 +209,11 @@ public function testTrashStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventTrashItem, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventTrashItem, $result); + self::assertSame($calledListeners, [ [BeforeTrashEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeTrashEvent::class, 0], [TrashEvent::class, 0], ]); @@ -274,12 +275,12 @@ public function testRecoverEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($location, $result); - $this->assertSame($calledListeners, [ + self::assertSame($location, $result); + self::assertSame($calledListeners, [ [BeforeRecoverEvent::class, 0], [RecoverEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnRecoverResultInBeforeEvents() @@ -308,13 +309,13 @@ public function testReturnRecoverResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventLocation, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventLocation, $result); + self::assertSame($calledListeners, [ [BeforeRecoverEvent::class, 10], [BeforeRecoverEvent::class, 0], [RecoverEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testRecoverStopPropagationInBeforeEvents() @@ -345,11 +346,11 @@ public function testRecoverStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventLocation, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventLocation, $result); + self::assertSame($calledListeners, [ [BeforeRecoverEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeRecoverEvent::class, 0], [RecoverEvent::class, 0], ]); @@ -375,12 +376,12 @@ public function testDeleteTrashItemEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($result, $result); - $this->assertSame($calledListeners, [ + self::assertSame($result, $result); + self::assertSame($calledListeners, [ [BeforeDeleteTrashItemEvent::class, 0], [DeleteTrashItemEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnDeleteTrashItemResultInBeforeEvents() @@ -408,13 +409,13 @@ public function testReturnDeleteTrashItemResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventResult, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventResult, $result); + self::assertSame($calledListeners, [ [BeforeDeleteTrashItemEvent::class, 10], [BeforeDeleteTrashItemEvent::class, 0], [DeleteTrashItemEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testDeleteTrashItemStopPropagationInBeforeEvents() @@ -444,11 +445,11 @@ public function testDeleteTrashItemStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventResult, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventResult, $result); + self::assertSame($calledListeners, [ [BeforeDeleteTrashItemEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeDeleteTrashItemEvent::class, 0], [DeleteTrashItemEvent::class, 0], ]); diff --git a/tests/lib/Event/URLAliasServiceTest.php b/tests/lib/Event/URLAliasServiceTest.php index 65f450bf65..ce85f42a9c 100644 --- a/tests/lib/Event/URLAliasServiceTest.php +++ b/tests/lib/Event/URLAliasServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Event; use Ibexa\Contracts\Core\Repository\Events\URLAlias\BeforeCreateGlobalUrlAliasEvent; @@ -45,12 +46,12 @@ public function testCreateGlobalUrlAliasEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($urlAlias, $result); - $this->assertSame($calledListeners, [ + self::assertSame($urlAlias, $result); + self::assertSame($calledListeners, [ [BeforeCreateGlobalUrlAliasEvent::class, 0], [CreateGlobalUrlAliasEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCreateGlobalUrlAliasResultInBeforeEvents() @@ -82,13 +83,13 @@ public function testReturnCreateGlobalUrlAliasResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventUrlAlias, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUrlAlias, $result); + self::assertSame($calledListeners, [ [BeforeCreateGlobalUrlAliasEvent::class, 10], [BeforeCreateGlobalUrlAliasEvent::class, 0], [CreateGlobalUrlAliasEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCreateGlobalUrlAliasStopPropagationInBeforeEvents() @@ -122,11 +123,11 @@ public function testCreateGlobalUrlAliasStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventUrlAlias, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUrlAlias, $result); + self::assertSame($calledListeners, [ [BeforeCreateGlobalUrlAliasEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCreateGlobalUrlAliasEvent::class, 0], [CreateGlobalUrlAliasEvent::class, 0], ]); @@ -150,11 +151,11 @@ public function testRefreshSystemUrlAliasesForLocationEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeRefreshSystemUrlAliasesForLocationEvent::class, 0], [RefreshSystemUrlAliasesForLocationEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testRefreshSystemUrlAliasesForLocationStopPropagationInBeforeEvents() @@ -180,10 +181,10 @@ public function testRefreshSystemUrlAliasesForLocationStopPropagationInBeforeEve $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeRefreshSystemUrlAliasesForLocationEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeRefreshSystemUrlAliasesForLocationEvent::class, 0], [RefreshSystemUrlAliasesForLocationEvent::class, 0], ]); @@ -213,12 +214,12 @@ public function testCreateUrlAliasEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($urlAlias, $result); - $this->assertSame($calledListeners, [ + self::assertSame($urlAlias, $result); + self::assertSame($calledListeners, [ [BeforeCreateUrlAliasEvent::class, 0], [CreateUrlAliasEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCreateUrlAliasResultInBeforeEvents() @@ -250,13 +251,13 @@ public function testReturnCreateUrlAliasResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventUrlAlias, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUrlAlias, $result); + self::assertSame($calledListeners, [ [BeforeCreateUrlAliasEvent::class, 10], [BeforeCreateUrlAliasEvent::class, 0], [CreateUrlAliasEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCreateUrlAliasStopPropagationInBeforeEvents() @@ -290,11 +291,11 @@ public function testCreateUrlAliasStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventUrlAlias, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUrlAlias, $result); + self::assertSame($calledListeners, [ [BeforeCreateUrlAliasEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCreateUrlAliasEvent::class, 0], [CreateUrlAliasEvent::class, 0], ]); @@ -318,11 +319,11 @@ public function testRemoveAliasesEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeRemoveAliasesEvent::class, 0], [RemoveAliasesEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testRemoveAliasesStopPropagationInBeforeEvents() @@ -348,10 +349,10 @@ public function testRemoveAliasesStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeRemoveAliasesEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeRemoveAliasesEvent::class, 0], [RemoveAliasesEvent::class, 0], ]); diff --git a/tests/lib/Event/URLServiceTest.php b/tests/lib/Event/URLServiceTest.php index de76868972..9ffba6ac2b 100644 --- a/tests/lib/Event/URLServiceTest.php +++ b/tests/lib/Event/URLServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Event; use Ibexa\Contracts\Core\Repository\Events\URL\BeforeUpdateUrlEvent; @@ -36,12 +37,12 @@ public function testUpdateUrlEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($updatedUrl, $result); - $this->assertSame($calledListeners, [ + self::assertSame($updatedUrl, $result); + self::assertSame($calledListeners, [ [BeforeUpdateUrlEvent::class, 0], [UpdateUrlEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnUpdateUrlResultInBeforeEvents() @@ -70,13 +71,13 @@ public function testReturnUpdateUrlResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventUpdatedUrl, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedUrl, $result); + self::assertSame($calledListeners, [ [BeforeUpdateUrlEvent::class, 10], [BeforeUpdateUrlEvent::class, 0], [UpdateUrlEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testUpdateUrlStopPropagationInBeforeEvents() @@ -107,11 +108,11 @@ public function testUpdateUrlStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventUpdatedUrl, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedUrl, $result); + self::assertSame($calledListeners, [ [BeforeUpdateUrlEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeUpdateUrlEvent::class, 0], [UpdateUrlEvent::class, 0], ]); diff --git a/tests/lib/Event/URLWildcardServiceTest.php b/tests/lib/Event/URLWildcardServiceTest.php index 56d5e1c3ad..be0cb55405 100644 --- a/tests/lib/Event/URLWildcardServiceTest.php +++ b/tests/lib/Event/URLWildcardServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Event; use Ibexa\Contracts\Core\Repository\Events\URLWildcard\BeforeCreateEvent; @@ -43,11 +44,11 @@ public function testRemoveEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeRemoveEvent::class, 0], [RemoveEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } /** @@ -76,10 +77,10 @@ public function testRemoveStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeRemoveEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeRemoveEvent::class, 0], [RemoveEvent::class, 0], ]); @@ -110,12 +111,12 @@ public function testUpdateEvents(): void $traceableEventDispatcher->getCalledListeners() ); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeUpdateEvent::class, 0], [UpdateEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testUpdateStopPropagationInBeforeEvents(): void @@ -148,11 +149,11 @@ static function (BeforeUpdateEvent $event) { $traceableEventDispatcher->getNotCalledListeners() ); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeUpdateEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeUpdateEvent::class, 0], [UpdateEvent::class, 0], ]); @@ -180,12 +181,12 @@ public function testCreateEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($urlWildcard, $result); - $this->assertSame($calledListeners, [ + self::assertSame($urlWildcard, $result); + self::assertSame($calledListeners, [ [BeforeCreateEvent::class, 0], [CreateEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCreateResultInBeforeEvents() @@ -215,13 +216,13 @@ public function testReturnCreateResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventUrlWildcard, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUrlWildcard, $result); + self::assertSame($calledListeners, [ [BeforeCreateEvent::class, 10], [BeforeCreateEvent::class, 0], [CreateEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCreateStopPropagationInBeforeEvents() @@ -253,11 +254,11 @@ public function testCreateStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventUrlWildcard, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUrlWildcard, $result); + self::assertSame($calledListeners, [ [BeforeCreateEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCreateEvent::class, 0], [CreateEvent::class, 0], ]); @@ -283,12 +284,12 @@ public function testTranslateEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($result, $result); - $this->assertSame($calledListeners, [ + self::assertSame($result, $result); + self::assertSame($calledListeners, [ [BeforeTranslateEvent::class, 0], [TranslateEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnTranslateResultInBeforeEvents() @@ -316,13 +317,13 @@ public function testReturnTranslateResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventResult, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventResult, $result); + self::assertSame($calledListeners, [ [BeforeTranslateEvent::class, 10], [BeforeTranslateEvent::class, 0], [TranslateEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testTranslateStopPropagationInBeforeEvents() @@ -352,11 +353,11 @@ public function testTranslateStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventResult, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventResult, $result); + self::assertSame($calledListeners, [ [BeforeTranslateEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeTranslateEvent::class, 0], [TranslateEvent::class, 0], ]); diff --git a/tests/lib/Event/UserPreferenceServiceTest.php b/tests/lib/Event/UserPreferenceServiceTest.php index a40317bb0b..f91c97bbb8 100644 --- a/tests/lib/Event/UserPreferenceServiceTest.php +++ b/tests/lib/Event/UserPreferenceServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Event; use Ibexa\Contracts\Core\Repository\Events\UserPreference\BeforeSetUserPreferenceEvent; @@ -31,11 +32,11 @@ public function testSetUserPreferenceEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeSetUserPreferenceEvent::class, 0], [SetUserPreferenceEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testSetUserPreferenceStopPropagationInBeforeEvents() @@ -61,10 +62,10 @@ public function testSetUserPreferenceStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeSetUserPreferenceEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeSetUserPreferenceEvent::class, 0], [SetUserPreferenceEvent::class, 0], ]); diff --git a/tests/lib/Event/UserServiceTest.php b/tests/lib/Event/UserServiceTest.php index 1f80d6537f..84fb778489 100644 --- a/tests/lib/Event/UserServiceTest.php +++ b/tests/lib/Event/UserServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Event; use Ibexa\Contracts\Core\Repository\Events\User\AssignUserToUserGroupEvent; @@ -59,12 +60,12 @@ public function testUpdateUserGroupEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($updatedUserGroup, $result); - $this->assertSame($calledListeners, [ + self::assertSame($updatedUserGroup, $result); + self::assertSame($calledListeners, [ [BeforeUpdateUserGroupEvent::class, 0], [UpdateUserGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnUpdateUserGroupResultInBeforeEvents() @@ -93,13 +94,13 @@ public function testReturnUpdateUserGroupResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventUpdatedUserGroup, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedUserGroup, $result); + self::assertSame($calledListeners, [ [BeforeUpdateUserGroupEvent::class, 10], [BeforeUpdateUserGroupEvent::class, 0], [UpdateUserGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testUpdateUserGroupStopPropagationInBeforeEvents() @@ -130,11 +131,11 @@ public function testUpdateUserGroupStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventUpdatedUserGroup, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedUserGroup, $result); + self::assertSame($calledListeners, [ [BeforeUpdateUserGroupEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeUpdateUserGroupEvent::class, 0], [UpdateUserGroupEvent::class, 0], ]); @@ -161,12 +162,12 @@ public function testUpdateUserEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($updatedUser, $result); - $this->assertSame($calledListeners, [ + self::assertSame($updatedUser, $result); + self::assertSame($calledListeners, [ [BeforeUpdateUserEvent::class, 0], [UpdateUserEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnUpdateUserResultInBeforeEvents() @@ -195,13 +196,13 @@ public function testReturnUpdateUserResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventUpdatedUser, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedUser, $result); + self::assertSame($calledListeners, [ [BeforeUpdateUserEvent::class, 10], [BeforeUpdateUserEvent::class, 0], [UpdateUserEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testUpdateUserStopPropagationInBeforeEvents() @@ -232,11 +233,11 @@ public function testUpdateUserStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventUpdatedUser, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedUser, $result); + self::assertSame($calledListeners, [ [BeforeUpdateUserEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeUpdateUserEvent::class, 0], [UpdateUserEvent::class, 0], ]); @@ -261,11 +262,11 @@ public function testUnAssignUserFromUserGroupEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeUnAssignUserFromUserGroupEvent::class, 0], [UnAssignUserFromUserGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testUnAssignUserFromUserGroupStopPropagationInBeforeEvents() @@ -292,10 +293,10 @@ public function testUnAssignUserFromUserGroupStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeUnAssignUserFromUserGroupEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeUnAssignUserFromUserGroupEvent::class, 0], [UnAssignUserFromUserGroupEvent::class, 0], ]); @@ -321,12 +322,12 @@ public function testDeleteUserGroupEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($locations, $result); - $this->assertSame($calledListeners, [ + self::assertSame($locations, $result); + self::assertSame($calledListeners, [ [BeforeDeleteUserGroupEvent::class, 0], [DeleteUserGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnDeleteUserGroupResultInBeforeEvents() @@ -354,13 +355,13 @@ public function testReturnDeleteUserGroupResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventLocations, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventLocations, $result); + self::assertSame($calledListeners, [ [BeforeDeleteUserGroupEvent::class, 10], [BeforeDeleteUserGroupEvent::class, 0], [DeleteUserGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testDeleteUserGroupStopPropagationInBeforeEvents() @@ -390,11 +391,11 @@ public function testDeleteUserGroupStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventLocations, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventLocations, $result); + self::assertSame($calledListeners, [ [BeforeDeleteUserGroupEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeDeleteUserGroupEvent::class, 0], [DeleteUserGroupEvent::class, 0], ]); @@ -419,11 +420,11 @@ public function testAssignUserToUserGroupEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeAssignUserToUserGroupEvent::class, 0], [AssignUserToUserGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testAssignUserToUserGroupStopPropagationInBeforeEvents() @@ -450,10 +451,10 @@ public function testAssignUserToUserGroupStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeAssignUserToUserGroupEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [AssignUserToUserGroupEvent::class, 0], [BeforeAssignUserToUserGroupEvent::class, 0], ]); @@ -479,12 +480,12 @@ public function testDeleteUserEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($locations, $result); - $this->assertSame($calledListeners, [ + self::assertSame($locations, $result); + self::assertSame($calledListeners, [ [BeforeDeleteUserEvent::class, 0], [DeleteUserEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnDeleteUserResultInBeforeEvents() @@ -512,13 +513,13 @@ public function testReturnDeleteUserResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventLocations, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventLocations, $result); + self::assertSame($calledListeners, [ [BeforeDeleteUserEvent::class, 10], [BeforeDeleteUserEvent::class, 0], [DeleteUserEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testDeleteUserStopPropagationInBeforeEvents() @@ -548,11 +549,11 @@ public function testDeleteUserStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventLocations, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventLocations, $result); + self::assertSame($calledListeners, [ [BeforeDeleteUserEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeDeleteUserEvent::class, 0], [DeleteUserEvent::class, 0], ]); @@ -577,11 +578,11 @@ public function testMoveUserGroupEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeMoveUserGroupEvent::class, 0], [MoveUserGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testMoveUserGroupStopPropagationInBeforeEvents() @@ -608,10 +609,10 @@ public function testMoveUserGroupStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($calledListeners, [ + self::assertSame($calledListeners, [ [BeforeMoveUserGroupEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeMoveUserGroupEvent::class, 0], [MoveUserGroupEvent::class, 0], ]); @@ -638,12 +639,12 @@ public function testCreateUserEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($user, $result); - $this->assertSame($calledListeners, [ + self::assertSame($user, $result); + self::assertSame($calledListeners, [ [BeforeCreateUserEvent::class, 0], [CreateUserEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCreateUserResultInBeforeEvents() @@ -672,13 +673,13 @@ public function testReturnCreateUserResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventUser, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUser, $result); + self::assertSame($calledListeners, [ [BeforeCreateUserEvent::class, 10], [BeforeCreateUserEvent::class, 0], [CreateUserEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCreateUserStopPropagationInBeforeEvents() @@ -709,11 +710,11 @@ public function testCreateUserStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventUser, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUser, $result); + self::assertSame($calledListeners, [ [BeforeCreateUserEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCreateUserEvent::class, 0], [CreateUserEvent::class, 0], ]); @@ -740,12 +741,12 @@ public function testCreateUserGroupEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($userGroup, $result); - $this->assertSame($calledListeners, [ + self::assertSame($userGroup, $result); + self::assertSame($calledListeners, [ [BeforeCreateUserGroupEvent::class, 0], [CreateUserGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnCreateUserGroupResultInBeforeEvents() @@ -774,13 +775,13 @@ public function testReturnCreateUserGroupResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventUserGroup, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUserGroup, $result); + self::assertSame($calledListeners, [ [BeforeCreateUserGroupEvent::class, 10], [BeforeCreateUserGroupEvent::class, 0], [CreateUserGroupEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testCreateUserGroupStopPropagationInBeforeEvents() @@ -811,11 +812,11 @@ public function testCreateUserGroupStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventUserGroup, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUserGroup, $result); + self::assertSame($calledListeners, [ [BeforeCreateUserGroupEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeCreateUserGroupEvent::class, 0], [CreateUserGroupEvent::class, 0], ]); @@ -842,12 +843,12 @@ public function testUpdateUserTokenEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($updatedUser, $result); - $this->assertSame($calledListeners, [ + self::assertSame($updatedUser, $result); + self::assertSame($calledListeners, [ [BeforeUpdateUserTokenEvent::class, 0], [UpdateUserTokenEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testReturnUpdateUserTokenResultInBeforeEvents() @@ -876,13 +877,13 @@ public function testReturnUpdateUserTokenResultInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); - $this->assertSame($eventUpdatedUser, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedUser, $result); + self::assertSame($calledListeners, [ [BeforeUpdateUserTokenEvent::class, 10], [BeforeUpdateUserTokenEvent::class, 0], [UpdateUserTokenEvent::class, 0], ]); - $this->assertSame([], $traceableEventDispatcher->getNotCalledListeners()); + self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } public function testUpdateUserTokenStopPropagationInBeforeEvents() @@ -913,11 +914,11 @@ public function testUpdateUserTokenStopPropagationInBeforeEvents() $calledListeners = $this->getListenersStack($traceableEventDispatcher->getCalledListeners()); $notCalledListeners = $this->getListenersStack($traceableEventDispatcher->getNotCalledListeners()); - $this->assertSame($eventUpdatedUser, $result); - $this->assertSame($calledListeners, [ + self::assertSame($eventUpdatedUser, $result); + self::assertSame($calledListeners, [ [BeforeUpdateUserTokenEvent::class, 10], ]); - $this->assertSame($notCalledListeners, [ + self::assertSame($notCalledListeners, [ [BeforeUpdateUserTokenEvent::class, 0], [UpdateUserTokenEvent::class, 0], ]); diff --git a/tests/lib/FieldType/APIFieldTypeTest.php b/tests/lib/FieldType/APIFieldTypeTest.php index 6575577aa1..97817e0c54 100644 --- a/tests/lib/FieldType/APIFieldTypeTest.php +++ b/tests/lib/FieldType/APIFieldTypeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Contracts\Core\FieldType\FieldType as SPIFieldType; @@ -33,7 +34,7 @@ public function testValidateValidatorConfigurationNoError() $validatorConfig = ['foo' => 'bar']; $validationErrors = []; $this->innerFieldType - ->expects($this->once()) + ->expects(self::once()) ->method('validateValidatorConfiguration') ->with($validatorConfig) ->willReturn($validationErrors); @@ -50,7 +51,7 @@ public function testValidateValidatorConfiguration() $this->createMock(ValidationError::class), ]; $this->innerFieldType - ->expects($this->once()) + ->expects(self::once()) ->method('validateValidatorConfiguration') ->with($validatorConfig) ->willReturn($validationErrors); @@ -63,7 +64,7 @@ public function testValidateFieldSettingsNoError() $fieldSettings = ['foo' => 'bar']; $validationErrors = []; $this->innerFieldType - ->expects($this->once()) + ->expects(self::once()) ->method('validateFieldSettings') ->with($fieldSettings) ->willReturn($validationErrors); @@ -80,7 +81,7 @@ public function testValidateFieldSettings() $this->createMock(ValidationError::class), ]; $this->innerFieldType - ->expects($this->once()) + ->expects(self::once()) ->method('validateFieldSettings') ->with($fieldSettings) ->willReturn($validationErrors); @@ -94,7 +95,7 @@ public function testValidateValueNoError() $value = $this->getMockForAbstractClass(Value::class); $validationErrors = []; $this->innerFieldType - ->expects($this->once()) + ->expects(self::once()) ->method('validate') ->with($fieldDefinition, $value) ->willReturn($validationErrors); @@ -112,7 +113,7 @@ public function testValidateValue() $this->createMock(ValidationError::class), ]; $this->innerFieldType - ->expects($this->once()) + ->expects(self::once()) ->method('validate') ->with($fieldDefinition, $value) ->willReturn($validationErrors); diff --git a/tests/lib/FieldType/AuthorTest.php b/tests/lib/FieldType/AuthorTest.php index 4e98d24e44..d7ea36f48f 100644 --- a/tests/lib/FieldType/AuthorTest.php +++ b/tests/lib/FieldType/AuthorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; diff --git a/tests/lib/FieldType/BaseFieldTypeTest.php b/tests/lib/FieldType/BaseFieldTypeTest.php index c36e00fdb5..d13a8844e3 100644 --- a/tests/lib/FieldType/BaseFieldTypeTest.php +++ b/tests/lib/FieldType/BaseFieldTypeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Contracts\Core\FieldType\FieldType; @@ -562,7 +563,7 @@ public function testEmptyValue() { $fieldType = $this->getFieldTypeUnderTest(); - $this->assertEquals( + self::assertEquals( $this->getEmptyValueExpectation(), $fieldType->getEmptyValue() ); @@ -580,7 +581,7 @@ public function testAcceptValue($inputValue, $expectedOutputValue) $outputValue = $fieldType->acceptValue($inputValue); - $this->assertEquals( + self::assertEquals( $expectedOutputValue, $outputValue, 'acceptValue() did not convert properly.' @@ -597,7 +598,7 @@ public function testAcceptGetEmptyValue() $acceptedEmptyValue = $fieldType->acceptValue($emptyValue); - $this->assertEquals( + self::assertEquals( $emptyValue, $acceptedEmptyValue, 'acceptValue() did not convert properly.' @@ -636,13 +637,13 @@ public function testToHash($inputValue, $expectedResult) $this->assertIsValidHashValue($actualResult); if (is_object($expectedResult) || is_array($expectedResult)) { - $this->assertEquals( + self::assertEquals( $expectedResult, $actualResult, 'toHash() method did not create expected result.' ); } else { - $this->assertSame( + self::assertSame( $expectedResult, $actualResult, 'toHash() method did not create expected result.' @@ -665,13 +666,13 @@ public function testFromHash($inputHash, $expectedResult) $actualResult = $fieldType->fromHash($inputHash); if (is_object($expectedResult) || is_array($expectedResult)) { - $this->assertEquals( + self::assertEquals( $expectedResult, $actualResult, 'fromHash() method did not create expected result.' ); } else { - $this->assertSame( + self::assertSame( $expectedResult, $actualResult, 'fromHash() method did not create expected result.' @@ -683,7 +684,7 @@ public function testEmptyValueIsEmpty() { $fieldType = $this->getFieldTypeUnderTest(); - $this->assertTrue( + self::assertTrue( $fieldType->isEmptyValue($fieldType->getEmptyValue()) ); } @@ -699,11 +700,11 @@ public function testValidateFieldSettingsValid($inputSettings) $validationResult = $fieldType->validateFieldSettings($inputSettings); - $this->assertIsArray( + self::assertIsArray( $validationResult, 'The method validateFieldSettings() must return an array.' ); - $this->assertEquals( + self::assertEquals( [], $validationResult, 'validateFieldSettings() did not consider the input settings valid.' @@ -721,19 +722,19 @@ public function testValidateFieldSettingsInvalid($inputSettings) $validationResult = $fieldType->validateFieldSettings($inputSettings); - $this->assertIsArray( + self::assertIsArray( $validationResult, 'The method validateFieldSettings() must return an array.' ); - $this->assertNotEquals( + self::assertNotEquals( [], $validationResult, 'validateFieldSettings() did consider the input settings valid, which should be invalid.' ); foreach ($validationResult as $actualResultElement) { - $this->assertInstanceOf( + self::assertInstanceOf( ValidationError::class, $actualResultElement, 'Validation result of incorrect type.' @@ -752,11 +753,11 @@ public function testValidateValidatorConfigurationValid($inputConfiguration) $validationResult = $fieldType->validateValidatorConfiguration($inputConfiguration); - $this->assertIsArray( + self::assertIsArray( $validationResult, 'The method validateValidatorConfiguration() must return an array.' ); - $this->assertEquals( + self::assertEquals( [], $validationResult, 'validateValidatorConfiguration() did not consider the input configuration valid.' @@ -774,19 +775,19 @@ public function testValidateValidatorConfigurationInvalid($inputConfiguration) $validationResult = $fieldType->validateValidatorConfiguration($inputConfiguration); - $this->assertIsArray( + self::assertIsArray( $validationResult, 'The method validateValidatorConfiguration() must return an array.' ); - $this->assertNotEquals( + self::assertNotEquals( [], $validationResult, 'validateValidatorConfiguration() did consider the input settings valid, which should be invalid.' ); foreach ($validationResult as $actualResultElement) { - $this->assertInstanceOf( + self::assertInstanceOf( ValidationError::class, $actualResultElement, 'Validation result of incorrect type.' @@ -834,7 +835,7 @@ public function testFieldSettingsFromHash($inputSettings) $hash = $fieldType->fieldSettingsToHash($inputSettings); $restoredSettings = $fieldType->fieldSettingsFromHash($hash); - $this->assertEquals($inputSettings, $restoredSettings); + self::assertEquals($inputSettings, $restoredSettings); } /** @@ -849,7 +850,7 @@ public function testValidatorConfigurationFromHash($inputConfiguration) $hash = $fieldType->validatorConfigurationToHash($inputConfiguration); $restoredConfiguration = $fieldType->validatorConfigurationFromHash($hash); - $this->assertEquals($inputConfiguration, $restoredConfiguration); + self::assertEquals($inputConfiguration, $restoredConfiguration); } /** @@ -881,7 +882,7 @@ protected function assertIsValidHashValue($actualHash, $keyChain = []) case 'resource': case 'object': - $this->fail( + self::fail( sprintf( 'Value for $hash[%s] is of invalid type "%s".', implode('][', $keyChain), @@ -898,8 +899,8 @@ public function testValidateValid($fieldDefinitionData, $value) { $validationErrors = $this->doValidate($fieldDefinitionData, $value); - $this->assertIsArray($validationErrors); - $this->assertEmpty($validationErrors, "Got value:\n" . var_export($validationErrors, true)); + self::assertIsArray($validationErrors); + self::assertEmpty($validationErrors, "Got value:\n" . var_export($validationErrors, true)); } /** @@ -909,8 +910,8 @@ public function testValidateInvalid($fieldDefinitionData, $value, $errors) { $validationErrors = $this->doValidate($fieldDefinitionData, $value); - $this->assertIsArray($validationErrors); - $this->assertEquals($errors, $validationErrors); + self::assertIsArray($validationErrors); + self::assertEquals($errors, $validationErrors); } protected function doValidate($fieldDefinitionData, $value) diff --git a/tests/lib/FieldType/BinaryBaseTest.php b/tests/lib/FieldType/BinaryBaseTest.php index 436ead5880..b43a34f420 100644 --- a/tests/lib/FieldType/BinaryBaseTest.php +++ b/tests/lib/FieldType/BinaryBaseTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; diff --git a/tests/lib/FieldType/BinaryFileTest.php b/tests/lib/FieldType/BinaryFileTest.php index b8cf9bfcfe..f1b6b729ed 100644 --- a/tests/lib/FieldType/BinaryFileTest.php +++ b/tests/lib/FieldType/BinaryFileTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Contracts\Core\FieldType\BinaryBase\RouteAwarePathGenerator; diff --git a/tests/lib/FieldType/CheckboxTest.php b/tests/lib/FieldType/CheckboxTest.php index 284c9bcb33..67b4686e00 100644 --- a/tests/lib/FieldType/CheckboxTest.php +++ b/tests/lib/FieldType/CheckboxTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; diff --git a/tests/lib/FieldType/CountryTest.php b/tests/lib/FieldType/CountryTest.php index d20c28ebda..ec06220972 100644 --- a/tests/lib/FieldType/CountryTest.php +++ b/tests/lib/FieldType/CountryTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; diff --git a/tests/lib/FieldType/DateAndTimeTest.php b/tests/lib/FieldType/DateAndTimeTest.php index 61a3c9a6e9..2caa49a075 100644 --- a/tests/lib/FieldType/DateAndTimeTest.php +++ b/tests/lib/FieldType/DateAndTimeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use DateInterval; @@ -206,13 +207,13 @@ public function testFromHash($inputHash, $expectedResult) $actualResult = $fieldType->fromHash($inputHash); // Tests may run slowly. Allow 20 seconds margin of error. - $this->assertGreaterThanOrEqual( + self::assertGreaterThanOrEqual( $expectedResult, $actualResult, 'fromHash() method did not create expected result.' ); if ($expectedResult->value !== null) { - $this->assertLessThan( + self::assertLessThan( $expectedResult->value->add(new DateInterval('PT20S')), $actualResult->value, 'fromHash() method did not create expected result.' @@ -271,13 +272,13 @@ public function testTimeStringFromHash($inputHash, $intervalSpec) $actualResult = $fieldType->fromHash($inputHash); // Tests may run slowly. Allow 20 seconds margin of error. - $this->assertGreaterThanOrEqual( + self::assertGreaterThanOrEqual( $expectedResult, $actualResult, 'fromHash() method did not create expected result.' ); if ($expectedResult->value !== null) { - $this->assertLessThan( + self::assertLessThan( $expectedResult->value->add(new DateInterval('PT20S')), $actualResult->value, 'fromHash() method did not create expected result.' diff --git a/tests/lib/FieldType/DateTest.php b/tests/lib/FieldType/DateTest.php index 45b9072d43..41e531703c 100644 --- a/tests/lib/FieldType/DateTest.php +++ b/tests/lib/FieldType/DateTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use DateTime; diff --git a/tests/lib/FieldType/EmailAddressTest.php b/tests/lib/FieldType/EmailAddressTest.php index dd536abb3e..c2619769e9 100644 --- a/tests/lib/FieldType/EmailAddressTest.php +++ b/tests/lib/FieldType/EmailAddressTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; @@ -32,11 +33,11 @@ protected function createFieldTypeUnderTest() { $transformationProcessorMock = $this->getTransformationProcessorMock(); - $transformationProcessorMock->expects($this->any()) + $transformationProcessorMock->expects(self::any()) ->method('transformByGroup') - ->with($this->anything(), 'lowercase') + ->with(self::anything(), 'lowercase') ->will( - $this->returnCallback( + self::returnCallback( static function ($value, $group) { return strtolower($value); } diff --git a/tests/lib/FieldType/EmailAddressValidatorTest.php b/tests/lib/FieldType/EmailAddressValidatorTest.php index d9f56d5ae5..8e3aa98cac 100644 --- a/tests/lib/FieldType/EmailAddressValidatorTest.php +++ b/tests/lib/FieldType/EmailAddressValidatorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\FieldType\EmailAddress\Value as EmailAddressValue; @@ -13,6 +14,7 @@ /** * @todo add more tests, like on validateConstraints method + * * @group fieldType * @group validator */ @@ -23,7 +25,7 @@ class EmailAddressValidatorTest extends TestCase */ public function testConstructor() { - $this->assertInstanceOf( + self::assertInstanceOf( Validator::class, new EmailAddressValidator() ); @@ -44,7 +46,7 @@ public function testConstraintsInitializeGet() $validator->initializeWithConstraints( $constraints ); - $this->assertSame($constraints['Extent'], $validator->Extent); + self::assertSame($constraints['Extent'], $validator->Extent); } /** @@ -61,7 +63,7 @@ public function testGetConstraintsSchema() ], ]; $validator = new EmailAddressValidator(); - $this->assertSame($constraintsSchema, $validator->getConstraintsSchema()); + self::assertSame($constraintsSchema, $validator->getConstraintsSchema()); } /** @@ -77,7 +79,7 @@ public function testConstraintsSetGet() ]; $validator = new EmailAddressValidator(); $validator->Extent = $constraints['Extent']; - $this->assertSame($constraints['Extent'], $validator->Extent); + self::assertSame($constraints['Extent'], $validator->Extent); } public function testValidateCorrectEmailAddresses() @@ -86,8 +88,8 @@ public function testValidateCorrectEmailAddresses() $validator->Extent = 'regex'; $emailAddresses = ['john.doe@example.com', 'Info@Ibexa.Co']; foreach ($emailAddresses as $value) { - $this->assertTrue($validator->validate(new EmailAddressValue($value))); - $this->assertSame([], $validator->getMessage()); + self::assertTrue($validator->validate(new EmailAddressValue($value))); + self::assertSame([], $validator->getMessage()); } } @@ -102,7 +104,7 @@ public function testValidateWrongEmailAddresses() $validator->Extent = 'regex'; $emailAddresses = ['.john.doe@example.com', 'Info-at-Ibexa.Co']; foreach ($emailAddresses as $value) { - $this->assertFalse($validator->validate(new EmailAddressValue($value))); + self::assertFalse($validator->validate(new EmailAddressValue($value))); } } } diff --git a/tests/lib/FieldType/FieldTypeMockTest.php b/tests/lib/FieldType/FieldTypeMockTest.php index 424eda9b85..80a50dc574 100644 --- a/tests/lib/FieldType/FieldTypeMockTest.php +++ b/tests/lib/FieldType/FieldTypeMockTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; @@ -48,10 +49,10 @@ public function testApplyDefaultSettings($initialSettings, $expectedSettings) ); $stub - ->expects($this->any()) + ->expects(self::any()) ->method('getSettingsSchema') ->will( - $this->returnValue( + self::returnValue( [ 'true' => [ 'default' => true, @@ -87,7 +88,7 @@ public function testApplyDefaultSettings($initialSettings, $expectedSettings) $fieldSettings = $initialSettings; $stub->applyDefaultSettings($fieldSettings); - $this->assertSame( + self::assertSame( $expectedSettings, $fieldSettings ); @@ -191,15 +192,15 @@ public function testApplyDefaultValidatorConfigurationEmpty() ); $stub - ->expects($this->any()) + ->expects(self::any()) ->method('getValidatorConfigurationSchema') ->will( - $this->returnValue([]) + self::returnValue([]) ); $validatorConfiguration = null; $stub->applyDefaultValidatorConfiguration($validatorConfiguration); - $this->assertNull( + self::assertNull( $validatorConfiguration ); } @@ -221,10 +222,10 @@ public function testApplyDefaultValidatorConfiguration($initialConfiguration, $e ); $stub - ->expects($this->any()) + ->expects(self::any()) ->method('getValidatorConfigurationSchema') ->will( - $this->returnValue( + self::returnValue( [ 'TestValidator' => [ 'valueClick' => [ @@ -240,7 +241,7 @@ public function testApplyDefaultValidatorConfiguration($initialConfiguration, $e $validatorConfiguration = $initialConfiguration; $stub->applyDefaultValidatorConfiguration($validatorConfiguration); - $this->assertSame( + self::assertSame( $expectedConfiguration, $validatorConfiguration ); diff --git a/tests/lib/FieldType/FieldTypeTest.php b/tests/lib/FieldType/FieldTypeTest.php index 1950cfdbe9..f2d0c7dff9 100644 --- a/tests/lib/FieldType/FieldTypeTest.php +++ b/tests/lib/FieldType/FieldTypeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/tests/lib/FieldType/FileSizeValidatorTest.php b/tests/lib/FieldType/FileSizeValidatorTest.php index a8f65652a7..bfaa295927 100644 --- a/tests/lib/FieldType/FileSizeValidatorTest.php +++ b/tests/lib/FieldType/FileSizeValidatorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Contracts\Core\FieldType\ValidationError; @@ -36,7 +37,7 @@ protected function getMaxFileSize() */ public function testConstructor() { - $this->assertInstanceOf( + self::assertInstanceOf( Validator::class, new FileSizeValidator() ); @@ -57,7 +58,7 @@ public function testConstraintsInitializeGet() $validator->initializeWithConstraints( $constraints ); - $this->assertSame($constraints['maxFileSize'], $validator->maxFileSize); + self::assertSame($constraints['maxFileSize'], $validator->maxFileSize); } /** @@ -74,7 +75,7 @@ public function testGetConstraintsSchema() ], ]; $validator = new FileSizeValidator(); - $this->assertSame($constraintsSchema, $validator->getConstraintsSchema()); + self::assertSame($constraintsSchema, $validator->getConstraintsSchema()); } /** @@ -90,7 +91,7 @@ public function testConstraintsSetGet() ]; $validator = new FileSizeValidator(); $validator->maxFileSize = $constraints['maxFileSize']; - $this->assertSame($constraints['maxFileSize'], $validator->maxFileSize); + self::assertSame($constraints['maxFileSize'], $validator->maxFileSize); } /** @@ -143,16 +144,17 @@ public function testGetBadConstraint() * @param int $size * * @dataProvider providerForValidateOK + * * @covers \Ibexa\Core\FieldType\Validator\FileSizeValidator::validate * @covers \Ibexa\Core\FieldType\Validator::getMessage */ public function testValidateCorrectValues($size) { - $this->markTestSkipped('BinaryFile field type does not use this validator anymore.'); + self::markTestSkipped('BinaryFile field type does not use this validator anymore.'); $validator = new FileSizeValidator(); $validator->maxFileSize = 4096; - $this->assertTrue($validator->validate($this->getBinaryFileValue($size))); - $this->assertSame([], $validator->getMessage()); + self::assertTrue($validator->validate($this->getBinaryFileValue($size))); + self::assertSame([], $validator->getMessage()); } /** @@ -162,7 +164,7 @@ public function testValidateCorrectValues($size) */ protected function getBinaryFileValue($size) { - $this->markTestSkipped('BinaryFile field type does not use this validator anymore.'); + self::markTestSkipped('BinaryFile field type does not use this validator anymore.'); $value = new BinaryFileValue($this->createMock(IOServiceInterface::class)); $value->file = new BinaryFile(['size' => $size]); @@ -182,33 +184,34 @@ public function providerForValidateOK() * Tests validating a wrong value. * * @dataProvider providerForValidateKO + * * @covers \Ibexa\Core\FieldType\Validator\FileSizeValidator::validate */ public function testValidateWrongValues($size, $message, $values) { - $this->markTestSkipped('BinaryFile field type does not use this validator anymore.'); + self::markTestSkipped('BinaryFile field type does not use this validator anymore.'); $validator = new FileSizeValidator(); $validator->maxFileSize = $this->getMaxFileSize(); - $this->assertFalse($validator->validate($this->getBinaryFileValue($size))); + self::assertFalse($validator->validate($this->getBinaryFileValue($size))); $messages = $validator->getMessage(); - $this->assertCount(1, $messages); - $this->assertInstanceOf( + self::assertCount(1, $messages); + self::assertInstanceOf( ValidationError::class, $messages[0] ); - $this->assertInstanceOf( + self::assertInstanceOf( Plural::class, $messages[0]->getTranslatableMessage() ); - $this->assertEquals( + self::assertEquals( $message[0], $messages[0]->getTranslatableMessage()->singular ); - $this->assertEquals( + self::assertEquals( $message[1], $messages[0]->getTranslatableMessage()->plural ); - $this->assertEquals( + self::assertEquals( $values, $messages[0]->getTranslatableMessage()->values ); @@ -232,13 +235,14 @@ public function providerForValidateKO() * Tests validation of constraints. * * @dataProvider providerForValidateConstraintsOK + * * @covers \Ibexa\Core\FieldType\Validator\FileSizeValidator::validateConstraints */ public function testValidateConstraintsCorrectValues($constraints) { $validator = new FileSizeValidator(); - $this->assertEmpty( + self::assertEmpty( $validator->validateConstraints($constraints) ); } @@ -260,6 +264,7 @@ public function providerForValidateConstraintsOK() * Tests validation of constraints. * * @dataProvider providerForValidateConstraintsKO + * * @covers \Ibexa\Core\FieldType\Validator\FileSizeValidator::validateConstraints */ public function testValidateConstraintsWrongValues($constraints, $expectedMessages, $values) @@ -267,15 +272,15 @@ public function testValidateConstraintsWrongValues($constraints, $expectedMessag $validator = new FileSizeValidator(); $messages = $validator->validateConstraints($constraints); - $this->assertInstanceOf( + self::assertInstanceOf( Message::class, $messages[0]->getTranslatableMessage() ); - $this->assertEquals( + self::assertEquals( $expectedMessages[0], $messages[0]->getTranslatableMessage()->message ); - $this->assertEquals( + self::assertEquals( $values, $messages[0]->getTranslatableMessage()->values ); diff --git a/tests/lib/FieldType/FloatTest.php b/tests/lib/FieldType/FloatTest.php index 907e4a6a95..ef791701d7 100644 --- a/tests/lib/FieldType/FloatTest.php +++ b/tests/lib/FieldType/FloatTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; diff --git a/tests/lib/FieldType/FloatValueValidatorTest.php b/tests/lib/FieldType/FloatValueValidatorTest.php index b566148841..cb4e984b45 100644 --- a/tests/lib/FieldType/FloatValueValidatorTest.php +++ b/tests/lib/FieldType/FloatValueValidatorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Contracts\Core\FieldType\ValidationError; @@ -41,7 +42,7 @@ protected function getMaxFloatValue() */ public function testConstructor() { - $this->assertInstanceOf( + self::assertInstanceOf( Validator::class, new FloatValueValidator() ); @@ -63,8 +64,8 @@ public function testConstraintsInitializeGet() $validator->initializeWithConstraints( $constraints ); - $this->assertSame($constraints['minFloatValue'], $validator->minFloatValue); - $this->assertSame($constraints['maxFloatValue'], $validator->maxFloatValue); + self::assertSame($constraints['minFloatValue'], $validator->minFloatValue); + self::assertSame($constraints['maxFloatValue'], $validator->maxFloatValue); } /** @@ -85,7 +86,7 @@ public function testGetConstraintsSchema() ], ]; $validator = new FloatValueValidator(); - $this->assertSame($constraintsSchema, $validator->getConstraintsSchema()); + self::assertSame($constraintsSchema, $validator->getConstraintsSchema()); } /** @@ -103,8 +104,8 @@ public function testConstraintsSetGet() $validator = new FloatValueValidator(); $validator->minFloatValue = $constraints['minFloatValue']; $validator->maxFloatValue = $constraints['maxFloatValue']; - $this->assertSame($constraints['minFloatValue'], $validator->minFloatValue); - $this->assertSame($constraints['maxFloatValue'], $validator->maxFloatValue); + self::assertSame($constraints['minFloatValue'], $validator->minFloatValue); + self::assertSame($constraints['maxFloatValue'], $validator->maxFloatValue); } /** @@ -155,6 +156,7 @@ public function testGetBadConstraint() * Tests validating a correct value. * * @dataProvider providerForValidateOK + * * @covers \Ibexa\Core\FieldType\Validator\FloatValueValidator::validate * @covers \Ibexa\Core\FieldType\Validator::getMessage */ @@ -163,8 +165,8 @@ public function testValidateCorrectValues($value) $validator = new FloatValueValidator(); $validator->minFloatValue = 10 / 7; $validator->maxFloatValue = 11 / 7; - $this->assertTrue($validator->validate(new FloatValue($value))); - $this->assertSame([], $validator->getMessage()); + self::assertTrue($validator->validate(new FloatValue($value))); + self::assertSame([], $validator->getMessage()); } public function providerForValidateOK() @@ -182,6 +184,7 @@ public function providerForValidateOK() * Tests validating a wrong value. * * @dataProvider providerForValidateKO + * * @covers \Ibexa\Core\FieldType\Validator\FloatValueValidator::validate */ public function testValidateWrongValues($value, $message, $values) @@ -189,22 +192,22 @@ public function testValidateWrongValues($value, $message, $values) $validator = new FloatValueValidator(); $validator->minFloatValue = $this->getMinFloatValue(); $validator->maxFloatValue = $this->getMaxFloatValue(); - $this->assertFalse($validator->validate(new FloatValue($value))); + self::assertFalse($validator->validate(new FloatValue($value))); $messages = $validator->getMessage(); - $this->assertCount(1, $messages); - $this->assertInstanceOf( + self::assertCount(1, $messages); + self::assertInstanceOf( ValidationError::class, $messages[0] ); - $this->assertInstanceOf( + self::assertInstanceOf( Message::class, $messages[0]->getTranslatableMessage() ); - $this->assertEquals( + self::assertEquals( $message, $messages[0]->getTranslatableMessage()->message ); - $this->assertEquals( + self::assertEquals( $values, $messages[0]->getTranslatableMessage()->values ); @@ -224,13 +227,14 @@ public function providerForValidateKO() * Tests validation of constraints. * * @dataProvider providerForValidateConstraintsOK + * * @covers \Ibexa\Core\FieldType\Validator\FileSizeValidator::validateConstraints */ public function testValidateConstraintsCorrectValues($constraints) { $validator = new FloatValueValidator(); - $this->assertEmpty( + self::assertEmpty( $validator->validateConstraints($constraints) ); } @@ -270,6 +274,7 @@ public function providerForValidateConstraintsOK() * Tests validation of constraints. * * @dataProvider providerForValidateConstraintsKO + * * @covers \Ibexa\Core\FieldType\Validator\FileSizeValidator::validateConstraints */ public function testValidateConstraintsWrongValues($constraints, $expectedMessages, $values) @@ -278,15 +283,15 @@ public function testValidateConstraintsWrongValues($constraints, $expectedMessag $messages = $validator->validateConstraints($constraints); foreach ($expectedMessages as $index => $expectedMessage) { - $this->assertInstanceOf( + self::assertInstanceOf( Message::class, $messages[0]->getTranslatableMessage() ); - $this->assertEquals( + self::assertEquals( $expectedMessage, $messages[$index]->getTranslatableMessage()->message ); - $this->assertEquals( + self::assertEquals( $values[$index], $messages[$index]->getTranslatableMessage()->values ); diff --git a/tests/lib/FieldType/Generic/ValueSerializer/SymfonySerializerAdapterTest.php b/tests/lib/FieldType/Generic/ValueSerializer/SymfonySerializerAdapterTest.php index 58f8f40def..606453bdb9 100644 --- a/tests/lib/FieldType/Generic/ValueSerializer/SymfonySerializerAdapterTest.php +++ b/tests/lib/FieldType/Generic/ValueSerializer/SymfonySerializerAdapterTest.php @@ -58,12 +58,12 @@ public function testNormalize(): void $data = ['value' => 'test']; $this->normalizer - ->expects($this->once()) + ->expects(self::once()) ->method('normalize') ->with($value, self::TEST_FORMAT, self::TEST_CONTEXT) ->willReturn($data); - $this->assertEquals($data, $this->adapter->normalize($value, self::TEST_CONTEXT)); + self::assertEquals($data, $this->adapter->normalize($value, self::TEST_CONTEXT)); } public function testDenormalize(): void @@ -72,12 +72,12 @@ public function testDenormalize(): void $value = $this->createMock(Value::class); $this->denomalizer - ->expects($this->once()) + ->expects(self::once()) ->method('denormalize') ->with($data, Value::class, self::TEST_FORMAT, self::TEST_CONTEXT) ->willReturn($value); - $this->assertEquals($value, $this->adapter->denormalize($data, Value::class, self::TEST_CONTEXT)); + self::assertEquals($value, $this->adapter->denormalize($data, Value::class, self::TEST_CONTEXT)); } public function testEncode(): void @@ -86,12 +86,12 @@ public function testEncode(): void $json = '{"value": "test"}'; $this->encoder - ->expects($this->once()) + ->expects(self::once()) ->method('encode') ->with($data, self::TEST_FORMAT, self::TEST_CONTEXT) ->willReturn($json); - $this->assertEquals($json, $this->adapter->encode($data, self::TEST_CONTEXT)); + self::assertEquals($json, $this->adapter->encode($data, self::TEST_CONTEXT)); } public function testDecode(): void @@ -100,12 +100,12 @@ public function testDecode(): void $json = '{"value": "test"}'; $this->decoder - ->expects($this->once()) + ->expects(self::once()) ->method('decode') ->with($json, self::TEST_FORMAT, self::TEST_CONTEXT) ->willReturn($data); - $this->assertEquals($data, $this->adapter->decode($json, self::TEST_CONTEXT)); + self::assertEquals($data, $this->adapter->decode($json, self::TEST_CONTEXT)); } } diff --git a/tests/lib/FieldType/ISBNTest.php b/tests/lib/FieldType/ISBNTest.php index 811c2e0673..70850c2b7d 100644 --- a/tests/lib/FieldType/ISBNTest.php +++ b/tests/lib/FieldType/ISBNTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; diff --git a/tests/lib/FieldType/Image/IO/LegacyTest.php b/tests/lib/FieldType/Image/IO/LegacyTest.php index dbe7c3f981..8f042e9a71 100644 --- a/tests/lib/FieldType/Image/IO/LegacyTest.php +++ b/tests/lib/FieldType/Image/IO/LegacyTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType\Image\IO; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; @@ -49,10 +50,10 @@ protected function setUp(): void public function testGetExternalPath() { $this->publishedIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('getExternalPath') ->with('var/test/storage/images/path/file.png') - ->will($this->returnValue('path/file.png')); + ->will(self::returnValue('path/file.png')); self::assertEquals( 'path/file.png', @@ -65,12 +66,12 @@ public function testNewBinaryCreateStructFromLocalFile() $path = '/tmp/file.png'; $struct = new BinaryFileCreateStruct(); $this->publishedIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('newBinaryCreateStructFromLocalFile') ->with($path) - ->will($this->returnValue($struct)); + ->will(self::returnValue($struct)); - $this->draftIoServiceMock->expects($this->never())->method('newBinaryCreateStructFromLocalFile'); + $this->draftIoServiceMock->expects(self::never())->method('newBinaryCreateStructFromLocalFile'); self::assertEquals( $struct, @@ -82,12 +83,12 @@ public function testExists() { $path = 'path/file.png'; $this->publishedIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('exists') ->with($path) - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); - $this->draftIoServiceMock->expects($this->never())->method('exists'); + $this->draftIoServiceMock->expects(self::never())->method('exists'); self::assertTrue( $this->service->exists($path) @@ -100,12 +101,12 @@ public function testGetInternalPath() $internalPath = 'var/test/storage/images/path/file.png'; $this->publishedIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('getInternalPath') ->with($id) - ->will($this->returnValue($internalPath)); + ->will(self::returnValue($internalPath)); - $this->draftIoServiceMock->expects($this->never())->method('getInternalPath'); + $this->draftIoServiceMock->expects(self::never())->method('getInternalPath'); self::assertEquals( $internalPath, @@ -122,12 +123,12 @@ public function testLoadBinaryFile() $binaryFile = new BinaryFile(['id' => $id]); $this->publishedIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFile') ->with($id) - ->will($this->returnValue($binaryFile)); + ->will(self::returnValue($binaryFile)); - $this->draftIoServiceMock->expects($this->never())->method('loadBinaryFile'); + $this->draftIoServiceMock->expects(self::never())->method('loadBinaryFile'); self::assertSame( $binaryFile, @@ -145,18 +146,18 @@ public function testLoadBinaryFileDraftInternalPath() $binaryFile = new BinaryFile(['id' => $id]); $this->draftIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('getExternalPath') ->with($internalId) - ->will($this->returnValue($id)); + ->will(self::returnValue($id)); $this->draftIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFile') ->with($id) - ->will($this->returnValue($binaryFile)); + ->will(self::returnValue($binaryFile)); - $this->publishedIoServiceMock->expects($this->never())->method('loadBinaryFile'); + $this->publishedIoServiceMock->expects(self::never())->method('loadBinaryFile'); self::assertSame( $binaryFile, @@ -174,18 +175,18 @@ public function testLoadBinaryFilePublishedInternalPath() $binaryFile = new BinaryFile(['id' => $id]); $this->publishedIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('getExternalPath') ->with($internalId) - ->will($this->returnValue($id)); + ->will(self::returnValue($id)); $this->publishedIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFile') ->with($id) - ->will($this->returnValue($binaryFile)); + ->will(self::returnValue($binaryFile)); - $this->draftIoServiceMock->expects($this->never())->method('loadBinaryFile'); + $this->draftIoServiceMock->expects(self::never())->method('loadBinaryFile'); self::assertSame( $binaryFile, @@ -201,20 +202,20 @@ public function testLoadBinaryFileDraftExternalPath() $id = 'path/file.jpg'; $binaryFile = new BinaryFile(['id' => $id]); - $this->draftIoServiceMock->expects($this->never())->method('getExternalPath'); - $this->publishedIoServiceMock->expects($this->never())->method('getExternalPath'); + $this->draftIoServiceMock->expects(self::never())->method('getExternalPath'); + $this->publishedIoServiceMock->expects(self::never())->method('getExternalPath'); $this->publishedIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFile') ->with($id) - ->will($this->throwException(new InvalidArgumentException('binaryFileId', "Can't find file with id $id}"))); + ->will(self::throwException(new InvalidArgumentException('binaryFileId', "Can't find file with id $id}"))); $this->draftIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFile') ->with($id) - ->will($this->returnValue($binaryFile)); + ->will(self::returnValue($binaryFile)); self::assertSame( $binaryFile, @@ -227,10 +228,10 @@ public function testLoadBinaryFileByUriWithPublishedFile() $binaryFileUri = 'var/test/images/an/image.png'; $binaryFile = new BinaryFile(['id' => 'an/image.png']); $this->publishedIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFileByUri') ->with($binaryFileUri) - ->will($this->returnValue($binaryFile)); + ->will(self::returnValue($binaryFile)); self::assertSame( $binaryFile, @@ -244,16 +245,16 @@ public function testLoadBinaryFileByUriWithDraftFile() $binaryFile = new BinaryFile(['id' => 'an/image.png']); $this->publishedIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFileByUri') ->with($binaryFileUri) - ->will($this->throwException(new InvalidArgumentException('$id', "Prefix not found in {$binaryFile->id}"))); + ->will(self::throwException(new InvalidArgumentException('$id', "Prefix not found in {$binaryFile->id}"))); $this->draftIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFileByUri') ->with($binaryFileUri) - ->will($this->returnValue($binaryFile)); + ->will(self::returnValue($binaryFile)); self::assertSame( $binaryFile, @@ -268,18 +269,18 @@ public function testGetFileContents() $binaryFile = new BinaryFile(['id' => $path]); $this->draftIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('exists') ->with($path) - ->will($this->returnValue(false)); + ->will(self::returnValue(false)); $this->publishedIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('getFileContents') ->with($binaryFile) - ->will($this->returnValue($contents)); + ->will(self::returnValue($contents)); - $this->draftIoServiceMock->expects($this->never())->method('getFileContents'); + $this->draftIoServiceMock->expects(self::never())->method('getFileContents'); self::assertSame( $contents, @@ -294,18 +295,18 @@ public function testGetFileContentsOfDraft() $binaryFile = new BinaryFile(['id' => $path]); $this->draftIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('exists') ->with($path) - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); $this->draftIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('getFileContents') ->with($binaryFile) - ->will($this->returnValue($contents)); + ->will(self::returnValue($contents)); - $this->publishedIoServiceMock->expects($this->never())->method('getFileContents'); + $this->publishedIoServiceMock->expects(self::never())->method('getFileContents'); self::assertSame( $contents, @@ -319,18 +320,18 @@ public function testGetMimeType() $mimeType = 'image/png'; $this->draftIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('exists') ->with($path) - ->will($this->returnValue(false)); + ->will(self::returnValue(false)); $this->publishedIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('getMimeType') ->with($path) - ->will($this->returnValue($mimeType)); + ->will(self::returnValue($mimeType)); - $this->draftIoServiceMock->expects($this->never())->method('getMimeType'); + $this->draftIoServiceMock->expects(self::never())->method('getMimeType'); self::assertSame( $mimeType, @@ -344,18 +345,18 @@ public function testGetMimeTypeOfDraft() $mimeType = 'image/png'; $this->draftIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('exists') ->with($path) - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); $this->draftIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('getMimeType') ->with($path) - ->will($this->returnValue($mimeType)); + ->will(self::returnValue($mimeType)); - $this->publishedIoServiceMock->expects($this->never())->method('getMimeType'); + $this->publishedIoServiceMock->expects(self::never())->method('getMimeType'); self::assertSame( $mimeType, @@ -369,12 +370,12 @@ public function testCreateBinaryFile() $binaryFile = new BinaryFile(); $this->publishedIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('createBinaryFile') ->with($createStruct) - ->will($this->returnValue($binaryFile)); + ->will(self::returnValue($binaryFile)); - $this->draftIoServiceMock->expects($this->never())->method('createBinaryFile'); + $this->draftIoServiceMock->expects(self::never())->method('createBinaryFile'); self::assertSame( $binaryFile, @@ -386,12 +387,12 @@ public function testGetUri() { $binaryFile = new BinaryFile(); $this->publishedIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('getUri') ->with($binaryFile) - ->will($this->returnValue('protocol://uri')); + ->will(self::returnValue('protocol://uri')); - $this->draftIoServiceMock->expects($this->never())->method('getUri'); + $this->draftIoServiceMock->expects(self::never())->method('getUri'); self::assertEquals( 'protocol://uri', @@ -403,12 +404,12 @@ public function testGetFileInputStream() { $binaryFile = new BinaryFile(); $this->publishedIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('getFileInputStream') ->with($binaryFile) - ->will($this->returnValue('resource')); + ->will(self::returnValue('resource')); - $this->draftIoServiceMock->expects($this->never())->method('getFileInputStream'); + $this->draftIoServiceMock->expects(self::never())->method('getFileInputStream'); self::assertEquals( 'resource', @@ -420,11 +421,11 @@ public function testDeleteBinaryFile() { $binaryFile = new BinaryFile(); $this->publishedIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('deleteBinaryFile') ->with($binaryFile); - $this->draftIoServiceMock->expects($this->never())->method('deleteBinaryFile'); + $this->draftIoServiceMock->expects(self::never())->method('deleteBinaryFile'); $this->service->deleteBinaryFile($binaryFile); } @@ -433,12 +434,12 @@ public function testNewBinaryCreateStructFromUploadedFile() { $struct = new BinaryFileCreateStruct(); $this->publishedIoServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('newBinaryCreateStructFromUploadedFile') ->with([]) - ->will($this->returnValue($struct)); + ->will(self::returnValue($struct)); - $this->draftIoServiceMock->expects($this->never())->method('newBinaryCreateStructFromUploadedFile'); + $this->draftIoServiceMock->expects(self::never())->method('newBinaryCreateStructFromUploadedFile'); self::assertEquals( $struct, diff --git a/tests/lib/FieldType/Image/PathGenerator/LegacyPathGeneratorTest.php b/tests/lib/FieldType/Image/PathGenerator/LegacyPathGeneratorTest.php index f9fcec89fd..63218a1094 100644 --- a/tests/lib/FieldType/Image/PathGenerator/LegacyPathGeneratorTest.php +++ b/tests/lib/FieldType/Image/PathGenerator/LegacyPathGeneratorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType\Image\PathGenerator; use Ibexa\Core\FieldType\Image\PathGenerator\LegacyPathGenerator; @@ -25,7 +26,7 @@ public function testGetStoragePathForField($data, $expectedPath) { $pathGenerator = new LegacyPathGenerator(); - $this->assertEquals( + self::assertEquals( $expectedPath, $pathGenerator->getStoragePathForField( $data['fieldId'], diff --git a/tests/lib/FieldType/ImageAsset/AssetMapperTest.php b/tests/lib/FieldType/ImageAsset/AssetMapperTest.php index 9b21c73f8f..5166e9867b 100644 --- a/tests/lib/FieldType/ImageAsset/AssetMapperTest.php +++ b/tests/lib/FieldType/ImageAsset/AssetMapperTest.php @@ -71,41 +71,41 @@ public function testCreateAsset(): void $content = new Content(); $this->contentTypeService - ->expects($this->once()) + ->expects(self::once()) ->method('loadContentTypeByIdentifier') ->with($this->mappings['content_type_identifier']) ->willReturn($contentType); $this->contentService - ->expects($this->once()) + ->expects(self::once()) ->method('newContentCreateStruct') ->with($contentType, $languageCode) ->willReturn($contentCreateStruct); $contentCreateStruct - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('setField') ->with($this->mappings['name_field_identifier'], $name); $contentCreateStruct - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('setField') ->with($this->mappings['content_field_identifier'], $value); $this->locationService - ->expects($this->once()) + ->expects(self::once()) ->method('newLocationCreateStruct') ->with($this->mappings['parent_location_id']) ->willReturn($locationCreateStruct); $this->contentService - ->expects($this->once()) + ->expects(self::once()) ->method('createContent') ->with($contentCreateStruct, [$locationCreateStruct]) ->willReturn($contentDraft); $this->contentService - ->expects($this->once()) + ->expects(self::once()) ->method('publishVersion') ->with($contentDraft->versionInfo) ->willReturn($content); @@ -121,18 +121,18 @@ public function testGetAssetField(): void $mapper = $this->createPartialMapper(['isAsset']); $mapper - ->expects($this->once()) + ->expects(self::once()) ->method('isAsset') ->with($content) ->willReturn(true); $content - ->expects($this->once()) + ->expects(self::once()) ->method('getField') ->with($this->mappings['content_field_identifier']) ->willReturn($expectedValue); - $this->assertEquals($expectedValue, $mapper->getAssetField($content)); + self::assertEquals($expectedValue, $mapper->getAssetField($content)); } public function testGetAssetFieldThrowsInvalidArgumentException(): void @@ -143,7 +143,7 @@ public function testGetAssetFieldThrowsInvalidArgumentException(): void $mapper = $this->createPartialMapper(['isAsset']); $mapper - ->expects($this->once()) + ->expects(self::once()) ->method('isAsset') ->with($content) ->willReturn(false); @@ -157,18 +157,18 @@ public function testGetAssetFieldDefinition(): void $contentType = $this->createMock(ContentType::class); $contentType - ->expects($this->once()) + ->expects(self::once()) ->method('getFieldDefinition') ->with($this->mappings['content_field_identifier']) ->willReturn($fieldDefinition); $this->contentTypeService - ->expects($this->once()) + ->expects(self::once()) ->method('loadContentTypeByIdentifier') ->with($this->mappings['content_type_identifier']) ->willReturn($contentType); - $this->assertEquals($fieldDefinition, $this->createMapper()->getAssetFieldDefinition()); + self::assertEquals($fieldDefinition, $this->createMapper()->getAssetFieldDefinition()); } public function testGetAssetValue(): void @@ -178,18 +178,18 @@ public function testGetAssetValue(): void $mapper = $this->createPartialMapper(['isAsset']); $mapper - ->expects($this->once()) + ->expects(self::once()) ->method('isAsset') ->with($content) ->willReturn(true); $content - ->expects($this->once()) + ->expects(self::once()) ->method('getFieldValue') ->with($this->mappings['content_field_identifier']) ->willReturn($expectedValue); - $this->assertEquals($expectedValue, $mapper->getAssetValue($content)); + self::assertEquals($expectedValue, $mapper->getAssetValue($content)); } public function testGetAssetValueThrowsInvalidArgumentException(): void @@ -200,7 +200,7 @@ public function testGetAssetValueThrowsInvalidArgumentException(): void $mapper = $this->createPartialMapper(['isAsset']); $mapper - ->expects($this->once()) + ->expects(self::once()) ->method('isAsset') ->with($content) ->willReturn(false); @@ -218,7 +218,7 @@ public function testIsAsset(int $contentContentTypeId, int $assetContentTypeId, ]); $this->contentTypeService - ->expects($this->once()) + ->expects(self::once()) ->method('loadContentTypeByIdentifier') ->with($this->mappings['content_type_identifier']) ->willReturn($assetContentType); @@ -227,7 +227,7 @@ public function testIsAsset(int $contentContentTypeId, int $assetContentTypeId, ->createMapper() ->isAsset($this->createContentWithContentType($contentContentTypeId)); - $this->assertEquals($expected, $actual); + self::assertEquals($expected, $actual); } public function dataProviderForIsAsset(): array @@ -242,7 +242,7 @@ public function testGetContentFieldIdentifier(): void { $mapper = $this->createMapper(); - $this->assertEquals( + self::assertEquals( $this->mappings['content_field_identifier'], $mapper->getContentFieldIdentifier() ); @@ -252,7 +252,7 @@ public function testGetParentLocationId(): void { $mapper = $this->createMapper(); - $this->assertEquals( + self::assertEquals( $this->mappings['parent_location_id'], $mapper->getParentLocationId() ); @@ -262,7 +262,7 @@ public function testGetContentTypeIdentifier(): void { $mapper = $this->createMapper(); - $this->assertEquals( + self::assertEquals( $this->mappings['content_type_identifier'], $mapper->getContentTypeIdentifier() ); @@ -299,7 +299,7 @@ private function createContentWithId(int $id): Content { $content = $this->createMock(Content::class); $content - ->expects($this->any()) + ->expects(self::any()) ->method('__get') ->with('id') ->willReturn($id); @@ -315,7 +315,7 @@ private function createContentWithContentType(int $contentTypeId): Content $content = $this->createMock(Content::class); $content - ->expects($this->any()) + ->expects(self::any()) ->method('__get') ->with('contentInfo') ->willReturn($contentInfo); diff --git a/tests/lib/FieldType/ImageAssetTest.php b/tests/lib/FieldType/ImageAssetTest.php index fe6d5c32fe..44de353936 100644 --- a/tests/lib/FieldType/ImageAssetTest.php +++ b/tests/lib/FieldType/ImageAssetTest.php @@ -239,7 +239,7 @@ public function testValidateNonAsset() $invalidContentTypeIdentifier = 'article'; $invalidContentType = $this->createMock(ContentType::class); $invalidContentType - ->expects($this->once()) + ->expects(self::once()) ->method('__get') ->with('identifier') ->willReturn($invalidContentTypeIdentifier); @@ -249,21 +249,21 @@ public function testValidateNonAsset() ->willReturn($invalidContentType); $this->contentServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadContent') ->with($destinationContentId) ->willReturn($destinationContent); $this->assetMapperMock - ->expects($this->once()) + ->expects(self::once()) ->method('isAsset') ->with($destinationContent) ->willReturn(false); $validationErrors = $this->doValidate([], new ImageAsset\Value($destinationContentId)); - $this->assertIsArray($validationErrors); - $this->assertEquals([ + self::assertIsArray($validationErrors); + self::assertEquals([ new ValidationError( 'Content %type% is not a valid asset target', null, @@ -301,13 +301,13 @@ public function testValidateValidNonEmptyAssetValue( $destinationContent = $this->createMock(Content::class); $this->contentServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadContent') ->with($destinationContentId) ->willReturn($destinationContent); $this->assetMapperMock - ->expects($this->once()) + ->expects(self::once()) ->method('isAsset') ->with($destinationContent) ->willReturn(true); @@ -318,7 +318,7 @@ public function testValidateValidNonEmptyAssetValue( ->willReturn($fileSize); $this->assetMapperMock - ->expects($this->once()) + ->expects(self::once()) ->method('getAssetValue') ->with($destinationContent) ->willReturn($assetValueMock); @@ -339,7 +339,7 @@ public function testValidateValidNonEmptyAssetValue( ->willReturn($fieldDefinitionMock); $validationErrors = $this->doValidate([], new ImageAsset\Value($destinationContentId)); - $this->assertEquals( + self::assertEquals( $expectedValidationErrors, $validationErrors ); @@ -414,7 +414,7 @@ public function testGetName( public function testIsSearchable() { - $this->assertTrue($this->getFieldTypeUnderTest()->isSearchable()); + self::assertTrue($this->getFieldTypeUnderTest()->isSearchable()); } /** @@ -425,7 +425,7 @@ public function testGetRelations() $destinationContentId = 7; $fieldType = $this->createFieldTypeUnderTest(); - $this->assertEquals( + self::assertEquals( [ Relation::ASSET => [$destinationContentId], ], diff --git a/tests/lib/FieldType/ImageTest.php b/tests/lib/FieldType/ImageTest.php index bcf4b96c2e..bac1f1c0b4 100644 --- a/tests/lib/FieldType/ImageTest.php +++ b/tests/lib/FieldType/ImageTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Contracts\Core\IO\MimeTypeDetector; diff --git a/tests/lib/FieldType/IntegerTest.php b/tests/lib/FieldType/IntegerTest.php index a75f4c8bd9..1a13da68ca 100644 --- a/tests/lib/FieldType/IntegerTest.php +++ b/tests/lib/FieldType/IntegerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; diff --git a/tests/lib/FieldType/IntegerValueValidatorTest.php b/tests/lib/FieldType/IntegerValueValidatorTest.php index 8f1cf841a3..2ffc7eb2d3 100644 --- a/tests/lib/FieldType/IntegerValueValidatorTest.php +++ b/tests/lib/FieldType/IntegerValueValidatorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Contracts\Core\FieldType\ValidationError; @@ -41,7 +42,7 @@ protected function getMaxIntegerValue() */ public function testConstructor() { - $this->assertInstanceOf( + self::assertInstanceOf( Validator::class, new IntegerValueValidator() ); @@ -63,8 +64,8 @@ public function testConstraintsInitializeGet() $validator->initializeWithConstraints( $constraints ); - $this->assertSame($constraints['minIntegerValue'], $validator->minIntegerValue); - $this->assertSame($constraints['maxIntegerValue'], $validator->maxIntegerValue); + self::assertSame($constraints['minIntegerValue'], $validator->minIntegerValue); + self::assertSame($constraints['maxIntegerValue'], $validator->maxIntegerValue); } /** @@ -85,7 +86,7 @@ public function testGetConstraintsSchema() ], ]; $validator = new IntegerValueValidator(); - $this->assertSame($constraintsSchema, $validator->getConstraintsSchema()); + self::assertSame($constraintsSchema, $validator->getConstraintsSchema()); } /** @@ -103,8 +104,8 @@ public function testConstraintsSetGet() $validator = new IntegerValueValidator(); $validator->minIntegerValue = $constraints['minIntegerValue']; $validator->maxIntegerValue = $constraints['maxIntegerValue']; - $this->assertSame($constraints['minIntegerValue'], $validator->minIntegerValue); - $this->assertSame($constraints['maxIntegerValue'], $validator->maxIntegerValue); + self::assertSame($constraints['minIntegerValue'], $validator->minIntegerValue); + self::assertSame($constraints['maxIntegerValue'], $validator->maxIntegerValue); } /** @@ -155,6 +156,7 @@ public function testGetBadConstraint() * Tests validating a correct value. * * @dataProvider providerForValidateOK + * * @covers \Ibexa\Core\FieldType\Validator\IntegerValueValidator::validate * @covers \Ibexa\Core\FieldType\Validator::getMessage */ @@ -163,8 +165,8 @@ public function testValidateCorrectValues($value) $validator = new IntegerValueValidator(); $validator->minIntegerValue = 10; $validator->maxIntegerValue = 15; - $this->assertTrue($validator->validate(new IntegerValue($value))); - $this->assertSame([], $validator->getMessage()); + self::assertTrue($validator->validate(new IntegerValue($value))); + self::assertSame([], $validator->getMessage()); } public function providerForValidateOK() @@ -184,6 +186,7 @@ public function providerForValidateOK() * Tests validating a wrong value. * * @dataProvider providerForValidateKO + * * @covers \Ibexa\Core\FieldType\Validator\IntegerValueValidator::validate */ public function testValidateWrongValues($value, $message, $values) @@ -191,22 +194,22 @@ public function testValidateWrongValues($value, $message, $values) $validator = new IntegerValueValidator(); $validator->minIntegerValue = $this->getMinIntegerValue(); $validator->maxIntegerValue = $this->getMaxIntegerValue(); - $this->assertFalse($validator->validate(new IntegerValue($value))); + self::assertFalse($validator->validate(new IntegerValue($value))); $messages = $validator->getMessage(); - $this->assertCount(1, $messages); - $this->assertInstanceOf( + self::assertCount(1, $messages); + self::assertInstanceOf( ValidationError::class, $messages[0] ); - $this->assertInstanceOf( + self::assertInstanceOf( Message::class, $messages[0]->getTranslatableMessage() ); - $this->assertEquals( + self::assertEquals( $message, $messages[0]->getTranslatableMessage()->message ); - $this->assertEquals( + self::assertEquals( $values, $messages[0]->getTranslatableMessage()->values ); @@ -226,13 +229,14 @@ public function providerForValidateKO() * Tests validation of constraints. * * @dataProvider providerForValidateConstraintsOK + * * @covers \Ibexa\Core\FieldType\Validator\FileSizeValidator::validateConstraints */ public function testValidateConstraintsCorrectValues($constraints) { $validator = new IntegerValueValidator(); - $this->assertEmpty( + self::assertEmpty( $validator->validateConstraints($constraints) ); } @@ -272,6 +276,7 @@ public function providerForValidateConstraintsOK() * Tests validation of constraints. * * @dataProvider providerForValidateConstraintsKO + * * @covers \Ibexa\Core\FieldType\Validator\FileSizeValidator::validateConstraints */ public function testValidateConstraintsWrongValues($constraints, $expectedMessages, $values) @@ -280,15 +285,15 @@ public function testValidateConstraintsWrongValues($constraints, $expectedMessag $messages = $validator->validateConstraints($constraints); foreach ($expectedMessages as $index => $expectedMessage) { - $this->assertInstanceOf( + self::assertInstanceOf( Message::class, $messages[0]->getTranslatableMessage() ); - $this->assertEquals( + self::assertEquals( $expectedMessage, $messages[$index]->getTranslatableMessage()->message ); - $this->assertEquals( + self::assertEquals( $values[$index], $messages[$index]->getTranslatableMessage()->values ); diff --git a/tests/lib/FieldType/KeywordTest.php b/tests/lib/FieldType/KeywordTest.php index 61a1646137..7f65e10cb9 100644 --- a/tests/lib/FieldType/KeywordTest.php +++ b/tests/lib/FieldType/KeywordTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; diff --git a/tests/lib/FieldType/MapLocationTest.php b/tests/lib/FieldType/MapLocationTest.php index bde9e351d6..c326b0955a 100644 --- a/tests/lib/FieldType/MapLocationTest.php +++ b/tests/lib/FieldType/MapLocationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; diff --git a/tests/lib/FieldType/MediaTest.php b/tests/lib/FieldType/MediaTest.php index d76f2f684e..129b52d733 100644 --- a/tests/lib/FieldType/MediaTest.php +++ b/tests/lib/FieldType/MediaTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; diff --git a/tests/lib/FieldType/RelationListTest.php b/tests/lib/FieldType/RelationListTest.php index 117972f437..9f6622c61a 100644 --- a/tests/lib/FieldType/RelationListTest.php +++ b/tests/lib/FieldType/RelationListTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; @@ -841,7 +842,7 @@ private function generateContentTypeValidationError(string $contentTypeIdentifie public function testGetRelations() { $ft = $this->createFieldTypeUnderTest(); - $this->assertEquals( + self::assertEquals( [ Relation::FIELD => [70, 72], ], diff --git a/tests/lib/FieldType/RelationTest.php b/tests/lib/FieldType/RelationTest.php index 86e4bf177e..c99124c735 100644 --- a/tests/lib/FieldType/RelationTest.php +++ b/tests/lib/FieldType/RelationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; @@ -382,7 +383,7 @@ public function provideInValidFieldSettings() public function testGetRelations() { $ft = $this->createFieldTypeUnderTest(); - $this->assertEquals( + self::assertEquals( [ Relation::FIELD => [70], ], diff --git a/tests/lib/FieldType/SelectionTest.php b/tests/lib/FieldType/SelectionTest.php index 05300261b3..995761b532 100644 --- a/tests/lib/FieldType/SelectionTest.php +++ b/tests/lib/FieldType/SelectionTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/tests/lib/FieldType/StringLengthValidatorTest.php b/tests/lib/FieldType/StringLengthValidatorTest.php index 26bfc39b84..c0518e7beb 100644 --- a/tests/lib/FieldType/StringLengthValidatorTest.php +++ b/tests/lib/FieldType/StringLengthValidatorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Contracts\Core\FieldType\ValidationError; @@ -42,7 +43,7 @@ protected function getMaxStringLength() */ public function testConstructor() { - $this->assertInstanceOf( + self::assertInstanceOf( Validator::class, new StringLengthValidator() ); @@ -64,8 +65,8 @@ public function testConstraintsInitializeGet() $validator->initializeWithConstraints( $constraints ); - $this->assertSame($constraints['minStringLength'], $validator->minStringLength); - $this->assertSame($constraints['maxStringLength'], $validator->maxStringLength); + self::assertSame($constraints['minStringLength'], $validator->minStringLength); + self::assertSame($constraints['maxStringLength'], $validator->maxStringLength); } /** @@ -86,7 +87,7 @@ public function testGetConstraintsSchema() ], ]; $validator = new StringLengthValidator(); - $this->assertSame($constraintsSchema, $validator->getConstraintsSchema()); + self::assertSame($constraintsSchema, $validator->getConstraintsSchema()); } /** @@ -104,8 +105,8 @@ public function testConstraintsSetGet() $validator = new StringLengthValidator(); $validator->minStringLength = $constraints['minStringLength']; $validator->maxStringLength = $constraints['maxStringLength']; - $this->assertSame($constraints['minStringLength'], $validator->minStringLength); - $this->assertSame($constraints['maxStringLength'], $validator->maxStringLength); + self::assertSame($constraints['minStringLength'], $validator->minStringLength); + self::assertSame($constraints['maxStringLength'], $validator->maxStringLength); } /** @@ -156,6 +157,7 @@ public function testGetBadConstraint() * Tests validating a correct value. * * @dataProvider providerForValidateOK + * * @covers \Ibexa\Core\FieldType\Validator\StringLengthValidator::validate * @covers \Ibexa\Core\FieldType\Validator::getMessage */ @@ -164,8 +166,8 @@ public function testValidateCorrectValues($value) $validator = new StringLengthValidator(); $validator->minStringLength = 5; $validator->maxStringLength = 10; - $this->assertTrue($validator->validate(new TextLineValue($value))); - $this->assertSame([], $validator->getMessage()); + self::assertTrue($validator->validate(new TextLineValue($value))); + self::assertSame([], $validator->getMessage()); } public function providerForValidateOK() @@ -182,6 +184,7 @@ public function providerForValidateOK() * Tests validating a wrong value. * * @dataProvider providerForValidateKO + * * @covers \Ibexa\Core\FieldType\Validator\StringLengthValidator::validate */ public function testValidateWrongValues($value, $messageSingular, $messagePlural, $values) @@ -189,26 +192,26 @@ public function testValidateWrongValues($value, $messageSingular, $messagePlural $validator = new StringLengthValidator(); $validator->minStringLength = $this->getMinStringLength(); $validator->maxStringLength = $this->getMaxStringLength(); - $this->assertFalse($validator->validate(new TextLineValue($value))); + self::assertFalse($validator->validate(new TextLineValue($value))); $messages = $validator->getMessage(); - $this->assertCount(1, $messages); - $this->assertInstanceOf( + self::assertCount(1, $messages); + self::assertInstanceOf( ValidationError::class, $messages[0] ); - $this->assertInstanceOf( + self::assertInstanceOf( Plural::class, $messages[0]->getTranslatableMessage() ); - $this->assertEquals( + self::assertEquals( $messageSingular, $messages[0]->getTranslatableMessage()->singular ); - $this->assertEquals( + self::assertEquals( $messagePlural, $messages[0]->getTranslatableMessage()->plural ); - $this->assertEquals( + self::assertEquals( $values, $messages[0]->getTranslatableMessage()->values ); @@ -248,13 +251,14 @@ public function providerForValidateKO() * Tests validation of constraints. * * @dataProvider providerForValidateConstraintsOK + * * @covers \Ibexa\Core\FieldType\Validator\FileSizeValidator::validateConstraints */ public function testValidateConstraintsCorrectValues($constraints) { $validator = new StringLengthValidator(); - $this->assertEmpty( + self::assertEmpty( $validator->validateConstraints($constraints) ); } @@ -294,6 +298,7 @@ public function providerForValidateConstraintsOK() * Tests validation of constraints. * * @dataProvider providerForValidateConstraintsKO + * * @covers \Ibexa\Core\FieldType\Validator\FileSizeValidator::validateConstraints */ public function testValidateConstraintsWrongValues($constraints, $expectedMessages, $values) @@ -302,15 +307,15 @@ public function testValidateConstraintsWrongValues($constraints, $expectedMessag $messages = $validator->validateConstraints($constraints); foreach ($expectedMessages as $index => $expectedMessage) { - $this->assertInstanceOf( + self::assertInstanceOf( Message::class, $messages[0]->getTranslatableMessage() ); - $this->assertEquals( + self::assertEquals( $expectedMessage, $messages[$index]->getTranslatableMessage()->message ); - $this->assertEquals( + self::assertEquals( $values[$index], $messages[$index]->getTranslatableMessage()->values ); diff --git a/tests/lib/FieldType/TextBlockTest.php b/tests/lib/FieldType/TextBlockTest.php index c2fc16a2d5..7881c12199 100644 --- a/tests/lib/FieldType/TextBlockTest.php +++ b/tests/lib/FieldType/TextBlockTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; diff --git a/tests/lib/FieldType/TextLineTest.php b/tests/lib/FieldType/TextLineTest.php index 0a903c134c..29c74be735 100644 --- a/tests/lib/FieldType/TextLineTest.php +++ b/tests/lib/FieldType/TextLineTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; diff --git a/tests/lib/FieldType/TimeTest.php b/tests/lib/FieldType/TimeTest.php index 816baa4607..3848387317 100644 --- a/tests/lib/FieldType/TimeTest.php +++ b/tests/lib/FieldType/TimeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use DateTime; diff --git a/tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php b/tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php index 508b892a58..0ca25eabab 100644 --- a/tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php +++ b/tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType\Url\Gateway; use Ibexa\Core\FieldType\Url\UrlStorage\Gateway; @@ -24,7 +25,7 @@ public function testGetIdUrlMap() $gateway = $this->getStorageGateway(); - $this->assertEquals( + self::assertEquals( [ 23 => '/content/view/sitemap/2', 24 => '/content/view/tagcloud/2', @@ -44,7 +45,7 @@ public function testGetUrlIdMap() $gateway = $this->getStorageGateway(); - $this->assertEquals( + self::assertEquals( [ '/content/view/sitemap/2' => 23, '/content/view/tagcloud/2' => 24, @@ -96,13 +97,13 @@ public function testInsertUrl() ], ]; - $this->assertGreaterThanOrEqual($time, $result[0]['created']); - $this->assertGreaterThanOrEqual($time, $result[0]['modified']); + self::assertGreaterThanOrEqual($time, $result[0]['created']); + self::assertGreaterThanOrEqual($time, $result[0]['modified']); unset($result[0]['created']); unset($result[0]['modified']); - $this->assertEquals($expected, $result); + self::assertEquals($expected, $result); } /** @@ -139,7 +140,7 @@ public function testLinkUrl() ], ]; - $this->assertEquals($expected, $result); + self::assertEquals($expected, $result); } /** @@ -169,7 +170,7 @@ public function testUnlinkUrl() ], ]; - $this->assertEquals($expected, $result); + self::assertEquals($expected, $result); // Check that orphaned URLs are correctly removed $query = $this->connection->createQueryBuilder(); @@ -191,7 +192,7 @@ public function testUnlinkUrl() ], ]; - $this->assertEquals($expected, $result); + self::assertEquals($expected, $result); } protected function getStorageGateway(): Gateway diff --git a/tests/lib/FieldType/Url/UrlStorageTest.php b/tests/lib/FieldType/Url/UrlStorageTest.php index 84e52ed981..ece7509cf8 100644 --- a/tests/lib/FieldType/Url/UrlStorageTest.php +++ b/tests/lib/FieldType/Url/UrlStorageTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType\Url; use Ibexa\Contracts\Core\FieldType\StorageGatewayInterface; @@ -24,18 +25,18 @@ public function testStoreFieldDataWithExistingUrl() $gateway = $this->getGatewayMock(); $gateway - ->expects($this->once()) + ->expects(self::once()) ->method('getUrlIdMap') ->with(['http://ibexa.co']) - ->will($this->returnValue(['http://ibexa.co' => 12])); + ->will(self::returnValue(['http://ibexa.co' => 12])); $gateway - ->expects($this->once()) + ->expects(self::once()) ->method('linkUrl') ->with(12, 42, 24); $gateway - ->expects($this->once()) + ->expects(self::once()) ->method('unlinkUrl') ->with( 42, @@ -46,8 +47,8 @@ public function testStoreFieldDataWithExistingUrl() $storage = $this->getPartlyMockedStorage($gateway); $result = $storage->storeFieldData($versionInfo, $field, $this->getContext()); - $this->assertTrue($result); - $this->assertEquals(12, $field->value->data['urlId']); + self::assertTrue($result); + self::assertEquals(12, $field->value->data['urlId']); } public function testStoreFieldDataWithNewUrl() @@ -58,24 +59,24 @@ public function testStoreFieldDataWithNewUrl() $gateway = $this->getGatewayMock(); $gateway - ->expects($this->once()) + ->expects(self::once()) ->method('getUrlIdMap') ->with(['http://ibexa.co']) - ->will($this->returnValue([])); + ->will(self::returnValue([])); $gateway - ->expects($this->once()) + ->expects(self::once()) ->method('insertUrl') ->with('http://ibexa.co') - ->will($this->returnValue(12)); + ->will(self::returnValue(12)); $gateway - ->expects($this->once()) + ->expects(self::once()) ->method('linkUrl') ->with(12, 42, 24); $gateway - ->expects($this->once()) + ->expects(self::once()) ->method('unlinkUrl') ->with( 42, @@ -86,8 +87,8 @@ public function testStoreFieldDataWithNewUrl() $storage = $this->getPartlyMockedStorage($gateway); $result = $storage->storeFieldData($versionInfo, $field, $this->getContext()); - $this->assertTrue($result); - $this->assertEquals(12, $field->value->data['urlId']); + self::assertTrue($result); + self::assertEquals(12, $field->value->data['urlId']); } public function testStoreFieldDataWithEmptyUrl() @@ -98,26 +99,26 @@ public function testStoreFieldDataWithEmptyUrl() $gateway = $this->getGatewayMock(); $gateway - ->expects($this->never()) + ->expects(self::never()) ->method('getUrlIdMap'); $gateway - ->expects($this->never()) + ->expects(self::never()) ->method('insertUrl'); $gateway - ->expects($this->never()) + ->expects(self::never()) ->method('linkUrl'); $gateway - ->expects($this->never()) + ->expects(self::never()) ->method('unlinkUrl'); $storage = $this->getPartlyMockedStorage($gateway); $result = $storage->storeFieldData($versionInfo, $field, $this->getContext()); - $this->assertFalse($result); - $this->assertNull($field->value->data); + self::assertFalse($result); + self::assertNull($field->value->data); } public function testGetFieldData() @@ -128,15 +129,15 @@ public function testGetFieldData() $gateway = $this->getGatewayMock(); $gateway - ->expects($this->once()) + ->expects(self::once()) ->method('getIdUrlMap') ->with([12]) - ->will($this->returnValue([12 => 'http://ibexa.co'])); + ->will(self::returnValue([12 => 'http://ibexa.co'])); $storage = $this->getPartlyMockedStorage($gateway); $storage->getFieldData($versionInfo, $field, $this->getContext()); - $this->assertEquals('http://ibexa.co', $field->value->externalData); + self::assertEquals('http://ibexa.co', $field->value->externalData); } public function testGetFieldDataNotFound() @@ -147,21 +148,21 @@ public function testGetFieldDataNotFound() $gateway = $this->getGatewayMock(); $gateway - ->expects($this->once()) + ->expects(self::once()) ->method('getIdUrlMap') ->with([12]) - ->will($this->returnValue([])); + ->will(self::returnValue([])); $storage = $this->getPartlyMockedStorage($gateway); $logger = $this->getLoggerMock(); $logger - ->expects($this->once()) + ->expects(self::once()) ->method('error') ->with("URL with ID '12' not found"); $storage->getFieldData($versionInfo, $field, $this->getContext()); - $this->assertEquals('', $field->value->externalData); + self::assertEquals('', $field->value->externalData); } public function testGetFieldDataWithEmptyUrlId() @@ -172,18 +173,18 @@ public function testGetFieldDataWithEmptyUrlId() $gateway = $this->getGatewayMock(); $gateway - ->expects($this->never()) + ->expects(self::never()) ->method('getIdUrlMap'); $logger = $this->getLoggerMock(); $logger - ->expects($this->never()) + ->expects(self::never()) ->method('error'); $storage = $this->getPartlyMockedStorage($gateway); $storage->getFieldData($versionInfo, $field, $this->getContext()); - $this->assertNull($field->value->externalData); + self::assertNull($field->value->externalData); } public function testDeleteFieldData() @@ -194,7 +195,7 @@ public function testDeleteFieldData() foreach ($fieldIds as $index => $id) { $gateway - ->expects($this->at($index)) + ->expects(self::at($index)) ->method('unlinkUrl') ->with($id, 24); } @@ -207,7 +208,7 @@ public function testHasFieldData() { $storage = $this->getPartlyMockedStorage($this->getGatewayMock()); - $this->assertTrue($storage->hasFieldData()); + self::assertTrue($storage->hasFieldData()); } /** diff --git a/tests/lib/FieldType/UrlTest.php b/tests/lib/FieldType/UrlTest.php index 4545043abd..e17e365926 100644 --- a/tests/lib/FieldType/UrlTest.php +++ b/tests/lib/FieldType/UrlTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; diff --git a/tests/lib/FieldType/UserTest.php b/tests/lib/FieldType/UserTest.php index 7381fde02e..38555de353 100644 --- a/tests/lib/FieldType/UserTest.php +++ b/tests/lib/FieldType/UserTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\FieldType; use DateTimeImmutable; @@ -361,7 +362,7 @@ public function testValidate( if (null !== $loadByLoginBehaviorCallback) { $loadByLoginBehaviorCallback( $userHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadByLogin') ->with($userValue->login) ); @@ -404,7 +405,7 @@ public function testInvalidLoginFormat(): void $userHandlerMock = $this->createMock(UserHandler::class); $userHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadByLogin') ->with($validateUserValue->login) ->willThrowException(new NotFoundException('', '')); @@ -451,7 +452,7 @@ public function testValidLoginFormat(): void $userHandlerMock = $this->createMock(UserHandler::class); $userHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadByLogin') ->with($validateUserValue->login) ->willThrowException(new NotFoundException('', '')); @@ -497,13 +498,13 @@ public function testEmailAlreadyTaken(): void $userHandlerMock = $this->createMock(UserHandler::class); $userHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadByLogin') ->with($validateUserValue->login) ->willThrowException(new NotFoundException('', '')); $userHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadByEmail') ->with($validateUserValue->email) ->willReturn($existingUser); @@ -624,13 +625,13 @@ public function testEmailFreeToUse(): void $userHandlerMock = $this->createMock(UserHandler::class); $userHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadByLogin') ->with($validateUserValue->login) ->willThrowException(new NotFoundException('', '')); $userHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadByEmail') ->with($validateUserValue->email) ->willThrowException(new NotFoundException('', '')); diff --git a/tests/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoaderTest.php b/tests/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoaderTest.php index 8600adae39..b434f052ac 100644 --- a/tests/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoaderTest.php +++ b/tests/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoaderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Helper\ContentInfoLocationLoader; use Ibexa\Contracts\Core\Persistence\User\Handler as SPIUserHandler; @@ -36,7 +37,7 @@ public function testLoadLocationNoMainLocation() $contentInfo = new ContentInfo(); $this->getLocationServiceMock() - ->expects($this->never()) + ->expects(self::never()) ->method('loadLocation'); $this->loader->loadLocation($contentInfo); @@ -48,22 +49,22 @@ public function testLoadLocation() $location = new Location(); $this->getRepositoryMock() - ->expects($this->any()) + ->expects(self::any()) ->method('getPermissionResolver') - ->will($this->returnValue($this->getPermissionResolverMock())); + ->will(self::returnValue($this->getPermissionResolverMock())); $this->getRepositoryMock() - ->expects($this->any()) + ->expects(self::any()) ->method('getLocationService') - ->will($this->returnValue($this->getLocationServiceMock())); + ->will(self::returnValue($this->getLocationServiceMock())); $this->getLocationServiceMock() - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') ->with(42) - ->will($this->returnValue($location)); + ->will(self::returnValue($location)); - $this->assertSame($location, $this->loader->loadLocation($contentInfo)); + self::assertSame($location, $this->loader->loadLocation($contentInfo)); } public function testLoadLocationError() @@ -74,24 +75,24 @@ public function testLoadLocationError() $location = new Location(); $this->getRepositoryMock() - ->expects($this->any()) + ->expects(self::any()) ->method('getPermissionResolver') - ->will($this->returnValue($this->getPermissionResolverMock())); + ->will(self::returnValue($this->getPermissionResolverMock())); $this->getRepositoryMock() - ->expects($this->any()) + ->expects(self::any()) ->method('getLocationService') - ->will($this->returnValue($this->getLocationServiceMock())); + ->will(self::returnValue($this->getLocationServiceMock())); $this->getLocationServiceMock() - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') ->with(42) ->will( - $this->throwException(new NotFoundException('main location of content', 42)) + self::throwException(new NotFoundException('main location of content', 42)) ); - $this->assertSame($location, $this->loader->loadLocation($contentInfo)); + self::assertSame($location, $this->loader->loadLocation($contentInfo)); } /** diff --git a/tests/lib/Helper/ContentPreviewHelperTest.php b/tests/lib/Helper/ContentPreviewHelperTest.php index c177ece44e..680acd9598 100644 --- a/tests/lib/Helper/ContentPreviewHelperTest.php +++ b/tests/lib/Helper/ContentPreviewHelperTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Helper; use Ibexa\Contracts\Core\Repository\Values\Content\Content as APIContent; @@ -41,20 +42,20 @@ public function testChangeConfigScope() $newSiteAccess = new SiteAccess($newSiteAccessName); $this->siteAccessRouter - ->expects($this->once()) + ->expects(self::once()) ->method('matchByName') - ->with($this->equalTo($newSiteAccessName)) + ->with(self::equalTo($newSiteAccessName)) ->willReturn($newSiteAccess); $event = new ScopeChangeEvent($newSiteAccess); $this->eventDispatcher - ->expects($this->once()) + ->expects(self::once()) ->method('dispatch') - ->with($this->equalTo($event), MVCEvents::CONFIG_SCOPE_CHANGE); + ->with(self::equalTo($event), MVCEvents::CONFIG_SCOPE_CHANGE); $originalSiteAccess = new SiteAccess('foo', 'bar'); $this->previewHelper->setSiteAccess($originalSiteAccess); - $this->assertEquals( + self::assertEquals( $newSiteAccess, $this->previewHelper->changeConfigScope($newSiteAccessName) ); @@ -65,12 +66,12 @@ public function testRestoreConfigScope() $originalSiteAccess = new SiteAccess('foo', 'bar'); $event = new ScopeChangeEvent($originalSiteAccess); $this->eventDispatcher - ->expects($this->once()) + ->expects(self::once()) ->method('dispatch') - ->with($this->equalTo($event), MVCEvents::CONFIG_SCOPE_RESTORE); + ->with(self::equalTo($event), MVCEvents::CONFIG_SCOPE_RESTORE); $this->previewHelper->setSiteAccess($originalSiteAccess); - $this->assertEquals( + self::assertEquals( $originalSiteAccess, $this->previewHelper->restoreConfigScope() ); @@ -81,29 +82,29 @@ public function testPreviewActive() $originalSiteAccess = new SiteAccess('foo', 'bar'); $this->previewHelper->setSiteAccess($originalSiteAccess); - $this->assertFalse($this->previewHelper->isPreviewActive()); + self::assertFalse($this->previewHelper->isPreviewActive()); $this->previewHelper->setPreviewActive(true); - $this->assertTrue($this->previewHelper->isPreviewActive()); + self::assertTrue($this->previewHelper->isPreviewActive()); $this->previewHelper->setPreviewActive(false); - $this->assertFalse($this->previewHelper->isPreviewActive()); + self::assertFalse($this->previewHelper->isPreviewActive()); self::assertNotSame($originalSiteAccess, $this->previewHelper->getOriginalSiteAccess()); } public function testPreviewedContent() { - $this->assertNull($this->previewHelper->getPreviewedContent()); + self::assertNull($this->previewHelper->getPreviewedContent()); $content = $this->createMock(APIContent::class); $this->previewHelper->setPreviewedContent($content); - $this->assertSame($content, $this->previewHelper->getPreviewedContent()); + self::assertSame($content, $this->previewHelper->getPreviewedContent()); } public function testPreviewedLocation() { - $this->assertNull($this->previewHelper->getPreviewedLocation()); + self::assertNull($this->previewHelper->getPreviewedLocation()); $location = $this->createMock(APILocation::class); $this->previewHelper->setPreviewedLocation($location); - $this->assertSame($location, $this->previewHelper->getPreviewedLocation()); + self::assertSame($location, $this->previewHelper->getPreviewedLocation()); } } diff --git a/tests/lib/Helper/FieldHelperTest.php b/tests/lib/Helper/FieldHelperTest.php index 6fa0830a6d..6383b30914 100644 --- a/tests/lib/Helper/FieldHelperTest.php +++ b/tests/lib/Helper/FieldHelperTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Helper; use Ibexa\Contracts\Core\Repository\ContentTypeService; @@ -49,10 +50,10 @@ public function testIsFieldEmpty() $contentInfo = new ContentInfo(['contentTypeId' => $contentTypeId]); $content = $this->createMock(APIContent::class); $content - ->expects($this->any()) + ->expects(self::any()) ->method('__get') ->with('contentInfo') - ->will($this->returnValue($contentInfo)); + ->will(self::returnValue($contentInfo)); $fieldDefIdentifier = 'my_field_definition'; $textLineFT = new TextLineType(); @@ -64,29 +65,29 @@ public function testIsFieldEmpty() ->setConstructorArgs([['fieldTypeIdentifier' => 'ezstring']]) ->getMockForAbstractClass(); $contentType - ->expects($this->once()) + ->expects(self::once()) ->method('getFieldDefinition') ->with($fieldDefIdentifier) - ->will($this->returnValue($fieldDefinition)); + ->will(self::returnValue($fieldDefinition)); $content - ->expects($this->any()) + ->expects(self::any()) ->method('getContentType') ->willReturn($contentType); $this->translationHelper - ->expects($this->once()) + ->expects(self::once()) ->method('getTranslatedField') ->with($content, $fieldDefIdentifier) - ->will($this->returnValue($emptyField)); + ->will(self::returnValue($emptyField)); $this->fieldTypeServiceMock - ->expects($this->any()) + ->expects(self::any()) ->method('getFieldType') ->with('ezstring') - ->will($this->returnValue(new FieldType($textLineFT))); + ->will(self::returnValue(new FieldType($textLineFT))); - $this->assertTrue($this->fieldHelper->isFieldEmpty($content, $fieldDefIdentifier)); + self::assertTrue($this->fieldHelper->isFieldEmpty($content, $fieldDefIdentifier)); } public function testIsFieldNotEmpty() @@ -95,10 +96,10 @@ public function testIsFieldNotEmpty() $contentInfo = new ContentInfo(['contentTypeId' => $contentTypeId]); $content = $this->createMock(APIContent::class); $content - ->expects($this->any()) + ->expects(self::any()) ->method('__get') ->with('contentInfo') - ->will($this->returnValue($contentInfo)); + ->will(self::returnValue($contentInfo)); $fieldDefIdentifier = 'my_field_definition'; $textLineFT = new TextLineType(); @@ -110,29 +111,29 @@ public function testIsFieldNotEmpty() ->setConstructorArgs([['fieldTypeIdentifier' => 'ezstring']]) ->getMockForAbstractClass(); $contentType - ->expects($this->once()) + ->expects(self::once()) ->method('getFieldDefinition') ->with($fieldDefIdentifier) - ->will($this->returnValue($fieldDefinition)); + ->will(self::returnValue($fieldDefinition)); $content - ->expects($this->any()) + ->expects(self::any()) ->method('getContentType') ->willReturn($contentType); $this->translationHelper - ->expects($this->once()) + ->expects(self::once()) ->method('getTranslatedField') ->with($content, $fieldDefIdentifier) - ->will($this->returnValue($emptyField)); + ->will(self::returnValue($emptyField)); $this->fieldTypeServiceMock - ->expects($this->any()) + ->expects(self::any()) ->method('getFieldType') ->with('ezstring') - ->will($this->returnValue(new FieldType($textLineFT))); + ->will(self::returnValue(new FieldType($textLineFT))); - $this->assertFalse($this->fieldHelper->isFieldEmpty($content, $fieldDefIdentifier)); + self::assertFalse($this->fieldHelper->isFieldEmpty($content, $fieldDefIdentifier)); } } diff --git a/tests/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsListTest.php b/tests/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsListTest.php index 18fa357960..ced017d8da 100644 --- a/tests/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsListTest.php +++ b/tests/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsListTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Helper\FieldsGroups; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; @@ -58,7 +59,7 @@ public function testGetFieldGroupWhenFieldDefinitionHasGroup(): void $arrayTranslatorFieldsGroupsList = $this->getArrayTranslatorFieldsGroupsList(); - $this->assertSame( + self::assertSame( $fieldDefinitionMock->fieldGroup, $arrayTranslatorFieldsGroupsList->getFieldGroup($fieldDefinitionMock) ); @@ -70,7 +71,7 @@ public function testGetFieldGroupWhenFieldDefinitionMissingGroup(): void $arrayTranslatorFieldsGroupsList = $this->getArrayTranslatorFieldsGroupsList(); - $this->assertSame( + self::assertSame( self::DEFAULT_GROUP_ID, $arrayTranslatorFieldsGroupsList->getFieldGroup($fieldDefinitionMock) ); @@ -79,9 +80,9 @@ public function testGetFieldGroupWhenFieldDefinitionMissingGroup(): void public function testUsesIdentifierIfNoTranslation(): void { $this->getTranslatorMock() - ->expects($this->any()) + ->expects(self::any()) ->method('trans') - ->will($this->returnArgument(0)); + ->will(self::returnArgument(0)); $list = $this->getArrayTranslatorFieldsGroupsList(); @@ -120,10 +121,10 @@ private function getTranslatorMock(): MockObject private function applyTranslationsForTranslationsMock(): void { $this->getTranslatorMock() - ->expects($this->any()) + ->expects(self::any()) ->method('trans') ->will( - $this->returnValueMap([ + self::returnValueMap([ [self::FIRST_GROUP_ID, [], 'ibexa_fields_groups', null, self::FIRST_GROUP_NAME], [self::SECOND_GROUP_ID, [], 'ibexa_fields_groups', null, self::SECOND_GROUP_NAME], ]) diff --git a/tests/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactoryTest.php b/tests/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactoryTest.php index 89b6aa7b4c..259270903e 100644 --- a/tests/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactoryTest.php +++ b/tests/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactoryTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Helper\FieldsGroups; use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider; @@ -20,14 +21,14 @@ class RepositoryConfigFieldsGroupsListFactoryTest extends TestCase public function testBuild() { $this->getRepositoryConfigMock() - ->expects($this->once()) + ->expects(self::once()) ->method('getRepositoryConfig') ->willReturn(['fields_groups' => ['list' => ['group_a', 'group_b'], 'default' => 'group_a']]); $this->getTranslatorMock() - ->expects($this->any()) + ->expects(self::any()) ->method('trans') - ->will($this->returnArgument(0)); + ->will(self::returnArgument(0)); $factory = new RepositoryConfigFieldsGroupsListFactory($this->getRepositoryConfigMock()); $list = $factory->build($this->getTranslatorMock()); diff --git a/tests/lib/Helper/PreviewLocationProviderTest.php b/tests/lib/Helper/PreviewLocationProviderTest.php index fb8f05d18e..25fb173d1c 100644 --- a/tests/lib/Helper/PreviewLocationProviderTest.php +++ b/tests/lib/Helper/PreviewLocationProviderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Helper; use Ibexa\Contracts\Core\Persistence\Content\Location\Handler as SPILocationHandler; @@ -48,26 +49,26 @@ public function testGetPreviewLocationDraft() $content = $this->getContentMock($contentId); $this->contentService - ->expects($this->once()) + ->expects(self::once()) ->method('loadContent') ->with($contentId) ->willReturn($content); $this->locationService - ->expects($this->never()) + ->expects(self::never()) ->method('loadLocation'); $this->locationHandler - ->expects($this->once()) + ->expects(self::once()) ->method('loadParentLocationsForDraftContent') ->with($contentId) - ->will($this->returnValue([new Location(['id' => $parentLocationId])])); + ->will(self::returnValue([new Location(['id' => $parentLocationId])])); $location = $this->provider->loadMainLocation($contentId); - $this->assertInstanceOf(APILocation::class, $location); - $this->assertSame($content, $location->getContent()); - $this->assertNull($location->id); - $this->assertEquals($parentLocationId, $location->parentLocationId); + self::assertInstanceOf(APILocation::class, $location); + self::assertSame($content, $location->getContent()); + self::assertNull($location->id); + self::assertEquals($parentLocationId, $location->parentLocationId); } public function testGetPreviewLocation() @@ -82,22 +83,22 @@ public function testGetPreviewLocation() ->getMockForAbstractClass(); $this->contentService - ->expects($this->once()) + ->expects(self::once()) ->method('loadContent') ->with($contentId) ->willReturn($content); $this->locationService - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') ->with($locationId) - ->will($this->returnValue($location)); + ->will(self::returnValue($location)); - $this->locationHandler->expects($this->never())->method('loadParentLocationsForDraftContent'); + $this->locationHandler->expects(self::never())->method('loadParentLocationsForDraftContent'); $returnedLocation = $this->provider->loadMainLocation($contentId); - $this->assertSame($location, $returnedLocation); - $this->assertSame($content, $location->getContent()); + self::assertSame($location, $returnedLocation); + self::assertSame($content, $location->getContent()); } public function testGetPreviewLocationNoLocation() @@ -106,20 +107,20 @@ public function testGetPreviewLocationNoLocation() $content = $this->getContentMock($contentId); $this->contentService - ->expects($this->once()) + ->expects(self::once()) ->method('loadContent') ->with($contentId) ->willReturn($content); $this->locationHandler - ->expects($this->once()) + ->expects(self::once()) ->method('loadParentLocationsForDraftContent') ->with($contentId) - ->will($this->returnValue([])); + ->will(self::returnValue([])); - $this->locationHandler->expects($this->never())->method('loadLocationsByContent'); + $this->locationHandler->expects(self::never())->method('loadLocationsByContent'); - $this->assertNull($this->provider->loadMainLocation($contentId)); + self::assertNull($this->provider->loadMainLocation($contentId)); } private function getContentMock(int $contentId, ?int $mainLocationId = null, bool $published = false): Content @@ -131,12 +132,12 @@ private function getContentMock(int $contentId, ?int $mainLocationId = null, boo ]); $versionInfo = $this->createMock(VersionInfo::class); - $versionInfo->expects($this->once()) + $versionInfo->expects(self::once()) ->method('getContentInfo') ->willReturn($contentInfo); $content = $this->createMock(Content::class); - $content->expects($this->once()) + $content->expects(self::once()) ->method('getVersionInfo') ->willReturn($versionInfo); diff --git a/tests/lib/Helper/TranslationHelperTest.php b/tests/lib/Helper/TranslationHelperTest.php index 812f286504..92a32ae3a5 100644 --- a/tests/lib/Helper/TranslationHelperTest.php +++ b/tests/lib/Helper/TranslationHelperTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Helper; use Ibexa\Contracts\Core\Repository\ContentService; @@ -106,12 +107,12 @@ public function testGetTranslatedName(array $prioritizedLanguages, $expectedLoca { $content = $this->generateContent(); $this->configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('languages') - ->will($this->returnValue($prioritizedLanguages)); + ->will(self::returnValue($prioritizedLanguages)); - $this->assertSame($this->translatedNames[$expectedLocale], $this->translationHelper->getTranslatedContentName($content)); + self::assertSame($this->translatedNames[$expectedLocale], $this->translationHelper->getTranslatedContentName($content)); } /** @@ -125,18 +126,18 @@ public function testGetTranslatedNameByContentInfo(array $prioritizedLanguages, $versionInfo = $this->generateVersionInfo(); $contentInfo = new ContentInfo(['id' => 123]); $this->configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('languages') - ->will($this->returnValue($prioritizedLanguages)); + ->will(self::returnValue($prioritizedLanguages)); $this->contentService - ->expects($this->once()) + ->expects(self::once()) ->method('loadVersionInfo') ->with($contentInfo) - ->will($this->returnValue($versionInfo)); + ->will(self::returnValue($versionInfo)); - $this->assertSame($this->translatedNames[$expectedLocale], $this->translationHelper->getTranslatedContentNameByContentInfo($contentInfo)); + self::assertSame($this->translatedNames[$expectedLocale], $this->translationHelper->getTranslatedContentNameByContentInfo($contentInfo)); } public function getTranslatedNameProvider() @@ -155,17 +156,17 @@ public function testGetTranslatedNameByContentInfoForcedLanguage() $versionInfo = $this->generateVersionInfo(); $contentInfo = new ContentInfo(['id' => 123]); $this->configResolver - ->expects($this->never()) + ->expects(self::never()) ->method('getParameter'); $this->contentService - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('loadVersionInfo') ->with($contentInfo) - ->will($this->returnValue($versionInfo)); + ->will(self::returnValue($versionInfo)); - $this->assertSame('My name in english', $this->translationHelper->getTranslatedContentNameByContentInfo($contentInfo, 'eng-GB')); - $this->assertSame('Mon nom en français', $this->translationHelper->getTranslatedContentNameByContentInfo($contentInfo, 'eng-US')); + self::assertSame('My name in english', $this->translationHelper->getTranslatedContentNameByContentInfo($contentInfo, 'eng-GB')); + self::assertSame('Mon nom en français', $this->translationHelper->getTranslatedContentNameByContentInfo($contentInfo, 'eng-US')); } public function testGetTranslatedNameByContentInfoForcedLanguageMainLanguage() @@ -180,14 +181,14 @@ public function testGetTranslatedNameByContentInfoForcedLanguageMainLanguage() ] ); $this->configResolver - ->expects($this->never()) + ->expects(self::never()) ->method('getParameter'); $this->contentService - ->expects($this->never()) + ->expects(self::never()) ->method('loadContentByContentInfo'); - $this->assertSame( + self::assertSame( $name, $this->translationHelper->getTranslatedContentNameByContentInfo($contentInfo, $mainLanguage) ); @@ -197,11 +198,11 @@ public function testGetTranslatedNameForcedLanguage() { $content = $this->generateContent(); $this->configResolver - ->expects($this->never()) + ->expects(self::never()) ->method('getParameter'); - $this->assertSame('My name in english', $this->translationHelper->getTranslatedContentName($content, 'eng-GB')); - $this->assertSame('Mon nom en français', $this->translationHelper->getTranslatedContentName($content, 'eng-US')); + self::assertSame('My name in english', $this->translationHelper->getTranslatedContentName($content, 'eng-GB')); + self::assertSame('Mon nom en français', $this->translationHelper->getTranslatedContentName($content, 'eng-US')); } /** @@ -214,12 +215,12 @@ public function getTranslatedField(array $prioritizedLanguages, $expectedLocale) { $content = $this->generateContent(); $this->configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('languages') - ->will($this->returnValue($prioritizedLanguages)); + ->will(self::returnValue($prioritizedLanguages)); - $this->assertSame($this->translatedFields[$expectedLocale], $this->translationHelper->getTranslatedField($content, 'test')); + self::assertSame($this->translatedFields[$expectedLocale], $this->translationHelper->getTranslatedField($content, 'test')); } public function getTranslatedFieldProvider() @@ -236,10 +237,10 @@ public function getTranslatedFieldProvider() public function testGetTranslationSiteAccessUnkownLanguage() { $this->configResolver - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('getParameter') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['translation_siteaccesses', null, null, []], ['related_siteaccesses', null, null, []], @@ -248,10 +249,10 @@ public function testGetTranslationSiteAccessUnkownLanguage() ); $this->logger - ->expects($this->once()) + ->expects(self::once()) ->method('error'); - $this->assertNull($this->translationHelper->getTranslationSiteAccess('eng-DE')); + self::assertNull($this->translationHelper->getTranslationSiteAccess('eng-DE')); } /** @@ -260,10 +261,10 @@ public function testGetTranslationSiteAccessUnkownLanguage() public function testGetTranslationSiteAccess($language, array $translationSiteAccesses, array $relatedSiteAccesses, $expectedResult) { $this->configResolver - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('getParameter') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['translation_siteaccesses', null, null, $translationSiteAccesses], ['related_siteaccesses', null, null, $relatedSiteAccesses], @@ -271,7 +272,7 @@ public function testGetTranslationSiteAccess($language, array $translationSiteAc ) ); - $this->assertSame($expectedResult, $this->translationHelper->getTranslationSiteAccess($language)); + self::assertSame($expectedResult, $this->translationHelper->getTranslationSiteAccess($language)); } public function getTranslationSiteAccessProvider() @@ -295,10 +296,10 @@ public function getTranslationSiteAccessProvider() public function testGetAvailableLanguagesWithTranslationSiteAccesses() { $this->configResolver - ->expects($this->any()) + ->expects(self::any()) ->method('getParameter') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['translation_siteaccesses', null, null, ['fre', 'esl']], ['related_siteaccesses', null, null, ['fre', 'esl', 'heb']], @@ -310,16 +311,16 @@ public function testGetAvailableLanguagesWithTranslationSiteAccesses() ); $expectedLanguages = ['eng-GB', 'esl-ES', 'fre-FR']; - $this->assertSame($expectedLanguages, $this->translationHelper->getAvailableLanguages()); + self::assertSame($expectedLanguages, $this->translationHelper->getAvailableLanguages()); } public function testGetAvailableLanguagesWithoutTranslationSiteAccesses() { $this->configResolver - ->expects($this->any()) + ->expects(self::any()) ->method('getParameter') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['translation_siteaccesses', null, null, []], ['related_siteaccesses', null, null, ['fre', 'esl', 'heb']], @@ -332,7 +333,7 @@ public function testGetAvailableLanguagesWithoutTranslationSiteAccesses() ); $expectedLanguages = ['eng-GB', 'esl-ES', 'fre-FR', 'heb-IL']; - $this->assertSame($expectedLanguages, $this->translationHelper->getAvailableLanguages()); + self::assertSame($expectedLanguages, $this->translationHelper->getAvailableLanguages()); } } diff --git a/tests/lib/IO/ConfigScopeChangeAwareIOServiceTest.php b/tests/lib/IO/ConfigScopeChangeAwareIOServiceTest.php index 0426a3aa51..1b1bb23b3a 100644 --- a/tests/lib/IO/ConfigScopeChangeAwareIOServiceTest.php +++ b/tests/lib/IO/ConfigScopeChangeAwareIOServiceTest.php @@ -52,7 +52,7 @@ protected function setUp(): void public function testConstructor(): void { $this->innerIOService - ->expects($this->once()) + ->expects(self::once()) ->method('setPrefix') ->with(self::PREFIX) ; @@ -67,7 +67,7 @@ public function testConstructor(): void public function testSetPrefix(): void { $this->innerIOService - ->expects($this->once()) + ->expects(self::once()) ->method('setPrefix') ; @@ -80,7 +80,7 @@ public function testGetExternalPath(): void $expectedExternalPath = '/example/external/path'; $this->innerIOService - ->expects($this->once()) + ->expects(self::once()) ->method('getExternalPath') ->with($internalId) ->willReturn($expectedExternalPath) @@ -88,7 +88,7 @@ public function testGetExternalPath(): void $externalPath = $this->ioService->getExternalPath($internalId); - $this->assertEquals($expectedExternalPath, $externalPath); + self::assertEquals($expectedExternalPath, $externalPath); } public function testNewBinaryCreateStructFromLocalFile(): void @@ -97,7 +97,7 @@ public function testNewBinaryCreateStructFromLocalFile(): void $localFile = '/path/to/local/file.txt'; $this->innerIOService - ->expects($this->once()) + ->expects(self::once()) ->method('newBinaryCreateStructFromLocalFile') ->with($localFile) ->willReturn($expectedBinaryFileCreateStruct) @@ -105,7 +105,7 @@ public function testNewBinaryCreateStructFromLocalFile(): void $binaryFileCreateStruct = $this->innerIOService->newBinaryCreateStructFromLocalFile($localFile); - $this->assertEquals($expectedBinaryFileCreateStruct, $binaryFileCreateStruct); + self::assertEquals($expectedBinaryFileCreateStruct, $binaryFileCreateStruct); } public function testExists(): void @@ -113,13 +113,13 @@ public function testExists(): void $binaryFileId = 'test-id'; $this->innerIOService - ->expects($this->once()) + ->expects(self::once()) ->method('exists') ->with($binaryFileId) ->willReturn(true) ; - $this->assertTrue($this->innerIOService->exists($binaryFileId)); + self::assertTrue($this->innerIOService->exists($binaryFileId)); } public function testGetInternalPath(): void @@ -128,7 +128,7 @@ public function testGetInternalPath(): void $externalId = 'test-id'; $this->innerIOService - ->expects($this->once()) + ->expects(self::once()) ->method('getInternalPath') ->with($externalId) ->willReturn($expectedInternalPath) @@ -136,7 +136,7 @@ public function testGetInternalPath(): void $internalPath = $this->innerIOService->getInternalPath($externalId); - $this->assertEquals($expectedInternalPath, $internalPath); + self::assertEquals($expectedInternalPath, $internalPath); } public function testLoadBinaryFile(): void @@ -145,7 +145,7 @@ public function testLoadBinaryFile(): void $binaryFileId = 'test-id'; $this->innerIOService - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFile') ->with($binaryFileId) ->willReturn($expectedBinaryFile) @@ -153,7 +153,7 @@ public function testLoadBinaryFile(): void $binaryFile = $this->innerIOService->loadBinaryFile($binaryFileId); - $this->assertEquals($expectedBinaryFile, $binaryFile); + self::assertEquals($expectedBinaryFile, $binaryFile); } public function testLoadBinaryFileByUri(): void @@ -162,7 +162,7 @@ public function testLoadBinaryFileByUri(): void $uri = 'http://example.com/file.pdf'; $this->innerIOService - ->expects($this->once()) + ->expects(self::once()) ->method('loadBinaryFileByUri') ->with($uri) ->willReturn($expectedBinaryFile) @@ -170,7 +170,7 @@ public function testLoadBinaryFileByUri(): void $binaryFile = $this->innerIOService->loadBinaryFileByUri($uri); - $this->assertEquals($expectedBinaryFile, $binaryFile); + self::assertEquals($expectedBinaryFile, $binaryFile); } public function testGetFileContents(): void @@ -179,7 +179,7 @@ public function testGetFileContents(): void $expectedContents = 'test'; $this->innerIOService - ->expects($this->once()) + ->expects(self::once()) ->method('getFileContents') ->with($binaryFile) ->willReturn($expectedContents) @@ -187,7 +187,7 @@ public function testGetFileContents(): void $contents = $this->innerIOService->getFileContents($binaryFile); - $this->assertEquals($expectedContents, $contents); + self::assertEquals($expectedContents, $contents); } public function testCreateBinaryFile(): void @@ -196,7 +196,7 @@ public function testCreateBinaryFile(): void $binaryFileCreateStruct = new BinaryFileCreateStruct(); $this->innerIOService - ->expects($this->once()) + ->expects(self::once()) ->method('createBinaryFile') ->with($binaryFileCreateStruct) ->willReturn($expectedBinaryFile) @@ -204,7 +204,7 @@ public function testCreateBinaryFile(): void $binaryFile = $this->innerIOService->createBinaryFile($binaryFileCreateStruct); - $this->assertEquals($expectedBinaryFile, $binaryFile); + self::assertEquals($expectedBinaryFile, $binaryFile); } public function testGetUri(): void @@ -213,7 +213,7 @@ public function testGetUri(): void $binaryFileId = 'file-id'; $this->innerIOService - ->expects($this->once()) + ->expects(self::once()) ->method('getUri') ->with($binaryFileId) ->willReturn($expectedUri) @@ -221,7 +221,7 @@ public function testGetUri(): void $uri = $this->innerIOService->getUri($binaryFileId); - $this->assertEquals($expectedUri, $uri); + self::assertEquals($expectedUri, $uri); } public function testGetMimeType(): void @@ -230,7 +230,7 @@ public function testGetMimeType(): void $binaryFileId = 'file-id'; $this->innerIOService - ->expects($this->once()) + ->expects(self::once()) ->method('getMimeType') ->with($binaryFileId) ->willReturn($expectedMimeType) @@ -238,7 +238,7 @@ public function testGetMimeType(): void $mimeType = $this->innerIOService->getMimeType($binaryFileId); - $this->assertEquals($expectedMimeType, $mimeType); + self::assertEquals($expectedMimeType, $mimeType); } public function testGetFileInputStream(): void @@ -247,7 +247,7 @@ public function testGetFileInputStream(): void $binaryFile = new BinaryFile(); $this->innerIOService - ->expects($this->once()) + ->expects(self::once()) ->method('getFileInputStream') ->with($binaryFile) ->willReturn($expectedFileInputStream) @@ -255,7 +255,7 @@ public function testGetFileInputStream(): void $fileInputStream = $this->innerIOService->getFileInputStream($binaryFile); - $this->assertEquals($expectedFileInputStream, $fileInputStream); + self::assertEquals($expectedFileInputStream, $fileInputStream); } public function testDeleteBinaryFile(): void @@ -263,7 +263,7 @@ public function testDeleteBinaryFile(): void $binaryFile = new BinaryFile(); $this->innerIOService - ->expects($this->once()) + ->expects(self::once()) ->method('deleteBinaryFile') ->with($binaryFile) ; @@ -283,7 +283,7 @@ public function testNewBinaryCreateStructFromUploadedFile(): void ]; $this->innerIOService - ->expects($this->once()) + ->expects(self::once()) ->method('newBinaryCreateStructFromUploadedFile') ->with($uploadedFile) ->willReturn($expectedBinaryFileCreateStruct) @@ -291,7 +291,7 @@ public function testNewBinaryCreateStructFromUploadedFile(): void $binaryFileCreateStruct = $this->innerIOService->newBinaryCreateStructFromUploadedFile($uploadedFile); - $this->assertEquals($expectedBinaryFileCreateStruct, $binaryFileCreateStruct); + self::assertEquals($expectedBinaryFileCreateStruct, $binaryFileCreateStruct); } public function testDeleteDirectory(): void @@ -299,7 +299,7 @@ public function testDeleteDirectory(): void $path = '/path/to/directory'; $this->innerIOService - ->expects($this->once()) + ->expects(self::once()) ->method('deleteDirectory') ->with($path) ; @@ -311,7 +311,7 @@ public function testOnConfigScopeChange(): void { $event = $this->createMock(ScopeChangeEvent::class); $this->innerIOService - ->expects($this->once()) + ->expects(self::once()) ->method('setPrefix') ->with(self::PREFIX); diff --git a/tests/lib/IO/IOBinarydataHandler/FlysystemTest.php b/tests/lib/IO/IOBinarydataHandler/FlysystemTest.php index 8a790a4cae..c15be33f15 100644 --- a/tests/lib/IO/IOBinarydataHandler/FlysystemTest.php +++ b/tests/lib/IO/IOBinarydataHandler/FlysystemTest.php @@ -42,12 +42,12 @@ public function testCreate(): void $spiBinaryFileCreateStruct->setInputStream($stream); $this->filesystem - ->expects($this->once()) + ->expects(self::once()) ->method('writeStream') ->with( - $this->equalTo($spiBinaryFileCreateStruct->id), - $this->equalTo($stream), - $this->equalTo( + self::equalTo($spiBinaryFileCreateStruct->id), + self::equalTo($stream), + self::equalTo( [ 'mimetype' => 'image/png', 'visibility' => 'public', @@ -62,7 +62,7 @@ public function testCreate(): void public function testDelete() { $this->filesystem - ->expects($this->once()) + ->expects(self::once()) ->method('delete') ->with('prefix/my/file.png'); @@ -74,7 +74,7 @@ public function testDeleteNotFound(): void // Note: technically Flysystem's v2+ Local Adapter silently skips non-existent file $filePath = 'prefix/my/file.png'; $this->filesystem - ->expects($this->once()) + ->expects(self::once()) ->method('delete') ->with($filePath) ->willThrowException(UnableToDeleteFile::atLocation($filePath)); @@ -92,7 +92,7 @@ public function testGetContents(): void $filePath = 'prefix/my/file.png'; $fileContents = 'This is my contents'; $this->filesystem - ->expects($this->once()) + ->expects(self::once()) ->method('read') ->with($filePath) ->willReturn($fileContents); @@ -107,7 +107,7 @@ public function testGetContentsNotFound(): void { $filePath = 'prefix/my/file.png'; $this->filesystem - ->expects($this->once()) + ->expects(self::once()) ->method('read') ->with($filePath) ->willThrowException(UnableToReadFile::fromLocation($filePath)); @@ -125,7 +125,7 @@ public function testGetResource(): void $filePath = 'prefix/my/file.png'; $this->filesystem - ->expects($this->once()) + ->expects(self::once()) ->method('readStream') ->with($filePath) ->willReturn($resource); @@ -143,7 +143,7 @@ public function testGetResourceNotFound(): void { $filePath = 'prefix/my/file.png'; $this->filesystem - ->expects($this->once()) + ->expects(self::once()) ->method('readStream') ->with($filePath) ->willThrowException(UnableToReadFile::fromLocation($filePath)); @@ -163,7 +163,7 @@ public function testGetUri(): void public function testDeleteDirectory(): void { $this->filesystem - ->expects($this->once()) + ->expects(self::once()) ->method('deleteDirectory') ->with('some/path'); diff --git a/tests/lib/IO/IOMetadataHandler/FlysystemTest.php b/tests/lib/IO/IOMetadataHandler/FlysystemTest.php index 9c21d97d74..658f01be74 100644 --- a/tests/lib/IO/IOMetadataHandler/FlysystemTest.php +++ b/tests/lib/IO/IOMetadataHandler/FlysystemTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\IO\IOMetadataHandler; use DateTime; @@ -58,13 +59,13 @@ public function testCreate(): void $spiBinaryFile = $this->handler->create($spiCreateStruct); - $this->assertInstanceOf(SPIBinaryFile::class, $spiBinaryFile); - $this->assertEquals($expectedSpiBinaryFile, $spiBinaryFile); + self::assertInstanceOf(SPIBinaryFile::class, $spiBinaryFile); + self::assertEquals($expectedSpiBinaryFile, $spiBinaryFile); } public function testDelete() { - $this->filesystem->expects($this->never())->method('delete'); + $this->filesystem->expects(self::never())->method('delete'); $this->handler->delete('prefix/my/file.png'); } @@ -90,8 +91,8 @@ public function testLoad(): void $spiBinaryFile = $this->handler->load($filePath); - $this->assertInstanceOf(SPIBinaryFile::class, $spiBinaryFile); - $this->assertEquals($expectedSpiBinaryFile, $spiBinaryFile); + self::assertInstanceOf(SPIBinaryFile::class, $spiBinaryFile); + self::assertEquals($expectedSpiBinaryFile, $spiBinaryFile); } public function testLoadNotFound(): void @@ -114,7 +115,7 @@ public function testLoadNotFound(): void public function testExists(string $filePath, bool $exists): void { $this->filesystem - ->expects($this->once()) + ->expects(self::once()) ->method('fileExists') ->with($filePath) // Note: test proper proxying of Flysystem call as this is a unit test diff --git a/tests/lib/IO/IOMetadataHandler/LegacyDFSClusterTest.php b/tests/lib/IO/IOMetadataHandler/LegacyDFSClusterTest.php index eac55e27d6..418b6e0aef 100644 --- a/tests/lib/IO/IOMetadataHandler/LegacyDFSClusterTest.php +++ b/tests/lib/IO/IOMetadataHandler/LegacyDFSClusterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\IO\IOMetadataHandler; use DateTime; diff --git a/tests/lib/IO/IOServiceTest.php b/tests/lib/IO/IOServiceTest.php index 9035c0f86d..26862fa070 100644 --- a/tests/lib/IO/IOServiceTest.php +++ b/tests/lib/IO/IOServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\IO; use Ibexa\Contracts\Core\IO\BinaryFile as SPIBinaryFile; @@ -90,10 +91,10 @@ public function testNewBinaryCreateStructFromLocalFile() $file = __FILE__; $this->mimeTypeDetectorMock - ->expects($this->once()) + ->expects(self::once()) ->method('getFromPath') - ->with($this->equalTo($file)) - ->will($this->returnValue('text/x-php')); + ->with(self::equalTo($file)) + ->will(self::returnValue('text/x-php')); $binaryCreateStruct = $this->getIOService()->newBinaryCreateStructFromLocalFile( $file @@ -123,10 +124,10 @@ public function testCreateBinaryFile(BinaryFileCreateStruct $createStruct) $spiBinaryFile->mimeType = 'text/x-php'; $this->binarydataHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('create') ->with( - $this->callback( + self::callback( static function ($subject) use ($id) { if (!$subject instanceof SPIBinaryFileCreateStruct) { return false; @@ -138,10 +139,10 @@ static function ($subject) use ($id) { ); $this->metadataHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('create') - ->with($this->callback($this->getSPIBinaryFileCreateStructCallback($id))) - ->will($this->returnValue($spiBinaryFile)); + ->with(self::callback($this->getSPIBinaryFileCreateStructCallback($id))) + ->will(self::returnValue($spiBinaryFile)); $binaryFile = $this->IOService->createBinaryFile($createStruct); self::assertInstanceOf(BinaryFile::class, $binaryFile); @@ -162,10 +163,10 @@ public function testLoadBinaryFile() $spiBinaryFile->uri = $spiId; $this->metadataHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('load') ->with($spiId) - ->will($this->returnValue($spiBinaryFile)); + ->will(self::returnValue($spiBinaryFile)); $binaryFile = $this->getIOService()->loadBinaryFile($id); self::assertEquals($id, $binaryFile->id); @@ -182,16 +183,16 @@ public function testLoadBinaryFileNoMetadataUri() $spiBinaryFile->size = 12345; $this->metadataHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('load') ->with($spiId) - ->will($this->returnValue($spiBinaryFile)); + ->will(self::returnValue($spiBinaryFile)); $this->binarydataHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('getUri') ->with($spiId) - ->will($this->returnValue("/$spiId")); + ->will(self::returnValue("/$spiId")); $binaryFile = $this->getIOService()->loadBinaryFile($id); @@ -223,16 +224,16 @@ public function testLoadBinaryFileByUri() $spiBinaryFile->uri = $spiId; $this->binarydataHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('getIdFromUri') ->with($spiId) - ->will($this->returnValue($spiId)); + ->will(self::returnValue($spiId)); $this->metadataHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('load') ->with($spiId) - ->will($this->returnValue($spiBinaryFile)); + ->will(self::returnValue($spiBinaryFile)); $binaryFile = $this->getIOService()->loadBinaryFileByUri($spiId); self::assertEquals($id, $binaryFile->id); @@ -266,10 +267,10 @@ public function testGetFileContents(BinaryFile $binaryFile) $expectedContents = file_get_contents(__FILE__); $this->binarydataHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('getContents') - ->with($this->equalTo($this->getPrefixedUri($binaryFile->id))) - ->will($this->returnValue($expectedContents)); + ->with(self::equalTo($this->getPrefixedUri($binaryFile->id))) + ->will(self::returnValue($expectedContents)); self::assertEquals( $expectedContents, @@ -283,10 +284,10 @@ public function testGetFileContents(BinaryFile $binaryFile) public function testExists(BinaryFile $binaryFile) { $this->metadataHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('exists') - ->with($this->equalTo($this->getPrefixedUri($binaryFile->id))) - ->will($this->returnValue(true)); + ->with(self::equalTo($this->getPrefixedUri($binaryFile->id))) + ->will(self::returnValue(true)); self::assertTrue( $this->getIOService()->exists( @@ -298,10 +299,10 @@ public function testExists(BinaryFile $binaryFile) public function testExistsNot() { $this->metadataHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('exists') - ->with($this->equalTo($this->getPrefixedUri(__METHOD__))) - ->will($this->returnValue(false)); + ->with(self::equalTo($this->getPrefixedUri(__METHOD__))) + ->will(self::returnValue(false)); self::assertFalse( $this->getIOService()->exists( @@ -316,10 +317,10 @@ public function testExistsNot() public function testGetMimeType(BinaryFile $binaryFile) { $this->metadataHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('getMimeType') - ->with($this->equalTo($this->getPrefixedUri($binaryFile->id))) - ->will($this->returnValue($binaryFile->mimeType)); + ->with(self::equalTo($this->getPrefixedUri($binaryFile->id))) + ->will(self::returnValue($binaryFile->mimeType)); self::assertEquals( $binaryFile->mimeType, @@ -335,14 +336,14 @@ public function testGetMimeType(BinaryFile $binaryFile) public function testDeleteBinaryFile(BinaryFile $binaryFile) { $this->metadataHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('delete') - ->with($this->equalTo($this->getPrefixedUri($binaryFile->id))); + ->with(self::equalTo($this->getPrefixedUri($binaryFile->id))); $this->binarydataHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('delete') - ->with($this->equalTo($this->getPrefixedUri($binaryFile->id))); + ->with(self::equalTo($this->getPrefixedUri($binaryFile->id))); $this->getIOService()->deleteBinaryFile($binaryFile); } @@ -353,12 +354,12 @@ public function testDeleteDirectory() $spiId = $this->getPrefixedUri($id); $this->binarydataHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('deleteDirectory') ->with($spiId); $this->metadataHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('deleteDirectory') ->with($spiId); @@ -415,10 +416,10 @@ protected function loadBinaryFileNotFound() $id = 'id.ext'; $prefixedUri = $this->getPrefixedUri($id); $this->metadataHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('load') ->with($prefixedUri) - ->will($this->throwException(new BinaryFileNotFoundException($prefixedUri))); + ->will(self::throwException(new BinaryFileNotFoundException($prefixedUri))); return $this->getIOService()->loadBinaryFile($id); } @@ -431,10 +432,10 @@ protected function deleteBinaryFileNotFound(): void $prefixedId = $this->getPrefixedUri($binaryFile->id); $this->metadataHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('delete') - ->with($this->equalTo($prefixedId)) - ->will($this->throwException(new BinaryFileNotFoundException($prefixedId))); + ->with(self::equalTo($prefixedId)) + ->will(self::throwException(new BinaryFileNotFoundException($prefixedId))); $this->getIOService()->deleteBinaryFile($binaryFile); } @@ -451,16 +452,16 @@ protected function loadBinaryFileByUriNotFound() $spiId = $this->getPrefixedUri($id); $this->binarydataHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('getIdFromUri') ->with($spiId) - ->will($this->returnValue($spiId)); + ->will(self::returnValue($spiId)); $this->metadataHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('load') ->with($spiId) - ->will($this->throwException(new BinaryFileNotFoundException($spiId))); + ->will(self::throwException(new BinaryFileNotFoundException($spiId))); return $this->getIOService()->loadBinaryFileByUri($spiId); } diff --git a/tests/lib/IO/MetadataHandler/ImageSizeTest.php b/tests/lib/IO/MetadataHandler/ImageSizeTest.php index 69d113660b..5996935050 100644 --- a/tests/lib/IO/MetadataHandler/ImageSizeTest.php +++ b/tests/lib/IO/MetadataHandler/ImageSizeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\IO\MetadataHandler; use Ibexa\Core\IO\MetadataHandler\ImageSize as ImageSizeMetadataHandler; diff --git a/tests/lib/IO/MimeTypeDetector/FileInfoTest.php b/tests/lib/IO/MimeTypeDetector/FileInfoTest.php index 57d5d46434..6a0da3d0c4 100644 --- a/tests/lib/IO/MimeTypeDetector/FileInfoTest.php +++ b/tests/lib/IO/MimeTypeDetector/FileInfoTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\IO\MimeTypeDetector; use Ibexa\Core\IO\MimeTypeDetector\FileInfo as MimeTypeDetector; diff --git a/tests/lib/IO/TolerantIOServiceTest.php b/tests/lib/IO/TolerantIOServiceTest.php index 18cf68efce..cf3323dd0a 100644 --- a/tests/lib/IO/TolerantIOServiceTest.php +++ b/tests/lib/IO/TolerantIOServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\IO; use Ibexa\Core\IO\TolerantIOService; @@ -42,10 +43,10 @@ public function testCreateMissingBinaryFile() $prefixedUri = $this->getPrefixedUri($id); $this->binarydataHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('getUri') ->with($prefixedUri) - ->will($this->returnValue("/$prefixedUri")); + ->will(self::returnValue("/$prefixedUri")); $binaryFile = parent::loadBinaryFileNotFound(); self::assertEquals( diff --git a/tests/lib/IO/UrlRedecoratorTest.php b/tests/lib/IO/UrlRedecoratorTest.php index fe5a278df0..81fd3d9545 100644 --- a/tests/lib/IO/UrlRedecoratorTest.php +++ b/tests/lib/IO/UrlRedecoratorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\IO; use Ibexa\Core\IO\UrlDecorator; @@ -32,16 +33,16 @@ protected function setUp(): void public function testRedecorateFromSource() { $this->sourceDecoratorMock - ->expects($this->once()) + ->expects(self::once()) ->method('undecorate') ->with('http://static.example.com/images/file.png') - ->will($this->returnValue('images/file.png')); + ->will(self::returnValue('images/file.png')); $this->targetDecoratorMock - ->expects($this->once()) + ->expects(self::once()) ->method('decorate') ->with('images/file.png') - ->will($this->returnValue('/var/test/storage/images/file.png')); + ->will(self::returnValue('/var/test/storage/images/file.png')); self::assertEquals( '/var/test/storage/images/file.png', @@ -52,16 +53,16 @@ public function testRedecorateFromSource() public function testRedecorateFromTarget() { $this->targetDecoratorMock - ->expects($this->once()) + ->expects(self::once()) ->method('undecorate') ->with('/var/test/storage/images/file.png') - ->will($this->returnValue('images/file.png')); + ->will(self::returnValue('images/file.png')); $this->sourceDecoratorMock - ->expects($this->once()) + ->expects(self::once()) ->method('decorate') ->with('images/file.png') - ->will($this->returnValue('http://static.example.com/images/file.png')); + ->will(self::returnValue('http://static.example.com/images/file.png')); self::assertEquals( 'http://static.example.com/images/file.png', diff --git a/tests/lib/Limitation/Base.php b/tests/lib/Limitation/Base.php index 56c6a15434..f48406ec47 100644 --- a/tests/lib/Limitation/Base.php +++ b/tests/lib/Limitation/Base.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Limitation; use Ibexa\Contracts\Core\Persistence\Handler as SPIHandler; diff --git a/tests/lib/Limitation/BlockingLimitationTypeTest.php b/tests/lib/Limitation/BlockingLimitationTypeTest.php index 61d8343fe1..83537108db 100644 --- a/tests/lib/Limitation/BlockingLimitationTypeTest.php +++ b/tests/lib/Limitation/BlockingLimitationTypeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Limitation; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; @@ -44,6 +45,7 @@ public function providerForTestAcceptValue() /** * @dataProvider providerForTestAcceptValue + * * @depends testConstruct * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\BlockingLimitation $limitation @@ -66,6 +68,7 @@ public function providerForTestAcceptValueException() /** * @dataProvider providerForTestAcceptValueException + * * @depends testConstruct * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitation @@ -124,8 +127,8 @@ public function providerForTestValidateError() public function testValidateError(BlockingLimitation $limitation, $errorCount) { $this->getPersistenceMock() - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); // Need to create inline instead of depending on testConstruct() to get correct mock instance $limitationType = $this->testConstruct(); @@ -201,13 +204,13 @@ public function testEvaluate( $userMock = $this->getUserMock(); $userMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $persistenceMock = $this->getPersistenceMock(); $persistenceMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $value = $limitationType->evaluate( $limitation, @@ -249,13 +252,13 @@ public function testEvaluateInvalidArgument( $userMock = $this->getUserMock(); $userMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $persistenceMock = $this->getPersistenceMock(); $persistenceMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $v = $limitationType->evaluate( $limitation, diff --git a/tests/lib/Limitation/ContentTypeLimitationTypeTest.php b/tests/lib/Limitation/ContentTypeLimitationTypeTest.php index 5d3666d391..1719dbcc30 100644 --- a/tests/lib/Limitation/ContentTypeLimitationTypeTest.php +++ b/tests/lib/Limitation/ContentTypeLimitationTypeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Limitation; use Ibexa\Contracts\Core\Limitation\Target\Builder\VersionBuilder; @@ -72,6 +73,7 @@ public function providerForTestAcceptValue() /** * @dataProvider providerForTestAcceptValue + * * @depends testConstruct * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\ContentTypeLimitation $limitation @@ -95,6 +97,7 @@ public function providerForTestAcceptValueException() /** * @dataProvider providerForTestAcceptValueException + * * @depends testConstruct * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitation @@ -128,13 +131,13 @@ public function testValidatePass(ContentTypeLimitation $limitation) { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() - ->expects($this->any()) + ->expects(self::any()) ->method('contentTypeHandler') - ->will($this->returnValue($this->contentTypeHandlerMock)); + ->will(self::returnValue($this->contentTypeHandlerMock)); foreach ($limitation->limitationValues as $key => $value) { $this->contentTypeHandlerMock - ->expects($this->at($key)) + ->expects(self::at($key)) ->method('load') ->with($value); } @@ -169,21 +172,21 @@ public function testValidateError(ContentTypeLimitation $limitation, $errorCount { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() - ->expects($this->any()) + ->expects(self::any()) ->method('contentTypeHandler') - ->will($this->returnValue($this->contentTypeHandlerMock)); + ->will(self::returnValue($this->contentTypeHandlerMock)); foreach ($limitation->limitationValues as $key => $value) { $this->contentTypeHandlerMock - ->expects($this->at($key)) + ->expects(self::at($key)) ->method('load') ->with($value) - ->will($this->throwException(new NotFoundException('contentType', $value))); + ->will(self::throwException(new NotFoundException('contentType', $value))); } } else { $this->getPersistenceMock() - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); } // Need to create inline instead of depending on testConstruct() to get correct mock instance @@ -218,21 +221,21 @@ public function providerForTestEvaluate() $versionInfoMock = $this->createMock(APIVersionInfo::class); $contentMock - ->expects($this->once()) + ->expects(self::once()) ->method('getVersionInfo') - ->will($this->returnValue($versionInfoMock)); + ->will(self::returnValue($versionInfoMock)); $versionInfoMock - ->expects($this->once()) + ->expects(self::once()) ->method('getContentInfo') - ->will($this->returnValue(new ContentInfo(['contentTypeId' => 66]))); + ->will(self::returnValue(new ContentInfo(['contentTypeId' => 66]))); $versionInfoMock2 = $this->createMock(APIVersionInfo::class); $versionInfoMock2 - ->expects($this->once()) + ->expects(self::once()) ->method('getContentInfo') - ->will($this->returnValue(new ContentInfo(['contentTypeId' => 66]))); + ->will(self::returnValue(new ContentInfo(['contentTypeId' => 66]))); return [ // ContentInfo, no access @@ -315,13 +318,13 @@ public function testEvaluate( $userMock = $this->getUserMock(); $userMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $persistenceMock = $this->getPersistenceMock(); $persistenceMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $value = $limitationType->evaluate( $limitation, @@ -370,13 +373,13 @@ public function testEvaluateInvalidArgument( $userMock = $this->getUserMock(); $userMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $persistenceMock = $this->getPersistenceMock(); $persistenceMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $v = $limitationType->evaluate( $limitation, diff --git a/tests/lib/Limitation/LocationLimitationTypeTest.php b/tests/lib/Limitation/LocationLimitationTypeTest.php index 0f130c4727..670c3cb4c9 100644 --- a/tests/lib/Limitation/LocationLimitationTypeTest.php +++ b/tests/lib/Limitation/LocationLimitationTypeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Limitation; use Ibexa\Contracts\Core\Persistence\Content\Location\Handler as SPIHandler; @@ -71,6 +72,7 @@ public function providerForTestAcceptValue() /** * @dataProvider providerForTestAcceptValue + * * @depends testConstruct * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\LocationLimitation $limitation @@ -94,6 +96,7 @@ public function providerForTestAcceptValueException() /** * @dataProvider providerForTestAcceptValueException + * * @depends testConstruct * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitation @@ -127,13 +130,13 @@ public function testValidatePass(LocationLimitation $limitation) { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() - ->expects($this->any()) + ->expects(self::any()) ->method('locationHandler') - ->will($this->returnValue($this->locationHandlerMock)); + ->will(self::returnValue($this->locationHandlerMock)); foreach ($limitation->limitationValues as $key => $value) { $this->locationHandlerMock - ->expects($this->at($key)) + ->expects(self::at($key)) ->method('load') ->with($value); } @@ -168,21 +171,21 @@ public function testValidateError(LocationLimitation $limitation, $errorCount) { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() - ->expects($this->any()) + ->expects(self::any()) ->method('locationHandler') - ->will($this->returnValue($this->locationHandlerMock)); + ->will(self::returnValue($this->locationHandlerMock)); foreach ($limitation->limitationValues as $key => $value) { $this->locationHandlerMock - ->expects($this->at($key)) + ->expects(self::at($key)) ->method('load') ->with($value) - ->will($this->throwException(new NotFoundException('location', $value))); + ->will(self::throwException(new NotFoundException('location', $value))); } } else { $this->getPersistenceMock() - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); } // Need to create inline instead of depending on testConstruct() to get correct mock instance @@ -217,21 +220,21 @@ public function providerForTestEvaluate() $versionInfoMock = $this->createMock(APIVersionInfo::class); $contentMock - ->expects($this->once()) + ->expects(self::once()) ->method('getVersionInfo') - ->will($this->returnValue($versionInfoMock)); + ->will(self::returnValue($versionInfoMock)); $versionInfoMock - ->expects($this->once()) + ->expects(self::once()) ->method('getContentInfo') - ->will($this->returnValue(new ContentInfo(['published' => true]))); + ->will(self::returnValue(new ContentInfo(['published' => true]))); $versionInfoMock2 = $this->createMock(APIVersionInfo::class); $versionInfoMock2 - ->expects($this->once()) + ->expects(self::once()) ->method('getContentInfo') - ->will($this->returnValue(new ContentInfo(['published' => true]))); + ->will(self::returnValue(new ContentInfo(['published' => true]))); return [ // ContentInfo, with targets, no access @@ -348,25 +351,25 @@ public function testEvaluate( $userMock = $this->getUserMock(); $userMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $persistenceMock = $this->getPersistenceMock(); if (empty($persistenceLocations) && $targets !== null) { $persistenceMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); } else { $this->getPersistenceMock() - ->expects($this->once()) + ->expects(self::once()) ->method('locationHandler') - ->will($this->returnValue($this->locationHandlerMock)); + ->will(self::returnValue($this->locationHandlerMock)); $this->locationHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method($object instanceof ContentInfo && $object->published ? 'loadLocationsByContent' : 'loadParentLocationsForDraftContent') ->with($object->id) - ->will($this->returnValue($persistenceLocations)); + ->will(self::returnValue($persistenceLocations)); } $value = $limitationType->evaluate( @@ -433,13 +436,13 @@ public function testEvaluateInvalidArgument( $userMock = $this->getUserMock(); $userMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $persistenceMock = $this->getPersistenceMock(); $persistenceMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $v = $limitationType->evaluate( $limitation, diff --git a/tests/lib/Limitation/MemberOfLimitationTypeTest.php b/tests/lib/Limitation/MemberOfLimitationTypeTest.php index eaad7bbf5b..5aaea11cc8 100644 --- a/tests/lib/Limitation/MemberOfLimitationTypeTest.php +++ b/tests/lib/Limitation/MemberOfLimitationTypeTest.php @@ -130,7 +130,7 @@ public function testValidateError(MemberOfLimitation $limitation, int $errorCoun ->method('loadContentInfo') ->withConsecutive([14], [18]) ->willReturnOnConsecutiveCalls( - $this->throwException(new NotFoundException('UserGroup', 18)), + self::throwException(new NotFoundException('UserGroup', 18)), new ContentInfo() ); @@ -349,6 +349,7 @@ public function providerForTestEvaluate(): array /** * @param \Ibexa\Core\Repository\Values\User\User|\Ibexa\Core\Repository\Values\User\UserRoleAssignment $object + * * @dataProvider providerForTestEvaluateSelfGroup */ public function testEvaluateSelfGroup( diff --git a/tests/lib/Limitation/NewObjectStateLimitationTypeTest.php b/tests/lib/Limitation/NewObjectStateLimitationTypeTest.php index 616646f92d..c6e3907c88 100644 --- a/tests/lib/Limitation/NewObjectStateLimitationTypeTest.php +++ b/tests/lib/Limitation/NewObjectStateLimitationTypeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Limitation; use Ibexa\Contracts\Core\Persistence\Content\ObjectState\Handler as SPIHandler; @@ -69,6 +70,7 @@ public function providerForTestAcceptValue() /** * @dataProvider providerForTestAcceptValue + * * @depends testConstruct * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\NewObjectStateLimitation $limitation @@ -92,6 +94,7 @@ public function providerForTestAcceptValueException() /** * @dataProvider providerForTestAcceptValueException + * * @depends testConstruct * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitation @@ -125,13 +128,13 @@ public function testValidatePass(NewObjectStateLimitation $limitation) { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() - ->expects($this->any()) + ->expects(self::any()) ->method('objectStateHandler') - ->will($this->returnValue($this->objectStateHandlerMock)); + ->will(self::returnValue($this->objectStateHandlerMock)); foreach ($limitation->limitationValues as $key => $value) { $this->objectStateHandlerMock - ->expects($this->at($key)) + ->expects(self::at($key)) ->method('load') ->with($value); } @@ -166,21 +169,21 @@ public function testValidateError(NewObjectStateLimitation $limitation, $errorCo { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() - ->expects($this->any()) + ->expects(self::any()) ->method('objectStateHandler') - ->will($this->returnValue($this->objectStateHandlerMock)); + ->will(self::returnValue($this->objectStateHandlerMock)); foreach ($limitation->limitationValues as $key => $value) { $this->objectStateHandlerMock - ->expects($this->at($key)) + ->expects(self::at($key)) ->method('load') ->with($value) - ->will($this->throwException(new NotFoundException('contentType', $value))); + ->will(self::throwException(new NotFoundException('contentType', $value))); } } else { $this->getPersistenceMock() - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); } // Need to create inline instead of depending on testConstruct() to get correct mock instance @@ -270,13 +273,13 @@ public function testEvaluate( $userMock = $this->getUserMock(); $userMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $persistenceMock = $this->getPersistenceMock(); $persistenceMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $value = $limitationType->evaluate( $limitation, @@ -331,13 +334,13 @@ public function testEvaluateInvalidArgument( $userMock = $this->getUserMock(); $userMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $persistenceMock = $this->getPersistenceMock(); $persistenceMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $v = $limitationType->evaluate( $limitation, diff --git a/tests/lib/Limitation/ObjectStateLimitationTypeTest.php b/tests/lib/Limitation/ObjectStateLimitationTypeTest.php index 3b1273ed90..e4c41c2844 100644 --- a/tests/lib/Limitation/ObjectStateLimitationTypeTest.php +++ b/tests/lib/Limitation/ObjectStateLimitationTypeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Limitation; use Ibexa\Contracts\Core\Persistence\Content\ObjectState; @@ -185,14 +186,14 @@ public function testEvaluate( ->willReturnMap($getContentStateMap); } else { $this->getPersistenceMock() - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); } $userMock = $this->getUserMock(); $userMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); // Need to create inline instead of depending on testConstruct() to get correct mock instance $limitationType = $this->testConstruct(); diff --git a/tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php b/tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php index f58c3ebfba..c21decc634 100644 --- a/tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php +++ b/tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Limitation; use Ibexa\Contracts\Core\Persistence\Content\ContentInfo as SPIContentInfo; @@ -83,6 +84,7 @@ public function providerForTestAcceptValue() /** * @dataProvider providerForTestAcceptValue + * * @depends testConstruct * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\ParentContentTypeLimitation $limitation @@ -107,6 +109,7 @@ public function providerForTestAcceptValueException() /** * @dataProvider providerForTestAcceptValueException + * * @depends testConstruct * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitation @@ -140,16 +143,16 @@ public function testValidatePass(ParentContentTypeLimitation $limitation) { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() - ->expects($this->any()) + ->expects(self::any()) ->method('contentTypeHandler') - ->will($this->returnValue($this->contentTypeHandlerMock)); + ->will(self::returnValue($this->contentTypeHandlerMock)); foreach ($limitation->limitationValues as $key => $value) { $this->contentTypeHandlerMock - ->expects($this->at($key)) + ->expects(self::at($key)) ->method('load') ->with($value) - ->will($this->returnValue(42)); + ->will(self::returnValue(42)); } } @@ -182,21 +185,21 @@ public function testValidateError(ParentContentTypeLimitation $limitation, $erro { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() - ->expects($this->any()) + ->expects(self::any()) ->method('contentTypeHandler') - ->will($this->returnValue($this->contentTypeHandlerMock)); + ->will(self::returnValue($this->contentTypeHandlerMock)); foreach ($limitation->limitationValues as $key => $value) { $this->contentTypeHandlerMock - ->expects($this->at($key)) + ->expects(self::at($key)) ->method('load') ->with($value) - ->will($this->throwException(new NotFoundException('location', $value))); + ->will(self::throwException(new NotFoundException('location', $value))); } } else { $this->getPersistenceMock() - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); } // Need to create inline instead of depending on testConstruct() to get correct mock instance @@ -226,9 +229,9 @@ protected function getTestEvaluateContentMock() $contentMock = $this->createMock(APIContent::class); $contentMock - ->expects($this->once()) + ->expects(self::once()) ->method('getVersionInfo') - ->will($this->returnValue($this->getTestEvaluateVersionInfoMock())); + ->will(self::returnValue($this->getTestEvaluateVersionInfoMock())); return $contentMock; } @@ -238,9 +241,9 @@ protected function getTestEvaluateVersionInfoMock() $versionInfoMock = $this->createMock(APIVersionInfo::class); $versionInfoMock - ->expects($this->once()) + ->expects(self::once()) ->method('getContentInfo') - ->will($this->returnValue(new ContentInfo(['published' => true]))); + ->will(self::returnValue(new ContentInfo(['published' => true]))); return $versionInfoMock; } @@ -447,15 +450,15 @@ public function providerForTestEvaluate() protected function assertContentHandlerExpectations($callNo, $persistenceCalled, $contentId, $contentInfo) { $this->getPersistenceMock() - ->expects($this->at($callNo + ($persistenceCalled ? 1 : 0))) + ->expects(self::at($callNo + ($persistenceCalled ? 1 : 0))) ->method('contentHandler') - ->will($this->returnValue($this->contentHandlerMock)); + ->will(self::returnValue($this->contentHandlerMock)); $this->contentHandlerMock - ->expects($this->at($callNo)) + ->expects(self::at($callNo)) ->method('loadContentInfo') ->with($contentId) - ->will($this->returnValue($contentInfo)); + ->will(self::returnValue($contentInfo)); } /** @@ -473,33 +476,33 @@ public function testEvaluate( $userMock = $this->getUserMock(); $userMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $persistenceMock = $this->getPersistenceMock(); // ContentTypeHandler is never used in evaluate() $persistenceMock - ->expects($this->never()) + ->expects(self::never()) ->method('contentTypeHandler'); if (empty($persistence)) { // Covers API targets, where no additional loading is required $persistenceMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); } elseif (!empty($targets)) { foreach ($targets as $index => $target) { if ($target instanceof LocationCreateStruct) { $this->getPersistenceMock() - ->expects($this->once($index)) + ->expects(self::once($index)) ->method('locationHandler') - ->will($this->returnValue($this->locationHandlerMock)); + ->will(self::returnValue($this->locationHandlerMock)); $this->locationHandlerMock - ->expects($this->at($index)) + ->expects(self::at($index)) ->method('load') ->with($target->parentLocationId) - ->will($this->returnValue($location = $persistence['locations'][$index])); + ->will(self::returnValue($location = $persistence['locations'][$index])); $contentId = $location->contentId; } else { @@ -516,25 +519,25 @@ public function testEvaluate( } else { $this->getPersistenceMock() ->method('locationHandler') - ->will($this->returnValue($this->locationHandlerMock)); + ->will(self::returnValue($this->locationHandlerMock)); $this->getPersistenceMock() ->method('contentHandler') - ->will($this->returnValue($this->contentHandlerMock)); + ->will(self::returnValue($this->contentHandlerMock)); $this->locationHandlerMock ->method( $object instanceof ContentInfo && $object->published ? 'loadLocationsByContent' : 'loadParentLocationsForDraftContent' ) ->with($object->id) - ->will($this->returnValue($persistence['locations'])); + ->will(self::returnValue($persistence['locations'])); foreach ($persistence['locations'] as $location) { if (!empty($persistence['parentLocations'][$location->parentId])) { $this->locationHandlerMock ->method('load') ->with($location->parentId) - ->will($this->returnValue($persistence['parentLocations'][$location->parentId])); + ->will(self::returnValue($persistence['parentLocations'][$location->parentId])); } if (!empty($persistence['parentLocations'][$location->parentId])) { @@ -615,13 +618,13 @@ public function testEvaluateInvalidArgument(Limitation $limitation, ValueObject $userMock = $this->getUserMock(); $userMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $persistenceMock = $this->getPersistenceMock(); $persistenceMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $limitationType->evaluate( $limitation, @@ -653,7 +656,7 @@ public function testGetCriterionInvalidValue(ParentContentTypeLimitationType $li */ public function testValueSchema(ParentContentTypeLimitationType $limitationType) { - $this->markTestIncomplete('Method is not implemented yet: ' . __METHOD__); + self::markTestIncomplete('Method is not implemented yet: ' . __METHOD__); } } diff --git a/tests/lib/Limitation/ParentDepthLimitationTypeTest.php b/tests/lib/Limitation/ParentDepthLimitationTypeTest.php index 6dc9111334..0f4aa0bb00 100644 --- a/tests/lib/Limitation/ParentDepthLimitationTypeTest.php +++ b/tests/lib/Limitation/ParentDepthLimitationTypeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Limitation; use Ibexa\Contracts\Core\Persistence\Content\Location\Handler as SPILocationHandler; @@ -68,6 +69,7 @@ public function providerForTestAcceptValue() /** * @dataProvider providerForTestAcceptValue + * * @depends testConstruct * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\ParentDepthLimitation $limitation @@ -91,6 +93,7 @@ public function providerForTestAcceptValueException() /** * @dataProvider providerForTestAcceptValueException + * * @depends testConstruct * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitation @@ -117,6 +120,7 @@ public function providerForTestValidatePass() /** * @dataProvider providerForTestValidatePass + * * @depends testConstruct * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\ParentDepthLimitation $limitation @@ -155,21 +159,21 @@ public function providerForTestEvaluate() $versionInfoMock = $this->createMock(APIVersionInfo::class); $contentMock - ->expects($this->once()) + ->expects(self::once()) ->method('getVersionInfo') - ->will($this->returnValue($versionInfoMock)); + ->will(self::returnValue($versionInfoMock)); $versionInfoMock - ->expects($this->once()) + ->expects(self::once()) ->method('getContentInfo') - ->will($this->returnValue(new ContentInfo(['published' => true]))); + ->will(self::returnValue(new ContentInfo(['published' => true]))); $versionInfoMock2 = $this->createMock(APIVersionInfo::class); $versionInfoMock2 - ->expects($this->once()) + ->expects(self::once()) ->method('getContentInfo') - ->will($this->returnValue(new ContentInfo(['published' => true]))); + ->will(self::returnValue(new ContentInfo(['published' => true]))); return [ // ContentInfo, with targets, no access @@ -290,42 +294,42 @@ public function testEvaluate( $userMock = $this->getUserMock(); $userMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $persistenceMock = $this->getPersistenceMock(); if (empty($persistenceLocations)) { $persistenceMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); } elseif ($object instanceof ContentCreateStruct) { $this->getPersistenceMock() - ->expects($this->once()) + ->expects(self::once()) ->method('locationHandler') - ->will($this->returnValue($this->locationHandlerMock)); + ->will(self::returnValue($this->locationHandlerMock)); foreach ($targets as $target) { $this->locationHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('load') ->with($target->parentLocationId) - ->will($this->returnValue($persistenceLocations[$target->parentLocationId])); + ->will(self::returnValue($persistenceLocations[$target->parentLocationId])); } } else { $this->getPersistenceMock() - ->expects($this->once()) + ->expects(self::once()) ->method('locationHandler') - ->will($this->returnValue($this->locationHandlerMock)); + ->will(self::returnValue($this->locationHandlerMock)); $this->locationHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method( $object instanceof ContentInfo && $object->published ? 'loadLocationsByContent' : 'loadParentLocationsForDraftContent' ) ->with($object->id) - ->will($this->returnValue($persistenceLocations)); + ->will(self::returnValue($persistenceLocations)); } $value = $limitationType->evaluate( @@ -392,13 +396,13 @@ public function testEvaluateInvalidArgument( $userMock = $this->getUserMock(); $userMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $persistenceMock = $this->getPersistenceMock(); $persistenceMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $v = $limitationType->evaluate( $limitation, diff --git a/tests/lib/Limitation/RoleLimitationTypeTest.php b/tests/lib/Limitation/RoleLimitationTypeTest.php index 1ee992769f..ea6035ea61 100644 --- a/tests/lib/Limitation/RoleLimitationTypeTest.php +++ b/tests/lib/Limitation/RoleLimitationTypeTest.php @@ -144,7 +144,7 @@ public function testValidateError(UserRoleLimitation $limitation, int $errorCoun ->method('loadRole') ->withConsecutive([4, Role::STATUS_DEFINED], [8, Role::STATUS_DEFINED]) ->willReturnOnConsecutiveCalls( - $this->throwException(new NotFoundException('Role', 4)), + self::throwException(new NotFoundException('Role', 4)), new Role() ); diff --git a/tests/lib/Limitation/SectionLimitationTypeTest.php b/tests/lib/Limitation/SectionLimitationTypeTest.php index ef0967c57d..8151ab3cf9 100644 --- a/tests/lib/Limitation/SectionLimitationTypeTest.php +++ b/tests/lib/Limitation/SectionLimitationTypeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Limitation; use Ibexa\Contracts\Core\Limitation\Type as LimitationType; @@ -74,6 +75,7 @@ public function providerForTestAcceptValue() /** * @dataProvider providerForTestAcceptValue + * * @depends testConstruct * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\SectionLimitation $limitation @@ -100,6 +102,7 @@ public function providerForTestAcceptValueException() /** * @dataProvider providerForTestAcceptValueException + * * @depends testConstruct * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitation @@ -133,17 +136,17 @@ public function testValidatePass(SectionLimitation $limitation) { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() - ->expects($this->any()) + ->expects(self::any()) ->method('sectionHandler') - ->will($this->returnValue($this->sectionHandlerMock)); + ->will(self::returnValue($this->sectionHandlerMock)); foreach ($limitation->limitationValues as $key => $value) { $this->sectionHandlerMock - ->expects($this->at($key)) + ->expects(self::at($key)) ->method('load') ->with($value) ->will( - $this->returnValue( + self::returnValue( new SPISection(['id' => $value]) ) ); @@ -179,21 +182,21 @@ public function testValidateError(SectionLimitation $limitation, $errorCount) { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() - ->expects($this->any()) + ->expects(self::any()) ->method('sectionHandler') - ->will($this->returnValue($this->sectionHandlerMock)); + ->will(self::returnValue($this->sectionHandlerMock)); foreach ($limitation->limitationValues as $key => $value) { $this->sectionHandlerMock - ->expects($this->at($key)) + ->expects(self::at($key)) ->method('load') ->with($value) - ->will($this->throwException(new NotFoundException('Section', $value))); + ->will(self::throwException(new NotFoundException('Section', $value))); } } else { $this->getPersistenceMock() - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); } // Need to create inline instead of depending on testConstruct() to get correct mock instance @@ -228,21 +231,21 @@ public function providerForTestEvaluate() $versionInfoMock = $this->createMock(APIVersionInfo::class); $contentMock - ->expects($this->once()) + ->expects(self::once()) ->method('getVersionInfo') - ->will($this->returnValue($versionInfoMock)); + ->will(self::returnValue($versionInfoMock)); $versionInfoMock - ->expects($this->once()) + ->expects(self::once()) ->method('getContentInfo') - ->will($this->returnValue(new ContentInfo(['sectionId' => 2]))); + ->will(self::returnValue(new ContentInfo(['sectionId' => 2]))); $versionInfoMock2 = $this->createMock(APIVersionInfo::class); $versionInfoMock2 - ->expects($this->once()) + ->expects(self::once()) ->method('getContentInfo') - ->will($this->returnValue(new ContentInfo(['sectionId' => 2]))); + ->will(self::returnValue(new ContentInfo(['sectionId' => 2]))); return [ // ContentInfo, with targets, no access @@ -360,12 +363,12 @@ public function testEvaluate( $userMock = $this->getUserMock(); $userMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $this->getPersistenceMock() - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $value = $limitationType->evaluate( $limitation, @@ -407,12 +410,12 @@ public function testEvaluateInvalidArgument( $userMock = $this->getUserMock(); $userMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $this->getPersistenceMock() - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $v = $limitationType->evaluate( $limitation, diff --git a/tests/lib/Limitation/SiteAccessLimitationTypeTest.php b/tests/lib/Limitation/SiteAccessLimitationTypeTest.php index c6d65fb3a8..e62d4bbb96 100644 --- a/tests/lib/Limitation/SiteAccessLimitationTypeTest.php +++ b/tests/lib/Limitation/SiteAccessLimitationTypeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Limitation; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; @@ -81,6 +82,7 @@ public function providerForTestAcceptValue() /** * @depends testConstruct + * * @dataProvider providerForTestAcceptValue * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\SiteAccessLimitation $limitation @@ -104,6 +106,7 @@ public function providerForTestAcceptValueException() /** * @depends testConstruct + * * @dataProvider providerForTestAcceptValueException * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitation @@ -161,6 +164,7 @@ public function providerForTestValidateError() /** * @dataProvider providerForTestValidateError + * * @depends testConstruct * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\SiteAccessLimitation $limitation @@ -217,6 +221,7 @@ public function providerForTestEvaluate() /** * @depends testConstruct + * * @dataProvider providerForTestEvaluate */ public function testEvaluate( @@ -226,7 +231,7 @@ public function testEvaluate( SiteAccessLimitationType $limitationType ) { $userMock = $this->getUserMock(); - $userMock->expects($this->never())->method($this->anything()); + $userMock->expects(self::never())->method(self::anything()); $value = $limitationType->evaluate( $limitation, @@ -259,6 +264,7 @@ public function providerForTestEvaluateInvalidArgument() /** * @depends testConstruct + * * @dataProvider providerForTestEvaluateInvalidArgument */ public function testEvaluateInvalidArgument( @@ -269,7 +275,7 @@ public function testEvaluateInvalidArgument( $this->expectException(InvalidArgumentException::class); $userMock = $this->getUserMock(); - $userMock->expects($this->never())->method($this->anything()); + $userMock->expects(self::never())->method(self::anything()); $limitationType->evaluate( $limitation, diff --git a/tests/lib/Limitation/StatusLimitationTypeTest.php b/tests/lib/Limitation/StatusLimitationTypeTest.php index e4ba35d9ee..983611d0d9 100644 --- a/tests/lib/Limitation/StatusLimitationTypeTest.php +++ b/tests/lib/Limitation/StatusLimitationTypeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Limitation; use Ibexa\Contracts\Core\Persistence\Content\VersionInfo as SPIVersionInfo; @@ -56,6 +57,7 @@ public function providerForTestAcceptValue() /** * @depends testConstruct + * * @dataProvider providerForTestAcceptValue * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\StatusLimitation $limitation @@ -79,6 +81,7 @@ public function providerForTestAcceptValueException() /** * @depends testConstruct + * * @dataProvider providerForTestAcceptValueException * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitation @@ -147,6 +150,7 @@ public function providerForTestValidateError() /** * @dataProvider providerForTestValidateError + * * @depends testConstruct * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\StatusLimitation $limitation @@ -183,13 +187,13 @@ protected function getVersionInfoMock($shouldBeCalled = true) if ($shouldBeCalled) { $versionInfoMock - ->expects($this->once()) + ->expects(self::once()) ->method('__get') ->with('status') - ->will($this->returnValue(24)); + ->will(self::returnValue(24)); } else { $versionInfoMock - ->expects($this->never()) + ->expects(self::never()) ->method('__get') ->with('status'); } @@ -205,9 +209,9 @@ protected function getContentMock() ->getMock(); $contentMock - ->expects($this->once()) + ->expects(self::once()) ->method('getVersionInfo') - ->will($this->returnValue($this->getVersionInfoMock())); + ->will(self::returnValue($this->getVersionInfoMock())); return $contentMock; } @@ -259,6 +263,7 @@ public function providerForTestEvaluate() /** * @depends testConstruct + * * @dataProvider providerForTestEvaluate */ public function testEvaluate( @@ -268,8 +273,8 @@ public function testEvaluate( StatusLimitationType $limitationType ) { $userMock = $this->getUserMock(); - $userMock->expects($this->never()) - ->method($this->anything()); + $userMock->expects(self::never()) + ->method(self::anything()); $userMock = new User(); $value = $limitationType->evaluate( @@ -308,6 +313,7 @@ public function providerForTestEvaluateInvalidArgument() /** * @depends testConstruct + * * @dataProvider providerForTestEvaluateInvalidArgument */ public function testEvaluateInvalidArgument( @@ -318,7 +324,7 @@ public function testEvaluateInvalidArgument( $this->expectException(InvalidArgumentException::class); $userMock = $this->getUserMock(); - $userMock->expects($this->never())->method($this->anything()); + $userMock->expects(self::never())->method(self::anything()); $userMock = new User(); $limitationType->evaluate( diff --git a/tests/lib/Limitation/SubtreeLimitationTypeTest.php b/tests/lib/Limitation/SubtreeLimitationTypeTest.php index a75e17330a..eaeed389f6 100644 --- a/tests/lib/Limitation/SubtreeLimitationTypeTest.php +++ b/tests/lib/Limitation/SubtreeLimitationTypeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Limitation; use Ibexa\Contracts\Core\Limitation\Type as LimitationType; @@ -74,6 +75,7 @@ public function providerForTestAcceptValue() /** * @dataProvider providerForTestAcceptValue + * * @depends testConstruct * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\SubtreeLimitation $limitation @@ -100,6 +102,7 @@ public function providerForTestAcceptValueException() /** * @dataProvider providerForTestAcceptValueException + * * @depends testConstruct * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitation @@ -133,18 +136,18 @@ public function testValidatePass(SubtreeLimitation $limitation) { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() - ->expects($this->any()) + ->expects(self::any()) ->method('locationHandler') - ->will($this->returnValue($this->locationHandlerMock)); + ->will(self::returnValue($this->locationHandlerMock)); foreach ($limitation->limitationValues as $key => $value) { $pathArray = explode('/', trim($value, '/')); $this->locationHandlerMock - ->expects($this->at($key)) + ->expects(self::at($key)) ->method('load') ->with(end($pathArray)) ->will( - $this->returnValue( + self::returnValue( new SPILocation(['pathString' => $value]) ) ); @@ -180,22 +183,22 @@ public function testValidateError(SubtreeLimitation $limitation, $errorCount) { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() - ->expects($this->any()) + ->expects(self::any()) ->method('locationHandler') - ->will($this->returnValue($this->locationHandlerMock)); + ->will(self::returnValue($this->locationHandlerMock)); foreach ($limitation->limitationValues as $key => $value) { $pathArray = explode('/', trim($value, '/')); $this->locationHandlerMock - ->expects($this->at($key)) + ->expects(self::at($key)) ->method('load') ->with(end($pathArray)) - ->will($this->throwException(new NotFoundException('location', $value))); + ->will(self::throwException(new NotFoundException('location', $value))); } } else { $this->getPersistenceMock() - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); } // Need to create inline instead of depending on testConstruct() to get correct mock instance @@ -210,18 +213,18 @@ public function testValidateErrorWrongPath() $limitation = new SubtreeLimitation(['limitationValues' => ['/1/2/42/']]); $this->getPersistenceMock() - ->expects($this->any()) + ->expects(self::any()) ->method('locationHandler') - ->will($this->returnValue($this->locationHandlerMock)); + ->will(self::returnValue($this->locationHandlerMock)); foreach ($limitation->limitationValues as $key => $value) { $pathArray = explode('/', trim($value, '/')); $this->locationHandlerMock - ->expects($this->at($key)) + ->expects(self::at($key)) ->method('load') ->with(end($pathArray)) ->will( - $this->returnValue( + self::returnValue( new SPILocation(['pathString' => '/1/5/42']) ) ); @@ -259,19 +262,19 @@ public function providerForTestEvaluate() $versionInfoMock = $this->createMock(APIVersionInfo::class); $contentMock - ->expects($this->once()) + ->expects(self::once()) ->method('getVersionInfo') - ->will($this->returnValue($versionInfoMock)); + ->will(self::returnValue($versionInfoMock)); $versionInfoMock - ->expects($this->once()) + ->expects(self::once()) ->method('getContentInfo') ->willReturn(new ContentInfo(['published' => true, 'status' => ContentInfo::STATUS_PUBLISHED])); $versionInfoMock2 = $this->createMock(APIVersionInfo::class); $versionInfoMock2 - ->expects($this->once()) + ->expects(self::once()) ->method('getContentInfo') ->willReturn(new ContentInfo(['published' => true, 'status' => ContentInfo::STATUS_PUBLISHED])); @@ -406,38 +409,38 @@ public function testEvaluate( $userMock = $this->getUserMock(); $userMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $persistenceMock = $this->getPersistenceMock(); if (empty($persistenceLocations) && $targets !== null) { $persistenceMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); } elseif ($object instanceof ContentCreateStruct) { foreach ((array)$targets as $key => $target) { $this->getPersistenceMock() - ->expects($this->at($key)) + ->expects(self::at($key)) ->method('locationHandler') - ->will($this->returnValue($this->locationHandlerMock)); + ->will(self::returnValue($this->locationHandlerMock)); $this->locationHandlerMock - ->expects($this->at($key)) + ->expects(self::at($key)) ->method('load') ->with($target->parentLocationId) - ->will($this->returnValue($persistenceLocations[$key])); + ->will(self::returnValue($persistenceLocations[$key])); } } else { $this->getPersistenceMock() - ->expects($this->once()) + ->expects(self::once()) ->method('locationHandler') - ->will($this->returnValue($this->locationHandlerMock)); + ->will(self::returnValue($this->locationHandlerMock)); $this->locationHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method($object instanceof ContentInfo && $object->published ? 'loadLocationsByContent' : 'loadParentLocationsForDraftContent') ->with($object->id) - ->will($this->returnValue($persistenceLocations)); + ->will(self::returnValue($persistenceLocations)); } $value = $limitationType->evaluate( @@ -489,13 +492,13 @@ public function testEvaluateInvalidArgument( $userMock = $this->getUserMock(); $userMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $persistenceMock = $this->getPersistenceMock(); $persistenceMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $v = $limitationType->evaluate( $limitation, diff --git a/tests/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizerTest.php index 49d56afb87..a24608e804 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizerTest.php @@ -30,7 +30,7 @@ public function testNormalization(): void $normalizer = new CompoundMatcherNormalizer(); $normalizer->setSerializer(new SerializerStub()); - $this->assertEquals( + self::assertEquals( [ 'subMatchers' => [ 'foo' => ['data' => 'foo'], @@ -48,8 +48,8 @@ public function testSupportsNormalization(): void { $normalizer = new CompoundMatcherNormalizer(); - $this->assertTrue($normalizer->supportsNormalization($this->createMock(Compound::class))); - $this->assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); + self::assertTrue($normalizer->supportsNormalization($this->createMock(Compound::class))); + self::assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); } public function testSupportsDenormalization(): void @@ -66,8 +66,8 @@ public function testSupportsDenormalization(): void ] ); - $this->assertTrue($normalizer->supportsDenormalization($data, Compound::class, 'json')); - $this->assertFalse($normalizer->supportsDenormalization($data, Matcher::class, 'json')); + self::assertTrue($normalizer->supportsDenormalization($data, Compound::class, 'json')); + self::assertFalse($normalizer->supportsDenormalization($data, Matcher::class, 'json')); } } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/HostElementNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/HostElementNormalizerTest.php index e409df5a27..0776b76a4c 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/HostElementNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/HostElementNormalizerTest.php @@ -27,7 +27,7 @@ public function testNormalization(): void $matcher->setRequest(SimplifiedRequest::fromUrl('http://ibexa.dev/foo/bar')); $matcher->match(); - $this->assertEquals( + self::assertEquals( [ 'elementNumber' => 2, 'hostElements' => [ @@ -43,8 +43,8 @@ public function testSupportsNormalization(): void { $normalizer = new HostElementNormalizer(); - $this->assertTrue($normalizer->supportsNormalization($this->createMock(HostElement::class))); - $this->assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); + self::assertTrue($normalizer->supportsNormalization($this->createMock(HostElement::class))); + self::assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); } } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/HostTextNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/HostTextNormalizerTest.php index ad91c6160b..14efcbde0a 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/HostTextNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/HostTextNormalizerTest.php @@ -26,7 +26,7 @@ public function testNormalize(): void 'suffix' => 'bar', ]); - $this->assertEquals( + self::assertEquals( [ 'siteAccessesConfiguration' => [ 'prefix' => 'foo', @@ -41,8 +41,8 @@ public function testSupportsNormalization(): void { $normalizer = new HostTextNormalizer(); - $this->assertTrue($normalizer->supportsNormalization($this->createMock(HostText::class))); - $this->assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); + self::assertTrue($normalizer->supportsNormalization($this->createMock(HostText::class))); + self::assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); } } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/MapNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/MapNormalizerTest.php index 17ab5c2961..5fde547816 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/MapNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/MapNormalizerTest.php @@ -22,7 +22,7 @@ public function testNormalization(): void $matcher = $this->createMock(MapMatcher::class); $matcher->method('getMapKey')->willReturn('foo'); - $this->assertEquals( + self::assertEquals( [ 'key' => 'foo', 'map' => [], @@ -36,8 +36,8 @@ public function testSupportsNormalization(): void { $normalizer = new MapNormalizer(); - $this->assertTrue($normalizer->supportsNormalization($this->createMock(MapMatcher::class))); - $this->assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); + self::assertTrue($normalizer->supportsNormalization($this->createMock(MapMatcher::class))); + self::assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); } } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/RegexHostNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/RegexHostNormalizerTest.php index eff32ba5cd..d92bc14f35 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/RegexHostNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/RegexHostNormalizerTest.php @@ -26,7 +26,7 @@ public function testNormalize(): void 'itemNumber' => 2, ]); - $this->assertEquals( + self::assertEquals( [ 'siteAccessesConfiguration' => [ 'regex' => '/^Foo(.*)/(.*)/', @@ -41,8 +41,8 @@ public function testSupportsNormalization(): void { $normalizer = new RegexHostNormalizer(); - $this->assertTrue($normalizer->supportsNormalization($this->createMock(Host::class))); - $this->assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); + self::assertTrue($normalizer->supportsNormalization($this->createMock(Host::class))); + self::assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); } } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/RegexNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/RegexNormalizerTest.php index 9fbe7c7f23..86f219ab02 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/RegexNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/RegexNormalizerTest.php @@ -21,7 +21,7 @@ public function testNormalize(): void $normalizer = new RegexNormalizer(); $matcher = new RegexMatcherStub('/^Foo(.*)/(.*)/', 2); - $this->assertEquals( + self::assertEquals( [ 'regex' => '/^Foo(.*)/(.*)/', 'itemNumber' => 2, @@ -35,8 +35,8 @@ public function testSupportsNormalization(): void { $normalizer = new RegexNormalizer(); - $this->assertTrue($normalizer->supportsNormalization($this->createMock(RegexMatcher::class))); - $this->assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); + self::assertTrue($normalizer->supportsNormalization($this->createMock(RegexMatcher::class))); + self::assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); } } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/RegexURINormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/RegexURINormalizerTest.php index f9a45dbd8c..5009dd65f3 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/RegexURINormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/RegexURINormalizerTest.php @@ -26,7 +26,7 @@ public function testNormalize(): void 'itemNumber' => 2, ]); - $this->assertEquals( + self::assertEquals( [ 'siteAccessesConfiguration' => [ 'regex' => '/^Foo(.*)/(.*)/', @@ -41,8 +41,8 @@ public function testSupportsNormalization(): void { $normalizer = new RegexURINormalizer(); - $this->assertTrue($normalizer->supportsNormalization($this->createMock(URI::class))); - $this->assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); + self::assertTrue($normalizer->supportsNormalization($this->createMock(URI::class))); + self::assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); } } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizerTest.php index 2c7d02b775..5af03990dc 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Component\Serializer; use Ibexa\Core\MVC\Symfony\Component\Serializer\SimplifiedRequestNormalizer; @@ -34,7 +35,7 @@ public function testNormalize() $normalizer = new SimplifiedRequestNormalizer(); - $this->assertEquals([ + self::assertEquals([ 'scheme' => 'http', 'host' => 'www.example.com', 'port' => 8080, @@ -49,8 +50,8 @@ public function testSupportsNormalization() { $normalizer = new SimplifiedRequestNormalizer(); - $this->assertTrue($normalizer->supportsNormalization(new SimplifiedRequest())); - $this->assertFalse($normalizer->supportsNormalization(new stdClass())); + self::assertTrue($normalizer->supportsNormalization(new SimplifiedRequest())); + self::assertFalse($normalizer->supportsNormalization(new stdClass())); } } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/SerializerStub.php b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/SerializerStub.php index d76cf9f15b..d5eee0133a 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/SerializerStub.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/SerializerStub.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Component\Serializer\Stubs; use Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException; diff --git a/tests/lib/MVC/Symfony/Component/Serializer/URIElementNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/URIElementNormalizerTest.php index 3bf5477672..abe0694fc4 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/URIElementNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/URIElementNormalizerTest.php @@ -27,7 +27,7 @@ public function testNormalization(): void $matcher->setRequest(SimplifiedRequest::fromUrl('http://ezpublish.dev/foo/bar')); $matcher->match(); - $this->assertEquals( + self::assertEquals( [ 'elementNumber' => 2, 'uriElements' => ['foo', 'bar'], @@ -40,8 +40,8 @@ public function testSupportsNormalization(): void { $normalizer = new URIElementNormalizer(); - $this->assertTrue($normalizer->supportsNormalization($this->createMock(URIElement::class))); - $this->assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); + self::assertTrue($normalizer->supportsNormalization($this->createMock(URIElement::class))); + self::assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); } } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/URITextNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/URITextNormalizerTest.php index d1a4b77786..1c778a2f1f 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/URITextNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/URITextNormalizerTest.php @@ -26,7 +26,7 @@ public function testNormalize(): void 'suffix' => 'bar', ]); - $this->assertEquals( + self::assertEquals( [ 'siteAccessesConfiguration' => [ 'prefix' => 'foo', @@ -41,8 +41,8 @@ public function testSupportsNormalization(): void { $normalizer = new URITextNormalizer(); - $this->assertTrue($normalizer->supportsNormalization($this->createMock(URIText::class))); - $this->assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); + self::assertTrue($normalizer->supportsNormalization($this->createMock(URIText::class))); + self::assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); } } diff --git a/tests/lib/MVC/Symfony/Controller/ControllerTest.php b/tests/lib/MVC/Symfony/Controller/ControllerTest.php index 7b552e7fc6..0968b6687f 100644 --- a/tests/lib/MVC/Symfony/Controller/ControllerTest.php +++ b/tests/lib/MVC/Symfony/Controller/ControllerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Controller; use Ibexa\Core\MVC\Symfony\Controller\Controller; @@ -35,10 +36,10 @@ protected function setUp(): void $this->controller = $this->getMockForAbstractClass(Controller::class); $this->controller->setContainer($this->containerMock); $this->containerMock - ->expects($this->any()) + ->expects(self::any()) ->method('get') ->with('templating') - ->will($this->returnValue($this->templateEngineMock)); + ->will(self::returnValue($this->templateEngineMock)); } public function testRender() @@ -47,10 +48,10 @@ public function testRender() $params = ['foo' => 'bar', 'truc' => 'muche']; $tplResult = "I'm a template result"; $this->templateEngineMock - ->expects($this->once()) + ->expects(self::once()) ->method('render') ->with($view, $params) - ->will($this->returnValue($tplResult)); + ->will(self::returnValue($tplResult)); $response = $this->controller->render($view, $params); self::assertInstanceOf(Response::class, $response); self::assertSame($tplResult, $response->getContent()); @@ -63,10 +64,10 @@ public function testRenderWithResponse() $params = ['foo' => 'bar', 'truc' => 'muche']; $tplResult = "I'm a template result"; $this->templateEngineMock - ->expects($this->once()) + ->expects(self::once()) ->method('render') ->with($view, $params) - ->will($this->returnValue($tplResult)); + ->will(self::returnValue($tplResult)); self::assertSame($response, $this->controller->render($view, $params, $response)); self::assertSame($tplResult, $response->getContent()); diff --git a/tests/lib/MVC/Symfony/Controller/QueryRenderControllerTest.php b/tests/lib/MVC/Symfony/Controller/QueryRenderControllerTest.php index 1e82471efe..60577376b1 100644 --- a/tests/lib/MVC/Symfony/Controller/QueryRenderControllerTest.php +++ b/tests/lib/MVC/Symfony/Controller/QueryRenderControllerTest.php @@ -129,7 +129,7 @@ private function assertRenderQueryResult( array $options, Request $request = null ): void { - $this->assertEquals( + self::assertEquals( $expectedView, $this->controller->renderQuery( $request ?? new Request(), diff --git a/tests/lib/MVC/Symfony/ErrorHandler/Php82HideDeprecationsErrorHandlerTest.php b/tests/lib/MVC/Symfony/ErrorHandler/Php82HideDeprecationsErrorHandlerTest.php index d66552b029..2a359e2b98 100644 --- a/tests/lib/MVC/Symfony/ErrorHandler/Php82HideDeprecationsErrorHandlerTest.php +++ b/tests/lib/MVC/Symfony/ErrorHandler/Php82HideDeprecationsErrorHandlerTest.php @@ -34,7 +34,7 @@ public function testRegisterDebug(): void Php82HideDeprecationsErrorHandler::register(true); $errorReporting = error_reporting(); - $this->assertSame(E_ALL & ~E_DEPRECATED, $errorReporting); + self::assertSame(E_ALL & ~E_DEPRECATED, $errorReporting); } public function testRegisterNoDebug(): void @@ -42,6 +42,6 @@ public function testRegisterNoDebug(): void Php82HideDeprecationsErrorHandler::register(false); $errorReporting = error_reporting(); - $this->assertSame(E_ALL & ~E_DEPRECATED, $errorReporting); + self::assertSame(E_ALL & ~E_DEPRECATED, $errorReporting); } } diff --git a/tests/lib/MVC/Symfony/Event/ContentCacheClearEventTest.php b/tests/lib/MVC/Symfony/Event/ContentCacheClearEventTest.php index 55a973dfb6..0d60df20aa 100644 --- a/tests/lib/MVC/Symfony/Event/ContentCacheClearEventTest.php +++ b/tests/lib/MVC/Symfony/Event/ContentCacheClearEventTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Event; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; @@ -17,7 +18,7 @@ public function testConstruct() { $contentInfo = new ContentInfo(); $event = new ContentCacheClearEvent($contentInfo); - $this->assertSame($contentInfo, $event->getContentInfo()); + self::assertSame($contentInfo, $event->getContentInfo()); } public function testAddLocationsToClear() @@ -28,7 +29,7 @@ public function testAddLocationsToClear() $event->addLocationToClear($locations[0]); $event->addLocationToClear($locations[1]); - $this->assertSame($locations, $event->getLocationsToClear()); + self::assertSame($locations, $event->getLocationsToClear()); } public function setLocationsToClear() @@ -38,11 +39,11 @@ public function setLocationsToClear() $initialLocations = [new Location(), new Location()]; $event->addLocationToClear($initialLocations[0]); $event->addLocationToClear($initialLocations[1]); - $this->assertSame($initialLocations, $event->getLocationsToClear()); + self::assertSame($initialLocations, $event->getLocationsToClear()); $otherLocations = [new Location(), new Location()]; $event->setLocationsToClear($otherLocations); - $this->assertSame($otherLocations, $event->getLocationsToClear()); + self::assertSame($otherLocations, $event->getLocationsToClear()); } } diff --git a/tests/lib/MVC/Symfony/Event/InteractiveLoginEventTest.php b/tests/lib/MVC/Symfony/Event/InteractiveLoginEventTest.php index 4dc8adadf2..a6a3c3223f 100644 --- a/tests/lib/MVC/Symfony/Event/InteractiveLoginEventTest.php +++ b/tests/lib/MVC/Symfony/Event/InteractiveLoginEventTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Event; use Ibexa\Contracts\Core\Repository\Values\User\User; @@ -17,11 +18,11 @@ class InteractiveLoginEventTest extends TestCase public function testGetSetAPIUser() { $event = new InteractiveLoginEvent(new Request(), $this->createMock(TokenInterface::class)); - $this->assertFalse($event->hasAPIUser()); + self::assertFalse($event->hasAPIUser()); $apiUser = $this->createMock(User::class); $event->setApiUser($apiUser); - $this->assertTrue($event->hasAPIUser()); - $this->assertSame($apiUser, $event->getAPIUser()); + self::assertTrue($event->hasAPIUser()); + self::assertSame($apiUser, $event->getAPIUser()); } } diff --git a/tests/lib/MVC/Symfony/Event/RouteReferenceGenerationEventTest.php b/tests/lib/MVC/Symfony/Event/RouteReferenceGenerationEventTest.php index d9f3dda9f1..649a99ea9b 100644 --- a/tests/lib/MVC/Symfony/Event/RouteReferenceGenerationEventTest.php +++ b/tests/lib/MVC/Symfony/Event/RouteReferenceGenerationEventTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Event; use Ibexa\Core\MVC\Symfony\Event\RouteReferenceGenerationEvent; @@ -18,8 +19,8 @@ public function testConstruct() $routeReference = new RouteReference('foo'); $request = new Request(); $event = new RouteReferenceGenerationEvent($routeReference, $request); - $this->assertSame($routeReference, $event->getRouteReference()); - $this->assertSame($request, $event->getRequest()); + self::assertSame($routeReference, $event->getRouteReference()); + self::assertSame($request, $event->getRequest()); } public function testGetSet() @@ -28,12 +29,12 @@ public function testGetSet() $request = new Request(); $event = new RouteReferenceGenerationEvent($routeReference, $request); - $this->assertSame($routeReference, $event->getRouteReference()); - $this->assertSame($request, $event->getRequest()); + self::assertSame($routeReference, $event->getRouteReference()); + self::assertSame($request, $event->getRequest()); $newRouteReference = new RouteReference('bar'); $event->setRouteReference($newRouteReference); - $this->assertSame($newRouteReference, $event->getRouteReference()); + self::assertSame($newRouteReference, $event->getRouteReference()); } } diff --git a/tests/lib/MVC/Symfony/Event/ScopeChangeEventTest.php b/tests/lib/MVC/Symfony/Event/ScopeChangeEventTest.php index 704c0d3aa3..b7a4fe5b5e 100644 --- a/tests/lib/MVC/Symfony/Event/ScopeChangeEventTest.php +++ b/tests/lib/MVC/Symfony/Event/ScopeChangeEventTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Event; use Ibexa\Core\MVC\Symfony\Event\ScopeChangeEvent; @@ -16,7 +17,7 @@ public function testGetSiteAccess() { $siteAccess = new SiteAccess('foo', 'test'); $event = new ScopeChangeEvent($siteAccess); - $this->assertSame($siteAccess, $event->getSiteAccess()); + self::assertSame($siteAccess, $event->getSiteAccess()); } } diff --git a/tests/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriberTest.php b/tests/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriberTest.php index c7e16f4d6e..be3ac12a27 100644 --- a/tests/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriberTest.php +++ b/tests/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriberTest.php @@ -82,7 +82,7 @@ public function testWithoutVariables(): void $event = new PreContentViewEvent($view); $view - ->expects($this->once()) + ->expects(self::once()) ->method('setParameters') ->with([]); @@ -105,7 +105,7 @@ public function testWithScalarVariables(): void ]); $view - ->expects($this->once()) + ->expects(self::once()) ->method('setParameters') ->with([ 'param_1' => 'scalar_1', @@ -136,7 +136,7 @@ public function testOverwriteVariables(): void ]); $view - ->expects($this->once()) + ->expects(self::once()) ->method('setParameters') ->with([ 'param_1' => 'scalar_1', @@ -167,7 +167,7 @@ public function testWithExpressionParam(): void ]); $view - ->expects($this->once()) + ->expects(self::once()) ->method('setParameters') ->with([ 'random_number' => $randomNumber, @@ -204,7 +204,7 @@ public function testWithNestedParamsAndExpressions(): void ]); $view - ->expects($this->once()) + ->expects(self::once()) ->method('setParameters') ->with([ 'some_number' => $someNumber, @@ -236,7 +236,7 @@ public function testWithProviderExpression(): void ]); $view - ->expects($this->once()) + ->expects(self::once()) ->method('setParameters') ->with([ 'example' => 'test_provider_value', diff --git a/tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php b/tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php index dcadba49f0..ae4a33f737 100644 --- a/tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php +++ b/tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\EventListener; use Ibexa\Core\Helper\TranslationHelper; @@ -29,7 +30,7 @@ protected function setUp(): void public function testGetSubscribedEvents() { - $this->assertSame( + self::assertSame( [MVCEvents::ROUTE_REFERENCE_GENERATION => 'onRouteReferenceGeneration'], LanguageSwitchListener::getSubscribedEvents() ); @@ -38,7 +39,7 @@ public function testGetSubscribedEvents() public function testOnRouteReferenceGenerationNoLanguage() { $this->translationHelper - ->expects($this->never()) + ->expects(self::never()) ->method('getTranslationSiteAccess'); $event = new RouteReferenceGenerationEvent(new RouteReference('foo'), new Request()); @@ -53,16 +54,16 @@ public function testOnRouteReferenceGeneration() $event = new RouteReferenceGenerationEvent($routeReference, new Request()); $expectedSiteAccess = 'phoenix_rises'; $this->translationHelper - ->expects($this->once()) + ->expects(self::once()) ->method('getTranslationSiteAccess') ->with($language) - ->will($this->returnValue($expectedSiteAccess)); + ->will(self::returnValue($expectedSiteAccess)); $listener = new LanguageSwitchListener($this->translationHelper); $listener->onRouteReferenceGeneration($event); - $this->assertFalse($routeReference->has('language')); - $this->assertTrue($routeReference->has('siteaccess')); - $this->assertSame($expectedSiteAccess, $routeReference->get('siteaccess')); + self::assertFalse($routeReference->has('language')); + self::assertTrue($routeReference->has('siteaccess')); + self::assertSame($expectedSiteAccess, $routeReference->get('siteaccess')); } public function testOnRouteReferenceGenerationNoTranslationSiteAccess() @@ -71,15 +72,15 @@ public function testOnRouteReferenceGenerationNoTranslationSiteAccess() $routeReference = new RouteReference('foo', ['language' => $language]); $event = new RouteReferenceGenerationEvent($routeReference, new Request()); $this->translationHelper - ->expects($this->once()) + ->expects(self::once()) ->method('getTranslationSiteAccess') ->with($language) - ->will($this->returnValue(null)); + ->will(self::returnValue(null)); $listener = new LanguageSwitchListener($this->translationHelper); $listener->onRouteReferenceGeneration($event); - $this->assertFalse($routeReference->has('language')); - $this->assertFalse($routeReference->has('siteaccess')); + self::assertFalse($routeReference->has('language')); + self::assertFalse($routeReference->has('siteaccess')); } } diff --git a/tests/lib/MVC/Symfony/EventListener/SiteAccessMatchListenerTest.php b/tests/lib/MVC/Symfony/EventListener/SiteAccessMatchListenerTest.php index 402cbd0c9d..b4f48b5cd9 100644 --- a/tests/lib/MVC/Symfony/EventListener/SiteAccessMatchListenerTest.php +++ b/tests/lib/MVC/Symfony/EventListener/SiteAccessMatchListenerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\EventListener; use Ibexa\Bundle\Core\SiteAccess\SiteAccessMatcherRegistryInterface; @@ -52,7 +53,7 @@ protected function setUp(): void public function testGetSubscribedEvents() { - $this->assertSame( + self::assertSame( [KernelEvents::REQUEST => ['onKernelRequest', 45]], SiteAccessMatchListener::getSubscribedEvents() ); @@ -85,18 +86,18 @@ public function testOnKernelRequestSerializedSA() ); $this->saRouter - ->expects($this->never()) + ->expects(self::never()) ->method('match'); $postSAMatchEvent = new PostSiteAccessMatchEvent($siteAccess, $request, $event->getRequestType()); $this->eventDispatcher - ->expects($this->once()) + ->expects(self::once()) ->method('dispatch') - ->with($this->equalTo($postSAMatchEvent), MVCEvents::SITEACCESS); + ->with(self::equalTo($postSAMatchEvent), MVCEvents::SITEACCESS); $this->listener->onKernelRequest($event); - $this->assertEquals($siteAccess, $request->attributes->get('siteaccess')); - $this->assertFalse($request->attributes->has('serialized_siteaccess')); + self::assertEquals($siteAccess, $request->attributes->get('siteaccess')); + self::assertFalse($request->attributes->has('serialized_siteaccess')); } public function testOnKernelRequestSerializedSAWithCompoundMatcher() @@ -141,18 +142,18 @@ public function testOnKernelRequestSerializedSAWithCompoundMatcher() ); $this->saRouter - ->expects($this->never()) + ->expects(self::never()) ->method('match'); $postSAMatchEvent = new PostSiteAccessMatchEvent($siteAccess, $request, $event->getRequestType()); $this->eventDispatcher - ->expects($this->once()) + ->expects(self::once()) ->method('dispatch') - ->with($this->equalTo($postSAMatchEvent), MVCEvents::SITEACCESS); + ->with(self::equalTo($postSAMatchEvent), MVCEvents::SITEACCESS); $this->listener->onKernelRequest($event); - $this->assertEquals($siteAccess, $request->attributes->get('siteaccess')); - $this->assertFalse($request->attributes->has('serialized_siteaccess')); + self::assertEquals($siteAccess, $request->attributes->get('siteaccess')); + self::assertFalse($request->attributes->has('serialized_siteaccess')); } public function testOnKernelRequestSiteAccessPresent() @@ -167,17 +168,17 @@ public function testOnKernelRequestSiteAccessPresent() ); $this->saRouter - ->expects($this->never()) + ->expects(self::never()) ->method('match'); $postSAMatchEvent = new PostSiteAccessMatchEvent($siteAccess, $request, $event->getRequestType()); $this->eventDispatcher - ->expects($this->once()) + ->expects(self::once()) ->method('dispatch') - ->with($this->equalTo($postSAMatchEvent), MVCEvents::SITEACCESS); + ->with(self::equalTo($postSAMatchEvent), MVCEvents::SITEACCESS); $this->listener->onKernelRequest($event); - $this->assertSame($siteAccess, $request->attributes->get('siteaccess')); + self::assertSame($siteAccess, $request->attributes->get('siteaccess')); } public function testOnKernelRequest() @@ -207,19 +208,19 @@ public function testOnKernelRequest() ); $this->saRouter - ->expects($this->once()) + ->expects(self::once()) ->method('match') - ->with($this->equalTo($simplifiedRequest)) - ->will($this->returnValue($siteAccess)); + ->with(self::equalTo($simplifiedRequest)) + ->will(self::returnValue($siteAccess)); $postSAMatchEvent = new PostSiteAccessMatchEvent($siteAccess, $request, $event->getRequestType()); $this->eventDispatcher - ->expects($this->once()) + ->expects(self::once()) ->method('dispatch') - ->with($this->equalTo($postSAMatchEvent), MVCEvents::SITEACCESS); + ->with(self::equalTo($postSAMatchEvent), MVCEvents::SITEACCESS); $this->listener->onKernelRequest($event); - $this->assertSame($siteAccess, $request->attributes->get('siteaccess')); + self::assertSame($siteAccess, $request->attributes->get('siteaccess')); } public function testOnKernelRequestUserHashWithOriginalRequest() @@ -251,19 +252,19 @@ public function testOnKernelRequestUserHashWithOriginalRequest() ); $this->saRouter - ->expects($this->once()) + ->expects(self::once()) ->method('match') - ->with($this->equalTo($simplifiedRequest)) - ->will($this->returnValue($siteAccess)); + ->with(self::equalTo($simplifiedRequest)) + ->will(self::returnValue($siteAccess)); $postSAMatchEvent = new PostSiteAccessMatchEvent($siteAccess, $request, $event->getRequestType()); $this->eventDispatcher - ->expects($this->once()) + ->expects(self::once()) ->method('dispatch') - ->with($this->equalTo($postSAMatchEvent), MVCEvents::SITEACCESS); + ->with(self::equalTo($postSAMatchEvent), MVCEvents::SITEACCESS); $this->listener->onKernelRequest($event); - $this->assertSame($siteAccess, $request->attributes->get('siteaccess')); + self::assertSame($siteAccess, $request->attributes->get('siteaccess')); } } diff --git a/tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php b/tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php index 3fb2a5ad16..8d3a0cf8d8 100644 --- a/tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php +++ b/tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php @@ -93,7 +93,7 @@ public function testGetViewParameters($status, array $expected): void $actual = $this->parameterProvider->getViewParameters($this->createField($destinationContentId)); - $this->assertEquals($expected, $actual); + self::assertEquals($expected, $actual); } public function testGetViewParametersHandleNotFoundException(): void @@ -109,7 +109,7 @@ public function testGetViewParametersHandleNotFoundException(): void }; $this->repository - ->expects($this->once()) + ->expects(self::once()) ->method('sudo') ->with($closure) ->willThrowException($this->createMock(NotFoundException::class)); @@ -118,7 +118,7 @@ public function testGetViewParametersHandleNotFoundException(): void $this->createField($destinationContentId) ); - $this->assertEquals([ + self::assertEquals([ 'available' => false, ], $actual); } @@ -139,14 +139,14 @@ public function testGetViewParametersHandleUnauthorizedAccess(): void ; $this->permissionsResolver - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('canUser') ->with('content', 'read', $contentInfo) ->willReturn(false) ; $this->permissionsResolver - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('canUser') ->with('content', 'view_embed', $contentInfo) ->willReturn(false) @@ -156,7 +156,7 @@ public function testGetViewParametersHandleUnauthorizedAccess(): void $this->createField($destinationContentId) ); - $this->assertEquals([ + self::assertEquals([ 'available' => false, ], $actual); } @@ -180,7 +180,7 @@ public function testGetViewParametersHandleEmptyValue(): void $this->createField($destinationContentId) ); - $this->assertEquals([ + self::assertEquals([ 'available' => null, ], $actual); } diff --git a/tests/lib/MVC/Symfony/FieldType/Relation/ParameterProviderTest.php b/tests/lib/MVC/Symfony/FieldType/Relation/ParameterProviderTest.php index 6b89e5646e..007f556d6f 100644 --- a/tests/lib/MVC/Symfony/FieldType/Relation/ParameterProviderTest.php +++ b/tests/lib/MVC/Symfony/FieldType/Relation/ParameterProviderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\FieldType\Relation; use Ibexa\Contracts\Core\Repository\ContentService; diff --git a/tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php b/tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php index 552668f84a..18d523be74 100644 --- a/tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php +++ b/tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\FieldType\RelationList; use Ibexa\Contracts\Core\Repository\ContentService; @@ -34,7 +35,7 @@ public function testGetViewParameters(array $desinationContentIds, array $expect $contentServiceMock ->method('loadContentInfoList') ->with($desinationContentIds) - ->will($this->returnCallback(static function ($arg) { + ->will(self::returnCallback(static function ($arg) { $return = []; if (in_array(123, $arg)) { $return[123] = new ContentInfo(['status' => ContentInfo::STATUS_DRAFT]); diff --git a/tests/lib/MVC/Symfony/FieldType/User/ParameterProviderTest.php b/tests/lib/MVC/Symfony/FieldType/User/ParameterProviderTest.php index 6f47f029fa..254a096c7a 100644 --- a/tests/lib/MVC/Symfony/FieldType/User/ParameterProviderTest.php +++ b/tests/lib/MVC/Symfony/FieldType/User/ParameterProviderTest.php @@ -61,9 +61,9 @@ public function testGetViewParameters(): void $this->createFieldMock(self::EXAMPLE_USER_ID) ); - $this->assertFalse($parameters['is_password_expired']); - $this->assertEquals($passwordExpiresAt, $parameters['password_expires_at']); - $this->assertEquals($passwordExpiresIn, $parameters['password_expires_in']->days); + self::assertFalse($parameters['is_password_expired']); + self::assertEquals($passwordExpiresAt, $parameters['password_expires_at']); + self::assertEquals($passwordExpiresIn, $parameters['password_expires_in']->days); } public function testGetViewParametersWhenPasswordExpirationDateIsNull(): void @@ -75,7 +75,7 @@ public function testGetViewParametersWhenPasswordExpirationDateIsNull(): void ->with($this->user) ->willReturn(new PasswordInfo()); - $this->assertEquals([ + self::assertEquals([ 'is_password_expired' => false, 'password_expires_at' => null, 'password_expires_in' => null, diff --git a/tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php b/tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php index c545bba678..b30381211d 100644 --- a/tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php +++ b/tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\FieldType\View\ParameterProvider; use Ibexa\Contracts\Core\Repository\Values\Content\Field; @@ -32,7 +33,7 @@ public function testGetViewParameters($hasRequestLocale, $expectedLocale) $field = new Field(['languageCode' => 'cro-HR']); $parameterProvider = new LocaleParameterProvider($this->getLocaleConverterMock()); $parameterProvider->setRequestStack($this->getRequestStackMock($hasRequestLocale)); - $this->assertSame( + self::assertSame( ['locale' => $expectedLocale], $parameterProvider->getViewParameters($field) ); @@ -43,15 +44,15 @@ protected function getRequestStackMock($hasLocale) $requestStack = new RequestStack(); $parameterBagMock = $this->createMock(ParameterBag::class); - $parameterBagMock->expects($this->any()) + $parameterBagMock->expects(self::any()) ->method('has') - ->with($this->equalTo('_locale')) - ->will($this->returnValue($hasLocale)); + ->with(self::equalTo('_locale')) + ->will(self::returnValue($hasLocale)); - $parameterBagMock->expects($this->any()) + $parameterBagMock->expects(self::any()) ->method('get') - ->with($this->equalTo('_locale')) - ->will($this->returnValue('fr_FR')); + ->with(self::equalTo('_locale')) + ->will(self::returnValue('fr_FR')); $requestMock = $this->createMock(Request::class); $requestMock->attributes = $parameterBagMock; @@ -65,10 +66,10 @@ protected function getLocaleConverterMock() { $mock = $this->createMock(LocaleConverterInterface::class); - $mock->expects($this->any()) + $mock->expects(self::any()) ->method('convertToPOSIX') - ->with($this->equalTo('cro-HR')) - ->will($this->returnValue('hr_HR')); + ->with(self::equalTo('cro-HR')) + ->will(self::returnValue('hr_HR')); return $mock; } diff --git a/tests/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryTest.php b/tests/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryTest.php index 13060d4e16..9fad4b1b77 100644 --- a/tests/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryTest.php +++ b/tests/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\FieldType\View; use Ibexa\Core\MVC\Symfony\FieldType\View\ParameterProviderInterface; @@ -18,12 +19,12 @@ class ParameterProviderRegistryTest extends TestCase public function testSetHasParameterProvider() { $registry = new ParameterProviderRegistry(); - $this->assertFalse($registry->hasParameterProvider('foo')); + self::assertFalse($registry->hasParameterProvider('foo')); $registry->setParameterProvider( $this->createMock(ParameterProviderInterface::class), 'foo' ); - $this->assertTrue($registry->hasParameterProvider('foo')); + self::assertTrue($registry->hasParameterProvider('foo')); } public function testGetParameterProviderFail() @@ -39,7 +40,7 @@ public function testGetParameterProvider() $provider = $this->createMock(ParameterProviderInterface::class); $registry = new ParameterProviderRegistry(); $registry->setParameterProvider($provider, 'foo'); - $this->assertSame($provider, $registry->getParameterProvider('foo')); + self::assertSame($provider, $registry->getParameterProvider('foo')); } } diff --git a/tests/lib/MVC/Symfony/Locale/LocaleConverterTest.php b/tests/lib/MVC/Symfony/Locale/LocaleConverterTest.php index 826db2d144..dd6a4129aa 100644 --- a/tests/lib/MVC/Symfony/Locale/LocaleConverterTest.php +++ b/tests/lib/MVC/Symfony/Locale/LocaleConverterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Locale; use Ibexa\Core\MVC\Symfony\Locale\LocaleConverter; @@ -54,7 +55,7 @@ public function testConvertToPOSIX(string $repositoryLocale, ?string $expected): { if ($expected === null) { $this->logger - ->expects($this->once()) + ->expects(self::once()) ->method('warning'); } @@ -80,7 +81,7 @@ public function testConvertToEz(string $posixLocale, ?string $expected): void { if ($expected === null) { $this->logger - ->expects($this->once()) + ->expects(self::once()) ->method('warning'); } @@ -94,7 +95,7 @@ public function testConvertToRepository(string $posixLocale, ?string $expected): { if ($expected === null) { $this->logger - ->expects($this->once()) + ->expects(self::once()) ->method('warning'); } diff --git a/tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php b/tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php index cd58c29164..3ef84fbbc3 100644 --- a/tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php +++ b/tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php @@ -72,7 +72,7 @@ public function testGetPreferredLanguagesWithoutUserLanguage(array $userLanguage ); $this ->requestStackMock - ->expects($this->once()) + ->expects(self::once()) ->method('getCurrentRequest') ->willReturn($request); @@ -80,7 +80,7 @@ public function testGetPreferredLanguagesWithoutUserLanguage(array $userLanguage $userPreferenceServiceMock ->method('getUserPreference') ->with(self::LANGUAGE_PREFERENCE_NAME) - ->will($this->throwException(new NotFoundException('User Preference', self::LANGUAGE_PREFERENCE_NAME))); + ->will(self::throwException(new NotFoundException('User Preference', self::LANGUAGE_PREFERENCE_NAME))); $userLanguagePreferenceProvider = new UserLanguagePreferenceProvider( $this->requestStackMock, @@ -111,7 +111,7 @@ public function testGetPreferredLanguagesWithUserPreferredLanguage(array $userLa ); $this ->requestStackMock - ->expects($this->once()) + ->expects(self::once()) ->method('getCurrentRequest') ->willReturn($request); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/BaseTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/BaseTest.php index cd25aa307f..81cdb54593 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/BaseTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/BaseTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased; use Ibexa\Contracts\Core\Persistence\User\Handler as SPIUserHandler; diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php index 33694b809b..40e478d22f 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased; use Ibexa\Contracts\Core\Repository\LocationService; @@ -24,6 +25,7 @@ protected function setUp(): void /** * @dataProvider matchLocationProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Depth::matchLocation * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @@ -34,7 +36,7 @@ protected function setUp(): void public function testMatchLocation($matchingConfig, Location $location, $expectedResult) { $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame($expectedResult, $this->matcher->matchLocation($location)); + self::assertSame($expectedResult, $this->matcher->matchLocation($location)); } public function matchLocationProvider() @@ -75,6 +77,7 @@ public function matchLocationProvider() /** * @dataProvider matchContentInfoProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Depth::matchContentInfo * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @covers \Ibexa\Core\MVC\RepositoryAware::setRepository @@ -87,7 +90,7 @@ public function testMatchContentInfo($matchingConfig, Repository $repository, $e { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame( + self::assertSame( $expectedResult, $this->matcher->matchContentInfo($this->getContentInfoMock(['mainLocationId' => 42])) ); @@ -129,24 +132,24 @@ public function matchContentInfoProvider() private function generateRepositoryMockForDepth($depth) { $locationServiceMock = $this->createMock(LocationService::class); - $locationServiceMock->expects($this->once()) + $locationServiceMock->expects(self::once()) ->method('loadLocation') ->with(42) ->will( - $this->returnValue( + self::returnValue( $this->getLocationMock(['depth' => $depth]) ) ); $repository = $this->getRepositoryMock(); $repository - ->expects($this->once()) + ->expects(self::once()) ->method('getLocationService') - ->will($this->returnValue($locationServiceMock)); + ->will(self::returnValue($locationServiceMock)); $repository - ->expects($this->once()) + ->expects(self::once()) ->method('getPermissionResolver') - ->will($this->returnValue($this->getPermissionResolverMock())); + ->will(self::returnValue($this->getPermissionResolverMock())); return $repository; } diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php index 82a5efe9f5..37be23d31f 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\Id; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; @@ -24,6 +25,7 @@ protected function setUp(): void /** * @dataProvider matchLocationProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Content::matchLocation * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @@ -34,7 +36,7 @@ protected function setUp(): void public function testMatchLocation($matchingConfig, Location $location, $expectedResult) { $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame($expectedResult, $this->matcher->matchLocation($location)); + self::assertSame($expectedResult, $this->matcher->matchLocation($location)); } public function matchLocationProvider() @@ -74,10 +76,10 @@ private function generateLocationForContentId($contentId) { $location = $this->getLocationMock(); $location - ->expects($this->any()) + ->expects(self::any()) ->method('getContentInfo') ->will( - $this->returnValue( + self::returnValue( $this->getContentInfoMock(['id' => $contentId]) ) ); @@ -87,6 +89,7 @@ private function generateLocationForContentId($contentId) /** * @dataProvider matchContentInfoProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Content::matchContentInfo * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @@ -97,7 +100,7 @@ private function generateLocationForContentId($contentId) public function testMatchContentInfo($matchingConfig, ContentInfo $contentInfo, $expectedResult) { $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame($expectedResult, $this->matcher->matchContentInfo($contentInfo)); + self::assertSame($expectedResult, $this->matcher->matchContentInfo($contentInfo)); } public function matchContentInfoProvider() diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php index 7ee473a299..362bdbddf2 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\Id; use Ibexa\Contracts\Core\Repository\ContentTypeService; @@ -26,6 +27,7 @@ protected function setUp(): void /** * @dataProvider matchLocationProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ContentTypeGroup::matchLocation * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @@ -38,7 +40,7 @@ public function testMatchLocation($matchingConfig, Repository $repository, $expe $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame( + self::assertSame( $expectedResult, $this->matcher->matchLocation($this->generateLocationMock()) ); @@ -84,10 +86,10 @@ private function generateLocationMock() { $location = $this->getLocationMock(); $location - ->expects($this->any()) + ->expects(self::any()) ->method('getContentInfo') ->will( - $this->returnValue( + self::returnValue( $this->getContentInfoMock(['contentTypeId' => 42]) ) ); @@ -97,6 +99,7 @@ private function generateLocationMock() /** * @dataProvider matchContentInfoProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ContentTypeGroup::matchContentInfo * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @@ -109,7 +112,7 @@ public function testMatchContentInfo($matchingConfig, Repository $repository, $e $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame( + self::assertSame( $expectedResult, $this->matcher->matchContentInfo($this->getContentInfoMock(['contentTypeId' => 42])) ); @@ -157,14 +160,14 @@ private function generateRepositoryMockForContentTypeGroupId($contentTypeGroupId { $contentTypeServiceMock = $this->createMock(ContentTypeService::class); $contentTypeMock = $this->getMockForAbstractClass(ContentType::class); - $contentTypeServiceMock->expects($this->once()) + $contentTypeServiceMock->expects(self::once()) ->method('loadContentType') ->with(42) - ->will($this->returnValue($contentTypeMock)); - $contentTypeMock->expects($this->once()) + ->will(self::returnValue($contentTypeMock)); + $contentTypeMock->expects(self::once()) ->method('getContentTypeGroups') ->will( - $this->returnValue( + self::returnValue( [ // First a group that will never match, then the right group. // This ensures to test even if the content type belongs to several groups at once. @@ -179,9 +182,9 @@ private function generateRepositoryMockForContentTypeGroupId($contentTypeGroupId $repository = $this->getRepositoryMock(); $repository - ->expects($this->once()) + ->expects(self::once()) ->method('getContentTypeService') - ->will($this->returnValue($contentTypeServiceMock)); + ->will(self::returnValue($contentTypeServiceMock)); return $repository; } diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php index 2b5cb9e275..3313c2435d 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\Id; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; @@ -24,6 +25,7 @@ protected function setUp(): void /** * @dataProvider matchLocationProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ContentType::matchLocation * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @@ -34,7 +36,7 @@ protected function setUp(): void public function testMatchLocation($matchingConfig, Location $location, $expectedResult) { $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame($expectedResult, $this->matcher->matchLocation($location)); + self::assertSame($expectedResult, $this->matcher->matchLocation($location)); } public function matchLocationProvider() @@ -79,10 +81,10 @@ private function generateLocationForContentType($contentTypeId) { $location = $this->getLocationMock(); $location - ->expects($this->any()) + ->expects(self::any()) ->method('getContentInfo') ->will( - $this->returnValue( + self::returnValue( $this->generateContentInfoForContentType($contentTypeId) ) ); @@ -104,6 +106,7 @@ private function generateContentInfoForContentType($contentTypeId) /** * @dataProvider matchContentInfoProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ContentType::matchContentInfo * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @@ -114,7 +117,7 @@ private function generateContentInfoForContentType($contentTypeId) public function testMatchContentInfo($matchingConfig, ContentInfo $contentInfo, $expectedResult) { $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame($expectedResult, $this->matcher->matchContentInfo($contentInfo)); + self::assertSame($expectedResult, $this->matcher->matchContentInfo($contentInfo)); } public function matchContentInfoProvider() diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php index 00015a98cd..b6f890757b 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\Id; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; @@ -24,6 +25,7 @@ protected function setUp(): void /** * @dataProvider matchLocationProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Location::matchLocation * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @@ -34,7 +36,7 @@ protected function setUp(): void public function testMatchLocation($matchingConfig, Location $location, $expectedResult) { $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame($expectedResult, $this->matcher->matchLocation($location)); + self::assertSame($expectedResult, $this->matcher->matchLocation($location)); } public function matchLocationProvider() @@ -65,6 +67,7 @@ public function matchLocationProvider() /** * @dataProvider matchContentInfoProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Location::matchContentInfo * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @@ -75,7 +78,7 @@ public function matchLocationProvider() public function testMatchContentInfo($matchingConfig, ContentInfo $contentInfo, $expectedResult) { $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame($expectedResult, $this->matcher->matchContentInfo($contentInfo)); + self::assertSame($expectedResult, $this->matcher->matchContentInfo($contentInfo)); } public function matchContentInfoProvider() diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php index 9c356b4820..9f88469723 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\Id; use Ibexa\Contracts\Core\Repository\LocationService; @@ -42,41 +43,42 @@ private function generateRepositoryMockForContentTypeId($contentTypeId) $parentLocation = $this->getLocationMock([ 'parentLocationId' => self::EXAMPLE_PARENT_LOCATION_ID, ]); - $parentLocation->expects($this->once()) + $parentLocation->expects(self::once()) ->method('getContentInfo') ->will( - $this->returnValue($parentContentInfo) + self::returnValue($parentContentInfo) ); $locationServiceMock = $this->createMock(LocationService::class); - $locationServiceMock->expects($this->atLeastOnce()) + $locationServiceMock->expects(self::atLeastOnce()) ->method('loadLocation') ->will( - $this->returnValue($parentLocation) + self::returnValue($parentLocation) ); // The following is used in the case of a match by contentInfo - $locationServiceMock->expects($this->any()) + $locationServiceMock->expects(self::any()) ->method('loadLocation') ->will( - $this->returnValue($this->getLocationMock()) + self::returnValue($this->getLocationMock()) ); $repository = $this->getRepositoryMock(); $repository - ->expects($this->any()) + ->expects(self::any()) ->method('getLocationService') - ->will($this->returnValue($locationServiceMock)); + ->will(self::returnValue($locationServiceMock)); $repository - ->expects($this->any()) + ->expects(self::any()) ->method('getPermissionResolver') - ->will($this->returnValue($this->getPermissionResolverMock())); + ->will(self::returnValue($this->getPermissionResolverMock())); return $repository; } /** * @dataProvider matchLocationProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ParentContentType::matchLocation * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @covers \Ibexa\Core\MVC\RepositoryAware::setRepository @@ -89,7 +91,7 @@ public function testMatchLocation($matchingConfig, Repository $repository, $expe { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame( + self::assertSame( $expectedResult, $this->matcher->matchLocation($this->getLocationMock(['parentLocationId' => self::EXAMPLE_LOCATION_ID])) ); @@ -123,6 +125,7 @@ public function matchLocationProvider() /** * @dataProvider matchLocationProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ParentContentType::matchContentInfo * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @covers \Ibexa\Core\MVC\RepositoryAware::setRepository @@ -136,7 +139,7 @@ public function testMatchContentInfo($matchingConfig, Repository $repository, $e $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame( + self::assertSame( $expectedResult, $this->matcher->matchContentInfo($this->getContentInfoMock([ 'mainLocationId' => self::EXAMPLE_LOCATION_ID, diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php index cf1d0434f0..00b8766011 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\Id; use Ibexa\Contracts\Core\Repository\LocationService; @@ -25,6 +26,7 @@ protected function setUp(): void /** * @dataProvider matchLocationProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ParentLocation::matchLocation * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @@ -35,7 +37,7 @@ protected function setUp(): void public function testMatchLocation($matchingConfig, Location $location, $expectedResult) { $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame($expectedResult, $this->matcher->matchLocation($location)); + self::assertSame($expectedResult, $this->matcher->matchLocation($location)); } public function matchLocationProvider() @@ -66,6 +68,7 @@ public function matchLocationProvider() /** * @dataProvider matchContentInfoProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ParentLocation::matchContentInfo * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @covers \Ibexa\Core\MVC\RepositoryAware::setRepository @@ -78,7 +81,7 @@ public function testMatchContentInfo($matchingConfig, Repository $repository, $e { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame( + self::assertSame( $expectedResult, $this->matcher->matchContentInfo($this->getContentInfoMock(['mainLocationId' => 42])) ); @@ -120,24 +123,24 @@ public function matchContentInfoProvider() private function generateRepositoryMockForParentLocationId($parentLocationId) { $locationServiceMock = $this->createMock(LocationService::class); - $locationServiceMock->expects($this->once()) + $locationServiceMock->expects(self::once()) ->method('loadLocation') ->with(42) ->will( - $this->returnValue( + self::returnValue( $this->getLocationMock(['parentLocationId' => $parentLocationId]) ) ); $repository = $this->getRepositoryMock(); $repository - ->expects($this->once()) + ->expects(self::once()) ->method('getLocationService') - ->will($this->returnValue($locationServiceMock)); + ->will(self::returnValue($locationServiceMock)); $repository - ->expects($this->any()) + ->expects(self::any()) ->method('getPermissionResolver') - ->will($this->returnValue($this->getPermissionResolverMock())); + ->will(self::returnValue($this->getPermissionResolverMock())); return $repository; } diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php index 7c9211c354..6b8f3bb0e9 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\Id; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; @@ -24,6 +25,7 @@ protected function setUp(): void /** * @dataProvider matchLocationProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Remote::matchLocation * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @@ -34,7 +36,7 @@ protected function setUp(): void public function testMatchLocation($matchingConfig, Location $location, $expectedResult) { $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame($expectedResult, $this->matcher->matchLocation($location)); + self::assertSame($expectedResult, $this->matcher->matchLocation($location)); } public function matchLocationProvider() @@ -65,6 +67,7 @@ public function matchLocationProvider() /** * @dataProvider matchContentInfoProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Remote::matchContentInfo * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @@ -75,7 +78,7 @@ public function matchLocationProvider() public function testMatchContentInfo($matchingConfig, ContentInfo $contentInfo, $expectedResult) { $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame($expectedResult, $this->matcher->matchContentInfo($contentInfo)); + self::assertSame($expectedResult, $this->matcher->matchContentInfo($contentInfo)); } public function matchContentInfoProvider() diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php index 30dc941dd9..6ff5a2a665 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\Id; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; @@ -24,6 +25,7 @@ protected function setUp(): void /** * @dataProvider matchLocationProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @@ -34,7 +36,7 @@ protected function setUp(): void public function testMatchLocation($matchingConfig, Location $location, $expectedResult) { $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame($expectedResult, $this->matcher->matchLocation($location)); + self::assertSame($expectedResult, $this->matcher->matchLocation($location)); } public function matchLocationProvider() @@ -74,10 +76,10 @@ private function generateLocationForSectionId($sectionId) { $location = $this->getLocationMock(); $location - ->expects($this->any()) + ->expects(self::any()) ->method('getContentInfo') ->will( - $this->returnValue( + self::returnValue( $this->getContentInfoMock(['sectionId' => $sectionId]) ) ); @@ -87,6 +89,7 @@ private function generateLocationForSectionId($sectionId) /** * @dataProvider matchContentInfoProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Section::matchContentInfo * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @@ -97,7 +100,7 @@ private function generateLocationForSectionId($sectionId) public function testMatchContentInfo($matchingConfig, ContentInfo $contentInfo, $expectedResult) { $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame($expectedResult, $this->matcher->matchContentInfo($contentInfo)); + self::assertSame($expectedResult, $this->matcher->matchContentInfo($contentInfo)); } public function matchContentInfoProvider() diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php index 085fe2d57e..b781925924 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\Identifier; use Ibexa\Contracts\Core\Repository\ContentTypeService; @@ -25,6 +26,7 @@ protected function setUp(): void /** * @dataProvider matchLocationProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier\ContentType::matchLocation * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @@ -37,7 +39,7 @@ public function testMatchLocation($matchingConfig, Repository $repository, $expe $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame( + self::assertSame( $expectedResult, $this->matcher->matchLocation($this->generateLocationMock()) ); @@ -83,10 +85,10 @@ private function generateLocationMock() { $location = $this->getLocationMock(); $location - ->expects($this->any()) + ->expects(self::any()) ->method('getContentInfo') ->will( - $this->returnValue( + self::returnValue( $this->getContentInfoMock(['contentTypeId' => 42]) ) ); @@ -96,6 +98,7 @@ private function generateLocationMock() /** * @dataProvider matchContentInfoProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier\ContentType::matchLocation * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @@ -108,7 +111,7 @@ public function testMatchContentInfo($matchingConfig, Repository $repository, $e $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame( + self::assertSame( $expectedResult, $this->matcher->matchContentInfo( $this->getContentInfoMock(['contentTypeId' => 42]) @@ -163,18 +166,18 @@ private function generateRepositoryMockForContentTypeIdentifier($contentTypeIden ) ->getMockForAbstractClass(); $contentTypeServiceMock = $this->createMock(ContentTypeService::class); - $contentTypeServiceMock->expects($this->once()) + $contentTypeServiceMock->expects(self::once()) ->method('loadContentType') ->with(42) ->will( - $this->returnValue($contentTypeMock) + self::returnValue($contentTypeMock) ); $repository = $this->getRepositoryMock(); $repository - ->expects($this->any()) + ->expects(self::any()) ->method('getContentTypeService') - ->will($this->returnValue($contentTypeServiceMock)); + ->will(self::returnValue($contentTypeServiceMock)); return $repository; } diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php index ee20362a26..620ae026fc 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\Identifier; use Ibexa\Contracts\Core\Repository\ContentTypeService; @@ -43,31 +44,31 @@ private function generateRepositoryMockForContentTypeIdentifier($contentTypeIden $parentLocation = $this->getLocationMock([ 'parentLocationId' => self::EXAMPLE_PARENT_LOCATION_ID, ]); - $parentLocation->expects($this->once()) + $parentLocation->expects(self::once()) ->method('getContentInfo') ->will( - $this->returnValue($parentContentInfo) + self::returnValue($parentContentInfo) ); $locationServiceMock = $this->createMock(LocationService::class); - $locationServiceMock->expects($this->atLeastOnce()) + $locationServiceMock->expects(self::atLeastOnce()) ->method('loadLocation') ->will( - $this->returnValue($parentLocation) + self::returnValue($parentLocation) ); // The following is used in the case of a match by contentInfo - $locationServiceMock->expects($this->any()) + $locationServiceMock->expects(self::any()) ->method('loadLocation') ->will( - $this->returnValue($this->getLocationMock()) + self::returnValue($this->getLocationMock()) ); $contentTypeServiceMock = $this->createMock(ContentTypeService::class); - $contentTypeServiceMock->expects($this->once()) + $contentTypeServiceMock->expects(self::once()) ->method('loadContentType') ->with(42) ->will( - $this->returnValue( + self::returnValue( $this ->getMockBuilder(ContentType::class) ->setConstructorArgs( @@ -81,23 +82,24 @@ private function generateRepositoryMockForContentTypeIdentifier($contentTypeIden $repository = $this->getRepositoryMock(); $repository - ->expects($this->any()) + ->expects(self::any()) ->method('getLocationService') - ->will($this->returnValue($locationServiceMock)); + ->will(self::returnValue($locationServiceMock)); $repository - ->expects($this->once()) + ->expects(self::once()) ->method('getContentTypeService') - ->will($this->returnValue($contentTypeServiceMock)); + ->will(self::returnValue($contentTypeServiceMock)); $repository - ->expects($this->any()) + ->expects(self::any()) ->method('getPermissionResolver') - ->will($this->returnValue($this->getPermissionResolverMock())); + ->will(self::returnValue($this->getPermissionResolverMock())); return $repository; } /** * @dataProvider matchLocationProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier\ParentContentType::matchLocation * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @covers \Ibexa\Core\MVC\RepositoryAware::setRepository @@ -110,7 +112,7 @@ public function testMatchLocation($matchingConfig, Repository $repository, $expe { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame( + self::assertSame( $expectedResult, $this->matcher->matchLocation($this->getLocationMock([ 'parentLocationId' => self::EXAMPLE_LOCATION_ID, @@ -146,6 +148,7 @@ public function matchLocationProvider() /** * @dataProvider matchLocationProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier\ParentContentType::matchLocation * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @covers \Ibexa\Core\MVC\RepositoryAware::setRepository @@ -158,7 +161,7 @@ public function testMatchContentInfo($matchingConfig, Repository $repository, $e { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame( + self::assertSame( $expectedResult, $this->matcher->matchContentInfo($this->getContentInfoMock([ 'mainLocationId' => self::EXAMPLE_LOCATION_ID, diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php index cd59972f87..84b170ccd1 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php @@ -35,10 +35,10 @@ protected function setUp(): void private function generateRepositoryMockForSectionIdentifier($sectionIdentifier) { $sectionServiceMock = $this->createMock(SectionService::class); - $sectionServiceMock->expects($this->once()) + $sectionServiceMock->expects(self::once()) ->method('loadSection') ->will( - $this->returnValue( + self::returnValue( $this ->getMockBuilder(Section::class) ->setConstructorArgs( @@ -52,19 +52,20 @@ private function generateRepositoryMockForSectionIdentifier($sectionIdentifier) $repository = $this->getRepositoryMock(); $repository - ->expects($this->once()) + ->expects(self::once()) ->method('getSectionService') - ->will($this->returnValue($sectionServiceMock)); + ->will(self::returnValue($sectionServiceMock)); $repository - ->expects($this->any()) + ->expects(self::any()) ->method('getPermissionResolver') - ->will($this->returnValue($this->getPermissionResolverMock())); + ->will(self::returnValue($this->getPermissionResolverMock())); return $repository; } /** * @dataProvider matchSectionProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier\Section::matchLocation * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @covers \Ibexa\Core\MVC\RepositoryAware::setRepository @@ -80,15 +81,15 @@ public function testMatchLocation($matchingConfig, Repository $repository, $expe $location = $this->getLocationMock(); $location - ->expects($this->once()) + ->expects(self::once()) ->method('getContentInfo') ->will( - $this->returnValue( + self::returnValue( $this->getContentInfoMock(['sectionId' => 1]) ) ); - $this->assertSame( + self::assertSame( $expectedResult, $this->matcher->matchLocation($location) ); @@ -122,6 +123,7 @@ public function matchSectionProvider() /** * @dataProvider matchSectionProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier\Section::matchLocation * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @covers \Ibexa\Core\MVC\RepositoryAware::setRepository @@ -134,7 +136,7 @@ public function testMatchContentInfo($matchingConfig, Repository $repository, $e { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame( + self::assertSame( $expectedResult, $this->matcher->matchContentInfo($this->getContentInfoMock(['sectionId' => 1])) ); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/IsPreviewTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/IsPreviewTest.php index 114ce35369..f77b0447de 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/IsPreviewTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/IsPreviewTest.php @@ -27,7 +27,7 @@ protected function setUp(): void } /** - * @return iterable + * @return iterable */ public static function getDataForTestMatch(): iterable { diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php index f1f5e820e8..734eddeb6a 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued; @@ -12,6 +13,7 @@ class MultipleValuedTest extends BaseTest { /** * @dataProvider matchingConfigProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::getValues */ @@ -20,11 +22,11 @@ public function testSetMatchingConfig($matchingConfig) $matcher = $this->getMultipleValuedMatcherMock(); $matcher->setMatchingConfig($matchingConfig); $values = $matcher->getValues(); - $this->assertIsArray($values); + self::assertIsArray($values); $matchingConfig = is_array($matchingConfig) ? $matchingConfig : [$matchingConfig]; foreach ($matchingConfig as $val) { - $this->assertContains($val, $values); + self::assertContains($val, $values); } } @@ -53,7 +55,7 @@ public function testInjectRepository() { $matcher = $this->getMultipleValuedMatcherMock(); $matcher->setRepository($this->repositoryMock); - $this->assertSame($this->repositoryMock, $matcher->getRepository()); + self::assertSame($this->repositoryMock, $matcher->getRepository()); } private function getMultipleValuedMatcherMock() diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php index e729b67dda..140df59248 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased; use Ibexa\Contracts\Core\Repository\Repository; @@ -25,6 +26,7 @@ protected function setUp(): void /** * @dataProvider setMatchingConfigProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\UrlAlias::setMatchingConfig * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @@ -34,7 +36,7 @@ protected function setUp(): void public function testSetMatchingConfig($matchingConfig, $expectedValues) { $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame( + self::assertSame( $this->matcher->getValues(), $expectedValues ); @@ -71,32 +73,33 @@ private function generateRepositoryMockForUrlAlias($path) ]; $urlAliasServiceMock = $this->createMock(URLAliasService::class); - $urlAliasServiceMock->expects($this->at(0)) + $urlAliasServiceMock->expects(self::at(0)) ->method('listLocationAliases') ->with( - $this->isInstanceOf(Location::class), + self::isInstanceOf(Location::class), true ) - ->will($this->returnValue([])); - $urlAliasServiceMock->expects($this->at(1)) + ->will(self::returnValue([])); + $urlAliasServiceMock->expects(self::at(1)) ->method('listLocationAliases') ->with( - $this->isInstanceOf(Location::class), + self::isInstanceOf(Location::class), false ) - ->will($this->returnValue($urlAliasList)); + ->will(self::returnValue($urlAliasList)); $repository = $this->getRepositoryMock(); $repository - ->expects($this->once()) + ->expects(self::once()) ->method('getURLAliasService') - ->will($this->returnValue($urlAliasServiceMock)); + ->will(self::returnValue($urlAliasServiceMock)); return $repository; } /** * @dataProvider matchLocationProvider + * * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\UrlAlias::matchLocation * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\UrlAlias::setMatchingConfig * @covers \Ibexa\Core\MVC\RepositoryAware::setRepository @@ -109,7 +112,7 @@ public function testMatchLocation($matchingConfig, Repository $repository, $expe { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); - $this->assertSame( + self::assertSame( $expectedResult, $this->matcher->matchLocation($this->getLocationMock()) ); diff --git a/tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php b/tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php index 3f944bbb25..6d8665ccd4 100644 --- a/tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php +++ b/tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Matcher; use Ibexa\Bundle\Core\DependencyInjection\Configuration\ConfigResolver; @@ -35,12 +36,12 @@ public function setUp(): void public function testMatch($parameterName, $namespace, $scope, $viewsConfiguration, $matchedConfig): void { $view = $this->createMock(ContentView::class); - $this->configResolver->expects($this->atLeastOnce())->method('getParameter')->with( + $this->configResolver->expects(self::atLeastOnce())->method('getParameter')->with( $parameterName, $namespace, $scope )->willReturn($viewsConfiguration); - $this->innerMatcherFactory->expects($this->once())->method('match')->with($view)->willReturn($matchedConfig); + $this->innerMatcherFactory->expects(self::once())->method('match')->with($view)->willReturn($matchedConfig); $matcherFactory = new DynamicallyConfiguredMatcherFactoryDecorator( $this->innerMatcherFactory, @@ -50,7 +51,7 @@ public function testMatch($parameterName, $namespace, $scope, $viewsConfiguratio $scope ); - $this->assertEquals($matchedConfig, $matcherFactory->match($view)); + self::assertEquals($matchedConfig, $matcherFactory->match($view)); } public function matchConfigProvider(): array diff --git a/tests/lib/MVC/Symfony/Routing/GeneratorTest.php b/tests/lib/MVC/Symfony/Routing/GeneratorTest.php index 28e4290837..b5a5ffe104 100644 --- a/tests/lib/MVC/Symfony/Routing/GeneratorTest.php +++ b/tests/lib/MVC/Symfony/Routing/GeneratorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Routing; use Ibexa\Core\MVC\Symfony\Routing\Generator; @@ -66,23 +67,23 @@ public function testSimpleGenerate($urlResource, array $parameters, $referenceTy $uri = '/some/thing'; $this->generator - ->expects($this->once()) + ->expects(self::once()) ->method('doGenerate') ->with($urlResource, $parameters) - ->will($this->returnValue($uri)); + ->will(self::returnValue($uri)); $fullUri = $baseUrl . $uri; $matcher - ->expects($this->once()) + ->expects(self::once()) ->method('analyseLink') ->with($uri) - ->will($this->returnValue($uri)); + ->will(self::returnValue($uri)); if ($referenceType === UrlGeneratorInterface::ABSOLUTE_URL) { $fullUri = $requestContext->getScheme() . '://' . $requestContext->getHost() . $baseUrl . $uri; } - $this->assertSame($fullUri, $this->generator->generate($urlResource, $parameters, $referenceType)); + self::assertSame($fullUri, $this->generator->generate($urlResource, $parameters, $referenceType)); } /** @@ -99,17 +100,17 @@ public function testGenerateWithSiteAccessNoReverseMatch($urlResource, array $pa $uri = '/some/thing'; $this->generator - ->expects($this->once()) + ->expects(self::once()) ->method('doGenerate') ->with($urlResource, $parameters) - ->will($this->returnValue($uri)); + ->will(self::returnValue($uri)); $fullUri = $baseUrl . $uri; $matcher - ->expects($this->once()) + ->expects(self::once()) ->method('analyseLink') ->with($uri) - ->will($this->returnValue($uri)); + ->will(self::returnValue($uri)); if ($referenceType === UrlGeneratorInterface::ABSOLUTE_URL) { $fullUri = $requestContext->getScheme() . '://' . $requestContext->getHost() . $baseUrl . $uri; @@ -117,14 +118,14 @@ public function testGenerateWithSiteAccessNoReverseMatch($urlResource, array $pa $siteAccessName = 'fake'; $this->siteAccessRouter - ->expects($this->once()) + ->expects(self::once()) ->method('matchByName') ->with($siteAccessName) - ->will($this->returnValue(null)); + ->will(self::returnValue(null)); $this->logger - ->expects($this->once()) + ->expects(self::once()) ->method('notice'); - $this->assertSame($fullUri, $this->generator->generate($urlResource, $parameters + ['siteaccess' => $siteAccessName], $referenceType)); + self::assertSame($fullUri, $this->generator->generate($urlResource, $parameters + ['siteaccess' => $siteAccessName], $referenceType)); } } diff --git a/tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php b/tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php index c4cdb0205e..e999a29a14 100644 --- a/tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php +++ b/tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Routing; use Ibexa\Core\MVC\Symfony\Event\RouteReferenceGenerationEvent; @@ -40,16 +41,16 @@ public function testGenerateNullResource() $event = new RouteReferenceGenerationEvent(new RouteReference($currentRouteName, $currentRouteParams), $request); $this->dispatcher - ->expects($this->once()) + ->expects(self::once()) ->method('dispatch') - ->with($this->equalTo($event), MVCEvents::ROUTE_REFERENCE_GENERATION); + ->with(self::equalTo($event), MVCEvents::ROUTE_REFERENCE_GENERATION); $generator = new RouteReferenceGenerator($this->dispatcher); $generator->setRequestStack($requestStack); $reference = $generator->generate(); - $this->assertInstanceOf(RouteReference::class, $reference); - $this->assertSame($currentRouteName, $reference->getRoute()); - $this->assertSame($currentRouteParams, $reference->getParams()); + self::assertInstanceOf(RouteReference::class, $reference); + self::assertSame($currentRouteName, $reference->getRoute()); + self::assertSame($currentRouteParams, $reference->getParams()); } public function testGenerateNullResourceAndPassedParams() @@ -67,16 +68,16 @@ public function testGenerateNullResourceAndPassedParams() $event = new RouteReferenceGenerationEvent(new RouteReference($currentRouteName, $expectedParams), $request); $this->dispatcher - ->expects($this->once()) + ->expects(self::once()) ->method('dispatch') - ->with($this->equalTo($event), MVCEvents::ROUTE_REFERENCE_GENERATION); + ->with(self::equalTo($event), MVCEvents::ROUTE_REFERENCE_GENERATION); $generator = new RouteReferenceGenerator($this->dispatcher); $generator->setRequestStack($requestStack); $reference = $generator->generate(null, $passedParams); - $this->assertInstanceOf(RouteReference::class, $reference); - $this->assertSame($currentRouteName, $reference->getRoute()); - $this->assertSame($expectedParams, $reference->getParams()); + self::assertInstanceOf(RouteReference::class, $reference); + self::assertSame($currentRouteName, $reference->getRoute()); + self::assertSame($expectedParams, $reference->getParams()); } /** @@ -95,16 +96,16 @@ public function testGenerate($resource, array $params) $event = new RouteReferenceGenerationEvent(new RouteReference($resource, $params), $request); $this->dispatcher - ->expects($this->once()) + ->expects(self::once()) ->method('dispatch') - ->with($this->equalTo($event), MVCEvents::ROUTE_REFERENCE_GENERATION); + ->with(self::equalTo($event), MVCEvents::ROUTE_REFERENCE_GENERATION); $generator = new RouteReferenceGenerator($this->dispatcher); $generator->setRequestStack($requestStack); $reference = $generator->generate($resource, $params); - $this->assertInstanceOf(RouteReference::class, $reference); - $this->assertSame($resource, $reference->getRoute()); - $this->assertSame($params, $reference->getParams()); + self::assertInstanceOf(RouteReference::class, $reference); + self::assertSame($resource, $reference->getRoute()); + self::assertSame($params, $reference->getParams()); } public function testGenerateNullResourceWithoutRoute() @@ -118,14 +119,14 @@ public function testGenerateNullResourceWithoutRoute() $event = new RouteReferenceGenerationEvent(new RouteReference(null, []), $request); $this->dispatcher - ->expects($this->once()) + ->expects(self::once()) ->method('dispatch') - ->with($this->equalTo($event), MVCEvents::ROUTE_REFERENCE_GENERATION); + ->with(self::equalTo($event), MVCEvents::ROUTE_REFERENCE_GENERATION); $generator = new RouteReferenceGenerator($this->dispatcher); $generator->setRequestStack($requestStack); $reference = $generator->generate(); - $this->assertInstanceOf(RouteReference::class, $reference); + self::assertInstanceOf(RouteReference::class, $reference); } public function generateGenerator() diff --git a/tests/lib/MVC/Symfony/Routing/RouteReferenceTest.php b/tests/lib/MVC/Symfony/Routing/RouteReferenceTest.php index 60c8249500..f3e054a6b0 100644 --- a/tests/lib/MVC/Symfony/Routing/RouteReferenceTest.php +++ b/tests/lib/MVC/Symfony/Routing/RouteReferenceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Routing; use Ibexa\Core\MVC\Symfony\Routing\RouteReference; @@ -16,8 +17,8 @@ public function testConstruct() $route = 'my_route'; $params = ['foo' => 'bar', 'some' => 'thing']; $reference = new RouteReference($route, $params); - $this->assertSame($route, $reference->getRoute()); - $this->assertSame($params, $reference->getParams()); + self::assertSame($route, $reference->getRoute()); + self::assertSame($params, $reference->getParams()); } public function testGetSetRoute() @@ -26,41 +27,41 @@ public function testGetSetRoute() $newRoute = 'bar'; $reference = new RouteReference($initialRoute); - $this->assertSame($initialRoute, $reference->getRoute()); + self::assertSame($initialRoute, $reference->getRoute()); $reference->setRoute($newRoute); - $this->assertSame($newRoute, $reference->getRoute()); + self::assertSame($newRoute, $reference->getRoute()); } public function testGetSetParams() { $reference = new RouteReference('foo'); - $this->assertSame([], $reference->getParams()); + self::assertSame([], $reference->getParams()); $reference->set('foo', 'bar'); - $this->assertSame('bar', $reference->get('foo')); + self::assertSame('bar', $reference->get('foo')); $obj = new \stdClass(); $reference->set('object', $obj); - $this->assertSame($obj, $reference->get('object')); + self::assertSame($obj, $reference->get('object')); $reference->set('bool', true); - $this->assertTrue($reference->get('bool')); - $this->assertSame( + self::assertTrue($reference->get('bool')); + self::assertSame( ['foo' => 'bar', 'object' => $obj, 'bool' => true], $reference->getParams() ); $defaultValue = 'http://www.phoenix-rises.fm'; - $this->assertSame($defaultValue, $reference->get('url', $defaultValue)); + self::assertSame($defaultValue, $reference->get('url', $defaultValue)); } public function testRemoveParam() { $reference = new RouteReference('foo'); $reference->set('foo', 'bar'); - $this->assertTrue($reference->has('foo')); - $this->assertSame('bar', $reference->get('foo')); + self::assertTrue($reference->has('foo')); + self::assertSame('bar', $reference->get('foo')); $reference->remove('foo'); - $this->assertFalse($reference->has('foo')); + self::assertFalse($reference->has('foo')); } } diff --git a/tests/lib/MVC/Symfony/Routing/SimplifiedRequestTest.php b/tests/lib/MVC/Symfony/Routing/SimplifiedRequestTest.php index 57d06dcab9..bcc841a063 100644 --- a/tests/lib/MVC/Symfony/Routing/SimplifiedRequestTest.php +++ b/tests/lib/MVC/Symfony/Routing/SimplifiedRequestTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Routing; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; diff --git a/tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php b/tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php index c7d8d2e00f..6493473d2f 100644 --- a/tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php +++ b/tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Routing; use Ibexa\Contracts\Core\Persistence\User\Handler as SPIUserHandler; @@ -71,17 +72,17 @@ protected function setUp(): void $this->urlAliasService = $this->createMock(URLAliasService::class); $this->locationService = $this->createMock(LocationService::class); $this->repository - ->expects($this->any()) + ->expects(self::any()) ->method('getURLAliasService') - ->will($this->returnValue($this->urlAliasService)); + ->will(self::returnValue($this->urlAliasService)); $this->repository - ->expects($this->any()) + ->expects(self::any()) ->method('getLocationService') - ->will($this->returnValue($this->locationService)); + ->will(self::returnValue($this->locationService)); $repository - ->expects($this->any()) + ->expects(self::any()) ->method('getPermissionResolver') - ->will($this->returnValue($this->getPermissionResolverMock())); + ->will(self::returnValue($this->getPermissionResolverMock())); $urlAliasCharmap = [ '"' => '%22', @@ -106,17 +107,17 @@ public function testGetPathPrefixByRootLocationId() $pathPrefix = '/foo/bar'; $rootUrlAlias = new URLAlias(['path' => $pathPrefix]); $this->locationService - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') ->with($rootLocationId) - ->will($this->returnValue($rootLocation)); + ->will(self::returnValue($rootLocation)); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('reverseLookup') ->with($rootLocation) - ->will($this->returnValue($rootUrlAlias)); + ->will(self::returnValue($rootUrlAlias)); - $this->assertSame($pathPrefix, $this->urlAliasGenerator->getPathPrefixByRootLocationId($rootLocationId)); + self::assertSame($pathPrefix, $this->urlAliasGenerator->getPathPrefixByRootLocationId($rootLocationId)); } /** @@ -131,7 +132,7 @@ public function testIsPrefixExcluded($uri, $expectedIsExcluded) '/something/in-the-way/', ] ); - $this->assertSame($expectedIsExcluded, $this->urlAliasGenerator->isUriPrefixExcluded($uri)); + self::assertSame($expectedIsExcluded, $this->urlAliasGenerator->isUriPrefixExcluded($uri)); } public function providerTestIsPrefixExcluded() @@ -156,10 +157,10 @@ public function testLoadLocation() $locationId = 123; $location = new Location(['id' => $locationId]); $this->locationService - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') ->with($locationId) - ->will($this->returnValue($location)); + ->will(self::returnValue($location)); $this->urlAliasGenerator->loadLocation($locationId); } @@ -170,14 +171,14 @@ public function testDoGenerate(URLAlias $urlAlias, array $parameters, $expected) { $location = new Location(['id' => 123]); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('listLocationAliases') ->with($location, false) - ->will($this->returnValue([$urlAlias])); + ->will(self::returnValue([$urlAlias])); $this->urlAliasGenerator->setSiteAccess(new SiteAccess('test', 'fake', $this->createMock(SiteAccess\URILexer::class))); - $this->assertSame($expected, $this->urlAliasGenerator->doGenerate($location, $parameters)); + self::assertSame($expected, $this->urlAliasGenerator->doGenerate($location, $parameters)); } public function providerTestDoGenerate() @@ -227,10 +228,10 @@ public function testDoGenerateWithSiteAccessParam(URLAlias $urlAlias, array $par ]; $this->configResolver - ->expects($this->any()) + ->expects(self::any()) ->method('getParameter') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['languages', null, 'foo', $languages], ['languages', null, 'bar', $languages], @@ -242,10 +243,10 @@ public function testDoGenerateWithSiteAccessParam(URLAlias $urlAlias, array $par $location = new Location(['id' => 123]); $this->urlAliasService - ->expects($this->exactly(1)) + ->expects(self::exactly(1)) ->method('listLocationAliases') ->will( - $this->returnValueMap( + self::returnValueMap( [ [$location, false, null, null, $languages, [$urlAlias]], ] @@ -253,20 +254,20 @@ public function testDoGenerateWithSiteAccessParam(URLAlias $urlAlias, array $par ); $this->locationService - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') ->will( - $this->returnCallback( + self::returnCallback( static function ($locationId) { return new Location(['id' => $locationId]); } ) ); $this->urlAliasService - ->expects($this->exactly(1)) + ->expects(self::exactly(1)) ->method('reverseLookup') ->will( - $this->returnCallback( + self::returnCallback( static function ($location) use ($treeRootUrlAlias) { return $treeRootUrlAlias[$location->id]; } @@ -275,7 +276,7 @@ static function ($location) use ($treeRootUrlAlias) { $this->urlAliasGenerator->setSiteAccess(new SiteAccess('test', 'fake', $this->createMock(SiteAccess\URILexer::class))); - $this->assertSame($expected, $this->urlAliasGenerator->doGenerate($location, $parameters)); + self::assertSame($expected, $this->urlAliasGenerator->doGenerate($location, $parameters)); } public function providerTestDoGenerateWithSiteaccess() @@ -402,20 +403,20 @@ public function testDoGenerateNoUrlAlias() $location = new Location(['id' => 123, 'contentInfo' => new ContentInfo(['id' => 456])]); $uri = "/content/location/$location->id"; $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('listLocationAliases') ->with($location, false) - ->will($this->returnValue([])); + ->will(self::returnValue([])); $this->router - ->expects($this->once()) + ->expects(self::once()) ->method('generate') ->with( UrlAliasGenerator::INTERNAL_CONTENT_VIEW_ROUTE, ['contentId' => $location->contentId, 'locationId' => $location->id] ) - ->will($this->returnValue($uri)); + ->will(self::returnValue($uri)); - $this->assertSame($uri, $this->urlAliasGenerator->doGenerate($location, [])); + self::assertSame($uri, $this->urlAliasGenerator->doGenerate($location, [])); } /** @@ -432,29 +433,29 @@ public function testDoGenerateRootLocation(URLAlias $urlAlias, $isOutsideAndNotE $rootLocation = new Location(['id' => $rootLocationId]); $rootUrlAlias = new URLAlias(['path' => $pathPrefix]); $this->locationService - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') ->with($rootLocationId) - ->will($this->returnValue($rootLocation)); + ->will(self::returnValue($rootLocation)); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('reverseLookup') ->with($rootLocation) - ->will($this->returnValue($rootUrlAlias)); + ->will(self::returnValue($rootUrlAlias)); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('listLocationAliases') ->with($location, false) - ->will($this->returnValue([$urlAlias])); + ->will(self::returnValue([$urlAlias])); if ($isOutsideAndNotExcluded) { $this->logger - ->expects($this->once()) + ->expects(self::once()) ->method('warning'); } - $this->assertSame($expected, $this->urlAliasGenerator->doGenerate($location, [])); + self::assertSame($expected, $this->urlAliasGenerator->doGenerate($location, [])); } public function providerTestDoGenerateRootLocation() diff --git a/tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php b/tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php index 2a6f85f483..a467ee81e4 100644 --- a/tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php +++ b/tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Routing; use Ibexa\Contracts\Core\Repository\ContentService; @@ -100,14 +101,14 @@ protected function getRouter(LocationService $locationService, URLAliasService $ public function testRequestContext() { - $this->assertSame($this->requestContext, $this->router->getContext()); + self::assertSame($this->requestContext, $this->router->getContext()); $newContext = new RequestContext(); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('setRequestContext') ->with($newContext); $this->router->setContext($newContext); - $this->assertSame($newContext, $this->router->getContext()); + self::assertSame($newContext, $this->router->getContext()); } public function testMatch() @@ -122,7 +123,7 @@ public function testMatch() */ public function testSupports($routeReference, $isSupported) { - $this->assertSame($isSupported, $this->router->supports($routeReference)); + self::assertSame($isSupported, $this->router->supports($routeReference)); } public function providerTestSupports() @@ -137,7 +138,7 @@ public function providerTestSupports() public function testGetRouteCollection() { - $this->assertInstanceOf(RouteCollection::class, $this->router->getRouteCollection()); + self::assertInstanceOf(RouteCollection::class, $this->router->getRouteCollection()); } /** @@ -175,14 +176,14 @@ public function testMatchRequestLocation() ); $request = $this->getRequestByPathInfo($pathInfo); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('lookup') ->with($pathInfo) - ->will($this->returnValue($urlAlias)); + ->will(self::returnValue($urlAlias)); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') - ->will($this->returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); + ->will(self::returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); $expected = [ '_route' => UrlAliasRouter::URL_ALIAS_ROUTE_NAME, @@ -192,7 +193,7 @@ public function testMatchRequestLocation() 'viewType' => ViewManager::VIEW_TYPE_FULL, 'layout' => true, ]; - $this->assertEquals($expected, $this->router->matchRequest($request)); + self::assertEquals($expected, $this->router->matchRequest($request)); } public function testMatchRequestLocationWithCaseRedirect() @@ -210,19 +211,19 @@ public function testMatchRequestLocationWithCaseRedirect() ); $request = $this->getRequestByPathInfo($pathInfo); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('isUriPrefixExcluded') ->with($pathInfo) - ->will($this->returnValue(false)); + ->will(self::returnValue(false)); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('lookup') ->with($pathInfo) - ->will($this->returnValue($urlAlias)); + ->will(self::returnValue($urlAlias)); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') - ->will($this->returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); + ->will(self::returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); $expected = [ '_route' => UrlAliasRouter::URL_ALIAS_ROUTE_NAME, @@ -234,7 +235,7 @@ public function testMatchRequestLocationWithCaseRedirect() 'needsRedirect' => true, 'semanticPathinfo' => $urlAliasPath, ]; - $this->assertEquals($expected, $this->router->matchRequest($request)); + self::assertEquals($expected, $this->router->matchRequest($request)); } public function testMatchRequestLocationWrongCaseUriPrefixExcluded() @@ -252,19 +253,19 @@ public function testMatchRequestLocationWrongCaseUriPrefixExcluded() ); $request = $this->getRequestByPathInfo($pathInfo); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('isUriPrefixExcluded') ->with($pathInfo) - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('lookup') ->with($pathInfo) - ->will($this->returnValue($urlAlias)); + ->will(self::returnValue($urlAlias)); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') - ->will($this->returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); + ->will(self::returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); $expected = [ '_route' => UrlAliasRouter::URL_ALIAS_ROUTE_NAME, @@ -276,7 +277,7 @@ public function testMatchRequestLocationWrongCaseUriPrefixExcluded() 'needsRedirect' => true, 'semanticPathinfo' => $urlAliasPath, ]; - $this->assertEquals($expected, $this->router->matchRequest($request)); + self::assertEquals($expected, $this->router->matchRequest($request)); } public function testMatchRequestLocationCorrectCaseUriPrefixExcluded() @@ -293,19 +294,19 @@ public function testMatchRequestLocationCorrectCaseUriPrefixExcluded() ); $request = $this->getRequestByPathInfo($pathInfo); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('isUriPrefixExcluded') ->with($pathInfo) - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('lookup') ->with($pathInfo) - ->will($this->returnValue($urlAlias)); + ->will(self::returnValue($urlAlias)); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') - ->will($this->returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); + ->will(self::returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); $expected = [ '_route' => UrlAliasRouter::URL_ALIAS_ROUTE_NAME, @@ -315,9 +316,9 @@ public function testMatchRequestLocationCorrectCaseUriPrefixExcluded() 'viewType' => ViewManager::VIEW_TYPE_FULL, 'layout' => true, ]; - $this->assertEquals($expected, $this->router->matchRequest($request)); - $this->assertFalse($request->attributes->has('needsRedirect')); - $this->assertSame($pathInfo, $request->attributes->get('semanticPathinfo')); + self::assertEquals($expected, $this->router->matchRequest($request)); + self::assertFalse($request->attributes->has('needsRedirect')); + self::assertSame($pathInfo, $request->attributes->get('semanticPathinfo')); } public function testMatchRequestLocationHistory() @@ -339,19 +340,19 @@ public function testMatchRequestLocationHistory() ); $request = $this->getRequestByPathInfo($pathInfo); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('lookup') ->with($pathInfo) - ->will($this->returnValue($urlAlias)); + ->will(self::returnValue($urlAlias)); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('generate') ->with($destinationLocation) - ->will($this->returnValue($newPathInfo)); + ->will(self::returnValue($newPathInfo)); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') - ->will($this->returnValue($destinationLocation)); + ->will(self::returnValue($destinationLocation)); $expected = [ '_route' => UrlAliasRouter::URL_ALIAS_ROUTE_NAME, @@ -364,7 +365,7 @@ public function testMatchRequestLocationHistory() 'semanticPathinfo' => $newPathInfo, 'prependSiteaccessOnRedirect' => false, ]; - $this->assertEquals($expected, $this->router->matchRequest($request)); + self::assertEquals($expected, $this->router->matchRequest($request)); } public function testMatchRequestLocationCustom() @@ -383,14 +384,14 @@ public function testMatchRequestLocationCustom() ); $request = $this->getRequestByPathInfo($pathInfo); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('lookup') ->with($pathInfo) - ->will($this->returnValue($urlAlias)); + ->will(self::returnValue($urlAlias)); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') - ->will($this->returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); + ->will(self::returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); $expected = [ '_route' => UrlAliasRouter::URL_ALIAS_ROUTE_NAME, @@ -400,7 +401,7 @@ public function testMatchRequestLocationCustom() 'viewType' => ViewManager::VIEW_TYPE_FULL, 'layout' => true, ]; - $this->assertEquals($expected, $this->router->matchRequest($request)); + self::assertEquals($expected, $this->router->matchRequest($request)); } public function testMatchRequestLocationCustomForward() @@ -424,26 +425,26 @@ public function testMatchRequestLocationCustomForward() ); $request = $this->getRequestByPathInfo($pathInfo); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('lookup') ->with($pathInfo) - ->will($this->returnValue($urlAlias)); + ->will(self::returnValue($urlAlias)); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') ->with($destinationId) ->will( - $this->returnValue($destinationLocation) + self::returnValue($destinationLocation) ); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('generate') ->with($destinationLocation) - ->will($this->returnValue($newPathInfo)); + ->will(self::returnValue($newPathInfo)); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') - ->will($this->returnValue($destinationLocation)); + ->will(self::returnValue($destinationLocation)); $expected = [ '_route' => UrlAliasRouter::URL_ALIAS_ROUTE_NAME, @@ -456,7 +457,7 @@ public function testMatchRequestLocationCustomForward() 'semanticPathinfo' => $newPathInfo, 'prependSiteaccessOnRedirect' => false, ]; - $this->assertEquals($expected, $this->router->matchRequest($request)); + self::assertEquals($expected, $this->router->matchRequest($request)); } public function testMatchRequestFail() @@ -466,10 +467,10 @@ public function testMatchRequestFail() $pathInfo = '/foo/bar'; $request = $this->getRequestByPathInfo($pathInfo); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('lookup') ->with($pathInfo) - ->will($this->throwException(new NotFoundException('URLAlias', $pathInfo))); + ->will(self::throwException(new NotFoundException('URLAlias', $pathInfo))); $this->router->matchRequest($request); } @@ -486,17 +487,17 @@ public function testMatchRequestResource() ); $request = $this->getRequestByPathInfo($pathInfo); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('lookup') ->with($pathInfo) - ->will($this->returnValue($urlAlias)); + ->will(self::returnValue($urlAlias)); $expected = [ '_route' => UrlAliasRouter::URL_ALIAS_ROUTE_NAME, 'semanticPathinfo' => $destination, 'needsForward' => true, ]; - $this->assertEquals($expected, $this->router->matchRequest($request)); + self::assertEquals($expected, $this->router->matchRequest($request)); } public function testMatchRequestResourceWithRedirect() @@ -513,17 +514,17 @@ public function testMatchRequestResourceWithRedirect() ); $request = $this->getRequestByPathInfo($pathInfo); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('lookup') ->with($pathInfo) - ->will($this->returnValue($urlAlias)); + ->will(self::returnValue($urlAlias)); $expected = [ '_route' => UrlAliasRouter::URL_ALIAS_ROUTE_NAME, 'needsRedirect' => true, 'semanticPathinfo' => $destination, ]; - $this->assertEquals($expected, $this->router->matchRequest($request)); + self::assertEquals($expected, $this->router->matchRequest($request)); } public function testMatchRequestResourceWithCaseRedirect() @@ -541,22 +542,22 @@ public function testMatchRequestResourceWithCaseRedirect() ); $request = $this->getRequestByPathInfo($pathInfo); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('isUriPrefixExcluded') ->with($pathInfo) - ->will($this->returnValue(false)); + ->will(self::returnValue(false)); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('lookup') ->with($pathInfo) - ->will($this->returnValue($urlAlias)); + ->will(self::returnValue($urlAlias)); $expected = [ '_route' => UrlAliasRouter::URL_ALIAS_ROUTE_NAME, 'semanticPathinfo' => $urlAliasPath, 'needsRedirect' => true, ]; - $this->assertEquals($expected, $this->router->matchRequest($request)); + self::assertEquals($expected, $this->router->matchRequest($request)); } /** @@ -578,17 +579,17 @@ public function testMatchRequestResourceCaseIncorrectWithForwardRedirect() ); $request = $this->getRequestByPathInfo($pathInfo); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('lookup') ->with($pathInfo) - ->will($this->returnValue($urlAlias)); + ->will(self::returnValue($urlAlias)); $expected = [ '_route' => UrlAliasRouter::URL_ALIAS_ROUTE_NAME, 'semanticPathinfo' => $destination, 'needsRedirect' => true, ]; - $this->assertEquals($expected, $this->router->matchRequest($request)); + self::assertEquals($expected, $this->router->matchRequest($request)); } public function testMatchRequestVirtual() @@ -602,17 +603,17 @@ public function testMatchRequestVirtual() ); $request = $this->getRequestByPathInfo($pathInfo); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('lookup') ->with($pathInfo) - ->will($this->returnValue($urlAlias)); + ->will(self::returnValue($urlAlias)); $expected = [ '_route' => UrlAliasRouter::URL_ALIAS_ROUTE_NAME, 'semanticPathinfo' => '/', 'needsForward' => true, ]; - $this->assertEquals($expected, $this->router->matchRequest($request)); + self::assertEquals($expected, $this->router->matchRequest($request)); } public function testMatchRequestVirtualWithCaseRedirect() @@ -627,22 +628,22 @@ public function testMatchRequestVirtualWithCaseRedirect() ); $request = $this->getRequestByPathInfo($pathInfo); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('isUriPrefixExcluded') ->with($pathInfo) - ->will($this->returnValue(false)); + ->will(self::returnValue(false)); $this->urlAliasService - ->expects($this->once()) + ->expects(self::once()) ->method('lookup') ->with($pathInfo) - ->will($this->returnValue($urlAlias)); + ->will(self::returnValue($urlAlias)); $expected = [ '_route' => UrlAliasRouter::URL_ALIAS_ROUTE_NAME, 'semanticPathinfo' => $urlAliasPath, 'needsRedirect' => true, ]; - $this->assertEquals($expected, $this->router->matchRequest($request)); + self::assertEquals($expected, $this->router->matchRequest($request)); } public function testGenerateFail() @@ -663,12 +664,12 @@ public function testGenerateWithRouteObject(): void $generatedLink = '/foo/bar'; $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('generate') ->with($location, $parameters, $referenceType) - ->will($this->returnValue($generatedLink)); + ->will(self::returnValue($generatedLink)); - $this->assertSame( + self::assertSame( $generatedLink, $this->router->generate( '', @@ -702,16 +703,16 @@ public function testGenerateWithLocationId() $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH; $generatedLink = '/foo/bar'; $this->locationService - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') ->with($locationId) - ->will($this->returnValue($location)); + ->will(self::returnValue($location)); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('generate') ->with($location, $parameters, $referenceType) - ->will($this->returnValue($generatedLink)); - $this->assertSame( + ->will(self::returnValue($generatedLink)); + self::assertSame( $generatedLink, $this->router->generate( UrlAliasRouter::URL_ALIAS_ROUTE_NAME, @@ -729,11 +730,11 @@ public function testGenerateWithLocationAsParameter() $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH; $generatedLink = '/foo/bar'; $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('generate') ->with($location, $parameters, $referenceType) - ->will($this->returnValue($generatedLink)); - $this->assertSame( + ->will(self::returnValue($generatedLink)); + self::assertSame( $generatedLink, $this->router->generate( UrlAliasRouter::URL_ALIAS_ROUTE_NAME, @@ -753,21 +754,21 @@ public function testGenerateWithContentId() $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH; $generatedLink = '/foo/bar'; $this->contentService - ->expects($this->once()) + ->expects(self::once()) ->method('loadContentInfo') ->with($contentId) - ->will($this->returnValue($contentInfo)); + ->will(self::returnValue($contentInfo)); $this->locationService - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') ->with($contentInfo->mainLocationId) - ->will($this->returnValue($location)); + ->will(self::returnValue($location)); $this->urlALiasGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('generate') ->with($location, $parameters, $referenceType) - ->will($this->returnValue($generatedLink)); - $this->assertSame( + ->will(self::returnValue($generatedLink)); + self::assertSame( $generatedLink, $this->router->generate( UrlAliasRouter::URL_ALIAS_ROUTE_NAME, @@ -786,10 +787,10 @@ public function testGenerateWithContentIdWithMissingMainLocation() $parameters = ['some' => 'thing']; $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH; $this->contentService - ->expects($this->once()) + ->expects(self::once()) ->method('loadContentInfo') ->with($contentId) - ->will($this->returnValue($contentInfo)); + ->will(self::returnValue($contentInfo)); $this->router->generate( UrlAliasRouter::URL_ALIAS_ROUTE_NAME, diff --git a/tests/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProviderTest.php b/tests/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProviderTest.php index f9a4a26a3f..c5d2a433d5 100644 --- a/tests/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProviderTest.php +++ b/tests/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProviderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Security\Authentication; use Ibexa\Contracts\Core\Repository\PermissionResolver; @@ -33,13 +34,13 @@ public function testAuthenticate() { $anonymousUserId = 10; $this->configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('anonymous_user_id') - ->will($this->returnValue($anonymousUserId)); + ->will(self::returnValue($anonymousUserId)); $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('setCurrentUserReference') ->with(new UserReference($anonymousUserId)); @@ -51,7 +52,7 @@ public function testAuthenticate() ->getMockBuilder(AnonymousToken::class) ->setConstructorArgs([$key, $this->createMock(UserInterface::class)]) ->getMockForAbstractClass(); - $this->assertSame($anonymousToken, $authProvider->authenticate($anonymousToken)); + self::assertSame($anonymousToken, $authProvider->authenticate($anonymousToken)); } } diff --git a/tests/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandlerTest.php b/tests/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandlerTest.php index d410ada7dc..b48077592a 100644 --- a/tests/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandlerTest.php +++ b/tests/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Security\Authentication; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; @@ -36,15 +37,15 @@ public function testSetConfigResolver() $refOptions = $refHandler->getProperty('options'); $refOptions->setAccessible(true); $options = $refOptions->getValue($successHandler); - $this->assertSame('/', $options['default_target_path']); + self::assertSame('/', $options['default_target_path']); $defaultPage = '/foo/bar'; $configResolver = $this->createMock(ConfigResolverInterface::class); $configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('default_page') - ->will($this->returnValue($defaultPage)); + ->will(self::returnValue($defaultPage)); $successHandler->setConfigResolver($configResolver); $successHandler->setEventDispatcher($this->createMock(EventDispatcherInterface::class)); @@ -59,7 +60,7 @@ public function testSetConfigResolver() $successHandler->onAuthenticationSuccess($request, $this->createMock(TokenInterface::class)); $options = $refOptions->getValue($successHandler); - $this->assertSame($defaultPage, $options['default_target_path']); + self::assertSame($defaultPage, $options['default_target_path']); } } diff --git a/tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php b/tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php index 53aaee14e4..50a90fe430 100644 --- a/tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php +++ b/tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Security\Authentication; use Ibexa\Contracts\Core\Repository\PermissionResolver; @@ -57,18 +58,18 @@ public function testAuthenticateWrongProviderKey() $user = $this->createMock(UserInterface::class); $user - ->expects($this->any()) + ->expects(self::any()) ->method('getRoles') - ->will($this->returnValue([])); + ->will(self::returnValue([])); $rememberMeToken = $this ->getMockBuilder(RememberMeToken::class) ->setConstructorArgs([$user, 'wrong provider secret', 'my secret']) ->getMock(); $rememberMeToken - ->expects($this->any()) + ->expects(self::any()) ->method('getProviderKey') - ->will($this->returnValue('wrong provider secret')); + ->will(self::returnValue('wrong provider secret')); $this->authProvider->authenticate($rememberMeToken); } @@ -79,22 +80,22 @@ public function testAuthenticateWrongSecret() $user = $this->createMock(UserInterface::class); $user - ->expects($this->any()) + ->expects(self::any()) ->method('getRoles') - ->will($this->returnValue([])); + ->will(self::returnValue([])); $rememberMeToken = $this ->getMockBuilder(RememberMeToken::class) ->setConstructorArgs([$user, 'my provider secret', 'the wrong secret']) ->getMock(); $rememberMeToken - ->expects($this->any()) + ->expects(self::any()) ->method('getProviderKey') - ->will($this->returnValue('my provider secret')); + ->will(self::returnValue('my provider secret')); $rememberMeToken - ->expects($this->any()) + ->expects(self::any()) ->method('getSecret') - ->will($this->returnValue('the wrong secret')); + ->will(self::returnValue('the wrong secret')); $this->authProvider->authenticate($rememberMeToken); } @@ -103,15 +104,15 @@ public function testAuthenticate() { $apiUser = $this->createMock(ApiUser::class); $apiUser - ->expects($this->any()) + ->expects(self::any()) ->method('getUserId') - ->will($this->returnValue(42)); + ->will(self::returnValue(42)); $tokenUser = new User($apiUser); $rememberMeToken = new RememberMeToken($tokenUser, 'my provider secret', 'my secret'); $authenticatedToken = $this->authProvider->authenticate($rememberMeToken); - $this->assertEquals( + self::assertEquals( [$rememberMeToken->getProviderKey(), $rememberMeToken->getSecret(), $rememberMeToken->getUsername()], [$authenticatedToken->getProviderKey(), $authenticatedToken->getSecret(), $authenticatedToken->getUsername()] ); diff --git a/tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php b/tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php index 2fc7f3f009..97312b75a2 100644 --- a/tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php +++ b/tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Security\Authentication; use Ibexa\Bundle\Core\DependencyInjection\Compiler\SecurityPass; @@ -74,15 +75,15 @@ public function testAuthenticationNotEzUser() $password = 'some_encoded_password'; $user = $this->createMock(UserInterface::class); $user - ->expects($this->any()) + ->expects(self::any()) ->method('getPassword') - ->will($this->returnValue($password)); + ->will(self::returnValue($password)); $tokenUser = $this->createMock(UserInterface::class); $tokenUser - ->expects($this->any()) + ->expects(self::any()) ->method('getPassword') - ->will($this->returnValue($password)); + ->will(self::returnValue($password)); $token = new UsernamePasswordToken($tokenUser, 'foo', 'bar'); $method = new \ReflectionMethod($this->authProvider, 'checkAuthentication'); @@ -99,9 +100,9 @@ public function testCheckAuthenticationCredentialsChanged() ->setMethods(['getUserId']) ->getMockForAbstractClass(); $apiUser - ->expects($this->once()) + ->expects(self::once()) ->method('getUserId') - ->will($this->returnValue(456)); + ->will(self::returnValue(456)); $tokenUser = new User($apiUser); $token = new UsernamePasswordToken($tokenUser, 'foo', 'bar'); @@ -111,9 +112,9 @@ public function testCheckAuthenticationCredentialsChanged() $user = $this->createMock(User::class); $user - ->expects($this->any()) + ->expects(self::any()) ->method('getAPIUser') - ->will($this->returnValue($renewedApiUser)); + ->will(self::returnValue($renewedApiUser)); $method = new \ReflectionMethod($this->authProvider, 'checkAuthentication'); $method->setAccessible(true); @@ -133,12 +134,12 @@ public function testCheckAuthenticationAlreadyLoggedIn() $user = $this->createMock(User::class); $user - ->expects($this->once()) + ->expects(self::once()) ->method('getAPIUser') - ->will($this->returnValue($apiUser)); + ->will(self::returnValue($apiUser)); $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('setCurrentUserReference') ->with($apiUser); @@ -160,7 +161,7 @@ public function testCheckAuthenticationFailed() $token = new UsernamePasswordToken($userName, $password, 'bar'); $this->userService - ->expects($this->once()) + ->expects(self::once()) ->method('checkUserCredentials') ->with($apiUser, $password) ->willReturn(false); @@ -182,13 +183,13 @@ public function testCheckAuthentication() ->willReturn($apiUser); $this->userService - ->expects($this->once()) + ->expects(self::once()) ->method('checkUserCredentials') ->with($apiUser, $password) ->willReturn(true); $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('setCurrentUserReference') ->with($apiUser); @@ -213,7 +214,7 @@ public function testCheckAuthenticationFailedWhenPasswordInUnsupportedFormat() ->willReturn($user); $this->userService - ->expects($this->once()) + ->expects(self::once()) ->method('checkUserCredentials') ->with($apiUser, $password) ->willThrowException(new UnsupportedPasswordHashType(self::UNSUPPORTED_USER_PASSWORD_HASH_TYPE)); diff --git a/tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php b/tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php index 1cf8624b4b..584d03d8c5 100644 --- a/tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php +++ b/tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Security\EventListener; use Ibexa\Contracts\Core\Repository\PermissionResolver; @@ -78,7 +79,7 @@ protected function generateListener() public function testGetSubscribedEvents() { - $this->assertSame( + self::assertSame( [ SecurityEvents::INTERACTIVE_LOGIN => [ ['onInteractiveLogin', 10], @@ -95,13 +96,13 @@ public function testOnInteractiveLoginAlreadyEzUser() $user = $this->createMock(UserInterface::class); $token = $this->createMock(TokenInterface::class); $token - ->expects($this->once()) + ->expects(self::once()) ->method('getUser') - ->will($this->returnValue($user)); + ->will(self::returnValue($user)); $event = new BaseInteractiveLoginEvent(new Request(), $token); $this->eventDispatcher - ->expects($this->never()) + ->expects(self::never()) ->method('dispatch'); $this->listener->onInteractiveLogin($event); @@ -112,13 +113,13 @@ public function testOnInteractiveLoginNotUserObject() $user = 'foobar'; $token = $this->createMock(TokenInterface::class); $token - ->expects($this->once()) + ->expects(self::once()) ->method('getUser') - ->will($this->returnValue($user)); + ->will(self::returnValue($user)); $event = new BaseInteractiveLoginEvent(new Request(), $token); $this->eventDispatcher - ->expects($this->never()) + ->expects(self::never()) ->method('dispatch'); $this->listener->onInteractiveLogin($event); @@ -129,43 +130,43 @@ public function testOnInteractiveLogin() $user = $this->createMock(SymfonyUserInterface::class); $token = $this->createMock(TokenInterface::class); $token - ->expects($this->once()) + ->expects(self::once()) ->method('getUser') - ->will($this->returnValue($user)); + ->will(self::returnValue($user)); $token - ->expects($this->once()) + ->expects(self::once()) ->method('getRoleNames') - ->will($this->returnValue(['ROLE_USER'])); + ->will(self::returnValue(['ROLE_USER'])); $token - ->expects($this->once()) + ->expects(self::once()) ->method('getAttributes') - ->will($this->returnValue(['foo' => 'bar'])); + ->will(self::returnValue(['foo' => 'bar'])); $event = new BaseInteractiveLoginEvent(new Request(), $token); $anonymousUserId = 10; $this->configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('anonymous_user_id') - ->will($this->returnValue($anonymousUserId)); + ->will(self::returnValue($anonymousUserId)); $apiUser = $this->createMock(APIUser::class); $this->userService - ->expects($this->once()) + ->expects(self::once()) ->method('loadUser') ->with($anonymousUserId) - ->will($this->returnValue($apiUser)); + ->will(self::returnValue($apiUser)); $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('setCurrentUserReference') ->with($apiUser); $this->tokenStorage - ->expects($this->once()) + ->expects(self::once()) ->method('setToken') - ->with($this->isInstanceOf(InteractiveLoginToken::class)); + ->with(self::isInstanceOf(InteractiveLoginToken::class)); $this->listener->onInteractiveLogin($event); } @@ -177,19 +178,19 @@ public function testCheckSiteAccessPermissionDenied() $user = $this->createMock(UserInterface::class); $token = $this->createMock(TokenInterface::class); $token - ->expects($this->once()) + ->expects(self::once()) ->method('getUser') - ->will($this->returnValue($user)); + ->will(self::returnValue($user)); $request = new Request(); $siteAccess = new SiteAccess('test'); $request->attributes->set('siteaccess', $siteAccess); $this->authChecker - ->expects($this->once()) + ->expects(self::once()) ->method('isGranted') - ->with($this->equalTo(new Attribute('user', 'login', ['valueObject' => $siteAccess]))) - ->will($this->returnValue(false)); + ->with(self::equalTo(new Attribute('user', 'login', ['valueObject' => $siteAccess]))) + ->will(self::returnValue(false)); $this->listener->checkSiteAccessPermission(new BaseInteractiveLoginEvent($request, $token)); } @@ -199,19 +200,19 @@ public function testCheckSiteAccessPermissionGranted() $user = $this->createMock(UserInterface::class); $token = $this->createMock(TokenInterface::class); $token - ->expects($this->once()) + ->expects(self::once()) ->method('getUser') - ->will($this->returnValue($user)); + ->will(self::returnValue($user)); $request = new Request(); $siteAccess = new SiteAccess('test'); $request->attributes->set('siteaccess', $siteAccess); $this->authChecker - ->expects($this->once()) + ->expects(self::once()) ->method('isGranted') - ->with($this->equalTo(new Attribute('user', 'login', ['valueObject' => $siteAccess]))) - ->will($this->returnValue(true)); + ->with(self::equalTo(new Attribute('user', 'login', ['valueObject' => $siteAccess]))) + ->will(self::returnValue(true)); // Nothing should happen or should be returned. $this->listener->checkSiteAccessPermission(new BaseInteractiveLoginEvent($request, $token)); @@ -222,16 +223,16 @@ public function testCheckSiteAccessNotEzUser() $user = $this->createMock(SymfonyUserInterface::class); $token = $this->createMock(TokenInterface::class); $token - ->expects($this->once()) + ->expects(self::once()) ->method('getUser') - ->will($this->returnValue($user)); + ->will(self::returnValue($user)); $request = new Request(); $siteAccess = new SiteAccess('test'); $request->attributes->set('siteaccess', $siteAccess); $this->authChecker - ->expects($this->never()) + ->expects(self::never()) ->method('isGranted'); $this->listener->checkSiteAccessPermission(new BaseInteractiveLoginEvent($request, $token)); @@ -242,12 +243,12 @@ public function testCheckSiteAccessNoSiteAccess() $user = $this->createMock(UserInterface::class); $token = $this->createMock(TokenInterface::class); $token - ->expects($this->once()) + ->expects(self::once()) ->method('getUser') - ->will($this->returnValue($user)); + ->will(self::returnValue($user)); $this->authChecker - ->expects($this->never()) + ->expects(self::never()) ->method('isGranted'); $this->listener->checkSiteAccessPermission(new BaseInteractiveLoginEvent(new Request(), $token)); @@ -262,10 +263,10 @@ public function testOnKernelRequestSubRequest() ); $this->tokenStorage - ->expects($this->never()) + ->expects(self::never()) ->method('getToken'); $this->authChecker - ->expects($this->never()) + ->expects(self::never()) ->method('isGranted'); $this->listener->onKernelRequest($event); @@ -279,14 +280,14 @@ public function testOnKernelRequestSubRequestFragment() HttpKernelInterface::MASTER_REQUEST ); $this->configResolver - ->expects($this->never()) + ->expects(self::never()) ->method('getParameter'); $this->tokenStorage - ->expects($this->never()) + ->expects(self::never()) ->method('getToken'); $this->authChecker - ->expects($this->never()) + ->expects(self::never()) ->method('isGranted'); $this->listener->onKernelRequest($event); @@ -301,10 +302,10 @@ public function testOnKernelRequestNoSiteAccess() ); $this->tokenStorage - ->expects($this->never()) + ->expects(self::never()) ->method('getToken'); $this->authChecker - ->expects($this->never()) + ->expects(self::never()) ->method('isGranted'); $this->listener->onKernelRequest($event); @@ -321,11 +322,11 @@ public function testOnKernelRequestNullToken() ); $this->tokenStorage - ->expects($this->once()) + ->expects(self::once()) ->method('getToken') - ->will($this->returnValue(null)); + ->will(self::returnValue(null)); $this->authChecker - ->expects($this->never()) + ->expects(self::never()) ->method('isGranted'); $this->listener->onKernelRequest($event); @@ -343,11 +344,11 @@ public function testOnKernelRequestLoginRoute() ); $this->tokenStorage - ->expects($this->once()) + ->expects(self::once()) ->method('getToken') - ->will($this->returnValue(null)); + ->will(self::returnValue(null)); $this->authChecker - ->expects($this->never()) + ->expects(self::never()) ->method('isGranted'); $this->listener->onKernelRequest($event); @@ -367,18 +368,18 @@ public function testOnKernelRequestAccessDenied() $token = $this->createMock(TokenInterface::class); $token - ->expects($this->any()) + ->expects(self::any()) ->method('getUsername') - ->will($this->returnValue('foo')); + ->will(self::returnValue('foo')); $this->tokenStorage - ->expects($this->once()) + ->expects(self::once()) ->method('getToken') - ->will($this->returnValue($token)); + ->will(self::returnValue($token)); $this->authChecker - ->expects($this->once()) + ->expects(self::once()) ->method('isGranted') - ->will($this->returnValue(false)); + ->will(self::returnValue(false)); $this->listener->onKernelRequest($event); } @@ -395,18 +396,18 @@ public function testOnKernelRequestAccessGranted() $token = $this->createMock(TokenInterface::class); $token - ->expects($this->any()) + ->expects(self::any()) ->method('getUsername') - ->will($this->returnValue('foo')); + ->will(self::returnValue('foo')); $this->tokenStorage - ->expects($this->once()) + ->expects(self::once()) ->method('getToken') - ->will($this->returnValue($token)); + ->will(self::returnValue($token)); $this->authChecker - ->expects($this->once()) + ->expects(self::once()) ->method('isGranted') - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); // Nothing should happen or should be returned. $this->listener->onKernelRequest($event); diff --git a/tests/lib/MVC/Symfony/Security/HttpUtilsTest.php b/tests/lib/MVC/Symfony/Security/HttpUtilsTest.php index ccf6d99b17..955c02b728 100644 --- a/tests/lib/MVC/Symfony/Security/HttpUtilsTest.php +++ b/tests/lib/MVC/Symfony/Security/HttpUtilsTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Security; use Ibexa\Core\MVC\Symfony\Security\HttpUtils; @@ -29,13 +30,13 @@ public function testGenerateUriStandard($uri, $isUriRouteName, $expected) if ($isUriRouteName) { $urlGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('generate') ->with($uri, $requestAttributes, UrlGeneratorInterface::ABSOLUTE_URL) - ->will($this->returnValue($expected . '?' . http_build_query($requestAttributes))); + ->will(self::returnValue($expected . '?' . http_build_query($requestAttributes))); } - $this->assertSame($expected, $httpUtils->generateUri($request, $uri)); + self::assertSame($expected, $httpUtils->generateUri($request, $uri)); } public function generateUriStandardProvider() @@ -58,10 +59,10 @@ public function testGenerateUri($uri, $isUriRouteName, $siteAccessUri, $expected if ($uri[0] === '/') { $matcher = $this->createMock(SiteAccess\URILexer::class); $matcher - ->expects($this->once()) + ->expects(self::once()) ->method('analyseLink') ->with($uri) - ->will($this->returnValue($siteAccessUri . $uri)); + ->will(self::returnValue($siteAccessUri . $uri)); $siteAccess->matcher = $matcher; } @@ -75,14 +76,14 @@ public function testGenerateUri($uri, $isUriRouteName, $siteAccessUri, $expected if ($isUriRouteName) { $urlGenerator - ->expects($this->once()) + ->expects(self::once()) ->method('generate') ->with($uri, $requestAttributes, UrlGeneratorInterface::ABSOLUTE_URL) - ->will($this->returnValue($expected . '?' . http_build_query($requestAttributes))); + ->will(self::returnValue($expected . '?' . http_build_query($requestAttributes))); } $res = $httpUtils->generateUri($request, $uri); - $this->assertSame($expected, $res); + self::assertSame($expected, $res); } public function generateUriProvider() @@ -101,7 +102,7 @@ public function testCheckRequestPathStandard() $httpUtils = new HttpUtils(); $httpUtils->setSiteAccess(new SiteAccess('test')); $request = Request::create('http://ezpublish.dev/foo/bar'); - $this->assertTrue($httpUtils->checkRequestPath($request, '/foo/bar')); + self::assertTrue($httpUtils->checkRequestPath($request, '/foo/bar')); } /** @@ -113,17 +114,17 @@ public function testCheckRequestPath($path, $siteAccessUri, $requestUri, $expect if ($siteAccessUri !== null) { $matcher = $this->createMock(SiteAccess\URILexer::class); $matcher - ->expects($this->once()) + ->expects(self::once()) ->method('analyseLink') ->with($path) - ->will($this->returnValue($siteAccessUri . $path)); + ->will(self::returnValue($siteAccessUri . $path)); $siteAccess->matcher = $matcher; } $httpUtils = new HttpUtils(); $httpUtils->setSiteAccess($siteAccess); $request = Request::create($requestUri); - $this->assertSame($expected, $httpUtils->checkRequestPath($request, $path)); + self::assertSame($expected, $httpUtils->checkRequestPath($request, $path)); } public function checkRequestPathProvider() diff --git a/tests/lib/MVC/Symfony/Security/InteractiveLoginTokenTest.php b/tests/lib/MVC/Symfony/Security/InteractiveLoginTokenTest.php index 5e9b35cf8d..ed83118f3d 100644 --- a/tests/lib/MVC/Symfony/Security/InteractiveLoginTokenTest.php +++ b/tests/lib/MVC/Symfony/Security/InteractiveLoginTokenTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Security; use Ibexa\Core\MVC\Symfony\Security\InteractiveLoginToken; @@ -29,12 +30,12 @@ public function testConstruct() } $token = new InteractiveLoginToken($user, $originalTokenType, $credentials, $providerKey, $roles); - $this->assertSame($user, $token->getUser()); - $this->assertTrue($token->isAuthenticated()); - $this->assertSame($originalTokenType, $token->getOriginalTokenType()); - $this->assertSame($credentials, $token->getCredentials()); - $this->assertSame($providerKey, $token->getProviderKey()); - $this->assertEquals($expectedRoles, $token->getRoleNames()); + self::assertSame($user, $token->getUser()); + self::assertTrue($token->isAuthenticated()); + self::assertSame($originalTokenType, $token->getOriginalTokenType()); + self::assertSame($credentials, $token->getCredentials()); + self::assertSame($providerKey, $token->getProviderKey()); + self::assertEquals($expectedRoles, $token->getRoleNames()); } public function testSerialize() @@ -48,7 +49,7 @@ public function testSerialize() $token = new InteractiveLoginToken($user, $originalTokenType, $credentials, $providerKey, $roles); $serialized = serialize($token); $unserializedToken = unserialize($serialized); - $this->assertEquals($token, $unserializedToken); + self::assertEquals($token, $unserializedToken); } } diff --git a/tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php b/tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php index a99edb2a58..3013e436e5 100644 --- a/tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php +++ b/tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php @@ -47,7 +47,7 @@ protected function setUp(): void public function testLoadUserByUsernameAlreadyUserObject() { $user = $this->createMock(UserInterface::class); - $this->assertSame($user, $this->userProvider->loadUserByUsername($user)); + self::assertSame($user, $this->userProvider->loadUserByUsername($user)); } public function testLoadUserByUsernameUserNotFound() @@ -56,10 +56,10 @@ public function testLoadUserByUsernameUserNotFound() $username = 'foobar@example.org'; $this->userService - ->expects($this->once()) + ->expects(self::once()) ->method('loadUserByEmail') ->with($username) - ->will($this->throwException(new NotFoundException('user', $username))); + ->will(self::throwException(new NotFoundException('user', $username))); $this->userProvider->loadUserByUsername($username); } @@ -69,15 +69,15 @@ public function testLoadUserByUsername() $apiUser = $this->createMock(APIUser::class); $this->userService - ->expects($this->once()) + ->expects(self::once()) ->method('loadUserByEmail') ->with($username) - ->will($this->returnValue($apiUser)); + ->will(self::returnValue($apiUser)); $user = $this->userProvider->loadUserByUsername($username); - $this->assertInstanceOf(UserInterface::class, $user); - $this->assertSame($apiUser, $user->getAPIUser()); - $this->assertSame(['ROLE_USER'], $user->getRoles()); + self::assertInstanceOf(UserInterface::class, $user); + self::assertSame($apiUser, $user->getAPIUser()); + self::assertSame(['ROLE_USER'], $user->getRoles()); } public function testRefreshUserNotSupported() @@ -105,26 +105,26 @@ public function testRefreshUser() $refreshedAPIUser = clone $apiUser; $user = $this->createMock(UserInterface::class); $user - ->expects($this->once()) + ->expects(self::once()) ->method('getAPIUser') - ->will($this->returnValue($apiUser)); + ->will(self::returnValue($apiUser)); $user - ->expects($this->once()) + ->expects(self::once()) ->method('setAPIUser') ->with($refreshedAPIUser); $this->userService - ->expects($this->once()) + ->expects(self::once()) ->method('loadUser') ->with($userId) - ->will($this->returnValue($refreshedAPIUser)); + ->will(self::returnValue($refreshedAPIUser)); $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('setCurrentUserReference') ->with(new UserReference($apiUser->getUserId())); - $this->assertSame($user, $this->userProvider->refreshUser($user)); + self::assertSame($user, $this->userProvider->refreshUser($user)); } public function testRefreshUserNotFound() @@ -145,15 +145,15 @@ public function testRefreshUserNotFound() ); $user = $this->createMock(UserInterface::class); $user - ->expects($this->once()) + ->expects(self::once()) ->method('getAPIUser') - ->will($this->returnValue($apiUser)); + ->will(self::returnValue($apiUser)); $this->userService - ->expects($this->once()) + ->expects(self::once()) ->method('loadUser') ->with($userId) - ->will($this->throwException(new NotFoundException('user', 'foo'))); + ->will(self::throwException(new NotFoundException('user', 'foo'))); $this->userProvider->refreshUser($user); } @@ -163,7 +163,7 @@ public function testRefreshUserNotFound() */ public function testSupportsClass($class, $supports) { - $this->assertSame($supports, $this->userProvider->supportsClass($class)); + self::assertSame($supports, $this->userProvider->supportsClass($class)); } public function supportsClassProvider() @@ -181,9 +181,9 @@ public function testLoadUserByAPIUser() $user = $this->userProvider->loadUserByAPIUser($apiUser); - $this->assertInstanceOf(MVCUser::class, $user); - $this->assertSame($apiUser, $user->getAPIUser()); - $this->assertSame(['ROLE_USER'], $user->getRoles()); + self::assertInstanceOf(MVCUser::class, $user); + self::assertSame($apiUser, $user->getAPIUser()); + self::assertSame(['ROLE_USER'], $user->getRoles()); } } diff --git a/tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php b/tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php index f03117f9d5..42e3a75346 100644 --- a/tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php +++ b/tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php @@ -47,7 +47,7 @@ protected function setUp(): void public function testLoadUserByUsernameAlreadyUserObject() { $user = $this->createMock(UserInterface::class); - $this->assertSame($user, $this->userProvider->loadUserByUsername($user)); + self::assertSame($user, $this->userProvider->loadUserByUsername($user)); } public function testLoadUserByUsernameUserNotFound() @@ -56,10 +56,10 @@ public function testLoadUserByUsernameUserNotFound() $username = 'foobar'; $this->userService - ->expects($this->once()) + ->expects(self::once()) ->method('loadUserByLogin') ->with($username) - ->will($this->throwException(new NotFoundException('user', $username))); + ->will(self::throwException(new NotFoundException('user', $username))); $this->userProvider->loadUserByUsername($username); } @@ -69,15 +69,15 @@ public function testLoadUserByUsername() $apiUser = $this->createMock(APIUser::class); $this->userService - ->expects($this->once()) + ->expects(self::once()) ->method('loadUserByLogin') ->with($username) - ->will($this->returnValue($apiUser)); + ->will(self::returnValue($apiUser)); $user = $this->userProvider->loadUserByUsername($username); - $this->assertInstanceOf(UserInterface::class, $user); - $this->assertSame($apiUser, $user->getAPIUser()); - $this->assertSame(['ROLE_USER'], $user->getRoles()); + self::assertInstanceOf(UserInterface::class, $user); + self::assertSame($apiUser, $user->getAPIUser()); + self::assertSame(['ROLE_USER'], $user->getRoles()); } public function testRefreshUserNotSupported() @@ -105,26 +105,26 @@ public function testRefreshUser() $refreshedAPIUser = clone $apiUser; $user = $this->createMock(UserInterface::class); $user - ->expects($this->once()) + ->expects(self::once()) ->method('getAPIUser') - ->will($this->returnValue($apiUser)); + ->will(self::returnValue($apiUser)); $user - ->expects($this->once()) + ->expects(self::once()) ->method('setAPIUser') ->with($refreshedAPIUser); $this->userService - ->expects($this->once()) + ->expects(self::once()) ->method('loadUser') ->with($userId) - ->will($this->returnValue($refreshedAPIUser)); + ->will(self::returnValue($refreshedAPIUser)); $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('setCurrentUserReference') ->with(new UserReference($apiUser->getUserId())); - $this->assertSame($user, $this->userProvider->refreshUser($user)); + self::assertSame($user, $this->userProvider->refreshUser($user)); } public function testRefreshUserNotFound() @@ -145,15 +145,15 @@ public function testRefreshUserNotFound() ); $user = $this->createMock(UserInterface::class); $user - ->expects($this->once()) + ->expects(self::once()) ->method('getAPIUser') - ->will($this->returnValue($apiUser)); + ->will(self::returnValue($apiUser)); $this->userService - ->expects($this->once()) + ->expects(self::once()) ->method('loadUser') ->with($userId) - ->will($this->throwException(new NotFoundException('user', 'foo'))); + ->will(self::throwException(new NotFoundException('user', 'foo'))); $this->userProvider->refreshUser($user); } @@ -163,7 +163,7 @@ public function testRefreshUserNotFound() */ public function testSupportsClass($class, $supports) { - $this->assertSame($supports, $this->userProvider->supportsClass($class)); + self::assertSame($supports, $this->userProvider->supportsClass($class)); } public function supportsClassProvider() @@ -181,9 +181,9 @@ public function testLoadUserByAPIUser() $user = $this->userProvider->loadUserByAPIUser($apiUser); - $this->assertInstanceOf(MVCUser::class, $user); - $this->assertSame($apiUser, $user->getAPIUser()); - $this->assertSame(['ROLE_USER'], $user->getRoles()); + self::assertInstanceOf(MVCUser::class, $user); + self::assertSame($apiUser, $user->getAPIUser()); + self::assertSame(['ROLE_USER'], $user->getRoles()); } } diff --git a/tests/lib/MVC/Symfony/Security/UserWrappedTest.php b/tests/lib/MVC/Symfony/Security/UserWrappedTest.php index e9c3075730..bda42601c8 100644 --- a/tests/lib/MVC/Symfony/Security/UserWrappedTest.php +++ b/tests/lib/MVC/Symfony/Security/UserWrappedTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Security; use Ibexa\Contracts\Core\Repository\Values\User\User as APIUser; @@ -28,22 +29,22 @@ public function testGetSetAPIUser() { $originalUser = $this->createMock(SymfonyUserInterface::class); $userWrapped = new UserWrapped($originalUser, $this->apiUser); - $this->assertSame($this->apiUser, $userWrapped->getAPIUser()); + self::assertSame($this->apiUser, $userWrapped->getAPIUser()); $newApiUser = $this->createMock(APIUser::class); $userWrapped->setAPIUser($newApiUser); - $this->assertSame($newApiUser, $userWrapped->getAPIUser()); + self::assertSame($newApiUser, $userWrapped->getAPIUser()); } public function testGetSetWrappedUser() { $originalUser = $this->createMock(SymfonyUserInterface::class); $userWrapped = new UserWrapped($originalUser, $this->apiUser); - $this->assertSame($originalUser, $userWrapped->getWrappedUser()); + self::assertSame($originalUser, $userWrapped->getWrappedUser()); $newWrappedUser = $this->createMock(UserInterface::class); $userWrapped->setWrappedUser($newWrappedUser); - $this->assertSame($newWrappedUser, $userWrapped->getWrappedUser()); + self::assertSame($newWrappedUser, $userWrapped->getWrappedUser()); } public function testRegularUser() @@ -51,10 +52,10 @@ public function testRegularUser() $originalUser = $this->createMock(SymfonyUserInterface::class); $user = new UserWrapped($originalUser, $this->apiUser); - $this->assertTrue($user->isEqualTo($this->createMock(SymfonyUserInterface::class))); + self::assertTrue($user->isEqualTo($this->createMock(SymfonyUserInterface::class))); $originalUser - ->expects($this->once()) + ->expects(self::once()) ->method('eraseCredentials'); $user->eraseCredentials(); @@ -63,28 +64,28 @@ public function testRegularUser() $roles = ['ROLE_USER', 'ROLE_TEST']; $salt = md5(microtime(true)); $originalUser - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('getUsername') - ->will($this->returnValue($username)); + ->will(self::returnValue($username)); $originalUser - ->expects($this->once()) + ->expects(self::once()) ->method('getPassword') - ->will($this->returnValue($password)); + ->will(self::returnValue($password)); $originalUser - ->expects($this->once()) + ->expects(self::once()) ->method('getRoles') - ->will($this->returnValue($roles)); + ->will(self::returnValue($roles)); $originalUser - ->expects($this->once()) + ->expects(self::once()) ->method('getSalt') - ->will($this->returnValue($salt)); - - $this->assertSame($username, $user->getUsername()); - $this->assertSame($username, (string)$user); - $this->assertSame($password, $user->getPassword()); - $this->assertSame($roles, $user->getRoles()); - $this->assertSame($salt, $user->getSalt()); - $this->assertSame($originalUser, $user->getWrappedUser()); + ->will(self::returnValue($salt)); + + self::assertSame($username, $user->getUsername()); + self::assertSame($username, (string)$user); + self::assertSame($password, $user->getPassword()); + self::assertSame($roles, $user->getRoles()); + self::assertSame($salt, $user->getSalt()); + self::assertSame($originalUser, $user->getWrappedUser()); } public function testIsEqualTo() @@ -93,11 +94,11 @@ public function testIsEqualTo() $user = new UserWrapped($originalUser, $this->apiUser); $otherUser = $this->createMock(SymfonyUserInterface::class); $originalUser - ->expects($this->once()) + ->expects(self::once()) ->method('isEqualTo') ->with($otherUser) - ->will($this->returnValue(false)); - $this->assertFalse($user->isEqualTo($otherUser)); + ->will(self::returnValue(false)); + self::assertFalse($user->isEqualTo($otherUser)); } public function testNotSerializeApiUser(): void diff --git a/tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php b/tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php index 7a0c8cd572..1d429d8cda 100644 --- a/tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php +++ b/tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Security\Voter; use Ibexa\Contracts\Core\Repository\PermissionResolver; @@ -32,7 +33,7 @@ protected function setUp(): void public function testSupportsAttribute($attribute, $expectedResult) { $voter = new CoreVoter($this->permissionResolver); - $this->assertSame($expectedResult, $voter->supportsAttribute($attribute)); + self::assertSame($expectedResult, $voter->supportsAttribute($attribute)); } public function supportsAttributeProvider() @@ -60,7 +61,7 @@ public function supportsAttributeProvider() public function testSupportsClass($class) { $voter = new CoreVoter($this->permissionResolver); - $this->assertTrue($voter->supportsClass($class)); + self::assertTrue($voter->supportsClass($class)); } public function supportsClassProvider() @@ -79,7 +80,7 @@ public function supportsClassProvider() public function testVoteInvalidAttribute(array $attributes) { $voter = new CoreVoter($this->permissionResolver); - $this->assertSame( + self::assertSame( VoterInterface::ACCESS_ABSTAIN, $voter->vote( $this->createMock(TokenInterface::class), @@ -117,17 +118,17 @@ public function testVote(Attribute $attribute, $repositoryCanUser, $expectedResu $voter = new CoreVoter($this->permissionResolver); if ($repositoryCanUser !== null) { $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('hasAccess') ->with($attribute->module, $attribute->function) - ->will($this->returnValue($repositoryCanUser)); + ->will(self::returnValue($repositoryCanUser)); } else { $this->permissionResolver - ->expects($this->never()) + ->expects(self::never()) ->method('hasAccess'); } - $this->assertSame( + self::assertSame( $expectedResult, $voter->vote( $this->createMock(TokenInterface::class), diff --git a/tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php b/tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php index fd6ff413b3..815c7db73a 100644 --- a/tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php +++ b/tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Security\Voter; use Ibexa\Contracts\Core\Repository\Values\ValueObject; @@ -32,7 +33,7 @@ protected function setUp(): void public function testSupportsAttribute($attribute, $expectedResult) { $voter = new ValueObjectVoter($this->permissionResolver); - $this->assertSame($expectedResult, $voter->supportsAttribute($attribute)); + self::assertSame($expectedResult, $voter->supportsAttribute($attribute)); } public function supportsAttributeProvider() @@ -60,7 +61,7 @@ public function supportsAttributeProvider() public function testSupportsClass($class) { $voter = new ValueObjectVoter($this->permissionResolver); - $this->assertTrue($voter->supportsClass($class)); + self::assertTrue($voter->supportsClass($class)); } public function supportsClassProvider() @@ -79,7 +80,7 @@ public function supportsClassProvider() public function testVoteInvalidAttribute(array $attributes) { $voter = new ValueObjectVoter($this->permissionResolver); - $this->assertSame( + self::assertSame( VoterInterface::ACCESS_ABSTAIN, $voter->vote( $this->createMock(TokenInterface::class), @@ -108,12 +109,12 @@ public function testVote(Attribute $attribute, $repositoryCanUser, $expectedResu $voter = new ValueObjectVoter($this->permissionResolver); $targets = isset($attribute->limitations['targets']) ? $attribute->limitations['targets'] : []; $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('canUser') ->with($attribute->module, $attribute->function, $attribute->limitations['valueObject'], $targets) - ->will($this->returnValue($repositoryCanUser)); + ->will(self::returnValue($repositoryCanUser)); - $this->assertSame( + self::assertSame( $expectedResult, $voter->vote( $this->createMock(TokenInterface::class), diff --git a/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php b/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php index 5d33b936e0..996c581088 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\SiteAccess\Compound; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; @@ -74,16 +75,16 @@ public function testSetMatcherBuilder(Compound $compoundMatcher) { $this ->matcherBuilder - ->expects($this->any()) + ->expects(self::any()) ->method('buildMatcher') - ->will($this->returnValue($this->createMock(Matcher::class))); + ->will(self::returnValue($this->createMock(Matcher::class))); $compoundMatcher->setRequest($this->createMock(SimplifiedRequest::class)); $compoundMatcher->setMatcherBuilder($this->matcherBuilder); $matchers = $compoundMatcher->getSubMatchers(); - $this->assertIsArray($matchers); + self::assertIsArray($matchers); foreach ($matchers as $matcher) { - $this->assertInstanceOf(Matcher::class, $matcher); + self::assertInstanceOf(Matcher::class, $matcher); } } @@ -98,7 +99,7 @@ public function testMatch(SimplifiedRequest $request, $expectedMatch) $compoundMatcher = $this->buildMatcher(); $compoundMatcher->setRequest($request); $compoundMatcher->setMatcherBuilder(new MatcherBuilder()); - $this->assertSame($expectedMatch, $compoundMatcher->match()); + self::assertSame($expectedMatch, $compoundMatcher->match()); } public function testSetRequest() @@ -118,17 +119,17 @@ public function testSetRequest() $matcher1 = $this->createMock(Matcher::class); $matcher2 = $this->createMock(Matcher::class); $this->matcherBuilder - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('buildMatcher') - ->will($this->onConsecutiveCalls($matcher1, $matcher2)); + ->will(self::onConsecutiveCalls($matcher1, $matcher2)); $request = $this->createMock(SimplifiedRequest::class); $matcher1 - ->expects($this->once()) + ->expects(self::once()) ->method('setRequest') ->with($request); $matcher2 - ->expects($this->once()) + ->expects(self::once()) ->method('setRequest') ->with($request); @@ -155,13 +156,13 @@ public function testReverseMatchSiteAccessNotConfigured() { $compoundMatcher = $this->buildMatcher(); $this->matcherBuilder - ->expects($this->any()) + ->expects(self::any()) ->method('buildMatcher') - ->will($this->returnValue($this->createMock(VersatileMatcher::class))); + ->will(self::returnValue($this->createMock(VersatileMatcher::class))); $compoundMatcher->setRequest($this->createMock(SimplifiedRequest::class)); $compoundMatcher->setMatcherBuilder($this->matcherBuilder); - $this->assertNull($compoundMatcher->reverseMatch('not_configured_sa')); + self::assertNull($compoundMatcher->reverseMatch('not_configured_sa')); } public function testReverseMatchNotVersatile() @@ -190,10 +191,10 @@ public function testReverseMatchNotVersatile() ->getMockForAbstractClass(); $this->matcherBuilder - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('buildMatcher') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['Map\URI', $mapUriConfig, $request, $matcher1], ['Map\Host', $mapHostConfig, $request, $matcher2], @@ -202,16 +203,16 @@ public function testReverseMatchNotVersatile() ); $matcher1 - ->expects($this->once()) + ->expects(self::once()) ->method('reverseMatch') ->with($siteAccessName) - ->will($this->returnValue($this->createMock(VersatileMatcher::class))); + ->will(self::returnValue($this->createMock(VersatileMatcher::class))); $matcher2 - ->expects($this->never()) + ->expects(self::never()) ->method('reverseMatch'); $compoundMatcher->setMatcherBuilder($this->matcherBuilder); - $this->assertNull($compoundMatcher->reverseMatch($siteAccessName)); + self::assertNull($compoundMatcher->reverseMatch($siteAccessName)); } public function testReverseMatchFail() @@ -236,10 +237,10 @@ public function testReverseMatchFail() $matcher1 = $this->createMock(VersatileMatcher::class); $matcher2 = $this->createMock(VersatileMatcher::class); $this->matcherBuilder - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('buildMatcher') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['Map\URI', $mapUriConfig, $request, $matcher1], ['Map\Host', $mapHostConfig, $request, $matcher2], @@ -248,18 +249,18 @@ public function testReverseMatchFail() ); $matcher1 - ->expects($this->once()) + ->expects(self::once()) ->method('reverseMatch') ->with($siteAccessName) - ->will($this->returnValue($this->createMock(VersatileMatcher::class))); + ->will(self::returnValue($this->createMock(VersatileMatcher::class))); $matcher2 - ->expects($this->once()) + ->expects(self::once()) ->method('reverseMatch') ->with($siteAccessName) - ->will($this->returnValue(null)); + ->will(self::returnValue(null)); $compoundMatcher->setMatcherBuilder($this->matcherBuilder); - $this->assertNull($compoundMatcher->reverseMatch($siteAccessName)); + self::assertNull($compoundMatcher->reverseMatch($siteAccessName)); } public function testReverseMatch() @@ -284,10 +285,10 @@ public function testReverseMatch() $matcher1 = $this->createMock(VersatileMatcher::class); $matcher2 = $this->createMock(VersatileMatcher::class); $this->matcherBuilder - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('buildMatcher') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['Map\URI', $mapUriConfig, $request, $matcher1], ['Map\Host', $mapHostConfig, $request, $matcher2], @@ -297,22 +298,22 @@ public function testReverseMatch() $reverseMatchedMatcher1 = $this->createMock(VersatileMatcher::class); $matcher1 - ->expects($this->once()) + ->expects(self::once()) ->method('reverseMatch') ->with($siteAccessName) - ->will($this->returnValue($reverseMatchedMatcher1)); + ->will(self::returnValue($reverseMatchedMatcher1)); $reverseMatchedMatcher2 = $this->createMock(VersatileMatcher::class); $matcher2 - ->expects($this->once()) + ->expects(self::once()) ->method('reverseMatch') ->with($siteAccessName) - ->will($this->returnValue($reverseMatchedMatcher2)); + ->will(self::returnValue($reverseMatchedMatcher2)); $compoundMatcher->setMatcherBuilder($this->matcherBuilder); $result = $compoundMatcher->reverseMatch($siteAccessName); - $this->assertInstanceOf(LogicalAnd::class, $result); + self::assertInstanceOf(LogicalAnd::class, $result); foreach ($result->getSubMatchers() as $subMatcher) { - $this->assertInstanceOf(VersatileMatcher::class, $subMatcher); + self::assertInstanceOf(VersatileMatcher::class, $subMatcher); } } @@ -326,7 +327,7 @@ public function testSerialize() $matcher->setRequest(new SimplifiedRequest(['pathinfo' => '/foo/bar/baz'])); $serializedSA2 = serialize($sa); - $this->assertSame($serializedSA1, $serializedSA2); + self::assertSame($serializedSA1, $serializedSA2); } } diff --git a/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php b/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php index bf83f7eb91..fc0c2f08ca 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\SiteAccess\Compound; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; @@ -60,16 +61,16 @@ private function buildMatcher(): LogicalOr public function testSetMatcherBuilder(Compound $compoundMatcher) { $this->matcherBuilder - ->expects($this->any()) + ->expects(self::any()) ->method('buildMatcher') - ->will($this->returnValue($this->createMock(Matcher::class))); + ->will(self::returnValue($this->createMock(Matcher::class))); $compoundMatcher->setRequest($this->createMock(SimplifiedRequest::class)); $compoundMatcher->setMatcherBuilder($this->matcherBuilder); $matchers = $compoundMatcher->getSubMatchers(); - $this->assertIsArray($matchers); + self::assertIsArray($matchers); foreach ($matchers as $matcher) { - $this->assertInstanceOf(Matcher::class, $matcher); + self::assertInstanceOf(Matcher::class, $matcher); } } @@ -84,7 +85,7 @@ public function testMatch(SimplifiedRequest $request, $expectedMatch) $compoundMatcher = $this->buildMatcher(); $compoundMatcher->setRequest($request); $compoundMatcher->setMatcherBuilder(new MatcherBuilder()); - $this->assertSame($expectedMatch, $compoundMatcher->match()); + self::assertSame($expectedMatch, $compoundMatcher->match()); } public function matchProvider() @@ -106,13 +107,13 @@ public function testReverseMatchSiteAccessNotConfigured() { $compoundMatcher = $this->buildMatcher(); $this->matcherBuilder - ->expects($this->any()) + ->expects(self::any()) ->method('buildMatcher') - ->will($this->returnValue($this->createMock(VersatileMatcher::class))); + ->will(self::returnValue($this->createMock(VersatileMatcher::class))); $compoundMatcher->setRequest($this->createMock(SimplifiedRequest::class)); $compoundMatcher->setMatcherBuilder($this->matcherBuilder); - $this->assertNull($compoundMatcher->reverseMatch('not_configured_sa')); + self::assertNull($compoundMatcher->reverseMatch('not_configured_sa')); } public function testReverseMatchNotVersatile() @@ -144,10 +145,10 @@ public function testReverseMatchNotVersatile() ->getMockForAbstractClass(); $this->matcherBuilder - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('buildMatcher') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['Map\URI', $mapUriConfig, $request, $matcher1], ['Map\Host', $mapHostConfig, $request, $matcher2], @@ -156,14 +157,14 @@ public function testReverseMatchNotVersatile() ); $matcher1 - ->expects($this->never()) + ->expects(self::never()) ->method('reverseMatch'); $matcher2 - ->expects($this->never()) + ->expects(self::never()) ->method('reverseMatch'); $compoundMatcher->setMatcherBuilder($this->matcherBuilder); - $this->assertNull($compoundMatcher->reverseMatch($siteAccessName)); + self::assertNull($compoundMatcher->reverseMatch($siteAccessName)); } public function testReverseMatchFail() @@ -188,10 +189,10 @@ public function testReverseMatchFail() $matcher1 = $this->createMock(VersatileMatcher::class); $matcher2 = $this->createMock(VersatileMatcher::class); $this->matcherBuilder - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('buildMatcher') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['Map\URI', $mapUriConfig, $request, $matcher1], ['Map\Host', $mapHostConfig, $request, $matcher2], @@ -200,18 +201,18 @@ public function testReverseMatchFail() ); $matcher1 - ->expects($this->once()) + ->expects(self::once()) ->method('reverseMatch') ->with($siteAccessName) - ->will($this->returnValue(null)); + ->will(self::returnValue(null)); $matcher2 - ->expects($this->once()) + ->expects(self::once()) ->method('reverseMatch') ->with($siteAccessName) - ->will($this->returnValue(null)); + ->will(self::returnValue(null)); $compoundMatcher->setMatcherBuilder($this->matcherBuilder); - $this->assertNull($compoundMatcher->reverseMatch($siteAccessName)); + self::assertNull($compoundMatcher->reverseMatch($siteAccessName)); } public function testReverseMatch1() @@ -236,10 +237,10 @@ public function testReverseMatch1() $matcher1 = $this->createMock(VersatileMatcher::class); $matcher2 = $this->createMock(VersatileMatcher::class); $this->matcherBuilder - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('buildMatcher') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['Map\URI', $mapUriConfig, $request, $matcher1], ['Map\Host', $mapHostConfig, $request, $matcher2], @@ -249,19 +250,19 @@ public function testReverseMatch1() $reverseMatchedMatcher1 = $this->createMock(VersatileMatcher::class); $matcher1 - ->expects($this->once()) + ->expects(self::once()) ->method('reverseMatch') ->with($siteAccessName) - ->will($this->returnValue($reverseMatchedMatcher1)); + ->will(self::returnValue($reverseMatchedMatcher1)); $matcher2 - ->expects($this->never()) + ->expects(self::never()) ->method('reverseMatch'); $compoundMatcher->setMatcherBuilder($this->matcherBuilder); $result = $compoundMatcher->reverseMatch($siteAccessName); - $this->assertInstanceOf(LogicalOr::class, $result); + self::assertInstanceOf(LogicalOr::class, $result); foreach ($result->getSubMatchers() as $subMatcher) { - $this->assertInstanceOf(VersatileMatcher::class, $subMatcher); + self::assertInstanceOf(VersatileMatcher::class, $subMatcher); } } @@ -287,10 +288,10 @@ public function testReverseMatch2() $matcher1 = $this->createMock(VersatileMatcher::class); $matcher2 = $this->createMock(VersatileMatcher::class); $this->matcherBuilder - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('buildMatcher') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['Map\URI', $mapUriConfig, $request, $matcher1], ['Map\Host', $mapHostConfig, $request, $matcher2], @@ -299,22 +300,22 @@ public function testReverseMatch2() ); $matcher1 - ->expects($this->once()) + ->expects(self::once()) ->method('reverseMatch') ->with($siteAccessName) - ->will($this->returnValue(null)); + ->will(self::returnValue(null)); $reverseMatchedMatcher2 = $this->createMock(VersatileMatcher::class); $matcher2 - ->expects($this->once()) + ->expects(self::once()) ->method('reverseMatch') ->with($siteAccessName) - ->will($this->returnValue($reverseMatchedMatcher2)); + ->will(self::returnValue($reverseMatchedMatcher2)); $compoundMatcher->setMatcherBuilder($this->matcherBuilder); $result = $compoundMatcher->reverseMatch($siteAccessName); - $this->assertInstanceOf(LogicalOr::class, $result); + self::assertInstanceOf(LogicalOr::class, $result); foreach ($result->getSubMatchers() as $subMatcher) { - $this->assertInstanceOf(VersatileMatcher::class, $subMatcher); + self::assertInstanceOf(VersatileMatcher::class, $subMatcher); } } @@ -328,7 +329,7 @@ public function testSerialize() $matcher->setRequest(new SimplifiedRequest(['pathinfo' => '/foo/bar/baz'])); $serializedSA2 = serialize($sa); - $this->assertSame($serializedSA1, $serializedSA2); + self::assertSame($serializedSA1, $serializedSA2); } } diff --git a/tests/lib/MVC/Symfony/SiteAccess/MatcherSerializationTest.php b/tests/lib/MVC/Symfony/SiteAccess/MatcherSerializationTest.php index 05ebdf65a8..1826d10501 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/MatcherSerializationTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/MatcherSerializationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\Component\Serializer\SerializerTrait; @@ -25,7 +26,7 @@ public function testDeserialize(Matcher $matcher, $expected = null) $unserializedMatcher = $this->deserializeMatcher($serializedMatcher, get_class($matcher)); $expected = $expected ?? $matcher; - $this->assertEquals($expected, $unserializedMatcher); + self::assertEquals($expected, $unserializedMatcher); } /** diff --git a/tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php b/tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php index bb0eaf014b..8e1c555b74 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php @@ -60,14 +60,14 @@ public function testIsDefined(string $siteAccessName): void { $chainSiteAccessProvider = $this->getChainSiteAccessProvider(); - $this->assertTrue($chainSiteAccessProvider->isDefined($siteAccessName)); + self::assertTrue($chainSiteAccessProvider->isDefined($siteAccessName)); } public function testIsDefinedForUndefinedSiteAccess(): void { $chainSiteAccessProvider = $this->getChainSiteAccessProvider(); - $this->assertFalse($chainSiteAccessProvider->isDefined(self::UNDEFINED_SA_NAME)); + self::assertFalse($chainSiteAccessProvider->isDefined(self::UNDEFINED_SA_NAME)); } public function testGetSiteAccesses(): void @@ -75,7 +75,7 @@ public function testGetSiteAccesses(): void $chainSiteAccessProvider = $this->getChainSiteAccessProvider(); $siteAccesses = iterator_to_array($chainSiteAccessProvider->getSiteAccesses()); - $this->assertCount(4, $siteAccesses); + self::assertCount(4, $siteAccesses); $expectedSiteAccessNames = [ ['name' => self::EXISTING_SA_NAME, 'groups' => [self::SA_GROUP]], @@ -90,7 +90,7 @@ public function testGetSiteAccesses(): void $saData['groups'] ); - $this->assertEquals($expectedSiteAccess, $siteAccesses[$key]); + self::assertEquals($expectedSiteAccess, $siteAccesses[$key]); } $undefinedSiteAccess = $this->createSiteAcccess( @@ -98,7 +98,7 @@ public function testGetSiteAccesses(): void [self::SA_GROUP] ); - $this->assertNotContains( + self::assertNotContains( $undefinedSiteAccess, $siteAccesses ); @@ -130,7 +130,7 @@ public function testGetExistingSiteAccess(string $siteAccessName, array $expecte ); $expectedSiteAccess->groups = $expectedGroups; - $this->assertEquals( + self::assertEquals( $expectedSiteAccess, $chainSiteAccessProvider->getSiteAccess($siteAccessName) ); diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterBaseTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterBaseTest.php index 0760b6284e..04cf9acb3d 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterBaseTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterBaseTest.php @@ -47,10 +47,10 @@ public function testMatch(SimplifiedRequest $request, string $siteAccess) { $router = $this->createRouter(); $sa = $router->match($request); - $this->assertInstanceOf(SiteAccess::class, $sa); - $this->assertSame($siteAccess, $sa->name); + self::assertInstanceOf(SiteAccess::class, $sa); + self::assertSame($siteAccess, $sa->name); // SiteAccess must be serializable as a whole. See https://issues.ibexa.co/browse/EZP-21613 - $this->assertIsString(serialize($sa)); + self::assertIsString(serialize($sa)); $router->setSiteAccess(); } diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php index b4ef57fb06..9196cd6be7 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; @@ -75,10 +76,10 @@ public function matchProvider(): array public function testGetName() { $matcher = new HostMapMatcher(['host' => 'foo'], []); - $this->assertSame('host:map', $matcher->getName()); + self::assertSame('host:map', $matcher->getName()); $matcherHostElement = new HostElement([1]); - $this->assertSame('host:element', $matcherHostElement->getName()); + self::assertSame('host:element', $matcherHostElement->getName()); } /** @@ -89,8 +90,8 @@ public function testReverseMatch($siteAccessName, $elementNumber, SimplifiedRequ $matcher = new HostElement([$elementNumber]); $matcher->setRequest($request); $result = $matcher->reverseMatch($siteAccessName); - $this->assertInstanceOf(HostElement::class, $result); - $this->assertSame($expectedHost, $result->getRequest()->host); + self::assertInstanceOf(HostElement::class, $result); + self::assertSame($expectedHost, $result->getRequest()->host); } public function reverseMatchProvider() @@ -107,7 +108,7 @@ public function testReverseMatchFail() { $matcher = new HostElement([3]); $matcher->setRequest(new SimplifiedRequest(['host' => 'ibexa.co'])); - $this->assertNull($matcher->reverseMatch('foo')); + self::assertNull($matcher->reverseMatch('foo')); } public function testSerialize() @@ -120,7 +121,7 @@ public function testSerialize() $matcher->setRequest(new SimplifiedRequest(['host' => 'ibexa.co', 'pathinfo' => '/foo/bar/baz'])); $serializedSA2 = serialize($sa); - $this->assertSame($serializedSA1, $serializedSA2); + self::assertSame($serializedSA1, $serializedSA2); } protected function createRouter(): Router diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php index 691bab36ff..01fb6cfc30 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; @@ -88,15 +89,15 @@ public function testSetGetRequestMapHost() $request = new SimplifiedRequest(['host' => $mapKey]); $matcher = new Host(['foo' => $mapKey]); $matcher->setRequest($request); - $this->assertSame($request, $matcher->getRequest()); - $this->assertSame($mapKey, $matcher->getMapKey()); + self::assertSame($request, $matcher->getRequest()); + self::assertSame($mapKey, $matcher->getMapKey()); } public function testReverseHostMatchFail() { $config = ['foo' => 'bar']; $matcher = new Host($config); - $this->assertNull($matcher->reverseMatch('non_existent')); + self::assertNull($matcher->reverseMatch('non_existent')); } public function testReverseMatchHost() @@ -109,13 +110,13 @@ public function testReverseMatchHost() $request = new SimplifiedRequest(['host' => 'ibexa.co']); $matcher = new Host($config); $matcher->setRequest($request); - $this->assertSame('ibexa.co', $matcher->getMapKey()); + self::assertSame('ibexa.co', $matcher->getMapKey()); $result = $matcher->reverseMatch('ibexa_demo_site'); - $this->assertInstanceOf(Host::class, $result); - $this->assertSame($request, $matcher->getRequest()); - $this->assertSame('phoenix-rises.fm', $result->getMapKey()); - $this->assertSame('phoenix-rises.fm', $result->getRequest()->host); + self::assertInstanceOf(Host::class, $result); + self::assertSame($request, $matcher->getRequest()); + self::assertSame('phoenix-rises.fm', $result->getMapKey()); + self::assertSame('phoenix-rises.fm', $result->getRequest()->host); } public function testSetGetRequestMapPort() @@ -124,15 +125,15 @@ public function testSetGetRequestMapPort() $request = new SimplifiedRequest(['port' => $mapKey]); $matcher = new Port(['foo' => $mapKey]); $matcher->setRequest($request); - $this->assertSame($request, $matcher->getRequest()); - $this->assertSame($mapKey, $matcher->getMapKey()); + self::assertSame($request, $matcher->getRequest()); + self::assertSame($mapKey, $matcher->getMapKey()); } public function testReversePortMatchFail() { $config = ['foo' => '8080']; $matcher = new Port($config); - $this->assertNull($matcher->reverseMatch('non_existent')); + self::assertNull($matcher->reverseMatch('non_existent')); } public function testReverseMatchPort() @@ -145,14 +146,14 @@ public function testReverseMatchPort() $request = new SimplifiedRequest(['scheme' => 'http', 'host' => 'ibexa.co']); $matcher = new Port($config); $matcher->setRequest($request); - $this->assertSame(80, $matcher->getMapKey()); + self::assertSame(80, $matcher->getMapKey()); $result = $matcher->reverseMatch('ibexa_demo_site'); - $this->assertInstanceOf(Port::class, $result); - $this->assertSame($request, $matcher->getRequest()); - $this->assertSame(8000, $result->getMapKey()); - $this->assertSame(8000, $result->getRequest()->port); - $this->assertSame('http', $result->getRequest()->scheme); + self::assertInstanceOf(Port::class, $result); + self::assertSame($request, $matcher->getRequest()); + self::assertSame(8000, $result->getMapKey()); + self::assertSame(8000, $result->getRequest()->port); + self::assertSame('http', $result->getRequest()->scheme); } protected function createRouter(): Router diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterHostRegexTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterHostRegexTest.php index cab1732c82..746a9fe204 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterHostRegexTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterHostRegexTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; @@ -74,7 +75,7 @@ public function matchProvider(): array public function testGetName() { $matcher = new HostRegexMatcher(['host' => 'foo'], []); - $this->assertSame('host:regexp', $matcher->getName()); + self::assertSame('host:regexp', $matcher->getName()); } /** diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php index fbd06ca7b1..3643133a58 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; @@ -73,7 +74,7 @@ public function matchProvider(): array public function testGetName() { $matcher = new HostTextMatcher(['host' => 'foo'], []); - $this->assertSame('host:text', $matcher->getName()); + self::assertSame('host:text', $matcher->getName()); } public function testReverseMatch() @@ -88,10 +89,10 @@ public function testReverseMatch() $matcher->setRequest(new SimplifiedRequest(['host' => 'www.my_siteaccess.com'])); $result = $matcher->reverseMatch('foobar'); - $this->assertInstanceOf(HostTextMatcher::class, $result); + self::assertInstanceOf(HostTextMatcher::class, $result); $request = $result->getRequest(); - $this->assertInstanceOf(SimplifiedRequest::class, $request); - $this->assertSame('www.foobar.com', $request->host); + self::assertInstanceOf(SimplifiedRequest::class, $request); + self::assertSame('www.foobar.com', $request->host); } protected function createRouter(): Router diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php index 4be7cfdc89..96d96ef533 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; @@ -24,8 +25,8 @@ public function testSetGetRequest($config, $pathinfo, $expectedMapKey) $request = new SimplifiedRequest(['pathinfo' => $pathinfo]); $matcher = new URIMapMatcher($config); $matcher->setRequest($request); - $this->assertSame($request, $matcher->getRequest()); - $this->assertSame($expectedMapKey, $matcher->getMapKey()); + self::assertSame($request, $matcher->getRequest()); + self::assertSame($expectedMapKey, $matcher->getMapKey()); } /** @@ -40,10 +41,10 @@ public function testAnalyseURI($uri, $expectedFixedUpURI) $matcher->setRequest( new SimplifiedRequest(['pathinfo' => $uri]) ); - $this->assertSame($expectedFixedUpURI, $matcher->analyseURI($uri)); + self::assertSame($expectedFixedUpURI, $matcher->analyseURI($uri)); // Unserialized matcher should have the same behavior $unserializedMatcher = unserialize(serialize($matcher)); - $this->assertSame($expectedFixedUpURI, $unserializedMatcher->analyseURI($uri)); + self::assertSame($expectedFixedUpURI, $unserializedMatcher->analyseURI($uri)); } /** @@ -58,10 +59,10 @@ public function testAnalyseLink($fullUri, $linkUri) $matcher->setRequest( new SimplifiedRequest(['pathinfo' => $fullUri]) ); - $this->assertSame($fullUri, $matcher->analyseLink($linkUri)); + self::assertSame($fullUri, $matcher->analyseLink($linkUri)); // Unserialized matcher should have the same behavior $unserializedMatcher = unserialize(serialize($matcher)); - $this->assertSame($fullUri, $unserializedMatcher->analyseLink($linkUri)); + self::assertSame($fullUri, $unserializedMatcher->analyseLink($linkUri)); } public function setRequestProvider() @@ -89,7 +90,7 @@ public function testReverseMatchFail() { $config = ['foo' => 'bar']; $matcher = new URIMapMatcher($config); - $this->assertNull($matcher->reverseMatch('non_existent')); + self::assertNull($matcher->reverseMatch('non_existent')); } public function testReverseMatch() @@ -104,10 +105,10 @@ public function testReverseMatch() $matcher->setRequest($request); $result = $matcher->reverseMatch('ibexa_demo_site'); - $this->assertInstanceOf(URIMapMatcher::class, $result); - $this->assertSame($request, $matcher->getRequest()); - $this->assertSame('toutouyoutou', $result->getMapKey()); - $this->assertSame('/toutouyoutou/foo', $result->getRequest()->pathinfo); + self::assertInstanceOf(URIMapMatcher::class, $result); + self::assertSame($request, $matcher->getRequest()); + self::assertSame('toutouyoutou', $result->getMapKey()); + self::assertSame('/toutouyoutou/foo', $result->getRequest()->pathinfo); } } diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterPortHostURITest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterPortHostURITest.php index 958ba1cd18..191a04c50f 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterPortHostURITest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterPortHostURITest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterSpecialPortsTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterSpecialPortsTest.php index 60710c9353..5bbf311619 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterSpecialPortsTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterSpecialPortsTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; @@ -77,7 +78,7 @@ public function matchProvider(): array public function testGetName() { $matcher = new PortMatcher(['port' => '8080', 'scheme' => 'http'], []); - $this->assertSame('port', $matcher->getName()); + self::assertSame('port', $matcher->getName()); } protected function createRouter(): Router diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterTest.php index 3ee493507f..8c75c92d36 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Exception\InvalidSiteAccessException; @@ -36,10 +37,10 @@ public function testMatch(SimplifiedRequest $request, $siteAccess) { $router = $this->createRouter(); $sa = $router->match($request); - $this->assertInstanceOf(SiteAccess::class, $sa); - $this->assertSame($siteAccess, $sa->name); + self::assertInstanceOf(SiteAccess::class, $sa); + self::assertSame($siteAccess, $sa->name); // SiteAccess must be serializable as a whole. See https://issues.ibexa.co/browse/EZP-21613 - $this->assertIsString(serialize($sa)); + self::assertIsString(serialize($sa)); $router->setSiteAccess(); } @@ -74,9 +75,9 @@ public function testMatchWithEnv() $router = $this->createRouter(); putenv('EZPUBLISH_SITEACCESS=' . self::ENV_SA_NAME); $sa = $router->match(new SimplifiedRequest()); - $this->assertInstanceOf(SiteAccess::class, $sa); - $this->assertSame(self::ENV_SA_NAME, $sa->name); - $this->assertSame('env', $sa->matchingType); + self::assertInstanceOf(SiteAccess::class, $sa); + self::assertSame(self::ENV_SA_NAME, $sa->name); + self::assertSame('env', $sa->matchingType); $router->setSiteAccess(); } @@ -92,9 +93,9 @@ public function testMatchWithRequestHeader(): void ] ) ); - $this->assertInstanceOf(SiteAccess::class, $sa); - $this->assertSame(self::HEADERBASED_SA_NAME, $sa->name); - $this->assertSame('header', $sa->matchingType); + self::assertInstanceOf(SiteAccess::class, $sa); + self::assertSame(self::HEADERBASED_SA_NAME, $sa->name); + self::assertSame('header', $sa->matchingType); $router->setSiteAccess(); } @@ -201,15 +202,15 @@ public function testMatchByName() $matcherInitialSA = $this->createMock(SiteAccess\URILexer::class); $router->setSiteAccess(new SiteAccess('test', 'test', $matcherInitialSA)); $matcherInitialSA - ->expects($this->once()) + ->expects(self::once()) ->method('analyseURI'); $matcher = $this->createMock(VersatileMatcher::class); $matcherBuilder - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('buildMatcher') ->will( - $this->onConsecutiveCalls( + self::onConsecutiveCalls( $this->createMock(Matcher::class), $matcher ) @@ -217,15 +218,15 @@ public function testMatchByName() $reverseMatchedMatcher = $this->createMock(VersatileMatcher::class); $matcher - ->expects($this->once()) + ->expects(self::once()) ->method('reverseMatch') ->with($matchedSiteAccess) - ->will($this->returnValue($reverseMatchedMatcher)); + ->will(self::returnValue($reverseMatchedMatcher)); $siteAccess = $router->matchByName($matchedSiteAccess); - $this->assertInstanceOf(SiteAccess::class, $siteAccess); - $this->assertSame($reverseMatchedMatcher, $siteAccess->matcher); - $this->assertSame($matchedSiteAccess, $siteAccess->name); + self::assertInstanceOf(SiteAccess::class, $siteAccess); + self::assertSame($reverseMatchedMatcher, $siteAccess->matcher); + self::assertSame($matchedSiteAccess, $siteAccess->name); } public function testMatchByNameNoVersatileMatcher() @@ -249,15 +250,15 @@ public function testMatchByNameNoVersatileMatcher() $router->setSiteAccess(new SiteAccess('test', 'test')); $request = $router->getRequest(); $matcherBuilder - ->expects($this->once()) + ->expects(self::once()) ->method('buildMatcher') ->with($matcherClass, $matcherConfig, $request) - ->will($this->returnValue($this->createMock(Matcher::class))); + ->will(self::returnValue($this->createMock(Matcher::class))); $logger - ->expects($this->once()) + ->expects(self::once()) ->method('notice'); - $this->assertEquals(new SiteAccess($defaultSiteAccess, 'default'), $router->matchByName($defaultSiteAccess)); + self::assertEquals(new SiteAccess($defaultSiteAccess, 'default'), $router->matchByName($defaultSiteAccess)); } protected function createRouter($debug = false): Router diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php b/tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php index 18110c4be1..94fe00fb30 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; @@ -79,7 +80,7 @@ public function testAnalyseURI($level, $uri, $expectedFixedUpURI) $matcher->setRequest( new SimplifiedRequest(['pathinfo' => $uri]) ); - $this->assertSame($expectedFixedUpURI, $matcher->analyseURI($uri)); + self::assertSame($expectedFixedUpURI, $matcher->analyseURI($uri)); } /** @@ -95,7 +96,7 @@ public function testAnalyseURILevelAsInt($level, $uri, $expectedFixedUpURI) $matcher->setRequest( new SimplifiedRequest(['pathinfo' => $uri]) ); - $this->assertSame($expectedFixedUpURI, $matcher->analyseURI($uri)); + self::assertSame($expectedFixedUpURI, $matcher->analyseURI($uri)); } /** @@ -111,7 +112,7 @@ public function testAnalyseLink($level, $fullUri, $linkUri) $matcher->setRequest( new SimplifiedRequest(['pathinfo' => $fullUri]) ); - $this->assertSame($fullUri, $matcher->analyseLink($linkUri)); + self::assertSame($fullUri, $matcher->analyseLink($linkUri)); } public function analyseProvider() @@ -142,10 +143,10 @@ public function testReverseMatch($siteAccessName, $originalPathinfo) $matcher->setRequest(new SimplifiedRequest(['pathinfo' => $originalPathinfo])); $result = $matcher->reverseMatch($siteAccessName); - $this->assertInstanceOf(URIElement::class, $result); - $this->assertSame("/{$expectedSiteAccessPath}{$originalPathinfo}", $result->getRequest()->pathinfo); - $this->assertSame("/$expectedSiteAccessPath/some/linked/uri", $result->analyseLink('/some/linked/uri')); - $this->assertSame('/foo/bar/baz', $result->analyseURI("/$expectedSiteAccessPath/foo/bar/baz")); + self::assertInstanceOf(URIElement::class, $result); + self::assertSame("/{$expectedSiteAccessPath}{$originalPathinfo}", $result->getRequest()->pathinfo); + self::assertSame("/$expectedSiteAccessPath/some/linked/uri", $result->analyseLink('/some/linked/uri')); + self::assertSame('/foo/bar/baz', $result->analyseURI("/$expectedSiteAccessPath/foo/bar/baz")); } public function reverseMatchProvider() @@ -160,7 +161,7 @@ public function testReverseMatchFail() { $matcher = new URIElementMatcher([2]); $matcher->setRequest(new SimplifiedRequest(['pathinfo' => '/my/siteaccess/foo/bar'])); - $this->assertNull($matcher->reverseMatch('another_siteaccess_again_dont_tell_me')); + self::assertNull($matcher->reverseMatch('another_siteaccess_again_dont_tell_me')); } public function testSerialize() @@ -173,7 +174,7 @@ public function testSerialize() $matcher->setRequest(new SimplifiedRequest(['pathinfo' => '/foo/bar/baz'])); $serializedSA2 = serialize($sa); - $this->assertSame($serializedSA1, $serializedSA2); + self::assertSame($serializedSA1, $serializedSA2); } protected function createRouter(): Router diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php index 5e80dcadec..692117719a 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; @@ -69,7 +70,7 @@ public function matchProvider(): array public function testGetName() { $matcher = new URIElementMatcher([]); - $this->assertSame('uri:element', $matcher->getName()); + self::assertSame('uri:element', $matcher->getName()); } /** @@ -84,7 +85,7 @@ public function testAnalyseURI($uri, $expectedFixedUpURI) $matcher->setRequest( new SimplifiedRequest(['pathinfo' => $uri]) ); - $this->assertSame($expectedFixedUpURI, $matcher->analyseURI($uri)); + self::assertSame($expectedFixedUpURI, $matcher->analyseURI($uri)); } /** @@ -99,7 +100,7 @@ public function testAnalyseLink($fullUri, $linkUri) $matcher->setRequest( new SimplifiedRequest(['pathinfo' => $fullUri]) ); - $this->assertSame($fullUri, $matcher->analyseLink($linkUri)); + self::assertSame($fullUri, $matcher->analyseLink($linkUri)); } public function analyseProvider() @@ -118,10 +119,10 @@ public function testReverseMatch($siteAccessName, $originalPathinfo) $matcher = new URIElementMatcher([1]); $matcher->setRequest(new SimplifiedRequest(['pathinfo' => $originalPathinfo])); $result = $matcher->reverseMatch($siteAccessName); - $this->assertInstanceOf(URIElement::class, $result); - $this->assertSame("/{$siteAccessName}{$originalPathinfo}", $result->getRequest()->pathinfo); - $this->assertSame("/$siteAccessName/some/linked/uri", $result->analyseLink('/some/linked/uri')); - $this->assertSame('/foo/bar/baz', $result->analyseURI("/$siteAccessName/foo/bar/baz")); + self::assertInstanceOf(URIElement::class, $result); + self::assertSame("/{$siteAccessName}{$originalPathinfo}", $result->getRequest()->pathinfo); + self::assertSame("/$siteAccessName/some/linked/uri", $result->analyseLink('/some/linked/uri')); + self::assertSame('/foo/bar/baz', $result->analyseURI("/$siteAccessName/foo/bar/baz")); } public function reverseMatchProvider() @@ -145,7 +146,7 @@ public function testSerialize() $matcher->setRequest(new SimplifiedRequest(['pathinfo' => '/foo/bar/baz'])); $serializedSA2 = serialize($sa); - $this->assertSame($serializedSA1, $serializedSA2); + self::assertSame($serializedSA1, $serializedSA2); } protected function createRouter(): Router diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterURIRegexTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterURIRegexTest.php index e4f3f3ca8b..e20ce44a49 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterURIRegexTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterURIRegexTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; @@ -75,7 +76,7 @@ public function matchProvider(): array public function testGetName() { $matcher = new RegexMatcher([], []); - $this->assertSame('uri:regexp', $matcher->getName()); + self::assertSame('uri:regexp', $matcher->getName()); } public function testSerialize() @@ -93,7 +94,7 @@ public function testSerialize() $matcher->setRequest(new SimplifiedRequest(['pathinfo' => '/foo/bar/baz'])); $serializedSA2 = serialize($sa); - $this->assertSame($serializedSA1, $serializedSA2); + self::assertSame($serializedSA1, $serializedSA2); } protected function createRouter(): Router diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php index aeac59795f..eebe52612d 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; @@ -75,7 +76,7 @@ public function matchProvider(): array public function testGetName() { $matcher = new URITextMatcher([], []); - $this->assertSame('uri:text', $matcher->getName()); + self::assertSame('uri:text', $matcher->getName()); } public function testAnalyseURI() @@ -90,7 +91,7 @@ public function testAnalyseURI() ); $matcher->setRequest(SimplifiedRequest::fromUrl('http://phoenix-rises.fm/footestbar/blabla')); - $this->assertSame($semanticURI, $matcher->analyseURI($siteAccessURI . $semanticURI)); + self::assertSame($semanticURI, $matcher->analyseURI($siteAccessURI . $semanticURI)); } public function testAnalyseLink() @@ -105,7 +106,7 @@ public function testAnalyseLink() ); $matcher->setRequest(SimplifiedRequest::fromUrl('http://phoenix-rises.fm/footestbar/blabla')); - $this->assertSame($siteAccessURI . $semanticURI, $matcher->analyseLink($semanticURI)); + self::assertSame($siteAccessURI . $semanticURI, $matcher->analyseLink($semanticURI)); } public function testReverseMatch() @@ -120,10 +121,10 @@ public function testReverseMatch() $matcher->setRequest(new SimplifiedRequest(['pathinfo' => $semanticURI])); $result = $matcher->reverseMatch('something'); - $this->assertInstanceOf(URIText::class, $result); + self::assertInstanceOf(URIText::class, $result); $request = $result->getRequest(); - $this->assertInstanceOf(SimplifiedRequest::class, $request); - $this->assertSame("/foosomethingbar{$semanticURI}", $request->pathinfo); + self::assertInstanceOf(SimplifiedRequest::class, $request); + self::assertSame("/foosomethingbar{$semanticURI}", $request->pathinfo); } protected function createRouter(): Router diff --git a/tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php b/tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php index 6ba29301eb..23f9f45ceb 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php @@ -107,7 +107,7 @@ public function testGetCurrentSiteAccessesRelation(): void ->method('getSiteAccesses') ->willReturn($this->availableSiteAccesses); - $this->assertSame(['current', 'first_sa'], $this->getSiteAccessService()->getSiteAccessesRelation()); + self::assertSame(['current', 'first_sa'], $this->getSiteAccessService()->getSiteAccessesRelation()); } public function testGetFirstSiteAccessesRelation(): void @@ -120,7 +120,7 @@ public function testGetFirstSiteAccessesRelation(): void ->method('getSiteAccesses') ->willReturn($this->availableSiteAccesses); - $this->assertSame( + self::assertSame( ['current', 'first_sa'], $this->getSiteAccessService()->getSiteAccessesRelation(new SiteAccess('first_sa')) ); diff --git a/tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php b/tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php index 1f989ed964..b3166c34c4 100644 --- a/tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php +++ b/tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Templating; use Ibexa\Contracts\Core\Repository\LocationService; @@ -60,7 +61,7 @@ public function testGetSiteaccess() $request->attributes->set('siteaccess', $siteAccess); $this->helper->setRequestStack($requestStack); - $this->assertSame($siteAccess, $this->helper->getSiteaccess()); + self::assertSame($siteAccess, $this->helper->getSiteaccess()); } public function testGetViewParameters() @@ -76,7 +77,7 @@ public function testGetViewParameters() $requestStack->push($request); $this->helper->setRequestStack($requestStack); - $this->assertSame($viewParameters, $this->helper->getViewParameters()); + self::assertSame($viewParameters, $this->helper->getViewParameters()); } public function testGetViewParametersString() @@ -88,7 +89,7 @@ public function testGetViewParametersString() $requestStack->push($request); $this->helper->setRequestStack($requestStack); - $this->assertSame($viewParametersString, $this->helper->getViewParametersString()); + self::assertSame($viewParametersString, $this->helper->getViewParametersString()); } public function testGetRequestedUriString() @@ -100,7 +101,7 @@ public function testGetRequestedUriString() $requestStack->push($request); $this->helper->setRequestStack($requestStack); - $this->assertSame($semanticPathinfo, $this->helper->getRequestedUriString()); + self::assertSame($semanticPathinfo, $this->helper->getRequestedUriString()); } public function testGetSystemUriStringNoUrlAlias() @@ -112,7 +113,7 @@ public function testGetSystemUriStringNoUrlAlias() $requestStack = new RequestStack(); $requestStack->push($request); $this->helper->setRequestStack($requestStack); - $this->assertSame($semanticPathinfo, $this->helper->getSystemUriString()); + self::assertSame($semanticPathinfo, $this->helper->getSystemUriString()); } public function testGetSystemUriString() @@ -130,33 +131,33 @@ public function testGetSystemUriString() $requestStack->push($request); $this->router - ->expects($this->once()) + ->expects(self::once()) ->method('generate') ->with('ibexa.content.view', [ 'contentId' => $contentId, 'locationId' => $locationId, 'viewType' => $viewType, ]) - ->will($this->returnValue($expectedSystemUriString)); + ->will(self::returnValue($expectedSystemUriString)); $this->helper->setRequestStack($requestStack); - $this->assertSame($expectedSystemUriString, $this->helper->getSystemUriString()); + self::assertSame($expectedSystemUriString, $this->helper->getSystemUriString()); } public function testGetConfigResolver() { - $this->assertSame($this->configResolver, $this->helper->getConfigResolver()); + self::assertSame($this->configResolver, $this->helper->getConfigResolver()); } public function testGetRootLocation() { $rootLocationId = 2; $this->configResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getParameter') ->with('content.tree_root.location_id') - ->will($this->returnValue($rootLocationId)); + ->will(self::returnValue($rootLocationId)); $rootLocation = $this ->getMockBuilder(Location::class) @@ -164,12 +165,12 @@ public function testGetRootLocation() ->getMock(); $this->locationService - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') ->with($rootLocationId) - ->will($this->returnValue($rootLocation)); + ->will(self::returnValue($rootLocation)); - $this->assertSame($rootLocation, $this->helper->getRootLocation()); + self::assertSame($rootLocation, $this->helper->getRootLocation()); } public function testGetTranslationSiteAccess() @@ -177,23 +178,23 @@ public function testGetTranslationSiteAccess() $language = 'fre-FR'; $siteaccess = 'fre'; $this->translationHelper - ->expects($this->once()) + ->expects(self::once()) ->method('getTranslationSiteAccess') ->with($language) - ->will($this->returnValue($siteaccess)); + ->will(self::returnValue($siteaccess)); - $this->assertSame($siteaccess, $this->helper->getTranslationSiteAccess($language)); + self::assertSame($siteaccess, $this->helper->getTranslationSiteAccess($language)); } public function testGetAvailableLanguages() { $languages = ['fre-FR', 'eng-GB', 'esl-ES']; $this->translationHelper - ->expects($this->once()) + ->expects(self::once()) ->method('getAvailableLanguages') - ->will($this->returnValue($languages)); + ->will(self::returnValue($languages)); - $this->assertSame($languages, $this->helper->getAvailableLanguages()); + self::assertSame($languages, $this->helper->getAvailableLanguages()); } } diff --git a/tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php b/tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php index 0d3cc48c2b..7699307291 100644 --- a/tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php +++ b/tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php @@ -32,7 +32,7 @@ public function testUnsupportedValueObject(): void $valueObject = new class() extends ValueObject { }; - $this->assertFalse($renderContentStrategy->supports($valueObject)); + self::assertFalse($renderContentStrategy->supports($valueObject)); $this->expectException(InvalidArgumentException::class); $renderContentStrategy->render($valueObject, new RenderOptions()); @@ -49,9 +49,9 @@ public function testDefaultFragmentRenderer(): void ); $contentMock = $this->createMock(Content::class); - $this->assertTrue($renderContentStrategy->supports($contentMock)); + self::assertTrue($renderContentStrategy->supports($contentMock)); - $this->assertSame( + self::assertSame( 'inline_rendered', $renderContentStrategy->render($contentMock, new RenderOptions()) ); @@ -65,7 +65,7 @@ public function testUnknownFragmentRenderer(): void ); $contentMock = $this->createMock(Content::class); - $this->assertTrue($renderContentStrategy->supports($contentMock)); + self::assertTrue($renderContentStrategy->supports($contentMock)); $this->expectException(InvalidArgumentException::class); $renderContentStrategy->render($contentMock, new RenderOptions()); @@ -83,9 +83,9 @@ public function testMultipleFragmentRenderers(): void ); $contentMock = $this->createMock(Content::class); - $this->assertTrue($renderContentStrategy->supports($contentMock)); + self::assertTrue($renderContentStrategy->supports($contentMock)); - $this->assertSame( + self::assertSame( 'method_b_rendered', $renderContentStrategy->render($contentMock, new RenderOptions([ 'method' => 'method_b', @@ -106,7 +106,7 @@ public function testExpectedMethodRenderArgumentsFormat(): void ->method('getName') ->willReturn('method_b'); - $controllerReferenceCallback = $this->callback(function (ControllerReference $controllerReference) { + $controllerReferenceCallback = self::callback(function (ControllerReference $controllerReference) { $this->assertInstanceOf(ControllerReference::class, $controllerReference); $this->assertEquals('ibexa_content::viewAction', $controllerReference->controller); $this->assertSame([ @@ -117,14 +117,14 @@ public function testExpectedMethodRenderArgumentsFormat(): void return true; }); - $requestCallback = $this->callback(function (Request $request) use ($siteAccess, $content): bool { + $requestCallback = self::callback(function (Request $request) use ($siteAccess, $content): bool { $this->assertSame('TEST/1.0', $request->headers->get('Surrogate-Capability')); return true; }); $fragmentRendererMock - ->expects($this->once()) + ->expects(self::once()) ->method('render') ->with($controllerReferenceCallback, $requestCallback) ->willReturn(new Response('some_rendered_content')); @@ -141,7 +141,7 @@ public function testExpectedMethodRenderArgumentsFormat(): void $request ); - $this->assertSame('some_rendered_content', $renderContentStrategy->render( + self::assertSame('some_rendered_content', $renderContentStrategy->render( $content, new RenderOptions([ 'method' => 'method_b', diff --git a/tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php b/tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php index 94e28a4f64..8905fdd7b6 100644 --- a/tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php +++ b/tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php @@ -32,7 +32,7 @@ public function testUnsupportedValueObject(): void $valueObject = new class() extends ValueObject { }; - $this->assertFalse($renderLocationStrategy->supports($valueObject)); + self::assertFalse($renderLocationStrategy->supports($valueObject)); $this->expectException(InvalidArgumentException::class); $renderLocationStrategy->render($valueObject, new RenderOptions()); @@ -49,9 +49,9 @@ public function testDefaultFragmentRenderer(): void ); $locationMock = $this->createMock(Location::class); - $this->assertTrue($renderLocationStrategy->supports($locationMock)); + self::assertTrue($renderLocationStrategy->supports($locationMock)); - $this->assertSame( + self::assertSame( 'inline_rendered', $renderLocationStrategy->render($locationMock, new RenderOptions()) ); @@ -65,7 +65,7 @@ public function testUnknownFragmentRenderer(): void ); $locationMock = $this->createMock(Location::class); - $this->assertTrue($renderLocationStrategy->supports($locationMock)); + self::assertTrue($renderLocationStrategy->supports($locationMock)); $this->expectException(InvalidArgumentException::class); $renderLocationStrategy->render($locationMock, new RenderOptions()); @@ -83,9 +83,9 @@ public function testMultipleFragmentRenderers(): void ); $locationMock = $this->createMock(Location::class); - $this->assertTrue($renderLocationStrategy->supports($locationMock)); + self::assertTrue($renderLocationStrategy->supports($locationMock)); - $this->assertSame( + self::assertSame( 'method_b_rendered', $renderLocationStrategy->render($locationMock, new RenderOptions([ 'method' => 'method_b', @@ -107,7 +107,7 @@ public function testExpectedMethodRenderRequestFormat(): void ->method('getName') ->willReturn('method_b'); - $controllerReferenceCallback = $this->callback(function (ControllerReference $controllerReference) { + $controllerReferenceCallback = self::callback(function (ControllerReference $controllerReference) { $this->assertInstanceOf(ControllerReference::class, $controllerReference); $this->assertEquals('ibexa_content::viewAction', $controllerReference->controller); $this->assertSame([ @@ -119,14 +119,14 @@ public function testExpectedMethodRenderRequestFormat(): void return true; }); - $requestCallback = $this->callback(function (Request $request) use ($siteAccess, $content): bool { + $requestCallback = self::callback(function (Request $request) use ($siteAccess, $content): bool { $this->assertSame('TEST/1.0', $request->headers->get('Surrogate-Capability')); return true; }); $fragmentRendererMock - ->expects($this->once()) + ->expects(self::once()) ->method('render') ->with($controllerReferenceCallback, $requestCallback) ->willReturn(new Response('some_rendered_content')); @@ -143,7 +143,7 @@ public function testExpectedMethodRenderRequestFormat(): void $request ); - $this->assertSame('some_rendered_content', $renderLocationStrategy->render( + self::assertSame('some_rendered_content', $renderLocationStrategy->render( $location, new RenderOptions([ 'method' => 'method_b', diff --git a/tests/lib/MVC/Symfony/Templating/RenderOptionsTest.php b/tests/lib/MVC/Symfony/Templating/RenderOptionsTest.php index 089538c0a4..544ffc560a 100644 --- a/tests/lib/MVC/Symfony/Templating/RenderOptionsTest.php +++ b/tests/lib/MVC/Symfony/Templating/RenderOptionsTest.php @@ -20,10 +20,10 @@ public function testInitialOptions(): void 'b' => null, ]); - $this->assertTrue($renderOptions->has('a')); - $this->assertSame('value_a', $renderOptions->get('a')); - $this->assertFalse($renderOptions->has('b')); - $this->assertSame([ + self::assertTrue($renderOptions->has('a')); + self::assertSame('value_a', $renderOptions->get('a')); + self::assertFalse($renderOptions->has('b')); + self::assertSame([ 'a' => 'value_a', 'b' => null, ], $renderOptions->all()); @@ -34,16 +34,16 @@ public function testSettingOptions(): void $renderOptions = new RenderOptions(); $renderOptions->set('a', 'value_a'); - $this->assertTrue($renderOptions->has('a')); - $this->assertSame('value_a', $renderOptions->get('a')); + self::assertTrue($renderOptions->has('a')); + self::assertSame('value_a', $renderOptions->get('a')); - $this->assertTrue($renderOptions->has('a')); + self::assertTrue($renderOptions->has('a')); $renderOptions->set('a', 'different_value_a'); - $this->assertSame('different_value_a', $renderOptions->get('a')); + self::assertSame('different_value_a', $renderOptions->get('a')); - $this->assertFalse($renderOptions->has('b')); + self::assertFalse($renderOptions->has('b')); $renderOptions->set('b', null); - $this->assertFalse($renderOptions->has('b')); + self::assertFalse($renderOptions->has('b')); } public function testGettingDefaultOptions(): void @@ -53,14 +53,14 @@ public function testGettingDefaultOptions(): void 'b' => 'default_value_b', ]); - $this->assertFalse($renderOptions->has('a')); - $this->assertSame('some_default_value', $renderOptions->get('a', 'some_default_value')); + self::assertFalse($renderOptions->has('a')); + self::assertSame('some_default_value', $renderOptions->get('a', 'some_default_value')); - $this->assertTrue($renderOptions->has('b')); - $this->assertSame('default_value_b', $renderOptions->get('b', 'other_default_value')); + self::assertTrue($renderOptions->has('b')); + self::assertSame('default_value_b', $renderOptions->get('b', 'other_default_value')); - $this->assertFalse($renderOptions->has('c')); - $this->assertSame('default_value_c', $renderOptions->get('c', 'default_value_c')); + self::assertFalse($renderOptions->has('c')); + self::assertSame('default_value_c', $renderOptions->get('c', 'default_value_c')); } public function testUnsettingOptions(): void @@ -72,12 +72,12 @@ public function testUnsettingOptions(): void ]); $renderOptions->set('a', null); - $this->assertFalse($renderOptions->has('a')); + self::assertFalse($renderOptions->has('a')); $renderOptions->remove('b'); - $this->assertFalse($renderOptions->has('b')); + self::assertFalse($renderOptions->has('b')); - $this->assertTrue($renderOptions->has('c')); + self::assertTrue($renderOptions->has('c')); } } diff --git a/tests/lib/MVC/Symfony/Templating/RenderStrategyTest.php b/tests/lib/MVC/Symfony/Templating/RenderStrategyTest.php index 47533b5174..ac90936cc2 100644 --- a/tests/lib/MVC/Symfony/Templating/RenderStrategyTest.php +++ b/tests/lib/MVC/Symfony/Templating/RenderStrategyTest.php @@ -52,7 +52,7 @@ public function testNoStrategies(): void $valueObject = new class() extends ValueObject { }; - $this->assertFalse($renderStrategy->supports($valueObject)); + self::assertFalse($renderStrategy->supports($valueObject)); $this->expectException(InvalidArgumentException::class); $renderStrategy->render($valueObject, new RenderOptions()); @@ -67,7 +67,7 @@ public function testNoSupportedStrategy(): void $valueObject = new class() extends ValueObject { }; - $this->assertFalse($renderStrategy->supports($valueObject)); + self::assertFalse($renderStrategy->supports($valueObject)); $this->expectException(InvalidArgumentException::class); $renderStrategy->render($valueObject, new RenderOptions()); @@ -81,8 +81,8 @@ public function testSupportStrategy(): void $valueObject = new class() extends ValueObject { }; - $this->assertTrue($renderStrategy->supports($valueObject)); - $this->assertSame('some_rendered_content', $renderStrategy->render($valueObject, new RenderOptions())); + self::assertTrue($renderStrategy->supports($valueObject)); + self::assertSame('some_rendered_content', $renderStrategy->render($valueObject, new RenderOptions())); } public function testMultipleStrategiesSameValueObjectType(): void @@ -96,8 +96,8 @@ public function testMultipleStrategiesSameValueObjectType(): void $this->createRenderStrategy('other_rendered_content', $valueObjectClass), ]); - $this->assertTrue($renderStrategy->supports($valueObject)); - $this->assertSame('some_rendered_content', $renderStrategy->render($valueObject, new RenderOptions())); + self::assertTrue($renderStrategy->supports($valueObject)); + self::assertSame('some_rendered_content', $renderStrategy->render($valueObject, new RenderOptions())); } public function testMultipleStrategies(): void @@ -111,8 +111,8 @@ public function testMultipleStrategies(): void $this->createRenderStrategy('other_rendered_content', $valueObjectClass), ]); - $this->assertTrue($renderStrategy->supports($valueObject)); - $this->assertSame('other_rendered_content', $renderStrategy->render($valueObject, new RenderOptions())); + self::assertTrue($renderStrategy->supports($valueObject)); + self::assertSame('other_rendered_content', $renderStrategy->render($valueObject, new RenderOptions())); } } diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php index 7696b0ab8d..2df527967c 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Templating\Twig\Extension; use Ibexa\Contracts\Core\Repository\ContentService; @@ -130,10 +131,10 @@ private function getConfigResolverMock() { $mock = $this->createMock(ConfigResolverInterface::class); // Signature: ConfigResolverInterface->getParameter( $paramName, $namespace = null, $scope = null ) - $mock->expects($this->any()) + $mock->expects(self::any()) ->method('getParameter') ->will( - $this->returnValueMap( + self::returnValueMap( [ [ 'languages', @@ -163,9 +164,9 @@ protected function getField($isEmpty) $field = new Field(['fieldDefIdentifier' => 'testfield', 'value' => null]); $this->fieldHelperMock - ->expects($this->once()) + ->expects(self::once()) ->method('isFieldEmpty') - ->will($this->returnValue($isEmpty)); + ->will(self::returnValue($isEmpty)); return $field; } @@ -177,9 +178,9 @@ protected function getRepositoryMock() { $mock = $this->createMock(Repository::class); - $mock->expects($this->any()) + $mock->expects(self::any()) ->method('getContentTypeService') - ->will($this->returnValue($this->getContentTypeServiceMock())); + ->will(self::returnValue($this->getContentTypeServiceMock())); return $mock; } @@ -191,10 +192,10 @@ protected function getContentTypeServiceMock() { $mock = $this->createMock(ContentTypeService::class); - $mock->expects($this->any()) + $mock->expects(self::any()) ->method('loadContentType') ->will( - $this->returnCallback( + self::returnCallback( function ($contentTypeId) { return new ContentType( [ diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php index 96646006f7..a903909131 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Templating\Twig\Extension; use Ibexa\Contracts\Core\Repository\ContentService; @@ -140,10 +141,10 @@ private function getConfigResolverMock() { $mock = $this->createMock(ConfigResolverInterface::class); // Signature: ConfigResolverInterface->getParameter( $paramName, $namespace = null, $scope = null ) - $mock->expects($this->any()) + $mock->expects(self::any()) ->method('getParameter') ->will( - $this->returnValueMap( + self::returnValueMap( [ [ 'languages', diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php index b526e49d6f..7555d68f14 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Templating\Twig\Extension; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; @@ -84,10 +85,10 @@ protected function getFixturesDir() protected function getConfigResolverInterfaceMock() { $configResolverInterfaceMock = $this->createMock(ConfigResolverInterface::class); - $configResolverInterfaceMock->expects($this->any()) + $configResolverInterfaceMock->expects(self::any()) ->method('getParameter') ->with('languages') - ->will($this->returnValue($this->getLocale())); + ->will(self::returnValue($this->getLocale())); return $configResolverInterfaceMock; } @@ -98,10 +99,10 @@ protected function getConfigResolverInterfaceMock() protected function getLocaleConverterInterfaceMock() { $this->localeConverterInterfaceMock = $this->createMock(LocaleConverterInterface::class); - $this->localeConverterInterfaceMock->expects($this->any()) + $this->localeConverterInterfaceMock->expects(self::any()) ->method('convertToPOSIX') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['fre-FR', 'fr-FR'], ['eng-GB', 'en-GB'], @@ -120,8 +121,8 @@ protected function getTranslatorInterfaceMock() $that = $this; $this->translatorMock = $this->createMock(TranslatorInterface::class); $this->translatorMock - ->expects($this->any())->method('trans')->will( - $this->returnCallback( + ->expects(self::any())->method('trans')->will( + self::returnCallback( static function ($suffixes) use ($that) { foreach ($that->getLocale() as $value) { if ($value === 'fre-FR') { diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php index cca6652886..bfb7fe50d2 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\Templating\Twig\Extension; use Exception; @@ -32,7 +33,7 @@ protected function doIntegrationTest($file, $message, $condition, $templates, $e if ($condition) { eval('$ret = ' . $condition . ';'); if (!$ret) { - $this->markTestSkipped($condition); + self::markTestSkipped($condition); } } @@ -63,7 +64,7 @@ protected function doIntegrationTest($file, $message, $condition, $templates, $e $template = $twig->loadTemplate($twig->getTemplateClass('index.twig'), 'index.twig'); } catch (Exception $e) { if (false !== $exception) { - $this->assertEquals( + self::assertEquals( trim($exception), trim( sprintf('%s: %s', get_class($e), $e->getMessage()) @@ -86,7 +87,7 @@ protected function doIntegrationTest($file, $message, $condition, $templates, $e $output = trim($template->render(eval($match[1] . ';')), "\n "); } catch (Exception $e) { if (false !== $exception) { - $this->assertStringContainsString( + self::assertStringContainsString( trim($exception), trim( sprintf('%s: %s', get_class($e), $e->getMessage()) @@ -109,7 +110,7 @@ protected function doIntegrationTest($file, $message, $condition, $templates, $e if (false !== $exception) { list($class) = explode(':', $exception); - $this->assertThat( + self::assertThat( null, new PHPUnitException($class) ); @@ -128,7 +129,7 @@ protected function doIntegrationTest($file, $message, $condition, $templates, $e ); } } - $this->assertEquals($expected, $output, $message . ' (in ' . $file . ')'); + self::assertEquals($expected, $output, $message . ' (in ' . $file . ')'); } } } diff --git a/tests/lib/MVC/Symfony/Templating/Twig/ResourceProviderTest.php b/tests/lib/MVC/Symfony/Templating/Twig/ResourceProviderTest.php index ef0b521e09..dd9b9f3ecb 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/ResourceProviderTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/ResourceProviderTest.php @@ -34,13 +34,13 @@ public function testGetFieldViewResources(): void $templates = array_column($resources, 'template'); $priorities = array_column($resources, 'priority'); - $this->assertEquals('templates/fields_override1.html.twig', array_shift($templates)); - $this->assertEquals('templates/fields_override2.html.twig', array_shift($templates)); - $this->assertEquals('templates/fields_default.html.twig', array_shift($templates)); + self::assertEquals('templates/fields_override1.html.twig', array_shift($templates)); + self::assertEquals('templates/fields_override2.html.twig', array_shift($templates)); + self::assertEquals('templates/fields_default.html.twig', array_shift($templates)); - $this->assertEquals(10, array_shift($priorities)); - $this->assertEquals(20, array_shift($priorities)); - $this->assertEquals(0, array_shift($priorities)); + self::assertEquals(10, array_shift($priorities)); + self::assertEquals(20, array_shift($priorities)); + self::assertEquals(0, array_shift($priorities)); } public function testGetFieldEditResources(): void @@ -49,13 +49,13 @@ public function testGetFieldEditResources(): void $templates = array_column($resources, 'template'); $priorities = array_column($resources, 'priority'); - $this->assertEquals('templates/fields_override1.html.twig', array_shift($templates)); - $this->assertEquals('templates/fields_override2.html.twig', array_shift($templates)); - $this->assertEquals('templates/fields_default.html.twig', array_shift($templates)); + self::assertEquals('templates/fields_override1.html.twig', array_shift($templates)); + self::assertEquals('templates/fields_override2.html.twig', array_shift($templates)); + self::assertEquals('templates/fields_default.html.twig', array_shift($templates)); - $this->assertEquals(10, array_shift($priorities)); - $this->assertEquals(20, array_shift($priorities)); - $this->assertEquals(0, array_shift($priorities)); + self::assertEquals(10, array_shift($priorities)); + self::assertEquals(20, array_shift($priorities)); + self::assertEquals(0, array_shift($priorities)); } public function testGetFieldDefinitionViewResources(): void @@ -64,13 +64,13 @@ public function testGetFieldDefinitionViewResources(): void $templates = array_column($resources, 'template'); $priorities = array_column($resources, 'priority'); - $this->assertEquals('templates/settings_override1.html.twig', array_shift($templates)); - $this->assertEquals('templates/settings_override2.html.twig', array_shift($templates)); - $this->assertEquals('templates/settings_default.html.twig', array_shift($templates)); + self::assertEquals('templates/settings_override1.html.twig', array_shift($templates)); + self::assertEquals('templates/settings_override2.html.twig', array_shift($templates)); + self::assertEquals('templates/settings_default.html.twig', array_shift($templates)); - $this->assertEquals(10, array_shift($priorities)); - $this->assertEquals(20, array_shift($priorities)); - $this->assertEquals(0, array_shift($priorities)); + self::assertEquals(10, array_shift($priorities)); + self::assertEquals(20, array_shift($priorities)); + self::assertEquals(0, array_shift($priorities)); } public function testGetFieldDefinitionEditResources(): void @@ -79,13 +79,13 @@ public function testGetFieldDefinitionEditResources(): void $templates = array_column($resources, 'template'); $priorities = array_column($resources, 'priority'); - $this->assertEquals('templates/settings_override1.html.twig', array_shift($templates)); - $this->assertEquals('templates/settings_override2.html.twig', array_shift($templates)); - $this->assertEquals('templates/settings_default.html.twig', array_shift($templates)); + self::assertEquals('templates/settings_override1.html.twig', array_shift($templates)); + self::assertEquals('templates/settings_override2.html.twig', array_shift($templates)); + self::assertEquals('templates/settings_default.html.twig', array_shift($templates)); - $this->assertEquals(10, array_shift($priorities)); - $this->assertEquals(20, array_shift($priorities)); - $this->assertEquals(0, array_shift($priorities)); + self::assertEquals(10, array_shift($priorities)); + self::assertEquals(20, array_shift($priorities)); + self::assertEquals(0, array_shift($priorities)); } /** diff --git a/tests/lib/MVC/Symfony/Translation/ExceptionMessageTemplateFileVisitorTest.php b/tests/lib/MVC/Symfony/Translation/ExceptionMessageTemplateFileVisitorTest.php index b151a1915d..9dd7874e92 100644 --- a/tests/lib/MVC/Symfony/Translation/ExceptionMessageTemplateFileVisitorTest.php +++ b/tests/lib/MVC/Symfony/Translation/ExceptionMessageTemplateFileVisitorTest.php @@ -89,7 +89,7 @@ public function testWrongTranslationId(): void $logger = $this->createMock(LoggerInterface::class); $logger - ->expects($this->once()) + ->expects(self::once()) ->method('error'); $this->exceptionMessageTemplateFileVisitor->setLogger($logger); diff --git a/tests/lib/MVC/Symfony/View/AbstractViewTest.php b/tests/lib/MVC/Symfony/View/AbstractViewTest.php index 3ba7a50f34..bf97210d12 100644 --- a/tests/lib/MVC/Symfony/View/AbstractViewTest.php +++ b/tests/lib/MVC/Symfony/View/AbstractViewTest.php @@ -51,15 +51,15 @@ public function testAddParameters(): void $additionalParams = ['truc' => 'muche', 'laurel' => 'hardy']; $view->addParameters($additionalParams); - $this->assertSame($this->getAlwaysAvailableParams() + $params + $additionalParams, $view->getParameters()); + self::assertSame($this->getAlwaysAvailableParams() + $params + $additionalParams, $view->getParameters()); } public function testHasParameter(): View { $view = $this->createViewUnderTest(__METHOD__, ['foo' => 'bar']); - $this->assertTrue($view->hasParameter('foo')); - $this->assertFalse($view->hasParameter('nonExistent')); + self::assertTrue($view->hasParameter('foo')); + self::assertFalse($view->hasParameter('nonExistent')); return $view; } @@ -69,7 +69,7 @@ public function testHasParameter(): View */ public function testGetParameter(View $view): View { - $this->assertSame('bar', $view->getParameter('foo')); + self::assertSame('bar', $view->getParameter('foo')); return $view; } @@ -94,7 +94,7 @@ public function testSetTemplateIdentifier($templateIdentifier): void $contentView = $this->createViewUnderTest(); $contentView->setTemplateIdentifier($templateIdentifier); - $this->assertSame($templateIdentifier, $contentView->getTemplateIdentifier()); + self::assertSame($templateIdentifier, $contentView->getTemplateIdentifier()); } public function goodTemplateIdentifierProvider(): array diff --git a/tests/lib/MVC/Symfony/View/Builder/ContentViewBuilderTest.php b/tests/lib/MVC/Symfony/View/Builder/ContentViewBuilderTest.php index f1348661f4..b87ebe2f06 100644 --- a/tests/lib/MVC/Symfony/View/Builder/ContentViewBuilderTest.php +++ b/tests/lib/MVC/Symfony/View/Builder/ContentViewBuilderTest.php @@ -75,7 +75,7 @@ protected function setUp(): void $this->permissionResolver = $this->getMockBuilder(PermissionResolver::class)->getMock(); $this->requestStack = $this->getMockBuilder(RequestStack::class)->getMock(); $this->repository - ->expects($this->any()) + ->expects(self::any()) ->method('getPermissionResolver') ->willReturn($this->permissionResolver); @@ -90,8 +90,8 @@ protected function setUp(): void public function testMatches(): void { - $this->assertTrue($this->contentViewBuilder->matches('ibexa_content:55')); - $this->assertFalse($this->contentViewBuilder->matches('dummy_value')); + self::assertTrue($this->contentViewBuilder->matches('ibexa_content:55')); + self::assertFalse($this->contentViewBuilder->matches('dummy_value')); } public function testBuildViewWithoutLocationIdAndContentId(): void @@ -115,7 +115,7 @@ public function testBuildViewWithInvalidLocationId(): void ]; $this->repository - ->expects($this->once()) + ->expects(self::once()) ->method('sudo') ->willThrowException(new NotFoundException('location', 865)); @@ -135,7 +135,7 @@ public function testBuildViewWithHiddenLocation(): void $location = new Location(['invisible' => true]); $this->repository - ->expects($this->once()) + ->expects(self::once()) ->method('sudo') ->willReturn($location); @@ -166,12 +166,12 @@ public function testBuildViewWithoutContentReadPermission(): void // It's call for LocationService::loadLocation() $this->repository - ->expects($this->once()) + ->expects(self::once()) ->method('sudo') ->willReturn($location); $this->permissionResolver - ->expects($this->any()) + ->expects(self::any()) ->method('canUser') ->willReturn(false); @@ -206,17 +206,17 @@ public function testBuildEmbedViewWithoutContentViewEmbedPermission(): void // It's call for LocationService::loadLocation() $this->repository - ->expects($this->once()) + ->expects(self::once()) ->method('sudo') ->willReturn($location); $this->permissionResolver - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('canUser') ->willReturn(false); $this->permissionResolver - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('canUser') ->willReturn(false); @@ -333,12 +333,12 @@ public function testBuildViewWithContentWhichDoesNotBelongToLocation(): void // It's call for LocationService::loadLocation() $this->repository - ->expects($this->once()) + ->expects(self::once()) ->method('sudo') ->willReturn($location); $this->permissionResolver - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('canUser') ->willReturn(true); @@ -375,7 +375,7 @@ public function testBuildViewWithTranslatedContentWithoutLocation(): void // No call for LocationService::loadLocation() $this->repository - ->expects($this->never()) + ->expects(self::never()) ->method('sudo'); $this->repository @@ -385,7 +385,7 @@ public function testBuildViewWithTranslatedContentWithoutLocation(): void $expectedView = new ContentView(null, [], 'full'); $expectedView->setContent($content); - $this->assertEquals($expectedView, $this->contentViewBuilder->buildView($parameters)); + self::assertEquals($expectedView, $this->contentViewBuilder->buildView($parameters)); } public function testBuildView(): void @@ -415,16 +415,16 @@ public function testBuildView(): void ]; $this->repository - ->expects($this->once()) + ->expects(self::once()) ->method('sudo') ->willReturn($location); $this->permissionResolver - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('canUser') ->willReturn(true); - $this->assertEquals($expectedView, $this->contentViewBuilder->buildView($parameters)); + self::assertEquals($expectedView, $this->contentViewBuilder->buildView($parameters)); } /** @@ -447,7 +447,7 @@ public function testBuildViewInsertsDoNotGenerateEmbedUrlParameter(): void $parameters = ['viewType' => 'embed', 'contentId' => 120, '_controller' => null]; $this->repository - ->expects($this->once()) + ->expects(self::once()) ->method('sudo') ->willReturn($content); @@ -466,7 +466,7 @@ public function testBuildViewInsertsDoNotGenerateEmbedUrlParameter(): void ->parametersInjector ->method('injectViewParameters') ->with( - $this->isInstanceOf(ContentView::class), + self::isInstanceOf(ContentView::class), array_merge( $parameters, // invocation expectation: diff --git a/tests/lib/MVC/Symfony/View/LoginFormViewTest.php b/tests/lib/MVC/Symfony/View/LoginFormViewTest.php index 7f60891914..5ea750bcf9 100644 --- a/tests/lib/MVC/Symfony/View/LoginFormViewTest.php +++ b/tests/lib/MVC/Symfony/View/LoginFormViewTest.php @@ -23,7 +23,7 @@ public function testSetLastUsername(): void $view = $this->createViewUnderTest(); $view->setLastUsername('johndoe'); - $this->assertEquals('johndoe', $view->getLastUsername()); + self::assertEquals('johndoe', $view->getLastUsername()); } public function testSetLastAuthenticationError(): void @@ -34,7 +34,7 @@ public function testSetLastAuthenticationError(): void $view = $this->createViewUnderTest(); $view->setLastAuthenticationError($exception); - $this->assertEquals($exception, $view->getLastAuthenticationException()); + self::assertEquals($exception, $view->getLastAuthenticationException()); } protected function createViewUnderTest($template = null, array $parameters = [], $viewType = 'full'): View diff --git a/tests/lib/MVC/Symfony/View/Renderer/TemplateRendererTest.php b/tests/lib/MVC/Symfony/View/Renderer/TemplateRendererTest.php index b24bfa5da4..4ba75aac17 100644 --- a/tests/lib/MVC/Symfony/View/Renderer/TemplateRendererTest.php +++ b/tests/lib/MVC/Symfony/View/Renderer/TemplateRendererTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\View\Renderer; use Ibexa\Core\MVC\Exception\NoViewTemplateException; @@ -42,15 +43,15 @@ public function testRender() $view->setTemplateIdentifier('path/to/template.html.twig'); $this->eventDispatcherMock - ->expects($this->once()) + ->expects(self::once()) ->method('dispatch') ->with( - $this->isInstanceOf(PreContentViewEvent::class), + self::isInstanceOf(PreContentViewEvent::class), MVCEvents::PRE_CONTENT_VIEW ); $this->templateEngineMock - ->expects($this->once()) + ->expects(self::once()) ->method('render') ->with( 'path/to/template.html.twig', diff --git a/tests/lib/MVC/Symfony/View/VariableProviderRegistryTest.php b/tests/lib/MVC/Symfony/View/VariableProviderRegistryTest.php index 629c184d4f..5e28067f13 100644 --- a/tests/lib/MVC/Symfony/View/VariableProviderRegistryTest.php +++ b/tests/lib/MVC/Symfony/View/VariableProviderRegistryTest.php @@ -58,8 +58,8 @@ public function testParameterProviderGetter(): void $providerA = $registry->getTwigVariableProvider('provider_a'); $providerB = $registry->getTwigVariableProvider('provider_b'); - $this->assertEquals($providerA->getIdentifier(), 'provider_a'); - $this->assertEquals($providerB->getIdentifier(), 'provider_b'); + self::assertEquals($providerA->getIdentifier(), 'provider_a'); + self::assertEquals($providerB->getIdentifier(), 'provider_b'); } public function testParameterNotFoundProviderGetter(): void @@ -83,12 +83,12 @@ public function testParameterProviderSetter(): void $hasProviderC = $registry->hasTwigVariableProvider('provider_c'); - $this->assertFalse($hasProviderC); + self::assertFalse($hasProviderC); $registry->setTwigVariableProvider($this->getProvider('provider_c')); $providerC = $registry->getTwigVariableProvider('provider_c'); - $this->assertEquals($providerC->getIdentifier(), 'provider_c'); + self::assertEquals($providerC->getIdentifier(), 'provider_c'); } public function testParameterProviderChecker(): void @@ -98,9 +98,9 @@ public function testParameterProviderChecker(): void $this->getProvider('provider_b'), ]); - $this->assertTrue($registry->hasTwigVariableProvider('provider_a')); - $this->assertTrue($registry->hasTwigVariableProvider('provider_b')); - $this->assertFalse($registry->hasTwigVariableProvider('provider_c')); + self::assertTrue($registry->hasTwigVariableProvider('provider_a')); + self::assertTrue($registry->hasTwigVariableProvider('provider_b')); + self::assertFalse($registry->hasTwigVariableProvider('provider_c')); } } diff --git a/tests/lib/MVC/Symfony/View/ViewManagerTest.php b/tests/lib/MVC/Symfony/View/ViewManagerTest.php index 8f18d913a5..2162ffd56e 100644 --- a/tests/lib/MVC/Symfony/View/ViewManagerTest.php +++ b/tests/lib/MVC/Symfony/View/ViewManagerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\MVC\Symfony\View; use Ibexa\Contracts\Core\Repository\ContentService as APIContentService; @@ -114,10 +115,10 @@ public function testRenderContent() $params = ['foo' => 'bar']; $templateIdentifier = 'foo:bar:baz'; $this->viewConfigurator - ->expects($this->once()) + ->expects(self::once()) ->method('configure') ->will( - $this->returnCallback( + self::returnCallback( static function (View $view) use ($templateIdentifier) { $view->setTemplateIdentifier($templateIdentifier); } @@ -127,13 +128,13 @@ static function (View $view) use ($templateIdentifier) { // Configuring template engine behaviour $expectedTemplateResult = 'This is content rendering'; $this->templateEngineMock - ->expects($this->once()) + ->expects(self::once()) ->method('render') ->with( $templateIdentifier, $params + ['content' => $content, 'view_base_layout' => $this->viewBaseLayout] ) - ->will($this->returnValue($expectedTemplateResult)); + ->will(self::returnValue($expectedTemplateResult)); self::assertSame($expectedTemplateResult, $this->viewManager->renderContent($content, 'customViewType', $params)); } @@ -150,10 +151,10 @@ public function testRenderContentWithClosure() }; $params = ['foo' => 'bar']; $this->viewConfigurator - ->expects($this->once()) + ->expects(self::once()) ->method('configure') ->will( - $this->returnCallback( + self::returnCallback( static function (View $view) use ($closure) { $view->setTemplateIdentifier($closure); } @@ -164,7 +165,7 @@ static function (View $view) use ($closure) { $params += ['content' => $content, 'view_base_layout' => $this->viewBaseLayout]; $expectedTemplateResult = array_keys($params); $this->templateEngineMock - ->expects($this->never()) + ->expects(self::never()) ->method('render'); $templateResult = unserialize($this->viewManager->renderContent($content, 'full', $params)); @@ -181,10 +182,10 @@ public function testRenderLocation() $templateIdentifier = 'foo:bar:baz'; $params = ['foo' => 'bar']; $this->viewConfigurator - ->expects($this->once()) + ->expects(self::once()) ->method('configure') ->will( - $this->returnCallback( + self::returnCallback( static function (View $view) use ($templateIdentifier) { $view->setTemplateIdentifier($templateIdentifier); } @@ -193,30 +194,30 @@ static function (View $view) use ($templateIdentifier) { $languages = ['eng-GB']; $this->configResolverMock - ->expects($this->any()) + ->expects(self::any()) ->method('getParameter') ->with('languages') - ->will($this->returnValue($languages)); + ->will(self::returnValue($languages)); $contentService = $this->createMock(APIContentService::class); - $contentService->expects($this->any()) + $contentService->expects(self::any()) ->method('loadContentByContentInfo') ->with($location->contentInfo, $languages) - ->will($this->returnValue($content)); + ->will(self::returnValue($content)); $this->repositoryMock - ->expects($this->any()) + ->expects(self::any()) ->method('getContentService') - ->will($this->returnValue($contentService)); + ->will(self::returnValue($contentService)); // Configuring template engine behaviour $expectedTemplateResult = 'This is location rendering'; $this->templateEngineMock - ->expects($this->once()) + ->expects(self::once()) ->method('render') ->with($templateIdentifier, $params + ['location' => $location, 'content' => $content, 'view_base_layout' => $this->viewBaseLayout]) - ->will($this->returnValue($expectedTemplateResult)); + ->will(self::returnValue($expectedTemplateResult)); self::assertSame($expectedTemplateResult, $this->viewManager->renderLocation($location, 'customViewType', $params)); } @@ -230,10 +231,10 @@ public function testRenderLocationWithContentPassed() $templateIdentifier = 'foo:bar:baz'; $params = ['foo' => 'bar', 'content' => $content]; $this->viewConfigurator - ->expects($this->once()) + ->expects(self::once()) ->method('configure') ->will( - $this->returnCallback( + self::returnCallback( static function (View $view) use ($templateIdentifier) { $view->setTemplateIdentifier($templateIdentifier); } @@ -242,18 +243,18 @@ static function (View $view) use ($templateIdentifier) { $contentService = $this->createMock(ContentService::class); - $contentService->expects($this->any()) + $contentService->expects(self::any()) ->method('loadContentByContentInfo') ->with($content->contentInfo) ->will( - $this->returnValue($content) + self::returnValue($content) ); $this->repositoryMock - ->expects($this->any()) + ->expects(self::any()) ->method('getContentService') ->will( - $this->returnValue( + self::returnValue( $contentService ) ); @@ -261,13 +262,13 @@ static function (View $view) use ($templateIdentifier) { // Configuring template engine behaviour $expectedTemplateResult = 'This is location rendering'; $this->templateEngineMock - ->expects($this->once()) + ->expects(self::once()) ->method('render') ->with( $templateIdentifier, $params + ['location' => $location, 'content' => $content, 'view_base_layout' => $this->viewBaseLayout] ) - ->will($this->returnValue($expectedTemplateResult)); + ->will(self::returnValue($expectedTemplateResult)); self::assertSame($expectedTemplateResult, $this->viewManager->renderLocation($location, 'customViewType', $params)); } @@ -283,10 +284,10 @@ public function testRenderLocationWithClosure() }; $params = ['foo' => 'bar']; $this->viewConfigurator - ->expects($this->once()) + ->expects(self::once()) ->method('configure') ->will( - $this->returnCallback( + self::returnCallback( static function (View $view) use ($closure) { $view->setTemplateIdentifier($closure); } @@ -295,18 +296,18 @@ static function (View $view) use ($closure) { $contentService = $this->createMock(ContentService::class); - $contentService->expects($this->any()) + $contentService->expects(self::any()) ->method('loadContentByContentInfo') ->with($content->contentInfo) ->will( - $this->returnValue($content) + self::returnValue($content) ); $this->repositoryMock - ->expects($this->any()) + ->expects(self::any()) ->method('getContentService') ->will( - $this->returnValue( + self::returnValue( $contentService ) ); @@ -314,7 +315,7 @@ static function (View $view) use ($closure) { // Configuring template engine behaviour $params += ['location' => $location, 'content' => $content, 'view_base_layout' => $this->viewBaseLayout]; $this->templateEngineMock - ->expects($this->never()) + ->expects(self::never()) ->method('render'); $expectedTemplateResult = array_keys($params); diff --git a/tests/lib/Pagination/AdapterFactory/SearchHitAdapterFactoryTest.php b/tests/lib/Pagination/AdapterFactory/SearchHitAdapterFactoryTest.php index cca74ca853..bab86a7ac3 100644 --- a/tests/lib/Pagination/AdapterFactory/SearchHitAdapterFactoryTest.php +++ b/tests/lib/Pagination/AdapterFactory/SearchHitAdapterFactoryTest.php @@ -41,7 +41,7 @@ public function testCreateAdapterForContentQuery(): void { $query = new Query(); - $this->assertEquals( + self::assertEquals( new ContentSearchHitAdapter( $query, $this->searchService, @@ -55,7 +55,7 @@ public function testCreateAdapterForLocationQuery(): void { $query = new LocationQuery(); - $this->assertEquals( + self::assertEquals( new LocationSearchHitAdapter( $query, $this->searchService, @@ -82,12 +82,12 @@ public function testCreateFixedAdapter(Query $query, string $expectedSearchMetho ]); $this->searchService - ->expects($this->once()) + ->expects(self::once()) ->method($expectedSearchMethod) ->with($query, self::EXAMPLE_LANGUAGE_FILTER) ->willReturn($searchResult); - $this->assertEquals( + self::assertEquals( new FixedSearchResultHitAdapter($searchResult), $this->searchHitAdapterFactory->createFixedAdapter($query, self::EXAMPLE_LANGUAGE_FILTER) ); diff --git a/tests/lib/Pagination/ContentFilteringAdapterTest.php b/tests/lib/Pagination/ContentFilteringAdapterTest.php index 94164893bf..8874ec45a3 100644 --- a/tests/lib/Pagination/ContentFilteringAdapterTest.php +++ b/tests/lib/Pagination/ContentFilteringAdapterTest.php @@ -80,7 +80,7 @@ public function testGetSlice(): void self::EXAMPLE_LANGUAGE_FILTER ); - $this->assertEquals( + self::assertEquals( $expectedContentList, $adapter->getSlice(10, 20) ); diff --git a/tests/lib/Pagination/ContentSearchAdapterTest.php b/tests/lib/Pagination/ContentSearchAdapterTest.php index 1edec52e9a..7fcf32cd32 100644 --- a/tests/lib/Pagination/ContentSearchAdapterTest.php +++ b/tests/lib/Pagination/ContentSearchAdapterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Pagination; use Ibexa\Contracts\Core\Repository\SearchService; diff --git a/tests/lib/Pagination/ContentSearchHitAdapterTest.php b/tests/lib/Pagination/ContentSearchHitAdapterTest.php index 08d887faa5..683117142a 100644 --- a/tests/lib/Pagination/ContentSearchHitAdapterTest.php +++ b/tests/lib/Pagination/ContentSearchHitAdapterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Pagination; use Ibexa\Contracts\Core\Repository\SearchService; @@ -66,16 +67,16 @@ public function testGetNbResults() $searchResult = new SearchResult(['totalCount' => $nbResults]); $this->searchService - ->expects($this->once()) + ->expects(self::once()) ->method('findContent') ->with($countQuery, self::EXAMPLE_LANGUAGE_FILTER) ->willReturn($searchResult); $adapter = $this->getAdapter($query, $this->searchService, self::EXAMPLE_LANGUAGE_FILTER); - $this->assertSame($nbResults, $adapter->getNbResults()); + self::assertSame($nbResults, $adapter->getNbResults()); // Running a 2nd time to ensure SearchService::findContent() is called only once. - $this->assertSame($nbResults, $adapter->getNbResults()); + self::assertSame($nbResults, $adapter->getNbResults()); } public function testGetSlice() @@ -110,22 +111,22 @@ public function testGetSlice() $this ->searchService - ->expects($this->once()) + ->expects(self::once()) ->method('findContent') ->with($searchQuery, self::EXAMPLE_LANGUAGE_FILTER) ->willReturn($searchResult); $adapter = $this->getAdapter($query, $this->searchService, self::EXAMPLE_LANGUAGE_FILTER); - $this->assertSame( + self::assertSame( $this->getExpectedFinalResultFromHits($hits), $adapter->getSlice(self::EXAMPLE_OFFSET, self::EXAMPLE_LIMIT) ); - $this->assertSame($nbResults, $adapter->getNbResults()); - $this->assertSame($aggregationsResults, $adapter->getAggregations()); - $this->assertSame(self::EXAMPLE_RESULT_MAX_SCORE, $adapter->getMaxScore()); - $this->assertTrue($adapter->getTimedOut()); - $this->assertSame(self::EXAMPLE_RESULT_TIME, $adapter->getTime()); + self::assertSame($nbResults, $adapter->getNbResults()); + self::assertSame($aggregationsResults, $adapter->getAggregations()); + self::assertSame(self::EXAMPLE_RESULT_MAX_SCORE, $adapter->getMaxScore()); + self::assertTrue($adapter->getTimedOut()); + self::assertSame(self::EXAMPLE_RESULT_TIME, $adapter->getTime()); } public function testGetAggregations(): void @@ -148,16 +149,16 @@ public function testGetAggregations(): void $this ->searchService - ->expects($this->once()) + ->expects(self::once()) ->method('findContent') ->with($aggregationQuery, self::EXAMPLE_LANGUAGE_FILTER) ->willReturn($searchResult); $adapter = $this->getAdapter($query, $this->searchService, self::EXAMPLE_LANGUAGE_FILTER); - $this->assertSame($exceptedAggregationsResults, $adapter->getAggregations()); + self::assertSame($exceptedAggregationsResults, $adapter->getAggregations()); // Running a 2nd time to ensure SearchService::findContent() is called only once. - $this->assertSame($exceptedAggregationsResults, $adapter->getAggregations()); + self::assertSame($exceptedAggregationsResults, $adapter->getAggregations()); } /** diff --git a/tests/lib/Pagination/FixedSearchResultHitAdapterTest.php b/tests/lib/Pagination/FixedSearchResultHitAdapterTest.php index 370b5c046a..24ef97db56 100644 --- a/tests/lib/Pagination/FixedSearchResultHitAdapterTest.php +++ b/tests/lib/Pagination/FixedSearchResultHitAdapterTest.php @@ -21,12 +21,12 @@ public function testFixedSearchResultHitAdapter(): void $adapter = new FixedSearchResultHitAdapter($searchResult); - $this->assertEquals($searchResult->totalCount, $adapter->getNbResults()); - $this->assertEquals($searchResult->searchHits, $adapter->getSlice(0, 10)); - $this->assertSame($searchResult->getAggregations(), $adapter->getAggregations()); - $this->assertEquals($searchResult->maxScore, $adapter->getMaxScore()); - $this->assertEquals($searchResult->time, $adapter->getTime()); - $this->assertEquals($searchResult->timedOut, $adapter->getTimedOut()); + self::assertEquals($searchResult->totalCount, $adapter->getNbResults()); + self::assertEquals($searchResult->searchHits, $adapter->getSlice(0, 10)); + self::assertSame($searchResult->getAggregations(), $adapter->getAggregations()); + self::assertEquals($searchResult->maxScore, $adapter->getMaxScore()); + self::assertEquals($searchResult->time, $adapter->getTime()); + self::assertEquals($searchResult->timedOut, $adapter->getTimedOut()); } private function createExampleSearchResult(): SearchResult diff --git a/tests/lib/Pagination/LocationFilteringAdapterTest.php b/tests/lib/Pagination/LocationFilteringAdapterTest.php index 50acd16af9..36ce5f31a7 100644 --- a/tests/lib/Pagination/LocationFilteringAdapterTest.php +++ b/tests/lib/Pagination/LocationFilteringAdapterTest.php @@ -80,7 +80,7 @@ public function testGetSlice(): void self::EXAMPLE_LANGUAGE_FILTER ); - $this->assertEquals( + self::assertEquals( $expectedContentList, $adapter->getSlice(10, 20) ); diff --git a/tests/lib/Pagination/LocationSearchAdapterTest.php b/tests/lib/Pagination/LocationSearchAdapterTest.php index e9c282c6db..4f62777f46 100644 --- a/tests/lib/Pagination/LocationSearchAdapterTest.php +++ b/tests/lib/Pagination/LocationSearchAdapterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Pagination; use Ibexa\Contracts\Core\Repository\SearchService; diff --git a/tests/lib/Pagination/LocationSearchHitAdapterTest.php b/tests/lib/Pagination/LocationSearchHitAdapterTest.php index 9a6a8381f7..a9889abbe9 100644 --- a/tests/lib/Pagination/LocationSearchHitAdapterTest.php +++ b/tests/lib/Pagination/LocationSearchHitAdapterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Pagination; use Ibexa\Contracts\Core\Repository\SearchService; @@ -69,16 +70,16 @@ public function testGetNbResults() ]); $this->searchService - ->expects($this->once()) + ->expects(self::once()) ->method('findLocations') ->with($countQuery, self::EXAMPLE_LANGUAGE_FILTER) ->willReturn($searchResult); $adapter = $this->getAdapter($query, $this->searchService, self::EXAMPLE_LANGUAGE_FILTER); - $this->assertSame($nbResults, $adapter->getNbResults()); + self::assertSame($nbResults, $adapter->getNbResults()); // Running a 2nd time to ensure SearchService::findContent() is called only once. - $this->assertSame($nbResults, $adapter->getNbResults()); + self::assertSame($nbResults, $adapter->getNbResults()); } public function testGetSlice() @@ -113,23 +114,23 @@ public function testGetSlice() $this ->searchService - ->expects($this->once()) + ->expects(self::once()) ->method('findLocations') ->with($searchQuery, self::EXAMPLE_LANGUAGE_FILTER) ->willReturn($searchResult); $adapter = $this->getAdapter($query, $this->searchService, self::EXAMPLE_LANGUAGE_FILTER); - $this->assertSame( + self::assertSame( $this->getExpectedFinalResultFromHits($hits), $adapter->getSlice(self::EXAMPLE_OFFSET, self::EXAMPLE_LIMIT) ); - $this->assertSame($nbResults, $adapter->getNbResults()); - $this->assertSame($aggregationsResults, $adapter->getAggregations()); - $this->assertSame(self::EXAMPLE_RESULT_MAX_SCORE, $adapter->getMaxScore()); - $this->assertTrue($adapter->getTimedOut()); - $this->assertSame(self::EXAMPLE_RESULT_TIME, $adapter->getTime()); + self::assertSame($nbResults, $adapter->getNbResults()); + self::assertSame($aggregationsResults, $adapter->getAggregations()); + self::assertSame(self::EXAMPLE_RESULT_MAX_SCORE, $adapter->getMaxScore()); + self::assertTrue($adapter->getTimedOut()); + self::assertSame(self::EXAMPLE_RESULT_TIME, $adapter->getTime()); } public function testGetAggregations(): void @@ -152,16 +153,16 @@ public function testGetAggregations(): void $this ->searchService - ->expects($this->once()) + ->expects(self::once()) ->method('findLocations') ->with($aggregationQuery, self::EXAMPLE_LANGUAGE_FILTER) ->willReturn($searchResult); $adapter = $this->getAdapter($query, $this->searchService, self::EXAMPLE_LANGUAGE_FILTER); - $this->assertSame($exceptedAggregationsResults, $adapter->getAggregations()); + self::assertSame($exceptedAggregationsResults, $adapter->getAggregations()); // Running a 2nd time to ensure SearchService::findContent() is called only once. - $this->assertSame($exceptedAggregationsResults, $adapter->getAggregations()); + self::assertSame($exceptedAggregationsResults, $adapter->getAggregations()); } /** diff --git a/tests/lib/Pagination/PagerfantaTest.php b/tests/lib/Pagination/PagerfantaTest.php index f990370b76..8c77e8ad29 100644 --- a/tests/lib/Pagination/PagerfantaTest.php +++ b/tests/lib/Pagination/PagerfantaTest.php @@ -36,7 +36,7 @@ public function testGetAggregations(): void $this->adapter->method('getAggregations')->willReturn($aggregations); - $this->assertEquals( + self::assertEquals( $aggregations, $this->pagerfanta->getAggregations() ); @@ -46,7 +46,7 @@ public function testGetTime(): void { $this->adapter->method('getTime')->willReturn(self::EXAMPLE_TIME_RESULT); - $this->assertEquals( + self::assertEquals( self::EXAMPLE_TIME_RESULT, $this->pagerfanta->getTime() ); @@ -56,7 +56,7 @@ public function testGetTimedOut(): void { $this->adapter->method('getTimedOut')->willReturn(true); - $this->assertTrue( + self::assertTrue( $this->pagerfanta->getTimedOut() ); } @@ -65,7 +65,7 @@ public function testGetMaxScore(): void { $this->adapter->method('getMaxScore')->willReturn(self::EXAMPLE_MAX_SCORE_RESULT); - $this->assertEquals( + self::assertEquals( self::EXAMPLE_MAX_SCORE_RESULT, $this->pagerfanta->getMaxScore() ); diff --git a/tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php b/tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php index 87083bf4ec..96055ac11c 100644 --- a/tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php +++ b/tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php @@ -42,18 +42,18 @@ final public function testUnCachedMethods( ) { $handlerMethodName = $this->getHandlerMethodName(); - $this->loggerMock->expects($this->once())->method('logCall'); - $this->loggerMock->expects($this->never())->method('logCacheHit'); - $this->loggerMock->expects($this->never())->method('logCacheMiss'); + $this->loggerMock->expects(self::once())->method('logCall'); + $this->loggerMock->expects(self::never())->method('logCacheHit'); + $this->loggerMock->expects(self::never())->method('logCacheMiss'); $innerHandler = $this->createMock($this->getHandlerClassName()); $this->persistenceHandlerMock - ->expects($callInnerHandler ? $this->once() : $this->never()) + ->expects($callInnerHandler ? self::once() : self::never()) ->method($handlerMethodName) ->willReturn($innerHandler); $invocationMocker = $innerHandler - ->expects($callInnerHandler ? $this->once() : $this->never()) + ->expects($callInnerHandler ? self::once() : self::never()) ->method($method) ->with(...$arguments); // workaround for mocking void-returning methods, null in this case denotes that, not null value @@ -64,7 +64,7 @@ final public function testUnCachedMethods( if ($tags || $key) { if ($tagGeneratingArguments) { $this->cacheIdentifierGeneratorMock - ->expects($this->exactly(count($tagGeneratingArguments))) + ->expects(self::exactly(count($tagGeneratingArguments))) ->method('generateTag') ->withConsecutive(...$tagGeneratingArguments) ->willReturnOnConsecutiveCalls(...$tags); @@ -75,13 +75,13 @@ final public function testUnCachedMethods( if (is_array($key)) { $this->cacheIdentifierGeneratorMock - ->expects($this->exactly($callsCount)) + ->expects(self::exactly($callsCount)) ->method('generateKey') ->withConsecutive(...$keyGeneratingArguments) ->willReturnOnConsecutiveCalls(...$key); } else { $this->cacheIdentifierGeneratorMock - ->expects($this->exactly($callsCount)) + ->expects(self::exactly($callsCount)) ->method('generateKey') ->with($keyGeneratingArguments[0][0]) ->willReturn($key); @@ -89,24 +89,24 @@ final public function testUnCachedMethods( } $this->cacheMock - ->expects(!empty($tags) ? $this->once() : $this->never()) + ->expects(!empty($tags) ? self::once() : self::never()) ->method('invalidateTags') ->with($tags); $this->cacheMock - ->expects(!empty($key) ? $this->once() : $this->never()) + ->expects(!empty($key) ? self::once() : self::never()) ->method('deleteItems') ->with($key); } else { $this->cacheMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); } $handler = $this->persistenceCacheHandler->$handlerMethodName(); $actualReturnValue = call_user_func_array([$handler, $method], $arguments); - $this->assertEquals($returnValue, $actualReturnValue); + self::assertEquals($returnValue, $actualReturnValue); } abstract public function providerForCachedLoadMethodsHit(): array; @@ -140,13 +140,13 @@ final public function testLoadMethodsCacheHit( $cacheItem = $this->getCacheItem($key, $multi ? reset($data) : $data); $handlerMethodName = $this->getHandlerMethodName(); - $this->loggerMock->expects($this->once())->method('logCacheHit'); - $this->loggerMock->expects($this->never())->method('logCall'); - $this->loggerMock->expects($this->never())->method('logCacheMiss'); + $this->loggerMock->expects(self::once())->method('logCacheHit'); + $this->loggerMock->expects(self::never())->method('logCall'); + $this->loggerMock->expects(self::never())->method('logCacheMiss'); if ($tagGeneratingArguments) { $this->cacheIdentifierGeneratorMock - ->expects($this->exactly(count($tagGeneratingArguments))) + ->expects(self::exactly(count($tagGeneratingArguments))) ->method('generateTag') ->withConsecutive(...$tagGeneratingArguments) ->willReturnOnConsecutiveCalls(...$tagGeneratingResults); @@ -154,7 +154,7 @@ final public function testLoadMethodsCacheHit( if ($keyGeneratingArguments) { $this->cacheIdentifierGeneratorMock - ->expects($this->exactly(count($keyGeneratingArguments))) + ->expects(self::exactly(count($keyGeneratingArguments))) ->method('generateKey') ->withConsecutive(...$keyGeneratingArguments) ->willReturnOnConsecutiveCalls(...$keyGeneratingResults); @@ -162,32 +162,32 @@ final public function testLoadMethodsCacheHit( if ($multi) { $this->cacheMock - ->expects($this->once()) + ->expects(self::once()) ->method('getItems') ->with([$cacheItem->getKey()]) ->willReturn([$key => $cacheItem]); } else { $this->cacheMock - ->expects($this->once()) + ->expects(self::once()) ->method('getItem') ->with($cacheItem->getKey()) ->willReturn($cacheItem); } $this->persistenceHandlerMock - ->expects($this->never()) + ->expects(self::never()) ->method($handlerMethodName); foreach ($additionalCalls as $additionalCall) { $this->persistenceHandlerMock - ->expects($this->never()) + ->expects(self::never()) ->method($additionalCall[0]); } $handler = $this->persistenceCacheHandler->$handlerMethodName(); $return = call_user_func_array([$handler, $method], $arguments); - $this->assertEquals($data, $return); + self::assertEquals($data, $return); } abstract public function providerForCachedLoadMethodsMiss(): array; @@ -221,13 +221,13 @@ final public function testLoadMethodsCacheMiss( $cacheItem = $this->getCacheItem($key, null); $handlerMethodName = $this->getHandlerMethodName(); - $this->loggerMock->expects($this->once())->method('logCacheMiss'); - $this->loggerMock->expects($this->never())->method('logCall'); - $this->loggerMock->expects($this->never())->method('logCacheHit'); + $this->loggerMock->expects(self::once())->method('logCacheMiss'); + $this->loggerMock->expects(self::never())->method('logCall'); + $this->loggerMock->expects(self::never())->method('logCacheHit'); if ($tagGeneratingArguments) { $this->cacheIdentifierGeneratorMock - ->expects($this->exactly(count($tagGeneratingArguments))) + ->expects(self::exactly(count($tagGeneratingArguments))) ->method('generateTag') ->withConsecutive(...$tagGeneratingArguments) ->willReturnOnConsecutiveCalls(...$tagGeneratingResults); @@ -235,7 +235,7 @@ final public function testLoadMethodsCacheMiss( if ($keyGeneratingArguments) { $this->cacheIdentifierGeneratorMock - ->expects($this->exactly(count($keyGeneratingArguments))) + ->expects(self::exactly(count($keyGeneratingArguments))) ->method('generateKey') ->withConsecutive(...$keyGeneratingArguments) ->willReturnOnConsecutiveCalls(...$keyGeneratingResults); @@ -243,13 +243,13 @@ final public function testLoadMethodsCacheMiss( if ($multi) { $this->cacheMock - ->expects($this->once()) + ->expects(self::once()) ->method('getItems') ->with([$cacheItem->getKey()]) ->willReturn([$key => $cacheItem]); } else { $this->cacheMock - ->expects($this->once()) + ->expects(self::once()) ->method('getItem') ->with($cacheItem->getKey()) ->willReturn($cacheItem); @@ -257,12 +257,12 @@ final public function testLoadMethodsCacheMiss( $innerHandlerMock = $this->createMock($this->getHandlerClassName()); $this->persistenceHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method($handlerMethodName) ->willReturn($innerHandlerMock); $innerHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method($method) ->with(...$arguments) ->willReturn($data); @@ -270,25 +270,25 @@ final public function testLoadMethodsCacheMiss( foreach ($additionalCalls as $additionalCall) { $innerHandlerMock = $this->createMock($additionalCall[1]); $this->persistenceHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method($additionalCall[0]) ->willReturn($innerHandlerMock); $innerHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method($additionalCall[2]) ->willReturn($additionalCall[3]); } $this->cacheMock - ->expects($this->once()) + ->expects(self::once()) ->method('save') ->with($cacheItem); $handler = $this->persistenceCacheHandler->$handlerMethodName(); $return = call_user_func_array([$handler, $method], $arguments); - $this->assertEquals($data, $return); + self::assertEquals($data, $return); // Assert use of tags would probably need custom logic as internal property is [$tag => $tag] value, and we don't want to know that. //$this->assertAttributeEquals([], 'tags', $cacheItem); diff --git a/tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php b/tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php index 9fe7ef6d52..d763cd9e84 100644 --- a/tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php +++ b/tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php @@ -79,15 +79,15 @@ public function testGetItem() $item = $this->createCacheItem('first'); $this->innerPool - ->expects($this->once()) + ->expects(self::once()) ->method('getItem') ->with('first') ->willReturn($item); - $this->inMemory->expects($this->never())->method($this->anything()); + $this->inMemory->expects(self::never())->method(self::anything()); $returnedItem = $this->cache->getItem('first'); - $this->assertSame($item, $returnedItem); + self::assertSame($item, $returnedItem); } public function testGetItems() @@ -98,15 +98,15 @@ public function testGetItems() ]; $this->innerPool - ->expects($this->once()) + ->expects(self::once()) ->method('getItems') ->with(['first', 'second']) ->willReturn($items); - $this->inMemory->expects($this->never())->method($this->anything()); + $this->inMemory->expects(self::never())->method(self::anything()); $returnedItems = $this->cache->getItems(['first', 'second']); - $this->assertSame($items, $returnedItems); + self::assertSame($items, $returnedItems); } /** @@ -120,28 +120,28 @@ public function testGetItemsWithGenerator() ]; $this->innerPool - ->expects($this->once()) + ->expects(self::once()) ->method('getItems') ->with(['first', 'second']) ->willReturn($this->arrayAsGenerator($items)); - $this->inMemory->expects($this->never())->method($this->anything()); + $this->inMemory->expects(self::never())->method(self::anything()); $returnedItems = iterator_to_array($this->cache->getItems(['first', 'second'])); - $this->assertSame($items, $returnedItems); + self::assertSame($items, $returnedItems); } public function testHasItem() { $this->innerPool - ->expects($this->once()) + ->expects(self::once()) ->method('hasItem') ->with('first') ->willReturn(true); - $this->inMemory->expects($this->never())->method($this->anything()); + $this->inMemory->expects(self::never())->method(self::anything()); - $this->assertTrue($this->cache->hasItem('first')); + self::assertTrue($this->cache->hasItem('first')); } /** @@ -150,18 +150,18 @@ public function testHasItem() public function testDelete(string $method, $argument) { $this->innerPool - ->expects($this->once()) + ->expects(self::once()) ->method($method) ->with($argument) ->willReturn(true); $this->inMemory - ->expects($this->once()) + ->expects(self::once()) ->method('deleteMulti') ->with(is_array($argument) ? $argument : [$argument]); // invalidate it - $this->assertTrue($this->cache->$method($argument)); + self::assertTrue($this->cache->$method($argument)); } public function providerForDelete(): array @@ -182,23 +182,23 @@ public function testClearAndInvalidation(string $method, $argument) { if ($argument) { $this->innerPool - ->expects($this->once()) + ->expects(self::once()) ->method($method) ->with($argument) ->willReturn(true); } else { $this->innerPool - ->expects($this->once()) + ->expects(self::once()) ->method($method) ->willReturn(true); } $this->inMemory - ->expects($this->once()) + ->expects(self::once()) ->method('clear'); // invalidate it - $this->assertTrue($this->cache->$method($argument)); + self::assertTrue($this->cache->$method($argument)); } public function providerForClearAndInvalidation(): array diff --git a/tests/lib/Persistence/Cache/ContentHandlerTest.php b/tests/lib/Persistence/Cache/ContentHandlerTest.php index c7c43308fa..9a354a8a9c 100644 --- a/tests/lib/Persistence/Cache/ContentHandlerTest.php +++ b/tests/lib/Persistence/Cache/ContentHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Content; @@ -424,16 +425,16 @@ public function providerForCachedLoadMethodsMiss(): array public function testDeleteContent() { - $this->loggerMock->expects($this->once())->method('logCall'); + $this->loggerMock->expects(self::once())->method('logCall'); $innerHandlerMock = $this->createMock(SPIContentHandler::class); $this->persistenceHandlerMock - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('contentHandler') ->willReturn($innerHandlerMock); $innerHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadReverseRelations') ->with(2, APIRelation::FIELD | APIRelation::ASSET) ->willReturn( @@ -443,17 +444,17 @@ public function testDeleteContent() ); $innerHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('deleteContent') ->with(2) ->willReturn(true); $this->cacheMock - ->expects($this->never()) + ->expects(self::never()) ->method('deleteItem'); $this->cacheIdentifierGeneratorMock - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('generateTag') ->withConsecutive( ['content', [42], false], @@ -462,7 +463,7 @@ public function testDeleteContent() ->willReturnOnConsecutiveCalls('c-42', 'c-2'); $this->cacheMock - ->expects($this->once()) + ->expects(self::once()) ->method('invalidateTags') ->with(['c-42', 'c-2']); diff --git a/tests/lib/Persistence/Cache/ContentLanguageHandlerTest.php b/tests/lib/Persistence/Cache/ContentLanguageHandlerTest.php index c618f6d6ed..cc1c124562 100644 --- a/tests/lib/Persistence/Cache/ContentLanguageHandlerTest.php +++ b/tests/lib/Persistence/Cache/ContentLanguageHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Content\Language as SPILanguage; diff --git a/tests/lib/Persistence/Cache/ContentTypeHandlerTest.php b/tests/lib/Persistence/Cache/ContentTypeHandlerTest.php index 6b113e3fb8..139da18a06 100644 --- a/tests/lib/Persistence/Cache/ContentTypeHandlerTest.php +++ b/tests/lib/Persistence/Cache/ContentTypeHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Content\Type as SPIType; @@ -411,22 +412,22 @@ public function testPublish() $handlerMethodName = $this->getHandlerMethodName(); - $this->loggerMock->expects($this->once())->method('logCall'); + $this->loggerMock->expects(self::once())->method('logCall'); $innerHandler = $this->createMock($this->getHandlerClassName()); $this->persistenceHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method($handlerMethodName) ->willReturn($innerHandler); $innerHandler - ->expects($this->once()) + ->expects(self::once()) ->method($method) ->with(...$arguments) ->willReturn(null); $this->cacheIdentifierGeneratorMock - ->expects($this->exactly(3)) + ->expects(self::exactly(3)) ->method('generateTag') ->withConsecutive( ['type', [5], false], @@ -440,7 +441,7 @@ public function testPublish() ); $this->cacheIdentifierGeneratorMock - ->expects($this->exactly(3)) + ->expects(self::exactly(3)) ->method('generateKey') ->withConsecutive( ['content_type', [], true], @@ -454,18 +455,18 @@ public function testPublish() ); $this->cacheMock - ->expects(!empty($tags) ? $this->once() : $this->never()) + ->expects(!empty($tags) ? self::once() : self::never()) ->method('invalidateTags') ->with($tags); $this->cacheMock - ->expects($this->once()) + ->expects(self::once()) ->method('getItem') ->with($cacheItem->getKey()) ->willReturn($cacheItem); $this->cacheMock - ->expects($this->once()) + ->expects(self::once()) ->method('deleteItems') ->with(['ibx-ctlbg-3', 'ibx-ctlbg-4']) ->willReturn(true); diff --git a/tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php b/tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php index 895a7c9cc8..dcc7eb690d 100644 --- a/tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php +++ b/tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php @@ -76,7 +76,7 @@ public function providerForTestGenerateKeyThrowsInvalidArgumentException(): arra */ public function testGenerateTag(array $arguments, string $resultKey): void { - $this->assertEquals( + self::assertEquals( $resultKey, $this->cacheIdentifierGenerator->generateTag(...$arguments) ); @@ -89,7 +89,7 @@ public function testGenerateTagThrowsInvalidArgumentException(array $arguments, { $this->expectException(InvalidArgumentException::class); - $this->assertEquals( + self::assertEquals( $resultKey, $this->cacheIdentifierGenerator->generateTag(...$arguments) ); @@ -100,7 +100,7 @@ public function testGenerateTagThrowsInvalidArgumentException(array $arguments, */ public function testGenerateKey(array $arguments, string $resultKey): void { - $this->assertEquals( + self::assertEquals( $resultKey, $this->cacheIdentifierGenerator->generateKey(...$arguments) ); @@ -113,7 +113,7 @@ public function testGenerateKeyThrowsInvalidArgumentException(array $arguments, { $this->expectException(InvalidArgumentException::class); - $this->assertEquals( + self::assertEquals( $resultKey, $this->cacheIdentifierGenerator->generateKey(...$arguments) ); diff --git a/tests/lib/Persistence/Cache/InMemory/InMemoryCacheTest.php b/tests/lib/Persistence/Cache/InMemory/InMemoryCacheTest.php index 2f9d26e936..60a88d0481 100644 --- a/tests/lib/Persistence/Cache/InMemory/InMemoryCacheTest.php +++ b/tests/lib/Persistence/Cache/InMemory/InMemoryCacheTest.php @@ -46,50 +46,50 @@ protected function tearDown(): void public function testGetByKey(): void { - $this->assertNull($this->cache->get('first')); + self::assertNull($this->cache->get('first')); $obj = new \stdClass(); $this->cache->setMulti([$obj], static function ($o) { return ['first']; }); - $this->assertSame($obj, $this->cache->get('first')); + self::assertSame($obj, $this->cache->get('first')); // Test TTL $GLOBALS['override_time'] = \microtime(true) + 4; - $this->assertNull($this->cache->get('first')); + self::assertNull($this->cache->get('first')); } public function testGetBySecondaryIndex(): void { - $this->assertNull($this->cache->get('first')); - $this->assertNull($this->cache->get('secondary')); + self::assertNull($this->cache->get('first')); + self::assertNull($this->cache->get('secondary')); $obj = new \stdClass(); $this->cache->setMulti([$obj], static function ($o) { return ['first', 'secondary']; }); - $this->assertSame($obj, $this->cache->get('first')); - $this->assertSame($obj, $this->cache->get('secondary')); + self::assertSame($obj, $this->cache->get('first')); + self::assertSame($obj, $this->cache->get('secondary')); // Test TTL $GLOBALS['override_time'] = \microtime(true) + 4; - $this->assertNull($this->cache->get('first')); - $this->assertNull($this->cache->get('secondary')); + self::assertNull($this->cache->get('first')); + self::assertNull($this->cache->get('secondary')); } public function testGetByList(): void { - $this->assertNull($this->cache->get('first')); - $this->assertNull($this->cache->get('list')); + self::assertNull($this->cache->get('first')); + self::assertNull($this->cache->get('list')); $obj = new \stdClass(); $this->cache->setMulti([$obj], static function ($o) { return ['first']; }, 'list'); - $this->assertSame($obj, $this->cache->get('first')); - $this->assertSame([$obj], $this->cache->get('list')); + self::assertSame($obj, $this->cache->get('first')); + self::assertSame([$obj], $this->cache->get('list')); // Test TTL $GLOBALS['override_time'] = \microtime(true) + 4; - $this->assertNull($this->cache->get('first')); - $this->assertNull($this->cache->get('list')); + self::assertNull($this->cache->get('first')); + self::assertNull($this->cache->get('list')); } public function testDeleted(): void @@ -97,21 +97,21 @@ public function testDeleted(): void $obj = new \stdClass(); $this->cache->setMulti([$obj], static function ($o) { return ['first', 'second']; }, 'list'); - $this->assertSame($obj, $this->cache->get('first')); - $this->assertSame($obj, $this->cache->get('second')); - $this->assertSame([$obj], $this->cache->get('list')); + self::assertSame($obj, $this->cache->get('first')); + self::assertSame($obj, $this->cache->get('second')); + self::assertSame([$obj], $this->cache->get('list')); // Delete primary, her we expect secondary index to also start returning null $this->cache->deleteMulti(['first']); - $this->assertNull($this->cache->get('first')); - $this->assertNull($this->cache->get('second')); - $this->assertSame([$obj], $this->cache->get('list')); + self::assertNull($this->cache->get('first')); + self::assertNull($this->cache->get('second')); + self::assertSame([$obj], $this->cache->get('list')); // Delete list $this->cache->deleteMulti(['list']); - $this->assertNull($this->cache->get('list')); + self::assertNull($this->cache->get('list')); } public function testClear(): void @@ -119,16 +119,16 @@ public function testClear(): void $obj = new \stdClass(); $this->cache->setMulti([$obj], static function ($o) { return ['first', 'second']; }, 'list'); - $this->assertSame($obj, $this->cache->get('first')); - $this->assertSame($obj, $this->cache->get('second')); - $this->assertSame([$obj], $this->cache->get('list')); + self::assertSame($obj, $this->cache->get('first')); + self::assertSame($obj, $this->cache->get('second')); + self::assertSame([$obj], $this->cache->get('list')); // Clear all cache $this->cache->clear(); - $this->assertNull($this->cache->get('first')); - $this->assertNull($this->cache->get('second')); - $this->assertNull($this->cache->get('list')); + self::assertNull($this->cache->get('first')); + self::assertNull($this->cache->get('second')); + self::assertNull($this->cache->get('list')); } public function testSetWhenReachingSetLimit(): void @@ -136,9 +136,9 @@ public function testSetWhenReachingSetLimit(): void $obj = new \stdClass(); $this->cache->setMulti([$obj, $obj], static function ($o) { return ['first', 'second']; }, 'list'); - $this->assertNull($this->cache->get('first')); - $this->assertNull($this->cache->get('second')); - $this->assertNull($this->cache->get('list')); + self::assertNull($this->cache->get('first')); + self::assertNull($this->cache->get('second')); + self::assertNull($this->cache->get('list')); } public function testSetWhenReachingTotalLimit(): void @@ -153,14 +153,14 @@ public function testSetWhenReachingTotalLimit(): void $this->cache->setMulti([$obj], static function ($o) { return ['seventh']; }); $this->cache->setMulti([$obj], static function ($o) { return ['eight']; }); - $this->assertNull($this->cache->get('first')); - $this->assertNull($this->cache->get('second')); - $this->assertSame($obj, $this->cache->get('third')); - $this->assertSame($obj, $this->cache->get('fourth')); - $this->assertSame($obj, $this->cache->get('fifth')); - $this->assertSame($obj, $this->cache->get('sixth')); - $this->assertSame($obj, $this->cache->get('seventh')); - $this->assertSame($obj, $this->cache->get('eight')); + self::assertNull($this->cache->get('first')); + self::assertNull($this->cache->get('second')); + self::assertSame($obj, $this->cache->get('third')); + self::assertSame($obj, $this->cache->get('fourth')); + self::assertSame($obj, $this->cache->get('fifth')); + self::assertSame($obj, $this->cache->get('sixth')); + self::assertSame($obj, $this->cache->get('seventh')); + self::assertSame($obj, $this->cache->get('eight')); } /** @@ -183,14 +183,14 @@ public function testAccessCountsWhenReachingTotalLimit(): void $this->cache->setMulti([$obj], static function ($o) { return ['seventh']; }); $this->cache->setMulti([$obj], static function ($o) { return ['eight']; }); - $this->assertSame($obj, $this->cache->get('first')); - $this->assertNull($this->cache->get('second')); - $this->assertSame($obj, $this->cache->get('third')); - $this->assertNull($this->cache->get('fourth')); - $this->assertSame($obj, $this->cache->get('fifth')); - $this->assertSame($obj, $this->cache->get('sixth')); - $this->assertSame($obj, $this->cache->get('seventh')); - $this->assertSame($obj, $this->cache->get('eight')); + self::assertSame($obj, $this->cache->get('first')); + self::assertNull($this->cache->get('second')); + self::assertSame($obj, $this->cache->get('third')); + self::assertNull($this->cache->get('fourth')); + self::assertSame($obj, $this->cache->get('fifth')); + self::assertSame($obj, $this->cache->get('sixth')); + self::assertSame($obj, $this->cache->get('seventh')); + self::assertSame($obj, $this->cache->get('eight')); } } class_alias(InMemoryCacheTest::class, 'eZ\Publish\Core\Persistence\Cache\InMemory\InMemoryCacheTest'); diff --git a/tests/lib/Persistence/Cache/LocationHandlerTest.php b/tests/lib/Persistence/Cache/LocationHandlerTest.php index ed498aa495..d9d4e0a0e8 100644 --- a/tests/lib/Persistence/Cache/LocationHandlerTest.php +++ b/tests/lib/Persistence/Cache/LocationHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Content\Location; diff --git a/tests/lib/Persistence/Cache/ObjectStateHandlerTest.php b/tests/lib/Persistence/Cache/ObjectStateHandlerTest.php index dbbf5034b5..145e873c82 100644 --- a/tests/lib/Persistence/Cache/ObjectStateHandlerTest.php +++ b/tests/lib/Persistence/Cache/ObjectStateHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Content\ObjectState as SPIObjectState; diff --git a/tests/lib/Persistence/Cache/PersistenceHandlerTest.php b/tests/lib/Persistence/Cache/PersistenceHandlerTest.php index 8b379dd5bd..1a32f68695 100644 --- a/tests/lib/Persistence/Cache/PersistenceHandlerTest.php +++ b/tests/lib/Persistence/Cache/PersistenceHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence as SPIPersistence; @@ -18,96 +19,96 @@ class PersistenceHandlerTest extends AbstractBaseHandlerTest { public function testHandler() { - $this->assertInstanceOf(SPIPersistence\Handler::class, $this->persistenceCacheHandler); - $this->assertInstanceOf(Cache\Handler::class, $this->persistenceCacheHandler); + self::assertInstanceOf(SPIPersistence\Handler::class, $this->persistenceCacheHandler); + self::assertInstanceOf(Cache\Handler::class, $this->persistenceCacheHandler); } public function testContentHandler() { - $this->loggerMock->expects($this->never())->method($this->anything()); + $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->contentHandler(); - $this->assertInstanceOf(SPIPersistence\Content\Handler::class, $handler); - $this->assertInstanceOf(Cache\ContentHandler::class, $handler); + self::assertInstanceOf(SPIPersistence\Content\Handler::class, $handler); + self::assertInstanceOf(Cache\ContentHandler::class, $handler); } public function testLanguageHandler() { - $this->loggerMock->expects($this->never())->method($this->anything()); + $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->contentLanguageHandler(); - $this->assertInstanceOf(SPIPersistence\Content\Language\Handler::class, $handler); - $this->assertInstanceOf(Cache\ContentLanguageHandler::class, $handler); + self::assertInstanceOf(SPIPersistence\Content\Language\Handler::class, $handler); + self::assertInstanceOf(Cache\ContentLanguageHandler::class, $handler); } public function testContentTypeHandler() { - $this->loggerMock->expects($this->never())->method($this->anything()); + $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->contentTypeHandler(); - $this->assertInstanceOf(SPIPersistence\Content\Type\Handler::class, $handler); - $this->assertInstanceOf(Cache\ContentTypeHandler::class, $handler); + self::assertInstanceOf(SPIPersistence\Content\Type\Handler::class, $handler); + self::assertInstanceOf(Cache\ContentTypeHandler::class, $handler); } public function testContentLocationHandler() { - $this->loggerMock->expects($this->never())->method($this->anything()); + $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->locationHandler(); - $this->assertInstanceOf(SPIPersistence\Content\Location\Handler::class, $handler); - $this->assertInstanceOf(Cache\LocationHandler::class, $handler); + self::assertInstanceOf(SPIPersistence\Content\Location\Handler::class, $handler); + self::assertInstanceOf(Cache\LocationHandler::class, $handler); } public function testTrashHandler() { - $this->loggerMock->expects($this->never())->method($this->anything()); + $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->trashHandler(); - $this->assertInstanceOf(SPIPersistence\Content\Location\Trash\Handler::class, $handler); - $this->assertInstanceOf(Cache\TrashHandler::class, $handler); + self::assertInstanceOf(SPIPersistence\Content\Location\Trash\Handler::class, $handler); + self::assertInstanceOf(Cache\TrashHandler::class, $handler); } public function testObjectStateHandler() { - $this->loggerMock->expects($this->never())->method($this->anything()); + $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->objectStateHandler(); - $this->assertInstanceOf(SPIPersistence\Content\ObjectState\Handler::class, $handler); - $this->assertInstanceOf(Cache\ObjectStateHandler::class, $handler); + self::assertInstanceOf(SPIPersistence\Content\ObjectState\Handler::class, $handler); + self::assertInstanceOf(Cache\ObjectStateHandler::class, $handler); } public function testSectionHandler() { - $this->loggerMock->expects($this->never())->method($this->anything()); + $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->sectionHandler(); - $this->assertInstanceOf(SPIPersistence\Content\Section\Handler::class, $handler); - $this->assertInstanceOf(Cache\SectionHandler::class, $handler); + self::assertInstanceOf(SPIPersistence\Content\Section\Handler::class, $handler); + self::assertInstanceOf(Cache\SectionHandler::class, $handler); } public function testUserHandler() { - $this->loggerMock->expects($this->never())->method($this->anything()); + $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->userHandler(); - $this->assertInstanceOf(SPIPersistence\User\Handler::class, $handler); - $this->assertInstanceOf(Cache\UserHandler::class, $handler); + self::assertInstanceOf(SPIPersistence\User\Handler::class, $handler); + self::assertInstanceOf(Cache\UserHandler::class, $handler); } public function testUrlAliasHandler() { - $this->loggerMock->expects($this->never())->method($this->anything()); + $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->urlAliasHandler(); - $this->assertInstanceOf(SPIPersistence\Content\UrlAlias\Handler::class, $handler); - $this->assertInstanceOf(Cache\UrlAliasHandler::class, $handler); + self::assertInstanceOf(SPIPersistence\Content\UrlAlias\Handler::class, $handler); + self::assertInstanceOf(Cache\UrlAliasHandler::class, $handler); } public function testUrlWildcardHandler() { - $this->loggerMock->expects($this->never())->method($this->anything()); + $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->urlWildcardHandler(); - $this->assertInstanceOf(SPIPersistence\Content\UrlWildcard\Handler::class, $handler); - $this->assertInstanceOf(Cache\UrlWildcardHandler::class, $handler); + self::assertInstanceOf(SPIPersistence\Content\UrlWildcard\Handler::class, $handler); + self::assertInstanceOf(Cache\UrlWildcardHandler::class, $handler); } public function testTransactionHandler() { - $this->loggerMock->expects($this->never())->method($this->anything()); + $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->transactionHandler(); - $this->assertInstanceOf(SPIPersistence\TransactionHandler::class, $handler); - $this->assertInstanceOf(Cache\TransactionHandler::class, $handler); + self::assertInstanceOf(SPIPersistence\TransactionHandler::class, $handler); + self::assertInstanceOf(Cache\TransactionHandler::class, $handler); } } diff --git a/tests/lib/Persistence/Cache/PersistenceLoggerTest.php b/tests/lib/Persistence/Cache/PersistenceLoggerTest.php index 23eda2909d..b1e5a77371 100644 --- a/tests/lib/Persistence/Cache/PersistenceLoggerTest.php +++ b/tests/lib/Persistence/Cache/PersistenceLoggerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Cache; use Ibexa\Core\Persistence\Cache\PersistenceLogger; @@ -37,22 +38,22 @@ protected function tearDown(): void public function testGetName() { - $this->assertEquals(PersistenceLogger::NAME, $this->logger->getName()); + self::assertEquals(PersistenceLogger::NAME, $this->logger->getName()); } public function testGetCount() { - $this->assertEquals(0, $this->logger->getCount()); + self::assertEquals(0, $this->logger->getCount()); } public function testGetCalls() { - $this->assertEquals([], $this->logger->getCalls()); + self::assertEquals([], $this->logger->getCalls()); } public function testLogCall() { - $this->assertNull($this->logger->logCall(__METHOD__)); + self::assertNull($this->logger->logCall(__METHOD__)); $this->logger->logCall(__METHOD__); $this->logger->logCall(__METHOD__); $this->logger->logCall(__METHOD__, [33]); @@ -67,7 +68,7 @@ public function testLogCall() */ public function testGetCountValues($logger) { - $this->assertEquals(4, $logger->getCount()); + self::assertEquals(4, $logger->getCount()); return $logger; } @@ -85,15 +86,15 @@ public function testGetCallValues($logger) $method = __CLASS__ . '::testLogCall'; - $this->assertEquals($method, $calls[0]['method']); - $this->assertEquals([], $calls[0]['arguments']); - $this->assertCount(1, $calls[0]['traces']); - $this->assertEquals(['uncached' => 3, 'miss' => 0, 'hit' => 0, 'memory' => 0], $calls[0]['stats']); + self::assertEquals($method, $calls[0]['method']); + self::assertEquals([], $calls[0]['arguments']); + self::assertCount(1, $calls[0]['traces']); + self::assertEquals(['uncached' => 3, 'miss' => 0, 'hit' => 0, 'memory' => 0], $calls[0]['stats']); - $this->assertEquals($method, $calls[1]['method']); - $this->assertEquals([33], $calls[1]['arguments']); - $this->assertCount(1, $calls[1]['traces']); - $this->assertEquals(['uncached' => 1, 'miss' => 0, 'hit' => 0, 'memory' => 0], $calls[1]['stats']); + self::assertEquals($method, $calls[1]['method']); + self::assertEquals([33], $calls[1]['arguments']); + self::assertCount(1, $calls[1]['traces']); + self::assertEquals(['uncached' => 1, 'miss' => 0, 'hit' => 0, 'memory' => 0], $calls[1]['stats']); } } diff --git a/tests/lib/Persistence/Cache/SectionHandlerTest.php b/tests/lib/Persistence/Cache/SectionHandlerTest.php index 012af0783e..502f9365ff 100644 --- a/tests/lib/Persistence/Cache/SectionHandlerTest.php +++ b/tests/lib/Persistence/Cache/SectionHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Content\Section as SPISection; diff --git a/tests/lib/Persistence/Cache/SettingHandlerTest.php b/tests/lib/Persistence/Cache/SettingHandlerTest.php index 96b05914b2..057093566c 100644 --- a/tests/lib/Persistence/Cache/SettingHandlerTest.php +++ b/tests/lib/Persistence/Cache/SettingHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Setting\Handler as SettingHandler; diff --git a/tests/lib/Persistence/Cache/TransactionHandlerTest.php b/tests/lib/Persistence/Cache/TransactionHandlerTest.php index 65eb580861..3c0b18e842 100644 --- a/tests/lib/Persistence/Cache/TransactionHandlerTest.php +++ b/tests/lib/Persistence/Cache/TransactionHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\TransactionHandler; @@ -49,25 +50,25 @@ public function providerForCachedLoadMethodsMiss(): array public function testRollback() { $this->loggerMock - ->expects($this->once()) + ->expects(self::once()) ->method('logCall'); $this->cacheMock - ->expects($this->never()) + ->expects(self::never()) ->method('clear'); $this->cacheMock - ->expects($this->once()) + ->expects(self::once()) ->method('rollbackTransaction'); $innerHandlerMock = $this->createMock(TransactionHandler::class); $this->persistenceHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('transactionHandler') ->willReturn($innerHandlerMock); $innerHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('rollback'); $handler = $this->persistenceCacheHandler->transactionHandler(); @@ -77,21 +78,21 @@ public function testRollback() public function testCommitStopsCacheTransaction() { $this->loggerMock - ->expects($this->once()) + ->expects(self::once()) ->method('logCall'); $this->cacheMock - ->expects($this->once()) + ->expects(self::once()) ->method('commitTransaction'); $innerHandlerMock = $this->createMock(TransactionHandler::class); $this->persistenceHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('transactionHandler') ->willReturn($innerHandlerMock); $innerHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('commit'); $handler = $this->persistenceCacheHandler->transactionHandler(); @@ -101,21 +102,21 @@ public function testCommitStopsCacheTransaction() public function testBeginTransactionStartsCacheTransaction() { $this->loggerMock - ->expects($this->once()) + ->expects(self::once()) ->method('logCall'); $this->cacheMock - ->expects($this->once()) + ->expects(self::once()) ->method('beginTransaction'); $innerHandlerMock = $this->createMock(TransactionHandler::class); $this->persistenceHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('transactionHandler') ->willReturn($innerHandlerMock); $innerHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('beginTransaction'); $handler = $this->persistenceCacheHandler->transactionHandler(); diff --git a/tests/lib/Persistence/Cache/TrashHandlerTest.php b/tests/lib/Persistence/Cache/TrashHandlerTest.php index dcfc8712bd..22b5aa5be9 100644 --- a/tests/lib/Persistence/Cache/TrashHandlerTest.php +++ b/tests/lib/Persistence/Cache/TrashHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Content\Location; @@ -64,7 +65,7 @@ public function testRecover() $handlerMethodName = $this->getHandlerMethodName(); - $this->loggerMock->expects($this->once())->method('logCall'); + $this->loggerMock->expects(self::once())->method('logCall'); $innerHandler = $this->createMock($this->getHandlerClassName()); $contentHandlerMock = $this->createMock(ContentHandler::class); @@ -83,18 +84,18 @@ public function testRecover() ->willReturn($locationHandlerMock); $this->persistenceHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method($handlerMethodName) ->willReturn($innerHandler); $innerHandler - ->expects($this->once()) + ->expects(self::once()) ->method('recover') ->with($originalLocationId, $targetLocationId) ->willReturn(null); $this->cacheIdentifierGeneratorMock - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('generateTag') ->withConsecutive( ['content', [$contentId], false], @@ -106,7 +107,7 @@ public function testRecover() ); $this->cacheMock - ->expects($this->once()) + ->expects(self::once()) ->method('invalidateTags') ->with($tags); @@ -126,7 +127,7 @@ public function testTrashSubtree() $handlerMethodName = $this->getHandlerMethodName(); - $this->loggerMock->expects($this->once())->method('logCall'); + $this->loggerMock->expects(self::once())->method('logCall'); $innerHandler = $this->createMock($this->getHandlerClassName()); $contentHandlerMock = $this->createMock(ContentHandler::class); @@ -145,18 +146,18 @@ public function testTrashSubtree() ->willReturn($locationHandlerMock); $this->persistenceHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method($handlerMethodName) ->willReturn($innerHandler); $innerHandler - ->expects($this->once()) + ->expects(self::once()) ->method('trashSubtree') ->with($locationId) ->willReturn(null); $this->cacheIdentifierGeneratorMock - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('generateTag') ->withConsecutive( ['content', [$contentId], false], @@ -165,7 +166,7 @@ public function testTrashSubtree() ->willReturnOnConsecutiveCalls(...$tags); $this->cacheMock - ->expects($this->once()) + ->expects(self::once()) ->method('invalidateTags') ->with($tags); @@ -185,13 +186,13 @@ public function testDeleteTrashItem() $trashed = new Trashed(['id' => $trashedId, 'contentId' => $contentId]); $innerHandler - ->expects($this->once()) + ->expects(self::once()) ->method('deleteTrashItem') ->with($trashedId) ->willReturn(new TrashItemDeleteResult(['trashItemId' => $trashedId, 'contentId' => $contentId])); $innerHandler - ->expects($this->once()) + ->expects(self::once()) ->method('loadTrashItem') ->with($trashedId) ->willReturn($trashed); @@ -203,7 +204,7 @@ public function testDeleteTrashItem() $contentHandlerMock = $this->createMock(ContentHandler::class); $contentHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadReverseRelations') ->with($contentId) ->willReturn([new Relation(['sourceContentId' => $relationSourceContentId])]); @@ -219,7 +220,7 @@ public function testDeleteTrashItem() ]; $this->cacheIdentifierGeneratorMock - ->expects($this->exactly(3)) + ->expects(self::exactly(3)) ->method('generateTag') ->withConsecutive( ['content', [$relationSourceContentId], false], @@ -233,7 +234,7 @@ public function testDeleteTrashItem() ); $this->cacheMock - ->expects($this->once()) + ->expects(self::once()) ->method('invalidateTags') ->with($tags); @@ -253,7 +254,7 @@ public function testEmptyTrash() $innerHandler = $this->createMock($this->getHandlerClassName()); $innerHandler - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('findTrashItems') ->willReturn(new Location\Trash\TrashResult([ 'items' => [new Trashed(['id' => $trashedId, 'contentId' => $contentId])], @@ -268,7 +269,7 @@ public function testEmptyTrash() $contentHandlerMock = $this->createMock(ContentHandler::class); $contentHandlerMock - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('loadReverseRelations') ->with($contentId) ->willReturn([new Relation(['sourceContentId' => $relationSourceContentId])]); @@ -291,13 +292,13 @@ public function testEmptyTrash() //one set of arguments and tags for each relation $this->cacheIdentifierGeneratorMock - ->expects($this->exactly(6)) + ->expects(self::exactly(6)) ->method('generateTag') ->withConsecutive(...array_merge($cacheIdentifierGeneratorArguments, $cacheIdentifierGeneratorArguments)) ->willReturnOnConsecutiveCalls(...array_merge($tags, $tags)); $this->cacheMock - ->expects($this->once()) + ->expects(self::once()) ->method('invalidateTags') ->with($tags); diff --git a/tests/lib/Persistence/Cache/URLHandlerTest.php b/tests/lib/Persistence/Cache/URLHandlerTest.php index 34cee6878d..ad367e67bc 100644 --- a/tests/lib/Persistence/Cache/URLHandlerTest.php +++ b/tests/lib/Persistence/Cache/URLHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\URL\Handler as SpiURLHandler; @@ -72,7 +73,7 @@ public function testUpdateUrlWhenAddressIsUpdated(): void $updateStruct = new URLUpdateStruct(); $updateStruct->url = 'http://ibexa.co'; - $this->loggerMock->expects($this->once())->method('logCall'); + $this->loggerMock->expects(self::once())->method('logCall'); $innerHandlerMock = $this->createMock(SpiURLHandler::class); $this->persistenceHandlerMock @@ -80,19 +81,19 @@ public function testUpdateUrlWhenAddressIsUpdated(): void ->willReturn($innerHandlerMock); $innerHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('findUsages') ->with($urlId) ->willReturn([2, 3, 5]); $innerHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('updateUrl') ->with($urlId, $updateStruct) ->willReturn(true); $this->cacheIdentifierGeneratorMock - ->expects($this->exactly(4)) + ->expects(self::exactly(4)) ->method('generateTag') ->withConsecutive( ['url', [1], false], @@ -108,12 +109,12 @@ public function testUpdateUrlWhenAddressIsUpdated(): void ); $this->cacheMock - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('invalidateTags') ->with(['url-1']); $this->cacheMock - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('invalidateTags') ->with(['c-2', 'c-3', 'c-5']); @@ -126,7 +127,7 @@ public function testUpdateUrlStatusIsUpdated() $urlId = 1; $updateStruct = new URLUpdateStruct(); - $this->loggerMock->expects($this->once())->method('logCall'); + $this->loggerMock->expects(self::once())->method('logCall'); $innerHandlerMock = $this->createMock(SpiURLHandler::class); $this->persistenceHandlerMock @@ -134,19 +135,19 @@ public function testUpdateUrlStatusIsUpdated() ->willReturn($innerHandlerMock); $innerHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('updateUrl') ->with($urlId, $updateStruct) ->willReturn(true); $this->cacheIdentifierGeneratorMock - ->expects($this->once()) + ->expects(self::once()) ->method('generateTag') ->with('url', [1], false) ->willReturn('url-1'); $this->cacheMock - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('invalidateTags') ->with(['url-1']); diff --git a/tests/lib/Persistence/Cache/UrlAliasHandlerTest.php b/tests/lib/Persistence/Cache/UrlAliasHandlerTest.php index f6af94e240..b3f011a197 100644 --- a/tests/lib/Persistence/Cache/UrlAliasHandlerTest.php +++ b/tests/lib/Persistence/Cache/UrlAliasHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Content\UrlAlias; diff --git a/tests/lib/Persistence/Cache/UrlWildcardHandlerTest.php b/tests/lib/Persistence/Cache/UrlWildcardHandlerTest.php index c62be9b139..b5606ba88c 100644 --- a/tests/lib/Persistence/Cache/UrlWildcardHandlerTest.php +++ b/tests/lib/Persistence/Cache/UrlWildcardHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Content\UrlWildcard; diff --git a/tests/lib/Persistence/Cache/UserHandlerTest.php b/tests/lib/Persistence/Cache/UserHandlerTest.php index 108f91494c..044c449ae6 100644 --- a/tests/lib/Persistence/Cache/UserHandlerTest.php +++ b/tests/lib/Persistence/Cache/UserHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\Content\Location; @@ -469,11 +470,11 @@ public function providerForCachedLoadMethodsMiss(): array public function testPublishRoleDraftFromExistingRole() { - $this->loggerMock->expects($this->once())->method('logCall'); + $this->loggerMock->expects(self::once())->method('logCall'); $innerHandlerMock = $this->createMock(SPIUserHandler::class); $this->persistenceHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('userHandler') ->willReturn($innerHandlerMock); @@ -481,31 +482,31 @@ public function testPublishRoleDraftFromExistingRole() $originalRoleId = 30; $innerHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadRole') ->with($roleDraftId, Role::STATUS_DRAFT) ->willReturn(new Role(['originalId' => $originalRoleId])); $innerHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('publishRoleDraft') ->with($roleDraftId); $roleTag = 'r-' . $originalRoleId; $this->cacheIdentifierGeneratorMock - ->expects($this->once()) + ->expects(self::once()) ->method('generateTag') ->with('role', [$originalRoleId], false) ->willReturn($roleTag); $this->cacheMock - ->expects($this->once()) + ->expects(self::once()) ->method('invalidateTags') ->with([$roleTag]); $this->cacheMock - ->expects($this->never()) + ->expects(self::never()) ->method('deleteItem'); $handler = $this->persistenceCacheHandler->userHandler(); @@ -514,25 +515,25 @@ public function testPublishRoleDraftFromExistingRole() public function testPublishNewRoleDraft() { - $this->loggerMock->expects($this->once())->method('logCall'); + $this->loggerMock->expects(self::once())->method('logCall'); $innerHandlerMock = $this->createMock(SPIUserHandler::class); $this->persistenceHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('userHandler') ->willReturn($innerHandlerMock); $roleDraftId = 33; $innerHandlerMock - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('loadRole') ->with($roleDraftId, Role::STATUS_DRAFT) ->willReturn(new Role(['originalId' => -1])); $innerHandlerMock - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('publishRoleDraft') ->with($roleDraftId); $this->cacheMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $handler = $this->persistenceCacheHandler->userHandler(); $handler->publishRoleDraft($roleDraftId); } @@ -545,26 +546,26 @@ public function testAssignRole() $contentId = 14; $roleId = 9; - $this->loggerMock->expects($this->once())->method('logCall'); + $this->loggerMock->expects(self::once())->method('logCall'); $this->persistenceHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('userHandler') ->willReturn($innerUserHandlerMock); $innerUserHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('assignRole') ->with($contentId, $roleId) ->willReturn(null); $this->persistenceHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('locationHandler') ->willReturn($innerLocationHandlerMock); $innerLocationHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocationsByContent') ->with($contentId) ->willReturn([new Location(['id' => '43'])]); @@ -572,7 +573,7 @@ public function testAssignRole() $tags = ['ragl-14', 'rarl-9', 'lp-43']; $this->cacheIdentifierGeneratorMock - ->expects($this->exactly(3)) + ->expects(self::exactly(3)) ->method('generateTag') ->withConsecutive( ['role_assignment_group_list', [14], false], @@ -582,12 +583,12 @@ public function testAssignRole() ->willReturnOnConsecutiveCalls(...$tags); $this->cacheMock - ->expects($this->once()) + ->expects(self::once()) ->method('invalidateTags') ->with($tags); $this->cacheMock - ->expects($this->never()) + ->expects(self::never()) ->method('deleteItem'); $handler = $this->persistenceCacheHandler->userHandler(); diff --git a/tests/lib/Persistence/FieldTypeRegistryTest.php b/tests/lib/Persistence/FieldTypeRegistryTest.php index 9b9b616444..da394a66bc 100644 --- a/tests/lib/Persistence/FieldTypeRegistryTest.php +++ b/tests/lib/Persistence/FieldTypeRegistryTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence; use Ibexa\Contracts\Core\FieldType\FieldType as SPIFieldType; @@ -24,7 +25,7 @@ public function testConstructor(): void $fieldType = $this->getFieldTypeMock(); $registry = new FieldTypeRegistry([self::FIELD_TYPE_IDENTIFIER => $fieldType]); - $this->assertInstanceOf( + self::assertInstanceOf( SPIPersistenceFieldType::class, $registry->getFieldType(self::FIELD_TYPE_IDENTIFIER) ); @@ -37,7 +38,7 @@ public function testGetFieldTypeInstance() $result = $registry->getFieldType(self::FIELD_TYPE_IDENTIFIER); - $this->assertInstanceOf(SPIPersistenceFieldType::class, $result); + self::assertInstanceOf(SPIPersistenceFieldType::class, $result); } /** @@ -76,7 +77,7 @@ public function testRegister() $registry = new FieldTypeRegistry([]); $registry->register(self::FIELD_TYPE_IDENTIFIER, $fieldType); - $this->assertInstanceOf( + self::assertInstanceOf( SPIPersistenceFieldType::class, $registry->getFieldType(self::FIELD_TYPE_IDENTIFIER) ); diff --git a/tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php index f73e1f96cc..52fd8076c3 100644 --- a/tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php @@ -44,7 +44,7 @@ public function testInsertBookmark() $data = $this->loadBookmark($id); - $this->assertEquals([ + self::assertEquals([ 'id' => $id, 'name' => 'Lorem ipsum dolor...', 'node_id' => '54', @@ -56,12 +56,12 @@ public function testDeleteBookmark() { $this->getGateway()->deleteBookmark(self::EXISTING_BOOKMARK_ID); - $this->assertEmpty($this->loadBookmark(self::EXISTING_BOOKMARK_ID)); + self::assertEmpty($this->loadBookmark(self::EXISTING_BOOKMARK_ID)); } public function testLoadBookmarkDataById() { - $this->assertEquals( + self::assertEquals( [self::EXISTING_BOOKMARK_DATA], $this->getGateway()->loadBookmarkDataById(self::EXISTING_BOOKMARK_ID) ); @@ -74,7 +74,7 @@ public function testLoadBookmarkDataByUserIdAndLocationId() [(int) self::EXISTING_BOOKMARK_DATA['node_id']] ); - $this->assertEquals([self::EXISTING_BOOKMARK_DATA], $data); + self::assertEquals([self::EXISTING_BOOKMARK_DATA], $data); } /** @@ -82,7 +82,7 @@ public function testLoadBookmarkDataByUserIdAndLocationId() */ public function testLoadUserBookmarks(int $userId, int $offset, int $limit, array $expected) { - $this->assertEquals($expected, $this->getGateway()->loadUserBookmarks($userId, $offset, $limit)); + self::assertEquals($expected, $this->getGateway()->loadUserBookmarks($userId, $offset, $limit)); } /** @@ -90,7 +90,7 @@ public function testLoadUserBookmarks(int $userId, int $offset, int $limit, arra */ public function testCountUserBookmarks(int $userId, int $offset, int $limit, array $expected) { - $this->assertEquals(count($expected), $this->getGateway()->countUserBookmarks($userId)); + self::assertEquals(count($expected), $this->getGateway()->countUserBookmarks($userId)); } public function dataProviderForLoadUserBookmarks(): array @@ -134,8 +134,8 @@ public function testLocationSwapped() $bookmark1AfterSwap = $this->loadBookmark($bookmark1Id); $bookmark2AfterSwap = $this->loadBookmark($bookmark2Id); - $this->assertEquals($bookmark1BeforeSwap['node_id'], $bookmark2AfterSwap['node_id']); - $this->assertEquals($bookmark2BeforeSwap['node_id'], $bookmark1AfterSwap['node_id']); + self::assertEquals($bookmark1BeforeSwap['node_id'], $bookmark2AfterSwap['node_id']); + self::assertEquals($bookmark2BeforeSwap['node_id'], $bookmark1AfterSwap['node_id']); } /** diff --git a/tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php b/tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php index 65f96a6203..08ee473599 100644 --- a/tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php +++ b/tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php @@ -50,26 +50,26 @@ public function testCreate() ]); $this->mapper - ->expects($this->once()) + ->expects(self::once()) ->method('createBookmarkFromCreateStruct') ->with($createStruct) ->willReturn($bookmark); $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('insertBookmark') ->with($bookmark) ->willReturn(self::BOOKMARK_ID); $this->handler->create($createStruct); - $this->assertEquals($bookmark->id, self::BOOKMARK_ID); + self::assertEquals($bookmark->id, self::BOOKMARK_ID); } public function testDelete() { $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('deleteBookmark') ->with(self::BOOKMARK_ID); @@ -96,18 +96,18 @@ public function testLoadByUserIdAndLocationIdExistingBookmark() ]); $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('loadBookmarkDataByUserIdAndLocationId') ->with($userId, [$locationId]) ->willReturn($rows); $this->mapper - ->expects($this->once()) + ->expects(self::once()) ->method('extractBookmarksFromRows') ->with($rows) ->willReturn([$object]); - $this->assertEquals([$locationId => $object], $this->handler->loadByUserIdAndLocationId($userId, [$locationId])); + self::assertEquals([$locationId => $object], $this->handler->loadByUserIdAndLocationId($userId, [$locationId])); } public function testLoadByUserIdAndLocationIdNonExistingBookmark() @@ -116,18 +116,18 @@ public function testLoadByUserIdAndLocationIdNonExistingBookmark() $locationId = 54; $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('loadBookmarkDataByUserIdAndLocationId') ->with($userId, [$locationId]) ->willReturn([]); $this->mapper - ->expects($this->once()) + ->expects(self::once()) ->method('extractBookmarksFromRows') ->with([]) ->willReturn([]); - $this->assertEmpty($this->handler->loadByUserIdAndLocationId($userId, [$locationId])); + self::assertEmpty($this->handler->loadByUserIdAndLocationId($userId, [$locationId])); } public function testLoadUserBookmarks() @@ -167,18 +167,18 @@ public function testLoadUserBookmarks() ]; $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('loadUserBookmarks') ->with($userId, $offset, $limit) ->willReturn($rows); $this->mapper - ->expects($this->once()) + ->expects(self::once()) ->method('extractBookmarksFromRows') ->with($rows) ->willReturn($objects); - $this->assertEquals($objects, $this->handler->loadUserBookmarks($userId, $offset, $limit)); + self::assertEquals($objects, $this->handler->loadUserBookmarks($userId, $offset, $limit)); } public function testLocationSwapped() @@ -187,7 +187,7 @@ public function testLocationSwapped() $location2Id = 2; $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('locationSwapped') ->with($location1Id, $location2Id); diff --git a/tests/lib/Persistence/Legacy/Bookmark/MapperTest.php b/tests/lib/Persistence/Legacy/Bookmark/MapperTest.php index 5806326a42..474dc64192 100644 --- a/tests/lib/Persistence/Legacy/Bookmark/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Bookmark/MapperTest.php @@ -34,7 +34,7 @@ public function testCreateBookmarkFromCreateStruct() 'userId' => 87, ]); - $this->assertEquals(new Bookmark([ + self::assertEquals(new Bookmark([ 'name' => 'Contact', 'locationId' => 54, 'userId' => 87, @@ -73,7 +73,7 @@ public function testExtractBookmarksFromRows() ]), ]; - $this->assertEquals($objects, $this->mapper->extractBookmarksFromRows($rows)); + self::assertEquals($objects, $this->mapper->extractBookmarksFromRows($rows)); } } diff --git a/tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php b/tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php index a938b8b850..94baf5fdb2 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content; use Ibexa\Contracts\Core\Persistence\Content; @@ -71,17 +72,17 @@ protected function assertCreateNewFields($storageHandlerUpdatesFields = false) $fieldTypeMock = $this->getFieldTypeMock(); $storageHandlerMock = $this->getStorageHandlerMock(); - $fieldTypeMock->expects($this->exactly(3)) + $fieldTypeMock->expects(self::exactly(3)) ->method('getEmptyValue') - ->will($this->returnValue(new FieldValue())); + ->will(self::returnValue(new FieldValue())); - $contentGatewayMock->expects($this->exactly(6)) + $contentGatewayMock->expects(self::exactly(6)) ->method('insertNewField') ->with( - $this->isInstanceOf(Content::class), - $this->isInstanceOf(Field::class), - $this->isInstanceOf(StorageFieldValue::class) - )->will($this->returnValue(42)); + self::isInstanceOf(Content::class), + self::isInstanceOf(Field::class), + self::isInstanceOf(StorageFieldValue::class) + )->will(self::returnValue(42)); $callNo = 0; $fieldValue = new FieldValue(); @@ -104,24 +105,24 @@ protected function assertCreateNewFields($storageHandlerUpdatesFields = false) $originalField->languageCode = 'eng-GB'; continue; } - $storageHandlerMock->expects($this->at($callNo++)) + $storageHandlerMock->expects(self::at($callNo++)) ->method('storeFieldData') ->with( - $this->isInstanceOf(VersionInfo::class), - $this->equalTo($field) - )->will($this->returnValue($storageHandlerUpdatesFields)); + self::isInstanceOf(VersionInfo::class), + self::equalTo($field) + )->will(self::returnValue($storageHandlerUpdatesFields)); } } /* @var $copyField */ /* @var $originalField */ - $storageHandlerMock->expects($this->at($callNo)) + $storageHandlerMock->expects(self::at($callNo)) ->method('copyFieldData') ->with( - $this->isInstanceOf(VersionInfo::class), - $this->equalTo($copyField), - $this->equalTo($originalField) - )->will($this->returnValue($storageHandlerUpdatesFields)); + self::isInstanceOf(VersionInfo::class), + self::equalTo($copyField), + self::equalTo($originalField) + )->will(self::returnValue($storageHandlerUpdatesFields)); } public function testCreateNewFields() @@ -131,10 +132,10 @@ public function testCreateNewFields() $this->assertCreateNewFields(false); - $mapperMock->expects($this->exactly(6)) + $mapperMock->expects(self::exactly(6)) ->method('convertToStorageValue') - ->with($this->isInstanceOf(Field::class)) - ->will($this->returnValue(new StorageFieldValue())); + ->with(self::isInstanceOf(Field::class)) + ->will(self::returnValue(new StorageFieldValue())); $fieldHandler->createNewFields( $this->getContentPartialFieldsFixture(), @@ -150,16 +151,16 @@ public function testCreateNewFieldsUpdatingStorageHandler() $this->assertCreateNewFields(true); - $mapperMock->expects($this->exactly(12)) + $mapperMock->expects(self::exactly(12)) ->method('convertToStorageValue') - ->with($this->isInstanceOf(Field::class)) - ->will($this->returnValue(new StorageFieldValue())); + ->with(self::isInstanceOf(Field::class)) + ->will(self::returnValue(new StorageFieldValue())); - $contentGatewayMock->expects($this->exactly(6)) + $contentGatewayMock->expects(self::exactly(6)) ->method('updateField') ->with( - $this->isInstanceOf(Field::class), - $this->isInstanceOf(StorageFieldValue::class) + self::isInstanceOf(Field::class), + self::isInstanceOf(StorageFieldValue::class) ); $fieldHandler->createNewFields( @@ -177,17 +178,17 @@ protected function assertCreateNewFieldsForMainLanguage($storageHandlerUpdatesFi $fieldTypeMock = $this->getFieldTypeMock(); $storageHandlerMock = $this->getStorageHandlerMock(); - $fieldTypeMock->expects($this->exactly(3)) + $fieldTypeMock->expects(self::exactly(3)) ->method('getEmptyValue') - ->will($this->returnValue(new FieldValue())); + ->will(self::returnValue(new FieldValue())); - $contentGatewayMock->expects($this->exactly(3)) + $contentGatewayMock->expects(self::exactly(3)) ->method('insertNewField') ->with( - $this->isInstanceOf(Content::class), - $this->isInstanceOf(Field::class), - $this->isInstanceOf(StorageFieldValue::class) - )->will($this->returnValue(42)); + self::isInstanceOf(Content::class), + self::isInstanceOf(Field::class), + self::isInstanceOf(StorageFieldValue::class) + )->will(self::returnValue(42)); $callNo = 0; $fieldValue = new FieldValue(); @@ -202,12 +203,12 @@ protected function assertCreateNewFieldsForMainLanguage($storageHandlerUpdatesFi 'languageCode' => 'eng-GB', ] ); - $storageHandlerMock->expects($this->at($callNo++)) + $storageHandlerMock->expects(self::at($callNo++)) ->method('storeFieldData') ->with( - $this->isInstanceOf(VersionInfo::class), - $this->equalTo($field) - )->will($this->returnValue($storageHandlerUpdatesFields)); + self::isInstanceOf(VersionInfo::class), + self::equalTo($field) + )->will(self::returnValue($storageHandlerUpdatesFields)); } } @@ -218,10 +219,10 @@ public function testCreateNewFieldsForMainLanguage() $this->assertCreateNewFieldsForMainLanguage(false); - $mapperMock->expects($this->exactly(3)) + $mapperMock->expects(self::exactly(3)) ->method('convertToStorageValue') - ->with($this->isInstanceOf(Field::class)) - ->will($this->returnValue(new StorageFieldValue())); + ->with(self::isInstanceOf(Field::class)) + ->will(self::returnValue(new StorageFieldValue())); $fieldHandler->createNewFields( $this->getContentNoFieldsFixture(), @@ -237,16 +238,16 @@ public function testCreateNewFieldsForMainLanguageUpdatingStorageHandler() $this->assertCreateNewFieldsForMainLanguage(true); - $mapperMock->expects($this->exactly(6)) + $mapperMock->expects(self::exactly(6)) ->method('convertToStorageValue') - ->with($this->isInstanceOf(Field::class)) - ->will($this->returnValue(new StorageFieldValue())); + ->with(self::isInstanceOf(Field::class)) + ->will(self::returnValue(new StorageFieldValue())); - $contentGatewayMock->expects($this->exactly(3)) + $contentGatewayMock->expects(self::exactly(3)) ->method('updateField') ->with( - $this->isInstanceOf(Field::class), - $this->isInstanceOf(StorageFieldValue::class) + self::isInstanceOf(Field::class), + self::isInstanceOf(StorageFieldValue::class) ); $fieldHandler->createNewFields( @@ -263,13 +264,13 @@ protected function assertCreateExistingFieldsInNewVersion($storageHandlerUpdates $contentGatewayMock = $this->getContentGatewayMock(); $storageHandlerMock = $this->getStorageHandlerMock(); - $contentGatewayMock->expects($this->exactly(6)) + $contentGatewayMock->expects(self::exactly(6)) ->method('insertExistingField') ->with( - $this->isInstanceOf(Content::class), - $this->isInstanceOf(Field::class), - $this->isInstanceOf(StorageFieldValue::class) - )->will($this->returnValue(42)); + self::isInstanceOf(Content::class), + self::isInstanceOf(Field::class), + self::isInstanceOf(StorageFieldValue::class) + )->will(self::returnValue(42)); $callNo = 0; $fieldValue = new FieldValue(); @@ -286,13 +287,13 @@ protected function assertCreateExistingFieldsInNewVersion($storageHandlerUpdates ); $originalField = clone $field; $field->versionNo = 1; - $storageHandlerMock->expects($this->at($callNo++)) + $storageHandlerMock->expects(self::at($callNo++)) ->method('copyFieldData') ->with( - $this->isInstanceOf(VersionInfo::class), - $this->equalTo($field), - $this->equalTo($originalField) - )->will($this->returnValue($storageHandlerUpdatesFields)); + self::isInstanceOf(VersionInfo::class), + self::equalTo($field), + self::equalTo($originalField) + )->will(self::returnValue($storageHandlerUpdatesFields)); } } } @@ -304,10 +305,10 @@ public function testCreateExistingFieldsInNewVersion() $this->assertCreateExistingFieldsInNewVersion(false); - $mapperMock->expects($this->exactly(6)) + $mapperMock->expects(self::exactly(6)) ->method('convertToStorageValue') - ->with($this->isInstanceOf(Field::class)) - ->will($this->returnValue(new StorageFieldValue())); + ->with(self::isInstanceOf(Field::class)) + ->will(self::returnValue(new StorageFieldValue())); $fieldHandler->createExistingFieldsInNewVersion($this->getContentFixture()); } @@ -320,16 +321,16 @@ public function testCreateExistingFieldsInNewVersionUpdatingStorageHandler() $this->assertCreateExistingFieldsInNewVersion(true); - $mapperMock->expects($this->exactly(12)) + $mapperMock->expects(self::exactly(12)) ->method('convertToStorageValue') - ->with($this->isInstanceOf(Field::class)) - ->will($this->returnValue(new StorageFieldValue())); + ->with(self::isInstanceOf(Field::class)) + ->will(self::returnValue(new StorageFieldValue())); - $contentGatewayMock->expects($this->exactly(6)) + $contentGatewayMock->expects(self::exactly(6)) ->method('updateField') ->with( - $this->isInstanceOf(Field::class), - $this->isInstanceOf(StorageFieldValue::class) + self::isInstanceOf(Field::class), + self::isInstanceOf(StorageFieldValue::class) ); $fieldHandler->createExistingFieldsInNewVersion($this->getContentFixture()); @@ -341,11 +342,11 @@ public function testLoadExternalFieldData() $storageHandlerMock = $this->getStorageHandlerMock(); - $storageHandlerMock->expects($this->exactly(6)) + $storageHandlerMock->expects(self::exactly(6)) ->method('getFieldData') ->with( - $this->isInstanceOf(VersionInfo::class), - $this->isInstanceOf(Field::class) + self::isInstanceOf(VersionInfo::class), + self::isInstanceOf(Field::class) ); $fieldHandler->loadExternalFieldData($this->getContentFixture()); @@ -360,16 +361,16 @@ public function assertUpdateFieldsWithNewLanguage($storageHandlerUpdatesFields = $fieldTypeMock = $this->getFieldTypeMock(); $storageHandlerMock = $this->getStorageHandlerMock(); - $fieldTypeMock->expects($this->exactly(1)) + $fieldTypeMock->expects(self::exactly(1)) ->method('getEmptyValue') - ->will($this->returnValue(new FieldValue())); + ->will(self::returnValue(new FieldValue())); - $contentGatewayMock->expects($this->exactly(3)) + $contentGatewayMock->expects(self::exactly(3)) ->method('insertNewField') ->with( - $this->isInstanceOf(Content::class), - $this->isInstanceOf(Field::class), - $this->isInstanceOf(StorageFieldValue::class) + self::isInstanceOf(Content::class), + self::isInstanceOf(Field::class), + self::isInstanceOf(StorageFieldValue::class) ); $callNo = 0; @@ -392,23 +393,23 @@ public function assertUpdateFieldsWithNewLanguage($storageHandlerUpdatesFields = $originalField->languageCode = 'eng-GB'; continue; } - $storageHandlerMock->expects($this->at($callNo++)) + $storageHandlerMock->expects(self::at($callNo++)) ->method('storeFieldData') ->with( - $this->isInstanceOf(VersionInfo::class), - $this->equalTo($field) - )->will($this->returnValue($storageHandlerUpdatesFields)); + self::isInstanceOf(VersionInfo::class), + self::equalTo($field) + )->will(self::returnValue($storageHandlerUpdatesFields)); } /* @var $copyField */ /* @var $originalField */ - $storageHandlerMock->expects($this->at($callNo)) + $storageHandlerMock->expects(self::at($callNo)) ->method('copyFieldData') ->with( - $this->isInstanceOf(VersionInfo::class), - $this->equalTo($copyField), - $this->equalTo($originalField) - )->will($this->returnValue($storageHandlerUpdatesFields)); + self::isInstanceOf(VersionInfo::class), + self::equalTo($copyField), + self::equalTo($originalField) + )->will(self::returnValue($storageHandlerUpdatesFields)); } public function testUpdateFieldsWithNewLanguage() @@ -418,10 +419,10 @@ public function testUpdateFieldsWithNewLanguage() $this->assertUpdateFieldsWithNewLanguage(false); - $mapperMock->expects($this->exactly(3)) + $mapperMock->expects(self::exactly(3)) ->method('convertToStorageValue') - ->with($this->isInstanceOf(Field::class)) - ->will($this->returnValue(new StorageFieldValue())); + ->with(self::isInstanceOf(Field::class)) + ->will(self::returnValue(new StorageFieldValue())); $field = new Field( [ @@ -451,16 +452,16 @@ public function testUpdateFieldsWithNewLanguageUpdatingStorageHandler() $this->assertUpdateFieldsWithNewLanguage(true); - $mapperMock->expects($this->exactly(6)) + $mapperMock->expects(self::exactly(6)) ->method('convertToStorageValue') - ->with($this->isInstanceOf(Field::class)) - ->will($this->returnValue(new StorageFieldValue())); + ->with(self::isInstanceOf(Field::class)) + ->will(self::returnValue(new StorageFieldValue())); - $contentGatewayMock->expects($this->exactly(3)) + $contentGatewayMock->expects(self::exactly(3)) ->method('updateField') ->with( - $this->isInstanceOf(Field::class), - $this->isInstanceOf(StorageFieldValue::class) + self::isInstanceOf(Field::class), + self::isInstanceOf(StorageFieldValue::class) ); $field = new Field( @@ -515,24 +516,24 @@ public function assertUpdateFieldsExistingLanguages($storageHandlerUpdatesFields 'original' => $originalField, ]; } else { - $storageHandlerMock->expects($this->at($callNo++)) + $storageHandlerMock->expects(self::at($callNo++)) ->method('storeFieldData') ->with( - $this->isInstanceOf(VersionInfo::class), - $this->equalTo($field) - )->will($this->returnValue($storageHandlerUpdatesFields)); + self::isInstanceOf(VersionInfo::class), + self::equalTo($field) + )->will(self::returnValue($storageHandlerUpdatesFields)); } } } foreach ($fieldsToCopy as $fieldToCopy) { - $storageHandlerMock->expects($this->at($callNo++)) + $storageHandlerMock->expects(self::at($callNo++)) ->method('copyFieldData') ->with( - $this->isInstanceOf(VersionInfo::class), - $this->equalTo($fieldToCopy['copy']), - $this->equalTo($fieldToCopy['original']) - )->will($this->returnValue($storageHandlerUpdatesFields)); + self::isInstanceOf(VersionInfo::class), + self::equalTo($fieldToCopy['copy']), + self::equalTo($fieldToCopy['original']) + )->will(self::returnValue($storageHandlerUpdatesFields)); } } @@ -544,16 +545,16 @@ public function testUpdateFieldsExistingLanguages() $this->assertUpdateFieldsExistingLanguages(false); - $mapperMock->expects($this->exactly(6)) + $mapperMock->expects(self::exactly(6)) ->method('convertToStorageValue') - ->with($this->isInstanceOf(Field::class)) - ->will($this->returnValue(new StorageFieldValue())); + ->with(self::isInstanceOf(Field::class)) + ->will(self::returnValue(new StorageFieldValue())); - $contentGatewayMock->expects($this->exactly(6)) + $contentGatewayMock->expects(self::exactly(6)) ->method('updateField') ->with( - $this->isInstanceOf(Field::class), - $this->isInstanceOf(StorageFieldValue::class) + self::isInstanceOf(Field::class), + self::isInstanceOf(StorageFieldValue::class) ); $fieldHandler->updateFields( @@ -571,16 +572,16 @@ public function testUpdateFieldsExistingLanguagesUpdatingStorageHandler() $this->assertUpdateFieldsExistingLanguages(true); - $mapperMock->expects($this->exactly(12)) + $mapperMock->expects(self::exactly(12)) ->method('convertToStorageValue') - ->with($this->isInstanceOf(Field::class)) - ->will($this->returnValue(new StorageFieldValue())); + ->with(self::isInstanceOf(Field::class)) + ->will(self::returnValue(new StorageFieldValue())); - $contentGatewayMock->expects($this->exactly(12)) + $contentGatewayMock->expects(self::exactly(12)) ->method('updateField') ->with( - $this->isInstanceOf(Field::class), - $this->isInstanceOf(StorageFieldValue::class) + self::isInstanceOf(Field::class), + self::isInstanceOf(StorageFieldValue::class) ); $fieldHandler->updateFields( @@ -623,22 +624,22 @@ public function assertUpdateFieldsForInitialLanguage($storageHandlerUpdatesField } // This field is inserted as empty $field->value = null; - $storageHandlerMock->expects($this->at($callNo++)) + $storageHandlerMock->expects(self::at($callNo++)) ->method('storeFieldData') ->with( - $this->isInstanceOf(VersionInfo::class), - $this->equalTo($field) - )->will($this->returnValue($storageHandlerUpdatesFields)); + self::isInstanceOf(VersionInfo::class), + self::equalTo($field) + )->will(self::returnValue($storageHandlerUpdatesFields)); } foreach ($fieldsToCopy as $fieldToCopy) { - $storageHandlerMock->expects($this->at($callNo++)) + $storageHandlerMock->expects(self::at($callNo++)) ->method('copyFieldData') ->with( - $this->isInstanceOf(VersionInfo::class), - $this->equalTo($fieldToCopy['copy']), - $this->equalTo($fieldToCopy['original']) - )->will($this->returnValue($storageHandlerUpdatesFields)); + self::isInstanceOf(VersionInfo::class), + self::equalTo($fieldToCopy['copy']), + self::equalTo($fieldToCopy['original']) + )->will(self::returnValue($storageHandlerUpdatesFields)); } } @@ -649,10 +650,10 @@ public function testUpdateFieldsForInitialLanguage() $this->assertUpdateFieldsForInitialLanguage(false); - $mapperMock->expects($this->exactly(3)) + $mapperMock->expects(self::exactly(3)) ->method('convertToStorageValue') - ->with($this->isInstanceOf(Field::class)) - ->will($this->returnValue(new StorageFieldValue())); + ->with(self::isInstanceOf(Field::class)) + ->will(self::returnValue(new StorageFieldValue())); $struct = new UpdateStruct(); // Language with id=2 is eng-US @@ -672,16 +673,16 @@ public function testUpdateFieldsForInitialLanguageUpdatingStorageHandler() $this->assertUpdateFieldsForInitialLanguage(true); - $mapperMock->expects($this->exactly(6)) + $mapperMock->expects(self::exactly(6)) ->method('convertToStorageValue') - ->with($this->isInstanceOf(Field::class)) - ->will($this->returnValue(new StorageFieldValue())); + ->with(self::isInstanceOf(Field::class)) + ->will(self::returnValue(new StorageFieldValue())); - $contentGatewayMock->expects($this->exactly(3)) + $contentGatewayMock->expects(self::exactly(3)) ->method('updateField') ->with( - $this->isInstanceOf(Field::class), - $this->isInstanceOf(StorageFieldValue::class) + self::isInstanceOf(Field::class), + self::isInstanceOf(StorageFieldValue::class) ); $struct = new UpdateStruct(); @@ -699,27 +700,27 @@ public function testDeleteFields() $fieldHandler = $this->getFieldHandler(); $contentGatewayMock = $this->getContentGatewayMock(); - $contentGatewayMock->expects($this->once()) + $contentGatewayMock->expects(self::once()) ->method('getFieldIdsByType') ->with( - $this->equalTo(42), - $this->equalTo(2) - )->will($this->returnValue(['some-type' => [2, 3]])); + self::equalTo(42), + self::equalTo(2) + )->will(self::returnValue(['some-type' => [2, 3]])); $storageHandlerMock = $this->getStorageHandlerMock(); - $storageHandlerMock->expects($this->once()) + $storageHandlerMock->expects(self::once()) ->method('deleteFieldData') ->with( - $this->equalTo('some-type'), - $this->isInstanceOf(VersionInfo::class), - $this->equalTo([2, 3]) + self::equalTo('some-type'), + self::isInstanceOf(VersionInfo::class), + self::equalTo([2, 3]) ); - $contentGatewayMock->expects($this->once()) + $contentGatewayMock->expects(self::once()) ->method('deleteFields') ->with( - $this->equalTo(42), - $this->equalTo(2) + self::equalTo(42), + self::equalTo(2) ); $fieldHandler->deleteFields(42, new VersionInfo(['versionNo' => 2])); @@ -992,13 +993,13 @@ protected function getFieldTypeRegistryMock() $this->fieldTypeRegistryMock = $this->createMock(FieldTypeRegistry::class); $this->fieldTypeRegistryMock->expects( - $this->any() + self::any() )->method( 'getFieldType' )->with( - $this->isType('string') + self::isType('string') )->will( - $this->returnValue($this->getFieldTypeMock()) + self::returnValue($this->getFieldTypeMock()) ); } diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php index 96e18e03fe..0171769c2c 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\FieldValue\Converter; use DOMDocument; diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxTest.php index 5d0dc8e2a6..78c30d6e1c 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php index e65b6300be..5b6394960d 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldTypeConstraints; @@ -40,6 +41,7 @@ public function providerForTestToStorageValue() /** * @group fieldType * @group country + * * @dataProvider providerForTestToStorageValue */ public function testToStorageValue($data, $sortKey, $dataText, $sortKeyString) @@ -65,6 +67,7 @@ public function providerForTestToFieldValue() /** * @group fieldType * @group country + * * @dataProvider providerForTestToFieldValue */ public function testToFieldValue($dataText, $sortKeyString, $data) diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php index 0ab500db69..9a1afa260e 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\FieldValue\Converter; use DateInterval; diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateTest.php index f2e32c8cfa..0eb70ab5f4 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\FieldValue\Converter; use DateTime; diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNTest.php index f0a03deeef..bb7260d001 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition as PersistenceFieldDefinition; diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordTest.php index fcdad63838..47f35372f5 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; @@ -39,11 +40,11 @@ public function testToStorageValue() $storageFieldValue = new StorageFieldValue(); $this->converter->toStorageValue($value, $storageFieldValue); - $this->assertNull($storageFieldValue->dataText); - $this->assertNull($storageFieldValue->dataInt); - $this->assertNull($storageFieldValue->dataFloat); - $this->assertEquals(0, $storageFieldValue->sortKeyInt); - $this->assertEquals('', $storageFieldValue->sortKeyString); + self::assertNull($storageFieldValue->dataText); + self::assertNull($storageFieldValue->dataInt); + self::assertNull($storageFieldValue->dataFloat); + self::assertEquals(0, $storageFieldValue->sortKeyInt); + self::assertEquals('', $storageFieldValue->sortKeyString); } /** @@ -56,8 +57,8 @@ public function testToFieldValue() $fieldValue = new FieldValue(); $this->converter->toFieldValue($storageFieldValue, $fieldValue); - $this->assertSame([], $fieldValue->data); - $this->assertEquals('', $fieldValue->sortKey); + self::assertSame([], $fieldValue->data); + self::assertEquals('', $fieldValue->sortKey); } /** diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaTest.php index 296e05bef1..3b4b79aacf 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldTypeConstraints; diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php index 7cb5158b5c..1a4681dfc5 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldTypeConstraints; @@ -54,11 +55,11 @@ public function testToStorageValue() $actualStorageFieldValue = new StorageFieldValue(); $this->converter - ->expects($this->once()) + ->expects(self::once()) ->method('getRelationXmlHashFromDB') ->with($destinationContentIds) ->will( - $this->returnValue( + self::returnValue( [ '1' => [ [ @@ -96,7 +97,7 @@ public function testToStorageValue() $this->converter->toStorageValue($fieldValue, $actualStorageFieldValue); - $this->assertEquals( + self::assertEquals( $expectedStorageFieldValue, $actualStorageFieldValue ); @@ -123,14 +124,14 @@ public function testToStorageValueEmpty() $actualStorageFieldValue = new StorageFieldValue(); $this->converter - ->expects($this->once()) + ->expects(self::once()) ->method('getRelationXmlHashFromDB') ->with($destinationContentIds) - ->will($this->returnValue([])); + ->will(self::returnValue([])); $this->converter->toStorageValue($fieldValue, $actualStorageFieldValue); - $this->assertEquals( + self::assertEquals( $expectedStorageFieldValue, $actualStorageFieldValue ); @@ -157,7 +158,7 @@ public function testToFieldValue() $this->converter->toFieldValue($storageFieldValue, $actualFieldValue); - $this->assertEquals( + self::assertEquals( $expectedFieldValue, $actualFieldValue ); @@ -184,7 +185,7 @@ public function testToFieldValueEmpty() $this->converter->toFieldValue($storageFieldValue, $actualFieldValue); - $this->assertEquals( + self::assertEquals( $expectedFieldValue, $actualFieldValue ); @@ -227,7 +228,7 @@ public function testToStorageFieldDefinition() $this->converter->toStorageFieldDefinition($fieldDefinition, $actualStorageFieldDefinition); - $this->assertEquals( + self::assertEquals( $expectedStorageFieldDefinition, $actualStorageFieldDefinition ); @@ -285,7 +286,7 @@ public function testToFieldDefinitionMultiple() $this->converter->toFieldDefinition($storageFieldDefinition, $actualFieldDefinition); - $this->assertEquals( + self::assertEquals( $expectedFieldDefinition, $actualFieldDefinition ); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationTest.php index b360c5f9f4..aeb653170c 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldTypeConstraints; @@ -62,7 +63,7 @@ public function testToStorageFieldDefinition() $this->converter->toStorageFieldDefinition($fieldDefinition, $actualStorageFieldDefinition); - $this->assertEquals( + self::assertEquals( $expectedStorageFieldDefinition, $actualStorageFieldDefinition ); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionTest.php index 24aab067b1..e741d20a18 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldTypeConstraints; @@ -48,7 +49,7 @@ public function testToStorageValue() $this->converter->toStorageValue($fieldValue, $actualStorageFieldValue); - $this->assertEquals( + self::assertEquals( $expectedStorageFieldValue, $actualStorageFieldValue ); @@ -72,7 +73,7 @@ public function testToStorageValueEmpty() $this->converter->toStorageValue($fieldValue, $actualStorageFieldValue); - $this->assertEquals( + self::assertEquals( $expectedStorageFieldValue, $actualStorageFieldValue ); @@ -96,7 +97,7 @@ public function testToFieldValue() $this->converter->toFieldValue($storageFieldValue, $actualFieldValue); - $this->assertEquals( + self::assertEquals( $expectedFieldValue, $actualFieldValue ); @@ -120,7 +121,7 @@ public function testToFieldValueEmpty() $this->converter->toFieldValue($storageFieldValue, $actualFieldValue); - $this->assertEquals( + self::assertEquals( $expectedFieldValue, $actualFieldValue ); @@ -163,7 +164,7 @@ public function testToStorageFieldDefinitionMultiple() $this->converter->toStorageFieldDefinition($fieldDefinition, $actualStorageFieldDefinition); - $this->assertEquals($expectedStorageFieldDefinition, $actualStorageFieldDefinition); + self::assertEquals($expectedStorageFieldDefinition, $actualStorageFieldDefinition); } /** @@ -201,7 +202,7 @@ public function testToStorageFieldDefinitionSingle() $this->converter->toStorageFieldDefinition($fieldDefinition, $actualStorageFieldDefinition); - $this->assertEquals($expectedStorageFieldDefinition, $actualStorageFieldDefinition); + self::assertEquals($expectedStorageFieldDefinition, $actualStorageFieldDefinition); } /** @@ -270,7 +271,7 @@ public function testToFieldDefinitionMultiple() $this->converter->toFieldDefinition($storageFieldDefinition, $actualFieldDefinition); - $this->assertEquals($expectedFieldDefinition, $actualFieldDefinition); + self::assertEquals($expectedFieldDefinition, $actualFieldDefinition); } /** @@ -323,7 +324,7 @@ public function testToFieldDefinitionSingleEmpty() $this->converter->toFieldDefinition($storageFieldDefinition, $actualFieldDefinition); - $this->assertEquals($expectedFieldDefinition, $actualFieldDefinition); + self::assertEquals($expectedFieldDefinition, $actualFieldDefinition); } } diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverterTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverterTest.php index 14afbf217d..28744c243d 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverterTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverterTest.php @@ -51,7 +51,7 @@ public function testToStorageValue(): void $fieldValue->sortKey = 'key'; $this->serializer - ->expects($this->once()) + ->expects(self::once()) ->method('encode') ->with($fieldValue->data) ->willReturn(self::EXAMPLE_JSON); @@ -60,21 +60,21 @@ public function testToStorageValue(): void $this->converter->toStorageValue($fieldValue, $storageValue); - $this->assertEquals(self::EXAMPLE_JSON, $storageValue->dataText); - $this->assertEquals('key', $storageValue->sortKeyString); + self::assertEquals(self::EXAMPLE_JSON, $storageValue->dataText); + self::assertEquals('key', $storageValue->sortKeyString); } public function testEmptyToStorageValue(): void { $this->serializer - ->expects($this->never()) + ->expects(self::never()) ->method('encode'); $storageValue = new StorageFieldValue(); $this->converter->toStorageValue(new FieldValue(), $storageValue); - $this->assertNull($storageValue->dataText); + self::assertNull($storageValue->dataText); } public function testToFieldValue(): void @@ -84,7 +84,7 @@ public function testToFieldValue(): void $storageValue->dataText = self::EXAMPLE_JSON; $this->serializer - ->expects($this->once()) + ->expects(self::once()) ->method('decode') ->with(self::EXAMPLE_JSON) ->willReturn(self::EXAMPLE_DATA); @@ -93,22 +93,22 @@ public function testToFieldValue(): void $this->converter->toFieldValue($storageValue, $fieldValue); - $this->assertEquals('key', $fieldValue->sortKey); - $this->assertEquals(self::EXAMPLE_DATA, $fieldValue->data); - $this->assertNull($fieldValue->externalData); + self::assertEquals('key', $fieldValue->sortKey); + self::assertEquals(self::EXAMPLE_DATA, $fieldValue->data); + self::assertNull($fieldValue->externalData); } public function testEmptyToFieldValue(): void { $this->serializer - ->expects($this->never()) + ->expects(self::never()) ->method('decode'); $fieldValue = new FieldValue(); $this->converter->toFieldValue(new StorageFieldValue(), $fieldValue); - $this->assertNull($fieldValue->data); + self::assertNull($fieldValue->data); } public function testToStorageFieldDefinition(): void @@ -121,7 +121,7 @@ public function testToStorageFieldDefinition(): void ]); $this->serializer - ->expects($this->once()) + ->expects(self::once()) ->method('encode') ->with(self::EXAMPLE_DATA) ->willReturn(self::EXAMPLE_JSON); @@ -130,20 +130,20 @@ public function testToStorageFieldDefinition(): void $this->converter->toStorageFieldDefinition($fieldDefinition, $storageFieldDefinition); - $this->assertEquals(self::EXAMPLE_JSON, $storageFieldDefinition->dataText5); + self::assertEquals(self::EXAMPLE_JSON, $storageFieldDefinition->dataText5); } public function testEmptyToStorageFieldDefinition(): void { $this->serializer - ->expects($this->never()) + ->expects(self::never()) ->method('encode'); $storageFieldDefinition = new StorageFieldDefinition(); $this->converter->toStorageFieldDefinition(new FieldDefinition(), $storageFieldDefinition); - $this->assertNull($storageFieldDefinition->dataText5); + self::assertNull($storageFieldDefinition->dataText5); } public function testToFieldDefinition(): void @@ -152,7 +152,7 @@ public function testToFieldDefinition(): void $storageFieldDefinition->dataText5 = self::EXAMPLE_JSON; $this->serializer - ->expects($this->once()) + ->expects(self::once()) ->method('decode') ->with(self::EXAMPLE_JSON) ->willReturn(self::EXAMPLE_DATA); @@ -161,7 +161,7 @@ public function testToFieldDefinition(): void $this->converter->toFieldDefinition($storageFieldDefinition, $fieldDefinition); - $this->assertEquals( + self::assertEquals( new FieldSettings(self::EXAMPLE_DATA), $fieldDefinition->fieldTypeConstraints->fieldSettings ); @@ -170,14 +170,14 @@ public function testToFieldDefinition(): void public function testEmptyToFieldDefinition(): void { $this->serializer - ->expects($this->never()) + ->expects(self::never()) ->method('decode'); $fieldDefinition = new FieldDefinition(); $this->converter->toFieldDefinition(new StorageFieldDefinition(), $fieldDefinition); - $this->assertNull($fieldDefinition->fieldTypeConstraints->fieldSettings); + self::assertNull($fieldDefinition->fieldTypeConstraints->fieldSettings); } } diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockTest.php index ef8bc2010d..0551272a58 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldTypeConstraints; diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineTest.php index 48595753c7..50516d69ad 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldTypeConstraints; diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeTest.php index 530362c1e0..0c9d7cd8f9 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\FieldValue\Converter; use DateTime; diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlTest.php index 67c2ee65c4..ea858a37ab 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; diff --git a/tests/lib/Persistence/Legacy/Content/FieldValueConverterRegistryTest.php b/tests/lib/Persistence/Legacy/Content/FieldValueConverterRegistryTest.php index 08ccabe4a8..d4a48a6b5b 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValueConverterRegistryTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValueConverterRegistryTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content; use Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; @@ -22,7 +23,7 @@ public function testRegister() $converter = $this->getFieldValueConverterMock(); $registry = new Registry([self::TYPE_NAME => $converter]); - $this->assertSame($converter, $registry->getConverter(self::TYPE_NAME)); + self::assertSame($converter, $registry->getConverter(self::TYPE_NAME)); } public function testGetStorage() @@ -32,7 +33,7 @@ public function testGetStorage() $res = $registry->getConverter(self::TYPE_NAME); - $this->assertSame( + self::assertSame( $converter, $res ); diff --git a/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php index 8d8a004560..f226431428 100644 --- a/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Gateway; use Doctrine\DBAL\ParameterType; @@ -217,7 +218,7 @@ public function testSetStatus() $version->contentInfo->id = $contentId; $gateway->insertVersion($version, []); - $this->assertTrue( + self::assertTrue( $gateway->setStatus($version->contentInfo->id, $version->versionNo, VersionInfo::STATUS_PENDING) ); @@ -252,7 +253,7 @@ public function testSetStatusPublished() $version->contentInfo->id = $contentId; $gateway->insertVersion($version, []); - $this->assertTrue( + self::assertTrue( $gateway->setStatus($version->contentInfo->id, $version->versionNo, VersionInfo::STATUS_PUBLISHED) ); @@ -278,7 +279,7 @@ public function testSetStatusUnknownVersion() { $gateway = $this->getDatabaseGateway(); - $this->assertFalse( + self::assertFalse( $gateway->setStatus(23, 42, 2) ); } @@ -601,23 +602,23 @@ public function testListVersions(): void $gateway = $this->getDatabaseGateway(); $res = $gateway->listVersions(226); - $this->assertCount( + self::assertCount( 2, $res ); foreach ($res as $row) { - $this->assertCount( + self::assertCount( 23, $row ); } - $this->assertEquals( + self::assertEquals( 675, $res[0]['ezcontentobject_version_id'] ); - $this->assertEquals( + self::assertEquals( 676, $res[1]['ezcontentobject_version_id'] ); @@ -632,7 +633,7 @@ public function testListVersionNumbers() $gateway = $this->getDatabaseGateway(); $res = $gateway->listVersionNumbers(226); - $this->assertEquals([1, 2], $res); + self::assertEquals([1, 2], $res); } public function testListVersionsForUser() @@ -644,31 +645,31 @@ public function testListVersionsForUser() $gateway = $this->getDatabaseGateway(); $res = $gateway->listVersionsForUser(14); - $this->assertCount( + self::assertCount( 2, $res ); foreach ($res as $row) { - $this->assertCount( + self::assertCount( 23, $row ); } - $this->assertEquals( + self::assertEquals( 677, $res[0]['ezcontentobject_version_id'] ); - $this->assertEquals( + self::assertEquals( 0, $res[0]['ezcontentobject_version_status'] ); - $this->assertEquals( + self::assertEquals( 678, $res[1]['ezcontentobject_version_id'] ); - $this->assertEquals( + self::assertEquals( 0, $res[1]['ezcontentobject_version_status'] ); @@ -716,7 +717,7 @@ public function testCreateFixtureForMapperExtractContentFromRowsMultipleVersions $res );*/ - $this->assertEquals($orig, $res, 'Fixtures differ between what was previously stored(expected) and what it now generates(actual), this hints either some mistake in impl or that the fixture (../_fixtures/extract_content_from_rows_multiple_versions.php) and tests needs to be adapted.'); + self::assertEquals($orig, $res, 'Fixtures differ between what was previously stored(expected) and what it now generates(actual), this hints either some mistake in impl or that the fixture (../_fixtures/extract_content_from_rows_multiple_versions.php) and tests needs to be adapted.'); } public function testCreateFixtureForMapperExtractContentFromRows() @@ -736,7 +737,7 @@ public function testCreateFixtureForMapperExtractContentFromRows() $res );*/ - $this->assertEquals($orig, $res, 'Fixtures differ between what was previously stored(expected) and what it now generates(actual), this hints either some mistake in impl or that the fixture (../_fixtures/extract_content_from_rows.php) and tests needs to be adapted.'); + self::assertEquals($orig, $res, 'Fixtures differ between what was previously stored(expected) and what it now generates(actual), this hints either some mistake in impl or that the fixture (../_fixtures/extract_content_from_rows.php) and tests needs to be adapted.'); } public function testLoadWithSingleTranslation() @@ -758,7 +759,7 @@ public function testLoadWithSingleTranslation() ['4'], $res ); - $this->assertCount( + self::assertCount( 1, $res ); @@ -773,7 +774,7 @@ public function testLoadNonExistentTranslation() $gateway = $this->getDatabaseGateway(); $res = $gateway->load(226, 2, ['de-DE']); - $this->assertCount( + self::assertCount( 0, $res ); @@ -801,7 +802,7 @@ protected function assertValuesInRows($columnKey, array $expectedValues, array $ } } - $this->assertEquals( + self::assertEquals( $expectedValues, $containedValues ); @@ -815,7 +816,7 @@ public function testGetAllLocationIds() $gateway = $this->getDatabaseGateway(); - $this->assertEquals( + self::assertEquals( [228], $gateway->getAllLocationIds(226) ); @@ -829,7 +830,7 @@ public function testGetFieldIdsByType() $gateway = $this->getDatabaseGateway(); - $this->assertEquals( + self::assertEquals( [ 'ezstring' => [841], 'ezimage' => [843], @@ -847,7 +848,7 @@ public function testGetFieldIdsByTypeWithSecondArgument() $gateway = $this->getDatabaseGateway(); - $this->assertEquals( + self::assertEquals( [ 'ezstring' => [4001, 4002], ], @@ -870,7 +871,7 @@ public function testDeleteRelationsTo() $gateway = $this->getDatabaseGateway(); $gateway->deleteRelations(149); - $this->assertEquals( + self::assertEquals( // yes, relates to itself! [ 'all' => $beforeCount['all'] - 2, @@ -900,7 +901,7 @@ public function testDeleteRelationsFrom() $gateway = $this->getDatabaseGateway(); $gateway->deleteRelations(75); - $this->assertEquals( + self::assertEquals( [ 'all' => $beforeCount['all'] - 6, 'from' => $beforeCount['from'] - 6, @@ -929,7 +930,7 @@ public function testDeleteRelationsWithSecondArgument() $gateway = $this->getDatabaseGateway(); $gateway->deleteRelations(225, 2); - $this->assertEquals( + self::assertEquals( [ 'all' => $beforeCount['all'] - 1, 'from' => $beforeCount['from'] - 1, @@ -957,7 +958,7 @@ public function testDeleteField(): void $gateway = $this->getDatabaseGateway(); $gateway->deleteField(22); - $this->assertEquals( + self::assertEquals( $beforeCount - 2, $this->countContentFields() ); @@ -985,7 +986,7 @@ public function testDeleteFields() $gateway = $this->getDatabaseGateway(); $gateway->deleteFields(4); - $this->assertEquals( + self::assertEquals( [ 'all' => $beforeCount['all'] - 2, 'this' => 0, @@ -1011,7 +1012,7 @@ public function testDeleteFieldsWithSecondArgument() $gateway = $this->getDatabaseGateway(); $gateway->deleteFields(225, 2); - $this->assertEquals( + self::assertEquals( [ 'all' => $beforeCount['all'] - 2, 'this' => $beforeCount['this'] - 2, @@ -1037,7 +1038,7 @@ public function testDeleteVersions() $gateway = $this->getDatabaseGateway(); $gateway->deleteVersions(14); - $this->assertEquals( + self::assertEquals( [ 'all' => $beforeCount['all'] - 2, 'this' => 0, @@ -1063,7 +1064,7 @@ public function testDeleteVersionsWithSecondArgument() $gateway = $this->getDatabaseGateway(); $gateway->deleteVersions(225, 2); - $this->assertEquals( + self::assertEquals( [ 'all' => $beforeCount['all'] - 1, 'this' => $beforeCount['this'] - 1, @@ -1126,7 +1127,7 @@ public function testDeleteNames() $gateway = $this->getDatabaseGateway(); $gateway->deleteNames(14); - $this->assertEquals( + self::assertEquals( [ 'all' => $beforeCount['all'] - 2, 'this' => 0, @@ -1152,7 +1153,7 @@ public function testDeleteNamesWithSecondArgument() $gateway = $this->getDatabaseGateway(); $gateway->deleteNames(225, 2); - $this->assertEquals( + self::assertEquals( [ 'all' => $beforeCount['all'] - 1, 'this' => $beforeCount['this'] - 1, @@ -1175,7 +1176,7 @@ public function testDeleteContent() $gateway = $this->getDatabaseGateway(); $gateway->deleteContent(14); - $this->assertEquals( + self::assertEquals( [ 'all' => $beforeCount - 1, 'this' => 0, @@ -1224,7 +1225,7 @@ public function testLoadRelations(): void $relations = $gateway->loadRelations(57); - $this->assertCount(3, $relations); + self::assertCount(3, $relations); $this->assertValuesInRows( 'ezcontentobject_link_to_contentobject_id', @@ -1252,7 +1253,7 @@ public function testLoadRelationsByType() $relations = $gateway->loadRelations(57, null, RelationValue::COMMON); - $this->assertCount(1, $relations, 'Expecting one relation to be loaded'); + self::assertCount(1, $relations, 'Expecting one relation to be loaded'); $this->assertValuesInRows( 'ezcontentobject_link_relation_type', @@ -1275,7 +1276,7 @@ public function testLoadRelationsByVersion() $relations = $gateway->loadRelations(57, 1); - $this->assertCount(1, $relations, 'Expecting one relation to be loaded'); + self::assertCount(1, $relations, 'Expecting one relation to be loaded'); $this->assertValuesInRows( 'ezcontentobject_link_to_contentobject_id', @@ -1292,7 +1293,7 @@ public function testLoadRelationsNoResult() $relations = $gateway->loadRelations(57, 1, RelationValue::EMBED); - $this->assertCount(0, $relations, 'Expecting no relation to be loaded'); + self::assertCount(0, $relations, 'Expecting no relation to be loaded'); } public function testLoadReverseRelations() @@ -1353,7 +1354,7 @@ public function testGetLastVersionNumber() $gateway = $this->getDatabaseGateway(); - $this->assertEquals( + self::assertEquals( 1, $gateway->getLastVersionNumber(4) ); @@ -1680,7 +1681,7 @@ public function testLoadVersionInfo(): void $orig = include __DIR__ . '/../_fixtures/extract_version_info_from_rows_multiple_versions.php'; - $this->assertEquals($orig, $res, 'Fixtures differ between what was previously stored(expected) and what it now generates(actual), this hints either some mistake in impl or that the fixture (../_fixtures/extract_content_from_rows_multiple_versions.php) and tests needs to be adapted.'); + self::assertEquals($orig, $res, 'Fixtures differ between what was previously stored(expected) and what it now generates(actual), this hints either some mistake in impl or that the fixture (../_fixtures/extract_content_from_rows_multiple_versions.php) and tests needs to be adapted.'); } /** diff --git a/tests/lib/Persistence/Legacy/Content/Gateway/RandomSortClauseHandlerFactoryTest.php b/tests/lib/Persistence/Legacy/Content/Gateway/RandomSortClauseHandlerFactoryTest.php index 627062083b..bd36c4e4da 100644 --- a/tests/lib/Persistence/Legacy/Content/Gateway/RandomSortClauseHandlerFactoryTest.php +++ b/tests/lib/Persistence/Legacy/Content/Gateway/RandomSortClauseHandlerFactoryTest.php @@ -40,7 +40,7 @@ public function testGetGateway(array $gateways) ->willReturn($platform); $handlerFactory = new RandomSortClauseHandlerFactory($connection, $gateways); - $this->assertEquals( + self::assertEquals( 'testStorage', $handlerFactory->getGateway()->getDriverName() ); diff --git a/tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php b/tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php index 6bae3ef379..0f8a458344 100644 --- a/tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Language; use Ibexa\Contracts\Core\Persistence\Content\Language; @@ -53,23 +54,23 @@ public function testCreate() $languageFixture = $this->getLanguageFixture(); - $innerHandlerMock->expects($this->once()) + $innerHandlerMock->expects(self::once()) ->method('create') ->with( - $this->isInstanceOf( + self::isInstanceOf( SPILanguageCreateStruct::class ) )->willReturn($languageFixture); - $cacheMock->expects($this->once()) + $cacheMock->expects(self::once()) ->method('setMulti') - ->with($this->equalTo([$languageFixture])); + ->with(self::equalTo([$languageFixture])); $createStruct = $this->getCreateStructFixture(); $result = $handler->create($createStruct); - $this->assertEquals( + self::assertEquals( $languageFixture, $result ); @@ -106,14 +107,14 @@ public function testUpdate() $innerHandlerMock = $this->getInnerLanguageHandlerMock(); $cacheMock = $this->getLanguageCacheMock(); - $innerHandlerMock->expects($this->once()) + $innerHandlerMock->expects(self::once()) ->method('update') ->with($this->getLanguageFixture()); $languageFixture = $this->getLanguageFixture(); - $cacheMock->expects($this->once()) + $cacheMock->expects(self::once()) ->method('setMulti') - ->with($this->equalTo([$languageFixture])); + ->with(self::equalTo([$languageFixture])); $handler->update($languageFixture); } @@ -124,19 +125,19 @@ public function testLoad() $cacheMock = $this->getLanguageCacheMock(); $cacheIdentifierGeneratorMock = $this->getCacheIdentifierGeneratorMock(); - $cacheIdentifierGeneratorMock->expects($this->once()) + $cacheIdentifierGeneratorMock->expects(self::once()) ->method('generateKey') ->with('language', [2], true) ->willReturn('ibx-la-2'); - $cacheMock->expects($this->once()) + $cacheMock->expects(self::once()) ->method('get') - ->with($this->equalTo('ibx-la-2')) + ->with(self::equalTo('ibx-la-2')) ->willReturn($this->getLanguageFixture()); $result = $handler->load(2); - $this->assertEquals( + self::assertEquals( $this->getLanguageFixture(), $result ); @@ -149,21 +150,21 @@ public function testLoadFailure() $innerHandlerMock = $this->getInnerLanguageHandlerMock(); $cacheIdentifierGeneratorMock = $this->getCacheIdentifierGeneratorMock(); - $cacheIdentifierGeneratorMock->expects($this->once()) + $cacheIdentifierGeneratorMock->expects(self::once()) ->method('generateKey') ->with('language', [2], true) ->willReturn('ibx-la-2'); - $cacheMock->expects($this->once()) + $cacheMock->expects(self::once()) ->method('get') - ->with($this->equalTo('ibx-la-2')) + ->with(self::equalTo('ibx-la-2')) ->willReturn(null); - $innerHandlerMock->expects($this->once()) + $innerHandlerMock->expects(self::once()) ->method('load') - ->with($this->equalTo(2)) + ->with(self::equalTo(2)) ->will( - $this->throwException( + self::throwException( new NotFoundException('Language', 2) ) ); @@ -178,19 +179,19 @@ public function testLoadByLanguageCode() $cacheMock = $this->getLanguageCacheMock(); $cacheIdentifierGeneratorMock = $this->getCacheIdentifierGeneratorMock(); - $cacheIdentifierGeneratorMock->expects($this->once()) + $cacheIdentifierGeneratorMock->expects(self::once()) ->method('generateKey') ->with('language_code', ['eng-US'], true) ->willReturn('ibx-lac-eng-US'); - $cacheMock->expects($this->once()) + $cacheMock->expects(self::once()) ->method('get') - ->with($this->equalTo('ibx-lac-eng-US')) + ->with(self::equalTo('ibx-lac-eng-US')) ->willReturn($this->getLanguageFixture()); $result = $handler->loadByLanguageCode('eng-US'); - $this->assertEquals( + self::assertEquals( $this->getLanguageFixture(), $result ); @@ -203,21 +204,21 @@ public function testLoadByLanguageCodeFailure() $innerHandlerMock = $this->getInnerLanguageHandlerMock(); $cacheIdentifierGeneratorMock = $this->getCacheIdentifierGeneratorMock(); - $cacheIdentifierGeneratorMock->expects($this->once()) + $cacheIdentifierGeneratorMock->expects(self::once()) ->method('generateKey') ->with('language_code', ['eng-US'], true) ->willReturn('ibx-lac-eng-US'); - $cacheMock->expects($this->once()) + $cacheMock->expects(self::once()) ->method('get') - ->with($this->equalTo('ibx-lac-eng-US')) + ->with(self::equalTo('ibx-lac-eng-US')) ->willReturn(null); - $innerHandlerMock->expects($this->once()) + $innerHandlerMock->expects(self::once()) ->method('loadByLanguageCode') - ->with($this->equalTo('eng-US')) + ->with(self::equalTo('eng-US')) ->will( - $this->throwException( + self::throwException( new NotFoundException('Language', 2) ) ); @@ -232,19 +233,19 @@ public function testLoadAll() $cacheMock = $this->getLanguageCacheMock(); $cacheIdentifierGeneratorMock = $this->getCacheIdentifierGeneratorMock(); - $cacheIdentifierGeneratorMock->expects($this->once()) + $cacheIdentifierGeneratorMock->expects(self::once()) ->method('generateKey') ->with('language_list', [], true) ->willReturn('ibx-lal'); - $cacheMock->expects($this->once()) + $cacheMock->expects(self::once()) ->method('get') - ->with($this->equalTo('ibx-lal')) + ->with(self::equalTo('ibx-lal')) ->willReturn([]); $result = $handler->loadAll(); - $this->assertIsArray($result); + self::assertIsArray($result); } public function testDelete() @@ -254,7 +255,7 @@ public function testDelete() $innerHandlerMock = $this->getInnerLanguageHandlerMock(); $cacheIdentifierGeneratorMock = $this->getCacheIdentifierGeneratorMock(); - $cacheIdentifierGeneratorMock->expects($this->exactly(2)) + $cacheIdentifierGeneratorMock->expects(self::exactly(2)) ->method('generateKey') ->withConsecutive( ['language', [2], true], @@ -265,13 +266,13 @@ public function testDelete() 'ibx-lal' ); - $innerHandlerMock->expects($this->once()) + $innerHandlerMock->expects(self::once()) ->method('delete') - ->with($this->equalTo(2)); + ->with(self::equalTo(2)); - $cacheMock->expects($this->once()) + $cacheMock->expects(self::once()) ->method('deleteMulti') - ->with($this->equalTo(['ibx-la-2', 'ibx-lal'])); + ->with(self::equalTo(['ibx-la-2', 'ibx-lal'])); $handler->delete(2); } diff --git a/tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php index 37f9fdfa68..18a0745318 100644 --- a/tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Language\Gateway; use Ibexa\Contracts\Core\Persistence\Content\Language; @@ -103,7 +104,7 @@ public function testLoadLanguageListData() $result = $gateway->loadLanguageListData([2]); - $this->assertEquals( + self::assertEquals( [ [ 'id' => '2', @@ -122,7 +123,7 @@ public function testLoadAllLanguagesData() $result = $gateway->loadAllLanguagesData(); - $this->assertEquals( + self::assertEquals( [ [ 'id' => '2', diff --git a/tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php b/tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php index 764f54b114..e2a268bf32 100644 --- a/tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Language; use Ibexa\Contracts\Core\Persistence\Content\Language; @@ -45,32 +46,32 @@ public function testCreate() $handler = $this->getLanguageHandler(); $mapperMock = $this->getMapperMock(); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('createLanguageFromCreateStruct') ->with( - $this->isInstanceOf( + self::isInstanceOf( SPILanguageCreateStruct::class ) - )->will($this->returnValue(new Language())); + )->will(self::returnValue(new Language())); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('insertLanguage') ->with( - $this->isInstanceOf( + self::isInstanceOf( Language::class ) - )->will($this->returnValue(2)); + )->will(self::returnValue(2)); $createStruct = $this->getCreateStructFixture(); $result = $handler->create($createStruct); - $this->assertInstanceOf( + self::assertInstanceOf( Language::class, $result ); - $this->assertEquals( + self::assertEquals( 2, $result->id ); @@ -91,9 +92,9 @@ public function testUpdate() $handler = $this->getLanguageHandler(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('updateLanguage') - ->with($this->isInstanceOf(Language::class)); + ->with(self::isInstanceOf(Language::class)); $handler->update($this->getLanguageFixture()); } @@ -114,19 +115,19 @@ public function testLoad() $mapperMock = $this->getMapperMock(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadLanguageListData') - ->with($this->equalTo([2])) - ->will($this->returnValue([])); + ->with(self::equalTo([2])) + ->will(self::returnValue([])); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('extractLanguagesFromRows') - ->with($this->equalTo([])) - ->will($this->returnValue([new Language()])); + ->with(self::equalTo([])) + ->will(self::returnValue([new Language()])); $result = $handler->load(2); - $this->assertInstanceOf( + self::assertInstanceOf( Language::class, $result ); @@ -140,16 +141,16 @@ public function testLoadFailure() $mapperMock = $this->getMapperMock(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadLanguageListData') - ->with($this->equalTo([2])) - ->will($this->returnValue([])); + ->with(self::equalTo([2])) + ->will(self::returnValue([])); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('extractLanguagesFromRows') - ->with($this->equalTo([])) + ->with(self::equalTo([])) // No language extracted - ->will($this->returnValue([])); + ->will(self::returnValue([])); $result = $handler->load(2); } @@ -160,19 +161,19 @@ public function testLoadByLanguageCode() $mapperMock = $this->getMapperMock(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadLanguageListDataByLanguageCode') - ->with($this->equalTo(['eng-US'])) - ->will($this->returnValue([])); + ->with(self::equalTo(['eng-US'])) + ->will(self::returnValue([])); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('extractLanguagesFromRows') - ->with($this->equalTo([])) - ->will($this->returnValue([new Language()])); + ->with(self::equalTo([])) + ->will(self::returnValue([new Language()])); $result = $handler->loadByLanguageCode('eng-US'); - $this->assertInstanceOf( + self::assertInstanceOf( Language::class, $result ); @@ -186,16 +187,16 @@ public function testLoadByLanguageCodeFailure() $mapperMock = $this->getMapperMock(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadLanguageListDataByLanguageCode') - ->with($this->equalTo(['eng-US'])) - ->will($this->returnValue([])); + ->with(self::equalTo(['eng-US'])) + ->will(self::returnValue([])); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('extractLanguagesFromRows') - ->with($this->equalTo([])) + ->with(self::equalTo([])) // No language extracted - ->will($this->returnValue([])); + ->will(self::returnValue([])); $result = $handler->loadByLanguageCode('eng-US'); } @@ -206,18 +207,18 @@ public function testLoadAll() $mapperMock = $this->getMapperMock(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadAllLanguagesData') - ->will($this->returnValue([])); + ->will(self::returnValue([])); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('extractLanguagesFromRows') - ->with($this->equalTo([])) - ->will($this->returnValue([new Language()])); + ->with(self::equalTo([])) + ->will(self::returnValue([new Language()])); $result = $handler->loadAll(); - $this->assertIsArray( + self::assertIsArray( $result ); } @@ -227,13 +228,13 @@ public function testDeleteSuccess() $handler = $this->getLanguageHandler(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('canDeleteLanguage') - ->with($this->equalTo(2)) - ->will($this->returnValue(true)); - $gatewayMock->expects($this->once()) + ->with(self::equalTo(2)) + ->will(self::returnValue(true)); + $gatewayMock->expects(self::once()) ->method('deleteLanguage') - ->with($this->equalTo(2)); + ->with(self::equalTo(2)); $result = $handler->delete(2); } @@ -245,11 +246,11 @@ public function testDeleteFail() $handler = $this->getLanguageHandler(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('canDeleteLanguage') - ->with($this->equalTo(2)) - ->will($this->returnValue(false)); - $gatewayMock->expects($this->never()) + ->with(self::equalTo(2)) + ->will(self::returnValue(false)); + $gatewayMock->expects(self::never()) ->method('deleteLanguage'); $result = $handler->delete(2); diff --git a/tests/lib/Persistence/Legacy/Content/Language/MapperTest.php b/tests/lib/Persistence/Legacy/Content/Language/MapperTest.php index f9724dd435..6f235492d8 100644 --- a/tests/lib/Persistence/Legacy/Content/Language/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/Language/MapperTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Language; use Ibexa\Contracts\Core\Persistence\Content\Language; @@ -39,7 +40,7 @@ public function testExtractLanguagesFromRows() $result = $mapper->extractLanguagesFromRows($rows); - $this->assertEquals( + self::assertEquals( $this->getExtractReference(), $result ); diff --git a/tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php b/tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php index 5f94935f24..b6c78d1404 100644 --- a/tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php +++ b/tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Language; use Ibexa\Contracts\Core\Persistence\Content\Language; @@ -23,7 +24,7 @@ public function testGenerateLanguageMask(array $languages, $expectedMask) { $generator = $this->getMaskGenerator(); - $this->assertSame( + self::assertSame( $expectedMask, $generator->generateLanguageMask($languages) ); @@ -33,7 +34,6 @@ public function testGenerateLanguageMask(array $languages, $expectedMask) * @param array $languages * @param int $expectedMask * - * * @dataProvider getLanguageMaskData */ public function testGenerateLanguageMaskFromLanguagesCodes(array $languages, $expectedMask) @@ -47,7 +47,7 @@ public function testGenerateLanguageMaskFromLanguagesCodes(array $languages, $ex $isAlwaysAvailable = false; } - $this->assertSame( + self::assertSame( $expectedMask, $generator->generateLanguageMaskFromLanguageCodes(array_keys($languages), $isAlwaysAvailable) ); @@ -98,7 +98,7 @@ public function testGenerateLanguageIndicator( ) { $generator = $this->getMaskGenerator(); - $this->assertSame( + self::assertSame( $expectedIndicator, $generator->generateLanguageIndicator($languageCode, $alwaysAvailable) ); @@ -129,7 +129,7 @@ public function testIsLanguageAlwaysAvailable() { $generator = $this->getMaskGenerator(); - $this->assertTrue( + self::assertTrue( $generator->isLanguageAlwaysAvailable( 'eng-GB', [ @@ -144,7 +144,7 @@ public function testIsLanguageAlwaysAvailableOtherLanguage() { $generator = $this->getMaskGenerator(); - $this->assertFalse( + self::assertFalse( $generator->isLanguageAlwaysAvailable( 'eng-GB', [ @@ -159,7 +159,7 @@ public function testIsLanguageAlwaysAvailableNoDefault() { $generator = $this->getMaskGenerator(); - $this->assertFalse( + self::assertFalse( $generator->isLanguageAlwaysAvailable( 'eng-GB', [ @@ -275,10 +275,10 @@ protected function getLanguageHandler() { if (!isset($this->languageHandler)) { $this->languageHandler = $this->createMock(LanguageHandler::class); - $this->languageHandler->expects($this->any()) - ->method($this->anything())// loadByLanguageCode && loadListByLanguageCodes + $this->languageHandler->expects(self::any()) + ->method(self::anything())// loadByLanguageCode && loadListByLanguageCodes ->will( - $this->returnCallback( + self::returnCallback( static function ($languageCodes) { if (is_string($languageCodes)) { $language = $languageCodes; diff --git a/tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php b/tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php index 02d95b6425..5c40b767b8 100644 --- a/tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php +++ b/tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content; use Ibexa\Core\Persistence; diff --git a/tests/lib/Persistence/Legacy/Content/LanguageHandlerMock.php b/tests/lib/Persistence/Legacy/Content/LanguageHandlerMock.php index 5b37fbec5e..dd876c8c49 100644 --- a/tests/lib/Persistence/Legacy/Content/LanguageHandlerMock.php +++ b/tests/lib/Persistence/Legacy/Content/LanguageHandlerMock.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content; use Ibexa\Contracts\Core\Persistence\Content\Language; diff --git a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php index 789530d83d..6f88ba8adc 100644 --- a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Location\Gateway; use Doctrine\DBAL\FetchMode; @@ -126,7 +127,7 @@ public function testLoadParentLocationDataForDraftContentAll() $locationsData = $gateway->loadParentLocationsDataForDraftContent(226); - $this->assertCount(1, $locationsData); + self::assertCount(1, $locationsData); $locationRow = reset($locationsData); @@ -141,7 +142,7 @@ public function testLoadLocationDataByContentLimitSubtree() $locationsData = $gateway->loadLocationDataByContent(75, 3); - $this->assertCount(0, $locationsData); + self::assertCount(0, $locationsData); } public function testMoveSubtreePathUpdate() @@ -613,12 +614,13 @@ public static function getCreateLocationValues() /** * @depends testCreateLocation + * * @dataProvider getCreateLocationValues */ public function testCreateLocationValues($field, $value) { if ($value === null) { - $this->markTestIncomplete('Proper value setting yet unknown.'); + self::markTestIncomplete('Proper value setting yet unknown.'); } $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); @@ -672,12 +674,13 @@ public static function getCreateLocationReturnValues() /** * @depends testCreateLocation + * * @dataProvider getCreateLocationReturnValues */ public function testCreateLocationReturnValues($field, $value) { if ($value === null) { - $this->markTestIncomplete('Proper value setting yet unknown.'); + self::markTestIncomplete('Proper value setting yet unknown.'); } $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); @@ -701,8 +704,8 @@ public function testCreateLocationReturnValues($field, $value) ] ); - $this->assertTrue($location instanceof Location); - $this->assertEquals($value, $location->$field); + self::assertTrue($location instanceof Location); + self::assertEquals($value, $location->$field); } public static function getUpdateLocationData() @@ -821,6 +824,7 @@ private function buildContentTreeSelectContentWithParentQuery( /** * @depends testCreateLocation + * * @dataProvider getNodeAssignmentValues * * @param string $field @@ -994,6 +998,7 @@ public static function getConvertNodeAssignmentsLocationValues() /** * @depends testCreateLocationNodeAssignmentCreation + * * @dataProvider getConvertNodeAssignmentsLocationValues */ public function testConvertNodeAssignments($field, $value) @@ -1044,7 +1049,7 @@ public function testConvertNodeAssignments($field, $value) if ($field === 'modified_subnode') { $statement = $query->execute(); $result = $statement->fetch(FetchMode::ASSOCIATIVE); - $this->assertGreaterThanOrEqual($value, $result); + self::assertGreaterThanOrEqual($value, $result); } else { $this->assertQueryResult( [[$value]], @@ -1369,11 +1374,11 @@ public function testGetChildren() $gateway = $this->getLocationGateway(); $childrenRows = $gateway->getChildren(213); - $this->assertCount(2, $childrenRows); - $this->assertCount(16, $childrenRows[0]); - $this->assertEquals(214, $childrenRows[0]['node_id']); - $this->assertCount(16, $childrenRows[1]); - $this->assertEquals(215, $childrenRows[1]['node_id']); + self::assertCount(2, $childrenRows); + self::assertCount(16, $childrenRows[0]); + self::assertEquals(214, $childrenRows[0]['node_id']); + self::assertCount(16, $childrenRows[1]); + self::assertEquals(215, $childrenRows[1]['node_id']); } /** @@ -1418,9 +1423,9 @@ public function testGetFallbackMainNodeData(): void $gateway = $this->getLocationGateway(); $data = $gateway->getFallbackMainNodeData(12, 13); - $this->assertEquals(228, $data['node_id']); - $this->assertEquals(1, $data['contentobject_version']); - $this->assertEquals(227, $data['parent_node_id']); + self::assertEquals(228, $data['node_id']); + self::assertEquals(1, $data['contentobject_version']); + self::assertEquals(227, $data['parent_node_id']); } /** @@ -1435,7 +1440,7 @@ public function testRemoveLocation() try { $gateway->getBasicNodeData(13); - $this->fail('Location was not deleted!'); + self::fail('Location was not deleted!'); } catch (NotFoundException $e) { // Do nothing } diff --git a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php index 322dfacd79..2bfa74636f 100644 --- a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php +++ b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Location\Gateway; use Doctrine\DBAL\ParameterType; @@ -193,7 +194,7 @@ public function testLoadTrashByLocationId($field, $value) $data = $handler->loadTrashByLocation(71); - $this->assertEquals( + self::assertEquals( $value, $data[$field], "Value in property $field not as expected." @@ -205,14 +206,14 @@ public function testCountTrashed() $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $handler = $this->getLocationGateway(); - $this->assertEquals( + self::assertEquals( 0, $handler->countTrashed() ); $this->trashSubtree(); - $this->assertEquals( + self::assertEquals( 8, $handler->countTrashed() ); @@ -223,7 +224,7 @@ public function testListEmptyTrash() $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $handler = $this->getLocationGateway(); - $this->assertEquals( + self::assertEquals( [], $handler->listTrashed(0, null, []) ); @@ -248,7 +249,7 @@ public function testListFullTrash() $handler = $this->getLocationGateway(); $this->trashSubtree(); - $this->assertCount( + self::assertCount( 8, $handler->listTrashed(0, null, []) ); @@ -260,7 +261,7 @@ public function testListTrashLimited() $handler = $this->getLocationGateway(); $this->trashSubtree(); - $this->assertCount( + self::assertCount( 5, $handler->listTrashed(0, 5, []) ); @@ -297,7 +298,7 @@ public function testListTrashItem($key, $value) $this->trashSubtree(); $trashList = $handler->listTrashed(0, 1, []); - $this->assertEquals($value, $trashList[0][$key]); + self::assertEquals($value, $trashList[0][$key]); } public function testListTrashSortedPathStringDesc() @@ -306,7 +307,7 @@ public function testListTrashSortedPathStringDesc() $handler = $this->getLocationGateway(); $this->trashSubtree(); - $this->assertEquals( + self::assertEquals( [ '/1/2/69/76/', '/1/2/69/72/75/', @@ -338,7 +339,7 @@ public function testListTrashSortedDepth() $handler = $this->getLocationGateway(); $this->trashSubtree(); - $this->assertEquals( + self::assertEquals( [ '/1/2/69/', '/1/2/69/76/', diff --git a/tests/lib/Persistence/Legacy/Content/Location/MapperTest.php b/tests/lib/Persistence/Legacy/Content/Location/MapperTest.php index e242ed5619..8327cab05a 100644 --- a/tests/lib/Persistence/Legacy/Content/Location/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/Location/MapperTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Location; use Ibexa\Contracts\Core\Persistence\Content\Location as SPILocation; @@ -103,9 +104,9 @@ public function testCreateLocationsFromRows() $locations = $mapper->createLocationsFromRows($inputRows); - $this->assertCount(3, $locations); + self::assertCount(3, $locations); foreach ($locations as $location) { - $this->assertInstanceOf( + self::assertInstanceOf( SPILocation::class, $location ); @@ -122,7 +123,7 @@ public function testCreateTrashedFromRow() new Trashed() ); - $this->assertTrue($location instanceof Trashed); + self::assertTrue($location instanceof Trashed); $this->assertPropertiesCorrect( $this->locationValues, $location @@ -156,7 +157,7 @@ public function testGetLocationCreateStruct() $this->locationRow ); - $this->assertNotEquals($this->locationRow['remote_id'], $createStruct->remoteId); + self::assertNotEquals($this->locationRow['remote_id'], $createStruct->remoteId); $this->assertPropertiesCorrect( $this->locationCreateStructValues, $createStruct diff --git a/tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php b/tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php index 1dd78d7b72..a50140801d 100644 --- a/tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Location; use Ibexa\Contracts\Core\Persistence\Content\Location\Trash\TrashResult; @@ -62,11 +63,11 @@ public function testTrashSubtree() $handler = $this->getTrashHandler(); $this->locationGateway - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('getSubtreeContent') ->with(20) ->will( - $this->returnValue( + self::returnValue( [ [ 'contentobject_id' => 10, @@ -85,43 +86,43 @@ public function testTrashSubtree() ); $this->locationGateway - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('countLocationsByContentId') ->with(10) - ->will($this->returnValue(1)); + ->will(self::returnValue(1)); $this->locationGateway - ->expects($this->at(2)) + ->expects(self::at(2)) ->method('trashLocation') ->with(20); $this->locationGateway - ->expects($this->at(3)) + ->expects(self::at(3)) ->method('countLocationsByContentId') ->with(11) - ->will($this->returnValue(2)); + ->will(self::returnValue(2)); $this->locationGateway - ->expects($this->at(4)) + ->expects(self::at(4)) ->method('removeLocation') ->with(21); $this->locationHandler - ->expects($this->once()) + ->expects(self::once()) ->method('markSubtreeModified') ->with(40); $this->locationGateway - ->expects($this->at(5)) + ->expects(self::at(5)) ->method('loadTrashByLocation') ->with(20) - ->will($this->returnValue($array = ['data…'])); + ->will(self::returnValue($array = ['data…'])); $this->locationMapper - ->expects($this->once()) + ->expects(self::once()) ->method('createLocationFromRow') ->with($array, null, new Trashed()) - ->will($this->returnValue(new Trashed(['id' => 20]))); + ->will(self::returnValue(new Trashed(['id' => 20]))); $trashedObject = $handler->trashSubtree(20); self::assertInstanceOf(Trashed::class, $trashedObject); @@ -133,11 +134,11 @@ public function testTrashSubtreeReturnsNull() $handler = $this->getTrashHandler(); $this->locationGateway - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('getSubtreeContent') ->with(20) ->will( - $this->returnValue( + self::returnValue( [ [ 'contentobject_id' => 10, @@ -156,29 +157,29 @@ public function testTrashSubtreeReturnsNull() ); $this->locationGateway - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('countLocationsByContentId') ->with(10) - ->will($this->returnValue(2)); + ->will(self::returnValue(2)); $this->locationGateway - ->expects($this->at(2)) + ->expects(self::at(2)) ->method('removeLocation') ->with(20); $this->locationGateway - ->expects($this->at(3)) + ->expects(self::at(3)) ->method('countLocationsByContentId') ->with(11) - ->will($this->returnValue(1)); + ->will(self::returnValue(1)); $this->locationGateway - ->expects($this->at(4)) + ->expects(self::at(4)) ->method('trashLocation') ->with(21); $this->locationHandler - ->expects($this->once()) + ->expects(self::once()) ->method('markSubtreeModified') ->with(40); @@ -191,11 +192,11 @@ public function testTrashSubtreeUpdatesMainLocation() $handler = $this->getTrashHandler(); $this->locationGateway - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('getSubtreeContent') ->with(20) ->will( - $this->returnValue( + self::returnValue( [ [ 'contentobject_id' => 10, @@ -214,33 +215,33 @@ public function testTrashSubtreeUpdatesMainLocation() ); $this->locationGateway - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('countLocationsByContentId') ->with(10) - ->will($this->returnValue(1)); + ->will(self::returnValue(1)); $this->locationGateway - ->expects($this->at(2)) + ->expects(self::at(2)) ->method('trashLocation') ->with(20); $this->locationGateway - ->expects($this->at(3)) + ->expects(self::at(3)) ->method('countLocationsByContentId') ->with(11) - ->will($this->returnValue(2)); + ->will(self::returnValue(2)); $this->locationGateway - ->expects($this->at(4)) + ->expects(self::at(4)) ->method('removeLocation') ->with(21); $this->locationGateway - ->expects($this->at(5)) + ->expects(self::at(5)) ->method('getFallbackMainNodeData') ->with(11, 21) ->will( - $this->returnValue( + self::returnValue( [ 'node_id' => 100, 'contentobject_version' => 101, @@ -250,26 +251,26 @@ public function testTrashSubtreeUpdatesMainLocation() ); $this->locationHandler - ->expects($this->once()) + ->expects(self::once()) ->method('changeMainLocation') ->with(11, 100, 101, 102); $this->locationHandler - ->expects($this->once()) + ->expects(self::once()) ->method('markSubtreeModified') ->with(40); $this->locationGateway - ->expects($this->at(6)) + ->expects(self::at(6)) ->method('loadTrashByLocation') ->with(20) - ->will($this->returnValue($array = ['data…'])); + ->will(self::returnValue($array = ['data…'])); $this->locationMapper - ->expects($this->once()) + ->expects(self::once()) ->method('createLocationFromRow') ->with($array, null, new Trashed()) - ->will($this->returnValue(new Trashed(['id' => 20]))); + ->will(self::returnValue(new Trashed(['id' => 20]))); $trashedObject = $handler->trashSubtree(20); self::assertInstanceOf(Trashed::class, $trashedObject); @@ -281,11 +282,11 @@ public function testRecover() $handler = $this->getTrashHandler(); $this->locationGateway - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('untrashLocation') ->with(69, 23) ->will( - $this->returnValue( + self::returnValue( new Trashed(['id' => 70]) ) ); @@ -298,13 +299,13 @@ public function testLoadTrashItem() $handler = $this->getTrashHandler(); $this->locationGateway - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('loadTrashByLocation') ->with(69) - ->will($this->returnValue($array = ['data…'])); + ->will(self::returnValue($array = ['data…'])); $this->locationMapper - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('createLocationFromRow') ->with($array, null, new Trashed()); @@ -467,11 +468,11 @@ public function testDeleteTrashItemStillHaveLocations() $trashItemId = 69; $contentId = 67; $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('loadTrashByLocation') ->with($trashItemId) ->will( - $this->returnValue( + self::returnValue( [ 'node_id' => $trashItemId, 'contentobject_id' => $contentId, @@ -481,10 +482,10 @@ public function testDeleteTrashItemStillHaveLocations() ); $this->locationMapper - ->expects($this->once()) + ->expects(self::once()) ->method('createLocationFromRow') ->will( - $this->returnValue( + self::returnValue( new Trashed( [ 'id' => $trashItemId, @@ -496,26 +497,26 @@ public function testDeleteTrashItemStillHaveLocations() ); $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('removeElementFromTrash') ->with($trashItemId); $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('countLocationsByContentId') ->with($contentId) - ->will($this->returnValue(1)); + ->will(self::returnValue(1)); $this->contentHandler - ->expects($this->never()) + ->expects(self::never()) ->method('deleteContent'); $trashItemDeleteResult = $handler->deleteTrashItem($trashItemId); - $this->assertInstanceOf(TrashItemDeleteResult::class, $trashItemDeleteResult); - $this->assertEquals($trashItemId, $trashItemDeleteResult->trashItemId); - $this->assertEquals($contentId, $trashItemDeleteResult->contentId); - $this->assertFalse($trashItemDeleteResult->contentRemoved); + self::assertInstanceOf(TrashItemDeleteResult::class, $trashItemDeleteResult); + self::assertEquals($trashItemId, $trashItemDeleteResult->trashItemId); + self::assertEquals($contentId, $trashItemDeleteResult->contentId); + self::assertFalse($trashItemDeleteResult->contentRemoved); } public function testFindTrashItemsWhenEmpty() @@ -523,26 +524,26 @@ public function testFindTrashItemsWhenEmpty() $handler = $this->getTrashHandler(); $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('countTrashed') ->willReturn(0); $this->locationGateway - ->expects($this->never()) + ->expects(self::never()) ->method('listTrashed'); $this->locationMapper - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $trashResult = $handler->findTrashItems(); - $this->assertInstanceOf(TrashResult::class, $trashResult); - $this->assertEquals(0, $trashResult->totalCount); - $this->assertIsArray($trashResult->items); - $this->assertEmpty($trashResult->items); - $this->assertIsIterable($trashResult); - $this->assertCount(0, $trashResult);// Can't assert as empty, however we can count it. + self::assertInstanceOf(TrashResult::class, $trashResult); + self::assertEquals(0, $trashResult->totalCount); + self::assertIsArray($trashResult->items); + self::assertEmpty($trashResult->items); + self::assertIsIterable($trashResult); + self::assertCount(0, $trashResult);// Can't assert as empty, however we can count it. } public function testFindTrashItemsWithLimits() @@ -550,30 +551,30 @@ public function testFindTrashItemsWithLimits() $handler = $this->getTrashHandler(); $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('countTrashed') ->willReturn(2); $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('listTrashed') ->with(1, 1, null) ->willReturn([['fake data']]); $this->locationMapper - ->expects($this->once()) + ->expects(self::once()) ->method('createLocationFromRow') ->with(['fake data']) ->willReturn(new \stdClass()); $trashResult = $handler->findTrashItems(null, 1, 1); - $this->assertInstanceOf(TrashResult::class, $trashResult); - $this->assertEquals(2, $trashResult->totalCount); - $this->assertIsArray($trashResult->items); - $this->assertCount(1, $trashResult->items); - $this->assertIsIterable($trashResult); - $this->assertCount(1, $trashResult); + self::assertInstanceOf(TrashResult::class, $trashResult); + self::assertEquals(2, $trashResult->totalCount); + self::assertIsArray($trashResult->items); + self::assertCount(1, $trashResult->items); + self::assertIsIterable($trashResult); + self::assertCount(1, $trashResult); } } diff --git a/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php b/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php index 6b971543cc..acadd29f66 100644 --- a/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content; use Ibexa\Contracts\Core\Persistence\Content; @@ -89,7 +90,7 @@ public function testLoadLocation() $handler = $this->getLocationHandler(); $this->treeHandler - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') ->with(77) ->willReturn(new Location()); @@ -102,11 +103,11 @@ public function testLoadLocation() public function testLoadLocationSubtree() { $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('getSubtreeContent') ->with(77, true) ->will( - $this->returnValue( + self::returnValue( [ [77 => 100], [78 => 101], @@ -114,7 +115,7 @@ public function testLoadLocationSubtree() ) ); - $this->assertCount(2, $this->getLocationHandler()->loadSubtreeIds(77)); + self::assertCount(2, $this->getLocationHandler()->loadSubtreeIds(77)); } public function testLoadLocationByRemoteId() @@ -122,7 +123,7 @@ public function testLoadLocationByRemoteId() $handler = $this->getLocationHandler(); $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('getBasicNodeDataByRemoteId') ->with('abc123') ->willReturn( @@ -132,7 +133,7 @@ public function testLoadLocationByRemoteId() ); $this->locationMapper - ->expects($this->once()) + ->expects(self::once()) ->method('createLocationFromRow') ->with(['node_id' => 77]) ->willReturn(new Location()); @@ -147,24 +148,24 @@ public function testLoadLocationsByContent() $handler = $this->getLocationHandler(); $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocationDataByContent') ->with(23, 42) ->will( - $this->returnValue( + self::returnValue( [] ) ); $this->locationMapper - ->expects($this->once()) + ->expects(self::once()) ->method('createLocationsFromRows') ->with([]) - ->will($this->returnValue(['a', 'b'])); + ->will(self::returnValue(['a', 'b'])); $locations = $handler->loadLocationsByContent(23, 42); - $this->assertIsArray($locations); + self::assertIsArray($locations); } public function loadParentLocationsForDraftContent() @@ -172,24 +173,24 @@ public function loadParentLocationsForDraftContent() $handler = $this->getLocationHandler(); $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('loadParentLocationsDataForDraftContent') ->with(23) ->will( - $this->returnValue( + self::returnValue( [] ) ); $this->locationMapper - ->expects($this->once()) + ->expects(self::once()) ->method('createLocationsFromRows') ->with([]) - ->will($this->returnValue(['a', 'b'])); + ->will(self::returnValue(['a', 'b'])); $locations = $handler->loadParentLocationsForDraftContent(23); - $this->assertIsArray($locations); + self::assertIsArray($locations); } public function testMoveSubtree() @@ -203,10 +204,10 @@ public function testMoveSubtree() 'contentobject_id' => 67, ]; $this->locationGateway - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('getBasicNodeData') ->with(69) - ->will($this->returnValue($sourceData)); + ->will(self::returnValue($sourceData)); $destinationData = [ 'node_id' => 77, @@ -214,26 +215,26 @@ public function testMoveSubtree() 'contentobject_id' => 68, ]; $this->locationGateway - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('getBasicNodeData') ->with(77) - ->will($this->returnValue($destinationData)); + ->will(self::returnValue($destinationData)); $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('moveSubtreeNodes') ->with($sourceData, $destinationData); $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('updateNodeAssignment') ->with(67, 2, 77, 5); $this->treeHandler - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('loadLocation') ->with($sourceData['node_id']) - ->will($this->returnValue( + ->will(self::returnValue( new Location( [ 'id' => $sourceData['node_id'], @@ -243,25 +244,25 @@ public function testMoveSubtree() )); $this->treeHandler - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('loadLocation') ->with($destinationData['node_id']) - ->will($this->returnValue(new Location(['contentId' => $destinationData['contentobject_id']]))); + ->will(self::returnValue(new Location(['contentId' => $destinationData['contentobject_id']]))); $this->contentHandler - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('loadContentInfo') ->with($destinationData['contentobject_id']) - ->will($this->returnValue(new ContentInfo(['sectionId' => 12345]))); + ->will(self::returnValue(new ContentInfo(['sectionId' => 12345]))); $this->contentHandler - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('loadContentInfo') ->with($sourceData['contentobject_id']) - ->will($this->returnValue(new ContentInfo(['mainLocationId' => 69]))); + ->will(self::returnValue(new ContentInfo(['mainLocationId' => 69]))); $this->treeHandler - ->expects($this->once()) + ->expects(self::once()) ->method('setSectionForSubtree') ->with(69, 12345); @@ -273,11 +274,11 @@ public function testHideUpdateHidden() $handler = $this->getLocationHandler(); $this->locationGateway - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('getBasicNodeData') ->with(69) ->will( - $this->returnValue( + self::returnValue( [ 'node_id' => 69, 'path_string' => '/1/2/69/', @@ -287,7 +288,7 @@ public function testHideUpdateHidden() ); $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('hideSubtree') ->with('/1/2/69/'); @@ -302,11 +303,11 @@ public function testHideUnhideUpdateHidden() $handler = $this->getLocationHandler(); $this->locationGateway - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('getBasicNodeData') ->with(69) ->will( - $this->returnValue( + self::returnValue( [ 'node_id' => 69, 'path_string' => '/1/2/69/', @@ -316,7 +317,7 @@ public function testHideUnhideUpdateHidden() ); $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('unhideSubtree') ->with('/1/2/69/'); @@ -328,7 +329,7 @@ public function testSwapLocations() $handler = $this->getLocationHandler(); $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('swap') ->with(70, 78); @@ -347,11 +348,11 @@ public function testCreateLocation() $spiLocation->pathString = '/1/2/77/78/'; $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('getBasicNodeData') ->with(77) ->will( - $this->returnValue( + self::returnValue( $parentInfo = [ 'node_id' => 77, 'path_string' => '/1/2/77/', @@ -360,13 +361,13 @@ public function testCreateLocation() ); $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('create') ->with($createStruct, $parentInfo) - ->will($this->returnValue($spiLocation)); + ->will(self::returnValue($spiLocation)); $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('createNodeAssignment') ->with($createStruct, 77, 2); @@ -381,7 +382,7 @@ public function testUpdateLocation() $updateStruct->priority = 77; $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('update') ->with($updateStruct, 23); @@ -393,7 +394,7 @@ public function testSetSectionForSubtree() $handler = $this->getLocationHandler(); $this->treeHandler - ->expects($this->once()) + ->expects(self::once()) ->method('setSectionForSubtree') ->with(69, 3); @@ -405,11 +406,11 @@ public function testMarkSubtreeModified() $handler = $this->getLocationHandler(); $this->locationGateway - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('getBasicNodeData') ->with(69) ->will( - $this->returnValue( + self::returnValue( [ 'node_id' => 69, 'path_string' => '/1/2/69/', @@ -419,7 +420,7 @@ public function testMarkSubtreeModified() ); $this->locationGateway - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('updateSubtreeModificationTime') ->with('/1/2/69/'); @@ -431,7 +432,7 @@ public function testChangeMainLocation() $handler = $this->getLocationHandler(); $this->treeHandler - ->expects($this->once()) + ->expects(self::once()) ->method('changeMainLocation') ->with(12, 34); @@ -446,7 +447,7 @@ public function testRemoveSubtree() $handler = $this->getLocationHandler(); $this->treeHandler - ->expects($this->once()) + ->expects(self::once()) ->method('removeSubtree') ->with(42); @@ -481,43 +482,43 @@ public function testCopySubtree() $offset = 1000; $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('getSubtreeContent') ->with($subtreeContentRows[0]['node_id']) - ->will($this->returnValue($subtreeContentRows)); + ->will(self::returnValue($subtreeContentRows)); $this->locationGateway - ->expects($this->once()) + ->expects(self::once()) ->method('getBasicNodeData') ->with($destinationData['node_id']) - ->will($this->returnValue($destinationData)); + ->will(self::returnValue($destinationData)); $objectStateHandlerCall = 0; - $this->objectStateHandler->expects($this->at($objectStateHandlerCall++)) + $this->objectStateHandler->expects(self::at($objectStateHandlerCall++)) ->method('loadAllGroups') ->will( - $this->returnValue( + self::returnValue( [ new ObjectStateGroup(['id' => 10]), new ObjectStateGroup(['id' => 20]), ] ) ); - $this->objectStateHandler->expects($this->at($objectStateHandlerCall++)) + $this->objectStateHandler->expects(self::at($objectStateHandlerCall++)) ->method('loadObjectStates') - ->with($this->equalTo(10)) + ->with(self::equalTo(10)) ->will( - $this->returnValue( + self::returnValue( [ new ObjectState(['id' => 11, 'groupId' => 10]), new ObjectState(['id' => 12, 'groupId' => 10]), ] ) ); - $this->objectStateHandler->expects($this->at($objectStateHandlerCall++)) + $this->objectStateHandler->expects(self::at($objectStateHandlerCall++)) ->method('loadObjectStates') - ->with($this->equalTo(20)) + ->with(self::equalTo(20)) ->will( - $this->returnValue( + self::returnValue( [ new ObjectState(['id' => 21, 'groupId' => 20]), new ObjectState(['id' => 22, 'groupId' => 20]), @@ -536,11 +537,11 @@ public function testCopySubtree() ); foreach ($contentIds as $index => $contentId) { $this->contentHandler - ->expects($this->at($index * 2)) + ->expects(self::at($index * 2)) ->method('copy') ->with($contentId, 1) ->will( - $this->returnValue( + self::returnValue( new Content( [ 'versionInfo' => new VersionInfo( @@ -559,7 +560,7 @@ public function testCopySubtree() ); foreach ($defaultObjectStates as $objectState) { - $this->objectStateHandler->expects($this->at($objectStateHandlerCall++)) + $this->objectStateHandler->expects(self::at($objectStateHandlerCall++)) ->method('setContentState') ->with( $contentId + $offset, @@ -569,15 +570,15 @@ public function testCopySubtree() } $this->contentHandler - ->expects($this->at($index * 2 + 1)) + ->expects(self::at($index * 2 + 1)) ->method('publish') ->with( $contentId + $offset, 1, - $this->isInstanceOf(Content\MetadataUpdateStruct::class) + self::isInstanceOf(Content\MetadataUpdateStruct::class) ) ->will( - $this->returnValue( + self::returnValue( new Content( [ 'versionInfo' => new VersionInfo( @@ -601,10 +602,10 @@ public function testCopySubtree() $mapper = new Mapper(); $createStruct = $mapper->getLocationCreateStruct($row); $this->locationMapper - ->expects($this->at($index)) + ->expects(self::at($index)) ->method('getLocationCreateStruct') ->with($row) - ->will($this->returnValue($createStruct)); + ->will(self::returnValue($createStruct)); $createStruct = clone $createStruct; $createStruct->contentId = $createStruct->contentId + $offset; @@ -614,11 +615,11 @@ public function testCopySubtree() $createStruct->pathIdentificationString = $pathStrings[$createStruct->parentId] . '/' . $row['path_identification_string']; $pathStrings[$row['node_id'] + $offset] = $createStruct->pathIdentificationString; $handler - ->expects($this->at($index)) + ->expects(self::at($index)) ->method('create') ->with($createStruct) ->will( - $this->returnValue( + self::returnValue( new Location( [ 'id' => $row['node_id'] + $offset, @@ -634,31 +635,31 @@ public function testCopySubtree() foreach ($updateMainLocationsMap as $contentId => $locationId) { $handler - ->expects($this->any()) + ->expects(self::any()) ->method('changeMainLocation') ->with($contentId, $locationId); } $handler - ->expects($this->once()) + ->expects(self::once()) ->method('load') ->with($destinationData['node_id']) - ->will($this->returnValue(new Location(['contentId' => $destinationData['contentobject_id']]))); + ->will(self::returnValue(new Location(['contentId' => $destinationData['contentobject_id']]))); $this->contentHandler - ->expects($this->at($lastContentHandlerIndex + 1)) + ->expects(self::at($lastContentHandlerIndex + 1)) ->method('loadContentInfo') ->with($destinationData['contentobject_id']) - ->will($this->returnValue(new ContentInfo(['sectionId' => 12345]))); + ->will(self::returnValue(new ContentInfo(['sectionId' => 12345]))); $this->contentHandler - ->expects($this->at($lastContentHandlerIndex + 2)) + ->expects(self::at($lastContentHandlerIndex + 2)) ->method('loadContentInfo') ->with(21) - ->will($this->returnValue(new ContentInfo(['mainLocationId' => 1010]))); + ->will(self::returnValue(new ContentInfo(['mainLocationId' => 1010]))); $handler - ->expects($this->once()) + ->expects(self::once()) ->method('setSectionForSubtree') ->with($subtreeContentRows[0]['node_id'] + $offset, 12345); diff --git a/tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php index 1105684cad..bb54908de3 100644 --- a/tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\ObjectState\Gateway; use Ibexa\Contracts\Core\Persistence\Content\ObjectState; @@ -52,7 +53,7 @@ public function testLoadObjectStateData() $result = $gateway->loadObjectStateData(1); - $this->assertEquals( + self::assertEquals( [ [ 'ezcobj_state_default_language_id' => 2, @@ -76,7 +77,7 @@ public function testLoadObjectStateDataByIdentifier() $result = $gateway->loadObjectStateDataByIdentifier('not_locked', 2); - $this->assertEquals( + self::assertEquals( [ [ 'ezcobj_state_default_language_id' => 2, @@ -100,7 +101,7 @@ public function testLoadObjectStateListData() $result = $gateway->loadObjectStateListData(2); - $this->assertEquals( + self::assertEquals( [ [ [ @@ -139,7 +140,7 @@ public function testLoadObjectStateGroupData() $result = $gateway->loadObjectStateGroupData(2); - $this->assertEquals( + self::assertEquals( [ [ 'ezcobj_state_group_default_language_id' => 2, @@ -162,7 +163,7 @@ public function testLoadObjectStateGroupDataByIdentifier() $result = $gateway->loadObjectStateGroupDataByIdentifier('ez_lock'); - $this->assertEquals( + self::assertEquals( [ [ 'ezcobj_state_group_default_language_id' => 2, @@ -185,7 +186,7 @@ public function testLoadObjectStateGroupListData() $result = $gateway->loadObjectStateGroupListData(0, -1); - $this->assertEquals( + self::assertEquals( [ [ [ @@ -210,7 +211,7 @@ public function testInsertObjectState() $gateway->insertObjectState($this->getObjectStateFixture(), 2); - $this->assertEquals( + self::assertEquals( [ [ 'ezcobj_state_default_language_id' => 4, @@ -238,7 +239,7 @@ public function testInsertObjectStateInEmptyGroup() $gateway->insertObjectStateGroup($this->getObjectStateGroupFixture()); $gateway->insertObjectState($this->getObjectStateFixture(), 3); - $this->assertEquals( + self::assertEquals( [ [ 'ezcobj_state_default_language_id' => 4, @@ -259,7 +260,7 @@ public function testInsertObjectStateInEmptyGroup() $this->getDatabaseGateway()->loadObjectStateData(3) ); - $this->assertEquals( + self::assertEquals( // 185 is the number of objects in the fixture 185, $gateway->getContentCount(3) @@ -275,7 +276,7 @@ public function testUpdateObjectState() $gateway->updateObjectState($objectStateFixture); - $this->assertEquals( + self::assertEquals( [ [ 'ezcobj_state_default_language_id' => 4, @@ -299,7 +300,7 @@ public function testDeleteObjectState() $gateway->deleteObjectState(1); - $this->assertEquals( + self::assertEquals( [], $this->getDatabaseGateway()->loadObjectStateData(1) ); @@ -330,7 +331,7 @@ public function testInsertObjectStateGroup() $gateway->insertObjectStateGroup($this->getObjectStateGroupFixture()); - $this->assertEquals( + self::assertEquals( [ [ 'ezcobj_state_group_default_language_id' => 4, @@ -358,7 +359,7 @@ public function testUpdateObjectStateGroup() $gateway->updateObjectStateGroup($groupFixture); - $this->assertEquals( + self::assertEquals( [ [ 'ezcobj_state_group_default_language_id' => 4, @@ -381,7 +382,7 @@ public function testDeleteObjectStateGroup() $gateway->deleteObjectStateGroup(2); - $this->assertEquals( + self::assertEquals( [], $this->getDatabaseGateway()->loadObjectStateGroupData(2) ); @@ -413,7 +414,7 @@ public function testLoadObjectStateDataForContent() $result = $gateway->loadObjectStateDataForContent(42, 2); - $this->assertEquals( + self::assertEquals( [ [ 'ezcobj_state_default_language_id' => 2, @@ -438,7 +439,7 @@ public function testGetContentCount() $result = $gateway->getContentCount(1); // 185 is the number of objects in the fixture - $this->assertEquals(185, $result); + self::assertEquals(185, $result); } public function testUpdateObjectStatePriority() @@ -449,7 +450,7 @@ public function testUpdateObjectStatePriority() $objectStateData = $gateway->loadObjectStateData(1); - $this->assertEquals( + self::assertEquals( [ [ 'ezcobj_state_default_language_id' => 2, diff --git a/tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php b/tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php index 0ed86adc50..1426d2ac4b 100644 --- a/tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\ObjectState; use Ibexa\Contracts\Core\Persistence\Content\ObjectState; diff --git a/tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php b/tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php index 075e4b50b6..7839ed657b 100644 --- a/tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\ObjectState; use Ibexa\Contracts\Core\Persistence\Content\ObjectState; @@ -48,19 +49,19 @@ public function testCreateGroup() $mapperMock = $this->getMapperMock(); $gatewayMock = $this->getGatewayMock(); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('createObjectStateGroupFromInputStruct') - ->with($this->equalTo($this->getInputStructFixture())) - ->will($this->returnValue($this->getObjectStateGroupFixture())); + ->with(self::equalTo($this->getInputStructFixture())) + ->will(self::returnValue($this->getObjectStateGroupFixture())); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('insertObjectStateGroup') - ->with($this->equalTo($this->getObjectStateGroupFixture())) - ->will($this->returnValue($this->getObjectStateGroupFixture())); + ->with(self::equalTo($this->getObjectStateGroupFixture())) + ->will(self::returnValue($this->getObjectStateGroupFixture())); $result = $handler->createGroup($this->getInputStructFixture()); - $this->assertInstanceOf( + self::assertInstanceOf( Group::class, $result ); @@ -72,19 +73,19 @@ public function testLoadGroup() $mapperMock = $this->getMapperMock(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadObjectStateGroupData') - ->with($this->equalTo(2)) - ->will($this->returnValue([[]])); + ->with(self::equalTo(2)) + ->will(self::returnValue([[]])); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('createObjectStateGroupFromData') - ->with($this->equalTo([[]])) - ->will($this->returnValue($this->getObjectStateGroupFixture())); + ->with(self::equalTo([[]])) + ->will(self::returnValue($this->getObjectStateGroupFixture())); $result = $handler->loadGroup(2); - $this->assertInstanceOf( + self::assertInstanceOf( Group::class, $result ); @@ -97,10 +98,10 @@ public function testLoadGroupThrowsNotFoundException() $handler = $this->getObjectStateHandler(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadObjectStateGroupData') - ->with($this->equalTo(APIBaseTest::DB_INT_MAX)) - ->will($this->returnValue([])); + ->with(self::equalTo(APIBaseTest::DB_INT_MAX)) + ->will(self::returnValue([])); $handler->loadGroup(APIBaseTest::DB_INT_MAX); } @@ -111,19 +112,19 @@ public function testLoadGroupByIdentifier() $mapperMock = $this->getMapperMock(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadObjectStateGroupDataByIdentifier') - ->with($this->equalTo('ez_lock')) - ->will($this->returnValue([[]])); + ->with(self::equalTo('ez_lock')) + ->will(self::returnValue([[]])); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('createObjectStateGroupFromData') - ->with($this->equalTo([[]])) - ->will($this->returnValue($this->getObjectStateGroupFixture())); + ->with(self::equalTo([[]])) + ->will(self::returnValue($this->getObjectStateGroupFixture())); $result = $handler->loadGroupByIdentifier('ez_lock'); - $this->assertInstanceOf( + self::assertInstanceOf( Group::class, $result ); @@ -136,10 +137,10 @@ public function testLoadGroupByIdentifierThrowsNotFoundException() $handler = $this->getObjectStateHandler(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadObjectStateGroupDataByIdentifier') - ->with($this->equalTo('unknown')) - ->will($this->returnValue([])); + ->with(self::equalTo('unknown')) + ->will(self::returnValue([])); $handler->loadGroupByIdentifier('unknown'); } @@ -150,20 +151,20 @@ public function testLoadAllGroups() $mapperMock = $this->getMapperMock(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadObjectStateGroupListData') - ->with($this->equalTo(0), $this->equalTo(-1)) - ->will($this->returnValue([[]])); + ->with(self::equalTo(0), self::equalTo(-1)) + ->will(self::returnValue([[]])); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('createObjectStateGroupListFromData') - ->with($this->equalTo([[]])) - ->will($this->returnValue([$this->getObjectStateGroupFixture()])); + ->with(self::equalTo([[]])) + ->will(self::returnValue([$this->getObjectStateGroupFixture()])); $result = $handler->loadAllGroups(); foreach ($result as $resultItem) { - $this->assertInstanceOf( + self::assertInstanceOf( Group::class, $resultItem ); @@ -176,20 +177,20 @@ public function testLoadObjectStates() $mapperMock = $this->getMapperMock(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadObjectStateListData') - ->with($this->equalTo(2)) - ->will($this->returnValue([[]])); + ->with(self::equalTo(2)) + ->will(self::returnValue([[]])); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('createObjectStateListFromData') - ->with($this->equalTo([[]])) - ->will($this->returnValue([$this->getObjectStateFixture(), $this->getObjectStateFixture()])); + ->with(self::equalTo([[]])) + ->will(self::returnValue([$this->getObjectStateFixture(), $this->getObjectStateFixture()])); $result = $handler->loadObjectStates(2); foreach ($result as $resultItem) { - $this->assertInstanceOf( + self::assertInstanceOf( ObjectState::class, $resultItem ); @@ -202,28 +203,28 @@ public function testUpdateGroup() $mapperMock = $this->getMapperMock(); $gatewayMock = $this->getGatewayMock(); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('createObjectStateGroupFromInputStruct') - ->with($this->equalTo($this->getInputStructFixture())) - ->will($this->returnValue($this->getObjectStateGroupFixture())); + ->with(self::equalTo($this->getInputStructFixture())) + ->will(self::returnValue($this->getObjectStateGroupFixture())); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('updateObjectStateGroup') - ->with($this->equalTo(new Group(['id' => 2]))); + ->with(self::equalTo(new Group(['id' => 2]))); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadObjectStateGroupData') - ->with($this->equalTo(2)) - ->will($this->returnValue([[]])); + ->with(self::equalTo(2)) + ->will(self::returnValue([[]])); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('createObjectStateGroupFromData') - ->with($this->equalTo([[]])) - ->will($this->returnValue($this->getObjectStateGroupFixture())); + ->with(self::equalTo([[]])) + ->will(self::returnValue($this->getObjectStateGroupFixture())); $result = $handler->updateGroup(2, $this->getInputStructFixture()); - $this->assertInstanceOf( + self::assertInstanceOf( Group::class, $result ); @@ -235,16 +236,16 @@ public function testDeleteGroup() $mapperMock = $this->getMapperMock(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadObjectStateListData') - ->with($this->equalTo(2)) - ->will($this->returnValue([[]])); + ->with(self::equalTo(2)) + ->will(self::returnValue([[]])); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('createObjectStateListFromData') - ->with($this->equalTo([[]])) + ->with(self::equalTo([[]])) ->will( - $this->returnValue( + self::returnValue( [ new ObjectState(['id' => 1]), new ObjectState(['id' => 2]), @@ -252,31 +253,31 @@ public function testDeleteGroup() ) ); - $gatewayMock->expects($this->exactly(2)) + $gatewayMock->expects(self::exactly(2)) ->method('deleteObjectStateLinks'); - $gatewayMock->expects($this->exactly(2)) + $gatewayMock->expects(self::exactly(2)) ->method('deleteObjectState'); - $gatewayMock->expects($this->at(1)) + $gatewayMock->expects(self::at(1)) ->method('deleteObjectStateLinks') - ->with($this->equalTo(1)); + ->with(self::equalTo(1)); - $gatewayMock->expects($this->at(2)) + $gatewayMock->expects(self::at(2)) ->method('deleteObjectState') - ->with($this->equalTo(1)); + ->with(self::equalTo(1)); - $gatewayMock->expects($this->at(3)) + $gatewayMock->expects(self::at(3)) ->method('deleteObjectStateLinks') - ->with($this->equalTo(2)); + ->with(self::equalTo(2)); - $gatewayMock->expects($this->at(4)) + $gatewayMock->expects(self::at(4)) ->method('deleteObjectState') - ->with($this->equalTo(2)); + ->with(self::equalTo(2)); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('deleteObjectStateGroup') - ->with($this->equalTo(2)); + ->with(self::equalTo(2)); $handler->deleteGroup(2); } @@ -287,19 +288,19 @@ public function testCreate() $mapperMock = $this->getMapperMock(); $gatewayMock = $this->getGatewayMock(); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('createObjectStateFromInputStruct') - ->with($this->equalTo($this->getInputStructFixture())) - ->will($this->returnValue($this->getObjectStateFixture())); + ->with(self::equalTo($this->getInputStructFixture())) + ->will(self::returnValue($this->getObjectStateFixture())); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('insertObjectState') - ->with($this->equalTo($this->getObjectStateFixture()), $this->equalTo(2)) - ->will($this->returnValue($this->getObjectStateFixture())); + ->with(self::equalTo($this->getObjectStateFixture()), self::equalTo(2)) + ->will(self::returnValue($this->getObjectStateFixture())); $result = $handler->create(2, $this->getInputStructFixture()); - $this->assertInstanceOf( + self::assertInstanceOf( ObjectState::class, $result ); @@ -311,19 +312,19 @@ public function testLoad() $mapperMock = $this->getMapperMock(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadObjectStateData') - ->with($this->equalTo(1)) - ->will($this->returnValue([[]])); + ->with(self::equalTo(1)) + ->will(self::returnValue([[]])); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('createObjectStateFromData') - ->with($this->equalTo([[]])) - ->will($this->returnValue($this->getObjectStateFixture())); + ->with(self::equalTo([[]])) + ->will(self::returnValue($this->getObjectStateFixture())); $result = $handler->load(1); - $this->assertInstanceOf( + self::assertInstanceOf( ObjectState::class, $result ); @@ -336,10 +337,10 @@ public function testLoadThrowsNotFoundException() $handler = $this->getObjectStateHandler(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadObjectStateData') - ->with($this->equalTo(APIBaseTest::DB_INT_MAX)) - ->will($this->returnValue([])); + ->with(self::equalTo(APIBaseTest::DB_INT_MAX)) + ->will(self::returnValue([])); $handler->load(APIBaseTest::DB_INT_MAX); } @@ -350,19 +351,19 @@ public function testLoadByIdentifier() $mapperMock = $this->getMapperMock(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadObjectStateDataByIdentifier') - ->with($this->equalTo('not_locked'), $this->equalTo(2)) - ->will($this->returnValue([[]])); + ->with(self::equalTo('not_locked'), self::equalTo(2)) + ->will(self::returnValue([[]])); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('createObjectStateFromData') - ->with($this->equalTo([[]])) - ->will($this->returnValue($this->getObjectStateFixture())); + ->with(self::equalTo([[]])) + ->will(self::returnValue($this->getObjectStateFixture())); $result = $handler->loadByIdentifier('not_locked', 2); - $this->assertInstanceOf( + self::assertInstanceOf( ObjectState::class, $result ); @@ -375,10 +376,10 @@ public function testLoadByIdentifierThrowsNotFoundException() $handler = $this->getObjectStateHandler(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadObjectStateDataByIdentifier') - ->with($this->equalTo('unknown'), $this->equalTo(2)) - ->will($this->returnValue([])); + ->with(self::equalTo('unknown'), self::equalTo(2)) + ->will(self::returnValue([])); $handler->loadByIdentifier('unknown', 2); } @@ -389,28 +390,28 @@ public function testUpdate() $mapperMock = $this->getMapperMock(); $gatewayMock = $this->getGatewayMock(); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('createObjectStateFromInputStruct') - ->with($this->equalTo($this->getInputStructFixture())) - ->will($this->returnValue($this->getObjectStateFixture())); + ->with(self::equalTo($this->getInputStructFixture())) + ->will(self::returnValue($this->getObjectStateFixture())); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('updateObjectState') - ->with($this->equalTo(new ObjectState(['id' => 1]))); + ->with(self::equalTo(new ObjectState(['id' => 1]))); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadObjectStateData') - ->with($this->equalTo(1)) - ->will($this->returnValue([[]])); + ->with(self::equalTo(1)) + ->will(self::returnValue([[]])); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('createObjectStateFromData') - ->with($this->equalTo([[]])) - ->will($this->returnValue($this->getObjectStateFixture())); + ->with(self::equalTo([[]])) + ->will(self::returnValue($this->getObjectStateFixture())); $result = $handler->update(1, $this->getInputStructFixture()); - $this->assertInstanceOf( + self::assertInstanceOf( ObjectState::class, $result ); @@ -422,26 +423,26 @@ public function testSetPriority() $mapperMock = $this->getMapperMock(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadObjectStateData') - ->with($this->equalTo(2)) - ->will($this->returnValue([[]])); + ->with(self::equalTo(2)) + ->will(self::returnValue([[]])); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('createObjectStateFromData') - ->with($this->equalTo([[]])) - ->will($this->returnValue(new ObjectState(['id' => 2, 'groupId' => 2]))); + ->with(self::equalTo([[]])) + ->will(self::returnValue(new ObjectState(['id' => 2, 'groupId' => 2]))); - $gatewayMock->expects($this->any()) + $gatewayMock->expects(self::any()) ->method('loadObjectStateListData') - ->with($this->equalTo(2)) - ->will($this->returnValue([[]])); + ->with(self::equalTo(2)) + ->will(self::returnValue([[]])); - $mapperMock->expects($this->any()) + $mapperMock->expects(self::any()) ->method('createObjectStateListFromData') - ->with($this->equalTo([[]])) + ->with(self::equalTo([[]])) ->will( - $this->returnValue( + self::returnValue( [ new ObjectState(['id' => 1, 'groupId' => 2]), new ObjectState(['id' => 2, 'groupId' => 2]), @@ -450,20 +451,20 @@ public function testSetPriority() ) ); - $gatewayMock->expects($this->exactly(3)) + $gatewayMock->expects(self::exactly(3)) ->method('updateObjectStatePriority'); - $gatewayMock->expects($this->at(2)) + $gatewayMock->expects(self::at(2)) ->method('updateObjectStatePriority') - ->with($this->equalTo(2), $this->equalTo(0)); + ->with(self::equalTo(2), self::equalTo(0)); - $gatewayMock->expects($this->at(3)) + $gatewayMock->expects(self::at(3)) ->method('updateObjectStatePriority') - ->with($this->equalTo(1), $this->equalTo(1)); + ->with(self::equalTo(1), self::equalTo(1)); - $gatewayMock->expects($this->at(4)) + $gatewayMock->expects(self::at(4)) ->method('updateObjectStatePriority') - ->with($this->equalTo(3), $this->equalTo(2)); + ->with(self::equalTo(3), self::equalTo(2)); $handler->setPriority(2, 0); } @@ -474,37 +475,37 @@ public function testDelete() $mapperMock = $this->getMapperMock(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadObjectStateData') - ->with($this->equalTo(1)) - ->will($this->returnValue([[]])); + ->with(self::equalTo(1)) + ->will(self::returnValue([[]])); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('createObjectStateFromData') - ->with($this->equalTo([[]])) - ->will($this->returnValue(new ObjectState(['id' => 1, 'groupId' => 2]))); + ->with(self::equalTo([[]])) + ->will(self::returnValue(new ObjectState(['id' => 1, 'groupId' => 2]))); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('deleteObjectState') - ->with($this->equalTo(1)); + ->with(self::equalTo(1)); - $gatewayMock->expects($this->any()) + $gatewayMock->expects(self::any()) ->method('loadObjectStateListData') - ->with($this->equalTo(2)) - ->will($this->returnValue([[]])); + ->with(self::equalTo(2)) + ->will(self::returnValue([[]])); - $mapperMock->expects($this->any()) + $mapperMock->expects(self::any()) ->method('createObjectStateListFromData') - ->with($this->equalTo([[]])) - ->will($this->returnValue([new ObjectState(['id' => 2, 'groupId' => 2])])); + ->with(self::equalTo([[]])) + ->will(self::returnValue([new ObjectState(['id' => 2, 'groupId' => 2])])); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('updateObjectStatePriority') - ->with($this->equalTo(2), $this->equalTo(0)); + ->with(self::equalTo(2), self::equalTo(0)); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('updateObjectStateLinks') - ->with($this->equalTo(1), $this->equalTo(2)); + ->with(self::equalTo(1), self::equalTo(2)); $handler->delete(1); } @@ -516,10 +517,10 @@ public function testDeleteThrowsNotFoundException() $handler = $this->getObjectStateHandler(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadObjectStateData') - ->with($this->equalTo(APIBaseTest::DB_INT_MAX)) - ->will($this->returnValue([])); + ->with(self::equalTo(APIBaseTest::DB_INT_MAX)) + ->will(self::returnValue([])); $handler->delete(APIBaseTest::DB_INT_MAX); } @@ -529,13 +530,13 @@ public function testSetContentState() $handler = $this->getObjectStateHandler(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('setContentState') - ->with($this->equalTo(42), $this->equalTo(2), $this->equalTo(2)); + ->with(self::equalTo(42), self::equalTo(2), self::equalTo(2)); $result = $handler->setContentState(42, 2, 2); - $this->assertTrue($result); + self::assertTrue($result); } public function testGetContentState() @@ -544,19 +545,19 @@ public function testGetContentState() $mapperMock = $this->getMapperMock(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadObjectStateDataForContent') - ->with($this->equalTo(42), $this->equalTo(2)) - ->will($this->returnValue([[]])); + ->with(self::equalTo(42), self::equalTo(2)) + ->will(self::returnValue([[]])); - $mapperMock->expects($this->once()) + $mapperMock->expects(self::once()) ->method('createObjectStateFromData') - ->with($this->equalTo([[]])) - ->will($this->returnValue($this->getObjectStateFixture())); + ->with(self::equalTo([[]])) + ->will(self::returnValue($this->getObjectStateFixture())); $result = $handler->getContentState(42, 2); - $this->assertInstanceOf( + self::assertInstanceOf( ObjectState::class, $result ); @@ -567,14 +568,14 @@ public function testGetContentCount() $handler = $this->getObjectStateHandler(); $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('getContentCount') - ->with($this->equalTo(1)) - ->will($this->returnValue(185)); + ->with(self::equalTo(1)) + ->will(self::returnValue(185)); $result = $handler->getContentCount(1); - $this->assertEquals(185, $result); + self::assertEquals(185, $result); } /** diff --git a/tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php index 48f2a680b8..a3e324e74f 100644 --- a/tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Section\Gateway; use Ibexa\Core\Persistence\Legacy\Content\Section\Gateway; @@ -90,7 +91,7 @@ public function testLoadSectionData() $result = $gateway->loadSectionData(2); - $this->assertEquals( + self::assertEquals( [ [ 'id' => '2', @@ -145,7 +146,7 @@ public function testLoadAllSectionData() 'name' => 'Restricted', ], ]; - $this->assertEquals( + self::assertEquals( $expected, $result ); @@ -157,7 +158,7 @@ public function testLoadSectionDataByIdentifier() $result = $gateway->loadSectionDataByIdentifier('users'); - $this->assertEquals( + self::assertEquals( [ [ 'id' => '2', @@ -179,7 +180,7 @@ public function testCountContentObjectsInSection() $result = $gateway->countContentObjectsInSection(2); - $this->assertSame( + self::assertSame( 7, $result ); @@ -195,7 +196,7 @@ public function testCountRoleAssignmentsUsingSection() $result = $gateway->countRoleAssignmentsUsingSection(2); - $this->assertSame( + self::assertSame( 1, $result ); @@ -246,7 +247,7 @@ public function testAssignSectionToContent() $result = $gateway->assignSectionToContent(4, 10); - $this->assertSame( + self::assertSame( $beforeCount + 1, $gateway->countContentObjectsInSection(4) ); diff --git a/tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php b/tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php index e9357cdeba..ab2d71839d 100644 --- a/tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Section; use Ibexa\Contracts\Core\Persistence\Content\Section; @@ -36,12 +37,12 @@ public function testCreate() $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('insertSection') ->with( - $this->equalTo('New Section'), - $this->equalTo('new_section') - )->will($this->returnValue(23)); + self::equalTo('New Section'), + self::equalTo('new_section') + )->will(self::returnValue(23)); $sectionRef = new Section(); $sectionRef->id = 23; @@ -50,7 +51,7 @@ public function testCreate() $result = $handler->create('New Section', 'new_section'); - $this->assertEquals( + self::assertEquals( $sectionRef, $result ); @@ -62,12 +63,12 @@ public function testUpdate() $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('updateSection') ->with( - $this->equalTo(23), - $this->equalTo('New Section'), - $this->equalTo('new_section') + self::equalTo(23), + self::equalTo('New Section'), + self::equalTo('new_section') ); $sectionRef = new Section(); @@ -77,7 +78,7 @@ public function testUpdate() $result = $handler->update(23, 'New Section', 'new_section'); - $this->assertEquals( + self::assertEquals( $sectionRef, $result ); @@ -89,12 +90,12 @@ public function testLoad() $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadSectionData') ->with( - $this->equalTo(23) + self::equalTo(23) )->will( - $this->returnValue( + self::returnValue( [ [ 'id' => '23', @@ -112,7 +113,7 @@ public function testLoad() $result = $handler->load(23); - $this->assertEquals( + self::assertEquals( $sectionRef, $result ); @@ -124,10 +125,10 @@ public function testLoadAll() $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadAllSectionData') ->will( - $this->returnValue( + self::returnValue( [ [ 'id' => '23', @@ -155,7 +156,7 @@ public function testLoadAll() $result = $handler->loadAll(); - $this->assertEquals( + self::assertEquals( [$sectionRef, $sectionRef2], $result ); @@ -167,12 +168,12 @@ public function testLoadByIdentifier() $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('loadSectionDataByIdentifier') ->with( - $this->equalTo('new_section') + self::equalTo('new_section') )->will( - $this->returnValue( + self::returnValue( [ [ 'id' => '23', @@ -190,7 +191,7 @@ public function testLoadByIdentifier() $result = $handler->loadByIdentifier('new_section'); - $this->assertEquals( + self::assertEquals( $sectionRef, $result ); @@ -202,15 +203,15 @@ public function testDelete() $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('countContentObjectsInSection') - ->with($this->equalTo(23)) - ->will($this->returnValue(0)); + ->with(self::equalTo(23)) + ->will(self::returnValue(0)); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('deleteSection') ->with( - $this->equalTo(23) + self::equalTo(23) ); $result = $handler->delete(23); @@ -224,12 +225,12 @@ public function testDeleteFailure() $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('countContentObjectsInSection') - ->with($this->equalTo(23)) - ->will($this->returnValue(2)); + ->with(self::equalTo(23)) + ->will(self::returnValue(2)); - $gatewayMock->expects($this->never()) + $gatewayMock->expects(self::never()) ->method('deleteSection'); $result = $handler->delete(23); @@ -241,11 +242,11 @@ public function testAssign() $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('assignSectionToContent') ->with( - $this->equalTo(23), - $this->equalTo(42) + self::equalTo(23), + self::equalTo(42) ); $result = $handler->assign(23, 42); @@ -257,13 +258,13 @@ public function testPoliciesCount() $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('countPoliciesUsingSection') ->with( - $this->equalTo(1) + self::equalTo(1) ) ->will( - $this->returnValue(7) + self::returnValue(7) ); $result = $handler->policiesCount(1); @@ -275,13 +276,13 @@ public function testCountRoleAssignmentsUsingSection() $gatewayMock = $this->getGatewayMock(); - $gatewayMock->expects($this->once()) + $gatewayMock->expects(self::once()) ->method('countRoleAssignmentsUsingSection') ->with( - $this->equalTo(1) + self::equalTo(1) ) ->will( - $this->returnValue(0) + self::returnValue(0) ); $handler->countRoleAssignmentsUsingSection(1); diff --git a/tests/lib/Persistence/Legacy/Content/StorageHandlerTest.php b/tests/lib/Persistence/Legacy/Content/StorageHandlerTest.php index 2ef2185b43..843420361c 100644 --- a/tests/lib/Persistence/Legacy/Content/StorageHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/StorageHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content; use Ibexa\Contracts\Core\FieldType\FieldStorage; @@ -34,18 +35,18 @@ public function testStoreFieldData(): void $storageMock = $this->getStorageMock(); $storageRegistryMock = $this->getStorageRegistryMock(); - $storageMock->expects($this->once()) + $storageMock->expects(self::once()) ->method('storeFieldData') ->with( - $this->isInstanceOf(VersionInfo::class), - $this->isInstanceOf(Field::class), - $this->equalTo($this->getContextMock()) + self::isInstanceOf(VersionInfo::class), + self::isInstanceOf(Field::class), + self::equalTo($this->getContextMock()) ); - $storageRegistryMock->expects($this->once()) + $storageRegistryMock->expects(self::once()) ->method('getStorage') - ->with($this->equalTo('foobar')) - ->will($this->returnValue($storageMock)); + ->with(self::equalTo('foobar')) + ->will(self::returnValue($storageMock)); $field = new Field(); $field->type = 'foobar'; @@ -60,21 +61,21 @@ public function testGetFieldDataAvailable(): void $storageMock = $this->getStorageMock(); $storageRegistryMock = $this->getStorageRegistryMock(); - $storageMock->expects($this->once()) + $storageMock->expects(self::once()) ->method('hasFieldData') - ->will($this->returnValue(true)); - $storageMock->expects($this->once()) + ->will(self::returnValue(true)); + $storageMock->expects(self::once()) ->method('getFieldData') ->with( - $this->isInstanceOf(VersionInfo::class), - $this->isInstanceOf(Field::class), - $this->equalTo($this->getContextMock()) + self::isInstanceOf(VersionInfo::class), + self::isInstanceOf(Field::class), + self::equalTo($this->getContextMock()) ); - $storageRegistryMock->expects($this->once()) + $storageRegistryMock->expects(self::once()) ->method('getStorage') - ->with($this->equalTo('foobar')) - ->will($this->returnValue($storageMock)); + ->with(self::equalTo('foobar')) + ->will(self::returnValue($storageMock)); $field = new Field(); $field->id = 123; @@ -90,16 +91,16 @@ public function testGetFieldDataNotAvailable(): void $storageMock = $this->getStorageMock(); $storageRegistryMock = $this->getStorageRegistryMock(); - $storageMock->expects($this->once()) + $storageMock->expects(self::once()) ->method('hasFieldData') - ->will($this->returnValue(false)); - $storageMock->expects($this->never()) + ->will(self::returnValue(false)); + $storageMock->expects(self::never()) ->method('getFieldData'); - $storageRegistryMock->expects($this->once()) + $storageRegistryMock->expects(self::once()) ->method('getStorage') - ->with($this->equalTo('foobar')) - ->will($this->returnValue($storageMock)); + ->with(self::equalTo('foobar')) + ->will(self::returnValue($storageMock)); $field = new Field(); $field->id = 123; @@ -139,18 +140,18 @@ public function testDeleteFieldData(): void $storageMock = $this->getStorageMock(); $storageRegistryMock = $this->getStorageRegistryMock(); - $storageMock->expects($this->once()) + $storageMock->expects(self::once()) ->method('deleteFieldData') ->with( - $this->isInstanceOf(VersionInfo::class), - $this->equalTo([1, 2, 3]), - $this->equalTo($this->getContextMock()) + self::isInstanceOf(VersionInfo::class), + self::equalTo([1, 2, 3]), + self::equalTo($this->getContextMock()) ); - $storageRegistryMock->expects($this->once()) + $storageRegistryMock->expects(self::once()) ->method('getStorage') - ->with($this->equalTo('foobar')) - ->will($this->returnValue($storageMock)); + ->with(self::equalTo('foobar')) + ->will(self::returnValue($storageMock)); $handler = $this->getStorageHandler(); $handler->deleteFieldData('foobar', new VersionInfo(), [1, 2, 3]); diff --git a/tests/lib/Persistence/Legacy/Content/StorageRegistryTest.php b/tests/lib/Persistence/Legacy/Content/StorageRegistryTest.php index 06e605b411..f4ab1cc54d 100644 --- a/tests/lib/Persistence/Legacy/Content/StorageRegistryTest.php +++ b/tests/lib/Persistence/Legacy/Content/StorageRegistryTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content; use Ibexa\Contracts\Core\FieldType\FieldStorage; @@ -23,7 +24,7 @@ public function testRegister(): void $storage = $this->getStorageMock(); $registry = new StorageRegistry([self::TYPE_NAME => $storage]); - $this->assertSame($storage, $registry->getStorage(self::TYPE_NAME)); + self::assertSame($storage, $registry->getStorage(self::TYPE_NAME)); } public function testGetStorage() @@ -33,7 +34,7 @@ public function testGetStorage() $res = $registry->getStorage(self::TYPE_NAME); - $this->assertSame( + self::assertSame( $storage, $res ); diff --git a/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php b/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php index a3403d8fb8..78a219941b 100644 --- a/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content; use Ibexa\Contracts\Core\Persistence\Content\ContentInfo; @@ -27,18 +28,18 @@ public function testLoadContentInfoByRemoteId() $contentInfoData = [new ContentInfo()]; $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('loadContentInfo') ->with(42) - ->will($this->returnValue([42])); + ->will(self::returnValue([42])); $this->getContentMapperMock() - ->expects($this->once()) + ->expects(self::once()) ->method('extractContentInfoFromRow') - ->with($this->equalTo([42])) - ->will($this->returnValue($contentInfoData)); + ->with(self::equalTo([42])) + ->will(self::returnValue($contentInfoData)); - $this->assertSame( + self::assertSame( $contentInfoData, $this->getTreeHandler()->loadContentInfo(42) ); @@ -47,26 +48,26 @@ public function testLoadContentInfoByRemoteId() public function testListVersions() { $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('listVersions') - ->with($this->equalTo(23)) - ->will($this->returnValue([['ezcontentobject_version_version' => 2]])); + ->with(self::equalTo(23)) + ->will(self::returnValue([['ezcontentobject_version_version' => 2]])); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('loadVersionedNameData') - ->with($this->equalTo([['id' => 23, 'version' => 2]])) - ->will($this->returnValue([])); + ->with(self::equalTo([['id' => 23, 'version' => 2]])) + ->will(self::returnValue([])); $this->getContentMapperMock() - ->expects($this->once()) + ->expects(self::once()) ->method('extractVersionInfoListFromRows') - ->with($this->equalTo([['ezcontentobject_version_version' => 2]]), []) - ->will($this->returnValue([new VersionInfo()])); + ->with(self::equalTo([['ezcontentobject_version_version' => 2]]), []) + ->will(self::returnValue([new VersionInfo()])); $versions = $this->getTreeHandler()->listVersions(23); - $this->assertEquals( + self::assertEquals( [new VersionInfo()], $versions ); @@ -82,44 +83,44 @@ public function testRemoveRawContent() ); $treeHandler - ->expects($this->once()) + ->expects(self::once()) ->method('listVersions') - ->will($this->returnValue([new VersionInfo(), new VersionInfo()])); + ->will(self::returnValue([new VersionInfo(), new VersionInfo()])); $treeHandler - ->expects($this->once()) + ->expects(self::once()) ->method('loadContentInfo') ->with(23) - ->will($this->returnValue(new ContentInfo(['mainLocationId' => 42]))); + ->will(self::returnValue(new ContentInfo(['mainLocationId' => 42]))); $this->getFieldHandlerMock() - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('deleteFields') ->with( - $this->equalTo(23), - $this->isInstanceOf(VersionInfo::class) + self::equalTo(23), + self::isInstanceOf(VersionInfo::class) ); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('deleteRelations') - ->with($this->equalTo(23)); + ->with(self::equalTo(23)); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('deleteVersions') - ->with($this->equalTo(23)); + ->with(self::equalTo(23)); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('deleteNames') - ->with($this->equalTo(23)); + ->with(self::equalTo(23)); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('deleteContent') - ->with($this->equalTo(23)); + ->with(self::equalTo(23)); $this->getLocationGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('removeElementFromTrash') - ->with($this->equalTo(42)); + ->with(self::equalTo(42)); $treeHandler->removeRawContent(23); } @@ -135,11 +136,11 @@ public function testRemoveSubtree() // Original call $this->getLocationGatewayMock() - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('getBasicNodeData') ->with(42) ->will( - $this->returnValue( + self::returnValue( [ 'contentobject_id' => 100, 'main_node_id' => 200, @@ -147,11 +148,11 @@ public function testRemoveSubtree() ) ); $this->getLocationGatewayMock() - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('getChildren') ->with(42) ->will( - $this->returnValue( + self::returnValue( [ ['node_id' => 201], ['node_id' => 202], @@ -161,11 +162,11 @@ public function testRemoveSubtree() // First recursive call $this->getLocationGatewayMock() - ->expects($this->at(2)) + ->expects(self::at(2)) ->method('getBasicNodeData') ->with(201) ->will( - $this->returnValue( + self::returnValue( [ 'contentobject_id' => 101, 'main_node_id' => 201, @@ -173,35 +174,35 @@ public function testRemoveSubtree() ) ); $this->getLocationGatewayMock() - ->expects($this->at(3)) + ->expects(self::at(3)) ->method('getChildren') ->with(201) - ->will($this->returnValue([])); + ->will(self::returnValue([])); $this->getLocationGatewayMock() - ->expects($this->at(4)) + ->expects(self::at(4)) ->method('countLocationsByContentId') ->with(101) - ->will($this->returnValue(1)); + ->will(self::returnValue(1)); $treeHandler - ->expects($this->once()) + ->expects(self::once()) ->method('removeRawContent') ->with(101); $this->getLocationGatewayMock() - ->expects($this->at(5)) + ->expects(self::at(5)) ->method('removeLocation') ->with(201); $this->getLocationGatewayMock() - ->expects($this->at(6)) + ->expects(self::at(6)) ->method('deleteNodeAssignment') ->with(101); // Second recursive call $this->getLocationGatewayMock() - ->expects($this->at(7)) + ->expects(self::at(7)) ->method('getBasicNodeData') ->with(202) ->will( - $this->returnValue( + self::returnValue( [ 'contentobject_id' => 102, 'main_node_id' => 202, @@ -209,21 +210,21 @@ public function testRemoveSubtree() ) ); $this->getLocationGatewayMock() - ->expects($this->at(8)) + ->expects(self::at(8)) ->method('getChildren') ->with(202) - ->will($this->returnValue([])); + ->will(self::returnValue([])); $this->getLocationGatewayMock() - ->expects($this->at(9)) + ->expects(self::at(9)) ->method('countLocationsByContentId') ->with(102) - ->will($this->returnValue(2)); + ->will(self::returnValue(2)); $this->getLocationGatewayMock() - ->expects($this->at(10)) + ->expects(self::at(10)) ->method('getFallbackMainNodeData') ->with(102, 202) ->will( - $this->returnValue( + self::returnValue( [ 'node_id' => 203, 'contentobject_version' => 1, @@ -232,25 +233,25 @@ public function testRemoveSubtree() ) ); $treeHandler - ->expects($this->once()) + ->expects(self::once()) ->method('changeMainLocation') ->with(102, 203); $this->getLocationGatewayMock() - ->expects($this->at(11)) + ->expects(self::at(11)) ->method('removeLocation') ->with(202); $this->getLocationGatewayMock() - ->expects($this->at(12)) + ->expects(self::at(12)) ->method('deleteNodeAssignment') ->with(102); // Continuation of the original call $this->getLocationGatewayMock() - ->expects($this->at(13)) + ->expects(self::at(13)) ->method('removeLocation') ->with(42); $this->getLocationGatewayMock() - ->expects($this->at(14)) + ->expects(self::at(14)) ->method('deleteNodeAssignment') ->with(100); @@ -263,11 +264,11 @@ public function testSetSectionForSubtree() $treeHandler = $this->getTreeHandler(); $this->getLocationGatewayMock() - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('getBasicNodeData') ->with(69) ->will( - $this->returnValue( + self::returnValue( [ 'node_id' => 69, 'path_string' => '/1/2/69/', @@ -277,7 +278,7 @@ public function testSetSectionForSubtree() ); $this->getLocationGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('setSectionForSubtree') ->with('/1/2/69/', 3); @@ -295,36 +296,36 @@ public function testChangeMainLocation() ); $treeHandler - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('loadLocation') ->with(34) - ->will($this->returnValue(new Location(['parentId' => 42]))); + ->will(self::returnValue(new Location(['parentId' => 42]))); $treeHandler - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('loadContentInfo') ->with('12') - ->will($this->returnValue(new ContentInfo(['currentVersionNo' => 1]))); + ->will(self::returnValue(new ContentInfo(['currentVersionNo' => 1]))); $treeHandler - ->expects($this->at(2)) + ->expects(self::at(2)) ->method('loadLocation') ->with(42) - ->will($this->returnValue(new Location(['contentId' => 84]))); + ->will(self::returnValue(new Location(['contentId' => 84]))); $treeHandler - ->expects($this->at(3)) + ->expects(self::at(3)) ->method('loadContentInfo') ->with('84') - ->will($this->returnValue(new ContentInfo(['sectionId' => 4]))); + ->will(self::returnValue(new ContentInfo(['sectionId' => 4]))); $this->getLocationGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('changeMainLocation') ->with(12, 34, 1, 42); $treeHandler - ->expects($this->once()) + ->expects(self::once()) ->method('setSectionForSubtree') ->with(34, 4); @@ -342,31 +343,31 @@ public function testChangeMainLocationToLocationWithoutContentInfo() ); $treeHandler - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('loadLocation') ->with(34) - ->will($this->returnValue(new Location(['parentId' => 1]))); + ->will(self::returnValue(new Location(['parentId' => 1]))); $treeHandler - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('loadContentInfo') ->with('12') - ->will($this->returnValue(new ContentInfo(['currentVersionNo' => 1]))); + ->will(self::returnValue(new ContentInfo(['currentVersionNo' => 1]))); $treeHandler - ->expects($this->at(2)) + ->expects(self::at(2)) ->method('loadLocation') ->with(1) - ->will($this->returnValue(new Location(['contentId' => 84]))); + ->will(self::returnValue(new Location(['contentId' => 84]))); $treeHandler - ->expects($this->at(3)) + ->expects(self::at(3)) ->method('loadContentInfo') ->with('84') - ->will($this->returnValue(new ContentInfo(['sectionId' => 4]))); + ->will(self::returnValue(new ContentInfo(['sectionId' => 4]))); $this->getLocationGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('changeMainLocation') ->with(12, 34, 1, 1); @@ -378,11 +379,11 @@ public function testLoadLocation() $treeHandler = $this->getTreeHandler(); $this->getLocationGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('getBasicNodeData') ->with(77) ->will( - $this->returnValue( + self::returnValue( [ 'node_id' => 77, ] @@ -390,14 +391,14 @@ public function testLoadLocation() ); $this->getLocationMapperMock() - ->expects($this->once()) + ->expects(self::once()) ->method('createLocationFromRow') ->with(['node_id' => 77]) - ->will($this->returnValue(new Location())); + ->will(self::returnValue(new Location())); $location = $treeHandler->loadLocation(77); - $this->assertTrue($location instanceof Location); + self::assertTrue($location instanceof Location); } /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Persistence\Legacy\Content\Location\Gateway */ diff --git a/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php b/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php index 74bb0971ee..850af03874 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action; use Ibexa\Contracts\Core\Persistence\Content; @@ -66,7 +67,7 @@ public function testConstructor() $this->getContentMapperMock() ); - $this->assertInstanceOf(AddField::class, $action); + self::assertInstanceOf(AddField::class, $action); } public function testApplySingleVersionSingleTranslation() @@ -77,34 +78,34 @@ public function testApplySingleVersionSingleTranslation() $action = $this->getMockedAction(['insertField']); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('listVersionNumbers') - ->with($this->equalTo($contentId)) - ->will($this->returnValue($versionNumbers)); + ->with(self::equalTo($contentId)) + ->will(self::returnValue($versionNumbers)); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('loadVersionedNameData') - ->with($this->equalTo([['id' => $contentId, 'version' => 1]])) - ->will($this->returnValue([])); + ->with(self::equalTo([['id' => $contentId, 'version' => 1]])) + ->will(self::returnValue([])); $this->getContentGatewayMock() - ->expects($this->at(2)) + ->expects(self::at(2)) ->method('load') ->with($contentId, 1) - ->will($this->returnValue([])); + ->will(self::returnValue([])); $this->getContentMapperMock() - ->expects($this->once()) + ->expects(self::once()) ->method('extractContentFromRows') ->with([], []) - ->will($this->returnValue([$content])); + ->will(self::returnValue([$content])); $action - ->expects($this->once()) + ->expects(self::once()) ->method('insertField') ->with($content, $this->getFieldReference(null, 1, 'cro-HR')) - ->will($this->returnValue('fieldId1')); + ->will(self::returnValue('fieldId1')); $action->apply($contentId); } @@ -117,40 +118,40 @@ public function testApplySingleVersionMultipleTranslations() $action = $this->getMockedAction(['insertField']); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('listVersionNumbers') - ->with($this->equalTo($contentId)) - ->will($this->returnValue($versionNumbers)); + ->with(self::equalTo($contentId)) + ->will(self::returnValue($versionNumbers)); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('loadVersionedNameData') - ->with($this->equalTo([['id' => $contentId, 'version' => 1]])) - ->will($this->returnValue([])); + ->with(self::equalTo([['id' => $contentId, 'version' => 1]])) + ->will(self::returnValue([])); $this->getContentGatewayMock() - ->expects($this->at(2)) + ->expects(self::at(2)) ->method('load') ->with($contentId, 1) - ->will($this->returnValue([])); + ->will(self::returnValue([])); $this->getContentMapperMock() - ->expects($this->once()) + ->expects(self::once()) ->method('extractContentFromRows') ->with([], []) - ->will($this->returnValue([$content])); + ->will(self::returnValue([$content])); $action - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('insertField') ->with($content, $this->getFieldReference(null, 1, 'eng-GB')) - ->will($this->returnValue('fieldId1')); + ->will(self::returnValue('fieldId1')); $action - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('insertField') ->with($content, $this->getFieldReference(null, 1, 'ger-DE')) - ->will($this->returnValue('fieldId2')); + ->will(self::returnValue('fieldId2')); $action->apply($contentId); } @@ -164,52 +165,52 @@ public function testApplyMultipleVersionsSingleTranslation() $action = $this->getMockedAction(['insertField']); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('listVersionNumbers') - ->with($this->equalTo($contentId)) - ->will($this->returnValue($versionNumbers)); + ->with(self::equalTo($contentId)) + ->will(self::returnValue($versionNumbers)); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('loadVersionedNameData') - ->with($this->equalTo([['id' => $contentId, 'version' => 1], ['id' => $contentId, 'version' => 2]])) - ->will($this->returnValue([])); + ->with(self::equalTo([['id' => $contentId, 'version' => 1], ['id' => $contentId, 'version' => 2]])) + ->will(self::returnValue([])); $this->getContentGatewayMock() - ->expects($this->at(2)) + ->expects(self::at(2)) ->method('load') ->with($contentId, 1) - ->will($this->returnValue([])); + ->will(self::returnValue([])); $this->getContentMapperMock() - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('extractContentFromRows') ->with([], []) - ->will($this->returnValue([$content1])); + ->will(self::returnValue([$content1])); $this->getContentGatewayMock() - ->expects($this->at(3)) + ->expects(self::at(3)) ->method('load') ->with($contentId, 2) - ->will($this->returnValue([])); + ->will(self::returnValue([])); $this->getContentMapperMock() - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('extractContentFromRows') ->with([], []) - ->will($this->returnValue([$content2])); + ->will(self::returnValue([$content2])); $action - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('insertField') ->with($content1, $this->getFieldReference(null, 1, 'eng-GB')) - ->will($this->returnValue('fieldId1')); + ->will(self::returnValue('fieldId1')); $action - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('insertField') ->with($content2, $this->getFieldReference('fieldId1', 2, 'eng-GB')) - ->will($this->returnValue('fieldId1')); + ->will(self::returnValue('fieldId1')); $action->apply($contentId); } @@ -223,64 +224,64 @@ public function testApplyMultipleVersionsMultipleTranslations() $action = $this->getMockedAction(['insertField']); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('listVersionNumbers') - ->with($this->equalTo($contentId)) - ->will($this->returnValue($versionNumbers)); + ->with(self::equalTo($contentId)) + ->will(self::returnValue($versionNumbers)); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('loadVersionedNameData') - ->with($this->equalTo([['id' => $contentId, 'version' => 1], ['id' => $contentId, 'version' => 2]])) - ->will($this->returnValue([])); + ->with(self::equalTo([['id' => $contentId, 'version' => 1], ['id' => $contentId, 'version' => 2]])) + ->will(self::returnValue([])); $this->getContentGatewayMock() - ->expects($this->at(2)) + ->expects(self::at(2)) ->method('load') ->with($contentId, 1) - ->will($this->returnValue([])); + ->will(self::returnValue([])); $this->getContentMapperMock() - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('extractContentFromRows') ->with([], []) - ->will($this->returnValue([$content1])); + ->will(self::returnValue([$content1])); $this->getContentGatewayMock() - ->expects($this->at(3)) + ->expects(self::at(3)) ->method('load') ->with($contentId, 2) - ->will($this->returnValue([])); + ->will(self::returnValue([])); $this->getContentMapperMock() - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('extractContentFromRows') ->with([], []) - ->will($this->returnValue([$content2])); + ->will(self::returnValue([$content2])); $action - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('insertField') ->with($content1, $this->getFieldReference(null, 1, 'eng-GB')) - ->will($this->returnValue('fieldId1')); + ->will(self::returnValue('fieldId1')); $action - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('insertField') ->with($content1, $this->getFieldReference(null, 1, 'ger-DE')) - ->will($this->returnValue('fieldId2')); + ->will(self::returnValue('fieldId2')); $action - ->expects($this->at(2)) + ->expects(self::at(2)) ->method('insertField') ->with($content2, $this->getFieldReference('fieldId1', 2, 'eng-GB')) - ->will($this->returnValue('fieldId1')); + ->will(self::returnValue('fieldId1')); $action - ->expects($this->at(3)) + ->expects(self::at(3)) ->method('insertField') ->with($content2, $this->getFieldReference('fieldId2', 2, 'ger-DE')) - ->will($this->returnValue('fieldId2')); + ->will(self::returnValue('fieldId2')); $action->apply($contentId); } @@ -298,30 +299,30 @@ public function testInsertNewField() $field->value = $value; $this->getFieldValueConverterMock() - ->expects($this->once()) + ->expects(self::once()) ->method('toStorageValue') ->with( $value, - $this->isInstanceOf(StorageFieldValue::class) + self::isInstanceOf(StorageFieldValue::class) ); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('insertNewField') ->with( $content, $field, - $this->isInstanceOf(StorageFieldValue::class) + self::isInstanceOf(StorageFieldValue::class) ) - ->will($this->returnValue(23)); + ->will(self::returnValue(23)); $this->getContentStorageHandlerMock() - ->expects($this->once()) + ->expects(self::once()) ->method('storeFieldData') ->with($versionInfo, $field) - ->will($this->returnValue(false)); + ->will(self::returnValue(false)); - $this->getContentGatewayMock()->expects($this->never())->method('updateField'); + $this->getContentGatewayMock()->expects(self::never())->method('updateField'); $action = $this->getMockedAction(); @@ -330,8 +331,8 @@ public function testInsertNewField() $refMethod->setAccessible(true); $fieldId = $refMethod->invoke($action, $content, $field); - $this->assertEquals(23, $fieldId); - $this->assertEquals(23, $field->id); + self::assertEquals(23, $fieldId); + self::assertEquals(23, $field->id); } public function testInsertNewFieldUpdating() @@ -347,35 +348,35 @@ public function testInsertNewFieldUpdating() $field->value = $value; $this->getFieldValueConverterMock() - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('toStorageValue') ->with( $value, - $this->isInstanceOf(StorageFieldValue::class) + self::isInstanceOf(StorageFieldValue::class) ); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('insertNewField') ->with( $content, $field, - $this->isInstanceOf(StorageFieldValue::class) + self::isInstanceOf(StorageFieldValue::class) ) - ->will($this->returnValue(23)); + ->will(self::returnValue(23)); $this->getContentStorageHandlerMock() - ->expects($this->once()) + ->expects(self::once()) ->method('storeFieldData') ->with($versionInfo, $field) - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('updateField') ->with( $field, - $this->isInstanceOf(StorageFieldValue::class) + self::isInstanceOf(StorageFieldValue::class) ); $action = $this->getMockedAction(); @@ -385,8 +386,8 @@ public function testInsertNewFieldUpdating() $refMethod->setAccessible(true); $fieldId = $refMethod->invoke($action, $content, $field); - $this->assertEquals(23, $fieldId); - $this->assertEquals(23, $field->id); + self::assertEquals(23, $fieldId); + self::assertEquals(23, $field->id); } public function testInsertExistingField() @@ -402,29 +403,29 @@ public function testInsertExistingField() $field->value = $value; $this->getFieldValueConverterMock() - ->expects($this->once()) + ->expects(self::once()) ->method('toStorageValue') ->with( $value, - $this->isInstanceOf(StorageFieldValue::class) + self::isInstanceOf(StorageFieldValue::class) ); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('insertExistingField') ->with( $content, $field, - $this->isInstanceOf(StorageFieldValue::class) + self::isInstanceOf(StorageFieldValue::class) ); $this->getContentStorageHandlerMock() - ->expects($this->once()) + ->expects(self::once()) ->method('storeFieldData') ->with($versionInfo, $field) - ->will($this->returnValue(false)); + ->will(self::returnValue(false)); - $this->getContentGatewayMock()->expects($this->never())->method('updateField'); + $this->getContentGatewayMock()->expects(self::never())->method('updateField'); $action = $this->getMockedAction(); @@ -433,8 +434,8 @@ public function testInsertExistingField() $refMethod->setAccessible(true); $fieldId = $refMethod->invoke($action, $content, $field); - $this->assertEquals(32, $fieldId); - $this->assertEquals(32, $field->id); + self::assertEquals(32, $fieldId); + self::assertEquals(32, $field->id); } public function testInsertExistingFieldUpdating() @@ -450,34 +451,34 @@ public function testInsertExistingFieldUpdating() $field->value = $value; $this->getFieldValueConverterMock() - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('toStorageValue') ->with( $value, - $this->isInstanceOf(StorageFieldValue::class) + self::isInstanceOf(StorageFieldValue::class) ); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('insertExistingField') ->with( $content, $field, - $this->isInstanceOf(StorageFieldValue::class) + self::isInstanceOf(StorageFieldValue::class) ); $this->getContentStorageHandlerMock() - ->expects($this->once()) + ->expects(self::once()) ->method('storeFieldData') ->with($versionInfo, $field) - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('updateField') ->with( $field, - $this->isInstanceOf(StorageFieldValue::class) + self::isInstanceOf(StorageFieldValue::class) ); $action = $this->getMockedAction(); @@ -487,8 +488,8 @@ public function testInsertExistingFieldUpdating() $refMethod->setAccessible(true); $fieldId = $refMethod->invoke($action, $content, $field); - $this->assertEquals(32, $fieldId); - $this->assertEquals(32, $field->id); + self::assertEquals(32, $fieldId); + self::assertEquals(32, $field->id); } /** diff --git a/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php b/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php index 434f513d02..034b5143d6 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action; use Ibexa\Contracts\Core\Persistence\Content; @@ -51,40 +52,40 @@ public function testApplySingleVersionSingleTranslation() $content = $this->getContentFixture(1, ['cro-HR' => $fieldId]); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('listVersionNumbers') - ->with($this->equalTo($contentId)) - ->will($this->returnValue($versionNumbers)); + ->with(self::equalTo($contentId)) + ->will(self::returnValue($versionNumbers)); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('loadVersionedNameData') - ->with($this->equalTo([['id' => $contentId, 'version' => 1]])) - ->will($this->returnValue([])); + ->with(self::equalTo([['id' => $contentId, 'version' => 1]])) + ->will(self::returnValue([])); $this->getContentGatewayMock() - ->expects($this->at(2)) + ->expects(self::at(2)) ->method('load') ->with($contentId, 1) - ->will($this->returnValue([])); + ->will(self::returnValue([])); $this->getContentMapperMock() - ->expects($this->once()) + ->expects(self::once()) ->method('extractContentFromRows') ->with([], []) - ->will($this->returnValue([$content])); + ->will(self::returnValue([$content])); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('deleteField') - ->with($this->equalTo($fieldId)); + ->with(self::equalTo($fieldId)); - $this->getContentStorageHandlerMock()->expects($this->once()) + $this->getContentStorageHandlerMock()->expects(self::once()) ->method('deleteFieldData') ->with( - $this->equalTo('ezstring'), + self::equalTo('ezstring'), $content->versionInfo, - $this->equalTo([$fieldId]) + self::equalTo([$fieldId]) ); $action->apply($contentId); @@ -100,62 +101,62 @@ public function testApplyMultipleVersionsSingleTranslation() $content2 = $this->getContentFixture(2, ['cro-HR' => $fieldId]); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('listVersionNumbers') - ->with($this->equalTo($contentId)) - ->will($this->returnValue($versionNumbers)); + ->with(self::equalTo($contentId)) + ->will(self::returnValue($versionNumbers)); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('loadVersionedNameData') - ->with($this->equalTo([['id' => $contentId, 'version' => 1], ['id' => $contentId, 'version' => 2]])) - ->will($this->returnValue([])); + ->with(self::equalTo([['id' => $contentId, 'version' => 1], ['id' => $contentId, 'version' => 2]])) + ->will(self::returnValue([])); $this->getContentGatewayMock() - ->expects($this->at(2)) + ->expects(self::at(2)) ->method('load') ->with($contentId, 1) - ->will($this->returnValue([])); + ->will(self::returnValue([])); $this->getContentMapperMock() - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('extractContentFromRows') ->with([], []) - ->will($this->returnValue([$content1])); + ->will(self::returnValue([$content1])); $this->getContentGatewayMock() - ->expects($this->at(3)) + ->expects(self::at(3)) ->method('load') ->with($contentId, 2) - ->will($this->returnValue([])); + ->will(self::returnValue([])); $this->getContentMapperMock() - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('extractContentFromRows') ->with([], []) - ->will($this->returnValue([$content2])); + ->will(self::returnValue([$content2])); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('deleteField') - ->with($this->equalTo($fieldId)); + ->with(self::equalTo($fieldId)); $this->getContentStorageHandlerMock() - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('deleteFieldData') ->with( - $this->equalTo('ezstring'), + self::equalTo('ezstring'), $content1->versionInfo, - $this->equalTo([$fieldId]) + self::equalTo([$fieldId]) ); $this->getContentStorageHandlerMock() - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('deleteFieldData') ->with( - $this->equalTo('ezstring'), + self::equalTo('ezstring'), $content2->versionInfo, - $this->equalTo([$fieldId]) + self::equalTo([$fieldId]) ); $action->apply($contentId); @@ -172,73 +173,73 @@ public function testApplyMultipleVersionsMultipleTranslations() $content2 = $this->getContentFixture(2, ['cro-HR' => $fieldId1, 'hun-HU' => $fieldId2]); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('listVersionNumbers') - ->with($this->equalTo($contentId)) - ->will($this->returnValue($versionNumbers)); + ->with(self::equalTo($contentId)) + ->will(self::returnValue($versionNumbers)); $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('loadVersionedNameData') - ->with($this->equalTo([['id' => $contentId, 'version' => 1], ['id' => $contentId, 'version' => 2]])) - ->will($this->returnValue([])); + ->with(self::equalTo([['id' => $contentId, 'version' => 1], ['id' => $contentId, 'version' => 2]])) + ->will(self::returnValue([])); $this->getContentGatewayMock() - ->expects($this->at(2)) + ->expects(self::at(2)) ->method('load') ->with($contentId, 1) - ->will($this->returnValue([])); + ->will(self::returnValue([])); $this->getContentMapperMock() - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('extractContentFromRows') ->with([], []) - ->will($this->returnValue([$content1])); + ->will(self::returnValue([$content1])); $this->getContentGatewayMock() - ->expects($this->at(3)) + ->expects(self::at(3)) ->method('load') ->with($contentId, 2) - ->will($this->returnValue([])); + ->will(self::returnValue([])); $this->getContentMapperMock() - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('extractContentFromRows') ->with([], []) - ->will($this->returnValue([$content2])); + ->will(self::returnValue([$content2])); $this->getContentGatewayMock() - ->expects($this->at(5)) + ->expects(self::at(5)) ->method('deleteField') - ->with($this->equalTo($fieldId1)); + ->with(self::equalTo($fieldId1)); $this->getContentGatewayMock() - ->expects($this->at(6)) + ->expects(self::at(6)) ->method('deleteField') - ->with($this->equalTo($fieldId2)); + ->with(self::equalTo($fieldId2)); $this->getContentStorageHandlerMock() - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('deleteFieldData') ->with( - $this->equalTo('ezstring'), + self::equalTo('ezstring'), $content1->versionInfo, - $this->equalTo([$fieldId1, $fieldId2]) + self::equalTo([$fieldId1, $fieldId2]) ); $this->getContentStorageHandlerMock() - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('deleteFieldData') ->with( - $this->equalTo('ezstring'), + self::equalTo('ezstring'), $content2->versionInfo, - $this->equalTo([$fieldId1, $fieldId2]) + self::equalTo([$fieldId1, $fieldId2]) ); $this->getContentGatewayMock() - ->expects($this->at(4)) + ->expects(self::at(4)) ->method('removeRelationsByFieldDefinitionId') - ->with($this->equalTo(42)); + ->with(self::equalTo(42)); $action->apply($contentId); } diff --git a/tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php b/tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php index 13eb38a168..6758f41d14 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Type; use Ibexa\Contracts\Core\Persistence\Content\Type; @@ -65,11 +66,11 @@ public function testDetermineActions() $toType = $this->getToTypeFixture(); $converterRegMock = $this->getConverterRegistryMock(); - $converterRegMock->expects($this->once()) + $converterRegMock->expects(self::once()) ->method('getConverter') ->with('ezstring') ->will( - $this->returnValue( + self::returnValue( ($converterMock = $this->createMock(Converter::class)) ) ); @@ -78,7 +79,7 @@ public function testDetermineActions() $actions = $updater->determineActions($fromType, $toType); - $this->assertEquals( + self::assertEquals( [ new ContentUpdater\Action\RemoveField( $this->getContentGatewayMock(), @@ -108,10 +109,10 @@ public function testApplyUpdates() '', false ); - $actionA->expects($this->at(0)) + $actionA->expects(self::at(0)) ->method('apply') ->with(11); - $actionA->expects($this->at(1)) + $actionA->expects(self::at(1)) ->method('apply') ->with(22); $actionB = $this->getMockForAbstractClass( @@ -120,21 +121,21 @@ public function testApplyUpdates() '', false ); - $actionB->expects($this->at(0)) + $actionB->expects(self::at(0)) ->method('apply') ->with(11); - $actionB->expects($this->at(1)) + $actionB->expects(self::at(1)) ->method('apply') ->with(22); $actions = [$actionA, $actionB]; $this->getContentGatewayMock() - ->expects($this->once()) + ->expects(self::once()) ->method('getContentIdsByContentTypeId') ->with(23) ->will( - $this->returnValue([11, 22]) + self::returnValue([11, 22]) ); $updater->applyUpdates(23, $actions); diff --git a/tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php index f06999a73e..ec51ee80d5 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Type\Gateway; use Ibexa\Contracts\Core\Persistence\Content\Location; @@ -198,11 +199,11 @@ public function testCountTypesInGroup() $gateway = $this->getGateway(); - $this->assertEquals( + self::assertEquals( 3, $gateway->countTypesInGroup(1) ); - $this->assertEquals( + self::assertEquals( 0, $gateway->countTypesInGroup(23) ); @@ -216,11 +217,11 @@ public function testCountGroupsForType() $gateway = $this->getGateway(); - $this->assertEquals( + self::assertEquals( 1, $gateway->countGroupsForType(1, 1) ); - $this->assertEquals( + self::assertEquals( 0, $gateway->countGroupsForType(23, 0) ); @@ -257,7 +258,7 @@ public function testLoadGroupData() $gateway = $this->getGateway(); $data = $gateway->loadGroupData([2]); - $this->assertEquals( + self::assertEquals( [ [ 'created' => '1031216941', @@ -282,7 +283,7 @@ public function testLoadGroupDataByIdentifier() $gateway = $this->getGateway(); $data = $gateway->loadGroupDataByIdentifier('Users'); - $this->assertEquals( + self::assertEquals( [ [ 'created' => '1031216941', @@ -307,12 +308,12 @@ public function testLoadAllGroupsData() $gateway = $this->getGateway(); $data = $gateway->loadAllGroupsData(); - $this->assertCount( + self::assertCount( 3, $data ); - $this->assertEquals( + self::assertEquals( [ 'created' => '1031216941', 'creator_id' => '14', @@ -335,7 +336,7 @@ public function testLoadTypesDataForGroup() $gateway = $this->getGateway(); $rows = $gateway->loadTypesDataForGroup(1, 0); - $this->assertCount( + self::assertCount( 4, $rows ); @@ -350,11 +351,11 @@ public function testLoadTypeData() $gateway = $this->getGateway(); $rows = $gateway->loadTypeData(1, 0); - $this->assertCount( + self::assertCount( 3, $rows ); - $this->assertCount( + self::assertCount( 50, $rows[0] ); @@ -378,11 +379,11 @@ public function testLoadTypeDataByIdentifier() $gateway = $this->getGateway(); $rows = $gateway->loadTypeDataByIdentifier('folder', 0); - $this->assertCount( + self::assertCount( 3, $rows ); - $this->assertCount( + self::assertCount( 50, $rows[0] ); @@ -397,11 +398,11 @@ public function testLoadTypeDataByRemoteId() $gateway = $this->getGateway(); $rows = $gateway->loadTypeDataByRemoteId('a3d405b81be900468eb153d774f4f0d2', 0); - $this->assertCount( + self::assertCount( 3, $rows ); - $this->assertCount( + self::assertCount( 50, $rows[0] ); @@ -942,7 +943,7 @@ public function testCountInstancesOfTypeExist() $gateway = $this->getGateway(); $res = $gateway->countInstancesOfType(3, 0); - $this->assertEquals( + self::assertEquals( 6, $res ); @@ -958,7 +959,7 @@ public function testCountInstancesOfTypeNotExist() $gateway = $this->getGateway(); $res = $gateway->countInstancesOfType(23422342, 1); - $this->assertEquals( + self::assertEquals( 0, $res ); diff --git a/tests/lib/Persistence/Legacy/Content/Type/MapperTest.php b/tests/lib/Persistence/Legacy/Content/Type/MapperTest.php index ac0c855526..424fc60e2d 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/MapperTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Type; use Ibexa\Contracts\Core\Persistence\Content\Location; @@ -39,7 +40,7 @@ public function testCreateGroupFromCreateStruct() $group = $mapper->createGroupFromCreateStruct($createStruct); - $this->assertInstanceOf( + self::assertInstanceOf( Group::class, $group ); @@ -94,7 +95,7 @@ public function testTypeFromCreateStruct() $type = $mapper->createTypeFromCreateStruct($struct); foreach ($struct as $propName => $propVal) { - $this->assertEquals( + self::assertEquals( $struct->$propName, $type->$propName, "Property \${$propName} not equal" @@ -204,7 +205,7 @@ public function testCreateStructFromType() // Iterate through struct, since it has fewer props foreach ($struct as $propName => $propVal) { - $this->assertEquals( + self::assertEquals( $struct->$propName, $type->$propName, "Property \${$propName} not equal" @@ -287,7 +288,7 @@ public function testExtractGroupsFromRows() $groupFixtureSystem->identifier = 'System'; $groupFixtureSystem->isSystem = true; - $this->assertEquals( + self::assertEquals( [$groupFixtureMedia, $groupFixtureSystem], $groups ); @@ -300,7 +301,7 @@ public function testExtractTypesFromRowsSingle() $mapper = $this->getNonConvertingMapper(); $types = $mapper->extractTypesFromRows($rows); - $this->assertCount( + self::assertCount( 1, $types, 'Incorrect number of types extracted' @@ -332,7 +333,7 @@ public function testExtractTypesFromRowsSingle() $types[0] ); - $this->assertCount( + self::assertCount( 4, $types[0]->fieldDefinitions, 'Incorrect number of field definitions' @@ -377,13 +378,13 @@ public function testExtractTypesFromRowsSingle() public function testToStorageFieldDefinition() { $converterMock = $this->createMock(Converter::class); - $converterMock->expects($this->once()) + $converterMock->expects(self::once()) ->method('toStorageFieldDefinition') ->with( - $this->isInstanceOf( + self::isInstanceOf( FieldDefinition::class ), - $this->isInstanceOf( + self::isInstanceOf( StorageFieldDefinition::class ) ); @@ -415,14 +416,14 @@ public function testToFieldDefinition() $fieldDef->fieldType = 'some_type'; $converterMock = $this->createMock(Converter::class); - $converterMock->expects($this->once()) + $converterMock->expects(self::once()) ->method('toFieldDefinition') ->with($storageFieldDef, $fieldDef); $converterRegistry = new ConverterRegistry(['some_type' => $converterMock]); $storageDispatcher = $this->getStorageDispatcherMock(); $storageDispatcher - ->expects($this->once()) + ->expects(self::once()) ->method('loadFieldConstraintsData') ->with($fieldDef); @@ -452,14 +453,14 @@ protected function getNonConvertingMapper() ->getMock(); // Dedicatedly tested test - $mapper->expects($this->atLeastOnce()) + $mapper->expects(self::atLeastOnce()) ->method('toFieldDefinition') ->with( - $this->isInstanceOf( + self::isInstanceOf( StorageFieldDefinition::class ) )->will( - $this->returnCallback( + self::returnCallback( static function () { return new FieldDefinition(); } diff --git a/tests/lib/Persistence/Legacy/Content/Type/StorageDispatcherTest.php b/tests/lib/Persistence/Legacy/Content/Type/StorageDispatcherTest.php index 50f4e3ab40..c99c84d98d 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/StorageDispatcherTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/StorageDispatcherTest.php @@ -25,7 +25,7 @@ public function testPublishFieldConstraintsData(): void { $storage = $this->createMock(FieldConstraintsStorage::class); $storage - ->expects($this->once()) + ->expects(self::once()) ->method('publishFieldConstraintsData') ->with(self::EXAMPLE_FIELD_DEFINITION_ID); @@ -46,7 +46,7 @@ public function testStoreFieldConstraintsData(): void $storage = $this->createMock(FieldConstraintsStorage::class); $storage - ->expects($this->once()) + ->expects(self::once()) ->method('storeFieldConstraintsData') ->with(self::EXAMPLE_FIELD_DEFINITION_ID, $status, $constraints); @@ -81,7 +81,7 @@ public function testLoadFieldConstraintsData(): void $storage = $this->createMock(FieldConstraintsStorage::class); $storage - ->expects($this->once()) + ->expects(self::once()) ->method('getFieldConstraintsData') ->with(self::EXAMPLE_FIELD_DEFINITION_ID) ->willReturn($constraints); @@ -125,7 +125,7 @@ public function testDeleteFieldConstraintsData(): void { $storage = $this->createMock(FieldConstraintsStorage::class); $storage - ->expects($this->once()) + ->expects(self::once()) ->method('deleteFieldConstraintsData') ->with(self::EXAMPLE_FIELD_DEFINITION_ID); @@ -156,7 +156,7 @@ private function createStorageRegistryMockWithoutExternalStorage(): StorageRegis $registry = $this->createMock(StorageRegistryInterface::class); $registry->method('hasStorage')->with(self::EXAMPLE_FIELD_TYPE_IDENTIFIER)->willReturn(false); $registry - ->expects($this->never()) + ->expects(self::never()) ->method('getStorage') ->with(self::EXAMPLE_FIELD_TYPE_IDENTIFIER); diff --git a/tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php index b5a4d87770..33dcae560c 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\UrlAlias\Gateway; use Ibexa\Core\Persistence\Legacy\Content\Language\Gateway\DoctrineDatabase as LanguageGateway; diff --git a/tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php b/tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php index ea188520d3..d7b0ebee88 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\UrlAlias; use Ibexa\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter; @@ -31,17 +32,17 @@ public function testConvert() $transformedText = 'test text c '; $slug = 'test_text_c'; - $transformationProcessor->expects($this->atLeastOnce()) + $transformationProcessor->expects(self::atLeastOnce()) ->method('transform') ->with($text, ['test_command1']) - ->will($this->returnValue($transformedText)); + ->will(self::returnValue($transformedText)); - $slugConverter->expects($this->once()) + $slugConverter->expects(self::once()) ->method('cleanupText') - ->with($this->equalTo($transformedText), $this->equalTo('test_cleanup1')) - ->will($this->returnValue($slug)); + ->with(self::equalTo($transformedText), self::equalTo('test_cleanup1')) + ->will(self::returnValue($slug)); - $this->assertEquals( + self::assertEquals( $slug, $slugConverter->convert($text) ); @@ -59,17 +60,17 @@ public function testConvertWithDefaultTextFallback() $transformedText = 'test text c '; $slug = 'test_text_c'; - $transformationProcessor->expects($this->atLeastOnce()) + $transformationProcessor->expects(self::atLeastOnce()) ->method('transform') ->with($defaultText, ['test_command1']) - ->will($this->returnValue($transformedText)); + ->will(self::returnValue($transformedText)); - $slugConverter->expects($this->once()) + $slugConverter->expects(self::once()) ->method('cleanupText') - ->with($this->equalTo($transformedText), $this->equalTo('test_cleanup1')) - ->will($this->returnValue($slug)); + ->with(self::equalTo($transformedText), self::equalTo('test_cleanup1')) + ->will(self::returnValue($slug)); - $this->assertEquals( + self::assertEquals( $slug, $slugConverter->convert('', $defaultText) ); @@ -87,17 +88,17 @@ public function testConvertWithGivenTransformation() $transformedText = 'test text c '; $slug = 'test_text_c'; - $transformationProcessor->expects($this->atLeastOnce()) + $transformationProcessor->expects(self::atLeastOnce()) ->method('transform') ->with($text, ['test_command2']) - ->will($this->returnValue($transformedText)); + ->will(self::returnValue($transformedText)); - $slugConverter->expects($this->once()) + $slugConverter->expects(self::once()) ->method('cleanupText') - ->with($this->equalTo($transformedText), $this->equalTo('test_cleanup2')) - ->will($this->returnValue($slug)); + ->with(self::equalTo($transformedText), self::equalTo('test_cleanup2')) + ->will(self::returnValue($slug)); - $this->assertEquals( + self::assertEquals( $slug, $slugConverter->convert($text, '_1', 'testTransformation2') ); @@ -122,7 +123,7 @@ public function testGetUniqueCounterValue($text, $isRootLevel, $returnValue) { $slugConverter = $this->getMockedSlugConverter(); - $this->assertEquals( + self::assertEquals( $returnValue, $slugConverter->getUniqueCounterValue($text, $isRootLevel) ); @@ -164,7 +165,7 @@ public function testCleanupText($text, $method, $expected) $actual = $testMethod->invoke($this->getMockedSlugConverter(), $text, $method); - $this->assertEquals( + self::assertEquals( $expected, $actual ); @@ -216,7 +217,7 @@ public function testConvertNoMocking($text, $defaultText, $transformation, $expe ); $slugConverter = new SlugConverter($transformationProcessor); - $this->assertEquals( + self::assertEquals( $expected, $slugConverter->convert($text, $defaultText, $transformation) ); diff --git a/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php b/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php index 13569aefd1..748f7d2b75 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\UrlAlias; use Ibexa\Contracts\Core\Persistence\Content\UrlAlias; @@ -342,7 +343,9 @@ public function providerForTestLookupLocationUrlAlias() * Testing that UrlAlias is found and has expected state. * * @dataProvider providerForTestLookupLocationUrlAlias + * * @depends testLookup + * * @group location */ public function testLookupLocationUrlAlias( @@ -390,7 +393,9 @@ public function testLookupLocationUrlAlias( * * * @dataProvider providerForTestLookupLocationUrlAlias + * * @depends testLookup + * * @group case-correction * @group location * @@ -518,7 +523,9 @@ public function providerForTestLookupLocationMultipleLanguages() * Test for the lookup() method. * * @dataProvider providerForTestLookupLocationMultipleLanguages + * * @depends testLookup + * * @group multiple-languages * @group location */ @@ -560,6 +567,7 @@ public function testLookupLocationMultipleLanguages( * @todo document * * @depends testLookup + * * @group history * @group location */ @@ -698,7 +706,9 @@ public function providerForTestLookupCustomLocationUrlAlias() * Testing that UrlAlias is found and has expected state. * * @dataProvider providerForTestLookupCustomLocationUrlAlias + * * @depends testLookup + * * @group location * @group custom */ @@ -740,7 +750,9 @@ public function testLookupCustomLocationUrlAlias( * Testing that UrlAlias is found and has expected state. * * @dataProvider providerForTestLookupCustomLocationUrlAlias + * * @depends testLookup + * * @group location * @group custom */ @@ -797,7 +809,9 @@ public function providerForTestLookupVirtualUrlAlias() * Testing that NOP action redirects to site root. * * @dataProvider providerForTestLookupVirtualUrlAlias + * * @depends testLookup + * * @group virtual */ public function testLookupVirtualUrlAlias($url, $id) @@ -866,7 +880,9 @@ public function providerForTestLookupResourceUrlAlias() * Testing that UrlAlias is found and has expected state. * * @dataProvider providerForTestLookupResourceUrlAlias + * * @depends testLookup + * * @group resource */ public function testLookupResourceUrlAlias( @@ -908,7 +924,9 @@ public function testLookupResourceUrlAlias( * Testing that UrlAlias is found and has expected state. * * @dataProvider providerForTestLookupResourceUrlAlias + * * @depends testLookup + * * @group resource */ public function testLookupResourceUrlAliasCaseInsensitive( @@ -1038,8 +1056,8 @@ public function testListURLAliasesForLocation() * * @todo document * - * * @depends testLookupLocationUrlAlias + * * @group publish */ public function testPublishUrlAliasForLocation() @@ -1082,8 +1100,8 @@ public function testPublishUrlAliasForLocation() * * @todo document * - * * @depends testPublishUrlAliasForLocation + * * @group publish */ public function testPublishUrlAliasForLocationRepublish() @@ -1108,8 +1126,8 @@ public function testPublishUrlAliasForLocationRepublish() * * @todo document * - * * @depends testPublishUrlAliasForLocation + * * @group publish */ public function testPublishUrlAliasCreatesUniqueAlias() @@ -1160,9 +1178,10 @@ public function providerForTestPublishUrlAliasForLocationComplex() * * @todo document * - * * @dataProvider providerForTestPublishUrlAliasForLocationComplex + * * @depends testPublishUrlAliasForLocation + * * @group publish */ public function testPublishUrlAliasForLocationComplex( @@ -1209,8 +1228,8 @@ public function testPublishUrlAliasForLocationComplex( * * @todo document * - * * @depends testPublishUrlAliasForLocation + * * @group publish */ public function testPublishUrlAliasForLocationSameAliasForMultipleLanguages() @@ -1258,8 +1277,8 @@ public function testPublishUrlAliasForLocationSameAliasForMultipleLanguages() * * @todo document * - * * @depends testPublishUrlAliasForLocation + * * @group publish */ public function testPublishUrlAliasForLocationDowngradesOldEntryToHistory() @@ -1330,9 +1349,9 @@ public function testPublishUrlAliasForLocationDowngradesOldEntryToHistory() * * @todo document * - * * @depends testPublishUrlAliasForLocation * @depends testPublishUrlAliasForLocationSameAliasForMultipleLanguages + * * @group publish * @group downgrade */ @@ -1405,9 +1424,9 @@ public function testPublishUrlAliasForLocationDowngradesOldEntryRemovesLanguage( * * @todo document * - * * @depends testPublishUrlAliasForLocation * @depends testPublishUrlAliasForLocationDowngradesOldEntryToHistory + * * @group publish */ public function testPublishUrlAliasForLocationReusesHistory() @@ -1438,9 +1457,9 @@ public function testPublishUrlAliasForLocationReusesHistory() * * @todo document * - * * @depends testPublishUrlAliasForLocation * @depends testPublishUrlAliasForLocationDowngradesOldEntryToHistory + * * @group publish */ public function testPublishUrlAliasForLocationReusesHistoryOfDifferentLanguage() @@ -1491,8 +1510,8 @@ public function testPublishUrlAliasForLocationReusesHistoryOfDifferentLanguage() * * @todo document * - * * @depends testPublishUrlAliasForLocation + * * @group publish */ public function testPublishUrlAliasForLocationReusesCustomAlias() @@ -1516,7 +1535,6 @@ public function testPublishUrlAliasForLocationReusesCustomAlias() * * @todo document * - * * @depends testPublishUrlAliasForLocation */ public function testPublishUrlAliasForLocationReusingNopElement() @@ -1587,7 +1605,6 @@ public function testPublishUrlAliasForLocationReusingNopElement() * * @todo document * - * * @depends testPublishUrlAliasForLocation * @depends testPublishUrlAliasForLocationReusingNopElement */ @@ -1636,7 +1653,6 @@ public function testPublishUrlAliasForLocationReusingNopElementChangesCustomPath * * @todo document * - * * @depends testPublishUrlAliasForLocation * @depends testPublishUrlAliasForLocationReusingNopElementChangesCustomPath */ @@ -1690,7 +1706,7 @@ public function testPublishUrlAliasReuseNopCleanupCustomAliasIsDestroyed() $handler->publishUrlAliasForLocation(314, 2, 'nop-element', 'cro-HR', false); $urlAlias = $handler->lookup('jedan'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('jedan'), @@ -1713,7 +1729,7 @@ public function testPublishUrlAliasReuseNopCleanupCustomAliasIsDestroyed() ); $urlAlias = $handler->lookup('nop-element'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('nop-element'), @@ -1742,7 +1758,7 @@ public function testPublishUrlAliasReuseNopCleanupCustomAliasIsDestroyed() try { $handler->lookup('nop-element/search'); - $this->fail('Custom alias is not destroyed'); + self::fail('Custom alias is not destroyed'); } catch (NotFoundException $e) { // Custom alias is destroyed by reusing NOP entry with existing autogenerated alias // on the same level (that means link and ID are updated to the existing alias ID, @@ -1763,7 +1779,7 @@ public function testPublishUrlAliasReuseHistoryCleanup() $handler->publishUrlAliasForLocation(314, 2, 'tri', 'cro-HR', false); $urlAlias = $handler->lookup('jedan'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('jedan'), @@ -1786,7 +1802,7 @@ public function testPublishUrlAliasReuseHistoryCleanup() ); $urlAlias = $handler->lookup('tri'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('tri'), @@ -1827,7 +1843,7 @@ public function testPublishUrlAliasReuseAutogeneratedCleanup() $handler->publishUrlAliasForLocation(314, 2, 'dva', 'cro-HR', false); $urlAlias = $handler->lookup('jedan'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('jedan'), @@ -1850,7 +1866,7 @@ public function testPublishUrlAliasReuseAutogeneratedCleanup() ); $urlAlias = $handler->lookup('dva'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('dva'), @@ -1891,22 +1907,22 @@ public function testCreateCustomUrlAliasBehaviour() $handlerMock = $this->getPartlyMockedHandler(['createUrlAlias']); $handlerMock->expects( - $this->once() + self::once() )->method( 'createUrlAlias' )->with( - $this->equalTo('eznode:1'), - $this->equalTo('path'), - $this->equalTo(false), - $this->equalTo(null), - $this->equalTo(false) + self::equalTo('eznode:1'), + self::equalTo('path'), + self::equalTo(false), + self::equalTo(null), + self::equalTo(false) )->will( - $this->returnValue( + self::returnValue( new UrlAlias() ) ); - $this->assertInstanceOf( + self::assertInstanceOf( UrlAlias::class, $handlerMock->createCustomUrlAlias(1, 'path') ); @@ -1924,22 +1940,22 @@ public function testCreateGlobalUrlAliasBehaviour() $handlerMock = $this->getPartlyMockedHandler(['createUrlAlias']); $handlerMock->expects( - $this->once() + self::once() )->method( 'createUrlAlias' )->with( - $this->equalTo('module/module'), - $this->equalTo('path'), - $this->equalTo(false), - $this->equalTo(null), - $this->equalTo(false) + self::equalTo('module/module'), + self::equalTo('path'), + self::equalTo(false), + self::equalTo(null), + self::equalTo(false) )->will( - $this->returnValue( + self::returnValue( new UrlAlias() ) ); - $this->assertInstanceOf( + self::assertInstanceOf( UrlAlias::class, $handlerMock->createGlobalUrlAlias('module/module', 'path') ); @@ -2526,7 +2542,7 @@ public function testLocationDeleted() foreach ($removedAliases as $path) { try { $handler->lookup($path); - $this->fail("Alias '$path' not removed!"); + self::fail("Alias '$path' not removed!"); } catch (NotFoundException $e) { // Do nothing } @@ -3174,7 +3190,9 @@ public function providerForTestPublishUrlAliasForLocationSkipsReservedWord() * Test for the publishUrlAliasForLocation() method. * * @dataProvider providerForTestPublishUrlAliasForLocationSkipsReservedWord + * * @covers \Ibexa\Core\Persistence\Legacy\Content\UrlAlias\Handler::publishUrlAliasForLocation + * * @group publish */ public function testPublishUrlAliasForLocationSkipsReservedWord($text, $alias) @@ -3186,8 +3204,8 @@ public function testPublishUrlAliasForLocationSkipsReservedWord($text, $alias) $urlAlias = $handler->lookup($alias); - $this->assertEquals(314, $urlAlias->destination); - $this->assertEquals(['kli-KR'], $urlAlias->languageCodes); + self::assertEquals(314, $urlAlias->destination); + self::assertEquals(['kli-KR'], $urlAlias->languageCodes); } /** @@ -3204,13 +3222,13 @@ public function testLocationSwappedSimple() $handler->locationSwapped(316, 314, 317, 315); - $this->assertEquals( + self::assertEquals( $countBeforeReusing, $this->countRows() ); $urlAlias = $handler->lookup('jedan/swap'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '2-' . md5('swap'), @@ -3243,7 +3261,7 @@ public function testLocationSwappedSimple() ); $urlAlias = $handler->lookup('dva/swap'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '3-' . md5('swap'), @@ -3290,13 +3308,13 @@ public function testLocationSwappedSimpleWithHistory() $handler->locationSwapped(316, 314, 317, 315); - $this->assertEquals( + self::assertEquals( $countBeforeReusing, $this->countRows() ); $urlAlias = $handler->lookup('jedan/swap'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '2-' . md5('swap'), @@ -3329,7 +3347,7 @@ public function testLocationSwappedSimpleWithHistory() ); $urlAlias = $handler->lookup('dva/swap'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '3-' . md5('swap'), @@ -3362,7 +3380,7 @@ public function testLocationSwappedSimpleWithHistory() ); $urlAlias = $handler->lookup('jedan/swap-new'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '2-' . md5('swap-new'), @@ -3395,7 +3413,7 @@ public function testLocationSwappedSimpleWithHistory() ); $urlAlias = $handler->lookup('dva/swap-new'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '3-' . md5('swap-new'), @@ -3450,7 +3468,7 @@ public function testLocationSwappedSimpleWithConflict() $handler->locationSwapped(316, 314, 317, 315); - $this->assertEquals( + self::assertEquals( $countBeforeReusing + 2, $this->countRows() ); @@ -3461,14 +3479,14 @@ public function testLocationSwappedSimpleWithConflict() $urlAlias1Historized = $handler->lookup('jedan/swap-new-1'); $urlAlias2Historized = $handler->lookup('dva/swap-new-2'); - $this->assertEquals($urlAlias1TakenExpected, $urlAlias1Taken); - $this->assertEquals($urlAlias2TakenExpected, $urlAlias2Taken); + self::assertEquals($urlAlias1TakenExpected, $urlAlias1Taken); + self::assertEquals($urlAlias2TakenExpected, $urlAlias2Taken); - $this->assertEquals($urlAlias1HistorizedExpected, $urlAlias1Historized); - $this->assertEquals($urlAlias2HistorizedExpected, $urlAlias2Historized); + self::assertEquals($urlAlias1HistorizedExpected, $urlAlias1Historized); + self::assertEquals($urlAlias2HistorizedExpected, $urlAlias2Historized); $urlAlias1New = $handler->lookup('jedan/swap-new-22'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '2-' . md5('swap-new-22'), @@ -3501,7 +3519,7 @@ public function testLocationSwappedSimpleWithConflict() ); $urlAlias2New = $handler->lookup('dva/swap-new-12'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '3-' . md5('swap-new-12'), @@ -3548,13 +3566,13 @@ public function testLocationSwappedSiblingsSimple() $handler->locationSwapped(314, 2, 315, 2); - $this->assertEquals( + self::assertEquals( $countBeforeReusing, $this->countRows() ); $urlAlias = $handler->lookup('jedan'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('jedan'), @@ -3581,7 +3599,7 @@ public function testLocationSwappedSiblingsSimple() ); $urlAlias = $handler->lookup('dva'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('dva'), @@ -3622,13 +3640,13 @@ public function testLocationSwappedSiblingsSimpleReverse() $handler->locationSwapped(315, 2, 314, 2); - $this->assertEquals( + self::assertEquals( $countBeforeReusing, $this->countRows() ); $urlAlias = $handler->lookup('jedan'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('jedan'), @@ -3655,7 +3673,7 @@ public function testLocationSwappedSiblingsSimpleReverse() ); $urlAlias = $handler->lookup('dva'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('dva'), @@ -3696,13 +3714,13 @@ public function testLocationSwappedSiblingsSimpleWithHistory() $handler->locationSwapped(314, 2, 315, 2); - $this->assertEquals( + self::assertEquals( $countBeforeReusing, $this->countRows() ); $urlAlias = $handler->lookup('jedan'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('jedan'), @@ -3729,7 +3747,7 @@ public function testLocationSwappedSiblingsSimpleWithHistory() ); $urlAlias = $handler->lookup('dva'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('dva'), @@ -3756,7 +3774,7 @@ public function testLocationSwappedSiblingsSimpleWithHistory() ); $urlAlias = $handler->lookup('jedan-new'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('jedan-new'), @@ -3783,7 +3801,7 @@ public function testLocationSwappedSiblingsSimpleWithHistory() ); $urlAlias = $handler->lookup('dva-new'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('dva-new'), @@ -3824,13 +3842,13 @@ public function testLocationSwappedSiblingsSimpleWithHistoryReverse() $handler->locationSwapped(315, 2, 314, 2); - $this->assertEquals( + self::assertEquals( $countBeforeReusing, $this->countRows() ); $urlAlias = $handler->lookup('jedan'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('jedan'), @@ -3857,7 +3875,7 @@ public function testLocationSwappedSiblingsSimpleWithHistoryReverse() ); $urlAlias = $handler->lookup('dva'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('dva'), @@ -3884,7 +3902,7 @@ public function testLocationSwappedSiblingsSimpleWithHistoryReverse() ); $urlAlias = $handler->lookup('jedan-new'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('jedan-new'), @@ -3911,7 +3929,7 @@ public function testLocationSwappedSiblingsSimpleWithHistoryReverse() ); $urlAlias = $handler->lookup('dva-new'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('dva-new'), @@ -3952,13 +3970,13 @@ public function testLocationSwappedSiblingsSameName() $handler->locationSwapped(314, 2, 315, 2); - $this->assertEquals( + self::assertEquals( $countBeforeReusing, $this->countRows() ); $urlAlias = $handler->lookup('swap'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('swap'), @@ -3985,7 +4003,7 @@ public function testLocationSwappedSiblingsSameName() ); $urlAlias = $handler->lookup('swap2'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('swap2'), @@ -4026,13 +4044,13 @@ public function testLocationSwappedSiblingsSameNameReverse() $handler->locationSwapped(315, 2, 314, 2); - $this->assertEquals( + self::assertEquals( $countBeforeReusing, $this->countRows() ); $urlAlias = $handler->lookup('swap'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('swap'), @@ -4059,7 +4077,7 @@ public function testLocationSwappedSiblingsSameNameReverse() ); $urlAlias = $handler->lookup('swap2'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('swap2'), @@ -4100,13 +4118,13 @@ public function testLocationSwappedSiblingsSameNameMultipleLanguages() $handler->locationSwapped(314, 2, 315, 2); - $this->assertEquals( + self::assertEquals( $countBeforeReusing, $this->countRows() ); $urlAlias = $handler->lookup('swap-hr'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('swap-hr'), @@ -4134,7 +4152,7 @@ public function testLocationSwappedSiblingsSameNameMultipleLanguages() ); $urlAlias = $handler->lookup('swap-hr2'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('swap-hr2'), @@ -4162,7 +4180,7 @@ public function testLocationSwappedSiblingsSameNameMultipleLanguages() ); $urlAlias = $handler->lookup('swap-en'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('swap-en'), @@ -4190,7 +4208,7 @@ public function testLocationSwappedSiblingsSameNameMultipleLanguages() ); $urlAlias = $handler->lookup('swap-en2'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '0-' . md5('swap-en2'), @@ -4237,7 +4255,7 @@ public function testLocationSwappedMultipleLanguagesSimple() $handler->locationSwapped(316, 314, 317, 315); - $this->assertEquals( + self::assertEquals( $countBeforeReusing, $this->countRows() ); @@ -4247,10 +4265,10 @@ public function testLocationSwappedMultipleLanguagesSimple() $urlAlias2HR = $handler->lookup('dva/swap-hr'); $urlAlias2EN = $handler->lookup('dva/swap-en'); - $this->assertEquals($urlAlias1HRExpected, $urlAlias1HR); - $this->assertEquals($urlAlias1ENExpected, $urlAlias1EN); - $this->assertEquals($urlAlias2HRExpected, $urlAlias2HR); - $this->assertEquals($urlAlias2ENExpected, $urlAlias2EN); + self::assertEquals($urlAlias1HRExpected, $urlAlias1HR); + self::assertEquals($urlAlias1ENExpected, $urlAlias1EN); + self::assertEquals($urlAlias2HRExpected, $urlAlias2HR); + self::assertEquals($urlAlias2ENExpected, $urlAlias2EN); } /** @@ -4267,13 +4285,13 @@ public function testLocationSwappedMultipleLanguagesDifferentLanguagesSimple() $handler->locationSwapped(316, 314, 317, 315); - $this->assertEquals( + self::assertEquals( $countBeforeReusing + 2, $this->countRows() ); $urlAlias = $handler->lookup('jedan/swap-hr'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '2-' . md5('swap-hr'), @@ -4307,7 +4325,7 @@ public function testLocationSwappedMultipleLanguagesDifferentLanguagesSimple() ); $urlAlias = $handler->lookup('jedan/swap-de'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '2-' . md5('swap-de'), @@ -4341,7 +4359,7 @@ public function testLocationSwappedMultipleLanguagesDifferentLanguagesSimple() ); $urlAlias = $handler->lookup('jedan/swap-en'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '2-' . md5('swap-en'), @@ -4374,7 +4392,7 @@ public function testLocationSwappedMultipleLanguagesDifferentLanguagesSimple() ); $urlAlias = $handler->lookup('dva/swap-hr'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '3-' . md5('swap-hr'), @@ -4408,7 +4426,7 @@ public function testLocationSwappedMultipleLanguagesDifferentLanguagesSimple() ); $urlAlias = $handler->lookup('dva/swap-en'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '3-' . md5('swap-en'), @@ -4442,7 +4460,7 @@ public function testLocationSwappedMultipleLanguagesDifferentLanguagesSimple() ); $urlAlias = $handler->lookup('dva/swap-de'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '3-' . md5('swap-de'), @@ -4489,13 +4507,13 @@ public function testLocationSwappedMultipleLanguagesDifferentLanguages() $handler->locationSwapped(317, 315, 316, 314); - $this->assertEquals( + self::assertEquals( $countBeforeReusing + 2, $this->countRows() ); $urlAlias = $handler->lookup('jedan/swap-this'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '2-' . md5('swap-this'), @@ -4531,7 +4549,7 @@ public function testLocationSwappedMultipleLanguagesDifferentLanguages() ); $urlAlias = $handler->lookup('jedan/swap-en'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '2-' . md5('swap-en'), @@ -4564,7 +4582,7 @@ public function testLocationSwappedMultipleLanguagesDifferentLanguages() ); $urlAlias = $handler->lookup('dva/swap-hr'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '3-' . md5('swap-hr'), @@ -4597,7 +4615,7 @@ public function testLocationSwappedMultipleLanguagesDifferentLanguages() ); $urlAlias = $handler->lookup('dva/swap-this'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '3-' . md5('swap-this'), @@ -4647,13 +4665,13 @@ public function testLocationSwappedMultipleLanguagesWithCompositeHistory() $handler->locationSwapped(317, 315, 316, 314); - $this->assertEquals( + self::assertEquals( $countBeforeReusing + 4, $this->countRows() ); $urlAlias = $handler->lookup('jedan/swap-this'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '2-' . md5('swap-this'), @@ -4686,7 +4704,7 @@ public function testLocationSwappedMultipleLanguagesWithCompositeHistory() ); $urlAlias = $handler->lookup('jedan/swap-en'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '2-' . md5('swap-en'), @@ -4719,7 +4737,7 @@ public function testLocationSwappedMultipleLanguagesWithCompositeHistory() ); $urlAlias = $handler->lookup('jedan/swap-hr'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '2-' . md5('swap-hr'), @@ -4754,7 +4772,7 @@ public function testLocationSwappedMultipleLanguagesWithCompositeHistory() ); $urlAlias = $handler->lookup('jedan/swap-that'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '2-' . md5('swap-that'), @@ -4790,7 +4808,7 @@ public function testLocationSwappedMultipleLanguagesWithCompositeHistory() ); $urlAlias = $handler->lookup('dva/swap-hr'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '3-' . md5('swap-hr'), @@ -4823,7 +4841,7 @@ public function testLocationSwappedMultipleLanguagesWithCompositeHistory() ); $urlAlias = $handler->lookup('dva/swap-that'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '3-' . md5('swap-that'), @@ -4858,7 +4876,7 @@ public function testLocationSwappedMultipleLanguagesWithCompositeHistory() ); $urlAlias = $handler->lookup('dva/swap-this'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '3-' . md5('swap-this'), @@ -4892,7 +4910,7 @@ public function testLocationSwappedMultipleLanguagesWithCompositeHistory() ); $urlAlias = $handler->lookup('dva/swap-en'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '3-' . md5('swap-en'), @@ -4940,13 +4958,13 @@ public function testLocationSwappedWithReusingExternalHistory() $handler->locationSwapped(318, 314, 319, 315); - $this->assertEquals( + self::assertEquals( $countBeforeReusing, $this->countRows() ); $urlAlias = $handler->lookup('jedan/swap-that'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '2-' . md5('swap-that'), @@ -4979,7 +4997,7 @@ public function testLocationSwappedWithReusingExternalHistory() ); $urlAlias = $handler->lookup('dva/swap-this'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '3-' . md5('swap-this'), @@ -5012,7 +5030,7 @@ public function testLocationSwappedWithReusingExternalHistory() ); $urlAlias = $handler->lookup('dva/swap-that'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '3-' . md5('swap-that'), @@ -5045,7 +5063,7 @@ public function testLocationSwappedWithReusingExternalHistory() ); $urlAlias = $handler->lookup('jedan/swap-this'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '2-' . md5('swap-this'), @@ -5092,13 +5110,13 @@ public function testLocationSwappedWithReusingNopEntry() $handler->locationSwapped(316, 314, 317, 315); - $this->assertEquals( + self::assertEquals( $countBeforeReusing + 1, $this->countRows() ); $urlAlias = $handler->lookup('jedan/swap-that'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '2-' . md5('swap-that'), @@ -5131,7 +5149,7 @@ public function testLocationSwappedWithReusingNopEntry() ); $urlAlias = $handler->lookup('dva/swap-this'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '3-' . md5('swap-this'), @@ -5164,7 +5182,7 @@ public function testLocationSwappedWithReusingNopEntry() ); $urlAlias = $handler->lookup('dva/swap-that'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '3-' . md5('swap-that'), @@ -5197,7 +5215,7 @@ public function testLocationSwappedWithReusingNopEntry() ); $urlAlias = $handler->lookup('jedan/swap-this'); - $this->assertEquals( + self::assertEquals( new UrlAlias( [ 'id' => '2-' . md5('swap-this'), @@ -5234,6 +5252,7 @@ public function testLocationSwappedWithReusingNopEntry() * Test for the locationSwapped() method. * * @depends testLocationSwappedWithReusingNopEntry + * * @group swap */ public function testLocationSwappedWithReusingNopEntryCustomAliasIsDestroyed() @@ -5246,7 +5265,7 @@ public function testLocationSwappedWithReusingNopEntryCustomAliasIsDestroyed() try { $handler->lookup('jedan/swap-that/search'); - $this->fail('Custom alias is not destroyed'); + self::fail('Custom alias is not destroyed'); } catch (NotFoundException $e) { // Custom alias is destroyed by reusing NOP entry with existing autogenerated alias // on the same level (that means link and ID are updated to the existing alias ID, @@ -5269,7 +5288,7 @@ public function testLocationSwappedUpdatesLocationPathIdentificationString() $handler->locationSwapped(314, 2, 315, 2); - $this->assertEquals( + self::assertEquals( $countBeforeReusing, $this->countRows() ); @@ -5296,7 +5315,7 @@ public function testLocationSwappedMultipleLanguagesUpdatesLocationPathIdentific $handler->locationSwapped(314, 2, 315, 2); - $this->assertEquals( + self::assertEquals( $countBeforeReusing, $this->countRows() ); diff --git a/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php b/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php index 2c76721889..90cc7a82c6 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\UrlAlias; use Ibexa\Contracts\Core\Persistence\Content\UrlAlias; diff --git a/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardMapperTest.php b/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardMapperTest.php index 8df9df5265..26b65e60c1 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardMapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardMapperTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Content\UrlWildcard; use Ibexa\Contracts\Core\Persistence\Content\UrlWildcard; diff --git a/tests/lib/Persistence/Legacy/FieldValue/Converter/ImageConverterTest.php b/tests/lib/Persistence/Legacy/FieldValue/Converter/ImageConverterTest.php index 804176ce0c..589724b461 100644 --- a/tests/lib/Persistence/Legacy/FieldValue/Converter/ImageConverterTest.php +++ b/tests/lib/Persistence/Legacy/FieldValue/Converter/ImageConverterTest.php @@ -60,7 +60,7 @@ public function testToStorageValue(FieldValue $fieldValue, string $expectedXml): $this->imageConverter->toStorageValue($fieldValue, $storageValue); - $this->assertEquals( + self::assertEquals( $expectedXml, $storageValue->dataText ); @@ -154,7 +154,7 @@ public function testToFieldValue(string $xml, FieldValue $expectedFieldValue): v $fieldValue = new FieldValue(); $this->imageConverter->toFieldValue($storageValue, $fieldValue); - $this->assertEquals( + self::assertEquals( $expectedFieldValue->data, $fieldValue->data ); diff --git a/tests/lib/Persistence/Legacy/HandlerTest.php b/tests/lib/Persistence/Legacy/HandlerTest.php index 3000d07044..5a1a9a44cd 100644 --- a/tests/lib/Persistence/Legacy/HandlerTest.php +++ b/tests/lib/Persistence/Legacy/HandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy; use Ibexa\Contracts\Core\Container; @@ -36,11 +37,11 @@ public function testContentHandler(): void $handler = $this->getHandlerFixture(); $contentHandler = $handler->contentHandler(); - $this->assertInstanceOf( + self::assertInstanceOf( SPIContentHandler::class, $contentHandler ); - $this->assertInstanceOf( + self::assertInstanceOf( ContentHandler::class, $contentHandler ); @@ -50,7 +51,7 @@ public function testContentHandlerTwice(): void { $handler = $this->getHandlerFixture(); - $this->assertSame( + self::assertSame( $handler->contentHandler(), $handler->contentHandler() ); @@ -61,7 +62,7 @@ public function testContentTypeHandler(): void $handler = $this->getHandlerFixture(); $contentTypeHandler = $handler->contentTypeHandler(); - $this->assertInstanceOf( + self::assertInstanceOf( SPIContentTypeHandler::class, $contentTypeHandler ); @@ -72,7 +73,7 @@ public function testContentLanguageHandler(): void $handler = $this->getHandlerFixture(); $contentLanguageHandler = $handler->contentLanguageHandler(); - $this->assertInstanceOf( + self::assertInstanceOf( SPILanguageHandler::class, $contentLanguageHandler ); @@ -82,7 +83,7 @@ public function testContentTypeHandlerTwice(): void { $handler = $this->getHandlerFixture(); - $this->assertSame( + self::assertSame( $handler->contentTypeHandler(), $handler->contentTypeHandler() ); @@ -93,11 +94,11 @@ public function testLocationHandler(): void $handler = $this->getHandlerFixture(); $locationHandler = $handler->locationHandler(); - $this->assertInstanceOf( + self::assertInstanceOf( SPILocationHandler::class, $locationHandler ); - $this->assertInstanceOf( + self::assertInstanceOf( LocationHandler::class, $locationHandler ); @@ -107,7 +108,7 @@ public function testLocationHandlerTwice(): void { $handler = $this->getHandlerFixture(); - $this->assertSame( + self::assertSame( $handler->locationHandler(), $handler->locationHandler() ); @@ -118,11 +119,11 @@ public function testUserHandler(): void $handler = $this->getHandlerFixture(); $userHandler = $handler->userHandler(); - $this->assertInstanceOf( + self::assertInstanceOf( SPIUserHandler::class, $userHandler ); - $this->assertInstanceOf( + self::assertInstanceOf( UserHandler::class, $userHandler ); @@ -132,7 +133,7 @@ public function testUserHandlerTwice(): void { $handler = $this->getHandlerFixture(); - $this->assertSame( + self::assertSame( $handler->userHandler(), $handler->userHandler() ); @@ -143,11 +144,11 @@ public function testSectionHandler(): void $handler = $this->getHandlerFixture(); $sectionHandler = $handler->sectionHandler(); - $this->assertInstanceOf( + self::assertInstanceOf( SPISectionHandler::class, $sectionHandler ); - $this->assertInstanceOf( + self::assertInstanceOf( SectionHandler::class, $sectionHandler ); @@ -157,7 +158,7 @@ public function testSectionHandlerTwice(): void { $handler = $this->getHandlerFixture(); - $this->assertSame( + self::assertSame( $handler->sectionHandler(), $handler->sectionHandler() ); @@ -168,11 +169,11 @@ public function testUrlAliasHandler(): void $handler = $this->getHandlerFixture(); $urlAliasHandler = $handler->urlAliasHandler(); - $this->assertInstanceOf( + self::assertInstanceOf( SPIUrlAliasHandler::class, $urlAliasHandler ); - $this->assertInstanceOf( + self::assertInstanceOf( UrlAliasHandler::class, $urlAliasHandler ); @@ -182,7 +183,7 @@ public function testUrlAliasHandlerTwice(): void { $handler = $this->getHandlerFixture(); - $this->assertSame( + self::assertSame( $handler->urlAliasHandler(), $handler->urlAliasHandler() ); @@ -192,7 +193,7 @@ public function testNotificationHandlerTwice(): void { $handler = $this->getHandlerFixture(); - $this->assertSame( + self::assertSame( $handler->notificationHandler(), $handler->notificationHandler() ); @@ -203,11 +204,11 @@ public function testTransactionHandler(): void $handler = $this->getHandlerFixture(); $transactionHandler = $handler->transactionHandler(); - $this->assertInstanceOf( + self::assertInstanceOf( SPITransactionHandler::class, $transactionHandler ); - $this->assertInstanceOf( + self::assertInstanceOf( TransactionHandler::class, $transactionHandler ); @@ -217,7 +218,7 @@ public function testTransactionHandlerTwice(): void { $handler = $this->getHandlerFixture(); - $this->assertSame( + self::assertSame( $handler->transactionHandler(), $handler->transactionHandler() ); diff --git a/tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php index 369459d921..ff7ff7245e 100644 --- a/tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php @@ -50,7 +50,7 @@ public function testInsert() $data = $this->loadNotification($id); - $this->assertEquals([ + self::assertEquals([ 'id' => $id, 'owner_id' => '14', 'is_pending' => 1, @@ -64,7 +64,7 @@ public function testGetNotificationById() { $data = $this->getGateway()->getNotificationById(self::EXISTING_NOTIFICATION_ID); - $this->assertEquals([ + self::assertEquals([ self::EXISTING_NOTIFICATION_DATA, ], $data); } @@ -82,7 +82,7 @@ public function testUpdateNotification() $this->getGateway()->updateNotification($notification); - $this->assertEquals([ + self::assertEquals([ 'id' => (string) self::EXISTING_NOTIFICATION_ID, 'owner_id' => '14', 'is_pending' => '0', @@ -94,14 +94,14 @@ public function testUpdateNotification() public function testCountUserNotifications() { - $this->assertEquals(5, $this->getGateway()->countUserNotifications( + self::assertEquals(5, $this->getGateway()->countUserNotifications( self::EXISTING_NOTIFICATION_DATA['owner_id'] )); } public function testCountUserPendingNotifications() { - $this->assertEquals( + self::assertEquals( 3, $this->getGateway()->countUserPendingNotifications( self::EXISTING_NOTIFICATION_DATA['owner_id'] @@ -117,7 +117,7 @@ public function testLoadUserNotifications() $results = $this->getGateway()->loadUserNotifications($userId, $offset, $limit); - $this->assertEquals([ + self::assertEquals([ [ 'id' => '4', 'owner_id' => '14', @@ -149,7 +149,7 @@ public function testDelete() { $this->getGateway()->delete(self::EXISTING_NOTIFICATION_ID); - $this->assertEmpty($this->loadNotification(self::EXISTING_NOTIFICATION_ID)); + self::assertEmpty($this->loadNotification(self::EXISTING_NOTIFICATION_ID)); } /** diff --git a/tests/lib/Persistence/Legacy/Notification/HandlerTest.php b/tests/lib/Persistence/Legacy/Notification/HandlerTest.php index 3dd8d06225..3cb27052c3 100644 --- a/tests/lib/Persistence/Legacy/Notification/HandlerTest.php +++ b/tests/lib/Persistence/Legacy/Notification/HandlerTest.php @@ -51,13 +51,13 @@ public function testCreateNotification() ]); $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('insert') ->with($createStruct) ->willReturn(self::NOTIFICATION_ID); $this->mapper - ->expects($this->once()) + ->expects(self::once()) ->method('extractNotificationsFromRows') ->willReturn([new Notification([ 'id' => self::NOTIFICATION_ID, @@ -65,7 +65,7 @@ public function testCreateNotification() $notification = $this->handler->createNotification($createStruct); - $this->assertEquals($notification->id, self::NOTIFICATION_ID); + self::assertEquals($notification->id, self::NOTIFICATION_ID); } public function testCountPendingNotifications() @@ -74,12 +74,12 @@ public function testCountPendingNotifications() $expectedCount = 12; $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('countUserPendingNotifications') ->with($ownerId) ->willReturn($expectedCount); - $this->assertEquals($expectedCount, $this->handler->countPendingNotifications($ownerId)); + self::assertEquals($expectedCount, $this->handler->countPendingNotifications($ownerId)); } public function testGetNotificationById() @@ -95,18 +95,18 @@ public function testGetNotificationById() ]); $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('getNotificationById') ->with(self::NOTIFICATION_ID) ->willReturn($rows); $this->mapper - ->expects($this->once()) + ->expects(self::once()) ->method('extractNotificationsFromRows') ->with($rows) ->willReturn([$object]); - $this->assertEquals($object, $this->handler->getNotificationById(self::NOTIFICATION_ID)); + self::assertEquals($object, $this->handler->getNotificationById(self::NOTIFICATION_ID)); } public function testUpdateNotification() @@ -128,18 +128,18 @@ public function testUpdateNotification() $spiNotification = new Notification($data); $this->mapper - ->expects($this->once()) + ->expects(self::once()) ->method('createNotificationFromUpdateStruct') ->with($updateStruct) ->willReturn($spiNotification); $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('updateNotification') ->with($spiNotification); $this->mapper - ->expects($this->once()) + ->expects(self::once()) ->method('extractNotificationsFromRows') ->willReturn([new Notification([ 'id' => self::NOTIFICATION_ID, @@ -154,12 +154,12 @@ public function testCountNotifications() $expectedCount = 12; $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('countUserNotifications') ->with($ownerId) ->willReturn($expectedCount); - $this->assertEquals($expectedCount, $this->handler->countNotifications($ownerId)); + self::assertEquals($expectedCount, $this->handler->countNotifications($ownerId)); } public function testLoadUserNotifications() @@ -181,18 +181,18 @@ public function testLoadUserNotifications() ]; $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('loadUserNotifications') ->with($ownerId, $offset, $limit) ->willReturn($rows); $this->mapper - ->expects($this->once()) + ->expects(self::once()) ->method('extractNotificationsFromRows') ->with($rows) ->willReturn($objects); - $this->assertEquals($objects, $this->handler->loadUserNotifications($ownerId, $offset, $limit)); + self::assertEquals($objects, $this->handler->loadUserNotifications($ownerId, $offset, $limit)); } public function testDelete() @@ -202,7 +202,7 @@ public function testDelete() ]); $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('delete') ->with($notification->id); diff --git a/tests/lib/Persistence/Legacy/Notification/MapperTest.php b/tests/lib/Persistence/Legacy/Notification/MapperTest.php index 73f7dfd3a4..3111707694 100644 --- a/tests/lib/Persistence/Legacy/Notification/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Notification/MapperTest.php @@ -74,7 +74,7 @@ public function testExtractNotificationsFromRows() ]), ]; - $this->assertEquals($objects, $this->mapper->extractNotificationsFromRows($rows)); + self::assertEquals($objects, $this->mapper->extractNotificationsFromRows($rows)); } public function testExtractNotificationsFromRowsThrowsRuntimeException() @@ -101,7 +101,7 @@ public function testCreateNotificationFromUpdateStruct() 'isPending' => false, ]); - $this->assertEquals(new Notification([ + self::assertEquals(new Notification([ 'isPending' => false, ]), $this->mapper->createNotificationFromUpdateStruct($updateStruct)); } diff --git a/tests/lib/Persistence/Legacy/Setting/SettingHandlerTest.php b/tests/lib/Persistence/Legacy/Setting/SettingHandlerTest.php index 20bb9113fb..4d7f78ed81 100644 --- a/tests/lib/Persistence/Legacy/Setting/SettingHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Setting/SettingHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\Setting; use Ibexa\Contracts\Core\Persistence\Setting\Setting; @@ -123,7 +124,7 @@ public function testUpdate(): void self::identicalTo('group_d1'), self::identicalTo('identifier_e2') ) - ->will($this->returnValue([ + ->will(self::returnValue([ 'group' => 'group_d1', 'identifier' => 'identifier_e2', 'value' => 'value_f3', @@ -166,7 +167,7 @@ public function testUpdateFailsToLoad(): void self::identicalTo('group_d1'), self::identicalTo('identifier_e2') ) - ->will($this->returnValue(null)); + ->will(self::returnValue(null)); $this->expectException(NotFoundException::class); $this->expectExceptionMessage(<<createMock(Connection::class); $connectionMock - ->expects($this->any()) + ->expects(self::any()) ->method('getDatabasePlatform') ->willReturn($databasePlatform); diff --git a/tests/lib/Persistence/Legacy/TestCase.php b/tests/lib/Persistence/Legacy/TestCase.php index 887861cfe7..cc00dc7497 100644 --- a/tests/lib/Persistence/Legacy/TestCase.php +++ b/tests/lib/Persistence/Legacy/TestCase.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy; use Doctrine\Common\EventManager as DoctrineEventManager; @@ -248,7 +249,7 @@ protected function assertPropertiesCorrect(array $properties, $object) ); } foreach ($properties as $propName => $propVal) { - $this->assertSame( + self::assertSame( $propVal, $object->$propName, "Incorrect value for \${$propName}" @@ -276,7 +277,7 @@ protected function assertStructsEqual( $propertyNames = $this->getPublicPropertyNames($expStruct); } foreach ($propertyNames as $propName) { - $this->assertEquals( + self::assertEquals( $expStruct->$propName, $actStruct->$propName, "Properties \${$propName} not same" diff --git a/tests/lib/Persistence/Legacy/TransactionHandlerTest.php b/tests/lib/Persistence/Legacy/TransactionHandlerTest.php index 47f7e7beee..31b093539f 100644 --- a/tests/lib/Persistence/Legacy/TransactionHandlerTest.php +++ b/tests/lib/Persistence/Legacy/TransactionHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy; use Doctrine\DBAL\Connection; @@ -38,14 +39,14 @@ public function testBeginTransaction() { $handler = $this->getTransactionHandler(); $this->getConnectionMock() - ->expects($this->once()) + ->expects(self::once()) ->method('beginTransaction'); $this->getContentTypeHandlerMock() - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $this->getLanguageHandlerMock() - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $handler->beginTransaction(); } @@ -54,14 +55,14 @@ public function testCommit() { $handler = $this->getTransactionHandler(); $this->getConnectionMock() - ->expects($this->once()) + ->expects(self::once()) ->method('commit'); $this->getContentTypeHandlerMock() - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $this->getLanguageHandlerMock() - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $handler->commit(); } @@ -73,15 +74,15 @@ public function testCommitException() $handler = $this->getTransactionHandler(); $this->getConnectionMock() - ->expects($this->once()) + ->expects(self::once()) ->method('commit') - ->will($this->throwException(new Exception('test'))); + ->will(self::throwException(new Exception('test'))); $this->getContentTypeHandlerMock() - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $this->getLanguageHandlerMock() - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $handler->commit(); } @@ -90,13 +91,13 @@ public function testRollback() { $handler = $this->getTransactionHandler(); $this->getConnectionMock() - ->expects($this->once()) + ->expects(self::once()) ->method('rollback'); $this->getContentTypeHandlerMock() - ->expects($this->once()) + ->expects(self::once()) ->method('clearCache'); $this->getLanguageHandlerMock() - ->expects($this->once()) + ->expects(self::once()) ->method('clearCache'); $handler->rollback(); @@ -109,15 +110,15 @@ public function testRollbackException() $handler = $this->getTransactionHandler(); $this->getConnectionMock() - ->expects($this->once()) + ->expects(self::once()) ->method('rollback') - ->will($this->throwException(new Exception('test'))); + ->will(self::throwException(new Exception('test'))); $this->getContentTypeHandlerMock() - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $this->getLanguageHandlerMock() - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $handler->rollback(); } diff --git a/tests/lib/Persistence/Legacy/URL/HandlerTest.php b/tests/lib/Persistence/Legacy/URL/HandlerTest.php index 1fbed75d42..6684177386 100644 --- a/tests/lib/Persistence/Legacy/URL/HandlerTest.php +++ b/tests/lib/Persistence/Legacy/URL/HandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\URL; use Ibexa\Contracts\Core\Persistence\URL\URL; @@ -42,17 +43,17 @@ public function testUpdateUrl() $url = $this->getUrl(1, 'http://ibexa.co'); $this->mapper - ->expects($this->once()) + ->expects(self::once()) ->method('createURLFromUpdateStruct') ->with($urlUpdateStruct) ->willReturn($url); $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('updateUrl') ->with($url); - $this->assertEquals($url, $this->handler->updateUrl($url->id, $urlUpdateStruct)); + self::assertEquals($url, $this->handler->updateUrl($url->id, $urlUpdateStruct)); } public function testFind() @@ -83,18 +84,18 @@ public function testFind() ]; $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('find') ->with($query->filter, $query->offset, $query->limit, $query->sortClauses, $query->performCount) ->willReturn($results); $this->mapper - ->expects($this->once()) + ->expects(self::once()) ->method('extractURLsFromRows') ->with($results['rows']) ->willReturn($expected['items']); - $this->assertEquals($expected, $this->handler->find($query)); + self::assertEquals($expected, $this->handler->find($query)); } public function testLoadByIdWithoutUrlData() @@ -104,13 +105,13 @@ public function testLoadByIdWithoutUrlData() $id = 1; $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('loadUrlData') ->with($id) ->willReturn([]); $this->mapper - ->expects($this->once()) + ->expects(self::once()) ->method('extractURLsFromRows') ->with([]) ->willReturn([]); @@ -123,18 +124,18 @@ public function testLoadByIdWithUrlData() $url = $this->getUrl(1, 'http://ibexa.co'); $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('loadUrlData') ->with($url->id) ->willReturn([$url]); $this->mapper - ->expects($this->once()) + ->expects(self::once()) ->method('extractURLsFromRows') ->with([$url]) ->willReturn([$url]); - $this->assertEquals($url, $this->handler->loadById($url->id)); + self::assertEquals($url, $this->handler->loadById($url->id)); } public function testLoadByUrlWithoutUrlData() @@ -144,13 +145,13 @@ public function testLoadByUrlWithoutUrlData() $url = 'http://ibexa.co'; $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('loadUrlDataByUrl') ->with($url) ->willReturn([]); $this->mapper - ->expects($this->once()) + ->expects(self::once()) ->method('extractURLsFromRows') ->with([]) ->willReturn([]); @@ -163,18 +164,18 @@ public function testLoadByUrlWithUrlData() $url = $this->getUrl(1, 'http://ibexa.co'); $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('loadUrlDataByUrl') ->with($url->url) ->willReturn([$url]); $this->mapper - ->expects($this->once()) + ->expects(self::once()) ->method('extractURLsFromRows') ->with([$url]) ->willReturn([$url]); - $this->assertEquals($url, $this->handler->loadByUrl($url->url)); + self::assertEquals($url, $this->handler->loadByUrl($url->url)); } public function testFindUsages() @@ -183,12 +184,12 @@ public function testFindUsages() $ids = [1, 2, 3]; $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('findUsages') ->with($url->id) - ->will($this->returnValue($ids)); + ->will(self::returnValue($ids)); - $this->assertEquals($ids, $this->handler->findUsages($url->id)); + self::assertEquals($ids, $this->handler->findUsages($url->id)); } private function getUrl($id = 1, $urlAddr = 'http://ibexa.co') diff --git a/tests/lib/Persistence/Legacy/URL/MapperTest.php b/tests/lib/Persistence/Legacy/URL/MapperTest.php index 7603a5044a..ff65bf282c 100644 --- a/tests/lib/Persistence/Legacy/URL/MapperTest.php +++ b/tests/lib/Persistence/Legacy/URL/MapperTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\URL; use Ibexa\Contracts\Core\Persistence\URL\URL; @@ -38,7 +39,7 @@ public function testCreateURLFromUpdateStruct() $expected->created = 0; $expected->modified = $urlUpdateStruct->modified; - $this->assertEquals($expected, $this->mapper->createURLFromUpdateStruct($urlUpdateStruct)); + self::assertEquals($expected, $this->mapper->createURLFromUpdateStruct($urlUpdateStruct)); } public function testExtractURLsFromRows() @@ -82,7 +83,7 @@ public function testExtractURLsFromRows() $urlEzplatformCom->created = (int)$rows[1]['created']; $urlEzplatformCom->modified = (int)$rows[1]['modified']; - $this->assertEquals([$urlEzNo, $urlEzplatformCom], $this->mapper->extractURLsFromRows($rows)); + self::assertEquals([$urlEzNo, $urlEzplatformCom], $this->mapper->extractURLsFromRows($rows)); } } diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriteriaConverterTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriteriaConverterTest.php index ccc199b14f..9b549f5688 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriteriaConverterTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriteriaConverterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\URL\Query; use Doctrine\DBAL\Query\QueryBuilder; @@ -36,29 +37,29 @@ public function testConvertCriteriaSuccess(): void $selectQuery = $this->createMock(QueryBuilder::class); $fooCriterionHandler - ->expects($this->once()) + ->expects(self::once()) ->method('accept') ->with($barCriterion) ->willReturn(false); $fooCriterionHandler - ->expects($this->never()) + ->expects(self::never()) ->method('handle'); $barCriterionHandler - ->expects($this->once()) + ->expects(self::once()) ->method('accept') ->with($barCriterion) ->willReturn(true); $sqlExpression = 'SQL EXPRESSION'; $barCriterionHandler - ->expects($this->once()) + ->expects(self::once()) ->method('handle') ->with($criteriaConverter, $selectQuery, $barCriterion) ->willReturn($sqlExpression); - $this->assertEquals( + self::assertEquals( $sqlExpression, $criteriaConverter->convertCriteria( $selectQuery, diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php index 8f7497f3e6..5f21aee5ef 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\URL\Query\CriterionHandler; use Doctrine\DBAL\Query\Expression\CompositeExpression; @@ -28,7 +29,7 @@ abstract public function testHandle(); */ protected function assertHandlerAcceptsCriterion(CriterionHandler $handler, $criterionClass) { - $this->assertTrue($handler->accept($this->createMock($criterionClass))); + self::assertTrue($handler->accept($this->createMock($criterionClass))); } /** @@ -39,7 +40,7 @@ protected function assertHandlerAcceptsCriterion(CriterionHandler $handler, $cri */ protected function assertHandlerRejectsCriterion(CriterionHandler $handler, $criterionClass) { - $this->assertFalse($handler->accept($this->createMock($criterionClass))); + self::assertFalse($handler->accept($this->createMock($criterionClass))); } /** @@ -63,23 +64,23 @@ protected function mockConverterForLogicalOperator( ); $expressionBuilder = $this->createMock(ExpressionBuilder::class); $expressionBuilder - ->expects($this->any()) + ->expects(self::any()) ->method($expressionBuilderMethod) ->with($fooExpr, $barExpr) ->willReturn($compositeExpression); $queryBuilder - ->expects($this->any()) + ->expects(self::any()) ->method('expr') ->willReturn($expressionBuilder); $converter = $this->createMock(CriteriaConverter::class); $converter - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('convertCriteria') ->with($queryBuilder, $foo) ->willReturn($fooExpr); $converter - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('convertCriteria') ->with($queryBuilder, $bar) ->willReturn($barExpr); diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAndTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAndTest.php index c38530f72c..d8a1749a25 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAndTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAndTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\URL\Query\CriterionHandler; use Doctrine\DBAL\Query\Expression\CompositeExpression; @@ -21,8 +22,8 @@ public function testAccept() { $handler = new LogicalAndHandler(); - $this->assertTrue($handler->accept($this->createMock(LogicalAnd::class))); - $this->assertFalse($handler->accept($this->createMock(Criterion::class))); + self::assertTrue($handler->accept($this->createMock(LogicalAnd::class))); + self::assertFalse($handler->accept($this->createMock(Criterion::class))); } /** @@ -58,7 +59,7 @@ public function testHandle(): void new LogicalAnd([$foo, $bar]) ); - $this->assertEquals($expected, $actual); + self::assertEquals($expected, $actual); } } diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNotTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNotTest.php index 23dd93d009..f93986c862 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNotTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNotTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\URL\Query\CriterionHandler; use Doctrine\DBAL\Query\QueryBuilder; @@ -40,7 +41,7 @@ public function testHandle(): void $converter = $this->createMock(CriteriaConverter::class); $converter - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('convertCriteria') ->with($queryBuilder, $foo) ->willReturn($fooExpr); @@ -52,7 +53,7 @@ public function testHandle(): void new LogicalNot($foo) ); - $this->assertEquals($expected, $actual); + self::assertEquals($expected, $actual); } } diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOrTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOrTest.php index f7e3c2e006..813e397547 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOrTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOrTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\URL\Query\CriterionHandler; use Doctrine\DBAL\Query\Expression\CompositeExpression; @@ -58,7 +59,7 @@ public function testHandle(): void new LogicalOr([$foo, $bar]) ); - $this->assertEquals($expected, $actual); + self::assertEquals($expected, $actual); } } diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAllTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAllTest.php index fa13a51b62..ab66a46b2d 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAllTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAllTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\URL\Query\CriterionHandler; use Doctrine\DBAL\Query\QueryBuilder; @@ -39,7 +40,7 @@ public function testHandle() $handler = new MatchAllHandler(); $actual = $handler->handle($converter, $queryBuilder, $criterion); - $this->assertEquals($expected, $actual); + self::assertEquals($expected, $actual); } } diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNoneTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNoneTest.php index bb748fed78..d879099b92 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNoneTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNoneTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\URL\Query\CriterionHandler; use Doctrine\DBAL\Query\QueryBuilder; @@ -39,7 +40,7 @@ public function testHandle() $handler = new MatchNoneHandler(); $actual = $handler->handle($converter, $query, $criterion); - $this->assertEquals($expected, $actual); + self::assertEquals($expected, $actual); } } diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/PatternTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/PatternTest.php index a9b3196ff4..ed89b4a6f1 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/PatternTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/PatternTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\URL\Query\CriterionHandler; use Doctrine\DBAL\ParameterType; @@ -36,17 +37,17 @@ public function testHandle() $expected = 'url LIKE :pattern'; $expressionBuilder = $this->createMock(ExpressionBuilder::class); $expressionBuilder - ->expects($this->once()) + ->expects(self::once()) ->method('like') ->with('url', ':pattern') ->willReturn($expected); $queryBuilder = $this->createMock(QueryBuilder::class); $queryBuilder - ->expects($this->any()) + ->expects(self::any()) ->method('expr') ->willReturn($expressionBuilder); $queryBuilder - ->expects($this->once()) + ->expects(self::once()) ->method('createNamedParameter') ->with('%' . $criterion->pattern . '%', ParameterType::STRING, ':pattern') ->willReturn(':pattern'); @@ -56,7 +57,7 @@ public function testHandle() $handler = new PatternHandler(); $actual = $handler->handle($converter, $queryBuilder, $criterion); - $this->assertEquals($expected, $actual); + self::assertEquals($expected, $actual); } } diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/ValidityTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/ValidityTest.php index bf1bc8f684..f9dce0c7a4 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/ValidityTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/ValidityTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\URL\Query\CriterionHandler; use Doctrine\DBAL\ParameterType; @@ -37,18 +38,18 @@ public function testHandle() $expressionBuilder = $this->createMock(ExpressionBuilder::class); $expressionBuilder - ->expects($this->once()) + ->expects(self::once()) ->method('eq') ->with('is_valid', ':is_valid') ->willReturn($expected); $queryBuilder = $this->createMock(QueryBuilder::class); $queryBuilder - ->expects($this->any()) + ->expects(self::any()) ->method('expr') ->willReturn($expressionBuilder); $queryBuilder - ->expects($this->any()) + ->expects(self::any()) ->method('createNamedParameter') ->with((int)$criterion->isValid, ParameterType::INTEGER, ':is_valid') ->willReturn(':is_valid'); @@ -58,7 +59,7 @@ public function testHandle() $handler = new ValidityHandler(); $actual = $handler->handle($converter, $queryBuilder, $criterion); - $this->assertEquals($expected, $actual); + self::assertEquals($expected, $actual); } } diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnlyTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnlyTest.php index 2287d6281e..3a3358962c 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnlyTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnlyTest.php @@ -46,8 +46,8 @@ public function testHandle(): void $queryBuilder = $this->createDoctrineQueryBuilder(); $actual = $handler->handle($converter, $queryBuilder, $criterion); - $this->assertEquals($expected, $actual); - $this->assertSame($expectedQueryParameters, $queryBuilder->getParameters()); + self::assertEquals($expected, $actual); + self::assertSame($expectedQueryParameters, $queryBuilder->getParameters()); } /** @@ -62,7 +62,7 @@ private function createDoctrineQueryBuilder(): QueryBuilder $expressionBuilder = new ExpressionBuilder($connection); $connection - ->expects($this->any()) + ->expects(self::any()) ->method('getExpressionBuilder') ->willReturn($expressionBuilder); diff --git a/tests/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabaseTest.php index e58c9f10fc..22359d062b 100644 --- a/tests/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabaseTest.php @@ -80,7 +80,7 @@ public function testLoadRoleAssignment(): void { $gateway = $this->getDatabaseGateway(); - $this->assertEquals( + self::assertEquals( [ [ 'contentobject_id' => '12', @@ -101,7 +101,7 @@ public function testLoadRoleAssignmentsByGroupId(): void { $gateway = $this->getDatabaseGateway(); - $this->assertEquals( + self::assertEquals( [ [ 'contentobject_id' => '11', @@ -136,7 +136,7 @@ public function testLoadRoleAssignmentsByRoleId(): void { $gateway = $this->getDatabaseGateway(); - $this->assertEquals( + self::assertEquals( [ [ 'contentobject_id' => '11', diff --git a/tests/lib/Persistence/Legacy/User/Role/LimitationConverterTest.php b/tests/lib/Persistence/Legacy/User/Role/LimitationConverterTest.php index e08459fa0c..249b349a26 100644 --- a/tests/lib/Persistence/Legacy/User/Role/LimitationConverterTest.php +++ b/tests/lib/Persistence/Legacy/User/Role/LimitationConverterTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\User\Role; use Ibexa\Contracts\Core\Persistence\User\Policy; @@ -42,7 +43,7 @@ public function testObjectStateToLegacy() Limitation::STATE => '*', ]; $converter->toLegacy($policy); - $this->assertEquals( + self::assertEquals( [ ObjectStateLimitationHandler::STATE_GROUP . 'ez_lock' => '*', ], @@ -55,7 +56,7 @@ public function testObjectStateToLegacy() Limitation::STATE => [1, 2], ]; $converter->toLegacy($policy); - $this->assertEquals( + self::assertEquals( [ ObjectStateLimitationHandler::STATE_GROUP . 'ez_lock' => [1, 2], ], @@ -68,7 +69,7 @@ public function testObjectStateToLegacy() Limitation::STATE => [1, 2, 3, 4], ]; $converter->toLegacy($policy); - $this->assertEquals( + self::assertEquals( [ ObjectStateLimitationHandler::STATE_GROUP . 'ez_lock' => [1, 2], ], @@ -95,7 +96,7 @@ public function testObjectStateToSPI() ObjectStateLimitationHandler::STATE_GROUP . 'ez_lock' => '*', ]; $converter->toSPI($policy); - $this->assertEquals( + self::assertEquals( [ Limitation::STATE => '*', ], @@ -108,7 +109,7 @@ public function testObjectStateToSPI() ObjectStateLimitationHandler::STATE_GROUP . 'ez_lock' => [1, 2], ]; $converter->toSPI($policy); - $this->assertEquals( + self::assertEquals( [ Limitation::STATE => [1, 2], ], @@ -121,7 +122,7 @@ public function testObjectStateToSPI() ObjectStateLimitationHandler::STATE_GROUP . 'ez_lock' => [1, 2, 3, 4], ]; $converter->toSPI($policy); - $this->assertEquals( + self::assertEquals( [ Limitation::STATE => [1, 2, 3, 4], ], @@ -136,12 +137,12 @@ public function testObjectStateToSPI() ]; $converter->toSPI($policy); - $this->assertArrayHasKey(Limitation::STATE, $policy->limitations); + self::assertArrayHasKey(Limitation::STATE, $policy->limitations); // Don't expect backend to return sorted result, so lets sort values before testing sort($policy->limitations[Limitation::STATE], SORT_NUMERIC); - $this->assertEquals( + self::assertEquals( [1, 2, 5], $policy->limitations[Limitation::STATE], 'Expected State limitation to be transformed into StateGroup_ limitations' diff --git a/tests/lib/Persistence/Legacy/User/UserHandlerTest.php b/tests/lib/Persistence/Legacy/User/UserHandlerTest.php index e5f1fa989c..8038205875 100644 --- a/tests/lib/Persistence/Legacy/User/UserHandlerTest.php +++ b/tests/lib/Persistence/Legacy/User/UserHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\Legacy\User; use DateInterval; @@ -117,7 +118,7 @@ public function testLoadUser() $user = $this->getValidUser(); - $this->assertEquals( + self::assertEquals( $user, $handler->load($user->id) ); @@ -153,7 +154,7 @@ public function testLoadUserByLogin() $user = $this->getValidUser(); $loadedUser = $handler->loadByLogin($user->login); - $this->assertEquals( + self::assertEquals( $user, $loadedUser ); @@ -225,7 +226,7 @@ public function testLoadUserByEmail() $validUser = $this->getValidUser(); $user = $handler->loadByEmail($validUser->email); - $this->assertEquals( + self::assertEquals( $validUser, $user ); @@ -245,7 +246,7 @@ public function testLoadUsersByEmail() $user = $this->getValidUser(); $users = $handler->loadUsersByEmail($user->email); - $this->assertEquals( + self::assertEquals( $user, $users[0] ); @@ -277,7 +278,7 @@ public function testLoadUserByToken() $handler->updateUserToken($userToken); $loadedUser = $handler->loadUserByToken($userToken->hashKey); - $this->assertEquals( + self::assertEquals( $user, $loadedUser ); @@ -409,7 +410,7 @@ public function testCreateNewRoleRoleId() $roleDraft = $handler->createRole($createStruct); - $this->assertSame(1, $roleDraft->id); + self::assertSame(1, $roleDraft->id); } public function testLoadRole() @@ -423,7 +424,7 @@ public function testLoadRole() $handler->publishRoleDraft($roleDraft->id); $role = $handler->loadRole($roleDraft->id); - $this->assertEquals( + self::assertEquals( $roleDraft->id, $role->id ); @@ -446,7 +447,7 @@ public function testLoadRoleWithPolicies() $handler->publishRoleDraft($roleDraft->id); $loaded = $handler->loadRole($roleDraft->id); - $this->assertEquals( + self::assertEquals( [ new Persistence\User\Policy( [ @@ -484,7 +485,7 @@ public function testLoadRoleWithPoliciesAndGroups() $handler->publishRoleDraft($roleDraft->id); $loaded = $handler->loadRole($roleDraft->id); - $this->assertEquals( + self::assertEquals( [ new Persistence\User\Policy( [ @@ -522,7 +523,7 @@ public function testLoadRoleWithPolicyLimitations() $handler->publishRoleDraft($roleDraft->id); $loaded = $handler->loadRole($roleDraft->id); - $this->assertEquals( + self::assertEquals( [ new Persistence\User\Policy( [ @@ -546,14 +547,14 @@ public function testLoadRoles() { $handler = $this->getUserHandler(); - $this->assertEquals( + self::assertEquals( [], $handler->loadRoles() ); $role = $this->createTestRole($handler); - $this->assertEquals( + self::assertEquals( [$role], $handler->loadRoles() ); @@ -664,7 +665,7 @@ public function testAddPolicyPolicyId() $policy = $handler->addPolicy($role->id, $policy); - $this->assertEquals(1, $policy->id); + self::assertEquals(1, $policy->id); } public function testAddPolicyLimitations() @@ -919,7 +920,7 @@ public function testLoadPoliciesForUser() $policies = $handler->loadPoliciesByUserId(10); // Anonymous user // Verify, that we received an array of Policy objects - $this->assertTrue( + self::assertTrue( array_reduce( array_map( static function ($policy) { @@ -933,7 +934,7 @@ static function ($a, $b) { true ) ); - $this->assertCount(8, $policies); + self::assertCount(8, $policies); } public function testLoadRoleAssignmentsByGroupId() @@ -941,7 +942,7 @@ public function testLoadRoleAssignmentsByGroupId() $this->insertSharedDatabaseFixture(); $handler = $this->getUserHandler(); - $this->assertEquals( + self::assertEquals( [ new Persistence\User\RoleAssignment( [ @@ -961,7 +962,7 @@ public function testLoadRoleAssignmentsByGroupId() $handler->loadRoleAssignmentsByGroupId(11)// 11: Members ); - $this->assertEquals( + self::assertEquals( [ new Persistence\User\RoleAssignment( [ @@ -974,7 +975,7 @@ public function testLoadRoleAssignmentsByGroupId() $handler->loadRoleAssignmentsByGroupId(42)// 42: Anonymous users ); - $this->assertEquals( + self::assertEquals( [], $handler->loadRoleAssignmentsByGroupId(10)// 10: Anonymous User ); @@ -985,7 +986,7 @@ public function testLoadRoleAssignmentsByGroupIdInherited() $this->insertSharedDatabaseFixture(); $handler = $this->getUserHandler(); - $this->assertEquals( + self::assertEquals( [ new Persistence\User\RoleAssignment( [ @@ -1004,7 +1005,7 @@ public function testLoadComplexRoleAssignments() $this->insertSharedDatabaseFixture(); $handler = $this->getUserHandler(); - $this->assertEquals( + self::assertEquals( [ new Persistence\User\RoleAssignment( [ @@ -1035,7 +1036,7 @@ public function testLoadComplexRoleAssignments() $handler->loadRoleAssignmentsByGroupId(13) ); - $this->assertEquals( + self::assertEquals( [ new Persistence\User\RoleAssignment( [ diff --git a/tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php index 444fd5be30..b61dd533ef 100644 --- a/tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php @@ -47,7 +47,7 @@ public function testInsert() $data = $this->loadUserPreference($id); - $this->assertEquals([ + self::assertEquals([ 'id' => $id, 'user_id' => '14', 'name' => 'setting_3', @@ -65,7 +65,7 @@ public function testUpdateUserPreference() $this->getGateway()->setUserPreference($userPreference); - $this->assertEquals([ + self::assertEquals([ 'id' => (string) self::EXISTING_USER_PREFERENCE_ID, 'user_id' => '14', 'name' => 'timezone', @@ -75,7 +75,7 @@ public function testUpdateUserPreference() public function testCountUserPreferences() { - $this->assertEquals(3, $this->getGateway()->countUserPreferences( + self::assertEquals(3, $this->getGateway()->countUserPreferences( self::EXISTING_USER_PREFERENCE_DATA['user_id'] )); } @@ -88,7 +88,7 @@ public function testLoadUserPreferences() $results = $this->getGateway()->loadUserPreferences($userId, $offset, $limit); - $this->assertEquals([ + self::assertEquals([ [ 'id' => '2', 'user_id' => '14', diff --git a/tests/lib/Persistence/Legacy/UserPreference/HandlerTest.php b/tests/lib/Persistence/Legacy/UserPreference/HandlerTest.php index 18d4205c9c..08a952527c 100644 --- a/tests/lib/Persistence/Legacy/UserPreference/HandlerTest.php +++ b/tests/lib/Persistence/Legacy/UserPreference/HandlerTest.php @@ -47,13 +47,13 @@ public function testSetUserPreference() ]); $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('setUserPreference') ->with($setStruct) ->willReturn(self::USER_PREFERENCE_ID); $this->mapper - ->expects($this->once()) + ->expects(self::once()) ->method('extractUserPreferencesFromRows') ->willReturn([new UserPreference([ 'id' => self::USER_PREFERENCE_ID, @@ -61,7 +61,7 @@ public function testSetUserPreference() $userPreference = $this->handler->setUserPreference($setStruct); - $this->assertEquals($userPreference->id, self::USER_PREFERENCE_ID); + self::assertEquals($userPreference->id, self::USER_PREFERENCE_ID); } public function testCountUserPreferences() @@ -70,12 +70,12 @@ public function testCountUserPreferences() $expectedCount = 12; $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('countUserPreferences') ->with($ownerId) ->willReturn($expectedCount); - $this->assertEquals($expectedCount, $this->handler->countUserPreferences($ownerId)); + self::assertEquals($expectedCount, $this->handler->countUserPreferences($ownerId)); } public function testLoadUserPreferences() @@ -97,18 +97,18 @@ public function testLoadUserPreferences() ]; $this->gateway - ->expects($this->once()) + ->expects(self::once()) ->method('loadUserPreferences') ->with($ownerId, $offset, $limit) ->willReturn($rows); $this->mapper - ->expects($this->once()) + ->expects(self::once()) ->method('extractUserPreferencesFromRows') ->with($rows) ->willReturn($objects); - $this->assertEquals($objects, $this->handler->loadUserPreferences($ownerId, $offset, $limit)); + self::assertEquals($objects, $this->handler->loadUserPreferences($ownerId, $offset, $limit)); } } diff --git a/tests/lib/Persistence/Legacy/UserPreference/MapperTest.php b/tests/lib/Persistence/Legacy/UserPreference/MapperTest.php index 98483bc8ee..c8d2ee3942 100644 --- a/tests/lib/Persistence/Legacy/UserPreference/MapperTest.php +++ b/tests/lib/Persistence/Legacy/UserPreference/MapperTest.php @@ -57,7 +57,7 @@ public function testExtractUserPreferencesFromRows() ]), ]; - $this->assertEquals($objects, $this->mapper->extractUserPreferencesFromRows($rows)); + self::assertEquals($objects, $this->mapper->extractUserPreferencesFromRows($rows)); } } diff --git a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedParserTest.php b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedParserTest.php index b97711af39..70824df383 100644 --- a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedParserTest.php +++ b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedParserTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\TransformationProcessor; use Ibexa\Core\Persistence; @@ -32,7 +33,7 @@ public function testParse($file) $parser = new Persistence\TransformationProcessor\DefinitionBased\Parser(); $fixture = include $file . '.result'; - $this->assertEquals( + self::assertEquals( $fixture, $parser->parse($file) ); diff --git a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedTest.php b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedTest.php index 29a5003b21..5915bc0ecd 100644 --- a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedTest.php +++ b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\TransformationProcessor; use Ibexa\Core\Persistence; @@ -28,7 +29,7 @@ public function testSimpleNormalizationLowercase() { $processor = $this->getProcessor(); - $this->assertSame( + self::assertSame( 'hello world!', $processor->transform('Hello World!', ['ascii_lowercase']) ); @@ -38,7 +39,7 @@ public function testSimpleNormalizationUppercase() { $processor = $this->getProcessor(); - $this->assertSame( + self::assertSame( 'HELLO WORLD!', $processor->transform('Hello World!', ['ascii_uppercase']) ); @@ -48,7 +49,7 @@ public function testApplyAllLowercaseNormalizations() { $processor = $this->getProcessor(); - $this->assertSame( + self::assertSame( 'hello world!', $processor->transformByGroup('Hello World!', 'lowercase') ); @@ -63,7 +64,7 @@ public function testAllNormalizations() { $processor = $this->getProcessor(); - $this->assertSame( + self::assertSame( 'HELLO WORLD.', $processor->transform('Hello World!') ); diff --git a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php index 5781f975ff..d23f4dddda 100644 --- a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php +++ b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\TransformationProcessor; use Ibexa\Core\Persistence; @@ -45,7 +46,7 @@ public function testCompileMap() ) ); - $this->assertSame( + self::assertSame( 'aeöü', $this->applyTransformations($rules, 'äöü') ); @@ -63,7 +64,7 @@ public function testCompileMapRemove() ) ); - $this->assertSame( + self::assertSame( 'öü', $this->applyTransformations($rules, 'äöü') ); @@ -81,7 +82,7 @@ public function testCompileMapKeep() ) ); - $this->assertSame( + self::assertSame( 'äöü', $this->applyTransformations($rules, 'äöü') ); @@ -99,7 +100,7 @@ public function testCompileMapAscii() ) ); - $this->assertSame( + self::assertSame( 'Aöü', $this->applyTransformations($rules, 'äöü') ); @@ -117,7 +118,7 @@ public function testCompileMapUnicode() ) ); - $this->assertSame( + self::assertSame( 'åöü', $this->applyTransformations($rules, 'äöü') ); @@ -135,7 +136,7 @@ public function testCompileReplace() ) ); - $this->assertSame( + self::assertSame( 'aaaaaaaçè', $this->applyTransformations($rules, 'àáâãäåæçè') ); @@ -153,7 +154,7 @@ public function testCompileTranspose() ) ); - $this->assertSame( + self::assertSame( 'Þßàáâãäçè', $this->applyTransformations($rules, 'àáâãäåæçè') ); @@ -171,7 +172,7 @@ public function testCompileTransposeAsciiLowercase() ) ); - $this->assertSame( + self::assertSame( 'hello world', $this->applyTransformations($rules, 'Hello World') ); @@ -189,7 +190,7 @@ public function testCompileTransposePlus() ) ); - $this->assertSame( + self::assertSame( 'âãäåæçèçè', $this->applyTransformations($rules, 'àáâãäåæçè') ); @@ -207,7 +208,7 @@ public function testCompileModuloTranspose() ) ); - $this->assertSame( + self::assertSame( 'ßááããååçè', $this->applyTransformations($rules, 'àáâãäåæçè') ); diff --git a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPreprocessedBasedTest.php b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPreprocessedBasedTest.php index eac4764acb..cbf1db4cf5 100644 --- a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPreprocessedBasedTest.php +++ b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPreprocessedBasedTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Persistence\TransformationProcessor; use Ibexa\Core\Persistence; @@ -27,7 +28,7 @@ public function testSimpleNormalizationLowercase() { $processor = $this->getProcessor(); - $this->assertSame( + self::assertSame( 'hello world!', $processor->transform('Hello World!', ['ascii_lowercase']) ); @@ -37,7 +38,7 @@ public function testSimpleNormalizationUppercase() { $processor = $this->getProcessor(); - $this->assertSame( + self::assertSame( 'HELLO WORLD!', $processor->transform('Hello World!', ['ascii_uppercase']) ); @@ -52,7 +53,7 @@ public function testAllNormalizations() { $processor = $this->getProcessor(); - $this->assertSame( + self::assertSame( 'HELLO WORLD.', $processor->transform('Hello World!') ); diff --git a/tests/lib/Query/QueryFactoryTest.php b/tests/lib/Query/QueryFactoryTest.php index d15fc70316..ce4961f737 100644 --- a/tests/lib/Query/QueryFactoryTest.php +++ b/tests/lib/Query/QueryFactoryTest.php @@ -41,13 +41,13 @@ public function testCreate(): void $queryType = $this->createMock(QueryType::class); $queryType - ->expects($this->once()) + ->expects(self::once()) ->method('getQuery') ->with(self::EXAMPLE_QUERY_PARAMS) ->willReturn($expectedQuery); $this->queryTypeRegistry - ->expects($this->once()) + ->expects(self::once()) ->method('getQueryType') ->with(self::EXAMPLE_QUERY_TYPE) ->willReturn($queryType); @@ -57,7 +57,7 @@ public function testCreate(): void self::EXAMPLE_QUERY_PARAMS ); - $this->assertEquals($expectedQuery, $actualQuery); + self::assertEquals($expectedQuery, $actualQuery); } } diff --git a/tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php b/tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php index 2a53114f68..996033ec89 100644 --- a/tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php +++ b/tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php @@ -70,12 +70,12 @@ protected function setUp(): void */ final public function testGetQuery(array $parameters, Query $expectedQuery): void { - $this->assertEquals($expectedQuery, $this->queryType->getQuery($parameters)); + self::assertEquals($expectedQuery, $this->queryType->getQuery($parameters)); } final public function testGetName(): void { - $this->assertEquals( + self::assertEquals( $this->getExpectedName(), $this->queryType->getName() ); @@ -83,7 +83,7 @@ final public function testGetName(): void final public function testGetSupportedParameters(): void { - $this->assertEqualsCanonicalizing( + self::assertEqualsCanonicalizing( $this->getExpectedSupportedParameters(), $this->queryType->getSupportedParameters() ); diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/CustomFieldSortClauseParserTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/CustomFieldSortClauseParserTest.php index 2b6f314155..3de9451bdb 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/CustomFieldSortClauseParserTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/CustomFieldSortClauseParserTest.php @@ -42,7 +42,7 @@ public function testParse(): void $parser->method('parseSortDirection')->willReturn(Query::SORT_ASC); - $this->assertEquals( + self::assertEquals( new CustomField( self::EXAMPLE_SEARCH_INDEX_FIELD, Query::SORT_ASC @@ -53,7 +53,7 @@ public function testParse(): void public function testSupports(): void { - $this->assertTrue($this->parser->supports('custom_field')); + self::assertTrue($this->parser->supports('custom_field')); } } diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParserTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParserTest.php index 8ad71c8939..73ba7925fb 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParserTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParserTest.php @@ -35,12 +35,12 @@ public function testParse(): void $parser = $this->createMock(SortSpecParserInterface::class); $parser->method('parseSortDirection')->willReturn(Query::SORT_ASC); - $this->assertEquals( + self::assertEquals( new Location\Depth(Query::SORT_ASC), $this->defaultSortClauseParser->parse($parser, 'depth') ); - $this->assertEquals( + self::assertEquals( new Location\Priority(Query::SORT_ASC), $this->defaultSortClauseParser->parse($parser, 'priority') ); @@ -62,11 +62,11 @@ public function testParseThrowsUnsupportedSortClauseException(): void public function testSupports(): void { - $this->assertTrue($this->defaultSortClauseParser->supports('depth')); - $this->assertTrue($this->defaultSortClauseParser->supports('priority')); - $this->assertTrue($this->defaultSortClauseParser->supports('id')); + self::assertTrue($this->defaultSortClauseParser->supports('depth')); + self::assertTrue($this->defaultSortClauseParser->supports('priority')); + self::assertTrue($this->defaultSortClauseParser->supports('id')); - $this->assertFalse($this->defaultSortClauseParser->supports('unsupported')); + self::assertFalse($this->defaultSortClauseParser->supports('unsupported')); } } diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/FieldSortClauseParserTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/FieldSortClauseParserTest.php index 67f8f516fd..613135f003 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/FieldSortClauseParserTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/FieldSortClauseParserTest.php @@ -46,7 +46,7 @@ public function testParse(): void $parser->method('parseSortDirection')->willReturn(Query::SORT_ASC); - $this->assertEquals( + self::assertEquals( new Field(self::EXAMPLE_CONTENT_TYPE_ID, self::EXAMPLE_FIELD_ID, Query::SORT_ASC), $this->fieldSortClauseParser->parse($parser, 'field') ); @@ -54,7 +54,7 @@ public function testParse(): void public function testSupports(): void { - $this->assertTrue($this->fieldSortClauseParser->supports('field')); + self::assertTrue($this->fieldSortClauseParser->supports('field')); } } diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/MapDistanceSortClauseParserTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/MapDistanceSortClauseParserTest.php index 53e79cc717..80fd905831 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/MapDistanceSortClauseParserTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/MapDistanceSortClauseParserTest.php @@ -52,7 +52,7 @@ public function testParse(): void $parser->method('parseSortDirection')->willReturn(Query::SORT_ASC); - $this->assertEquals( + self::assertEquals( new MapLocationDistance( self::EXAMPLE_CONTENT_TYPE_ID, self::EXAMPLE_FIELD_ID, @@ -66,7 +66,7 @@ public function testParse(): void public function testSupports(): void { - $this->assertTrue($this->mapDistanceSortClauseParser->supports('map_distance')); + self::assertTrue($this->mapDistanceSortClauseParser->supports('map_distance')); } } diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/RandomSortClauseParserTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/RandomSortClauseParserTest.php index ef8ad4af4c..a29839618c 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/RandomSortClauseParserTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/RandomSortClauseParserTest.php @@ -42,7 +42,7 @@ public function testParse(): void $parser->method('parseSortDirection')->willReturn(Query::SORT_ASC); - $this->assertEquals( + self::assertEquals( new Random(self::EXAMPLE_SEED, Query::SORT_ASC), $this->randomSortClauseParser->parse($parser, 'random') ); @@ -50,7 +50,7 @@ public function testParse(): void public function testSupports(): void { - $this->assertTrue($this->randomSortClauseParser->supports('random')); + self::assertTrue($this->randomSortClauseParser->supports('random')); } } diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParserDispatcherTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParserDispatcherTest.php index a324383604..257fba4008 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParserDispatcherTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParserDispatcherTest.php @@ -30,7 +30,7 @@ public function testParse(): void $dispatcher = new SortClauseParserDispatcher([$parser]); - $this->assertEquals( + self::assertEquals( $sortClause, $dispatcher->parse($sortSpecParser, self::EXAMPLE_SORT_CLAUSE) ); @@ -59,7 +59,7 @@ public function testSupports(): void $dispatcher = new SortClauseParserDispatcher([$parser]); - $this->assertTrue($dispatcher->supports(self::EXAMPLE_SORT_CLAUSE)); + self::assertTrue($dispatcher->supports(self::EXAMPLE_SORT_CLAUSE)); } } diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerTest.php index 5535ef5837..4fa3ee4698 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerTest.php @@ -22,7 +22,7 @@ public function testTokenize(string $input, iterable $expectedTokens): void $lexer = new SortSpecLexer(); $lexer->tokenize($input); - $this->assertEquals($expectedTokens, $lexer->getAll()); + self::assertEquals($expectedTokens, $lexer->getAll()); } public function dataProviderForTokenize(): iterable @@ -178,7 +178,7 @@ public function testConsume(): void $output[] = $lexer->consume(); } - $this->assertEquals([ + self::assertEquals([ new Token(Token::TYPE_ID, 'foo', 0), new Token(Token::TYPE_COMMA, ',', 3), new Token(Token::TYPE_ASC, 'asc', 5), diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecParserTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecParserTest.php index 1f04b168f9..19483b357f 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecParserTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecParserTest.php @@ -28,7 +28,7 @@ public function testParseSortDirection(array $input, string $expectedDirection): $lexer = new SortSpecLexerStub($input); $parser = new SortSpecParser($this->createMock(SortClauseParserInterface::class), $lexer); - $this->assertEquals($expectedDirection, $parser->parseSortDirection()); + self::assertEquals($expectedDirection, $parser->parseSortDirection()); } public function dataProviderForParseSortDirection(): iterable @@ -77,7 +77,7 @@ public function testParseSortClauseList(): void ->with($parser, self::EXAMPLE_SORT_CLAUSE_ID) ->willReturnOnConsecutiveCalls($sortClauseA, $sortClauseB); - $this->assertEquals( + self::assertEquals( [$sortClauseA, $sortClauseB], $parser->parseSortClausesList() ); @@ -95,12 +95,12 @@ public function testParseSortClause(): void $sortClause = $this->createMock(SortClause::class); $sortClauseArgsParser - ->expects($this->once()) + ->expects(self::once()) ->method('parse') ->with($parser, self::EXAMPLE_SORT_CLAUSE_ID) ->willReturn($sortClause); - $this->assertEquals($sortClause, $parser->parseSortClause()); + self::assertEquals($sortClause, $parser->parseSortClause()); } public function testMatch(): void @@ -108,15 +108,15 @@ public function testMatch(): void $token = new Token(Token::TYPE_ID, self::EXAMPLE_SORT_CLAUSE_ID); $lexer = $this->createMock(SortSpecLexerInterface::class); - $lexer->expects($this->once())->method('peek')->willReturn($token); - $lexer->expects($this->once())->method('consume')->willReturn($token); + $lexer->expects(self::once())->method('peek')->willReturn($token); + $lexer->expects(self::once())->method('consume')->willReturn($token); $parser = new SortSpecParser( $this->createMock(SortClauseParserInterface::class), $lexer ); - $this->assertEquals($token, $parser->match(Token::TYPE_ID)); + self::assertEquals($token, $parser->match(Token::TYPE_ID)); } public function testMatchAny(): void @@ -124,15 +124,15 @@ public function testMatchAny(): void $token = new Token(Token::TYPE_ASC); $lexer = $this->createMock(SortSpecLexerInterface::class); - $lexer->expects($this->once())->method('peek')->willReturn($token); - $lexer->expects($this->once())->method('consume')->willReturn($token); + $lexer->expects(self::once())->method('peek')->willReturn($token); + $lexer->expects(self::once())->method('consume')->willReturn($token); $parser = new SortSpecParser( $this->createMock(SortClauseParserInterface::class), $lexer ); - $this->assertEquals($token, $parser->matchAnyOf(Token::TYPE_ASC, Token::TYPE_DESC)); + self::assertEquals($token, $parser->matchAnyOf(Token::TYPE_ASC, Token::TYPE_DESC)); } } diff --git a/tests/lib/Repository/Common/FacetedSearchProvider.php b/tests/lib/Repository/Common/FacetedSearchProvider.php index 1c290d098e..440142f963 100644 --- a/tests/lib/Repository/Common/FacetedSearchProvider.php +++ b/tests/lib/Repository/Common/FacetedSearchProvider.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Common; use Ibexa\Contracts\Core\Repository\Values\Content\Query; diff --git a/tests/lib/Repository/ContentThumbnail/ContentFieldStrategyTest.php b/tests/lib/Repository/ContentThumbnail/ContentFieldStrategyTest.php index c9db0f8cf9..b36a030310 100644 --- a/tests/lib/Repository/ContentThumbnail/ContentFieldStrategyTest.php +++ b/tests/lib/Repository/ContentThumbnail/ContentFieldStrategyTest.php @@ -50,19 +50,19 @@ public function testHasStrategy(): void $this->getFieldTypeBasedThumbnailStrategy('example'), ])); - $this->assertTrue($contentFieldStrategy->hasStrategy('example')); - $this->assertFalse($contentFieldStrategy->hasStrategy('something_else')); + self::assertTrue($contentFieldStrategy->hasStrategy('example')); + self::assertFalse($contentFieldStrategy->hasStrategy('something_else')); } public function testAddStrategy(): void { $contentFieldStrategy = new ContentFieldStrategy(new ArrayIterator()); - $this->assertFalse($contentFieldStrategy->hasStrategy('example')); + self::assertFalse($contentFieldStrategy->hasStrategy('example')); $contentFieldStrategy->addStrategy('example', $this->getFieldTypeBasedThumbnailStrategy('example')); - $this->assertTrue($contentFieldStrategy->hasStrategy('example')); + self::assertTrue($contentFieldStrategy->hasStrategy('example')); } public function testSetStrategies(): void @@ -71,16 +71,16 @@ public function testSetStrategies(): void $this->getFieldTypeBasedThumbnailStrategy('previous'), ])); - $this->assertTrue($contentFieldStrategy->hasStrategy('previous')); + self::assertTrue($contentFieldStrategy->hasStrategy('previous')); $contentFieldStrategy->setStrategies([ $this->getFieldTypeBasedThumbnailStrategy('new-example-1'), $this->getFieldTypeBasedThumbnailStrategy('new-example-2'), ]); - $this->assertFalse($contentFieldStrategy->hasStrategy('previous')); - $this->assertTrue($contentFieldStrategy->hasStrategy('new-example-1')); - $this->assertTrue($contentFieldStrategy->hasStrategy('new-example-2')); + self::assertFalse($contentFieldStrategy->hasStrategy('previous')); + self::assertTrue($contentFieldStrategy->hasStrategy('new-example-1')); + self::assertTrue($contentFieldStrategy->hasStrategy('new-example-2')); } public function testGetThumbnailFound(): void @@ -96,8 +96,8 @@ public function testGetThumbnailFound(): void $thumbnail = $contentFieldStrategy->getThumbnail($field); - $this->assertInstanceOf(Thumbnail::class, $thumbnail); - $this->assertEquals('example-value', $thumbnail->resource); + self::assertInstanceOf(Thumbnail::class, $thumbnail); + self::assertEquals('example-value', $thumbnail->resource); } public function testGetThumbnailNotFound(): void diff --git a/tests/lib/Repository/ContentThumbnail/StaticStrategyTest.php b/tests/lib/Repository/ContentThumbnail/StaticStrategyTest.php index 8780bcba70..ac83a2fdc3 100644 --- a/tests/lib/Repository/ContentThumbnail/StaticStrategyTest.php +++ b/tests/lib/Repository/ContentThumbnail/StaticStrategyTest.php @@ -34,7 +34,7 @@ public function testStaticStrategy() $fieldMocks, ); - $this->assertEquals( + self::assertEquals( new Thumbnail([ 'resource' => $resource, ]), diff --git a/tests/lib/Repository/ContentThumbnail/ThumbnailChainStrategyTest.php b/tests/lib/Repository/ContentThumbnail/ThumbnailChainStrategyTest.php index 59eef016e4..9979962144 100644 --- a/tests/lib/Repository/ContentThumbnail/ThumbnailChainStrategyTest.php +++ b/tests/lib/Repository/ContentThumbnail/ThumbnailChainStrategyTest.php @@ -30,12 +30,12 @@ public function testThumbnailStrategyChaining(): void ]; $firstStrategyMock - ->expects($this->once()) + ->expects(self::once()) ->method('getThumbnail') ->willReturn(null); $secondStrategyMock - ->expects($this->once()) + ->expects(self::once()) ->method('getThumbnail') ->willReturn(new Thumbnail()); @@ -49,7 +49,7 @@ public function testThumbnailStrategyChaining(): void $fieldMocks ); - $this->assertInstanceOf(Thumbnail::class, $result); + self::assertInstanceOf(Thumbnail::class, $result); } public function testThumbnailStrategyChainBreakOnThumbnailFound(): void @@ -66,19 +66,19 @@ public function testThumbnailStrategyChainBreakOnThumbnailFound(): void ]; $firstStrategyMock - ->expects($this->once()) + ->expects(self::once()) ->method('getThumbnail') ->willReturn(null); $secondStrategyMock - ->expects($this->once()) + ->expects(self::once()) ->method('getThumbnail') ->willReturn(new Thumbnail([ 'resource' => 'second', ])); $thirdStrategyMock - ->expects($this->never()) + ->expects(self::never()) ->method('getThumbnail') ->willReturn(new Thumbnail([ 'resource' => 'third', @@ -95,8 +95,8 @@ public function testThumbnailStrategyChainBreakOnThumbnailFound(): void $fieldMocks ); - $this->assertInstanceOf(Thumbnail::class, $result); - $this->assertEquals(new Thumbnail(['resource' => 'second']), $result); + self::assertInstanceOf(Thumbnail::class, $result); + self::assertEquals(new Thumbnail(['resource' => 'second']), $result); } } diff --git a/tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest.php b/tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest.php index b28b45d2cf..00966aa8a1 100644 --- a/tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest.php +++ b/tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\ContentValidator; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; @@ -31,7 +32,7 @@ public function testKnownValidationObject(): void ]); $errors = $contentValidatorStrategy->validate(new ObjectState()); - $this->assertEquals(['test'], $errors); + self::assertEquals(['test'], $errors); } public function testSupportsUnknownValidationObject(): void @@ -39,7 +40,7 @@ public function testSupportsUnknownValidationObject(): void $contentValidatorStrategy = new ContentValidatorStrategy([]); $supports = $contentValidatorStrategy->supports(new ObjectState()); - $this->assertFalse($supports); + self::assertFalse($supports); } public function testSuportsKnownValidationObject(): void @@ -50,7 +51,7 @@ public function testSuportsKnownValidationObject(): void $supports = $contentValidatorStrategy->supports(new ObjectState()); - $this->assertTrue($supports); + self::assertTrue($supports); } public function testMergeValidationErrors(): void @@ -71,7 +72,7 @@ public function testMergeValidationErrors(): void ]); $errors = $contentValidatorStrategy->validate(new ObjectState()); - $this->assertEquals([ + self::assertEquals([ 123 => ['eng-GB' => '123-eng-GB'], 321 => ['pol-PL' => '321-pol-PL'], 456 => [ diff --git a/tests/lib/Repository/Decorator/BookmarkServiceDecoratorTest.php b/tests/lib/Repository/Decorator/BookmarkServiceDecoratorTest.php index 538aa839d8..d78248b3bd 100644 --- a/tests/lib/Repository/Decorator/BookmarkServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/BookmarkServiceDecoratorTest.php @@ -34,7 +34,7 @@ public function testCreateBookmarkDecorator() $parameters = [$this->createMock(Location::class)]; - $serviceMock->expects($this->once())->method('createBookmark')->with(...$parameters); + $serviceMock->expects(self::once())->method('createBookmark')->with(...$parameters); $decoratedService->createBookmark(...$parameters); } @@ -46,7 +46,7 @@ public function testDeleteBookmarkDecorator() $parameters = [$this->createMock(Location::class)]; - $serviceMock->expects($this->once())->method('deleteBookmark')->with(...$parameters); + $serviceMock->expects(self::once())->method('deleteBookmark')->with(...$parameters); $decoratedService->deleteBookmark(...$parameters); } @@ -61,7 +61,7 @@ public function testLoadBookmarksDecorator() 606, ]; - $serviceMock->expects($this->once())->method('loadBookmarks')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadBookmarks')->with(...$parameters); $decoratedService->loadBookmarks(...$parameters); } @@ -73,7 +73,7 @@ public function testIsBookmarkedDecorator() $parameters = [$this->createMock(Location::class)]; - $serviceMock->expects($this->once())->method('isBookmarked')->with(...$parameters); + $serviceMock->expects(self::once())->method('isBookmarked')->with(...$parameters); $decoratedService->isBookmarked(...$parameters); } diff --git a/tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php b/tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php index 71ec775c27..2ae5ef567e 100644 --- a/tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php @@ -48,7 +48,7 @@ public function testLoadContentInfoDecorator() $parameters = [self::EXAMPLE_CONTENT_ID]; - $serviceMock->expects($this->once())->method('loadContentInfo')->with(...$parameters)->willReturn($this->createMock(ContentInfo::class)); + $serviceMock->expects(self::once())->method('loadContentInfo')->with(...$parameters)->willReturn($this->createMock(ContentInfo::class)); $decoratedService->loadContentInfo(...$parameters); } @@ -60,7 +60,7 @@ public function testLoadContentInfoListDecorator() $parameters = [['random_value_5ced05ce154173.99718966']]; - $serviceMock->expects($this->once())->method('loadContentInfoList')->with(...$parameters)->willReturn([]); + $serviceMock->expects(self::once())->method('loadContentInfoList')->with(...$parameters)->willReturn([]); $decoratedService->loadContentInfoList(...$parameters); } @@ -72,7 +72,7 @@ public function testLoadContentInfoByRemoteIdDecorator() $parameters = ['random_value_5ced05ce1541a6.54558542']; - $serviceMock->expects($this->once())->method('loadContentInfoByRemoteId')->with(...$parameters)->willReturn($this->createMock(ContentInfo::class)); + $serviceMock->expects(self::once())->method('loadContentInfoByRemoteId')->with(...$parameters)->willReturn($this->createMock(ContentInfo::class)); $decoratedService->loadContentInfoByRemoteId(...$parameters); } @@ -87,7 +87,7 @@ public function testLoadVersionInfoDecorator() self::EXAMPLE_VERSION_NO, ]; - $serviceMock->expects($this->once())->method('loadVersionInfo')->with(...$parameters)->willReturn($this->createMock(VersionInfo::class)); + $serviceMock->expects(self::once())->method('loadVersionInfo')->with(...$parameters)->willReturn($this->createMock(VersionInfo::class)); $decoratedService->loadVersionInfo(...$parameters); } @@ -102,7 +102,7 @@ public function testLoadVersionInfoByIdDecorator() self::EXAMPLE_VERSION_NO, ]; - $serviceMock->expects($this->once())->method('loadVersionInfoById')->with(...$parameters)->willReturn($this->createMock(VersionInfo::class)); + $serviceMock->expects(self::once())->method('loadVersionInfoById')->with(...$parameters)->willReturn($this->createMock(VersionInfo::class)); $decoratedService->loadVersionInfoById(...$parameters); } @@ -119,7 +119,7 @@ public function testLoadContentByContentInfoDecorator() true, ]; - $serviceMock->expects($this->once())->method('loadContentByContentInfo')->with(...$parameters)->willReturn($this->createMock(Content::class)); + $serviceMock->expects(self::once())->method('loadContentByContentInfo')->with(...$parameters)->willReturn($this->createMock(Content::class)); $decoratedService->loadContentByContentInfo(...$parameters); } @@ -135,7 +135,7 @@ public function testLoadContentByVersionInfoDecorator() true, ]; - $serviceMock->expects($this->once())->method('loadContentByVersionInfo')->with(...$parameters)->willReturn($this->createMock(Content::class)); + $serviceMock->expects(self::once())->method('loadContentByVersionInfo')->with(...$parameters)->willReturn($this->createMock(Content::class)); $decoratedService->loadContentByVersionInfo(...$parameters); } @@ -152,7 +152,7 @@ public function testLoadContentDecorator() true, ]; - $serviceMock->expects($this->once())->method('loadContent')->with(...$parameters)->willReturn($this->createMock(Content::class)); + $serviceMock->expects(self::once())->method('loadContent')->with(...$parameters)->willReturn($this->createMock(Content::class)); $decoratedService->loadContent(...$parameters); } @@ -169,7 +169,7 @@ public function testLoadContentByRemoteIdDecorator() true, ]; - $serviceMock->expects($this->once())->method('loadContentByRemoteId')->with(...$parameters)->willReturn($this->createMock(Content::class)); + $serviceMock->expects(self::once())->method('loadContentByRemoteId')->with(...$parameters)->willReturn($this->createMock(Content::class)); $decoratedService->loadContentByRemoteId(...$parameters); } @@ -185,7 +185,7 @@ public function testLoadContentListByContentInfoDecorator() true, ]; - $serviceMock->expects($this->once())->method('loadContentListByContentInfo')->with(...$parameters)->willReturn([]); + $serviceMock->expects(self::once())->method('loadContentListByContentInfo')->with(...$parameters)->willReturn([]); $decoratedService->loadContentListByContentInfo(...$parameters); } @@ -200,7 +200,7 @@ public function testCreateContentDecorator() ['random_value_5ced05ce155881.06739513'], ]; - $serviceMock->expects($this->once())->method('createContent')->with(...$parameters)->willReturn($this->createMock(Content::class)); + $serviceMock->expects(self::once())->method('createContent')->with(...$parameters)->willReturn($this->createMock(Content::class)); $decoratedService->createContent(...$parameters); } @@ -215,7 +215,7 @@ public function testUpdateContentMetadataDecorator() $this->createMock(ContentMetadataUpdateStruct::class), ]; - $serviceMock->expects($this->once())->method('updateContentMetadata')->with(...$parameters)->willReturn($this->createMock(Content::class)); + $serviceMock->expects(self::once())->method('updateContentMetadata')->with(...$parameters)->willReturn($this->createMock(Content::class)); $decoratedService->updateContentMetadata(...$parameters); } @@ -227,7 +227,7 @@ public function testDeleteContentDecorator() $parameters = [$this->createMock(ContentInfo::class)]; - $serviceMock->expects($this->once())->method('deleteContent')->with(...$parameters)->willReturn([]); + $serviceMock->expects(self::once())->method('deleteContent')->with(...$parameters)->willReturn([]); $decoratedService->deleteContent(...$parameters); } @@ -243,7 +243,7 @@ public function testCreateContentDraftDecorator() $this->createMock(User::class), ]; - $serviceMock->expects($this->once())->method('createContentDraft')->with(...$parameters)->willReturn($this->createMock(Content::class)); + $serviceMock->expects(self::once())->method('createContentDraft')->with(...$parameters)->willReturn($this->createMock(Content::class)); $decoratedService->createContentDraft(...$parameters); } @@ -255,7 +255,7 @@ public function testLoadContentDraftsDecorator() $parameters = [$this->createMock(User::class)]; - $serviceMock->expects($this->once())->method('loadContentDrafts')->with(...$parameters)->willReturn([]); + $serviceMock->expects(self::once())->method('loadContentDrafts')->with(...$parameters)->willReturn([]); $decoratedService->loadContentDrafts(...$parameters); } @@ -270,7 +270,7 @@ public function testUpdateContentDecorator() $this->createMock(ContentUpdateStruct::class), ]; - $serviceMock->expects($this->once())->method('updateContent')->with(...$parameters)->willReturn($this->createMock(Content::class)); + $serviceMock->expects(self::once())->method('updateContent')->with(...$parameters)->willReturn($this->createMock(Content::class)); $decoratedService->updateContent(...$parameters); } @@ -282,7 +282,7 @@ public function testPublishVersionDecorator() $parameters = [$this->createMock(VersionInfo::class)]; - $serviceMock->expects($this->once())->method('publishVersion')->with(...$parameters)->willReturn($this->createMock(Content::class)); + $serviceMock->expects(self::once())->method('publishVersion')->with(...$parameters)->willReturn($this->createMock(Content::class)); $decoratedService->publishVersion(...$parameters); } @@ -294,7 +294,7 @@ public function testDeleteVersionDecorator() $parameters = [$this->createMock(VersionInfo::class)]; - $serviceMock->expects($this->once())->method('deleteVersion')->with(...$parameters); + $serviceMock->expects(self::once())->method('deleteVersion')->with(...$parameters); $decoratedService->deleteVersion(...$parameters); } @@ -306,7 +306,7 @@ public function testLoadVersionsDecorator() $parameters = [$this->createMock(ContentInfo::class)]; - $serviceMock->expects($this->once())->method('loadVersions')->with(...$parameters)->willReturn([]); + $serviceMock->expects(self::once())->method('loadVersions')->with(...$parameters)->willReturn([]); $decoratedService->loadVersions(...$parameters); } @@ -322,7 +322,7 @@ public function testCopyContentDecorator() $this->createMock(VersionInfo::class), ]; - $serviceMock->expects($this->once())->method('copyContent')->with(...$parameters)->willReturn($this->createMock(Content::class)); + $serviceMock->expects(self::once())->method('copyContent')->with(...$parameters)->willReturn($this->createMock(Content::class)); $decoratedService->copyContent(...$parameters); } @@ -334,7 +334,7 @@ public function testLoadRelationsDecorator() $parameters = [$this->createMock(VersionInfo::class)]; - $serviceMock->expects($this->once())->method('loadRelations')->with(...$parameters)->willReturn([]); + $serviceMock->expects(self::once())->method('loadRelations')->with(...$parameters)->willReturn([]); $decoratedService->loadRelations(...$parameters); } @@ -346,7 +346,7 @@ public function testLoadReverseRelationsDecorator() $parameters = [$this->createMock(ContentInfo::class)]; - $serviceMock->expects($this->once())->method('loadReverseRelations')->with(...$parameters)->willReturn([]); + $serviceMock->expects(self::once())->method('loadReverseRelations')->with(...$parameters)->willReturn([]); $decoratedService->loadReverseRelations(...$parameters); } @@ -361,7 +361,7 @@ public function testAddRelationDecorator() $this->createMock(ContentInfo::class), ]; - $serviceMock->expects($this->once())->method('addRelation')->with(...$parameters)->willReturn($this->createMock(Relation::class)); + $serviceMock->expects(self::once())->method('addRelation')->with(...$parameters)->willReturn($this->createMock(Relation::class)); $decoratedService->addRelation(...$parameters); } @@ -376,7 +376,7 @@ public function testDeleteRelationDecorator() $this->createMock(ContentInfo::class), ]; - $serviceMock->expects($this->once())->method('deleteRelation')->with(...$parameters); + $serviceMock->expects(self::once())->method('deleteRelation')->with(...$parameters); $decoratedService->deleteRelation(...$parameters); } @@ -391,7 +391,7 @@ public function testDeleteTranslationDecorator() self::EXAMPLE_LANGUAGE_CODE, ]; - $serviceMock->expects($this->once())->method('deleteTranslation')->with(...$parameters); + $serviceMock->expects(self::once())->method('deleteTranslation')->with(...$parameters); $decoratedService->deleteTranslation(...$parameters); } @@ -406,7 +406,7 @@ public function testDeleteTranslationFromDraftDecorator() 'random_value_5ced05ce156d37.22902273', ]; - $serviceMock->expects($this->once())->method('deleteTranslationFromDraft')->with(...$parameters)->willReturn($this->createMock(Content::class)); + $serviceMock->expects(self::once())->method('deleteTranslationFromDraft')->with(...$parameters)->willReturn($this->createMock(Content::class)); $decoratedService->deleteTranslationFromDraft(...$parameters); } @@ -418,7 +418,7 @@ public function testHideContentDecorator() $parameters = [$this->createMock(ContentInfo::class)]; - $serviceMock->expects($this->once())->method('hideContent')->with(...$parameters); + $serviceMock->expects(self::once())->method('hideContent')->with(...$parameters); $decoratedService->hideContent(...$parameters); } @@ -430,7 +430,7 @@ public function testRevealContentDecorator() $parameters = [$this->createMock(ContentInfo::class)]; - $serviceMock->expects($this->once())->method('revealContent')->with(...$parameters); + $serviceMock->expects(self::once())->method('revealContent')->with(...$parameters); $decoratedService->revealContent(...$parameters); } @@ -445,7 +445,7 @@ public function testNewContentCreateStructDecorator() 'random_value_5ced05ce156db7.87562997', ]; - $serviceMock->expects($this->once())->method('newContentCreateStruct')->with(...$parameters)->willReturn($this->createMock(ContentCreateStruct::class)); + $serviceMock->expects(self::once())->method('newContentCreateStruct')->with(...$parameters)->willReturn($this->createMock(ContentCreateStruct::class)); $decoratedService->newContentCreateStruct(...$parameters); } @@ -457,7 +457,7 @@ public function testNewContentMetadataUpdateStructDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('newContentMetadataUpdateStruct')->with(...$parameters)->willReturn($this->createMock(ContentMetadataUpdateStruct::class)); + $serviceMock->expects(self::once())->method('newContentMetadataUpdateStruct')->with(...$parameters)->willReturn($this->createMock(ContentMetadataUpdateStruct::class)); $decoratedService->newContentMetadataUpdateStruct(...$parameters); } @@ -469,7 +469,7 @@ public function testNewContentUpdateStructDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('newContentUpdateStruct')->with(...$parameters)->willReturn($this->createMock(ContentUpdateStruct::class)); + $serviceMock->expects(self::once())->method('newContentUpdateStruct')->with(...$parameters)->willReturn($this->createMock(ContentUpdateStruct::class)); $decoratedService->newContentUpdateStruct(...$parameters); } diff --git a/tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php b/tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php index 4c33354bad..0d63158785 100644 --- a/tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php @@ -44,7 +44,7 @@ public function testCreateContentTypeGroupDecorator() $parameters = [$this->createMock(ContentTypeGroupCreateStruct::class)]; - $serviceMock->expects($this->once())->method('createContentTypeGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('createContentTypeGroup')->with(...$parameters); $decoratedService->createContentTypeGroup(...$parameters); } @@ -59,7 +59,7 @@ public function testLoadContentTypeGroupDecorator() ['prioritized_language_value'], ]; - $serviceMock->expects($this->once())->method('loadContentTypeGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadContentTypeGroup')->with(...$parameters); $decoratedService->loadContentTypeGroup(...$parameters); } @@ -74,7 +74,7 @@ public function testLoadContentTypeGroupByIdentifierDecorator() ['prioritized_language_value'], ]; - $serviceMock->expects($this->once())->method('loadContentTypeGroupByIdentifier')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadContentTypeGroupByIdentifier')->with(...$parameters); $decoratedService->loadContentTypeGroupByIdentifier(...$parameters); } @@ -86,7 +86,7 @@ public function testLoadContentTypeGroupsDecorator() $parameters = [['prioritized_language_value']]; - $serviceMock->expects($this->once())->method('loadContentTypeGroups')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadContentTypeGroups')->with(...$parameters); $decoratedService->loadContentTypeGroups(...$parameters); } @@ -101,7 +101,7 @@ public function testUpdateContentTypeGroupDecorator() $this->createMock(ContentTypeGroupUpdateStruct::class), ]; - $serviceMock->expects($this->once())->method('updateContentTypeGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('updateContentTypeGroup')->with(...$parameters); $decoratedService->updateContentTypeGroup(...$parameters); } @@ -113,7 +113,7 @@ public function testDeleteContentTypeGroupDecorator() $parameters = [$this->createMock(ContentTypeGroup::class)]; - $serviceMock->expects($this->once())->method('deleteContentTypeGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('deleteContentTypeGroup')->with(...$parameters); $decoratedService->deleteContentTypeGroup(...$parameters); } @@ -128,7 +128,7 @@ public function testCreateContentTypeDecorator() ['content_type_group_identifier'], ]; - $serviceMock->expects($this->once())->method('createContentType')->with(...$parameters); + $serviceMock->expects(self::once())->method('createContentType')->with(...$parameters); $decoratedService->createContentType(...$parameters); } @@ -143,7 +143,7 @@ public function testLoadContentTypeDecorator() ['prioritized_language_value'], ]; - $serviceMock->expects($this->once())->method('loadContentType')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadContentType')->with(...$parameters); $decoratedService->loadContentType(...$parameters); } @@ -158,7 +158,7 @@ public function testLoadContentTypeByIdentifierDecorator() ['prioritized_language_value'], ]; - $serviceMock->expects($this->once())->method('loadContentTypeByIdentifier')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadContentTypeByIdentifier')->with(...$parameters); $decoratedService->loadContentTypeByIdentifier(...$parameters); } @@ -173,7 +173,7 @@ public function testLoadContentTypeByRemoteIdDecorator() ['random_value_5ced05ce102338.43562070'], ]; - $serviceMock->expects($this->once())->method('loadContentTypeByRemoteId')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadContentTypeByRemoteId')->with(...$parameters); $decoratedService->loadContentTypeByRemoteId(...$parameters); } @@ -185,7 +185,7 @@ public function testLoadContentTypeDraftDecorator() $parameters = [1, true]; - $serviceMock->expects($this->once())->method('loadContentTypeDraft')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadContentTypeDraft')->with(...$parameters); $decoratedService->loadContentTypeDraft(...$parameters); } @@ -200,7 +200,7 @@ public function testLoadContentTypeListDecorator() ['random_value_5ced05ce102394.49260758'], ]; - $serviceMock->expects($this->once())->method('loadContentTypeList')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadContentTypeList')->with(...$parameters); $decoratedService->loadContentTypeList(...$parameters); } @@ -215,7 +215,7 @@ public function testLoadContentTypesDecorator() ['random_value_5ced05ce1023d7.35531928'], ]; - $serviceMock->expects($this->once())->method('loadContentTypes')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadContentTypes')->with(...$parameters); $decoratedService->loadContentTypes(...$parameters); } @@ -227,7 +227,7 @@ public function testCreateContentTypeDraftDecorator() $parameters = [$this->createMock(ContentType::class)]; - $serviceMock->expects($this->once())->method('createContentTypeDraft')->with(...$parameters); + $serviceMock->expects(self::once())->method('createContentTypeDraft')->with(...$parameters); $decoratedService->createContentTypeDraft(...$parameters); } @@ -242,7 +242,7 @@ public function testUpdateContentTypeDraftDecorator() $this->createMock(ContentTypeUpdateStruct::class), ]; - $serviceMock->expects($this->once())->method('updateContentTypeDraft')->with(...$parameters); + $serviceMock->expects(self::once())->method('updateContentTypeDraft')->with(...$parameters); $decoratedService->updateContentTypeDraft(...$parameters); } @@ -254,7 +254,7 @@ public function testDeleteContentTypeDecorator() $parameters = [$this->createMock(ContentType::class)]; - $serviceMock->expects($this->once())->method('deleteContentType')->with(...$parameters); + $serviceMock->expects(self::once())->method('deleteContentType')->with(...$parameters); $decoratedService->deleteContentType(...$parameters); } @@ -269,7 +269,7 @@ public function testCopyContentTypeDecorator() $this->createMock(User::class), ]; - $serviceMock->expects($this->once())->method('copyContentType')->with(...$parameters); + $serviceMock->expects(self::once())->method('copyContentType')->with(...$parameters); $decoratedService->copyContentType(...$parameters); } @@ -284,7 +284,7 @@ public function testAssignContentTypeGroupDecorator() $this->createMock(ContentTypeGroup::class), ]; - $serviceMock->expects($this->once())->method('assignContentTypeGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('assignContentTypeGroup')->with(...$parameters); $decoratedService->assignContentTypeGroup(...$parameters); } @@ -299,7 +299,7 @@ public function testUnassignContentTypeGroupDecorator() $this->createMock(ContentTypeGroup::class), ]; - $serviceMock->expects($this->once())->method('unassignContentTypeGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('unassignContentTypeGroup')->with(...$parameters); $decoratedService->unassignContentTypeGroup(...$parameters); } @@ -314,7 +314,7 @@ public function testAddFieldDefinitionDecorator() $this->createMock(FieldDefinitionCreateStruct::class), ]; - $serviceMock->expects($this->once())->method('addFieldDefinition')->with(...$parameters); + $serviceMock->expects(self::once())->method('addFieldDefinition')->with(...$parameters); $decoratedService->addFieldDefinition(...$parameters); } @@ -329,7 +329,7 @@ public function testRemoveFieldDefinitionDecorator() $this->createMock(FieldDefinition::class), ]; - $serviceMock->expects($this->once())->method('removeFieldDefinition')->with(...$parameters); + $serviceMock->expects(self::once())->method('removeFieldDefinition')->with(...$parameters); $decoratedService->removeFieldDefinition(...$parameters); } @@ -345,7 +345,7 @@ public function testUpdateFieldDefinitionDecorator() $this->createMock(FieldDefinitionUpdateStruct::class), ]; - $serviceMock->expects($this->once())->method('updateFieldDefinition')->with(...$parameters); + $serviceMock->expects(self::once())->method('updateFieldDefinition')->with(...$parameters); $decoratedService->updateFieldDefinition(...$parameters); } @@ -357,7 +357,7 @@ public function testPublishContentTypeDraftDecorator() $parameters = [$this->createMock(ContentTypeDraft::class)]; - $serviceMock->expects($this->once())->method('publishContentTypeDraft')->with(...$parameters); + $serviceMock->expects(self::once())->method('publishContentTypeDraft')->with(...$parameters); $decoratedService->publishContentTypeDraft(...$parameters); } @@ -369,7 +369,7 @@ public function testNewContentTypeGroupCreateStructDecorator() $parameters = ['random_value_5ced05ce105ab6.78784768']; - $serviceMock->expects($this->once())->method('newContentTypeGroupCreateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newContentTypeGroupCreateStruct')->with(...$parameters); $decoratedService->newContentTypeGroupCreateStruct(...$parameters); } @@ -381,7 +381,7 @@ public function testNewContentTypeCreateStructDecorator() $parameters = ['random_value_5ced05ce105af0.66964747']; - $serviceMock->expects($this->once())->method('newContentTypeCreateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newContentTypeCreateStruct')->with(...$parameters); $decoratedService->newContentTypeCreateStruct(...$parameters); } @@ -393,7 +393,7 @@ public function testNewContentTypeUpdateStructDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('newContentTypeUpdateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newContentTypeUpdateStruct')->with(...$parameters); $decoratedService->newContentTypeUpdateStruct(...$parameters); } @@ -405,7 +405,7 @@ public function testNewContentTypeGroupUpdateStructDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('newContentTypeGroupUpdateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newContentTypeGroupUpdateStruct')->with(...$parameters); $decoratedService->newContentTypeGroupUpdateStruct(...$parameters); } @@ -420,7 +420,7 @@ public function testNewFieldDefinitionCreateStructDecorator() 'random_value_5ced05ce105b57.01268982', ]; - $serviceMock->expects($this->once())->method('newFieldDefinitionCreateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newFieldDefinitionCreateStruct')->with(...$parameters); $decoratedService->newFieldDefinitionCreateStruct(...$parameters); } @@ -432,7 +432,7 @@ public function testNewFieldDefinitionUpdateStructDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('newFieldDefinitionUpdateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newFieldDefinitionUpdateStruct')->with(...$parameters); $decoratedService->newFieldDefinitionUpdateStruct(...$parameters); } @@ -444,7 +444,7 @@ public function testIsContentTypeUsedDecorator() $parameters = [$this->createMock(ContentType::class)]; - $serviceMock->expects($this->once())->method('isContentTypeUsed')->with(...$parameters); + $serviceMock->expects(self::once())->method('isContentTypeUsed')->with(...$parameters); $decoratedService->isContentTypeUsed(...$parameters); } @@ -459,7 +459,7 @@ public function testRemoveContentTypeTranslationDecorator() 'random_value_5ced05ce105c21.42399370', ]; - $serviceMock->expects($this->once())->method('removeContentTypeTranslation')->with(...$parameters); + $serviceMock->expects(self::once())->method('removeContentTypeTranslation')->with(...$parameters); $decoratedService->removeContentTypeTranslation(...$parameters); } diff --git a/tests/lib/Repository/Decorator/FieldTypeServiceDecoratorTest.php b/tests/lib/Repository/Decorator/FieldTypeServiceDecoratorTest.php index 5f64e4f594..371e743645 100644 --- a/tests/lib/Repository/Decorator/FieldTypeServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/FieldTypeServiceDecoratorTest.php @@ -33,7 +33,7 @@ public function testGetFieldTypesDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('getFieldTypes')->with(...$parameters); + $serviceMock->expects(self::once())->method('getFieldTypes')->with(...$parameters); $decoratedService->getFieldTypes(...$parameters); } @@ -45,7 +45,7 @@ public function testGetFieldTypeDecorator() $parameters = ['random_value_5ced05ce0eda66.08473991']; - $serviceMock->expects($this->once())->method('getFieldType')->with(...$parameters); + $serviceMock->expects(self::once())->method('getFieldType')->with(...$parameters); $decoratedService->getFieldType(...$parameters); } @@ -57,7 +57,7 @@ public function testHasFieldTypeDecorator() $parameters = ['random_value_5ced05ce0edab1.24451920']; - $serviceMock->expects($this->once())->method('hasFieldType')->with(...$parameters); + $serviceMock->expects(self::once())->method('hasFieldType')->with(...$parameters); $decoratedService->hasFieldType(...$parameters); } diff --git a/tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php b/tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php index b6023105d1..68736d8053 100644 --- a/tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php @@ -35,7 +35,7 @@ public function testCreateLanguageDecorator() $parameters = [$this->createMock(LanguageCreateStruct::class)]; - $serviceMock->expects($this->once())->method('createLanguage')->with(...$parameters); + $serviceMock->expects(self::once())->method('createLanguage')->with(...$parameters); $decoratedService->createLanguage(...$parameters); } @@ -50,7 +50,7 @@ public function testUpdateLanguageNameDecorator() 'random_value_5ced05ce0e4e45.35668562', ]; - $serviceMock->expects($this->once())->method('updateLanguageName')->with(...$parameters); + $serviceMock->expects(self::once())->method('updateLanguageName')->with(...$parameters); $decoratedService->updateLanguageName(...$parameters); } @@ -62,7 +62,7 @@ public function testEnableLanguageDecorator() $parameters = [$this->createMock(Language::class)]; - $serviceMock->expects($this->once())->method('enableLanguage')->with(...$parameters); + $serviceMock->expects(self::once())->method('enableLanguage')->with(...$parameters); $decoratedService->enableLanguage(...$parameters); } @@ -74,7 +74,7 @@ public function testDisableLanguageDecorator() $parameters = [$this->createMock(Language::class)]; - $serviceMock->expects($this->once())->method('disableLanguage')->with(...$parameters); + $serviceMock->expects(self::once())->method('disableLanguage')->with(...$parameters); $decoratedService->disableLanguage(...$parameters); } @@ -86,7 +86,7 @@ public function testLoadLanguageDecorator() $parameters = ['random_value_5ced05ce0e4f44.11240129']; - $serviceMock->expects($this->once())->method('loadLanguage')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadLanguage')->with(...$parameters); $decoratedService->loadLanguage(...$parameters); } @@ -98,7 +98,7 @@ public function testLoadLanguagesDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('loadLanguages')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadLanguages')->with(...$parameters); $decoratedService->loadLanguages(...$parameters); } @@ -110,7 +110,7 @@ public function testLoadLanguageByIdDecorator() $parameters = [100]; - $serviceMock->expects($this->once())->method('loadLanguageById')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadLanguageById')->with(...$parameters); $decoratedService->loadLanguageById(...$parameters); } @@ -122,7 +122,7 @@ public function testLoadLanguageListByCodeDecorator() $parameters = [['random_value_5ced05ce0e4fb1.09879860']]; - $serviceMock->expects($this->once())->method('loadLanguageListByCode')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadLanguageListByCode')->with(...$parameters); $decoratedService->loadLanguageListByCode(...$parameters); } @@ -134,7 +134,7 @@ public function testLoadLanguageListByIdDecorator() $parameters = [['random_value_5ced05ce0e4fd1.13022531']]; - $serviceMock->expects($this->once())->method('loadLanguageListById')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadLanguageListById')->with(...$parameters); $decoratedService->loadLanguageListById(...$parameters); } @@ -146,7 +146,7 @@ public function testDeleteLanguageDecorator() $parameters = [$this->createMock(Language::class)]; - $serviceMock->expects($this->once())->method('deleteLanguage')->with(...$parameters); + $serviceMock->expects(self::once())->method('deleteLanguage')->with(...$parameters); $decoratedService->deleteLanguage(...$parameters); } @@ -158,7 +158,7 @@ public function testGetDefaultLanguageCodeDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('getDefaultLanguageCode')->with(...$parameters); + $serviceMock->expects(self::once())->method('getDefaultLanguageCode')->with(...$parameters); $decoratedService->getDefaultLanguageCode(...$parameters); } @@ -170,7 +170,7 @@ public function testNewLanguageCreateStructDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('newLanguageCreateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newLanguageCreateStruct')->with(...$parameters); $decoratedService->newLanguageCreateStruct(...$parameters); } diff --git a/tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php b/tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php index 2e579230e3..4aef5882a2 100644 --- a/tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php @@ -45,7 +45,7 @@ public function testCopySubtreeDecorator() $this->createMock(Location::class), ]; - $serviceMock->expects($this->once())->method('copySubtree')->with(...$parameters); + $serviceMock->expects(self::once())->method('copySubtree')->with(...$parameters); $decoratedService->copySubtree(...$parameters); } @@ -61,7 +61,7 @@ public function testLoadLocationDecorator() true, ]; - $serviceMock->expects($this->once())->method('loadLocation')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadLocation')->with(...$parameters); $decoratedService->loadLocation(...$parameters); } @@ -77,7 +77,7 @@ public function testLoadLocationListDecorator() true, ]; - $serviceMock->expects($this->once())->method('loadLocationList')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadLocationList')->with(...$parameters); $decoratedService->loadLocationList(...$parameters); } @@ -93,7 +93,7 @@ public function testLoadLocationByRemoteIdDecorator() true, ]; - $serviceMock->expects($this->once())->method('loadLocationByRemoteId')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadLocationByRemoteId')->with(...$parameters); $decoratedService->loadLocationByRemoteId(...$parameters); } @@ -109,7 +109,7 @@ public function testLoadLocationsDecorator() ['random_value_5ced05ce1603f9.50138109'], ]; - $serviceMock->expects($this->once())->method('loadLocations')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadLocations')->with(...$parameters); $decoratedService->loadLocations(...$parameters); } @@ -126,7 +126,7 @@ public function testLoadLocationChildrenDecorator() ['random_value_5ced05ce160459.73858583'], ]; - $serviceMock->expects($this->once())->method('loadLocationChildren')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadLocationChildren')->with(...$parameters); $decoratedService->loadLocationChildren(...$parameters); } @@ -141,7 +141,7 @@ public function testLoadParentLocationsForDraftContentDecorator() ['random_value_5ced05ce160494.77580729'], ]; - $serviceMock->expects($this->once())->method('loadParentLocationsForDraftContent')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadParentLocationsForDraftContent')->with(...$parameters); $decoratedService->loadParentLocationsForDraftContent(...$parameters); } @@ -153,7 +153,7 @@ public function testGetLocationChildCountDecorator() $parameters = [$this->createMock(Location::class)]; - $serviceMock->expects($this->once())->method('getLocationChildCount')->with(...$parameters); + $serviceMock->expects(self::once())->method('getLocationChildCount')->with(...$parameters); $decoratedService->getLocationChildCount(...$parameters); } @@ -168,7 +168,7 @@ public function testCreateLocationDecorator() $this->createMock(LocationCreateStruct::class), ]; - $serviceMock->expects($this->once())->method('createLocation')->with(...$parameters); + $serviceMock->expects(self::once())->method('createLocation')->with(...$parameters); $decoratedService->createLocation(...$parameters); } @@ -183,7 +183,7 @@ public function testUpdateLocationDecorator() $this->createMock(LocationUpdateStruct::class), ]; - $serviceMock->expects($this->once())->method('updateLocation')->with(...$parameters); + $serviceMock->expects(self::once())->method('updateLocation')->with(...$parameters); $decoratedService->updateLocation(...$parameters); } @@ -198,7 +198,7 @@ public function testSwapLocationDecorator() $this->createMock(Location::class), ]; - $serviceMock->expects($this->once())->method('swapLocation')->with(...$parameters); + $serviceMock->expects(self::once())->method('swapLocation')->with(...$parameters); $decoratedService->swapLocation(...$parameters); } @@ -210,7 +210,7 @@ public function testHideLocationDecorator() $parameters = [$this->createMock(Location::class)]; - $serviceMock->expects($this->once())->method('hideLocation')->with(...$parameters); + $serviceMock->expects(self::once())->method('hideLocation')->with(...$parameters); $decoratedService->hideLocation(...$parameters); } @@ -222,7 +222,7 @@ public function testUnhideLocationDecorator() $parameters = [$this->createMock(Location::class)]; - $serviceMock->expects($this->once())->method('unhideLocation')->with(...$parameters); + $serviceMock->expects(self::once())->method('unhideLocation')->with(...$parameters); $decoratedService->unhideLocation(...$parameters); } @@ -237,7 +237,7 @@ public function testMoveSubtreeDecorator() $this->createMock(Location::class), ]; - $serviceMock->expects($this->once())->method('moveSubtree')->with(...$parameters); + $serviceMock->expects(self::once())->method('moveSubtree')->with(...$parameters); $decoratedService->moveSubtree(...$parameters); } @@ -249,7 +249,7 @@ public function testDeleteLocationDecorator() $parameters = [$this->createMock(Location::class)]; - $serviceMock->expects($this->once())->method('deleteLocation')->with(...$parameters); + $serviceMock->expects(self::once())->method('deleteLocation')->with(...$parameters); $decoratedService->deleteLocation(...$parameters); } @@ -261,7 +261,7 @@ public function testNewLocationCreateStructDecorator() $parameters = [self::EXAMPLE_LOCATION_ID]; - $serviceMock->expects($this->once())->method('newLocationCreateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newLocationCreateStruct')->with(...$parameters); $decoratedService->newLocationCreateStruct(...$parameters); } @@ -273,7 +273,7 @@ public function testNewLocationUpdateStructDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('newLocationUpdateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newLocationUpdateStruct')->with(...$parameters); $decoratedService->newLocationUpdateStruct(...$parameters); } @@ -285,7 +285,7 @@ public function testGetAllLocationsCountDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('getAllLocationsCount')->with(...$parameters); + $serviceMock->expects(self::once())->method('getAllLocationsCount')->with(...$parameters); $decoratedService->getAllLocationsCount(...$parameters); } @@ -300,7 +300,7 @@ public function testLoadAllLocationsDecorator() 847, ]; - $serviceMock->expects($this->once())->method('loadAllLocations')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadAllLocations')->with(...$parameters); $decoratedService->loadAllLocations(...$parameters); } diff --git a/tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php b/tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php index 23271ed559..7fb308e153 100644 --- a/tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php @@ -38,7 +38,7 @@ public function testLoadNotificationsDecorator() 959, ]; - $serviceMock->expects($this->once())->method('loadNotifications')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadNotifications')->with(...$parameters); $decoratedService->loadNotifications(...$parameters); } @@ -50,7 +50,7 @@ public function testGetNotificationDecorator() $parameters = [469]; - $serviceMock->expects($this->once())->method('getNotification')->with(...$parameters); + $serviceMock->expects(self::once())->method('getNotification')->with(...$parameters); $decoratedService->getNotification(...$parameters); } @@ -62,7 +62,7 @@ public function testMarkNotificationAsReadDecorator() $parameters = [$this->createMock(Notification::class)]; - $serviceMock->expects($this->once())->method('markNotificationAsRead')->with(...$parameters); + $serviceMock->expects(self::once())->method('markNotificationAsRead')->with(...$parameters); $decoratedService->markNotificationAsRead(...$parameters); } @@ -74,7 +74,7 @@ public function testGetPendingNotificationCountDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('getPendingNotificationCount')->with(...$parameters); + $serviceMock->expects(self::once())->method('getPendingNotificationCount')->with(...$parameters); $decoratedService->getPendingNotificationCount(...$parameters); } @@ -86,7 +86,7 @@ public function testGetNotificationCountDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('getNotificationCount')->with(...$parameters); + $serviceMock->expects(self::once())->method('getNotificationCount')->with(...$parameters); $decoratedService->getNotificationCount(...$parameters); } @@ -98,7 +98,7 @@ public function testCreateNotificationDecorator() $parameters = [$this->createMock(CreateStruct::class)]; - $serviceMock->expects($this->once())->method('createNotification')->with(...$parameters); + $serviceMock->expects(self::once())->method('createNotification')->with(...$parameters); $decoratedService->createNotification(...$parameters); } @@ -110,7 +110,7 @@ public function testDeleteNotificationDecorator() $parameters = [$this->createMock(Notification::class)]; - $serviceMock->expects($this->once())->method('deleteNotification')->with(...$parameters); + $serviceMock->expects(self::once())->method('deleteNotification')->with(...$parameters); $decoratedService->deleteNotification(...$parameters); } diff --git a/tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php b/tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php index 89e633188d..a9c18ab742 100644 --- a/tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php @@ -40,7 +40,7 @@ public function testCreateObjectStateGroupDecorator() $parameters = [$this->createMock(ObjectStateGroupCreateStruct::class)]; - $serviceMock->expects($this->once())->method('createObjectStateGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('createObjectStateGroup')->with(...$parameters); $decoratedService->createObjectStateGroup(...$parameters); } @@ -55,7 +55,7 @@ public function testLoadObjectStateGroupDecorator() ['eng-GB'], ]; - $serviceMock->expects($this->once())->method('loadObjectStateGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadObjectStateGroup')->with(...$parameters); $decoratedService->loadObjectStateGroup(...$parameters); } @@ -72,14 +72,14 @@ public function testLoadObjectStateGroupByIdentifierDecorator(): void ]; $serviceMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadObjectStateGroupByIdentifier') ->with(...$parameters) ->willReturn($expectedObjectStateGroup); $actualObjectStateGroup = $decoratedService->loadObjectStateGroupByIdentifier(...$parameters); - $this->assertEquals( + self::assertEquals( $expectedObjectStateGroup, $actualObjectStateGroup ); @@ -96,7 +96,7 @@ public function testLoadObjectStateGroupsDecorator() ['eng-GB'], ]; - $serviceMock->expects($this->once())->method('loadObjectStateGroups')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadObjectStateGroups')->with(...$parameters); $decoratedService->loadObjectStateGroups(...$parameters); } @@ -111,7 +111,7 @@ public function testLoadObjectStatesDecorator() ['random_value_5ced05ce168263.48122762'], ]; - $serviceMock->expects($this->once())->method('loadObjectStates')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadObjectStates')->with(...$parameters); $decoratedService->loadObjectStates(...$parameters); } @@ -126,7 +126,7 @@ public function testUpdateObjectStateGroupDecorator() $this->createMock(ObjectStateGroupUpdateStruct::class), ]; - $serviceMock->expects($this->once())->method('updateObjectStateGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('updateObjectStateGroup')->with(...$parameters); $decoratedService->updateObjectStateGroup(...$parameters); } @@ -138,7 +138,7 @@ public function testDeleteObjectStateGroupDecorator() $parameters = [$this->createMock(ObjectStateGroup::class)]; - $serviceMock->expects($this->once())->method('deleteObjectStateGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('deleteObjectStateGroup')->with(...$parameters); $decoratedService->deleteObjectStateGroup(...$parameters); } @@ -153,7 +153,7 @@ public function testCreateObjectStateDecorator() $this->createMock(ObjectStateCreateStruct::class), ]; - $serviceMock->expects($this->once())->method('createObjectState')->with(...$parameters); + $serviceMock->expects(self::once())->method('createObjectState')->with(...$parameters); $decoratedService->createObjectState(...$parameters); } @@ -168,7 +168,7 @@ public function testLoadObjectStateDecorator() ['eng-GB'], ]; - $serviceMock->expects($this->once())->method('loadObjectState')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadObjectState')->with(...$parameters); $decoratedService->loadObjectState(...$parameters); } @@ -186,14 +186,14 @@ public function testLoadObjectStateDecoratorByIdentifier(): void ]; $serviceMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadObjectStateByIdentifier') ->with(...$parameters) ->willReturn($expectedObjectState); $actualObjectState = $decoratedService->loadObjectStateByIdentifier(...$parameters); - $this->assertEquals( + self::assertEquals( $expectedObjectState, $actualObjectState ); @@ -209,7 +209,7 @@ public function testUpdateObjectStateDecorator() $this->createMock(ObjectStateUpdateStruct::class), ]; - $serviceMock->expects($this->once())->method('updateObjectState')->with(...$parameters); + $serviceMock->expects(self::once())->method('updateObjectState')->with(...$parameters); $decoratedService->updateObjectState(...$parameters); } @@ -224,7 +224,7 @@ public function testSetPriorityOfObjectStateDecorator() 100, ]; - $serviceMock->expects($this->once())->method('setPriorityOfObjectState')->with(...$parameters); + $serviceMock->expects(self::once())->method('setPriorityOfObjectState')->with(...$parameters); $decoratedService->setPriorityOfObjectState(...$parameters); } @@ -236,7 +236,7 @@ public function testDeleteObjectStateDecorator() $parameters = [$this->createMock(ObjectState::class)]; - $serviceMock->expects($this->once())->method('deleteObjectState')->with(...$parameters); + $serviceMock->expects(self::once())->method('deleteObjectState')->with(...$parameters); $decoratedService->deleteObjectState(...$parameters); } @@ -252,7 +252,7 @@ public function testSetContentStateDecorator() $this->createMock(ObjectState::class), ]; - $serviceMock->expects($this->once())->method('setContentState')->with(...$parameters); + $serviceMock->expects(self::once())->method('setContentState')->with(...$parameters); $decoratedService->setContentState(...$parameters); } @@ -267,7 +267,7 @@ public function testGetContentStateDecorator() $this->createMock(ObjectStateGroup::class), ]; - $serviceMock->expects($this->once())->method('getContentState')->with(...$parameters); + $serviceMock->expects(self::once())->method('getContentState')->with(...$parameters); $decoratedService->getContentState(...$parameters); } @@ -279,7 +279,7 @@ public function testGetContentCountDecorator() $parameters = [$this->createMock(ObjectState::class)]; - $serviceMock->expects($this->once())->method('getContentCount')->with(...$parameters); + $serviceMock->expects(self::once())->method('getContentCount')->with(...$parameters); $decoratedService->getContentCount(...$parameters); } @@ -291,7 +291,7 @@ public function testNewObjectStateGroupCreateStructDecorator() $parameters = ['random_value_5ced05ce169c83.55416136']; - $serviceMock->expects($this->once())->method('newObjectStateGroupCreateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newObjectStateGroupCreateStruct')->with(...$parameters); $decoratedService->newObjectStateGroupCreateStruct(...$parameters); } @@ -303,7 +303,7 @@ public function testNewObjectStateGroupUpdateStructDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('newObjectStateGroupUpdateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newObjectStateGroupUpdateStruct')->with(...$parameters); $decoratedService->newObjectStateGroupUpdateStruct(...$parameters); } @@ -315,7 +315,7 @@ public function testNewObjectStateCreateStructDecorator() $parameters = ['random_value_5ced05ce169cc9.01447563']; - $serviceMock->expects($this->once())->method('newObjectStateCreateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newObjectStateCreateStruct')->with(...$parameters); $decoratedService->newObjectStateCreateStruct(...$parameters); } @@ -327,7 +327,7 @@ public function testNewObjectStateUpdateStructDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('newObjectStateUpdateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newObjectStateUpdateStruct')->with(...$parameters); $decoratedService->newObjectStateUpdateStruct(...$parameters); } diff --git a/tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php b/tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php index 16606a9bdc..c8ee832ba4 100644 --- a/tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php @@ -47,7 +47,7 @@ public function testCreateRoleDecorator() $parameters = [$this->createMock(RoleCreateStruct::class)]; - $serviceMock->expects($this->once())->method('createRole')->with(...$parameters); + $serviceMock->expects(self::once())->method('createRole')->with(...$parameters); $decoratedService->createRole(...$parameters); } @@ -59,7 +59,7 @@ public function testCreateRoleDraftDecorator() $parameters = [$this->createMock(Role::class)]; - $serviceMock->expects($this->once())->method('createRoleDraft')->with(...$parameters); + $serviceMock->expects(self::once())->method('createRoleDraft')->with(...$parameters); $decoratedService->createRoleDraft(...$parameters); } @@ -71,7 +71,7 @@ public function testLoadRoleDraftDecorator() $parameters = [self::ROLE_ID]; - $serviceMock->expects($this->once())->method('loadRoleDraft')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadRoleDraft')->with(...$parameters); $decoratedService->loadRoleDraft(...$parameters); } @@ -83,7 +83,7 @@ public function testLoadRoleDraftByRoleIdDecorator() $parameters = [self::ROLE_ID]; - $serviceMock->expects($this->once())->method('loadRoleDraftByRoleId')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadRoleDraftByRoleId')->with(...$parameters); $decoratedService->loadRoleDraftByRoleId(...$parameters); } @@ -98,7 +98,7 @@ public function testUpdateRoleDraftDecorator() $this->createMock(RoleUpdateStruct::class), ]; - $serviceMock->expects($this->once())->method('updateRoleDraft')->with(...$parameters); + $serviceMock->expects(self::once())->method('updateRoleDraft')->with(...$parameters); $decoratedService->updateRoleDraft(...$parameters); } @@ -113,7 +113,7 @@ public function testAddPolicyByRoleDraftDecorator() $this->createMock(PolicyCreateStruct::class), ]; - $serviceMock->expects($this->once())->method('addPolicyByRoleDraft')->with(...$parameters); + $serviceMock->expects(self::once())->method('addPolicyByRoleDraft')->with(...$parameters); $decoratedService->addPolicyByRoleDraft(...$parameters); } @@ -128,7 +128,7 @@ public function testRemovePolicyByRoleDraftDecorator() $this->createMock(PolicyDraft::class), ]; - $serviceMock->expects($this->once())->method('removePolicyByRoleDraft')->with(...$parameters); + $serviceMock->expects(self::once())->method('removePolicyByRoleDraft')->with(...$parameters); $decoratedService->removePolicyByRoleDraft(...$parameters); } @@ -144,7 +144,7 @@ public function testUpdatePolicyByRoleDraftDecorator() $this->createMock(PolicyUpdateStruct::class), ]; - $serviceMock->expects($this->once())->method('updatePolicyByRoleDraft')->with(...$parameters); + $serviceMock->expects(self::once())->method('updatePolicyByRoleDraft')->with(...$parameters); $decoratedService->updatePolicyByRoleDraft(...$parameters); } @@ -156,7 +156,7 @@ public function testDeleteRoleDraftDecorator() $parameters = [$this->createMock(RoleDraft::class)]; - $serviceMock->expects($this->once())->method('deleteRoleDraft')->with(...$parameters); + $serviceMock->expects(self::once())->method('deleteRoleDraft')->with(...$parameters); $decoratedService->deleteRoleDraft(...$parameters); } @@ -168,7 +168,7 @@ public function testPublishRoleDraftDecorator() $parameters = [$this->createMock(RoleDraft::class)]; - $serviceMock->expects($this->once())->method('publishRoleDraft')->with(...$parameters); + $serviceMock->expects(self::once())->method('publishRoleDraft')->with(...$parameters); $decoratedService->publishRoleDraft(...$parameters); } @@ -180,7 +180,7 @@ public function testLoadRoleDecorator() $parameters = [self::ROLE_ID]; - $serviceMock->expects($this->once())->method('loadRole')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadRole')->with(...$parameters); $decoratedService->loadRole(...$parameters); } @@ -192,7 +192,7 @@ public function testLoadRoleByIdentifierDecorator() $parameters = ['random_value_5ced05ce14b742.13672543']; - $serviceMock->expects($this->once())->method('loadRoleByIdentifier')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadRoleByIdentifier')->with(...$parameters); $decoratedService->loadRoleByIdentifier(...$parameters); } @@ -204,7 +204,7 @@ public function testLoadRolesDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('loadRoles')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadRoles')->with(...$parameters); $decoratedService->loadRoles(...$parameters); } @@ -216,7 +216,7 @@ public function testDeleteRoleDecorator() $parameters = [$this->createMock(Role::class)]; - $serviceMock->expects($this->once())->method('deleteRole')->with(...$parameters); + $serviceMock->expects(self::once())->method('deleteRole')->with(...$parameters); $decoratedService->deleteRole(...$parameters); } @@ -232,7 +232,7 @@ public function testAssignRoleToUserGroupDecorator() $this->createMock(RoleLimitation::class), ]; - $serviceMock->expects($this->once())->method('assignRoleToUserGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('assignRoleToUserGroup')->with(...$parameters); $decoratedService->assignRoleToUserGroup(...$parameters); } @@ -248,7 +248,7 @@ public function testAssignRoleToUserDecorator() $this->createMock(RoleLimitation::class), ]; - $serviceMock->expects($this->once())->method('assignRoleToUser')->with(...$parameters); + $serviceMock->expects(self::once())->method('assignRoleToUser')->with(...$parameters); $decoratedService->assignRoleToUser(...$parameters); } @@ -260,7 +260,7 @@ public function testLoadRoleAssignmentDecorator() $parameters = [self::ROLE_ASSIGNMENT_ID]; - $serviceMock->expects($this->once())->method('loadRoleAssignment')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadRoleAssignment')->with(...$parameters); $decoratedService->loadRoleAssignment(...$parameters); } @@ -272,7 +272,7 @@ public function testGetRoleAssignmentsDecorator() $parameters = [$this->createMock(Role::class)]; - $serviceMock->expects($this->once())->method('getRoleAssignments')->with(...$parameters); + $serviceMock->expects(self::once())->method('getRoleAssignments')->with(...$parameters); $decoratedService->getRoleAssignments(...$parameters); } @@ -287,7 +287,7 @@ public function testGetRoleAssignmentsForUserDecorator() true, ]; - $serviceMock->expects($this->once())->method('getRoleAssignmentsForUser')->with(...$parameters); + $serviceMock->expects(self::once())->method('getRoleAssignmentsForUser')->with(...$parameters); $decoratedService->getRoleAssignmentsForUser(...$parameters); } @@ -299,7 +299,7 @@ public function testGetRoleAssignmentsForUserGroupDecorator() $parameters = [$this->createMock(UserGroup::class)]; - $serviceMock->expects($this->once())->method('getRoleAssignmentsForUserGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('getRoleAssignmentsForUserGroup')->with(...$parameters); $decoratedService->getRoleAssignmentsForUserGroup(...$parameters); } @@ -311,7 +311,7 @@ public function testRemoveRoleAssignmentDecorator() $parameters = [$this->createMock(RoleAssignment::class)]; - $serviceMock->expects($this->once())->method('removeRoleAssignment')->with(...$parameters); + $serviceMock->expects(self::once())->method('removeRoleAssignment')->with(...$parameters); $decoratedService->removeRoleAssignment(...$parameters); } @@ -323,7 +323,7 @@ public function testNewRoleCreateStructDecorator() $parameters = ['random_value_5ced05ce14d674.30093215']; - $serviceMock->expects($this->once())->method('newRoleCreateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newRoleCreateStruct')->with(...$parameters); $decoratedService->newRoleCreateStruct(...$parameters); } @@ -338,7 +338,7 @@ public function testNewPolicyCreateStructDecorator() 'random_value_5ced05ce14d6b6.22048821', ]; - $serviceMock->expects($this->once())->method('newPolicyCreateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newPolicyCreateStruct')->with(...$parameters); $decoratedService->newPolicyCreateStruct(...$parameters); } @@ -350,7 +350,7 @@ public function testNewPolicyUpdateStructDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('newPolicyUpdateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newPolicyUpdateStruct')->with(...$parameters); $decoratedService->newPolicyUpdateStruct(...$parameters); } @@ -362,7 +362,7 @@ public function testNewRoleUpdateStructDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('newRoleUpdateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newRoleUpdateStruct')->with(...$parameters); $decoratedService->newRoleUpdateStruct(...$parameters); } @@ -374,7 +374,7 @@ public function testGetLimitationTypeDecorator() $parameters = ['random_value_5ced05ce14d714.69905914']; - $serviceMock->expects($this->once())->method('getLimitationType')->with(...$parameters); + $serviceMock->expects(self::once())->method('getLimitationType')->with(...$parameters); $decoratedService->getLimitationType(...$parameters); } @@ -389,7 +389,7 @@ public function testGetLimitationTypesByModuleFunctionDecorator() 'random_value_5ced05ce14d743.90303575', ]; - $serviceMock->expects($this->once())->method('getLimitationTypesByModuleFunction')->with(...$parameters); + $serviceMock->expects(self::once())->method('getLimitationTypesByModuleFunction')->with(...$parameters); $decoratedService->getLimitationTypesByModuleFunction(...$parameters); } diff --git a/tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php b/tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php index d87382a6bc..49e0603a9b 100644 --- a/tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php @@ -40,7 +40,7 @@ public function testFindContentDecorator() true, ]; - $serviceMock->expects($this->once())->method('findContent')->with(...$parameters); + $serviceMock->expects(self::once())->method('findContent')->with(...$parameters); $decoratedService->findContent(...$parameters); } @@ -56,7 +56,7 @@ public function testFindContentInfoDecorator() true, ]; - $serviceMock->expects($this->once())->method('findContentInfo')->with(...$parameters); + $serviceMock->expects(self::once())->method('findContentInfo')->with(...$parameters); $decoratedService->findContentInfo(...$parameters); } @@ -72,7 +72,7 @@ public function testFindSingleDecorator() true, ]; - $serviceMock->expects($this->once())->method('findSingle')->with(...$parameters); + $serviceMock->expects(self::once())->method('findSingle')->with(...$parameters); $decoratedService->findSingle(...$parameters); } @@ -89,7 +89,7 @@ public function testSuggestDecorator() $this->createMock(Criterion::class), ]; - $serviceMock->expects($this->once())->method('suggest')->with(...$parameters); + $serviceMock->expects(self::once())->method('suggest')->with(...$parameters); $decoratedService->suggest(...$parameters); } @@ -105,7 +105,7 @@ public function testFindLocationsDecorator() true, ]; - $serviceMock->expects($this->once())->method('findLocations')->with(...$parameters); + $serviceMock->expects(self::once())->method('findLocations')->with(...$parameters); $decoratedService->findLocations(...$parameters); } @@ -120,7 +120,7 @@ public function testSupportsDecorator(int $capability): void $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); - $serviceMock->expects($this->once())->method('supports')->with($capability); + $serviceMock->expects(self::once())->method('supports')->with($capability); $decoratedService->supports($capability); } diff --git a/tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php b/tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php index af6a0e9ce9..3a0ede8226 100644 --- a/tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php @@ -40,7 +40,7 @@ public function testCreateSectionDecorator() $parameters = [$this->createMock(SectionCreateStruct::class)]; - $serviceMock->expects($this->once())->method('createSection')->with(...$parameters); + $serviceMock->expects(self::once())->method('createSection')->with(...$parameters); $decoratedService->createSection(...$parameters); } @@ -55,7 +55,7 @@ public function testUpdateSectionDecorator() $this->createMock(SectionUpdateStruct::class), ]; - $serviceMock->expects($this->once())->method('updateSection')->with(...$parameters); + $serviceMock->expects(self::once())->method('updateSection')->with(...$parameters); $decoratedService->updateSection(...$parameters); } @@ -67,7 +67,7 @@ public function testLoadSectionDecorator() $parameters = [self::EXAMPLE_SECTION_ID]; - $serviceMock->expects($this->once())->method('loadSection')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadSection')->with(...$parameters); $decoratedService->loadSection(...$parameters); } @@ -79,7 +79,7 @@ public function testLoadSectionsDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('loadSections')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadSections')->with(...$parameters); $decoratedService->loadSections(...$parameters); } @@ -91,7 +91,7 @@ public function testLoadSectionByIdentifierDecorator() $parameters = ['random_value_5ced05ce10cd87.67751220']; - $serviceMock->expects($this->once())->method('loadSectionByIdentifier')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadSectionByIdentifier')->with(...$parameters); $decoratedService->loadSectionByIdentifier(...$parameters); } @@ -103,7 +103,7 @@ public function testCountAssignedContentsDecorator() $parameters = [$this->createMock(Section::class)]; - $serviceMock->expects($this->once())->method('countAssignedContents')->with(...$parameters); + $serviceMock->expects(self::once())->method('countAssignedContents')->with(...$parameters); $decoratedService->countAssignedContents(...$parameters); } @@ -115,7 +115,7 @@ public function testIsSectionUsedDecorator() $parameters = [$this->createMock(Section::class)]; - $serviceMock->expects($this->once())->method('isSectionUsed')->with(...$parameters); + $serviceMock->expects(self::once())->method('isSectionUsed')->with(...$parameters); $decoratedService->isSectionUsed(...$parameters); } @@ -130,7 +130,7 @@ public function testAssignSectionDecorator() $this->createMock(Section::class), ]; - $serviceMock->expects($this->once())->method('assignSection')->with(...$parameters); + $serviceMock->expects(self::once())->method('assignSection')->with(...$parameters); $decoratedService->assignSection(...$parameters); } @@ -145,7 +145,7 @@ public function testAssignSectionToSubtreeDecorator() $this->createMock(Section::class), ]; - $serviceMock->expects($this->once())->method('assignSectionToSubtree')->with(...$parameters); + $serviceMock->expects(self::once())->method('assignSectionToSubtree')->with(...$parameters); $decoratedService->assignSectionToSubtree(...$parameters); } @@ -157,7 +157,7 @@ public function testDeleteSectionDecorator() $parameters = [$this->createMock(Section::class)]; - $serviceMock->expects($this->once())->method('deleteSection')->with(...$parameters); + $serviceMock->expects(self::once())->method('deleteSection')->with(...$parameters); $decoratedService->deleteSection(...$parameters); } @@ -169,7 +169,7 @@ public function testNewSectionCreateStructDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('newSectionCreateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newSectionCreateStruct')->with(...$parameters); $decoratedService->newSectionCreateStruct(...$parameters); } @@ -181,7 +181,7 @@ public function testNewSectionUpdateStructDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('newSectionUpdateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newSectionUpdateStruct')->with(...$parameters); $decoratedService->newSectionUpdateStruct(...$parameters); } diff --git a/tests/lib/Repository/Decorator/SettingServiceDecoratorTest.php b/tests/lib/Repository/Decorator/SettingServiceDecoratorTest.php index 332d5c54f5..e0f95fcc5e 100644 --- a/tests/lib/Repository/Decorator/SettingServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/SettingServiceDecoratorTest.php @@ -39,7 +39,7 @@ public function testCreateSettingDecorator() $parameters = [$this->createMock(SettingCreateStruct::class)]; - $serviceMock->expects($this->once())->method('createSetting')->with(...$parameters); + $serviceMock->expects(self::once())->method('createSetting')->with(...$parameters); $decoratedService->createSetting(...$parameters); } @@ -54,7 +54,7 @@ public function testUpdateSettingDecorator() $this->createMock(SettingUpdateStruct::class), ]; - $serviceMock->expects($this->once())->method('updateSetting')->with(...$parameters); + $serviceMock->expects(self::once())->method('updateSetting')->with(...$parameters); $decoratedService->updateSetting(...$parameters); } @@ -69,7 +69,7 @@ public function testLoadSettingDecorator() self::EXAMPLE_SETTING_IDENTIFIER, ]; - $serviceMock->expects($this->once())->method('loadSetting')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadSetting')->with(...$parameters); $decoratedService->loadSetting(...$parameters); } @@ -81,7 +81,7 @@ public function testDeleteSettingDecorator() $parameters = [$this->createMock(Setting::class)]; - $serviceMock->expects($this->once())->method('deleteSetting')->with(...$parameters); + $serviceMock->expects(self::once())->method('deleteSetting')->with(...$parameters); $decoratedService->deleteSetting(...$parameters); } @@ -93,7 +93,7 @@ public function testNewSettingCreateStructDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('newSettingCreateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newSettingCreateStruct')->with(...$parameters); $decoratedService->newSettingCreateStruct(...$parameters); } @@ -105,7 +105,7 @@ public function testNewSettingUpdateStructDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('newSettingUpdateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newSettingUpdateStruct')->with(...$parameters); $decoratedService->newSettingUpdateStruct(...$parameters); } diff --git a/tests/lib/Repository/Decorator/TranslationServiceDecoratorTest.php b/tests/lib/Repository/Decorator/TranslationServiceDecoratorTest.php index 95a3ad4b76..e9f79bc47c 100644 --- a/tests/lib/Repository/Decorator/TranslationServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/TranslationServiceDecoratorTest.php @@ -37,7 +37,7 @@ public function testTranslateDecorator() 'random_value_5ced05ce16efc3.57825052', ]; - $serviceMock->expects($this->once())->method('translate')->with(...$parameters); + $serviceMock->expects(self::once())->method('translate')->with(...$parameters); $decoratedService->translate(...$parameters); } @@ -52,7 +52,7 @@ public function testTranslateStringDecorator() 'random_value_5ced05ce16f065.78328330', ]; - $serviceMock->expects($this->once())->method('translateString')->with(...$parameters); + $serviceMock->expects(self::once())->method('translateString')->with(...$parameters); $decoratedService->translateString(...$parameters); } diff --git a/tests/lib/Repository/Decorator/TrashServiceDecoratorTest.php b/tests/lib/Repository/Decorator/TrashServiceDecoratorTest.php index be533efc27..84d248da8a 100644 --- a/tests/lib/Repository/Decorator/TrashServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/TrashServiceDecoratorTest.php @@ -36,7 +36,7 @@ public function testLoadTrashItemDecorator() $parameters = [1]; - $serviceMock->expects($this->once())->method('loadTrashItem')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadTrashItem')->with(...$parameters); $decoratedService->loadTrashItem(...$parameters); } @@ -48,7 +48,7 @@ public function testTrashDecorator() $parameters = [$this->createMock(Location::class)]; - $serviceMock->expects($this->once())->method('trash')->with(...$parameters); + $serviceMock->expects(self::once())->method('trash')->with(...$parameters); $decoratedService->trash(...$parameters); } @@ -63,7 +63,7 @@ public function testRecoverDecorator() $this->createMock(Location::class), ]; - $serviceMock->expects($this->once())->method('recover')->with(...$parameters); + $serviceMock->expects(self::once())->method('recover')->with(...$parameters); $decoratedService->recover(...$parameters); } @@ -75,7 +75,7 @@ public function testEmptyTrashDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('emptyTrash')->with(...$parameters); + $serviceMock->expects(self::once())->method('emptyTrash')->with(...$parameters); $decoratedService->emptyTrash(...$parameters); } @@ -87,7 +87,7 @@ public function testDeleteTrashItemDecorator() $parameters = [$this->createMock(TrashItem::class)]; - $serviceMock->expects($this->once())->method('deleteTrashItem')->with(...$parameters); + $serviceMock->expects(self::once())->method('deleteTrashItem')->with(...$parameters); $decoratedService->deleteTrashItem(...$parameters); } @@ -99,7 +99,7 @@ public function testFindTrashItemsDecorator() $parameters = [$this->createMock(Query::class)]; - $serviceMock->expects($this->once())->method('findTrashItems')->with(...$parameters); + $serviceMock->expects(self::once())->method('findTrashItems')->with(...$parameters); $decoratedService->findTrashItems(...$parameters); } diff --git a/tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php b/tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php index c81a849d60..05f09e2e9b 100644 --- a/tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php @@ -43,7 +43,7 @@ public function testCreateUrlAliasDecorator() true, ]; - $serviceMock->expects($this->once())->method('createUrlAlias')->with(...$parameters); + $serviceMock->expects(self::once())->method('createUrlAlias')->with(...$parameters); $decoratedService->createUrlAlias(...$parameters); } @@ -61,7 +61,7 @@ public function testCreateGlobalUrlAliasDecorator() true, ]; - $serviceMock->expects($this->once())->method('createGlobalUrlAlias')->with(...$parameters); + $serviceMock->expects(self::once())->method('createGlobalUrlAlias')->with(...$parameters); $decoratedService->createGlobalUrlAlias(...$parameters); } @@ -77,7 +77,7 @@ public function testListLocationAliasesDecorator() 'random_value_5ced05ce0f4720.32499208', ]; - $serviceMock->expects($this->once())->method('listLocationAliases')->with(...$parameters); + $serviceMock->expects(self::once())->method('listLocationAliases')->with(...$parameters); $decoratedService->listLocationAliases(...$parameters); } @@ -93,7 +93,7 @@ public function testListGlobalAliasesDecorator() self::EXAMPLE_LIMIT, ]; - $serviceMock->expects($this->once())->method('listGlobalAliases')->with(...$parameters); + $serviceMock->expects(self::once())->method('listGlobalAliases')->with(...$parameters); $decoratedService->listGlobalAliases(...$parameters); } @@ -105,7 +105,7 @@ public function testRemoveAliasesDecorator() $parameters = [['random_value_5ced05ce0f4797.71498070']]; - $serviceMock->expects($this->once())->method('removeAliases')->with(...$parameters); + $serviceMock->expects(self::once())->method('removeAliases')->with(...$parameters); $decoratedService->removeAliases(...$parameters); } @@ -120,7 +120,7 @@ public function testLookupDecorator() 'random_value_5ced05ce0f47d7.99589118', ]; - $serviceMock->expects($this->once())->method('lookup')->with(...$parameters); + $serviceMock->expects(self::once())->method('lookup')->with(...$parameters); $decoratedService->lookup(...$parameters); } @@ -135,7 +135,7 @@ public function testReverseLookupDecorator() 'random_value_5ced05ce0f4803.92292057', ]; - $serviceMock->expects($this->once())->method('reverseLookup')->with(...$parameters); + $serviceMock->expects(self::once())->method('reverseLookup')->with(...$parameters); $decoratedService->reverseLookup(...$parameters); } @@ -147,7 +147,7 @@ public function testLoadDecorator() $parameters = ['random_value_5ced05ce0f4839.47843200']; - $serviceMock->expects($this->once())->method('load')->with(...$parameters); + $serviceMock->expects(self::once())->method('load')->with(...$parameters); $decoratedService->load(...$parameters); } @@ -159,7 +159,7 @@ public function testRefreshSystemUrlAliasesForLocationDecorator() $parameters = [$this->createMock(Location::class)]; - $serviceMock->expects($this->once())->method('refreshSystemUrlAliasesForLocation')->with(...$parameters); + $serviceMock->expects(self::once())->method('refreshSystemUrlAliasesForLocation')->with(...$parameters); $decoratedService->refreshSystemUrlAliasesForLocation(...$parameters); } @@ -171,7 +171,7 @@ public function testDeleteCorruptedUrlAliasesDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('deleteCorruptedUrlAliases')->with(...$parameters); + $serviceMock->expects(self::once())->method('deleteCorruptedUrlAliases')->with(...$parameters); $decoratedService->deleteCorruptedUrlAliases(...$parameters); } diff --git a/tests/lib/Repository/Decorator/URLServiceDecoratorTest.php b/tests/lib/Repository/Decorator/URLServiceDecoratorTest.php index 2ddf07e7b0..aba793e84f 100644 --- a/tests/lib/Repository/Decorator/URLServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/URLServiceDecoratorTest.php @@ -36,7 +36,7 @@ public function testCreateUpdateStructDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('createUpdateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('createUpdateStruct')->with(...$parameters); $decoratedService->createUpdateStruct(...$parameters); } @@ -48,7 +48,7 @@ public function testFindUrlsDecorator() $parameters = [$this->createMock(URLQuery::class)]; - $serviceMock->expects($this->once())->method('findUrls')->with(...$parameters); + $serviceMock->expects(self::once())->method('findUrls')->with(...$parameters); $decoratedService->findUrls(...$parameters); } @@ -64,7 +64,7 @@ public function testFindUsagesDecorator() 100, ]; - $serviceMock->expects($this->once())->method('findUsages')->with(...$parameters); + $serviceMock->expects(self::once())->method('findUsages')->with(...$parameters); $decoratedService->findUsages(...$parameters); } @@ -76,7 +76,7 @@ public function testLoadByIdDecorator() $parameters = [1]; - $serviceMock->expects($this->once())->method('loadById')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadById')->with(...$parameters); $decoratedService->loadById(...$parameters); } @@ -88,7 +88,7 @@ public function testLoadByUrlDecorator() $parameters = ['random_value_5ced05ce172635.77719845']; - $serviceMock->expects($this->once())->method('loadByUrl')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadByUrl')->with(...$parameters); $decoratedService->loadByUrl(...$parameters); } @@ -103,7 +103,7 @@ public function testUpdateUrlDecorator() $this->createMock(URLUpdateStruct::class), ]; - $serviceMock->expects($this->once())->method('updateUrl')->with(...$parameters); + $serviceMock->expects(self::once())->method('updateUrl')->with(...$parameters); $decoratedService->updateUrl(...$parameters); } diff --git a/tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest.php b/tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest.php index d6faa6f966..df525ca428 100644 --- a/tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest.php @@ -38,7 +38,7 @@ public function testCreateDecorator() true, ]; - $serviceMock->expects($this->once())->method('create')->with(...$parameters); + $serviceMock->expects(self::once())->method('create')->with(...$parameters); $decoratedService->create(...$parameters); } @@ -50,7 +50,7 @@ public function testRemoveDecorator() $parameters = [$this->createMock(URLWildcard::class)]; - $serviceMock->expects($this->once())->method('remove')->with(...$parameters); + $serviceMock->expects(self::once())->method('remove')->with(...$parameters); $decoratedService->remove(...$parameters); } @@ -62,7 +62,7 @@ public function testLoadDecorator() $parameters = [1]; - $serviceMock->expects($this->once())->method('load')->with(...$parameters); + $serviceMock->expects(self::once())->method('load')->with(...$parameters); $decoratedService->load(...$parameters); } @@ -77,7 +77,7 @@ public function testLoadAllDecorator() 100, ]; - $serviceMock->expects($this->once())->method('loadAll')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadAll')->with(...$parameters); $decoratedService->loadAll(...$parameters); } @@ -89,7 +89,7 @@ public function testTranslateDecorator() $parameters = ['ibexa.co']; - $serviceMock->expects($this->once())->method('translate')->with(...$parameters); + $serviceMock->expects(self::once())->method('translate')->with(...$parameters); $decoratedService->translate(...$parameters); } diff --git a/tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest.php b/tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest.php index 1fa544f83b..6add35ad56 100644 --- a/tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest.php @@ -33,7 +33,7 @@ public function testSetUserPreferenceDecorator() $parameters = [['random_value_5ced05ce1437c3.99987071']]; - $serviceMock->expects($this->once())->method('setUserPreference')->with(...$parameters); + $serviceMock->expects(self::once())->method('setUserPreference')->with(...$parameters); $decoratedService->setUserPreference(...$parameters); } @@ -45,7 +45,7 @@ public function testGetUserPreferenceDecorator() $parameters = ['random_value_5ced05ce143830.91322594']; - $serviceMock->expects($this->once())->method('getUserPreference')->with(...$parameters); + $serviceMock->expects(self::once())->method('getUserPreference')->with(...$parameters); $decoratedService->getUserPreference(...$parameters); } @@ -60,7 +60,7 @@ public function testLoadUserPreferencesDecorator() 922, ]; - $serviceMock->expects($this->once())->method('loadUserPreferences')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadUserPreferences')->with(...$parameters); $decoratedService->loadUserPreferences(...$parameters); } @@ -72,7 +72,7 @@ public function testGetUserPreferenceCountDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('getUserPreferenceCount')->with(...$parameters); + $serviceMock->expects(self::once())->method('getUserPreferenceCount')->with(...$parameters); $decoratedService->getUserPreferenceCount(...$parameters); } diff --git a/tests/lib/Repository/Decorator/UserServiceDecoratorTest.php b/tests/lib/Repository/Decorator/UserServiceDecoratorTest.php index 23cb2ab1be..18f6852eb6 100644 --- a/tests/lib/Repository/Decorator/UserServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/UserServiceDecoratorTest.php @@ -53,7 +53,7 @@ public function testCreateUserGroupDecorator() $this->createMock(UserGroup::class), ]; - $serviceMock->expects($this->once())->method('createUserGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('createUserGroup')->with(...$parameters); $decoratedService->createUserGroup(...$parameters); } @@ -68,7 +68,7 @@ public function testLoadUserGroupDecorator() ['random_value_5ced05ce176389.48271998'], ]; - $serviceMock->expects($this->once())->method('loadUserGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadUserGroup')->with(...$parameters); $decoratedService->loadUserGroup(...$parameters); } @@ -83,7 +83,7 @@ public function testLoadUserGroupByRemoteIdDecorator(): void [self::EXAMPLE_LANGUAGE_CODE], ]; - $serviceMock->expects($this->once())->method('loadUserGroupByRemoteId')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadUserGroupByRemoteId')->with(...$parameters); $decoratedService->loadUserGroupByRemoteId(...$parameters); } @@ -100,7 +100,7 @@ public function testLoadSubUserGroupsDecorator() ['random_value_5ced05ce176401.55725588'], ]; - $serviceMock->expects($this->once())->method('loadSubUserGroups')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadSubUserGroups')->with(...$parameters); $decoratedService->loadSubUserGroups(...$parameters); } @@ -112,7 +112,7 @@ public function testDeleteUserGroupDecorator() $parameters = [$this->createMock(UserGroup::class)]; - $serviceMock->expects($this->once())->method('deleteUserGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('deleteUserGroup')->with(...$parameters); $decoratedService->deleteUserGroup(...$parameters); } @@ -127,7 +127,7 @@ public function testMoveUserGroupDecorator() $this->createMock(UserGroup::class), ]; - $serviceMock->expects($this->once())->method('moveUserGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('moveUserGroup')->with(...$parameters); $decoratedService->moveUserGroup(...$parameters); } @@ -142,7 +142,7 @@ public function testUpdateUserGroupDecorator() $this->createMock(UserGroupUpdateStruct::class), ]; - $serviceMock->expects($this->once())->method('updateUserGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('updateUserGroup')->with(...$parameters); $decoratedService->updateUserGroup(...$parameters); } @@ -157,7 +157,7 @@ public function testCreateUserDecorator() ['random_value_5ced05ce177102.13726421'], ]; - $serviceMock->expects($this->once())->method('createUser')->with(...$parameters); + $serviceMock->expects(self::once())->method('createUser')->with(...$parameters); $decoratedService->createUser(...$parameters); } @@ -172,7 +172,7 @@ public function testLoadUserDecorator() ['random_value_5ced05ce177174.42173129'], ]; - $serviceMock->expects($this->once())->method('loadUser')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadUser')->with(...$parameters); $decoratedService->loadUser(...$parameters); } @@ -187,7 +187,7 @@ public function testCheckUserCredentialsDecorator() 'random_value_5ced05ce1771c7.58152750', ]; - $serviceMock->expects($this->once())->method('checkUserCredentials')->with(...$parameters); + $serviceMock->expects(self::once())->method('checkUserCredentials')->with(...$parameters); $decoratedService->checkUserCredentials(...$parameters); } @@ -202,7 +202,7 @@ public function testLoadUserByLoginDecorator() ['random_value_5ced05ce177226.14195829'], ]; - $serviceMock->expects($this->once())->method('loadUserByLogin')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadUserByLogin')->with(...$parameters); $decoratedService->loadUserByLogin(...$parameters); } @@ -217,7 +217,7 @@ public function testLoadUsersByEmailDecorator() ['random_value_5ced05ce177252.76037474'], ]; - $serviceMock->expects($this->once())->method('loadUsersByEmail')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadUsersByEmail')->with(...$parameters); $decoratedService->loadUsersByEmail(...$parameters); } @@ -232,7 +232,7 @@ public function testLoadUserByTokenDecorator() ['random_value_5ced05ce177287.80858763'], ]; - $serviceMock->expects($this->once())->method('loadUserByToken')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadUserByToken')->with(...$parameters); $decoratedService->loadUserByToken(...$parameters); } @@ -244,7 +244,7 @@ public function testDeleteUserDecorator() $parameters = [$this->createMock(User::class)]; - $serviceMock->expects($this->once())->method('deleteUser')->with(...$parameters); + $serviceMock->expects(self::once())->method('deleteUser')->with(...$parameters); $decoratedService->deleteUser(...$parameters); } @@ -259,7 +259,7 @@ public function testUpdateUserDecorator() $this->createMock(UserUpdateStruct::class), ]; - $serviceMock->expects($this->once())->method('updateUser')->with(...$parameters); + $serviceMock->expects(self::once())->method('updateUser')->with(...$parameters); $decoratedService->updateUser(...$parameters); } @@ -274,7 +274,7 @@ public function testUpdateUserPasswordDecorator(): void 'H@xi0r!', ]; - $serviceMock->expects($this->once())->method('updateUserPassword')->with(...$parameters); + $serviceMock->expects(self::once())->method('updateUserPassword')->with(...$parameters); $decoratedService->updateUserPassword(...$parameters); } @@ -289,7 +289,7 @@ public function testUpdateUserTokenDecorator() $this->createMock(UserTokenUpdateStruct::class), ]; - $serviceMock->expects($this->once())->method('updateUserToken')->with(...$parameters); + $serviceMock->expects(self::once())->method('updateUserToken')->with(...$parameters); $decoratedService->updateUserToken(...$parameters); } @@ -301,7 +301,7 @@ public function testExpireUserTokenDecorator() $parameters = ['random_value_5ced05ce177e70.34830190']; - $serviceMock->expects($this->once())->method('expireUserToken')->with(...$parameters); + $serviceMock->expects(self::once())->method('expireUserToken')->with(...$parameters); $decoratedService->expireUserToken(...$parameters); } @@ -316,7 +316,7 @@ public function testAssignUserToUserGroupDecorator() $this->createMock(UserGroup::class), ]; - $serviceMock->expects($this->once())->method('assignUserToUserGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('assignUserToUserGroup')->with(...$parameters); $decoratedService->assignUserToUserGroup(...$parameters); } @@ -331,7 +331,7 @@ public function testUnAssignUserFromUserGroupDecorator() $this->createMock(UserGroup::class), ]; - $serviceMock->expects($this->once())->method('unAssignUserFromUserGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('unAssignUserFromUserGroup')->with(...$parameters); $decoratedService->unAssignUserFromUserGroup(...$parameters); } @@ -348,7 +348,7 @@ public function testLoadUserGroupsOfUserDecorator() ['random_value_5ced05ce177f66.49237325'], ]; - $serviceMock->expects($this->once())->method('loadUserGroupsOfUser')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadUserGroupsOfUser')->with(...$parameters); $decoratedService->loadUserGroupsOfUser(...$parameters); } @@ -365,7 +365,7 @@ public function testLoadUsersOfUserGroupDecorator() ['random_value_5ced05ce177fc8.32448790'], ]; - $serviceMock->expects($this->once())->method('loadUsersOfUserGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('loadUsersOfUserGroup')->with(...$parameters); $decoratedService->loadUsersOfUserGroup(...$parameters); } @@ -377,7 +377,7 @@ public function testIsUserDecorator() $parameters = [$this->createMock(Content::class)]; - $serviceMock->expects($this->once())->method('isUser')->with(...$parameters); + $serviceMock->expects(self::once())->method('isUser')->with(...$parameters); $decoratedService->isUser(...$parameters); } @@ -389,7 +389,7 @@ public function testIsUserGroupDecorator() $parameters = [$this->createMock(Content::class)]; - $serviceMock->expects($this->once())->method('isUserGroup')->with(...$parameters); + $serviceMock->expects(self::once())->method('isUserGroup')->with(...$parameters); $decoratedService->isUserGroup(...$parameters); } @@ -407,7 +407,7 @@ public function testNewUserCreateStructDecorator() $this->createMock(ContentType::class), ]; - $serviceMock->expects($this->once())->method('newUserCreateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newUserCreateStruct')->with(...$parameters); $decoratedService->newUserCreateStruct(...$parameters); } @@ -422,7 +422,7 @@ public function testNewUserGroupCreateStructDecorator() $this->createMock(ContentType::class), ]; - $serviceMock->expects($this->once())->method('newUserGroupCreateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newUserGroupCreateStruct')->with(...$parameters); $decoratedService->newUserGroupCreateStruct(...$parameters); } @@ -434,7 +434,7 @@ public function testNewUserUpdateStructDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('newUserUpdateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newUserUpdateStruct')->with(...$parameters); $decoratedService->newUserUpdateStruct(...$parameters); } @@ -446,7 +446,7 @@ public function testNewUserGroupUpdateStructDecorator() $parameters = []; - $serviceMock->expects($this->once())->method('newUserGroupUpdateStruct')->with(...$parameters); + $serviceMock->expects(self::once())->method('newUserGroupUpdateStruct')->with(...$parameters); $decoratedService->newUserGroupUpdateStruct(...$parameters); } @@ -461,7 +461,7 @@ public function testValidatePasswordDecorator() $this->createMock(PasswordValidationContext::class), ]; - $serviceMock->expects($this->once())->method('validatePassword')->with(...$parameters); + $serviceMock->expects(self::once())->method('validatePassword')->with(...$parameters); $decoratedService->validatePassword(...$parameters); } diff --git a/tests/lib/Repository/Helper/FieldTypeRegistryTest.php b/tests/lib/Repository/Helper/FieldTypeRegistryTest.php index 8a503fd729..7f2ae3a368 100644 --- a/tests/lib/Repository/Helper/FieldTypeRegistryTest.php +++ b/tests/lib/Repository/Helper/FieldTypeRegistryTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Helper; use Ibexa\Contracts\Core\FieldType\FieldType; @@ -24,7 +25,7 @@ public function testConstructor() $fieldTypes = [self::FIELD_TYPE_ID => $fieldType]; $registry = new FieldTypeRegistry($fieldTypes); - $this->assertTrue($registry->hasFieldType(self::FIELD_TYPE_ID)); + self::assertTrue($registry->hasFieldType(self::FIELD_TYPE_ID)); } protected function getFieldTypeMock() @@ -42,7 +43,7 @@ public function testGetFieldType() $fieldType = $registry->getFieldType(self::FIELD_TYPE_ID); - $this->assertInstanceOf( + self::assertInstanceOf( FieldType::class, $fieldType ); @@ -81,15 +82,15 @@ public function testGetFieldTypes() $fieldTypes = $registry->getFieldTypes(); - $this->assertIsArray($fieldTypes); - $this->assertCount(2, $fieldTypes); - $this->assertArrayHasKey(self::FIELD_TYPE_ID, $fieldTypes); - $this->assertInstanceOf( + self::assertIsArray($fieldTypes); + self::assertCount(2, $fieldTypes); + self::assertArrayHasKey(self::FIELD_TYPE_ID, $fieldTypes); + self::assertInstanceOf( FieldType::class, $fieldTypes[self::FIELD_TYPE_ID] ); - $this->assertArrayHasKey('two', $fieldTypes); - $this->assertInstanceOf( + self::assertArrayHasKey('two', $fieldTypes); + self::assertInstanceOf( FieldType::class, $fieldTypes['two'] ); diff --git a/tests/lib/Repository/IdManager/Php.php b/tests/lib/Repository/IdManager/Php.php index d858bb7354..a987e1e3ee 100644 --- a/tests/lib/Repository/IdManager/Php.php +++ b/tests/lib/Repository/IdManager/Php.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\IdManager; use Ibexa\Tests\Integration\Core\Repository\IdManager; diff --git a/tests/lib/Repository/Iterator/BatchIteratorAdapter/AbstractSearchAdapterTest.php b/tests/lib/Repository/Iterator/BatchIteratorAdapter/AbstractSearchAdapterTest.php index bac886e79f..cd307ac652 100644 --- a/tests/lib/Repository/Iterator/BatchIteratorAdapter/AbstractSearchAdapterTest.php +++ b/tests/lib/Repository/Iterator/BatchIteratorAdapter/AbstractSearchAdapterTest.php @@ -43,20 +43,20 @@ final public function testFetch(): void $searchService = $this->createMock(SearchService::class); $searchService - ->expects($this->once()) + ->expects(self::once()) ->method($this->getExpectedFindMethod()) ->with($expectedQuery, self::EXAMPLE_LANGUAGE_FILTER, true) ->willReturn($searchResults); $adapter = $this->createAdapterUnderTest($searchService, $originalQuery, self::EXAMPLE_LANGUAGE_FILTER, true); - $this->assertSame( + self::assertSame( $expectedIterator, $adapter->fetch(self::EXAMPLE_OFFSET, self::EXAMPLE_LIMIT), ); - $this->assertEquals(0, $originalQuery->offset); - $this->assertEquals(25, $originalQuery->limit); + self::assertEquals(0, $originalQuery->offset); + self::assertEquals(25, $originalQuery->limit); } abstract protected function createAdapterUnderTest( diff --git a/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentFilteringAdapterTest.php b/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentFilteringAdapterTest.php index a90d018ee0..c69e133aa5 100644 --- a/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentFilteringAdapterTest.php +++ b/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentFilteringAdapterTest.php @@ -53,7 +53,7 @@ public function testFetch(): void $contentService = $this->createMock(ContentService::class); $contentService - ->expects($this->once()) + ->expects(self::once()) ->method('find') ->with($expectedFilter, self::EXAMPLE_LANGUAGE_FILTER) ->willReturn($contentList); diff --git a/tests/lib/Repository/Iterator/BatchIteratorAdapter/LocationFilteringAdapterTest.php b/tests/lib/Repository/Iterator/BatchIteratorAdapter/LocationFilteringAdapterTest.php index 3a58cb9157..87f5b580fd 100644 --- a/tests/lib/Repository/Iterator/BatchIteratorAdapter/LocationFilteringAdapterTest.php +++ b/tests/lib/Repository/Iterator/BatchIteratorAdapter/LocationFilteringAdapterTest.php @@ -56,7 +56,7 @@ public function testFetch(): void $locationService = $this->createMock(LocationService::class); $locationService - ->expects($this->once()) + ->expects(self::once()) ->method('find') ->with($expectedFilter, self::EXAMPLE_LANGUAGE_FILTER) ->willReturn($locationList); diff --git a/tests/lib/Repository/Iterator/BatchIteratorTest.php b/tests/lib/Repository/Iterator/BatchIteratorTest.php index 2d493389f0..e1bf910057 100644 --- a/tests/lib/Repository/Iterator/BatchIteratorTest.php +++ b/tests/lib/Repository/Iterator/BatchIteratorTest.php @@ -21,8 +21,8 @@ public function testIterateOverDummyResultSet(): void $iterator = new BatchIterator($adapter); $iterator->setBatchSize(7); - $this->assertEquals($expectedData, iterator_to_array($iterator)); - $this->assertEquals(15, $adapter->getFetchCounter()); + self::assertEquals($expectedData, iterator_to_array($iterator)); + self::assertEquals(15, $adapter->getFetchCounter()); } public function testIterateOverResultSetSmallerThenBatchSize(): void @@ -33,8 +33,8 @@ public function testIterateOverResultSetSmallerThenBatchSize(): void $iterator = new BatchIterator($adapter); $iterator->setBatchSize(100); - $this->assertEquals($expectedData, iterator_to_array($iterator)); - $this->assertEquals(1, $adapter->getFetchCounter()); + self::assertEquals($expectedData, iterator_to_array($iterator)); + self::assertEquals(1, $adapter->getFetchCounter()); } public function testIterateOverEmptyResultSet(): void @@ -44,8 +44,8 @@ public function testIterateOverEmptyResultSet(): void $iterator = new BatchIterator($adapter); $iterator->setBatchSize(10); - $this->assertEquals([], iterator_to_array($iterator)); - $this->assertEquals(1, $adapter->getFetchCounter()); + self::assertEquals([], iterator_to_array($iterator)); + self::assertEquals(1, $adapter->getFetchCounter()); } } diff --git a/tests/lib/Repository/LocationResolver/PermissionAwareLocationResolverTest.php b/tests/lib/Repository/LocationResolver/PermissionAwareLocationResolverTest.php index b885bd978a..31d186f1b8 100644 --- a/tests/lib/Repository/LocationResolver/PermissionAwareLocationResolverTest.php +++ b/tests/lib/Repository/LocationResolver/PermissionAwareLocationResolverTest.php @@ -45,7 +45,7 @@ public function testResolveMainLocation(): void ->method('loadLocation') ->willReturn($location); - $this->assertSame($location, $this->locationResolver->resolveLocation($contentInfo)); + self::assertSame($location, $this->locationResolver->resolveLocation($contentInfo)); } /** @@ -66,7 +66,7 @@ public function testResolveSecondaryLocation(): void ->method('loadLocations') ->willReturn([$location1, $location2]); - $this->assertSame($location1, $this->locationResolver->resolveLocation($contentInfo)); + self::assertSame($location1, $this->locationResolver->resolveLocation($contentInfo)); } /** diff --git a/tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php b/tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php index 3cc1b5c43e..7d74b7bab3 100644 --- a/tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php +++ b/tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php @@ -51,7 +51,7 @@ public function testLoadLocation(): void ->willReturn($location); $this->mapper - ->expects($this->once()) + ->expects(self::once()) ->method('setMapping') ->with(1, 2); @@ -85,7 +85,7 @@ public function testLoadLocationList(): void ->willReturn($locations); $this->mapper - ->expects($this->atLeastOnce()) + ->expects(self::atLeastOnce()) ->method('setMapping') ->withConsecutive([1, 2], [3, 4]); @@ -128,7 +128,7 @@ public function testLoadLocations(): void ->willReturn($locations); $this->mapper - ->expects($this->atLeastOnce()) + ->expects(self::atLeastOnce()) ->method('setMapping') ->withConsecutive([1, 2], [3, 4]); @@ -173,7 +173,7 @@ public function testLoadLocationChildren(): void ->willReturn($locationList); $this->mapper - ->expects($this->atLeastOnce()) + ->expects(self::atLeastOnce()) ->method('setMapping') ->withConsecutive([1, 2], [3, 4]); @@ -212,7 +212,7 @@ public function testLoadAllLocations(): void ->willReturn($locations); $this->mapper - ->expects($this->atLeastOnce()) + ->expects(self::atLeastOnce()) ->method('setMapping') ->withConsecutive([1, 2], [3, 4]); diff --git a/tests/lib/Repository/NameSchema/NameSchemaServiceTest.php b/tests/lib/Repository/NameSchema/NameSchemaServiceTest.php index 95c9d6a820..d0099d92dd 100644 --- a/tests/lib/Repository/NameSchema/NameSchemaServiceTest.php +++ b/tests/lib/Repository/NameSchema/NameSchemaServiceTest.php @@ -365,7 +365,7 @@ protected function getEventDispatcherMock( } /** - * @param array{limit?: integer, sequence?: string} $settings + * @param array{limit?: int, sequence?: string} $settings */ private function buildNameSchemaService( AbstractSchemaEvent $event, diff --git a/tests/lib/Repository/Permission/CachedPermissionServiceTest.php b/tests/lib/Repository/Permission/CachedPermissionServiceTest.php index f37668b42f..23207b92d6 100644 --- a/tests/lib/Repository/Permission/CachedPermissionServiceTest.php +++ b/tests/lib/Repository/Permission/CachedPermissionServiceTest.php @@ -75,13 +75,13 @@ public function testPermissionResolverPassTrough($method, array $arguments, $exp { if ($expectedReturn !== null) { $this->getPermissionResolverMock([$method]) - ->expects($this->once()) + ->expects(self::once()) ->method($method) ->with(...$arguments) ->willReturn($expectedReturn); } else { $this->getPermissionResolverMock([$method]) - ->expects($this->once()) + ->expects(self::once()) ->method($method) ->with(...$arguments); } @@ -89,7 +89,7 @@ public function testPermissionResolverPassTrough($method, array $arguments, $exp $cachedService = $this->getCachedPermissionService(); $actualReturn = $cachedService->$method(...$arguments); - $this->assertSame($expectedReturn, $actualReturn); + self::assertSame($expectedReturn, $actualReturn); } public function testGetPermissionsCriterionPassTrough() @@ -100,7 +100,7 @@ public function testGetPermissionsCriterionPassTrough() ->getMockForAbstractClass(); $this->getPermissionCriterionResolverMock(['getPermissionsCriterion']) - ->expects($this->once()) + ->expects(self::once()) ->method('getPermissionsCriterion') ->with('content', 'remove') ->willReturn($criterionMock); @@ -108,7 +108,7 @@ public function testGetPermissionsCriterionPassTrough() $cachedService = $this->getCachedPermissionService(); $actualReturn = $cachedService->getPermissionsCriterion('content', 'remove'); - $this->assertSame($criterionMock, $actualReturn); + self::assertSame($criterionMock, $actualReturn); } public function testGetPermissionsCriterionCaching() @@ -119,7 +119,7 @@ public function testGetPermissionsCriterionCaching() ->getMockForAbstractClass(); $this->getPermissionCriterionResolverMock(['getPermissionsCriterion']) - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('getPermissionsCriterion') ->with('content', 'read') ->willReturn($criterionMock); @@ -127,15 +127,15 @@ public function testGetPermissionsCriterionCaching() $cachedService = $this->getCachedPermissionService(2); $actualReturn = $cachedService->getPermissionsCriterion('content', 'read'); - $this->assertSame($criterionMock, $actualReturn); + self::assertSame($criterionMock, $actualReturn); // +1 $actualReturn = $cachedService->getPermissionsCriterion('content', 'read'); - $this->assertSame($criterionMock, $actualReturn); + self::assertSame($criterionMock, $actualReturn); // +3, time() will be called twice and cache will be updated $actualReturn = $cachedService->getPermissionsCriterion('content', 'read'); - $this->assertSame($criterionMock, $actualReturn); + self::assertSame($criterionMock, $actualReturn); } public function testSetCurrentUserReferenceCacheClear(): void @@ -146,7 +146,7 @@ public function testSetCurrentUserReferenceCacheClear(): void ->getMockForAbstractClass(); $this->getPermissionCriterionResolverMock(['getPermissionsCriterion']) - ->expects($this->once()) + ->expects(self::once()) ->method('getPermissionsCriterion') ->with('content', 'read') ->willReturn($criterionMock); @@ -154,7 +154,7 @@ public function testSetCurrentUserReferenceCacheClear(): void $cachedService = $this->getCachedPermissionService(2); $actualReturn = $cachedService->getPermissionsCriterion('content', 'read'); - $this->assertSame($criterionMock, $actualReturn); + self::assertSame($criterionMock, $actualReturn); $userRef = $this ->getMockBuilder(UserReference::class) diff --git a/tests/lib/Repository/Permission/PermissionCriterionResolverTest.php b/tests/lib/Repository/Permission/PermissionCriterionResolverTest.php index b9c041e7bd..3103766269 100644 --- a/tests/lib/Repository/Permission/PermissionCriterionResolverTest.php +++ b/tests/lib/Repository/Permission/PermissionCriterionResolverTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Permission; use Ibexa\Contracts\Core\Limitation\Type; @@ -32,13 +33,13 @@ public function providerForTestGetPermissionsCriterion() ->getMockBuilder(Limitation::class) ->getMockForAbstractClass(); $limitationMock - ->expects($this->any()) + ->expects(self::any()) ->method('getIdentifier') - ->will($this->returnValue('limitationIdentifier')); + ->will(self::returnValue('limitationIdentifier')); $targetOnlyLimitationMock = $this->createMock(Limitation::class); $targetOnlyLimitationMock - ->expects($this->any()) + ->expects(self::any()) ->method('getIdentifier') ->willReturn('targetOnlyLimitationIdentifier'); @@ -242,30 +243,30 @@ protected function mockServices($criterionMock, $limitationCount, $permissionSet ); $limitationTypeMock - ->expects($this->any()) + ->expects(self::any()) ->method('getCriterion') ->with( - $this->isInstanceOf(Limitation::class), - $this->equalTo($userMock) + self::isInstanceOf(Limitation::class), + self::equalTo($userMock) ) - ->will($this->returnValue($criterionMock)); + ->will(self::returnValue($criterionMock)); $targetOnlyLimitationTypeMock - ->expects($this->never()) + ->expects(self::never()) ->method('getCriterion'); $targetOnlyLimitationTypeMock - ->expects($this->any()) + ->expects(self::any()) ->method('getCriterionByTarget') ->with( - $this->isInstanceOf(Limitation::class), - $this->equalTo($userMock), - $this->anything() + self::isInstanceOf(Limitation::class), + self::equalTo($userMock), + self::anything() ) ->willReturn($criterionMock); $limitationServiceMock - ->expects($this->exactly($limitationCount)) + ->expects(self::exactly($limitationCount)) ->method('getLimitationType') ->willReturnMap([ ['limitationIdentifier', $limitationTypeMock], @@ -273,15 +274,15 @@ protected function mockServices($criterionMock, $limitationCount, $permissionSet ]); $permissionResolverMock - ->expects($this->once()) + ->expects(self::once()) ->method('hasAccess') - ->with($this->equalTo('content'), $this->equalTo('read')) - ->will($this->returnValue($permissionSets)); + ->with(self::equalTo('content'), self::equalTo('read')) + ->will(self::returnValue($permissionSets)); $permissionResolverMock - ->expects($this->once()) + ->expects(self::once()) ->method('getCurrentUserReference') - ->will($this->returnValue($userMock)); + ->will(self::returnValue($userMock)); } /** @@ -300,7 +301,7 @@ public function testGetPermissionsCriterion( $permissionsCriterion = $criterionResolver->getPermissionsCriterion('content', 'read', []); - $this->assertEquals($expectedCriterion, $permissionsCriterion); + self::assertEquals($expectedCriterion, $permissionsCriterion); } public function providerForTestGetPermissionsCriterionBooleanPermissionSets() @@ -320,16 +321,16 @@ public function testGetPermissionsCriterionBooleanPermissionSets($permissionSets { $permissionResolverMock = $this->getPermissionResolverMock(['hasAccess']); $permissionResolverMock - ->expects($this->once()) + ->expects(self::once()) ->method('hasAccess') - ->with($this->equalTo('testModule'), $this->equalTo('testFunction')) - ->will($this->returnValue($permissionSets)); + ->with(self::equalTo('testModule'), self::equalTo('testFunction')) + ->will(self::returnValue($permissionSets)); $criterionResolver = $this->getPermissionCriterionResolverMock(null); $permissionsCriterion = $criterionResolver->getPermissionsCriterion('testModule', 'testFunction'); - $this->assertEquals($permissionSets, $permissionsCriterion); + self::assertEquals($permissionSets, $permissionsCriterion); } /** diff --git a/tests/lib/Repository/Service/Mock/Base.php b/tests/lib/Repository/Service/Mock/Base.php index dfda628e4f..72a17fa6ae 100644 --- a/tests/lib/Repository/Service/Mock/Base.php +++ b/tests/lib/Repository/Service/Mock/Base.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Service\Mock; use Ibexa\Contracts\Core\Persistence\Filter\Content\Handler as ContentFilteringHandler; @@ -262,49 +263,49 @@ protected function getPersistenceMock() if (!isset($this->persistenceMock)) { $this->persistenceMock = $this->createMock(Handler::class); - $this->persistenceMock->expects($this->any()) + $this->persistenceMock->expects(self::any()) ->method('contentHandler') - ->will($this->returnValue($this->getPersistenceMockHandler('Content\\Handler'))); + ->will(self::returnValue($this->getPersistenceMockHandler('Content\\Handler'))); - $this->persistenceMock->expects($this->any()) + $this->persistenceMock->expects(self::any()) ->method('contentTypeHandler') - ->will($this->returnValue($this->getPersistenceMockHandler('Content\\Type\\Handler'))); + ->will(self::returnValue($this->getPersistenceMockHandler('Content\\Type\\Handler'))); - $this->persistenceMock->expects($this->any()) + $this->persistenceMock->expects(self::any()) ->method('contentLanguageHandler') - ->will($this->returnValue($this->getPersistenceMockHandler('Content\\Language\\Handler'))); + ->will(self::returnValue($this->getPersistenceMockHandler('Content\\Language\\Handler'))); - $this->persistenceMock->expects($this->any()) + $this->persistenceMock->expects(self::any()) ->method('locationHandler') - ->will($this->returnValue($this->getPersistenceMockHandler('Content\\Location\\Handler'))); + ->will(self::returnValue($this->getPersistenceMockHandler('Content\\Location\\Handler'))); - $this->persistenceMock->expects($this->any()) + $this->persistenceMock->expects(self::any()) ->method('objectStateHandler') - ->will($this->returnValue($this->getPersistenceMockHandler('Content\\ObjectState\\Handler'))); + ->will(self::returnValue($this->getPersistenceMockHandler('Content\\ObjectState\\Handler'))); - $this->persistenceMock->expects($this->any()) + $this->persistenceMock->expects(self::any()) ->method('trashHandler') - ->will($this->returnValue($this->getPersistenceMockHandler('Content\\Location\\Trash\\Handler'))); + ->will(self::returnValue($this->getPersistenceMockHandler('Content\\Location\\Trash\\Handler'))); - $this->persistenceMock->expects($this->any()) + $this->persistenceMock->expects(self::any()) ->method('userHandler') - ->will($this->returnValue($this->getPersistenceMockHandler('User\\Handler'))); + ->will(self::returnValue($this->getPersistenceMockHandler('User\\Handler'))); - $this->persistenceMock->expects($this->any()) + $this->persistenceMock->expects(self::any()) ->method('sectionHandler') - ->will($this->returnValue($this->getPersistenceMockHandler('Content\\Section\\Handler'))); + ->will(self::returnValue($this->getPersistenceMockHandler('Content\\Section\\Handler'))); - $this->persistenceMock->expects($this->any()) + $this->persistenceMock->expects(self::any()) ->method('urlAliasHandler') - ->will($this->returnValue($this->getPersistenceMockHandler('Content\\UrlAlias\\Handler'))); + ->will(self::returnValue($this->getPersistenceMockHandler('Content\\UrlAlias\\Handler'))); - $this->persistenceMock->expects($this->any()) + $this->persistenceMock->expects(self::any()) ->method('urlWildcardHandler') - ->will($this->returnValue($this->getPersistenceMockHandler('Content\\UrlWildcard\\Handler'))); + ->will(self::returnValue($this->getPersistenceMockHandler('Content\\UrlWildcard\\Handler'))); - $this->persistenceMock->expects($this->any()) + $this->persistenceMock->expects(self::any()) ->method('urlWildcardHandler') - ->will($this->returnValue($this->getPersistenceMockHandler('URL\\Handler'))); + ->will(self::returnValue($this->getPersistenceMockHandler('URL\\Handler'))); } return $this->persistenceMock; diff --git a/tests/lib/Repository/Service/Mock/BookmarkTest.php b/tests/lib/Repository/Service/Mock/BookmarkTest.php index 234032eb1b..597e663d1e 100644 --- a/tests/lib/Repository/Service/Mock/BookmarkTest.php +++ b/tests/lib/Repository/Service/Mock/BookmarkTest.php @@ -38,13 +38,13 @@ protected function setUp(): void $permissionResolverMock = $this->createMock(PermissionResolver::class); $permissionResolverMock - ->expects($this->atLeastOnce()) + ->expects(self::atLeastOnce()) ->method('getCurrentUserReference') ->willReturn(new UserReference(self::CURRENT_USER_ID)); $repository = $this->getRepositoryMock(); $repository - ->expects($this->atLeastOnce()) + ->expects(self::atLeastOnce()) ->method('getPermissionResolver') ->willReturn($permissionResolverMock); } @@ -59,7 +59,7 @@ public function testCreateBookmark() $this->assertLocationIsLoaded($location); $this->bookmarkHandler - ->expects($this->once()) + ->expects(self::once()) ->method('loadByUserIdAndLocationId') ->with(self::CURRENT_USER_ID, [self::LOCATION_ID]) ->willReturn([]); @@ -91,7 +91,7 @@ public function testCreateBookmarkThrowsInvalidArgumentException() $this->assertLocationIsLoaded($location); $this->bookmarkHandler - ->expects($this->once()) + ->expects(self::once()) ->method('loadByUserIdAndLocationId') ->with(self::CURRENT_USER_ID, [self::LOCATION_ID]) ->willReturn([self::LOCATION_ID => new Bookmark()]); @@ -115,7 +115,7 @@ public function testCreateBookmarkWithRollback() $this->assertLocationIsLoaded($location); $this->bookmarkHandler - ->expects($this->once()) + ->expects(self::once()) ->method('loadByUserIdAndLocationId') ->with(self::CURRENT_USER_ID, [self::LOCATION_ID]) ->willReturn([]); @@ -142,7 +142,7 @@ public function testDeleteBookmarkExisting() $bookmark = new Bookmark(['id' => self::BOOKMARK_ID]); $this->bookmarkHandler - ->expects($this->once()) + ->expects(self::once()) ->method('loadByUserIdAndLocationId') ->with(self::CURRENT_USER_ID, [self::LOCATION_ID]) ->willReturn([self::LOCATION_ID => $bookmark]); @@ -169,7 +169,7 @@ public function testDeleteBookmarkWithRollback() $this->assertLocationIsLoaded($location); $this->bookmarkHandler - ->expects($this->once()) + ->expects(self::once()) ->method('loadByUserIdAndLocationId') ->with(self::CURRENT_USER_ID, [self::LOCATION_ID]) ->willReturn([self::LOCATION_ID => new Bookmark(['id' => self::BOOKMARK_ID])]); @@ -196,7 +196,7 @@ public function testDeleteBookmarkNonExisting() $this->assertLocationIsLoaded($location); $this->bookmarkHandler - ->expects($this->once()) + ->expects(self::once()) ->method('loadByUserIdAndLocationId') ->with(self::CURRENT_USER_ID, [self::LOCATION_ID]) ->willReturn([]); @@ -222,13 +222,13 @@ public function testLoadBookmarks() }, range(1, $expectedTotalCount)); $this->bookmarkHandler - ->expects($this->once()) + ->expects(self::once()) ->method('countUserBookmarks') ->with(self::CURRENT_USER_ID) ->willReturn($expectedTotalCount); $this->bookmarkHandler - ->expects($this->once()) + ->expects(self::once()) ->method('loadUserBookmarks') ->with(self::CURRENT_USER_ID, $offset, $limit) ->willReturn(array_map(static function ($locationId) { @@ -237,7 +237,7 @@ public function testLoadBookmarks() $locationServiceMock = $this->createMock(LocationService::class); $locationServiceMock - ->expects($this->exactly($expectedTotalCount)) + ->expects(self::exactly($expectedTotalCount)) ->method('loadLocation') ->willReturnCallback(function ($locationId) { return $this->createLocation($locationId); @@ -245,14 +245,14 @@ public function testLoadBookmarks() $repository = $this->getRepositoryMock(); $repository - ->expects($this->any()) + ->expects(self::any()) ->method('getLocationService') ->willReturn($locationServiceMock); $bookmarks = $this->createBookmarkService()->loadBookmarks($offset, $limit); - $this->assertEquals($expectedTotalCount, $bookmarks->totalCount); - $this->assertEquals($expectedItems, $bookmarks->items); + self::assertEquals($expectedTotalCount, $bookmarks->totalCount); + self::assertEquals($expectedItems, $bookmarks->items); } /** @@ -261,19 +261,19 @@ public function testLoadBookmarks() public function testLoadBookmarksEmptyList() { $this->bookmarkHandler - ->expects($this->once()) + ->expects(self::once()) ->method('countUserBookmarks') ->with(self::CURRENT_USER_ID) ->willReturn(0); $this->bookmarkHandler - ->expects($this->never()) + ->expects(self::never()) ->method('loadUserBookmarks'); $bookmarks = $this->createBookmarkService()->loadBookmarks(0, 10); - $this->assertEquals(0, $bookmarks->totalCount); - $this->assertEmpty($bookmarks->items); + self::assertEquals(0, $bookmarks->totalCount); + self::assertEmpty($bookmarks->items); } /** @@ -282,12 +282,12 @@ public function testLoadBookmarksEmptyList() public function testLocationShouldNotBeBookmarked() { $this->bookmarkHandler - ->expects($this->once()) + ->expects(self::once()) ->method('loadByUserIdAndLocationId') ->with(self::CURRENT_USER_ID, [self::LOCATION_ID]) ->willReturn([]); - $this->assertFalse($this->createBookmarkService()->isBookmarked($this->createLocation(self::LOCATION_ID))); + self::assertFalse($this->createBookmarkService()->isBookmarked($this->createLocation(self::LOCATION_ID))); } /** @@ -296,25 +296,25 @@ public function testLocationShouldNotBeBookmarked() public function testLocationShouldBeBookmarked() { $this->bookmarkHandler - ->expects($this->once()) + ->expects(self::once()) ->method('loadByUserIdAndLocationId') ->with(self::CURRENT_USER_ID, [self::LOCATION_ID]) ->willReturn([self::LOCATION_ID => new Bookmark()]); - $this->assertTrue($this->createBookmarkService()->isBookmarked($this->createLocation(self::LOCATION_ID))); + self::assertTrue($this->createBookmarkService()->isBookmarked($this->createLocation(self::LOCATION_ID))); } private function assertLocationIsLoaded(Location $location): MockObject { $locationServiceMock = $this->createMock(LocationService::class); $locationServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadLocation') ->willReturn($location); $repository = $this->getRepositoryMock(); $repository - ->expects($this->once()) + ->expects(self::once()) ->method('getLocationService') ->willReturn($locationServiceMock); @@ -324,28 +324,28 @@ private function assertLocationIsLoaded(Location $location): MockObject private function assertTransactionIsNotStarted(callable $operation): void { $repository = $this->getRepositoryMock(); - $repository->expects($this->never())->method('beginTransaction'); + $repository->expects(self::never())->method('beginTransaction'); $operation(); - $repository->expects($this->never())->method('commit'); - $repository->expects($this->never())->method('rollback'); + $repository->expects(self::never())->method('commit'); + $repository->expects(self::never())->method('rollback'); } private function assertTransactionIsCommitted(callable $operation): void { $repository = $this->getRepositoryMock(); - $repository->expects($this->once())->method('beginTransaction'); + $repository->expects(self::once())->method('beginTransaction'); $operation(); - $repository->expects($this->once())->method('commit'); - $repository->expects($this->never())->method('rollback'); + $repository->expects(self::once())->method('commit'); + $repository->expects(self::never())->method('rollback'); } private function assertTransactionIsRollback(callable $operation): void { $repository = $this->getRepositoryMock(); - $repository->expects($this->once())->method('beginTransaction'); + $repository->expects(self::once())->method('beginTransaction'); $operation(); - $repository->expects($this->never())->method('commit'); - $repository->expects($this->once())->method('rollback'); + $repository->expects(self::never())->method('commit'); + $repository->expects(self::once())->method('rollback'); } private function createLocation(int $id = self::CURRENT_USER_ID, string $name = 'Lorem ipsum...'): Location diff --git a/tests/lib/Repository/Service/Mock/PermissionTest.php b/tests/lib/Repository/Service/Mock/PermissionTest.php index 96b464c382..1c6eab2c2e 100644 --- a/tests/lib/Repository/Service/Mock/PermissionTest.php +++ b/tests/lib/Repository/Service/Mock/PermissionTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Service\Mock; use Ibexa\Contracts\Core\Limitation\Type; @@ -109,17 +110,17 @@ public function testHasAccessReturnsTrue(array $roles, array $roleAssignments) $mockedService = $this->getPermissionResolverMock(null); $userHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadRoleAssignmentsByGroupId') - ->with($this->equalTo(10), $this->equalTo(true)) - ->will($this->returnValue($roleAssignments)); + ->with(self::equalTo(10), self::equalTo(true)) + ->will(self::returnValue($roleAssignments)); foreach ($roleAssignments as $at => $roleAssignment) { $userHandlerMock - ->expects($this->at($at + 1)) + ->expects(self::at($at + 1)) ->method('loadRole') ->with($roleAssignment->roleId) - ->will($this->returnValue($roles[$roleAssignment->roleId])); + ->will(self::returnValue($roles[$roleAssignment->roleId])); } $result = $mockedService->hasAccess('dummy-module', 'dummy-function'); @@ -180,17 +181,17 @@ public function testHasAccessReturnsFalse(array $roles, array $roleAssignments) $service = $this->getPermissionResolverMock(null); $userHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadRoleAssignmentsByGroupId') - ->with($this->equalTo(10), $this->equalTo(true)) - ->will($this->returnValue($roleAssignments)); + ->with(self::equalTo(10), self::equalTo(true)) + ->will(self::returnValue($roleAssignments)); foreach ($roleAssignments as $at => $roleAssignment) { $userHandlerMock - ->expects($this->at($at + 1)) + ->expects(self::at($at + 1)) ->method('loadRole') ->with($roleAssignment->roleId) - ->will($this->returnValue($roles[$roleAssignment->roleId])); + ->will(self::returnValue($roles[$roleAssignment->roleId])); } $result = $service->hasAccess('dummy-module2', 'dummy-function2'); @@ -208,13 +209,13 @@ public function testHasAccessReturnsFalseButSudoSoTrue() $service = $this->getPermissionResolverMock(null); $repositoryMock = $this->getRepositoryMock(); $repositoryMock - ->expects($this->any()) + ->expects(self::any()) ->method('getPermissionResolver') - ->will($this->returnValue($service)); + ->will(self::returnValue($service)); $userHandlerMock - ->expects($this->never()) - ->method($this->anything()); + ->expects(self::never()) + ->method(self::anything()); $result = $service->sudo( static function (Repository $repo) { @@ -293,22 +294,22 @@ public function testHasAccessReturnsPermissionSets(array $roles, array $roleAssi $permissionResolverMock = $this->getPermissionResolverMock(['getCurrentUserReference']); $permissionResolverMock - ->expects($this->once()) + ->expects(self::once()) ->method('getCurrentUserReference') - ->will($this->returnValue(new UserReference(14))); + ->will(self::returnValue(new UserReference(14))); $userHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadRoleAssignmentsByGroupId') - ->with($this->isType('integer'), $this->equalTo(true)) - ->will($this->returnValue($roleAssignments)); + ->with(self::isType('integer'), self::equalTo(true)) + ->will(self::returnValue($roleAssignments)); foreach ($roleAssignments as $at => $roleAssignment) { $userHandlerMock - ->expects($this->at($at + 1)) + ->expects(self::at($at + 1)) ->method('loadRole') ->with($roleAssignment->roleId) - ->will($this->returnValue($roles[$roleAssignment->roleId])); + ->will(self::returnValue($roles[$roleAssignment->roleId])); } $permissionSets = []; @@ -318,11 +319,11 @@ public function testHasAccessReturnsPermissionSets(array $roles, array $roleAssi $permissionSet = ['limitation' => null]; foreach ($roles[$roleAssignment->roleId]->policies as $k => $policy) { $policyName = 'policy-' . $i . '-' . $k; - $return = $this->returnValue($policyName); + $return = self::returnValue($policyName); $permissionSet['policies'][] = $policyName; $roleDomainMapper - ->expects($this->at($count++)) + ->expects(self::at($count++)) ->method('buildDomainPolicyObject') ->with($policy) ->will($return); @@ -409,22 +410,22 @@ public function testHasAccessReturnsLimitationNotFoundException(array $roles, ar $permissionResolverMock = $this->getPermissionResolverMock(['getCurrentUserReference']); $permissionResolverMock - ->expects($this->once()) + ->expects(self::once()) ->method('getCurrentUserReference') - ->will($this->returnValue(new UserReference(14))); + ->will(self::returnValue(new UserReference(14))); $userHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadRoleAssignmentsByGroupId') - ->with($this->isType('integer'), $this->equalTo(true)) - ->will($this->returnValue($roleAssignments)); + ->with(self::isType('integer'), self::equalTo(true)) + ->will(self::returnValue($roleAssignments)); foreach ($roleAssignments as $at => $roleAssignment) { $userHandlerMock - ->expects($this->at($at + 1)) + ->expects(self::at($at + 1)) ->method('loadRole') ->with($roleAssignment->roleId) - ->will($this->returnValue($roles[$roleAssignment->roleId])); + ->will(self::returnValue($roles[$roleAssignment->roleId])); } $count = 0; @@ -434,14 +435,14 @@ public function testHasAccessReturnsLimitationNotFoundException(array $roles, ar foreach ($roles[$roleAssignment->roleId]->policies as $k => $policy) { $policyName = 'policy-' . $i . '-' . $k; if ($policy->limitations === 'notfound') { - $return = $this->throwException(new LimitationNotFoundException('notfound')); + $return = self::throwException(new LimitationNotFoundException('notfound')); } else { - $return = $this->returnValue($policyName); + $return = self::returnValue($policyName); $permissionSet['policies'][] = $policyName; } $roleDomainMapper - ->expects($this->at($count++)) + ->expects(self::at($count++)) ->method('buildDomainPolicyObject') ->with($policy) ->will($return); @@ -589,22 +590,22 @@ public function testHasAccessReturnsPermissionSetsWithRoleLimitation(array $role $permissionResolverMock = $this->getPermissionResolverMock(['getCurrentUserReference']); $permissionResolverMock - ->expects($this->once()) + ->expects(self::once()) ->method('getCurrentUserReference') - ->will($this->returnValue(new UserReference(14))); + ->will(self::returnValue(new UserReference(14))); $userHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadRoleAssignmentsByGroupId') - ->with($this->isType('integer'), $this->equalTo(true)) - ->will($this->returnValue($roleAssignments)); + ->with(self::isType('integer'), self::equalTo(true)) + ->will(self::returnValue($roleAssignments)); foreach ($roleAssignments as $at => $roleAssignment) { $userHandlerMock - ->expects($this->at($at + 1)) + ->expects(self::at($at + 1)) ->method('loadRole') ->with($roleAssignment->roleId) - ->will($this->returnValue($roles[$roleAssignment->roleId])); + ->will(self::returnValue($roles[$roleAssignment->roleId])); } $permissionSets = []; @@ -615,23 +616,23 @@ public function testHasAccessReturnsPermissionSetsWithRoleLimitation(array $role $policyName = "policy-{$i}-{$k}"; $permissionSet['policies'][] = $policyName; $roleDomainMapper - ->expects($this->at($k)) + ->expects(self::at($k)) ->method('buildDomainPolicyObject') ->with($policy) - ->will($this->returnValue($policyName)); + ->will(self::returnValue($policyName)); } $permissionSet['limitation'] = "limitation-{$i}"; $limitationTypeMock - ->expects($this->at($i)) + ->expects(self::at($i)) ->method('buildValue') ->with($roleAssignment->values) - ->will($this->returnValue($permissionSet['limitation'])); + ->will(self::returnValue($permissionSet['limitation'])); $limitationService - ->expects($this->any()) + ->expects(self::any()) ->method('getLimitationType') ->with($roleAssignment->limitationIdentifier) - ->will($this->returnValue($limitationTypeMock)); + ->will(self::returnValue($limitationTypeMock)); $permissionSets[] = $permissionSet; } @@ -692,10 +693,10 @@ public function testCanUserSimple($permissionSets, $result) $permissionResolverMock = $this->getPermissionResolverMock(['hasAccess']); $permissionResolverMock - ->expects($this->once()) + ->expects(self::once()) ->method('hasAccess') - ->with($this->equalTo('test-module'), $this->equalTo('test-function')) - ->will($this->returnValue($permissionSets)); + ->with(self::equalTo('test-module'), self::equalTo('test-function')) + ->will(self::returnValue($permissionSets)); /** @var $valueObject \Ibexa\Contracts\Core\Repository\Values\ValueObject */ $valueObject = $this->getMockForAbstractClass(ValueObject::class); @@ -727,9 +728,9 @@ public function testCanUserWithoutLimitations() ->getMock(); $policyMock - ->expects($this->once()) + ->expects(self::once()) ->method('getLimitations') - ->will($this->returnValue('*')); + ->will(self::returnValue('*')); $permissionSets = [ [ 'limitation' => null, @@ -737,15 +738,15 @@ public function testCanUserWithoutLimitations() ], ]; $permissionResolverMock - ->expects($this->once()) + ->expects(self::once()) ->method('hasAccess') - ->with($this->equalTo('test-module'), $this->equalTo('test-function')) - ->will($this->returnValue($permissionSets)); + ->with(self::equalTo('test-module'), self::equalTo('test-function')) + ->will(self::returnValue($permissionSets)); $permissionResolverMock - ->expects($this->once()) + ->expects(self::once()) ->method('getCurrentUserReference') - ->will($this->returnValue(new UserReference(14))); + ->will(self::returnValue(new UserReference(14))); /** @var $valueObject \Ibexa\Contracts\Core\Repository\Values\ValueObject */ $valueObject = $this->getMockForAbstractClass(ValueObject::class); @@ -767,15 +768,15 @@ private function getPermissionSetsMock() { $roleLimitationMock = $this->createMock(Limitation::class); $roleLimitationMock - ->expects($this->any()) + ->expects(self::any()) ->method('getIdentifier') - ->will($this->returnValue('test-role-limitation-identifier')); + ->will(self::returnValue('test-role-limitation-identifier')); $policyLimitationMock = $this->createMock(Limitation::class); $policyLimitationMock - ->expects($this->any()) + ->expects(self::any()) ->method('getIdentifier') - ->will($this->returnValue('test-policy-limitation-identifier')); + ->will(self::returnValue('test-policy-limitation-identifier')); $policyMock = $this->getMockBuilder(Policy::class) ->setMethods(['getLimitations']) @@ -783,9 +784,9 @@ private function getPermissionSetsMock() ->getMock(); $policyMock - ->expects($this->any()) + ->expects(self::any()) ->method('getLimitations') - ->will($this->returnValue([$policyLimitationMock, $policyLimitationMock])); + ->will(self::returnValue([$policyLimitationMock, $policyLimitationMock])); $permissionSet = [ 'limitation' => clone $roleLimitationMock, @@ -899,30 +900,30 @@ public function testCanUserComplex(array $roleLimitationEvaluations, array $poli $permissionSets = $this->getPermissionSetsMock(); $permissionResolverMock - ->expects($this->once()) + ->expects(self::once()) ->method('hasAccess') - ->with($this->equalTo('test-module'), $this->equalTo('test-function')) - ->will($this->returnValue($permissionSets)); + ->with(self::equalTo('test-module'), self::equalTo('test-function')) + ->will(self::returnValue($permissionSets)); $userRef = new UserReference(14); $permissionResolverMock - ->expects($this->once()) + ->expects(self::once()) ->method('getCurrentUserReference') - ->will($this->returnValue(new UserReference(14))); + ->will(self::returnValue(new UserReference(14))); $invocation = 0; for ($i = 0; $i < count($permissionSets); ++$i) { $limitation = $this->createMock(Type::class); $limitation - ->expects($this->once()) + ->expects(self::once()) ->method('evaluate') ->with($permissionSets[$i]['limitation'], $userRef, $valueObject, [$valueObject]) - ->will($this->returnValue($roleLimitationEvaluations[$i])); + ->will(self::returnValue($roleLimitationEvaluations[$i])); $limitationServiceMock - ->expects($this->at($invocation++)) + ->expects(self::at($invocation++)) ->method('getLimitationType') ->with('test-role-limitation-identifier') - ->will($this->returnValue($limitation)); + ->will(self::returnValue($limitation)); if (!$roleLimitationEvaluations[$i]) { continue; @@ -936,15 +937,15 @@ public function testCanUserComplex(array $roleLimitationEvaluations, array $poli $limitationsPass = true; $limitation = $this->createMock(Type::class); $limitation - ->expects($this->once()) + ->expects(self::once()) ->method('evaluate') ->with($limitations[$k], $userRef, $valueObject, [$valueObject]) - ->will($this->returnValue($policyLimitationEvaluations[$i][$j][$k])); + ->will(self::returnValue($policyLimitationEvaluations[$i][$j][$k])); $limitationServiceMock - ->expects($this->at($invocation++)) + ->expects(self::at($invocation++)) ->method('getLimitationType') ->with('test-policy-limitation-identifier') - ->will($this->returnValue($limitation)); + ->will(self::returnValue($limitation)); if (!$policyLimitationEvaluations[$i][$j][$k]) { $limitationsPass = false; @@ -979,9 +980,9 @@ public function testSetAndGetCurrentUserReference() $userReferenceMock = $this->getUserReferenceMock(); $userReferenceMock - ->expects($this->once()) + ->expects(self::once()) ->method('getUserId') - ->will($this->returnValue(42)); + ->will(self::returnValue(42)); $permissionResolverMock->setCurrentUserReference($userReferenceMock); diff --git a/tests/lib/Repository/Service/Mock/PermissionsCriterionHandlerTest.php b/tests/lib/Repository/Service/Mock/PermissionsCriterionHandlerTest.php index 5b28ecd82f..01792f6289 100644 --- a/tests/lib/Repository/Service/Mock/PermissionsCriterionHandlerTest.php +++ b/tests/lib/Repository/Service/Mock/PermissionsCriterionHandlerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Service\Mock; use Ibexa\Contracts\Core\Limitation\Type; @@ -41,14 +42,14 @@ public function testAddPermissionsCriterionWithBooleanPermission($permissionsCri $criterionMock = $this->createMock(Criterion::class); $handler - ->expects($this->once()) + ->expects(self::once()) ->method('getPermissionsCriterion') - ->will($this->returnValue($permissionsCriterion)); + ->will(self::returnValue($permissionsCriterion)); /* @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion $criterionMock */ $result = $handler->addPermissionsCriterion($criterionMock); - $this->assertSame($permissionsCriterion, $result); + self::assertSame($permissionsCriterion, $result); } public function providerForTestAddPermissionsCriterion() @@ -78,15 +79,15 @@ public function testAddPermissionsCriterion($permissionsCriterionMock, $givenCri { $handler = $this->getPermissionsCriterionHandlerMock(['getPermissionsCriterion']); $handler - ->expects($this->once()) + ->expects(self::once()) ->method('getPermissionsCriterion') - ->will($this->returnValue($permissionsCriterionMock)); + ->will(self::returnValue($permissionsCriterionMock)); /* @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion $criterionMock */ $result = $handler->addPermissionsCriterion($givenCriterion); - $this->assertTrue($result); - $this->assertEquals($expectedCriterion, $givenCriterion); + self::assertTrue($result); + self::assertEquals($expectedCriterion, $givenCriterion); } public function providerForTestGetPermissionsCriterion() @@ -96,9 +97,9 @@ public function providerForTestGetPermissionsCriterion() ->getMockBuilder(APILimitation::class) ->getMockForAbstractClass(); $limitationMock - ->expects($this->any()) + ->expects(self::any()) ->method('getIdentifier') - ->will($this->returnValue('limitationIdentifier')); + ->will(self::returnValue('limitationIdentifier')); $policy1 = new Policy(['limitations' => [$limitationMock]]); $policy2 = new Policy(['limitations' => [$limitationMock, $limitationMock]]); @@ -287,30 +288,30 @@ protected function mockServices($criterionMock, $limitationCount, $permissionSet ); $limitationTypeMock - ->expects($this->any()) + ->expects(self::any()) ->method('getCriterion') ->with( - $this->isInstanceOf(APILimitation::class), - $this->equalTo($userMock) + self::isInstanceOf(APILimitation::class), + self::equalTo($userMock) ) - ->will($this->returnValue($criterionMock)); + ->will(self::returnValue($criterionMock)); $limitationServiceMock - ->expects($this->exactly($limitationCount)) + ->expects(self::exactly($limitationCount)) ->method('getLimitationType') - ->with($this->equalTo('limitationIdentifier')) - ->will($this->returnValue($limitationTypeMock)); + ->with(self::equalTo('limitationIdentifier')) + ->will(self::returnValue($limitationTypeMock)); $permissionResolverMock - ->expects($this->once()) + ->expects(self::once()) ->method('hasAccess') - ->with($this->equalTo('content'), $this->equalTo('read')) - ->will($this->returnValue($permissionSets)); + ->with(self::equalTo('content'), self::equalTo('read')) + ->will(self::returnValue($permissionSets)); $permissionResolverMock - ->expects($this->once()) + ->expects(self::once()) ->method('getCurrentUserReference') - ->will($this->returnValue($userMock)); + ->will(self::returnValue($userMock)); } /** @@ -329,7 +330,7 @@ public function testGetPermissionsCriterion( $permissionsCriterion = $handler->getPermissionsCriterion(); - $this->assertEquals($expectedCriterion, $permissionsCriterion); + self::assertEquals($expectedCriterion, $permissionsCriterion); } public function providerForTestGetPermissionsCriterionBooleanPermissionSets() @@ -349,15 +350,15 @@ public function testGetPermissionsCriterionBooleanPermissionSets($permissionSets { $permissionResolverMock = $this->getPermissionResolverMock(['hasAccess']); $permissionResolverMock - ->expects($this->once()) + ->expects(self::once()) ->method('hasAccess') - ->with($this->equalTo('testModule'), $this->equalTo('testFunction')) - ->will($this->returnValue($permissionSets)); + ->with(self::equalTo('testModule'), self::equalTo('testFunction')) + ->will(self::returnValue($permissionSets)); $handler = $this->getPermissionsCriterionHandlerMock(null); $permissionsCriterion = $handler->getPermissionsCriterion('testModule', 'testFunction'); - $this->assertEquals($permissionSets, $permissionsCriterion); + self::assertEquals($permissionSets, $permissionsCriterion); } /** diff --git a/tests/lib/Repository/Service/Mock/RelationProcessorTest.php b/tests/lib/Repository/Service/Mock/RelationProcessorTest.php index f9b98ac687..4bb4b8a519 100644 --- a/tests/lib/Repository/Service/Mock/RelationProcessorTest.php +++ b/tests/lib/Repository/Service/Mock/RelationProcessorTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Service\Mock; use Ibexa\Contracts\Core\FieldType\FieldType; @@ -171,10 +172,10 @@ public function testAppendFieldRelations(array $fieldRelations, array $expected) $fieldTypeMock = $this->createMock(FieldType::class); $locationCallCount = 0; - $fieldTypeMock->expects($this->once()) + $fieldTypeMock->expects(self::once()) ->method('getRelations') - ->with($this->equalTo($fieldValueMock)) - ->will($this->returnValue($fieldRelations)); + ->with(self::equalTo($fieldValueMock)) + ->will(self::returnValue($fieldRelations)); $this->assertLocationHandlerExpectation( $locationHandler, @@ -200,7 +201,7 @@ public function testAppendFieldRelations(array $fieldRelations, array $expected) 42 ); - $this->assertEquals($expected, $relations); + self::assertEquals($expected, $relations); } /** @@ -210,11 +211,11 @@ protected function assertLocationHandlerExpectation($locationHandlerMock, $field { if (isset($fieldRelations[$type]['locationIds'])) { foreach ($fieldRelations[$type]['locationIds'] as $locationId) { - $locationHandlerMock->expects($this->at($callCounter)) + $locationHandlerMock->expects(self::at($callCounter)) ->method('load') - ->with($this->equalTo($locationId)) + ->with(self::equalTo($locationId)) ->will( - $this->returnValue( + self::returnValue( new Location( ['contentId' => $locationId + 100] ) @@ -236,11 +237,11 @@ public function testAppendFieldRelationsLocationMappingWorks() $fieldValueMock = $this->getMockForAbstractClass(Value::class); $fieldTypeMock = $this->createMock(FieldType::class); - $fieldTypeMock->expects($this->once()) + $fieldTypeMock->expects(self::once()) ->method('getRelations') - ->with($this->equalTo($fieldValueMock)) + ->with(self::equalTo($fieldValueMock)) ->will( - $this->returnValue( + self::returnValue( [ Relation::FIELD => [100], Relation::ASSET => [100], @@ -256,11 +257,11 @@ public function testAppendFieldRelationsLocationMappingWorks() ) ); - $locationHandler->expects($this->once()) + $locationHandler->expects(self::once()) ->method('load') - ->with($this->equalTo(100)) + ->with(self::equalTo(100)) ->will( - $this->returnValue( + self::returnValue( new Location( ['contentId' => 200] ) @@ -278,7 +279,7 @@ public function testAppendFieldRelationsLocationMappingWorks() 42 ); - $this->assertEquals( + self::assertEquals( [ Relation::ASSET => [42 => [100 => 0]], Relation::FIELD => [42 => [100 => 0]], @@ -298,11 +299,11 @@ public function testAppendFieldRelationsLogsMissingLocations() $fieldDefinitionId = 42; $fieldTypeMock - ->expects($this->once()) + ->expects(self::once()) ->method('getRelations') - ->with($this->equalTo($fieldValueMock)) + ->with(self::equalTo($fieldValueMock)) ->will( - $this->returnValue( + self::returnValue( [ Relation::LINK => [ 'locationIds' => [$locationId], @@ -313,14 +314,14 @@ public function testAppendFieldRelationsLogsMissingLocations() $locationHandler = $this->getPersistenceMock()->locationHandler(); $locationHandler - ->expects($this->any()) + ->expects(self::any()) ->method('load') ->with($locationId) ->willThrowException($this->createMock(NotFoundException::class)); $logger = $this->createMock(LoggerInterface::class); $logger - ->expects($this->once()) + ->expects(self::once()) ->method('error') ->with('Invalid relation: destination location not found', [ 'fieldDefinitionId' => $fieldDefinitionId, @@ -350,18 +351,18 @@ public function testProcessFieldRelationsNoChanges() $contentHandlerMock = $this->getPersistenceMockHandler('Content\\Handler'); $contentTypeMock = $this->createMock(ContentType::class); - $contentTypeMock->expects($this->at(0)) + $contentTypeMock->expects(self::at(0)) ->method('getFieldDefinition') - ->with($this->equalTo('identifier42')) - ->will($this->returnValue(new FieldDefinition(['id' => 42]))); + ->with(self::equalTo('identifier42')) + ->will(self::returnValue(new FieldDefinition(['id' => 42]))); - $contentTypeMock->expects($this->at(1)) + $contentTypeMock->expects(self::at(1)) ->method('getFieldDefinition') - ->with($this->equalTo('identifier43')) - ->will($this->returnValue(new FieldDefinition(['id' => 43]))); + ->with(self::equalTo('identifier43')) + ->will(self::returnValue(new FieldDefinition(['id' => 43]))); - $contentHandlerMock->expects($this->never())->method('addRelation'); - $contentHandlerMock->expects($this->never())->method('removeRelation'); + $contentHandlerMock->expects(self::never())->method('addRelation'); + $contentHandlerMock->expects(self::never())->method('removeRelation'); $existingRelations = [ $this->getStubbedRelation(1, Relation::COMMON, null, 10), @@ -451,10 +452,10 @@ public function testProcessFieldRelationsAddsRelations() Relation::ASSET => [44 => array_flip([18])], ]; - $contentTypeMock->expects($this->never())->method('getFieldDefinition'); - $contentHandlerMock->expects($this->never())->method('removeRelation'); + $contentTypeMock->expects(self::never())->method('getFieldDefinition'); + $contentHandlerMock->expects(self::never())->method('removeRelation'); - $contentHandlerMock->expects($this->at(0)) + $contentHandlerMock->expects(self::at(0)) ->method('addRelation') ->with( new CreateStruct( @@ -468,7 +469,7 @@ public function testProcessFieldRelationsAddsRelations() ) ); - $contentHandlerMock->expects($this->at(1)) + $contentHandlerMock->expects(self::at(1)) ->method('addRelation') ->with( new CreateStruct( @@ -482,7 +483,7 @@ public function testProcessFieldRelationsAddsRelations() ) ); - $contentHandlerMock->expects($this->at(2)) + $contentHandlerMock->expects(self::at(2)) ->method('addRelation') ->with( new CreateStruct( @@ -496,7 +497,7 @@ public function testProcessFieldRelationsAddsRelations() ) ); - $contentHandlerMock->expects($this->at(3)) + $contentHandlerMock->expects(self::at(3)) ->method('addRelation') ->with( new CreateStruct( @@ -565,17 +566,17 @@ public function testProcessFieldRelationsRemovesRelations() Relation::LINK => array_flip([12, 15, 17]), ]; - $contentHandlerMock->expects($this->never())->method('addRelation'); + $contentHandlerMock->expects(self::never())->method('addRelation'); $contentTypeMock->expects(self::at(0)) ->method('getFieldDefinition') - ->with($this->equalTo('identifier42')) - ->will($this->returnValue(new FieldDefinition(['id' => 42]))); + ->with(self::equalTo('identifier42')) + ->will(self::returnValue(new FieldDefinition(['id' => 42]))); $contentTypeMock->expects(self::at(1)) ->method('getFieldDefinition') - ->with($this->equalTo('identifier44')) - ->will($this->returnValue(new FieldDefinition(['id' => 44]))); + ->with(self::equalTo('identifier44')) + ->will(self::returnValue(new FieldDefinition(['id' => 44]))); $contentHandlerMock->expects(self::at(0)) ->method('removeRelation') @@ -629,16 +630,16 @@ public function testProcessFieldRelationsWhenRelationFieldNoLongerExists() $contentTypeMock = $this->createMock(ContentType::class); $contentTypeMock - ->expects($this->at(0)) + ->expects(self::at(0)) ->method('getFieldDefinition') - ->with($this->equalTo('identifier43')) - ->will($this->returnValue(null)); + ->with(self::equalTo('identifier43')) + ->will(self::returnValue(null)); $contentTypeMock - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('getFieldDefinition') - ->with($this->equalTo('identifier44')) - ->will($this->returnValue(null)); + ->with(self::equalTo('identifier44')) + ->will(self::returnValue(null)); $relationProcessor = $this->getPartlyMockedRelationProcessor(); $relationProcessor->processFieldRelations([], 24, 2, $contentTypeMock, $existingRelations); diff --git a/tests/lib/Repository/Service/Mock/RepositoryTest.php b/tests/lib/Repository/Service/Mock/RepositoryTest.php index c3d9497015..179b106d73 100644 --- a/tests/lib/Repository/Service/Mock/RepositoryTest.php +++ b/tests/lib/Repository/Service/Mock/RepositoryTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Service\Mock; use Ibexa\Tests\Core\Repository\Service\Mock\Base as BaseServiceMockTest; @@ -24,7 +25,7 @@ public function testBeginTransaction() $persistenceHandlerMock = $this->getPersistenceMock(); $persistenceHandlerMock->expects( - $this->once() + self::once() )->method( 'beginTransaction' ); @@ -43,7 +44,7 @@ public function testCommit() $persistenceHandlerMock = $this->getPersistenceMock(); $persistenceHandlerMock->expects( - $this->once() + self::once() )->method( 'commit' ); @@ -64,11 +65,11 @@ public function testCommitThrowsRuntimeException() $persistenceHandlerMock = $this->getPersistenceMock(); $persistenceHandlerMock->expects( - $this->once() + self::once() )->method( 'commit' )->will( - $this->throwException(new \Exception()) + self::throwException(new \Exception()) ); $mockedRepository->commit(); @@ -85,7 +86,7 @@ public function testRollback() $persistenceHandlerMock = $this->getPersistenceMock(); $persistenceHandlerMock->expects( - $this->once() + self::once() )->method( 'rollback' ); @@ -106,11 +107,11 @@ public function testRollbackThrowsRuntimeException() $persistenceHandlerMock = $this->getPersistenceMock(); $persistenceHandlerMock->expects( - $this->once() + self::once() )->method( 'rollback' )->will( - $this->throwException(new \Exception()) + self::throwException(new \Exception()) ); $mockedRepository->rollback(); diff --git a/tests/lib/Repository/Service/Mock/RoleTest.php b/tests/lib/Repository/Service/Mock/RoleTest.php index 0fe6400443..5b5d63832e 100644 --- a/tests/lib/Repository/Service/Mock/RoleTest.php +++ b/tests/lib/Repository/Service/Mock/RoleTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Service\Mock; use ArrayIterator; @@ -47,17 +48,17 @@ public function testCreateRoleThrowsLimitationValidationException() $limitationMock = $this->createMock(RoleLimitation::class); $limitationTypeMock = $this->createMock(SPIType::class); - $limitationMock->expects($this->any()) + $limitationMock->expects(self::any()) ->method('getIdentifier') - ->will($this->returnValue('mockIdentifier')); + ->will(self::returnValue('mockIdentifier')); - $limitationTypeMock->expects($this->once()) + $limitationTypeMock->expects(self::once()) ->method('acceptValue') - ->with($this->equalTo($limitationMock)); - $limitationTypeMock->expects($this->once()) + ->with(self::equalTo($limitationMock)); + $limitationTypeMock->expects(self::once()) ->method('validate') - ->with($this->equalTo($limitationMock)) - ->will($this->returnValue([42])); + ->with(self::equalTo($limitationMock)) + ->will(self::returnValue([42])); $settings = [ 'policyMap' => ['mockModule' => ['mockFunction' => ['mockIdentifier' => true]]], @@ -74,29 +75,29 @@ public function testCreateRoleThrowsLimitationValidationException() $policyCreateStructMock->module = 'mockModule'; $policyCreateStructMock->function = 'mockFunction'; $roleCreateStructMock->identifier = 'mockIdentifier'; - $roleServiceMock->expects($this->once()) + $roleServiceMock->expects(self::once()) ->method('loadRoleByIdentifier') - ->with($this->equalTo('mockIdentifier')) - ->will($this->throwException(new NotFoundException('Role', 'mockIdentifier'))); + ->with(self::equalTo('mockIdentifier')) + ->will(self::throwException(new NotFoundException('Role', 'mockIdentifier'))); /* @var \PHPUnit\Framework\MockObject\MockObject $roleCreateStructMock */ - $roleCreateStructMock->expects($this->once()) + $roleCreateStructMock->expects(self::once()) ->method('getPolicies') - ->will($this->returnValue([$policyCreateStructMock])); + ->will(self::returnValue([$policyCreateStructMock])); /* @var \PHPUnit\Framework\MockObject\MockObject $policyCreateStructMock */ - $policyCreateStructMock->expects($this->once()) + $policyCreateStructMock->expects(self::once()) ->method('getLimitations') - ->will($this->returnValue([$limitationMock])); + ->will(self::returnValue([$limitationMock])); $permissionResolverMock = $this->getPermissionResolverMock(); - $permissionResolverMock->expects($this->once()) + $permissionResolverMock->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('role'), - $this->equalTo('create'), - $this->equalTo($roleCreateStructMock) - )->will($this->returnValue(true)); + self::equalTo('role'), + self::equalTo('create'), + self::equalTo($roleCreateStructMock) + )->will(self::returnValue(true)); /* @var \Ibexa\Contracts\Core\Repository\Values\User\RoleCreateStruct $roleCreateStructMock */ $roleServiceMock->createRole($roleCreateStructMock); @@ -112,17 +113,17 @@ public function testAddPolicyThrowsLimitationValidationException() $limitationMock = $this->createMock(RoleLimitation::class); $limitationTypeMock = $this->createMock(SPIType::class); - $limitationTypeMock->expects($this->once()) + $limitationTypeMock->expects(self::once()) ->method('acceptValue') - ->with($this->equalTo($limitationMock)); - $limitationTypeMock->expects($this->once()) + ->with(self::equalTo($limitationMock)); + $limitationTypeMock->expects(self::once()) ->method('validate') - ->with($this->equalTo($limitationMock)) - ->will($this->returnValue([42])); + ->with(self::equalTo($limitationMock)) + ->will(self::returnValue([42])); - $limitationMock->expects($this->any()) + $limitationMock->expects(self::any()) ->method('getIdentifier') - ->will($this->returnValue('mockIdentifier')); + ->will(self::returnValue('mockIdentifier')); $settings = [ 'policyMap' => ['mockModule' => ['mockFunction' => ['mockIdentifier' => true]]], @@ -134,32 +135,32 @@ public function testAddPolicyThrowsLimitationValidationException() $roleDraftMock = $this->createMock(RoleDraft::class); $policyCreateStructMock = $this->createMock(PolicyCreateStruct::class); - $roleDraftMock->expects($this->any()) + $roleDraftMock->expects(self::any()) ->method('__get') ->with('id') - ->will($this->returnValue(42)); + ->will(self::returnValue(42)); /* @var \Ibexa\Contracts\Core\Repository\Values\User\PolicyCreateStruct $policyCreateStructMock */ $policyCreateStructMock->module = 'mockModule'; $policyCreateStructMock->function = 'mockFunction'; - $roleServiceMock->expects($this->once()) + $roleServiceMock->expects(self::once()) ->method('loadRoleDraft') - ->with($this->equalTo(42)) - ->will($this->returnValue($roleDraftMock)); + ->with(self::equalTo(42)) + ->will(self::returnValue($roleDraftMock)); /* @var \PHPUnit\Framework\MockObject\MockObject $policyCreateStructMock */ - $policyCreateStructMock->expects($this->once()) + $policyCreateStructMock->expects(self::once()) ->method('getLimitations') - ->will($this->returnValue([$limitationMock])); + ->will(self::returnValue([$limitationMock])); $permissionResolverMock = $this->getPermissionResolverMock(); - $permissionResolverMock->expects($this->once()) + $permissionResolverMock->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('role'), - $this->equalTo('update'), - $this->equalTo($roleDraftMock) - )->will($this->returnValue(true)); + self::equalTo('role'), + self::equalTo('update'), + self::equalTo($roleDraftMock) + )->will(self::returnValue(true)); /* @var \Ibexa\Contracts\Core\Repository\Values\User\Role $roleDraftMock */ /* @var \Ibexa\Contracts\Core\Repository\Values\User\PolicyCreateStruct $policyCreateStructMock */ @@ -176,17 +177,17 @@ public function testUpdatePolicyThrowsLimitationValidationException() $limitationMock = $this->createMock(RoleLimitation::class); $limitationTypeMock = $this->createMock(SPIType::class); - $limitationTypeMock->expects($this->once()) + $limitationTypeMock->expects(self::once()) ->method('acceptValue') - ->with($this->equalTo($limitationMock)); - $limitationTypeMock->expects($this->once()) + ->with(self::equalTo($limitationMock)); + $limitationTypeMock->expects(self::once()) ->method('validate') - ->with($this->equalTo($limitationMock)) - ->will($this->returnValue([42])); + ->with(self::equalTo($limitationMock)) + ->will(self::returnValue([42])); - $limitationMock->expects($this->any()) + $limitationMock->expects(self::any()) ->method('getIdentifier') - ->will($this->returnValue('mockIdentifier')); + ->will(self::returnValue('mockIdentifier')); $settings = [ 'policyMap' => ['mockModule' => ['mockFunction' => ['mockIdentifier' => true]]], @@ -199,10 +200,10 @@ public function testUpdatePolicyThrowsLimitationValidationException() $policyDraftMock = $this->createMock(PolicyDraft::class); $policyUpdateStructMock = $this->createMock(PolicyUpdateStruct::class); - $policyDraftMock->expects($this->any()) + $policyDraftMock->expects(self::any()) ->method('__get') ->will( - $this->returnCallback( + self::returnCallback( static function ($propertyName) { switch ($propertyName) { case 'module': @@ -217,18 +218,18 @@ static function ($propertyName) { ); /* @var \PHPUnit\Framework\MockObject\MockObject $policyCreateStructMock */ - $policyUpdateStructMock->expects($this->once()) + $policyUpdateStructMock->expects(self::once()) ->method('getLimitations') - ->will($this->returnValue([$limitationMock])); + ->will(self::returnValue([$limitationMock])); $permissionResolverMock = $this->getPermissionResolverMock(); - $permissionResolverMock->expects($this->once()) + $permissionResolverMock->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('role'), - $this->equalTo('update'), - $this->equalTo($roleDraftMock) - )->will($this->returnValue(true)); + self::equalTo('role'), + self::equalTo('update'), + self::equalTo($roleDraftMock) + )->will(self::returnValue(true)); /* @var \Ibexa\Contracts\Core\Repository\Values\User\Policy $policyDraftMock */ /* @var \Ibexa\Contracts\Core\Repository\Values\User\PolicyUpdateStruct $policyUpdateStructMock */ @@ -253,14 +254,14 @@ public function testAssignRoleToUserThrowsUnauthorizedException() $userMock = $this->createMock(User::class); $permissionResolverMock = $this->getPermissionResolverMock(); - $permissionResolverMock->expects($this->once()) + $permissionResolverMock->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('role'), - $this->equalTo('assign'), - $this->equalTo($userMock), - $this->equalTo([$roleMock]) - )->will($this->returnValue(false)); + self::equalTo('role'), + self::equalTo('assign'), + self::equalTo($userMock), + self::equalTo([$roleMock]) + )->will(self::returnValue(false)); $roleServiceMock->assignRoleToUser($roleMock, $userMock, null); } @@ -275,17 +276,17 @@ public function testAssignRoleToUserThrowsLimitationValidationException() $limitationMock = $this->createMock(RoleLimitation::class); $limitationTypeMock = $this->createMock(SPIType::class); - $limitationTypeMock->expects($this->once()) + $limitationTypeMock->expects(self::once()) ->method('acceptValue') - ->with($this->equalTo($limitationMock)); - $limitationTypeMock->expects($this->once()) + ->with(self::equalTo($limitationMock)); + $limitationTypeMock->expects(self::once()) ->method('validate') - ->with($this->equalTo($limitationMock)) - ->will($this->returnValue([42])); + ->with(self::equalTo($limitationMock)) + ->will(self::returnValue([42])); - $limitationMock->expects($this->once()) + $limitationMock->expects(self::once()) ->method('getIdentifier') - ->will($this->returnValue('testIdentifier')); + ->will(self::returnValue('testIdentifier')); $settings = [ 'limitationTypes' => ['testIdentifier' => $limitationTypeMock], @@ -299,14 +300,14 @@ public function testAssignRoleToUserThrowsLimitationValidationException() $userMock = $this->createMock(User::class); $permissionResolverMock = $this->getPermissionResolverMock(); - $permissionResolverMock->expects($this->once()) + $permissionResolverMock->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('role'), - $this->equalTo('assign'), - $this->equalTo($userMock), - $this->equalTo([$roleMock]) - )->will($this->returnValue(true)); + self::equalTo('role'), + self::equalTo('assign'), + self::equalTo($userMock), + self::equalTo([$roleMock]) + )->will(self::returnValue(true)); /* @var \Ibexa\Contracts\Core\Repository\Values\User\Limitation\RoleLimitation $limitationMock */ $roleServiceMock->assignRoleToUser($roleMock, $userMock, $limitationMock); @@ -326,19 +327,19 @@ public function testAssignRoleToUserThrowsBadStateException() $userMock = $this->createMock(User::class); $limitationMock = $this->createMock(RoleLimitation::class); - $limitationMock->expects($this->once()) + $limitationMock->expects(self::once()) ->method('getIdentifier') - ->will($this->returnValue('testIdentifier')); + ->will(self::returnValue('testIdentifier')); $permissionResolverMock = $this->getPermissionResolverMock(); - $permissionResolverMock->expects($this->once()) + $permissionResolverMock->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('role'), - $this->equalTo('assign'), - $this->equalTo($userMock), - $this->equalTo([$roleMock]) - )->will($this->returnValue(true)); + self::equalTo('role'), + self::equalTo('assign'), + self::equalTo($userMock), + self::equalTo([$roleMock]) + )->will(self::returnValue(true)); /* @var \Ibexa\Contracts\Core\Repository\Values\User\Limitation\RoleLimitation $limitationMock */ $roleServiceMock->assignRoleToUser($roleMock, $userMock, $limitationMock); @@ -352,17 +353,17 @@ public function testAssignRoleToUser() $limitationMock = $this->createMock(RoleLimitation::class); $limitationTypeMock = $this->createMock(SPIType::class); - $limitationTypeMock->expects($this->once()) + $limitationTypeMock->expects(self::once()) ->method('acceptValue') - ->with($this->equalTo($limitationMock)); - $limitationTypeMock->expects($this->once()) + ->with(self::equalTo($limitationMock)); + $limitationTypeMock->expects(self::once()) ->method('validate') - ->with($this->equalTo($limitationMock)) - ->will($this->returnValue([])); + ->with(self::equalTo($limitationMock)) + ->will(self::returnValue([])); - $limitationMock->expects($this->exactly(2)) + $limitationMock->expects(self::exactly(2)) ->method('getIdentifier') - ->will($this->returnValue('testIdentifier')); + ->will(self::returnValue('testIdentifier')); $settings = [ 'limitationTypes' => ['testIdentifier' => $limitationTypeMock], @@ -375,51 +376,51 @@ public function testAssignRoleToUser() $userMock = $this->createMock(User::class); $userHandlerMock = $this->getPersistenceMockHandler('User\\Handler'); - $userMock->expects($this->any()) + $userMock->expects(self::any()) ->method('__get') ->with('id') - ->will($this->returnValue(24)); + ->will(self::returnValue(24)); $permissionResolverMock = $this->getPermissionResolverMock(); - $permissionResolverMock->expects($this->once()) + $permissionResolverMock->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('role'), - $this->equalTo('assign'), - $this->equalTo($userMock), - $this->equalTo([$roleMock]) - )->will($this->returnValue(true)); + self::equalTo('role'), + self::equalTo('assign'), + self::equalTo($userMock), + self::equalTo([$roleMock]) + )->will(self::returnValue(true)); - $roleMock->expects($this->any()) + $roleMock->expects(self::any()) ->method('__get') ->with('id') - ->will($this->returnValue(42)); + ->will(self::returnValue(42)); - $userHandlerMock->expects($this->once()) + $userHandlerMock->expects(self::once()) ->method('loadRole') - ->with($this->equalTo(42)) - ->will($this->returnValue(new SPIRole(['id' => 42]))); + ->with(self::equalTo(42)) + ->will(self::returnValue(new SPIRole(['id' => 42]))); - $userHandlerMock->expects($this->once()) + $userHandlerMock->expects(self::once()) ->method('load') - ->with($this->equalTo(24)) - ->will($this->returnValue(new SPIUser(['id' => 24]))); + ->with(self::equalTo(24)) + ->will(self::returnValue(new SPIUser(['id' => 24]))); - $roleServiceMock->expects($this->once()) + $roleServiceMock->expects(self::once()) ->method('checkAssignmentAndFilterLimitationValues') - ->with(24, $this->isInstanceOf(SPIRole::class), ['testIdentifier' => []]) - ->will($this->returnValue(['testIdentifier' => []])); + ->with(24, self::isInstanceOf(SPIRole::class), ['testIdentifier' => []]) + ->will(self::returnValue(['testIdentifier' => []])); - $repository->expects($this->once())->method('beginTransaction'); + $repository->expects(self::once())->method('beginTransaction'); $userHandlerMock = $this->getPersistenceMockHandler('User\\Handler'); - $userHandlerMock->expects($this->once()) + $userHandlerMock->expects(self::once()) ->method('assignRole') ->with( - $this->equalTo(24), - $this->equalTo(42), - $this->equalTo(['testIdentifier' => []]) + self::equalTo(24), + self::equalTo(42), + self::equalTo(['testIdentifier' => []]) ); - $repository->expects($this->once())->method('commit'); + $repository->expects(self::once())->method('commit'); /* @var \Ibexa\Contracts\Core\Repository\Values\User\Role $roleMock */ /* @var \Ibexa\Contracts\Core\Repository\Values\User\User $userMock */ @@ -438,51 +439,51 @@ public function testAssignRoleToUserWithNullLimitation() $userMock = $this->createMock(User::class); $userHandlerMock = $this->getPersistenceMockHandler('User\\Handler'); - $userMock->expects($this->any()) + $userMock->expects(self::any()) ->method('__get') ->with('id') - ->will($this->returnValue(24)); + ->will(self::returnValue(24)); $permissionResolverMock = $this->getPermissionResolverMock(); - $permissionResolverMock->expects($this->once()) + $permissionResolverMock->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('role'), - $this->equalTo('assign'), - $this->equalTo($userMock), - $this->equalTo([$roleMock]) - )->will($this->returnValue(true)); + self::equalTo('role'), + self::equalTo('assign'), + self::equalTo($userMock), + self::equalTo([$roleMock]) + )->will(self::returnValue(true)); - $roleMock->expects($this->any()) + $roleMock->expects(self::any()) ->method('__get') ->with('id') - ->will($this->returnValue(42)); + ->will(self::returnValue(42)); - $userHandlerMock->expects($this->once()) + $userHandlerMock->expects(self::once()) ->method('loadRole') - ->with($this->equalTo(42)) - ->will($this->returnValue(new SPIRole(['id' => 42]))); + ->with(self::equalTo(42)) + ->will(self::returnValue(new SPIRole(['id' => 42]))); - $userHandlerMock->expects($this->once()) + $userHandlerMock->expects(self::once()) ->method('load') - ->with($this->equalTo(24)) - ->will($this->returnValue(new SPIUser(['id' => 24]))); + ->with(self::equalTo(24)) + ->will(self::returnValue(new SPIUser(['id' => 24]))); - $roleServiceMock->expects($this->once()) + $roleServiceMock->expects(self::once()) ->method('checkAssignmentAndFilterLimitationValues') - ->with(24, $this->isInstanceOf(SPIRole::class), null) - ->will($this->returnValue(null)); + ->with(24, self::isInstanceOf(SPIRole::class), null) + ->will(self::returnValue(null)); - $repository->expects($this->once())->method('beginTransaction'); + $repository->expects(self::once())->method('beginTransaction'); $userHandlerMock = $this->getPersistenceMockHandler('User\\Handler'); - $userHandlerMock->expects($this->once()) + $userHandlerMock->expects(self::once()) ->method('assignRole') ->with( - $this->equalTo(24), - $this->equalTo(42), - $this->equalTo(null) + self::equalTo(24), + self::equalTo(42), + self::equalTo(null) ); - $repository->expects($this->once())->method('commit'); + $repository->expects(self::once())->method('commit'); /* @var \Ibexa\Contracts\Core\Repository\Values\User\Role $roleMock */ /* @var \Ibexa\Contracts\Core\Repository\Values\User\User $userMock */ @@ -502,51 +503,51 @@ public function testAssignRoleToUserWithRollback() $userMock = $this->createMock(User::class); $userHandlerMock = $this->getPersistenceMockHandler('User\\Handler'); - $userMock->expects($this->any()) + $userMock->expects(self::any()) ->method('__get') ->with('id') - ->will($this->returnValue(24)); + ->will(self::returnValue(24)); $permissionResolverMock = $this->getPermissionResolverMock(); - $permissionResolverMock->expects($this->once()) + $permissionResolverMock->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('role'), - $this->equalTo('assign'), - $this->equalTo($userMock), - $this->equalTo([$roleMock]) - )->will($this->returnValue(true)); + self::equalTo('role'), + self::equalTo('assign'), + self::equalTo($userMock), + self::equalTo([$roleMock]) + )->will(self::returnValue(true)); - $roleMock->expects($this->any()) + $roleMock->expects(self::any()) ->method('__get') ->with('id') - ->will($this->returnValue(42)); + ->will(self::returnValue(42)); - $userHandlerMock->expects($this->once()) + $userHandlerMock->expects(self::once()) ->method('loadRole') - ->with($this->equalTo(42)) - ->will($this->returnValue(new SPIRole(['id' => 42]))); + ->with(self::equalTo(42)) + ->will(self::returnValue(new SPIRole(['id' => 42]))); - $userHandlerMock->expects($this->once()) + $userHandlerMock->expects(self::once()) ->method('load') - ->with($this->equalTo(24)) - ->will($this->returnValue(new SPIUser(['id' => 24]))); + ->with(self::equalTo(24)) + ->will(self::returnValue(new SPIUser(['id' => 24]))); - $roleServiceMock->expects($this->once()) + $roleServiceMock->expects(self::once()) ->method('checkAssignmentAndFilterLimitationValues') - ->with(24, $this->isInstanceOf(SPIRole::class), null) - ->will($this->returnValue(null)); + ->with(24, self::isInstanceOf(SPIRole::class), null) + ->will(self::returnValue(null)); - $repository->expects($this->once())->method('beginTransaction'); + $repository->expects(self::once())->method('beginTransaction'); $userHandlerMock = $this->getPersistenceMockHandler('User\\Handler'); - $userHandlerMock->expects($this->once()) + $userHandlerMock->expects(self::once()) ->method('assignRole') ->with( - $this->equalTo(24), - $this->equalTo(42), - $this->equalTo(null) - )->will($this->throwException(new \Exception())); - $repository->expects($this->once())->method('rollback'); + self::equalTo(24), + self::equalTo(42), + self::equalTo(null) + )->will(self::throwException(new \Exception())); + $repository->expects(self::once())->method('rollback'); /* @var \Ibexa\Contracts\Core\Repository\Values\User\Role $roleMock */ /* @var \Ibexa\Contracts\Core\Repository\Values\User\User $userMock */ @@ -568,14 +569,14 @@ public function testAssignRoleToUserGroupThrowsUnauthorizedException() $userGroupMock = $this->createMock(UserGroup::class); $permissionResolverMock = $this->getPermissionResolverMock(); - $permissionResolverMock->expects($this->once()) + $permissionResolverMock->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('role'), - $this->equalTo('assign'), - $this->equalTo($userGroupMock), - $this->equalTo([$roleMock]) - )->will($this->returnValue(false)); + self::equalTo('role'), + self::equalTo('assign'), + self::equalTo($userGroupMock), + self::equalTo([$roleMock]) + )->will(self::returnValue(false)); $roleServiceMock->assignRoleToUserGroup($roleMock, $userGroupMock, null); } @@ -590,17 +591,17 @@ public function testAssignRoleToUserGroupThrowsLimitationValidationException() $limitationMock = $this->createMock(RoleLimitation::class); $limitationTypeMock = $this->createMock(SPIType::class); - $limitationTypeMock->expects($this->once()) + $limitationTypeMock->expects(self::once()) ->method('acceptValue') - ->with($this->equalTo($limitationMock)); - $limitationTypeMock->expects($this->once()) + ->with(self::equalTo($limitationMock)); + $limitationTypeMock->expects(self::once()) ->method('validate') - ->with($this->equalTo($limitationMock)) - ->will($this->returnValue([42])); + ->with(self::equalTo($limitationMock)) + ->will(self::returnValue([42])); - $limitationMock->expects($this->once()) + $limitationMock->expects(self::once()) ->method('getIdentifier') - ->will($this->returnValue('testIdentifier')); + ->will(self::returnValue('testIdentifier')); $settings = [ 'limitationTypes' => ['testIdentifier' => $limitationTypeMock], @@ -615,14 +616,14 @@ public function testAssignRoleToUserGroupThrowsLimitationValidationException() $userGroupMock = $this->createMock(UserGroup::class); $permissionResolverMock = $this->getPermissionResolverMock(); - $permissionResolverMock->expects($this->once()) + $permissionResolverMock->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('role'), - $this->equalTo('assign'), - $this->equalTo($userGroupMock), - $this->equalTo([$roleMock]) - )->will($this->returnValue(true)); + self::equalTo('role'), + self::equalTo('assign'), + self::equalTo($userGroupMock), + self::equalTo([$roleMock]) + )->will(self::returnValue(true)); /* @var \Ibexa\Contracts\Core\Repository\Values\User\Limitation\RoleLimitation $limitationMock */ $roleServiceMock->assignRoleToUserGroup($roleMock, $userGroupMock, $limitationMock); @@ -643,19 +644,19 @@ public function testAssignRoleGroupToUserThrowsBadStateException() $userGroupMock = $this->createMock(UserGroup::class); $limitationMock = $this->createMock(RoleLimitation::class); - $limitationMock->expects($this->once()) + $limitationMock->expects(self::once()) ->method('getIdentifier') - ->will($this->returnValue('testIdentifier')); + ->will(self::returnValue('testIdentifier')); $permissionResolverMock = $this->getPermissionResolverMock(); - $permissionResolverMock->expects($this->once()) + $permissionResolverMock->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('role'), - $this->equalTo('assign'), - $this->equalTo($userGroupMock), - $this->equalTo([$roleMock]) - )->will($this->returnValue(true)); + self::equalTo('role'), + self::equalTo('assign'), + self::equalTo($userGroupMock), + self::equalTo([$roleMock]) + )->will(self::returnValue(true)); /* @var \Ibexa\Contracts\Core\Repository\Values\User\Limitation\RoleLimitation $limitationMock */ $roleServiceMock->assignRoleToUserGroup($roleMock, $userGroupMock, $limitationMock); @@ -669,17 +670,17 @@ public function testAssignRoleToUserGroup() $limitationMock = $this->createMock(RoleLimitation::class); $limitationTypeMock = $this->createMock(SPIType::class); - $limitationTypeMock->expects($this->once()) + $limitationTypeMock->expects(self::once()) ->method('acceptValue') - ->with($this->equalTo($limitationMock)); - $limitationTypeMock->expects($this->once()) + ->with(self::equalTo($limitationMock)); + $limitationTypeMock->expects(self::once()) ->method('validate') - ->with($this->equalTo($limitationMock)) - ->will($this->returnValue([])); + ->with(self::equalTo($limitationMock)) + ->will(self::returnValue([])); - $limitationMock->expects($this->exactly(2)) + $limitationMock->expects(self::exactly(2)) ->method('getIdentifier') - ->will($this->returnValue('testIdentifier')); + ->will(self::returnValue('testIdentifier')); $settings = [ 'limitationTypes' => ['testIdentifier' => $limitationTypeMock], @@ -693,54 +694,54 @@ public function testAssignRoleToUserGroup() $userServiceMock = $this->createMock(UserService::class); $userHandlerMock = $this->getPersistenceMockHandler('User\\Handler'); - $repository->expects($this->once()) + $repository->expects(self::once()) ->method('getUserService') - ->will($this->returnValue($userServiceMock)); - $userGroupMock->expects($this->any()) + ->will(self::returnValue($userServiceMock)); + $userGroupMock->expects(self::any()) ->method('__get') ->with('id') - ->will($this->returnValue(24)); + ->will(self::returnValue(24)); $permissionResolverMock = $this->getPermissionResolverMock(); - $permissionResolverMock->expects($this->once()) + $permissionResolverMock->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('role'), - $this->equalTo('assign'), - $this->equalTo($userGroupMock), - $this->equalTo([$roleMock]) - )->will($this->returnValue(true)); + self::equalTo('role'), + self::equalTo('assign'), + self::equalTo($userGroupMock), + self::equalTo([$roleMock]) + )->will(self::returnValue(true)); - $roleMock->expects($this->any()) + $roleMock->expects(self::any()) ->method('__get') ->with('id') - ->will($this->returnValue(42)); + ->will(self::returnValue(42)); - $userHandlerMock->expects($this->once()) + $userHandlerMock->expects(self::once()) ->method('loadRole') - ->with($this->equalTo(42)) - ->will($this->returnValue(new SPIRole(['id' => 42]))); + ->with(self::equalTo(42)) + ->will(self::returnValue(new SPIRole(['id' => 42]))); - $userServiceMock->expects($this->once()) + $userServiceMock->expects(self::once()) ->method('loadUserGroup') - ->with($this->equalTo(24)) - ->will($this->returnValue($userGroupMock)); + ->with(self::equalTo(24)) + ->will(self::returnValue($userGroupMock)); - $roleServiceMock->expects($this->once()) + $roleServiceMock->expects(self::once()) ->method('checkAssignmentAndFilterLimitationValues') - ->with(24, $this->isInstanceOf(SPIRole::class), ['testIdentifier' => []]) - ->will($this->returnValue(['testIdentifier' => []])); + ->with(24, self::isInstanceOf(SPIRole::class), ['testIdentifier' => []]) + ->will(self::returnValue(['testIdentifier' => []])); - $repository->expects($this->once())->method('beginTransaction'); + $repository->expects(self::once())->method('beginTransaction'); $userHandlerMock = $this->getPersistenceMockHandler('User\\Handler'); - $userHandlerMock->expects($this->once()) + $userHandlerMock->expects(self::once()) ->method('assignRole') ->with( - $this->equalTo(24), - $this->equalTo(42), - $this->equalTo(['testIdentifier' => []]) + self::equalTo(24), + self::equalTo(42), + self::equalTo(['testIdentifier' => []]) ); - $repository->expects($this->once())->method('commit'); + $repository->expects(self::once())->method('commit'); /* @var \Ibexa\Contracts\Core\Repository\Values\User\Role $roleMock */ /* @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup $userGroupMock */ @@ -760,54 +761,54 @@ public function testAssignRoleToUserGroupWithNullLimitation() $userServiceMock = $this->createMock(UserService::class); $userHandlerMock = $this->getPersistenceMockHandler('User\\Handler'); - $repository->expects($this->once()) + $repository->expects(self::once()) ->method('getUserService') - ->will($this->returnValue($userServiceMock)); - $userGroupMock->expects($this->any()) + ->will(self::returnValue($userServiceMock)); + $userGroupMock->expects(self::any()) ->method('__get') ->with('id') - ->will($this->returnValue(24)); + ->will(self::returnValue(24)); $permissionResolverMock = $this->getPermissionResolverMock(); - $permissionResolverMock->expects($this->once()) + $permissionResolverMock->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('role'), - $this->equalTo('assign'), - $this->equalTo($userGroupMock), - $this->equalTo([$roleMock]) - )->will($this->returnValue(true)); + self::equalTo('role'), + self::equalTo('assign'), + self::equalTo($userGroupMock), + self::equalTo([$roleMock]) + )->will(self::returnValue(true)); - $roleMock->expects($this->any()) + $roleMock->expects(self::any()) ->method('__get') ->with('id') - ->will($this->returnValue(42)); + ->will(self::returnValue(42)); - $userHandlerMock->expects($this->once()) + $userHandlerMock->expects(self::once()) ->method('loadRole') - ->with($this->equalTo(42)) - ->will($this->returnValue(new SPIRole(['id' => 42]))); + ->with(self::equalTo(42)) + ->will(self::returnValue(new SPIRole(['id' => 42]))); - $userServiceMock->expects($this->once()) + $userServiceMock->expects(self::once()) ->method('loadUserGroup') - ->with($this->equalTo(24)) - ->will($this->returnValue($userGroupMock)); + ->with(self::equalTo(24)) + ->will(self::returnValue($userGroupMock)); - $roleServiceMock->expects($this->once()) + $roleServiceMock->expects(self::once()) ->method('checkAssignmentAndFilterLimitationValues') - ->with(24, $this->isInstanceOf(SPIRole::class), null) - ->will($this->returnValue(null)); + ->with(24, self::isInstanceOf(SPIRole::class), null) + ->will(self::returnValue(null)); - $repository->expects($this->once())->method('beginTransaction'); + $repository->expects(self::once())->method('beginTransaction'); $userHandlerMock = $this->getPersistenceMockHandler('User\\Handler'); - $userHandlerMock->expects($this->once()) + $userHandlerMock->expects(self::once()) ->method('assignRole') ->with( - $this->equalTo(24), - $this->equalTo(42), - $this->equalTo(null) + self::equalTo(24), + self::equalTo(42), + self::equalTo(null) ); - $repository->expects($this->once())->method('commit'); + $repository->expects(self::once())->method('commit'); /* @var \Ibexa\Contracts\Core\Repository\Values\User\Role $roleMock */ /* @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup $userGroupMock */ @@ -828,54 +829,54 @@ public function testAssignRoleToUserGroupWithRollback() $userServiceMock = $this->createMock(UserService::class); $userHandlerMock = $this->getPersistenceMockHandler('User\\Handler'); - $repository->expects($this->once()) + $repository->expects(self::once()) ->method('getUserService') - ->will($this->returnValue($userServiceMock)); - $userGroupMock->expects($this->any()) + ->will(self::returnValue($userServiceMock)); + $userGroupMock->expects(self::any()) ->method('__get') ->with('id') - ->will($this->returnValue(24)); + ->will(self::returnValue(24)); $permissionResolverMock = $this->getPermissionResolverMock(); - $permissionResolverMock->expects($this->once()) + $permissionResolverMock->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('role'), - $this->equalTo('assign'), - $this->equalTo($userGroupMock), - $this->equalTo([$roleMock]) - )->will($this->returnValue(true)); + self::equalTo('role'), + self::equalTo('assign'), + self::equalTo($userGroupMock), + self::equalTo([$roleMock]) + )->will(self::returnValue(true)); - $roleMock->expects($this->any()) + $roleMock->expects(self::any()) ->method('__get') ->with('id') - ->will($this->returnValue(42)); + ->will(self::returnValue(42)); - $userHandlerMock->expects($this->once()) + $userHandlerMock->expects(self::once()) ->method('loadRole') - ->with($this->equalTo(42)) - ->will($this->returnValue(new SPIRole(['id' => 42]))); + ->with(self::equalTo(42)) + ->will(self::returnValue(new SPIRole(['id' => 42]))); - $userServiceMock->expects($this->once()) + $userServiceMock->expects(self::once()) ->method('loadUserGroup') - ->with($this->equalTo(24)) - ->will($this->returnValue($userGroupMock)); + ->with(self::equalTo(24)) + ->will(self::returnValue($userGroupMock)); - $roleServiceMock->expects($this->once()) + $roleServiceMock->expects(self::once()) ->method('checkAssignmentAndFilterLimitationValues') - ->with(24, $this->isInstanceOf(SPIRole::class), null) - ->will($this->returnValue(null)); + ->with(24, self::isInstanceOf(SPIRole::class), null) + ->will(self::returnValue(null)); - $repository->expects($this->once())->method('beginTransaction'); + $repository->expects(self::once())->method('beginTransaction'); $userHandlerMock = $this->getPersistenceMockHandler('User\\Handler'); - $userHandlerMock->expects($this->once()) + $userHandlerMock->expects(self::once()) ->method('assignRole') ->with( - $this->equalTo(24), - $this->equalTo(42), - $this->equalTo(null) - )->will($this->throwException(new \Exception())); - $repository->expects($this->once())->method('rollback'); + self::equalTo(24), + self::equalTo(42), + self::equalTo(null) + )->will(self::throwException(new \Exception())); + $repository->expects(self::once())->method('rollback'); /* @var \Ibexa\Contracts\Core\Repository\Values\User\Role $roleMock */ /* @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup $userGroupMock */ @@ -895,10 +896,10 @@ public function testRemovePolicyByRoleDraftThrowsUnauthorizedException() $roleServiceMock = $this->getPartlyMockedRoleService(null, [], $roleDomainMapper); $policyDraftMock = $this->createMock(PolicyDraft::class); - $policyDraftMock->expects($this->any()) + $policyDraftMock->expects(self::any()) ->method('__get') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['roleId', 17], ] @@ -906,13 +907,13 @@ public function testRemovePolicyByRoleDraftThrowsUnauthorizedException() ); $permissionResolverMock = $this->getPermissionResolverMock(); - $permissionResolverMock->expects($this->once()) + $permissionResolverMock->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('role'), - $this->equalTo('update'), - $this->equalTo($roleDraftMock) - )->will($this->returnValue(false)); + self::equalTo('role'), + self::equalTo('update'), + self::equalTo($roleDraftMock) + )->will(self::returnValue(false)); /* @var \Ibexa\Contracts\Core\Repository\Values\User\Policy $policyMock */ $roleServiceMock->removePolicyByRoleDraft($roleDraftMock, $policyDraftMock); @@ -928,7 +929,7 @@ public function testRemovePolicyByRoleDraftWithRollback() $repository = $this->getRepositoryMock(); $roleDraftMock = $this->createMock(RoleDraft::class); - $roleDraftMock->expects($this->any()) + $roleDraftMock->expects(self::any()) ->method('__get') ->with('id') ->willReturn(17); @@ -940,10 +941,10 @@ public function testRemovePolicyByRoleDraftWithRollback() $roleServiceMock = $this->getPartlyMockedRoleService(null, [], $roleDomainMapper); $policyDraftMock = $this->createMock(PolicyDraft::class); - $policyDraftMock->expects($this->any()) + $policyDraftMock->expects(self::any()) ->method('__get') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['id', 42], ['roleId', 17], @@ -952,25 +953,25 @@ public function testRemovePolicyByRoleDraftWithRollback() ); $permissionResolverMock = $this->getPermissionResolverMock(); - $permissionResolverMock->expects($this->once()) + $permissionResolverMock->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('role'), - $this->equalTo('update'), - $this->equalTo($roleDraftMock) - )->will($this->returnValue(true)); + self::equalTo('role'), + self::equalTo('update'), + self::equalTo($roleDraftMock) + )->will(self::returnValue(true)); - $repository->expects($this->once())->method('beginTransaction'); + $repository->expects(self::once())->method('beginTransaction'); $userHandlerMock = $this->getPersistenceMockHandler('User\\Handler'); - $userHandlerMock->expects($this->once()) + $userHandlerMock->expects(self::once()) ->method('deletePolicy') ->with( - $this->equalTo(42) - )->will($this->throwException(new \Exception('Handler threw an exception'))); + self::equalTo(42) + )->will(self::throwException(new \Exception('Handler threw an exception'))); - $repository->expects($this->once())->method('rollback'); + $repository->expects(self::once())->method('rollback'); /* @var \Ibexa\Contracts\Core\Repository\Values\User\Policy $policyDraftMock */ $roleServiceMock->removePolicyByRoleDraft($roleDraftMock, $policyDraftMock); @@ -981,7 +982,7 @@ public function testRemovePolicyByRoleDraft() $repository = $this->getRepositoryMock(); $roleDraftMock = $this->createMock(RoleDraft::class); $roleDraftMock - ->expects($this->any()) + ->expects(self::any()) ->method('__get') ->with('id') ->willReturn(17); @@ -994,10 +995,10 @@ public function testRemovePolicyByRoleDraft() $roleServiceMock = $this->getPartlyMockedRoleService(['loadRoleDraft'], [], $roleDomainMapper); $policyDraftMock = $this->createMock(PolicyDraft::class); - $policyDraftMock->expects($this->any()) + $policyDraftMock->expects(self::any()) ->method('__get') ->will( - $this->returnValueMap( + self::returnValueMap( [ ['id', 42], ['roleId', 17], @@ -1006,30 +1007,30 @@ public function testRemovePolicyByRoleDraft() ); $permissionResolverMock = $this->getPermissionResolverMock(); - $permissionResolverMock->expects($this->once()) + $permissionResolverMock->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('role'), - $this->equalTo('update'), - $this->equalTo($roleDraftMock) - )->will($this->returnValue(true)); + self::equalTo('role'), + self::equalTo('update'), + self::equalTo($roleDraftMock) + )->will(self::returnValue(true)); - $repository->expects($this->once())->method('beginTransaction'); + $repository->expects(self::once())->method('beginTransaction'); $userHandlerMock = $this->getPersistenceMockHandler('User\\Handler'); - $userHandlerMock->expects($this->once()) + $userHandlerMock->expects(self::once()) ->method('deletePolicy') ->with( - $this->equalTo(42) + self::equalTo(42) ); - $roleServiceMock->expects($this->once()) + $roleServiceMock->expects(self::once()) ->method('loadRoleDraft') - ->with($this->equalTo(17)) - ->will($this->returnValue($roleDraftMock)); + ->with(self::equalTo(17)) + ->will(self::returnValue($roleDraftMock)); - $repository->expects($this->once())->method('commit'); + $repository->expects(self::once())->method('commit'); /* @var \Ibexa\Contracts\Core\Repository\Values\User\PolicyDraft $policyDraftMock */ $roleServiceMock->removePolicyByRoleDraft($roleDraftMock, $policyDraftMock); @@ -1089,7 +1090,7 @@ protected function getRepositoryMock(): Repository { $repositoryMock = parent::getRepositoryMock(); $repositoryMock - ->expects($this->any()) + ->expects(self::any()) ->method('getPermissionResolver') ->willReturn($this->getPermissionResolverMock()); diff --git a/tests/lib/Repository/Service/Mock/SearchTest.php b/tests/lib/Repository/Service/Mock/SearchTest.php index 848c431a57..fafb892224 100644 --- a/tests/lib/Repository/Service/Mock/SearchTest.php +++ b/tests/lib/Repository/Service/Mock/SearchTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Service\Mock; use Exception; @@ -115,11 +116,11 @@ public function testFindContentValidatesLocationCriteriaAndSortClauses($query, $ try { $service->findContent($query); } catch (InvalidArgumentException $e) { - $this->assertEquals($exceptionMessage, $e->getMessage()); + self::assertEquals($exceptionMessage, $e->getMessage()); throw $e; } - $this->fail('Expected exception was not thrown'); + self::fail('Expected exception was not thrown'); } public function providerForFindSingleValidatesLocationCriteria() @@ -163,11 +164,11 @@ public function testFindSingleValidatesLocationCriteria($criterion, $exceptionMe try { $service->findSingle($criterion); } catch (InvalidArgumentException $e) { - $this->assertEquals($exceptionMessage, $e->getMessage()); + self::assertEquals($exceptionMessage, $e->getMessage()); throw $e; } - $this->fail('Expected exception was not thrown'); + self::fail('Expected exception was not thrown'); } /** @@ -202,10 +203,10 @@ public function testFindContentThrowsHandlerException() ->getMock(); $query = new Query(['filter' => $criterionMock]); - $permissionsCriterionResolverMock->expects($this->once()) + $permissionsCriterionResolverMock->expects(self::once()) ->method('getPermissionsCriterion') ->with('content', 'read') - ->will($this->throwException(new Exception('Handler threw an exception'))); + ->will(self::throwException(new Exception('Handler threw an exception'))); $service->findContent($query, [], true); } @@ -218,9 +219,9 @@ public function testFindContentThrowsHandlerException() public function testFindContentWhenDomainMapperThrowsException() { $indexer = $this->createMock(BackgroundIndexer::class); - $indexer->expects($this->once()) + $indexer->expects(self::once()) ->method('registerContent') - ->with($this->isInstanceOf(SPIContentInfo::class)); + ->with(self::isInstanceOf(SPIContentInfo::class)); $service = $this->getMockBuilder(SearchService::class) ->setConstructorArgs([ @@ -234,14 +235,14 @@ public function testFindContentWhenDomainMapperThrowsException() $info = new SPIContentInfo(['id' => 33]); $result = new SearchResult(['searchHits' => [new SearchHit(['valueObject' => $info])], 'totalCount' => 2]); - $service->expects($this->once()) + $service->expects(self::once()) ->method('internalFindContentInfo') - ->with($this->isInstanceOf(Query::class)) + ->with(self::isInstanceOf(Query::class)) ->willReturn($result); - $mapper->expects($this->once()) + $mapper->expects(self::once()) ->method('buildContentDomainObjectsOnSearchResult') - ->with($this->equalTo($result), $this->equalTo([])) + ->with(self::equalTo($result), self::equalTo([])) ->willReturnCallback(static function (SearchResult $spiResult) use ($info) { unset($spiResult->searchHits[0]); --$spiResult->totalCount; @@ -251,8 +252,8 @@ public function testFindContentWhenDomainMapperThrowsException() $finalResult = $service->findContent(new Query()); - $this->assertEmpty($finalResult->searchHits, 'Expected search hits to be empty'); - $this->assertEquals(1, $finalResult->totalCount, 'Expected total count to be 1'); + self::assertEmpty($finalResult->searchHits, 'Expected search hits to be empty'); + self::assertEquals(1, $finalResult->totalCount, 'Expected total count to be 1'); } /** @@ -275,7 +276,7 @@ public function testFindContentNoPermissionsFilter() [] ); - $repositoryMock->expects($this->never())->method('getPermissionResolver'); + $repositoryMock->expects(self::never())->method('getPermissionResolver'); $serviceQuery = new Query(); $handlerQuery = new Query(['filter' => new Criterion\MatchAll(), 'limit' => 25]); @@ -284,11 +285,11 @@ public function testFindContentNoPermissionsFilter() $contentMock = $this->getMockForAbstractClass(Content::class); /* @var \PHPUnit\Framework\MockObject\MockObject $searchHandlerMock */ - $searchHandlerMock->expects($this->once()) + $searchHandlerMock->expects(self::once()) ->method('findContent') - ->with($this->equalTo($handlerQuery), $this->equalTo($languageFilter)) + ->with(self::equalTo($handlerQuery), self::equalTo($languageFilter)) ->will( - $this->returnValue( + self::returnValue( new SearchResult( [ 'searchHits' => [new SearchHit(['valueObject' => $spiContentInfo])], @@ -298,9 +299,9 @@ public function testFindContentNoPermissionsFilter() ) ); - $mapper->expects($this->once()) + $mapper->expects(self::once()) ->method('buildContentDomainObjectsOnSearchResult') - ->with($this->isInstanceOf(SearchResult::class), $this->equalTo([])) + ->with(self::isInstanceOf(SearchResult::class), self::equalTo([])) ->willReturnCallback(static function (SearchResult $spiResult) use ($contentMock) { $spiResult->searchHits[0]->valueObject = $contentMock; @@ -309,7 +310,7 @@ public function testFindContentNoPermissionsFilter() $result = $service->findContent($serviceQuery, $languageFilter, false); - $this->assertEquals( + self::assertEquals( new SearchResult( [ 'searchHits' => [new SearchHit(['valueObject' => $contentMock])], @@ -350,17 +351,17 @@ public function testFindContentWithPermission() $spiContentInfo = new SPIContentInfo(); $contentMock = $this->getMockForAbstractClass(Content::class); - $permissionsCriterionResolverMock->expects($this->once()) + $permissionsCriterionResolverMock->expects(self::once()) ->method('getPermissionsCriterion') ->with('content', 'read') - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); /* @var \PHPUnit\Framework\MockObject\MockObject $searchHandlerMock */ - $searchHandlerMock->expects($this->once()) + $searchHandlerMock->expects(self::once()) ->method('findContent') - ->with($this->equalTo($query), $this->equalTo($languageFilter)) + ->with(self::equalTo($query), self::equalTo($languageFilter)) ->will( - $this->returnValue( + self::returnValue( new SearchResult( [ 'searchHits' => [new SearchHit(['valueObject' => $spiContentInfo])], @@ -371,9 +372,9 @@ public function testFindContentWithPermission() ); $domainMapperMock - ->expects($this->once()) + ->expects(self::once()) ->method('buildContentDomainObjectsOnSearchResult') - ->with($this->isInstanceOf(SearchResult::class), $this->equalTo([])) + ->with(self::isInstanceOf(SearchResult::class), self::equalTo([])) ->willReturnCallback(static function (SearchResult $spiResult) use ($contentMock) { $spiResult->searchHits[0]->valueObject = $contentMock; @@ -382,7 +383,7 @@ public function testFindContentWithPermission() $result = $service->findContent($query, $languageFilter, true); - $this->assertEquals( + self::assertEquals( new SearchResult( [ 'searchHits' => [new SearchHit(['valueObject' => $contentMock])], @@ -414,7 +415,7 @@ public function testFindContentWithNoPermission() ); /* @var \PHPUnit\Framework\MockObject\MockObject $searchHandlerMock */ - $searchHandlerMock->expects($this->never())->method('findContent'); + $searchHandlerMock->expects(self::never())->method('findContent'); $criterionMock = $this ->getMockBuilder(Criterion::class) @@ -422,19 +423,19 @@ public function testFindContentWithNoPermission() ->getMock(); $query = new Query(['filter' => $criterionMock]); - $permissionsCriterionResolverMock->expects($this->once()) + $permissionsCriterionResolverMock->expects(self::once()) ->method('getPermissionsCriterion') ->with('content', 'read') - ->will($this->returnValue(false)); + ->will(self::returnValue(false)); - $mapper->expects($this->once()) + $mapper->expects(self::once()) ->method('buildContentDomainObjectsOnSearchResult') - ->with($this->isInstanceOf(SearchResult::class), $this->equalTo([])) + ->with(self::isInstanceOf(SearchResult::class), self::equalTo([])) ->willReturn([]); $result = $service->findContent($query, [], true); - $this->assertEquals( + self::assertEquals( new SearchResult(['time' => 0, 'totalCount' => 0]), $result ); @@ -463,7 +464,7 @@ public function testFindContentWithDefaultQueryValues() /* @var \PHPUnit\Framework\MockObject\MockObject $searchHandlerMock */ $searchHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('findContent') ->with( new Query( @@ -475,7 +476,7 @@ public function testFindContentWithDefaultQueryValues() [] ) ->will( - $this->returnValue( + self::returnValue( new SearchResult( [ 'searchHits' => [new SearchHit(['valueObject' => $spiContentInfo])], @@ -486,9 +487,9 @@ public function testFindContentWithDefaultQueryValues() ); $domainMapperMock - ->expects($this->once()) + ->expects(self::once()) ->method('buildContentDomainObjectsOnSearchResult') - ->with($this->isInstanceOf(SearchResult::class), $this->equalTo([])) + ->with(self::isInstanceOf(SearchResult::class), self::equalTo([])) ->willReturnCallback(static function (SearchResult $spiResult) use ($contentMock) { $spiResult->searchHits[0]->valueObject = $contentMock; @@ -497,7 +498,7 @@ public function testFindContentWithDefaultQueryValues() $result = $service->findContent(new Query(), $languageFilter, false); - $this->assertEquals( + self::assertEquals( new SearchResult( [ 'searchHits' => [new SearchHit(['valueObject' => $contentMock])], @@ -536,7 +537,7 @@ public function testFindSingleThrowsNotFoundException() ->disableOriginalConstructor() ->getMock(); - $permissionsCriterionResolverMock->expects($this->once()) + $permissionsCriterionResolverMock->expects(self::once()) ->method('getPermissionsCriterion') ->with('content', 'read') ->willReturn(false); @@ -574,10 +575,10 @@ public function testFindSingleThrowsHandlerException() ->disableOriginalConstructor() ->getMock(); - $permissionsCriterionResolverMock->expects($this->once()) + $permissionsCriterionResolverMock->expects(self::once()) ->method('getPermissionsCriterion') ->with('content', 'read') - ->will($this->throwException(new Exception('Handler threw an exception'))); + ->will(self::throwException(new Exception('Handler threw an exception'))); $service->findSingle($criterionMock, [], true); } @@ -605,10 +606,10 @@ public function testFindSingle() ); $repositoryMock - ->expects($this->once()) + ->expects(self::once()) ->method('getContentService') ->will( - $this->returnValue( + self::returnValue( $contentServiceMock = $this ->getMockBuilder(ContentService::class) ->disableOriginalConstructor() @@ -622,10 +623,10 @@ public function testFindSingle() ->disableOriginalConstructor() ->getMock(); - $permissionsCriterionResolverMock->expects($this->once()) + $permissionsCriterionResolverMock->expects(self::once()) ->method('getPermissionsCriterion') ->with('content', 'read') - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); $languageFilter = []; $spiContentInfo = new SPIContentInfo(['id' => 123]); @@ -633,22 +634,22 @@ public function testFindSingle() /* @var \PHPUnit\Framework\MockObject\MockObject $searchHandlerMock */ $searchHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('findSingle') - ->with($this->equalTo($criterionMock), $this->equalTo($languageFilter)) - ->will($this->returnValue($spiContentInfo)); + ->with(self::equalTo($criterionMock), self::equalTo($languageFilter)) + ->will(self::returnValue($spiContentInfo)); - $domainMapperMock->expects($this->never()) - ->method($this->anything()); + $domainMapperMock->expects(self::never()) + ->method(self::anything()); $contentServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method('internalLoadContentById') - ->will($this->returnValue($contentMock)); + ->will(self::returnValue($contentMock)); $result = $service->findSingle($criterionMock, $languageFilter, true); - $this->assertEquals($contentMock, $result); + self::assertEquals($contentMock, $result); } /** @@ -679,11 +680,11 @@ public function testFindLocationsWithPermission() $locationMock = $this->getMockForAbstractClass(Location::class); /* @var \PHPUnit\Framework\MockObject\MockObject $searchHandlerMock */ - $searchHandlerMock->expects($this->once()) + $searchHandlerMock->expects(self::once()) ->method('findLocations') - ->with($this->equalTo($query)) + ->with(self::equalTo($query)) ->will( - $this->returnValue( + self::returnValue( $spiResult = new SearchResult( [ 'searchHits' => [new SearchHit(['valueObject' => $spiLocation])], @@ -693,10 +694,10 @@ public function testFindLocationsWithPermission() ) ); - $permissionsCriterionResolverMock->expects($this->once()) + $permissionsCriterionResolverMock->expects(self::once()) ->method('getPermissionsCriterion') ->with('content', 'read') - ->will($this->returnValue(true)); + ->will(self::returnValue(true)); $endResult = new SearchResult( [ @@ -705,9 +706,9 @@ public function testFindLocationsWithPermission() ] ); - $domainMapperMock->expects($this->once()) + $domainMapperMock->expects(self::once()) ->method('buildLocationDomainObjectsOnSearchResult') - ->with($this->equalTo($spiResult)) + ->with(self::equalTo($spiResult)) ->willReturnCallback(static function (SearchResult $spiResult) use ($endResult) { $spiResult->searchHits[0] = $endResult->searchHits[0]; @@ -716,7 +717,7 @@ public function testFindLocationsWithPermission() $result = $service->findLocations($query, [], true); - $this->assertEquals( + self::assertEquals( $endResult, $result ); @@ -741,7 +742,7 @@ public function testFindLocationsWithNoPermissionsFilter() [] ); - $repositoryMock->expects($this->never())->method('getPermissionResolver'); + $repositoryMock->expects(self::never())->method('getPermissionResolver'); $serviceQuery = new LocationQuery(); $handlerQuery = new LocationQuery(['filter' => new Criterion\MatchAll(), 'limit' => 25]); @@ -749,11 +750,11 @@ public function testFindLocationsWithNoPermissionsFilter() $locationMock = $this->getMockForAbstractClass(Location::class); /* @var \PHPUnit\Framework\MockObject\MockObject $searchHandlerMock */ - $searchHandlerMock->expects($this->once()) + $searchHandlerMock->expects(self::once()) ->method('findLocations') - ->with($this->equalTo($handlerQuery)) + ->with(self::equalTo($handlerQuery)) ->will( - $this->returnValue( + self::returnValue( $spiResult = new SearchResult( [ 'searchHits' => [new SearchHit(['valueObject' => $spiLocation])], @@ -763,7 +764,7 @@ public function testFindLocationsWithNoPermissionsFilter() ) ); - $permissionsCriterionResolverMock->expects($this->never())->method($this->anything()); + $permissionsCriterionResolverMock->expects(self::never())->method(self::anything()); $endResult = new SearchResult( [ @@ -772,9 +773,9 @@ public function testFindLocationsWithNoPermissionsFilter() ] ); - $domainMapperMock->expects($this->once()) + $domainMapperMock->expects(self::once()) ->method('buildLocationDomainObjectsOnSearchResult') - ->with($this->equalTo($spiResult)) + ->with(self::equalTo($spiResult)) ->willReturnCallback(static function (SearchResult $spiResult) use ($endResult) { $spiResult->searchHits[0] = $endResult->searchHits[0]; @@ -783,7 +784,7 @@ public function testFindLocationsWithNoPermissionsFilter() $result = $service->findLocations($serviceQuery, [], false); - $this->assertEquals( + self::assertEquals( $endResult, $result ); @@ -797,9 +798,9 @@ public function testFindLocationsWithNoPermissionsFilter() public function testFindLocationsBackgroundIndexerWhenDomainMapperThrowsException() { $indexer = $this->createMock(BackgroundIndexer::class); - $indexer->expects($this->once()) + $indexer->expects(self::once()) ->method('registerLocation') - ->with($this->isInstanceOf(SPILocation::class)); + ->with(self::isInstanceOf(SPILocation::class)); $service = $this->getMockBuilder(SearchService::class) ->setConstructorArgs([ @@ -812,20 +813,20 @@ public function testFindLocationsBackgroundIndexerWhenDomainMapperThrowsExceptio ->getMock(); $location = new SPILocation(['id' => 44]); - $service->expects($this->once()) + $service->expects(self::once()) ->method('addPermissionsCriterion') - ->with($this->isInstanceOf(Criterion::class)) + ->with(self::isInstanceOf(Criterion::class)) ->willReturn(true); $result = new SearchResult(['searchHits' => [new SearchHit(['valueObject' => $location])], 'totalCount' => 2]); - $searchHandler->expects($this->once()) + $searchHandler->expects(self::once()) ->method('findLocations') - ->with($this->isInstanceOf(LocationQuery::class), $this->isType('array')) + ->with(self::isInstanceOf(LocationQuery::class), self::isType('array')) ->willReturn($result); - $mapper->expects($this->once()) + $mapper->expects(self::once()) ->method('buildLocationDomainObjectsOnSearchResult') - ->with($this->equalTo($result)) + ->with(self::equalTo($result)) ->willReturnCallback(static function (SearchResult $spiResult) use ($location) { unset($spiResult->searchHits[0]); --$spiResult->totalCount; @@ -835,8 +836,8 @@ public function testFindLocationsBackgroundIndexerWhenDomainMapperThrowsExceptio $finalResult = $service->findLocations(new LocationQuery()); - $this->assertEmpty($finalResult->searchHits, 'Expected search hits to be empty'); - $this->assertEquals(1, $finalResult->totalCount, 'Expected total count to be 1'); + self::assertEmpty($finalResult->searchHits, 'Expected search hits to be empty'); + self::assertEquals(1, $finalResult->totalCount, 'Expected total count to be 1'); } /** @@ -868,10 +869,10 @@ public function testFindLocationsThrowsHandlerException() ->getMock(); $query = new LocationQuery(['filter' => $criterionMock]); - $permissionsCriterionResolverMock->expects($this->once()) + $permissionsCriterionResolverMock->expects(self::once()) ->method('getPermissionsCriterion') ->with('content', 'read') - ->will($this->throwException(new Exception('Handler threw an exception'))); + ->will(self::throwException(new Exception('Handler threw an exception'))); $service->findLocations($query, [], true); } @@ -899,7 +900,7 @@ public function testFindLocationsWithDefaultQueryValues() /* @var \PHPUnit\Framework\MockObject\MockObject $searchHandlerMock */ $searchHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('findLocations') ->with( new LocationQuery( @@ -910,7 +911,7 @@ public function testFindLocationsWithDefaultQueryValues() ) ) ->will( - $this->returnValue( + self::returnValue( $spiResult = new SearchResult( [ 'searchHits' => [new SearchHit(['valueObject' => $spiLocation])], @@ -927,9 +928,9 @@ public function testFindLocationsWithDefaultQueryValues() ] ); - $domainMapperMock->expects($this->once()) + $domainMapperMock->expects(self::once()) ->method('buildLocationDomainObjectsOnSearchResult') - ->with($this->equalTo($spiResult)) + ->with(self::equalTo($spiResult)) ->willReturnCallback(static function (SearchResult $spiResult) use ($endResult) { $spiResult->searchHits[0] = $endResult->searchHits[0]; @@ -938,7 +939,7 @@ public function testFindLocationsWithDefaultQueryValues() $result = $service->findLocations(new LocationQuery(), [], false); - $this->assertEquals( + self::assertEquals( $endResult, $result ); diff --git a/tests/lib/Repository/Service/Mock/UrlAliasTest.php b/tests/lib/Repository/Service/Mock/UrlAliasTest.php index c077982d38..96e419ca44 100644 --- a/tests/lib/Repository/Service/Mock/UrlAliasTest.php +++ b/tests/lib/Repository/Service/Mock/UrlAliasTest.php @@ -73,15 +73,15 @@ public function testLoad() $urlAliasHandlerMock = $this->getPersistenceMock()->urlAliasHandler(); $urlAliasHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadUrlAlias') ->with(self::EXAMPLE_ID) ->willReturn(new SPIUrlAlias()); $mockedService - ->expects($this->once()) + ->expects(self::once()) ->method('extractPath') - ->with($this->isInstanceOf(SPIUrlAlias::class), null) + ->with(self::isInstanceOf(SPIUrlAlias::class), null) ->willReturn('path'); $urlAlias = $mockedService->load(self::EXAMPLE_ID); @@ -99,10 +99,10 @@ public function testLoadThrowsNotFoundException() $urlAliasHandlerMock = $this->getPersistenceMock()->urlAliasHandler(); $urlAliasHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('loadUrlAlias') ->with(self::EXAMPLE_ID) - ->will($this->throwException(new NotFoundException('UrlAlias', self::EXAMPLE_ID))); + ->will(self::throwException(new NotFoundException('UrlAlias', self::EXAMPLE_ID))); $this->expectException(ApiNotFoundException::class); $mockedService->load(self::EXAMPLE_ID); @@ -154,7 +154,7 @@ public function testLoadThrowsNotFoundExceptionPath() ); $this->urlAliasHandler - ->expects($this->once()) + ->expects(self::once()) ->method('loadUrlAlias') ->with(self::EXAMPLE_ID) ->willReturn($spiUrlAlias); @@ -172,10 +172,10 @@ public function testRemoveAliasesThrowsInvalidArgumentException() $aliasList = [new URLAlias(['isCustom' => false])]; $mockedService = $this->getPartlyMockedURLAliasServiceService(); $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('hasAccess')->with( - $this->equalTo('content'), - $this->equalTo('urltranslator') + self::equalTo('content'), + self::equalTo('urltranslator') ) ->willReturn(true); @@ -192,10 +192,10 @@ public function testRemoveAliases() $aliasList = [new URLAlias(['isCustom' => true])]; $spiAliasList = [new SPIUrlAlias(['isCustom' => true])]; $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('hasAccess')->with( - $this->equalTo('content'), - $this->equalTo('urltranslator') + self::equalTo('content'), + self::equalTo('urltranslator') )->willReturn(true); $repositoryMock = $this->getRepositoryMock(); @@ -205,14 +205,14 @@ public function testRemoveAliases() $urlAliasHandlerMock = $this->getPersistenceMock()->urlAliasHandler(); $repositoryMock - ->expects($this->once()) + ->expects(self::once()) ->method('beginTransaction'); $repositoryMock - ->expects($this->once()) + ->expects(self::once()) ->method('commit'); $urlAliasHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('removeURLAliases') ->with($spiAliasList); @@ -227,10 +227,10 @@ public function testRemoveAliasesWithRollback() $aliasList = [new URLAlias(['isCustom' => true])]; $spiAliasList = [new SPIUrlAlias(['isCustom' => true])]; $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('hasAccess')->with( - $this->equalTo('content'), - $this->equalTo('urltranslator') + self::equalTo('content'), + self::equalTo('urltranslator') )->willReturn(true); $repositoryMock = $this->getRepositoryMock(); @@ -240,17 +240,17 @@ public function testRemoveAliasesWithRollback() $urlAliasHandlerMock = $this->getPersistenceMock()->urlAliasHandler(); $repositoryMock - ->expects($this->once()) + ->expects(self::once()) ->method('beginTransaction'); $repositoryMock - ->expects($this->once()) + ->expects(self::once()) ->method('rollback'); $urlAliasHandlerMock - ->expects($this->once()) + ->expects(self::once()) ->method('removeURLAliases') ->with($spiAliasList) - ->will($this->throwException(new Exception('Handler threw an exception'))); + ->will(self::throwException(new Exception('Handler threw an exception'))); $this->expectException(Exception::class); $this->expectExceptionMessage('Handler threw an exception'); @@ -744,11 +744,11 @@ public function testListLocationAliasesWithShowAllTranslations() ); $this->urlAliasHandler - ->expects($this->once()) + ->expects(self::once()) ->method('listURLAliasesForLocation') ->with( - $this->equalTo(42), - $this->equalTo(false) + self::equalTo(42), + self::equalTo(false) ) ->willReturn([$spiUrlAlias]); @@ -800,11 +800,11 @@ public function testListLocationAliasesWithShowAllTranslationsCustomConfiguratio ); $this->urlAliasHandler - ->expects($this->once()) + ->expects(self::once()) ->method('listURLAliasesForLocation') ->with( - $this->equalTo(42), - $this->equalTo(false) + self::equalTo(42), + self::equalTo(false) ) ->willReturn([$spiUrlAlias]); @@ -2391,13 +2391,13 @@ public function testListGlobalAliases() ); $this->urlAliasHandler->expects( - $this->once() + self::once() )->method( 'listGlobalURLAliases' )->with( - $this->equalTo(null), - $this->equalTo(0), - $this->equalTo(-1) + self::equalTo(null), + self::equalTo(0), + self::equalTo(-1) )->willReturn( [ new SPIUrlAlias( @@ -2431,13 +2431,13 @@ public function testListGlobalAliasesEmpty() $urlAliasService = $this->getPartlyMockedURLAliasServiceService(); $this->urlAliasHandler->expects( - $this->once() + self::once() )->method( 'listGlobalURLAliases' )->with( - $this->equalTo(null), - $this->equalTo(0), - $this->equalTo(-1) + self::equalTo(null), + self::equalTo(0), + self::equalTo(-1) )->willReturn( [ new SPIUrlAlias( @@ -2470,13 +2470,13 @@ public function testListGlobalAliasesWithParameters() $urlAliasService = $this->getPartlyMockedURLAliasServiceService(); $this->urlAliasHandler->expects( - $this->once() + self::once() )->method( 'listGlobalURLAliases' )->with( - $this->equalTo(self::EXAMPLE_LANGUAGE_CODE), - $this->equalTo(self::EXAMPLE_OFFSET), - $this->equalTo(self::EXAMPLE_LIMIT) + self::equalTo(self::EXAMPLE_LANGUAGE_CODE), + self::equalTo(self::EXAMPLE_OFFSET), + self::equalTo(self::EXAMPLE_LIMIT) )->willReturn( [] ); @@ -2500,13 +2500,13 @@ public function testLookupThrowsNotFoundException() $urlAliasService = $this->getPartlyMockedURLAliasServiceService(); $this->urlAliasHandler->expects( - $this->once() + self::once() )->method( 'lookup' )->with( - $this->equalTo('url') + self::equalTo('url') )->will( - $this->throwException(new NotFoundException('UrlAlias', 'url')) + self::throwException(new NotFoundException('UrlAlias', 'url')) ); $urlAliasService->lookup('url'); @@ -2541,11 +2541,11 @@ public function testLookupThrowsNotFoundExceptionPathNotMatchedOrNotLoadable($ur ); $this->urlAliasHandler->expects( - $this->once() + self::once() )->method( 'lookup' )->with( - $this->equalTo($url) + self::equalTo($url) )->willReturn( new SPIUrlAlias( [ @@ -2597,11 +2597,11 @@ public function testLookup($prioritizedLanguageList, $showAllTranslations, $alwa ); $this->urlAliasHandler->expects( - $this->once() + self::once() )->method( 'lookup' )->with( - $this->equalTo('jedan/dva') + self::equalTo('jedan/dva') )->willReturn( new SPIUrlAlias( [ @@ -2671,11 +2671,11 @@ public function testLookupWithSharedTranslation( ); $this->urlAliasHandler->expects( - $this->once() + self::once() )->method( 'lookup' )->with( - $this->equalTo('jedan/two') + self::equalTo('jedan/two') )->willReturn( new SPIUrlAlias( [ @@ -2716,15 +2716,15 @@ public function testReverseLookupCustomConfiguration() $mockedService = $this->getPartlyMockedURLAliasServiceService(['listLocationAliases']); $location = $this->getLocationStub(); $mockedService->expects( - $this->once() + self::once() )->method( 'listLocationAliases' )->with( - $this->equalTo($location), - $this->equalTo(false), - $this->equalTo(null), - $this->equalTo($showAllTranslations = true), - $this->equalTo($prioritizedLanguageList = ['LANGUAGES!']) + self::equalTo($location), + self::equalTo(false), + self::equalTo(null), + self::equalTo($showAllTranslations = true), + self::equalTo($prioritizedLanguageList = ['LANGUAGES!']) )->willReturn( [] ); @@ -2748,13 +2748,13 @@ public function testReverseLookupThrowsNotFoundException() $location = $this->getLocationStub(); $urlAliasService->expects( - $this->once() + self::once() )->method( 'listLocationAliases' )->with( - $this->equalTo($location), - $this->equalTo(false), - $this->equalTo($languageCode) + self::equalTo($location), + self::equalTo(false), + self::equalTo($languageCode) )->willReturn( [ new UrlAlias( @@ -2856,11 +2856,11 @@ public function testCreateUrlAlias() { $location = $this->getLocationStub(); $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('canUser')->with( - $this->equalTo('content'), - $this->equalTo('urltranslator'), - $this->equalTo($location) + self::equalTo('content'), + self::equalTo('urltranslator'), + self::equalTo($location) ) ->willReturn(true); @@ -2871,22 +2871,22 @@ public function testCreateUrlAlias() $urlAliasHandlerMock = $this->getPersistenceMock()->urlAliasHandler(); $repositoryMock - ->expects($this->once()) + ->expects(self::once()) ->method('beginTransaction'); $repositoryMock - ->expects($this->once()) + ->expects(self::once()) ->method('commit'); $urlAliasHandlerMock->expects( - $this->once() + self::once() )->method( 'createCustomUrlAlias' )->with( - $this->equalTo($location->id), - $this->equalTo(self::EXAMPLE_PATH), - $this->equalTo(true), - $this->equalTo(self::EXAMPLE_LANGUAGE_CODE), - $this->equalTo(true) + self::equalTo($location->id), + self::equalTo(self::EXAMPLE_PATH), + self::equalTo(true), + self::equalTo(self::EXAMPLE_LANGUAGE_CODE), + self::equalTo(true) )->willReturn( new SPIUrlAlias() ); @@ -2913,12 +2913,12 @@ public function testCreateUrlAliasWithRollback() $location = $this->getLocationStub(); $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('content'), - $this->equalTo('urltranslator'), - $this->equalTo($location) + self::equalTo('content'), + self::equalTo('urltranslator'), + self::equalTo($location) ) ->willReturn(true); @@ -2929,24 +2929,24 @@ public function testCreateUrlAliasWithRollback() $urlAliasHandlerMock = $this->getPersistenceMock()->urlAliasHandler(); $repositoryMock - ->expects($this->once()) + ->expects(self::once()) ->method('beginTransaction'); $repositoryMock - ->expects($this->once()) + ->expects(self::once()) ->method('rollback'); $urlAliasHandlerMock->expects( - $this->once() + self::once() )->method( 'createCustomUrlAlias' )->with( - $this->equalTo($location->id), - $this->equalTo(self::EXAMPLE_PATH), - $this->equalTo(true), - $this->equalTo(self::EXAMPLE_LANGUAGE_CODE), - $this->equalTo(true) + self::equalTo($location->id), + self::equalTo(self::EXAMPLE_PATH), + self::equalTo(true), + self::equalTo(self::EXAMPLE_LANGUAGE_CODE), + self::equalTo(true) )->will( - $this->throwException(new Exception('Handler threw an exception')) + self::throwException(new Exception('Handler threw an exception')) ); $mockedService->createUrlAlias( @@ -2972,27 +2972,27 @@ public function testCreateUrlAliasThrowsInvalidArgumentException() $handlerMock = $this->getPersistenceMock()->urlAliasHandler(); $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('content'), - $this->equalTo('urltranslator'), - $this->equalTo($location) + self::equalTo('content'), + self::equalTo('urltranslator'), + self::equalTo($location) ) ->willReturn(true); $handlerMock->expects( - $this->once() + self::once() )->method( 'createCustomUrlAlias' )->with( - $this->equalTo($location->id), - $this->equalTo(self::EXAMPLE_PATH), - $this->equalTo(true), - $this->equalTo(self::EXAMPLE_LANGUAGE_CODE), - $this->equalTo(true) + self::equalTo($location->id), + self::equalTo(self::EXAMPLE_PATH), + self::equalTo(true), + self::equalTo(self::EXAMPLE_LANGUAGE_CODE), + self::equalTo(true) )->will( - $this->throwException(new ForbiddenException('Forbidden!')) + self::throwException(new ForbiddenException('Forbidden!')) ); $mockedService->createUrlAlias( @@ -3012,11 +3012,11 @@ public function testCreateGlobalUrlAlias() $resource = 'module:content/search'; $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('hasAccess') ->with( - $this->equalTo('content'), - $this->equalTo('urltranslator') + self::equalTo('content'), + self::equalTo('urltranslator') ) ->willReturn(true); @@ -3027,22 +3027,22 @@ public function testCreateGlobalUrlAlias() $urlAliasHandlerMock = $this->getPersistenceMock()->urlAliasHandler(); $repositoryMock - ->expects($this->once()) + ->expects(self::once()) ->method('beginTransaction'); $repositoryMock - ->expects($this->once()) + ->expects(self::once()) ->method('commit'); $urlAliasHandlerMock->expects( - $this->once() + self::once() )->method( 'createGlobalUrlAlias' )->with( - $this->equalTo($resource), - $this->equalTo(self::EXAMPLE_PATH), - $this->equalTo(true), - $this->equalTo(self::EXAMPLE_LANGUAGE_CODE), - $this->equalTo(true) + self::equalTo($resource), + self::equalTo(self::EXAMPLE_PATH), + self::equalTo(true), + self::equalTo(self::EXAMPLE_LANGUAGE_CODE), + self::equalTo(true) )->willReturn( new SPIUrlAlias() ); @@ -3069,11 +3069,11 @@ public function testCreateGlobalUrlAliasWithRollback() $resource = 'module:content/search'; $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('hasAccess') ->with( - $this->equalTo('content'), - $this->equalTo('urltranslator') + self::equalTo('content'), + self::equalTo('urltranslator') ) ->willReturn(true); @@ -3084,24 +3084,24 @@ public function testCreateGlobalUrlAliasWithRollback() $urlAliasHandlerMock = $this->getPersistenceMock()->urlAliasHandler(); $repositoryMock - ->expects($this->once()) + ->expects(self::once()) ->method('beginTransaction'); $repositoryMock - ->expects($this->once()) + ->expects(self::once()) ->method('rollback'); $urlAliasHandlerMock->expects( - $this->once() + self::once() )->method( 'createGlobalUrlAlias' )->with( - $this->equalTo($resource), - $this->equalTo(self::EXAMPLE_PATH), - $this->equalTo(true), - $this->equalTo(self::EXAMPLE_LANGUAGE_CODE), - $this->equalTo(true) + self::equalTo($resource), + self::equalTo(self::EXAMPLE_PATH), + self::equalTo(true), + self::equalTo(self::EXAMPLE_LANGUAGE_CODE), + self::equalTo(true) )->will( - $this->throwException(new Exception('Handler threw an exception')) + self::throwException(new Exception('Handler threw an exception')) ); $mockedService->createGlobalUrlAlias( @@ -3122,10 +3122,10 @@ public function testCreateGlobalUrlAliasThrowsInvalidArgumentExceptionResource() $mockedService = $this->getPartlyMockedURLAliasServiceService(); $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('hasAccess')->with( - $this->equalTo('content'), - $this->equalTo('urltranslator') + self::equalTo('content'), + self::equalTo('urltranslator') ) ->willReturn(true); @@ -3149,26 +3149,26 @@ public function testCreateGlobalUrlAliasThrowsInvalidArgumentExceptionPath() $mockedService = $this->getPartlyMockedURLAliasServiceService(); $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('hasAccess') ->with( - $this->equalTo('content'), - $this->equalTo('urltranslator') + self::equalTo('content'), + self::equalTo('urltranslator') ) ->willReturn(true); $this->urlAliasHandler->expects( - $this->once() + self::once() )->method( 'createGlobalUrlAlias' )->with( - $this->equalTo($resource), - $this->equalTo(self::EXAMPLE_PATH), - $this->equalTo(true), - $this->equalTo(self::EXAMPLE_LANGUAGE_CODE), - $this->equalTo(true) + self::equalTo($resource), + self::equalTo(self::EXAMPLE_PATH), + self::equalTo(true), + self::equalTo(self::EXAMPLE_LANGUAGE_CODE), + self::equalTo(true) )->will( - $this->throwException(new ForbiddenException('Forbidden!')) + self::throwException(new ForbiddenException('Forbidden!')) ); $mockedService->createGlobalUrlAlias( @@ -3195,17 +3195,17 @@ public function testCreateGlobalUrlAliasForLocation() $locationServiceMock = $this->createMock(LocationService::class); $locationServiceMock->expects( - $this->exactly(2) + self::exactly(2) )->method( 'loadLocation' )->with( - $this->equalTo(42) + self::equalTo(42) )->willReturn( $location ); $repositoryMock->expects( - $this->exactly(2) + self::exactly(2) )->method( 'getLocationService' )->willReturn( @@ -3213,24 +3213,24 @@ public function testCreateGlobalUrlAliasForLocation() ); $this->permissionResolver - ->expects($this->exactly(2)) + ->expects(self::exactly(2)) ->method('canUser')->with( - $this->equalTo('content'), - $this->equalTo('urltranslator'), - $this->equalTo($location) + self::equalTo('content'), + self::equalTo('urltranslator'), + self::equalTo($location) ) ->willReturn(true); $mockedService->expects( - $this->exactly(2) + self::exactly(2) )->method( 'createUrlAlias' )->with( - $this->equalTo($location), - $this->equalTo(self::EXAMPLE_PATH), - $this->equalTo(self::EXAMPLE_LANGUAGE_CODE), - $this->equalTo(true), - $this->equalTo(true) + self::equalTo($location), + self::equalTo(self::EXAMPLE_PATH), + self::equalTo(self::EXAMPLE_LANGUAGE_CODE), + self::equalTo(true), + self::equalTo(true) ); $mockedService->createGlobalUrlAlias( @@ -3324,11 +3324,11 @@ public function testCreateUrlAliasThrowsUnauthorizedException() $mockedService = $this->getPartlyMockedURLAliasServiceService(); $location = $this->getLocationStub(); $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('canUser')->with( - $this->equalTo('content'), - $this->equalTo('urltranslator'), - $this->equalTo($location) + self::equalTo('content'), + self::equalTo('urltranslator'), + self::equalTo($location) ) ->willReturn(false); @@ -3351,10 +3351,10 @@ public function testCreateGlobalUrlAliasThrowsUnauthorizedException() $mockedService = $this->getPartlyMockedURLAliasServiceService(); $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('hasAccess')->with( - $this->equalTo('content'), - $this->equalTo('urltranslator') + self::equalTo('content'), + self::equalTo('urltranslator') ) ->willReturn(false); @@ -3379,10 +3379,10 @@ public function testRemoveAliasesThrowsUnauthorizedException() $aliasList = [new URLAlias(['isCustom' => true])]; $mockedService = $this->getPartlyMockedURLAliasServiceService(); $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('hasAccess')->with( - $this->equalTo('content'), - $this->equalTo('urltranslator') + self::equalTo('content'), + self::equalTo('urltranslator') ) ->willReturn(false); @@ -3403,11 +3403,11 @@ protected function getNameSchemaServiceMock() private function configureListURLAliasesForLocation(array $spiUrlAliases): void { $this->urlAliasHandler - ->expects($this->once()) + ->expects(self::once()) ->method('listURLAliasesForLocation') ->with( - $this->equalTo(42), - $this->equalTo(false) + self::equalTo(42), + self::equalTo(false) ) ->willReturn($spiUrlAliases); } diff --git a/tests/lib/Repository/Service/Mock/UrlTest.php b/tests/lib/Repository/Service/Mock/UrlTest.php index d43089ef67..b5b87cb364 100644 --- a/tests/lib/Repository/Service/Mock/UrlTest.php +++ b/tests/lib/Repository/Service/Mock/UrlTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Service\Mock; use DateTime; @@ -93,12 +94,12 @@ public function testFindUrls() ]); $this->urlHandler - ->expects($this->once()) + ->expects(self::once()) ->method('find') ->with($query) ->willReturn($results); - $this->assertEquals($expected, $this->createUrlService()->findUrls($query)); + self::assertEquals($expected, $this->createUrlService()->findUrls($query)); } public function testUpdateUrlUnauthorized() @@ -126,7 +127,7 @@ public function testUpdateUrlNonUnique() $urlService = $this->createUrlService(['isUnique']); $urlService - ->expects($this->once()) + ->expects(self::once()) ->method('isUnique') ->with($url->id, $struct->url) ->willReturn(false); @@ -151,13 +152,13 @@ public function testUpdateUrl() $urlService = $this->createUrlService(['isUnique']); $urlService - ->expects($this->once()) + ->expects(self::once()) ->method('isUnique') ->with($apiUrl->id, $apiStruct->url) ->willReturn(true); $this->urlHandler - ->expects($this->once()) + ->expects(self::once()) ->method('updateUrl') ->willReturnCallback(function ($id, $struct) use ($apiUrl, $apiStruct) { $this->assertEquals($apiUrl->id, $id); @@ -185,7 +186,7 @@ public function testUpdateUrl() ]) ); - $this->assertEquals(new URL([ + self::assertEquals(new URL([ 'id' => $apiUrl->id, 'url' => $apiStruct->url, 'isValid' => true, @@ -217,7 +218,7 @@ public function testUpdateUrlStatus() $urlService = $this->createUrlService(['isUnique']); $this->urlHandler - ->expects($this->once()) + ->expects(self::once()) ->method('updateUrl') ->willReturnCallback(function ($id, $struct) use ($apiUrl, $apiStruct) { $this->assertEquals($apiUrl->id, $id); @@ -245,7 +246,7 @@ public function testUpdateUrlStatus() ]) ); - $this->assertEquals(new URL([ + self::assertEquals(new URL([ 'id' => $apiUrl->id, 'url' => $apiUrl->url, 'isValid' => $apiStruct->isValid, @@ -265,7 +266,7 @@ public function testLoadByIdUnauthorized() ); $this->urlHandler - ->expects($this->once()) + ->expects(self::once()) ->method('loadById') ->with(self::URL_ID) ->willReturn(new SpiUrl([ @@ -284,14 +285,14 @@ public function testLoadById() $this->configureUrlViewPermission($url, true); $this->urlHandler - ->expects($this->once()) + ->expects(self::once()) ->method('loadById') ->with(self::URL_ID) ->willReturn(new SpiUrl([ 'id' => self::URL_ID, ])); - $this->assertEquals($url, $this->createUrlService()->loadById(self::URL_ID)); + self::assertEquals($url, $this->createUrlService()->loadById(self::URL_ID)); } public function testLoadByUrlUnauthorized() @@ -308,7 +309,7 @@ public function testLoadByUrlUnauthorized() ); $this->urlHandler - ->expects($this->once()) + ->expects(self::once()) ->method('loadByUrl') ->with($url) ->willReturn(new SpiUrl([ @@ -329,14 +330,14 @@ public function testLoadByUrl() $this->configureUrlViewPermission($apiUrl, true); $this->urlHandler - ->expects($this->once()) + ->expects(self::once()) ->method('loadByUrl') ->with($url) ->willReturn(new SpiUrl([ 'url' => $url, ])); - $this->assertEquals($apiUrl, $this->createUrlService()->loadByUrl($url)); + self::assertEquals($apiUrl, $this->createUrlService()->loadByUrl($url)); } /** @@ -349,7 +350,7 @@ public function testFindUsages($offset, $limit, ContentQuery $expectedQuery, arr if (!empty($usages)) { $searchService = $this->createMock(SearchService::class); $searchService - ->expects($this->once()) + ->expects(self::once()) ->method('findContentInfo') ->willReturnCallback(function ($query) use ($expectedQuery, $usages) { $this->assertEquals($expectedQuery, $query); @@ -367,23 +368,23 @@ public function testFindUsages($offset, $limit, ContentQuery $expectedQuery, arr }); $this->getRepositoryMock() - ->expects($this->once()) + ->expects(self::once()) ->method('getSearchService') ->willReturn($searchService); } $this->urlHandler - ->expects($this->once()) + ->expects(self::once()) ->method('findUsages') ->with($url->id) ->willReturn($usages); $usageSearchResult = $this->createUrlService()->findUsages($url, $offset, $limit); - $this->assertInstanceOf(UsageSearchResult::class, $usageSearchResult); - $this->assertEquals(count($usages), $usageSearchResult->totalCount); + self::assertInstanceOf(UsageSearchResult::class, $usageSearchResult); + self::assertEquals(count($usages), $usageSearchResult->totalCount); foreach ($usageSearchResult as $contentInfo) { - $this->assertContains($contentInfo->id, $usages); + self::assertContains($contentInfo->id, $usages); } } @@ -420,13 +421,13 @@ public function dateProviderForFindUsages() public function testCreateUpdateStruct() { - $this->assertEquals(new URLUpdateStruct(), $this->createUrlService()->createUpdateStruct()); + self::assertEquals(new URLUpdateStruct(), $this->createUrlService()->createUpdateStruct()); } protected function configureUrlViewPermissionForHasAccess($hasAccess = false) { $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('hasAccess') ->with('url', 'view') ->willReturn($hasAccess); @@ -435,33 +436,33 @@ protected function configureUrlViewPermissionForHasAccess($hasAccess = false) protected function configureUrlViewPermission($object, $hasAccess = false) { $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('url'), - $this->equalTo('view'), - $this->equalTo($object) + self::equalTo('url'), + self::equalTo('view'), + self::equalTo($object) ) - ->will($this->returnValue($hasAccess)); + ->will(self::returnValue($hasAccess)); } protected function configureUrlUpdatePermission($object, $hasAccess = false) { $this->permissionResolver - ->expects($this->once()) + ->expects(self::once()) ->method('canUser') ->with( - $this->equalTo('url'), - $this->equalTo('update'), - $this->equalTo($object) + self::equalTo('url'), + self::equalTo('update'), + self::equalTo($object) ) - ->will($this->returnValue($hasAccess)); + ->will(self::returnValue($hasAccess)); } protected function configurePermissions(array $permissions) { $this->permissionResolver - ->expects($this->exactly(count($permissions))) + ->expects(self::exactly(count($permissions))) ->method('canUser') ->withConsecutive(...$permissions) ->willReturn(true); diff --git a/tests/lib/Repository/Service/Mock/UrlWildcardTest.php b/tests/lib/Repository/Service/Mock/UrlWildcardTest.php index 48f75f9f0b..ef46806168 100644 --- a/tests/lib/Repository/Service/Mock/UrlWildcardTest.php +++ b/tests/lib/Repository/Service/Mock/UrlWildcardTest.php @@ -52,14 +52,14 @@ public function testCreateThrowsUnauthorizedException() $mockedService = $this->getPartlyMockedURLWildcardService(); $this->permissionResolver->expects( - $this->once() + self::once() )->method( 'hasAccess' )->with( - $this->equalTo('content'), - $this->equalTo('urltranslator') + self::equalTo('content'), + self::equalTo('urltranslator') )->will( - $this->returnValue(false) + self::returnValue(false) ); $this->expectException(UnauthorizedException::class); @@ -79,18 +79,18 @@ public function testCreateThrowsInvalidArgumentException() $mockedService = $this->getPartlyMockedURLWildcardService(); $this->permissionResolver->expects( - $this->once() + self::once() )->method( 'hasAccess' )->with( - $this->equalTo('content'), - $this->equalTo('urltranslator') + self::equalTo('content'), + self::equalTo('urltranslator') )->will( - $this->returnValue(true) + self::returnValue(true) ); $this->urlWildcardHandler->expects( - $this->once() + self::once() )->method( 'exactSourceUrlExists' )->willReturn(true); @@ -113,6 +113,7 @@ public function providerForTestCreateThrowsContentValidationException() * Test for the create() method. * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::create + * * @dataProvider providerForTestCreateThrowsContentValidationException */ public function testCreateThrowsContentValidationException($sourceUrl, $destinationUrl, $forward) @@ -122,18 +123,18 @@ public function testCreateThrowsContentValidationException($sourceUrl, $destinat $mockedService = $this->getPartlyMockedURLWildcardService(); $this->permissionResolver->expects( - $this->once() + self::once() )->method( 'hasAccess' )->with( - $this->equalTo('content'), - $this->equalTo('urltranslator') + self::equalTo('content'), + self::equalTo('urltranslator') )->will( - $this->returnValue(true) + self::returnValue(true) ); $this->urlWildcardHandler->expects( - $this->once() + self::once() )->method( 'exactSourceUrlExists' )->willReturn(false); @@ -160,6 +161,7 @@ public function providerForTestCreate() * Test for the create() method. * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::create + * * @dataProvider providerForTestCreate */ public function testCreate($sourceUrl, $destinationUrl, $forward) @@ -170,36 +172,36 @@ public function testCreate($sourceUrl, $destinationUrl, $forward) $destinationUrl = '/' . trim($destinationUrl, '/ '); $this->permissionResolver->expects( - $this->once() + self::once() )->method( 'hasAccess' )->with( - $this->equalTo('content'), - $this->equalTo('urltranslator') + self::equalTo('content'), + self::equalTo('urltranslator') )->will( - $this->returnValue(true) + self::returnValue(true) ); $repositoryMock = $this->getRepositoryMock(); - $repositoryMock->expects($this->once())->method('beginTransaction'); - $repositoryMock->expects($this->once())->method('commit'); + $repositoryMock->expects(self::once())->method('beginTransaction'); + $repositoryMock->expects(self::once())->method('commit'); $this->urlWildcardHandler->expects( - $this->once() + self::once() )->method( 'exactSourceUrlExists' )->willReturn(false); $this->urlWildcardHandler->expects( - $this->once() + self::once() )->method( 'create' )->with( - $this->equalTo($sourceUrl), - $this->equalTo($destinationUrl), - $this->equalTo($forward) + self::equalTo($sourceUrl), + self::equalTo($destinationUrl), + self::equalTo($forward) )->will( - $this->returnValue( + self::returnValue( new SPIURLWildcard( [ 'id' => 123456, @@ -213,7 +215,7 @@ public function testCreate($sourceUrl, $destinationUrl, $forward) $urlWildCard = $mockedService->create($sourceUrl, $destinationUrl, $forward); - $this->assertEquals( + self::assertEquals( new URLWildcard( [ 'id' => 123456, @@ -238,40 +240,40 @@ public function testCreateWithRollback() $mockedService = $this->getPartlyMockedURLWildcardService(); $this->permissionResolver->expects( - $this->once() + self::once() )->method( 'hasAccess' )->with( - $this->equalTo('content'), - $this->equalTo('urltranslator') + self::equalTo('content'), + self::equalTo('urltranslator') )->will( - $this->returnValue(true) + self::returnValue(true) ); $repositoryMock = $this->getRepositoryMock(); - $repositoryMock->expects($this->once())->method('beginTransaction'); - $repositoryMock->expects($this->once())->method('rollback'); + $repositoryMock->expects(self::once())->method('beginTransaction'); + $repositoryMock->expects(self::once())->method('rollback'); $sourceUrl = '/lorem'; $destinationUrl = '/ipsum'; $forward = true; $this->urlWildcardHandler->expects( - $this->once() + self::once() )->method( 'exactSourceUrlExists' )->willReturn(false); $this->urlWildcardHandler->expects( - $this->once() + self::once() )->method( 'create' )->with( - $this->equalTo($sourceUrl), - $this->equalTo($destinationUrl), - $this->equalTo($forward) + self::equalTo($sourceUrl), + self::equalTo($destinationUrl), + self::equalTo($forward) )->will( - $this->throwException(new Exception()) + self::throwException(new Exception()) ); $this->expectException(Exception::class); @@ -293,19 +295,19 @@ public function testRemoveThrowsUnauthorizedException() $mockedService = $this->getPartlyMockedURLWildcardService(); $this->permissionResolver->expects( - $this->once() + self::once() )->method( 'canUser' )->with( - $this->equalTo('content'), - $this->equalTo('urltranslator'), - $this->equalTo($wildcard) + self::equalTo('content'), + self::equalTo('urltranslator'), + self::equalTo($wildcard) )->will( - $this->returnValue(false) + self::returnValue(false) ); $repositoryMock = $this->getRepositoryMock(); - $repositoryMock->expects($this->never())->method('beginTransaction'); + $repositoryMock->expects(self::never())->method('beginTransaction'); $this->expectException(UnauthorizedException::class); @@ -324,27 +326,27 @@ public function testRemove() $mockedService = $this->getPartlyMockedURLWildcardService(); $this->permissionResolver->expects( - $this->once() + self::once() )->method( 'canUser' )->with( - $this->equalTo('content'), - $this->equalTo('urltranslator'), - $this->equalTo($wildcard) + self::equalTo('content'), + self::equalTo('urltranslator'), + self::equalTo($wildcard) )->will( - $this->returnValue(true) + self::returnValue(true) ); $repositoryMock = $this->getRepositoryMock(); - $repositoryMock->expects($this->once())->method('beginTransaction'); - $repositoryMock->expects($this->once())->method('commit'); + $repositoryMock->expects(self::once())->method('beginTransaction'); + $repositoryMock->expects(self::once())->method('commit'); $this->urlWildcardHandler->expects( - $this->once() + self::once() )->method( 'remove' )->with( - $this->equalTo('McBomb') + self::equalTo('McBomb') ); $mockedService->remove($wildcard); @@ -364,29 +366,29 @@ public function testRemoveWithRollback() $mockedService = $this->getPartlyMockedURLWildcardService(); $this->permissionResolver->expects( - $this->once() + self::once() )->method( 'canUser' )->with( - $this->equalTo('content'), - $this->equalTo('urltranslator'), - $this->equalTo($wildcard) + self::equalTo('content'), + self::equalTo('urltranslator'), + self::equalTo($wildcard) )->will( - $this->returnValue(true) + self::returnValue(true) ); $repositoryMock = $this->getRepositoryMock(); - $repositoryMock->expects($this->once())->method('beginTransaction'); - $repositoryMock->expects($this->once())->method('rollback'); + $repositoryMock->expects(self::once())->method('beginTransaction'); + $repositoryMock->expects(self::once())->method('rollback'); $this->urlWildcardHandler->expects( - $this->once() + self::once() )->method( 'remove' )->with( - $this->equalTo('McBoo') + self::equalTo('McBoo') )->will( - $this->throwException(new Exception()) + self::throwException(new Exception()) ); $this->expectException(Exception::class); @@ -406,13 +408,13 @@ public function testLoadThrowsException() $mockedService = $this->getPartlyMockedURLWildcardService(); $this->urlWildcardHandler->expects( - $this->once() + self::once() )->method( 'load' )->with( - $this->equalTo(self::EXAMPLE_URL_WILDCARD_ID) + self::equalTo(self::EXAMPLE_URL_WILDCARD_ID) )->will( - $this->throwException(new Exception()) + self::throwException(new Exception()) ); $this->expectException(Exception::class); @@ -430,13 +432,13 @@ public function testLoad() $mockedService = $this->getPartlyMockedURLWildcardService(); $this->urlWildcardHandler->expects( - $this->once() + self::once() )->method( 'load' )->with( - $this->equalTo(self::EXAMPLE_URL_WILDCARD_ID) + self::equalTo(self::EXAMPLE_URL_WILDCARD_ID) )->will( - $this->returnValue( + self::returnValue( new SPIURLWildcard( [ 'id' => self::EXAMPLE_URL_WILDCARD_ID, @@ -450,7 +452,7 @@ public function testLoad() $urlWildcard = $mockedService->load(self::EXAMPLE_URL_WILDCARD_ID); - $this->assertEquals( + self::assertEquals( new URLWildcard( [ 'id' => self::EXAMPLE_URL_WILDCARD_ID, @@ -473,14 +475,14 @@ public function testLoadAll() $mockedService = $this->getPartlyMockedURLWildcardService(); $this->urlWildcardHandler->expects( - $this->once() + self::once() )->method( 'loadAll' )->with( - $this->equalTo(0), - $this->equalTo(-1) + self::equalTo(0), + self::equalTo(-1) )->will( - $this->returnValue([]) + self::returnValue([]) ); $mockedService->loadAll(); @@ -496,14 +498,14 @@ public function testLoadAllWithLimitAndOffset() $mockedService = $this->getPartlyMockedURLWildcardService(); $this->urlWildcardHandler->expects( - $this->once() + self::once() )->method( 'loadAll' )->with( - $this->equalTo(12), - $this->equalTo(34) + self::equalTo(12), + self::equalTo(34) )->will( - $this->returnValue( + self::returnValue( [ new SPIURLWildcard( [ @@ -519,7 +521,7 @@ public function testLoadAllWithLimitAndOffset() $urlWildcards = $mockedService->loadAll(12, 34); - $this->assertEquals( + self::assertEquals( [ new URLWildcard( [ @@ -579,6 +581,7 @@ public function providerForTestTranslateThrowsNotFoundException() * Test for the translate() method. * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::translate + * * @dataProvider providerForTestTranslateThrowsNotFoundException */ public function testTranslateThrowsNotFoundException($createArray, $url) @@ -590,7 +593,7 @@ public function testTranslateThrowsNotFoundException($createArray, $url) $trimmedUrl = trim($url, '/ '); $this->urlWildcardHandler - ->expects($this->once()) + ->expects(self::once()) ->method('translate') ->with($trimmedUrl) ->willThrowException(new APINotFoundException('UrlWildcard', $trimmedUrl)); @@ -685,6 +688,7 @@ public function providerForTestTranslate() * Test for the translate() method. * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::translate + * * @dataProvider providerForTestTranslate */ public function testTranslate($createArray, $url, $uri) @@ -694,7 +698,7 @@ public function testTranslate($createArray, $url, $uri) $trimmedUrl = trim($url, '/ '); $this->urlWildcardHandler - ->expects($this->once()) + ->expects(self::once()) ->method('translate') ->with($trimmedUrl) @@ -706,7 +710,7 @@ public function testTranslate($createArray, $url, $uri) $translationResult = $mockedService->translate($url); - $this->assertEquals( + self::assertEquals( new URLWildcardTranslationResult( [ 'uri' => $uri, @@ -730,7 +734,7 @@ public function testTranslateUsesLongestMatchingWildcard() $trimmedUrl = trim($url, '/ '); $this->urlWildcardHandler - ->expects($this->once()) + ->expects(self::once()) ->method('translate') ->with($trimmedUrl) ->willReturn(new SPIURLWildcard([ @@ -740,7 +744,7 @@ public function testTranslateUsesLongestMatchingWildcard() $translationResult = $mockedService->translate($url); - $this->assertEquals( + self::assertEquals( new URLWildcardTranslationResult( [ 'uri' => '/long', diff --git a/tests/lib/Repository/Service/Mock/UserPasswordValidatorTest.php b/tests/lib/Repository/Service/Mock/UserPasswordValidatorTest.php index 486e22529e..38ae43b240 100644 --- a/tests/lib/Repository/Service/Mock/UserPasswordValidatorTest.php +++ b/tests/lib/Repository/Service/Mock/UserPasswordValidatorTest.php @@ -24,7 +24,7 @@ public function testValidate(array $constraints, string $password, array $expect { $validator = new UserPasswordValidator($constraints); - $this->assertEqualsCanonicalizing($expectedErrors, $validator->validate($password), ''); + self::assertEqualsCanonicalizing($expectedErrors, $validator->validate($password), ''); } public function dateProviderForValidate(): array diff --git a/tests/lib/Repository/Service/Mock/UserPreferenceTest.php b/tests/lib/Repository/Service/Mock/UserPreferenceTest.php index 56048e5476..be32a21bec 100644 --- a/tests/lib/Repository/Service/Mock/UserPreferenceTest.php +++ b/tests/lib/Repository/Service/Mock/UserPreferenceTest.php @@ -117,7 +117,7 @@ public function testGetUserPreference() $userPreferenceValue = 'value'; $this->userSPIPreferenceHandler - ->expects($this->once()) + ->expects(self::once()) ->method('getUserPreferenceByUserIdAndName') ->with(self::CURRENT_USER_ID, $userPreferenceName) ->willReturn(new UserPreference([ @@ -131,7 +131,7 @@ public function testGetUserPreference() 'name' => $userPreferenceName, 'value' => $userPreferenceValue, ]); - $this->assertEquals($expected, $APIUserPreference); + self::assertEquals($expected, $APIUserPreference); } /** @@ -148,13 +148,13 @@ public function testLoadUserPreferences() }, range(1, $expectedTotalCount)); $this->userSPIPreferenceHandler - ->expects($this->once()) + ->expects(self::once()) ->method('countUserPreferences') ->with(self::CURRENT_USER_ID) ->willReturn($expectedTotalCount); $this->userSPIPreferenceHandler - ->expects($this->once()) + ->expects(self::once()) ->method('loadUserPreferences') ->with(self::CURRENT_USER_ID, $offset, $limit) ->willReturn(array_map(static function ($locationId) { @@ -166,8 +166,8 @@ public function testLoadUserPreferences() $userPreferences = $this->createAPIUserPreferenceService()->loadUserPreferences($offset, $limit); - $this->assertEquals($expectedTotalCount, $userPreferences->totalCount); - $this->assertEquals($expectedItems, $userPreferences->items); + self::assertEquals($expectedTotalCount, $userPreferences->totalCount); + self::assertEquals($expectedItems, $userPreferences->items); } /** @@ -178,14 +178,14 @@ public function testGetUserPreferenceCount() $expectedTotalCount = 10; $this->userSPIPreferenceHandler - ->expects($this->once()) + ->expects(self::once()) ->method('countUserPreferences') ->with(self::CURRENT_USER_ID) ->willReturn($expectedTotalCount); $APIUserPreference = $this->createAPIUserPreferenceService()->getUserPreferenceCount(); - $this->assertEquals($expectedTotalCount, $APIUserPreference); + self::assertEquals($expectedTotalCount, $APIUserPreference); } /** @@ -203,28 +203,28 @@ private function createAPIUserPreferenceService(array $methods = null) private function assertTransactionIsCommitted(callable $operation): void { $repository = $this->getRepositoryMock(); - $repository->expects($this->once())->method('beginTransaction'); + $repository->expects(self::once())->method('beginTransaction'); $operation(); - $repository->expects($this->once())->method('commit'); - $repository->expects($this->never())->method('rollback'); + $repository->expects(self::once())->method('commit'); + $repository->expects(self::never())->method('rollback'); } private function assertTransactionIsNotStarted(callable $operation): void { $repository = $this->getRepositoryMock(); - $repository->expects($this->never())->method('beginTransaction'); + $repository->expects(self::never())->method('beginTransaction'); $operation(); - $repository->expects($this->never())->method('commit'); - $repository->expects($this->never())->method('rollback'); + $repository->expects(self::never())->method('commit'); + $repository->expects(self::never())->method('rollback'); } private function assertTransactionIsRollback(callable $operation): void { $repository = $this->getRepositoryMock(); - $repository->expects($this->once())->method('beginTransaction'); + $repository->expects(self::once())->method('beginTransaction'); $operation(); - $repository->expects($this->never())->method('commit'); - $repository->expects($this->once())->method('rollback'); + $repository->expects(self::never())->method('commit'); + $repository->expects(self::once())->method('rollback'); } private function createAPIUserPreference(): APIUserPreference diff --git a/tests/lib/Repository/Service/Mock/UserTest.php b/tests/lib/Repository/Service/Mock/UserTest.php index fc38331218..26236bd476 100644 --- a/tests/lib/Repository/Service/Mock/UserTest.php +++ b/tests/lib/Repository/Service/Mock/UserTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Service\Mock; use Exception; diff --git a/tests/lib/Repository/Service/Mock/ValueStub.php b/tests/lib/Repository/Service/Mock/ValueStub.php index 0a3393e434..420b38e352 100644 --- a/tests/lib/Repository/Service/Mock/ValueStub.php +++ b/tests/lib/Repository/Service/Mock/ValueStub.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Service\Mock; use Ibexa\Core\FieldType\Value as BaseValue; diff --git a/tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php b/tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php index 0635a5106c..2f2c901844 100644 --- a/tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\SiteAccessAware; use Closure; @@ -86,13 +87,13 @@ final public function testForPassTrough($method, array $arguments, $return = tru { if ($return) { $this->innerApiServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method($method) ->with(...$arguments) ->willReturn($return); } else { $this->innerApiServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method($method) ->with(...$arguments); } @@ -100,7 +101,7 @@ final public function testForPassTrough($method, array $arguments, $return = tru $actualReturn = $this->service->$method(...$arguments); if ($return) { - $this->assertEquals($return, $actualReturn); + self::assertEquals($return, $actualReturn); } } @@ -160,7 +161,7 @@ final public function testForLanguagesLookup($method, array $arguments, $return, $expectedArguments = $this->setLanguagesLookupExpectedArguments($arguments, $languageArgumentIndex, $languages); $this->languageResolverMock - ->expects($this->once()) + ->expects(self::once()) ->method('getPrioritizedLanguages') ->with([]) ->willReturn($languages); @@ -169,14 +170,14 @@ final public function testForLanguagesLookup($method, array $arguments, $return, $arguments[$alwaysAvailableArgumentIndex] = null; $expectedArguments[$alwaysAvailableArgumentIndex] = true; $this->languageResolverMock - ->expects($this->once()) + ->expects(self::once()) ->method('getUseAlwaysAvailable') ->with(null) ->willReturn(true); } $this->innerApiServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method($method) ->with(...$expectedArguments) ->willReturn($return); @@ -188,7 +189,7 @@ final public function testForLanguagesLookup($method, array $arguments, $return, $actualReturn = $this->service->$method(...$arguments); if ($return) { - $this->assertEquals($return, $actualReturn); + self::assertEquals($return, $actualReturn); } } @@ -224,21 +225,21 @@ final public function testForLanguagesPassTrough($method, array $arguments, $ret $arguments = $this->setLanguagesPassTroughArguments($arguments, $languageArgumentIndex, $languages); $this->languageResolverMock - ->expects($this->once()) + ->expects(self::once()) ->method('getPrioritizedLanguages') ->with($languages) ->willReturn($languages); if ($alwaysAvailableArgumentIndex) { $this->languageResolverMock - ->expects($this->once()) + ->expects(self::once()) ->method('getUseAlwaysAvailable') ->with($arguments[$alwaysAvailableArgumentIndex]) ->willReturn($arguments[$alwaysAvailableArgumentIndex]); } $this->innerApiServiceMock - ->expects($this->once()) + ->expects(self::once()) ->method($method) ->with(...$arguments) ->willReturn($return); @@ -250,7 +251,7 @@ final public function testForLanguagesPassTrough($method, array $arguments, $ret $actualReturn = $this->service->$method(...$arguments); if ($return) { - $this->assertEquals($return, $actualReturn); + self::assertEquals($return, $actualReturn); } } diff --git a/tests/lib/Repository/SiteAccessAware/ContentServiceTest.php b/tests/lib/Repository/SiteAccessAware/ContentServiceTest.php index ee0f691163..38e53e60ea 100644 --- a/tests/lib/Repository/SiteAccessAware/ContentServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/ContentServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\SiteAccessAware; use Ibexa\Contracts\Core\Repository\ContentService as APIService; diff --git a/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php b/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php index 5701ffb0db..f1afb259b9 100644 --- a/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\SiteAccessAware; use Ibexa\Contracts\Core\Repository\ContentTypeService as APIService; diff --git a/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php b/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php index defce7d2f1..135573109a 100644 --- a/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\SiteAccessAware; use Ibexa\Contracts\Core\Repository\LanguageService as APIService; diff --git a/tests/lib/Repository/SiteAccessAware/LocationServiceTest.php b/tests/lib/Repository/SiteAccessAware/LocationServiceTest.php index 532cd536f8..2b807cf012 100644 --- a/tests/lib/Repository/SiteAccessAware/LocationServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/LocationServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\SiteAccessAware; use Ibexa\Contracts\Core\Repository\LocationService as APIService; diff --git a/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php b/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php index 8720c0b73f..dd2dff20dd 100644 --- a/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\SiteAccessAware; use Ibexa\Contracts\Core\Repository\ObjectStateService as APIService; diff --git a/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php b/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php index a5342a4f37..9ff8ce4c2d 100644 --- a/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\SiteAccessAware; use Ibexa\Contracts\Core\Repository\SearchService as APIService; diff --git a/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php b/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php index 2e6c172821..af2ba0b25e 100644 --- a/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\SiteAccessAware; use Ibexa\Contracts\Core\Repository\TrashService as APIService; diff --git a/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php b/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php index 0714f10703..ba172fabc0 100644 --- a/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\SiteAccessAware; use Ibexa\Contracts\Core\Repository\URLAliasService as APIService; diff --git a/tests/lib/Repository/SiteAccessAware/UserServiceTest.php b/tests/lib/Repository/SiteAccessAware/UserServiceTest.php index fc1c3260ed..d336d87ba3 100644 --- a/tests/lib/Repository/SiteAccessAware/UserServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/UserServiceTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\SiteAccessAware; use DateInterval; diff --git a/tests/lib/Repository/Values/Content/ContentTest.php b/tests/lib/Repository/Values/Content/ContentTest.php index fc0f284fbb..05e6700f84 100644 --- a/tests/lib/Repository/Values/Content/ContentTest.php +++ b/tests/lib/Repository/Values/Content/ContentTest.php @@ -133,13 +133,13 @@ public function testGetName(): void { $name = 'Translated name'; $versionInfoMock = $this->createMock(VersionInfo::class); - $versionInfoMock->expects($this->once()) + $versionInfoMock->expects(self::once()) ->method('getName') ->willReturn($name); $object = new Content(['versionInfo' => $versionInfoMock]); - $this->assertEquals($name, $object->getName()); + self::assertEquals($name, $object->getName()); } } diff --git a/tests/lib/Repository/Values/Content/LanguageTest.php b/tests/lib/Repository/Values/Content/LanguageTest.php index cc023cc16e..afe92a8bd9 100644 --- a/tests/lib/Repository/Values/Content/LanguageTest.php +++ b/tests/lib/Repository/Values/Content/LanguageTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Values\Content; use Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException; diff --git a/tests/lib/Repository/Values/Content/Query/Aggregation/Location/SubtreeTermAggregationTest.php b/tests/lib/Repository/Values/Content/Query/Aggregation/Location/SubtreeTermAggregationTest.php index 35e39e6c48..c5fd5da007 100644 --- a/tests/lib/Repository/Values/Content/Query/Aggregation/Location/SubtreeTermAggregationTest.php +++ b/tests/lib/Repository/Values/Content/Query/Aggregation/Location/SubtreeTermAggregationTest.php @@ -25,8 +25,8 @@ public function testConstruct(): void self::EXAMPLE_PATH_STRING ); - $this->assertEquals(self::EXAMPLE_AGGREGATION_NAME, $aggregation->getName()); - $this->assertEquals(self::EXAMPLE_PATH_STRING, $aggregation->getPathString()); + self::assertEquals(self::EXAMPLE_AGGREGATION_NAME, $aggregation->getName()); + self::assertEquals(self::EXAMPLE_PATH_STRING, $aggregation->getPathString()); } public function testConstructThrowsInvalidArgumentExceptionOnInvalidPathString(): void @@ -44,8 +44,8 @@ public function testFromLocation(): void $aggregation = SubtreeTermAggregation::fromLocation(self::EXAMPLE_AGGREGATION_NAME, $location); - $this->assertEquals(self::EXAMPLE_AGGREGATION_NAME, $aggregation->getName()); - $this->assertEquals(self::EXAMPLE_PATH_STRING, $aggregation->getPathString()); + self::assertEquals(self::EXAMPLE_AGGREGATION_NAME, $aggregation->getName()); + self::assertEquals(self::EXAMPLE_PATH_STRING, $aggregation->getPathString()); } } diff --git a/tests/lib/Repository/Values/Content/Query/Aggregation/RangeTest.php b/tests/lib/Repository/Values/Content/Query/Aggregation/RangeTest.php index 7cffc94f41..b59a82a992 100644 --- a/tests/lib/Repository/Values/Content/Query/Aggregation/RangeTest.php +++ b/tests/lib/Repository/Values/Content/Query/Aggregation/RangeTest.php @@ -19,7 +19,7 @@ final class RangeTest extends TestCase */ public function testToString(Range $range, string $expected): void { - $this->assertEquals($expected, (string)$range); + self::assertEquals($expected, (string)$range); } public function dataProviderForTestToString(): iterable @@ -50,16 +50,16 @@ public function dataProviderForTestToString(): iterable public function testOfInt(): void { - $this->assertEquals(new Range(null, 10), Range::ofInt(null, 10)); - $this->assertEquals(new Range(1, 10), Range::ofInt(1, 10)); - $this->assertEquals(new Range(1, null), Range::ofInt(1, null)); + self::assertEquals(new Range(null, 10), Range::ofInt(null, 10)); + self::assertEquals(new Range(1, 10), Range::ofInt(1, 10)); + self::assertEquals(new Range(1, null), Range::ofInt(1, null)); } public function testOfFloat(): void { - $this->assertEquals(new Range(null, 10.0), Range::ofFloat(null, 10.0)); - $this->assertEquals(new Range(1.0, 10.0), Range::ofFloat(1.0, 10.0)); - $this->assertEquals(new Range(1.0, null), Range::ofFloat(1.0, null)); + self::assertEquals(new Range(null, 10.0), Range::ofFloat(null, 10.0)); + self::assertEquals(new Range(1.0, 10.0), Range::ofFloat(1.0, 10.0)); + self::assertEquals(new Range(1.0, null), Range::ofFloat(1.0, null)); } public function testOfDateTime(): void @@ -67,9 +67,9 @@ public function testOfDateTime(): void $a = new DateTimeImmutable('2020-01-01T00:00:00+0000'); $b = new DateTimeImmutable('2020-12-31T23:59:59+0000'); - $this->assertEquals(new Range(null, $b), Range::ofDateTime(null, $b)); - $this->assertEquals(new Range($a, $b), Range::ofDateTime($a, $b)); - $this->assertEquals(new Range($a, null), Range::ofDateTime($a, null)); + self::assertEquals(new Range(null, $b), Range::ofDateTime(null, $b)); + self::assertEquals(new Range($a, $b), Range::ofDateTime($a, $b)); + self::assertEquals(new Range($a, null), Range::ofDateTime($a, null)); } /** diff --git a/tests/lib/Repository/Values/Content/Query/Criterion/DateMetadataTest.php b/tests/lib/Repository/Values/Content/Query/Criterion/DateMetadataTest.php index 9279b95cd6..ccf8f75215 100644 --- a/tests/lib/Repository/Values/Content/Query/Criterion/DateMetadataTest.php +++ b/tests/lib/Repository/Values/Content/Query/Criterion/DateMetadataTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\DateMetadata; @@ -21,7 +22,7 @@ public function testConstruction(string $target, string $operator, $value): void } /** - * @return iterable + * @return iterable */ public static function provideValidConstructorArguments(): iterable { diff --git a/tests/lib/Repository/Values/Content/SectionTest.php b/tests/lib/Repository/Values/Content/SectionTest.php index f4cd626170..4ac51c7498 100644 --- a/tests/lib/Repository/Values/Content/SectionTest.php +++ b/tests/lib/Repository/Values/Content/SectionTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Values\Content; use Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException; diff --git a/tests/lib/Repository/Values/Content/TrashItemTest.php b/tests/lib/Repository/Values/Content/TrashItemTest.php index d9b6013d7d..37abcd1cc8 100644 --- a/tests/lib/Repository/Values/Content/TrashItemTest.php +++ b/tests/lib/Repository/Values/Content/TrashItemTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Values\Content; use Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException; diff --git a/tests/lib/Repository/Values/ContentType/ContentTypeDraftTest.php b/tests/lib/Repository/Values/ContentType/ContentTypeDraftTest.php index 3e0cbe4f95..d3a378880f 100644 --- a/tests/lib/Repository/Values/ContentType/ContentTypeDraftTest.php +++ b/tests/lib/Repository/Values/ContentType/ContentTypeDraftTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Values\ContentType; use Ibexa\Core\Repository\Values\ContentType\ContentType; diff --git a/tests/lib/Repository/Values/ContentType/ContentTypeTest.php b/tests/lib/Repository/Values/ContentType/ContentTypeTest.php index 9de1080898..09d0662198 100644 --- a/tests/lib/Repository/Values/ContentType/ContentTypeTest.php +++ b/tests/lib/Repository/Values/ContentType/ContentTypeTest.php @@ -76,13 +76,13 @@ public function testGetFieldDefinition(): void $fieldDefinitionCollection = $this->createMock(APIFieldDefinitionCollection::class); $fieldDefinitionCollection - ->expects($this->once()) + ->expects(self::once()) ->method('has') ->with(self::EXAMPLE_FIELD_DEFINITION_IDENTIFIER) ->willReturn(true); $fieldDefinitionCollection - ->expects($this->once()) + ->expects(self::once()) ->method('get') ->with(self::EXAMPLE_FIELD_DEFINITION_IDENTIFIER) ->willReturn($fieldDefinition); @@ -91,7 +91,7 @@ public function testGetFieldDefinition(): void 'fieldDefinitions' => $fieldDefinitionCollection, ]); - $this->assertEquals( + self::assertEquals( $fieldDefinition, $contentType->getFieldDefinition(self::EXAMPLE_FIELD_DEFINITION_IDENTIFIER) ); @@ -101,7 +101,7 @@ public function testHasFieldDefinition(): void { $fieldDefinitionCollection = $this->createMock(APIFieldDefinitionCollection::class); $fieldDefinitionCollection - ->expects($this->once()) + ->expects(self::once()) ->method('has') ->with(self::EXAMPLE_FIELD_DEFINITION_IDENTIFIER) ->willReturn(true); @@ -110,7 +110,7 @@ public function testHasFieldDefinition(): void 'fieldDefinitions' => $fieldDefinitionCollection, ]); - $this->assertTrue( + self::assertTrue( $contentType->hasFieldDefinition(self::EXAMPLE_FIELD_DEFINITION_IDENTIFIER) ); } @@ -119,7 +119,7 @@ public function testHasFieldDefinitionOfType(): void { $fieldDefinitionCollection = $this->createMock(APIFieldDefinitionCollection::class); $fieldDefinitionCollection - ->expects($this->once()) + ->expects(self::once()) ->method('anyOfType') ->with(self::EXAMPLE_FIELD_TYPE_IDENTIFIER) ->willReturn(true); @@ -128,7 +128,7 @@ public function testHasFieldDefinitionOfType(): void 'fieldDefinitions' => $fieldDefinitionCollection, ]); - $this->assertTrue( + self::assertTrue( $contentType->hasFieldDefinitionOfType(self::EXAMPLE_FIELD_TYPE_IDENTIFIER) ); } @@ -139,7 +139,7 @@ public function testGetFieldDefinitionsOfType(): void $fieldDefinitionCollection = $this->createMock(APIFieldDefinitionCollection::class); $fieldDefinitionCollection - ->expects($this->once()) + ->expects(self::once()) ->method('filterByType') ->with(self::EXAMPLE_FIELD_TYPE_IDENTIFIER) ->willReturn($expectedFieldDefinitionCollection); @@ -148,7 +148,7 @@ public function testGetFieldDefinitionsOfType(): void 'fieldDefinitions' => $fieldDefinitionCollection, ]); - $this->assertEquals( + self::assertEquals( $expectedFieldDefinitionCollection, $contentType->getFieldDefinitionsOfType(self::EXAMPLE_FIELD_TYPE_IDENTIFIER) ); @@ -165,7 +165,7 @@ public function testGetFirstFieldDefinitionOfType(): void $fieldDefinitionCollection = $this->createMock(APIFieldDefinitionCollection::class); $fieldDefinitionCollection - ->expects($this->once()) + ->expects(self::once()) ->method('filterByType') ->with(self::EXAMPLE_FIELD_TYPE_IDENTIFIER) ->willReturn($filteredFieldDefinitionCollection); @@ -174,7 +174,7 @@ public function testGetFirstFieldDefinitionOfType(): void 'fieldDefinitions' => $fieldDefinitionCollection, ]); - $this->assertEquals( + self::assertEquals( $expectedFieldDefinition, $contentType->getFirstFieldDefinitionOfType(self::EXAMPLE_FIELD_TYPE_IDENTIFIER) ); diff --git a/tests/lib/Repository/Values/ContentType/FieldDefinitionCollectionTest.php b/tests/lib/Repository/Values/ContentType/FieldDefinitionCollectionTest.php index d1e847f100..6e1b7124dd 100644 --- a/tests/lib/Repository/Values/ContentType/FieldDefinitionCollectionTest.php +++ b/tests/lib/Repository/Values/ContentType/FieldDefinitionCollectionTest.php @@ -26,9 +26,9 @@ public function testGet(): void $collection = new FieldDefinitionCollection([$a, $b, $c]); - $this->assertEquals($a, $collection->get('A')); - $this->assertEquals($b, $collection->get('B')); - $this->assertEquals($c, $collection->get('C')); + self::assertEquals($a, $collection->get('A')); + self::assertEquals($b, $collection->get('B')); + self::assertEquals($c, $collection->get('C')); } public function testGetThrowsOutOfBoundsExceptionForNonExistingFieldDefinition(): void @@ -49,9 +49,9 @@ public function testHasReturnTrueForExistingFieldDefinition(): void $this->createFieldDefinitions('A', 'B', 'C') ); - $this->assertTrue($collection->has('A')); - $this->assertTrue($collection->has('B')); - $this->assertTrue($collection->has('C')); + self::assertTrue($collection->has('A')); + self::assertTrue($collection->has('B')); + self::assertTrue($collection->has('C')); } public function testHasReturnFalseForNonExistingFieldDefinition(): void @@ -60,14 +60,14 @@ public function testHasReturnFalseForNonExistingFieldDefinition(): void $this->createFieldDefinitions('A', 'B', 'C') ); - $this->assertFalse($collection->has('Z')); + self::assertFalse($collection->has('Z')); } public function testIsEmptyReturnsTrueForEmptyCollection(): void { $collection = new FieldDefinitionCollection(); - $this->assertTrue($collection->isEmpty()); + self::assertTrue($collection->isEmpty()); } public function testIsEmptyReturnsFalseForNonEmptyCollection(): void @@ -76,7 +76,7 @@ public function testIsEmptyReturnsFalseForNonEmptyCollection(): void $this->createFieldDefinition('Example'), ]); - $this->assertFalse($collection->isEmpty()); + self::assertFalse($collection->isEmpty()); } public function testFirstThrowsOutOfBoundsExceptionForEmptyCollection(): void @@ -94,7 +94,7 @@ public function testFirstReturnsFieldDefinitionForNonEmptyCollection(): void $collection = new FieldDefinitionCollection([$a, $b, $c]); - $this->assertEquals($a, $collection->first()); + self::assertEquals($a, $collection->first()); } public function testLastReturnsFieldDefinitionForNonEmptyCollection(): void @@ -103,7 +103,7 @@ public function testLastReturnsFieldDefinitionForNonEmptyCollection(): void $collection = new FieldDefinitionCollection([$a, $b, $c]); - $this->assertEquals($c, $collection->last()); + self::assertEquals($c, $collection->last()); } public function testLastThrowsOutOfBoundsExceptionForEmptyCollection(): void @@ -121,8 +121,8 @@ public function testFirstAndLastAreEqualForCollectionWithOneElement(): void $collection = new FieldDefinitionCollection([$fieldDefinition]); - $this->assertEquals($fieldDefinition, $collection->first()); - $this->assertEquals($fieldDefinition, $collection->last()); + self::assertEquals($fieldDefinition, $collection->first()); + self::assertEquals($fieldDefinition, $collection->last()); } public function testCountForNonEmptyCollection(): void @@ -131,14 +131,14 @@ public function testCountForNonEmptyCollection(): void $collection = new FieldDefinitionCollection([$a, $b, $c]); - $this->assertEquals(3, $collection->count()); + self::assertEquals(3, $collection->count()); } public function testCountReturnsZeroForEmptyCollection(): void { $collection = new FieldDefinitionCollection(); - $this->assertEquals(0, $collection->count()); + self::assertEquals(0, $collection->count()); } public function testMap(): void @@ -149,7 +149,7 @@ public function testMap(): void return strtolower($fieldDefinition->identifier); }; - $this->assertEquals(['a', 'b', 'c'], $collection->map($closure)); + self::assertEquals(['a', 'b', 'c'], $collection->map($closure)); } public function testFilter(): void @@ -158,17 +158,17 @@ public function testFilter(): void $collection = new FieldDefinitionCollection([$a, $b, $c]); - $this->assertEquals( + self::assertEquals( new FieldDefinitionCollection([$a, $c]), $collection->filter($this->getIdentifierIsEqualPredicate('A', 'C')) ); - $this->assertEquals( + self::assertEquals( new FieldDefinitionCollection(), $collection->filter($this->getContraction()) ); - $this->assertEquals( + self::assertEquals( new FieldDefinitionCollection([$a, $b, $c]), $collection->filter($this->getTautology()) ); @@ -180,7 +180,7 @@ public function testFilterByType(): void $collection = new FieldDefinitionCollection([$a, $b, $c]); - $this->assertEquals( + self::assertEquals( new FieldDefinitionCollection([$a, $b]), $collection->filterByType('ezstring') ); @@ -192,7 +192,7 @@ public function filterByGroup(): void $collection = new FieldDefinitionCollection([$a, $b, $c]); - $this->assertEquals( + self::assertEquals( new FieldDefinitionCollection([$c]), $collection->filterByType('seo') ); @@ -202,22 +202,22 @@ public function testAll(): void { $collection = new FieldDefinitionCollection($this->createFieldDefinitions('A', 'B', 'C')); - $this->assertTrue($collection->all($this->getIdentifierIsEqualPredicate('A', 'B', 'C'))); - $this->assertFalse($collection->all($this->getIdentifierIsEqualPredicate('A'))); + self::assertTrue($collection->all($this->getIdentifierIsEqualPredicate('A', 'B', 'C'))); + self::assertFalse($collection->all($this->getIdentifierIsEqualPredicate('A'))); - $this->assertTrue($collection->all($this->getTautology())); - $this->assertFalse($collection->all($this->getContraction())); + self::assertTrue($collection->all($this->getTautology())); + self::assertFalse($collection->all($this->getContraction())); } public function testAny(): void { $collection = new FieldDefinitionCollection($this->createFieldDefinitions('A', 'B', 'C')); - $this->assertTrue($collection->any($this->getIdentifierIsEqualPredicate('A'))); - $this->assertFalse($collection->any($this->getIdentifierIsEqualPredicate('Z'))); + self::assertTrue($collection->any($this->getIdentifierIsEqualPredicate('A'))); + self::assertFalse($collection->any($this->getIdentifierIsEqualPredicate('Z'))); - $this->assertTrue($collection->any($this->getTautology())); - $this->assertFalse($collection->any($this->getContraction())); + self::assertTrue($collection->any($this->getTautology())); + self::assertFalse($collection->any($this->getContraction())); } public function testAnyOfType(): void @@ -226,8 +226,8 @@ public function testAnyOfType(): void $this->createFieldDefinitionsWith('fieldTypeIdentifier', ['ezstring', 'ezstring', 'ezimage']) ); - $this->assertTrue($collection->anyOfType('ezstring')); - $this->assertFalse($collection->anyOfType('ezrichtext')); + self::assertTrue($collection->anyOfType('ezstring')); + self::assertFalse($collection->anyOfType('ezrichtext')); } public function testAnyInGroup(): void @@ -236,8 +236,8 @@ public function testAnyInGroup(): void $this->createFieldDefinitionsWith('fieldGroup', ['default', 'default', 'seo']) ); - $this->assertTrue($collection->anyInGroup('default')); - $this->assertFalse($collection->anyInGroup('comments')); + self::assertTrue($collection->anyInGroup('default')); + self::assertFalse($collection->anyInGroup('comments')); } public function testPartition(): void @@ -246,7 +246,7 @@ public function testPartition(): void $collection = new FieldDefinitionCollection([$a, $b, $c]); - $this->assertEquals( + self::assertEquals( [ new FieldDefinitionCollection([$a, $c]), new FieldDefinitionCollection([$b]), @@ -254,7 +254,7 @@ public function testPartition(): void $collection->partition($this->getIdentifierIsEqualPredicate('A', 'C')) ); - $this->assertEquals( + self::assertEquals( [ new FieldDefinitionCollection([$a, $b, $c]), new FieldDefinitionCollection(), @@ -262,7 +262,7 @@ public function testPartition(): void $collection->partition($this->getTautology()) ); - $this->assertEquals( + self::assertEquals( [ new FieldDefinitionCollection(), new FieldDefinitionCollection([$a, $b, $c]), @@ -277,7 +277,7 @@ public function testToArray(): void $collection = new FieldDefinitionCollection($fieldDefinitions); - $this->assertEquals($fieldDefinitions, $collection->toArray()); + self::assertEquals($fieldDefinitions, $collection->toArray()); } private function createFieldDefinitions(string ...$identifiers): array diff --git a/tests/lib/Repository/Values/MultiLanguageTestTrait.php b/tests/lib/Repository/Values/MultiLanguageTestTrait.php index 3b6a11e629..b30090d90f 100644 --- a/tests/lib/Repository/Values/MultiLanguageTestTrait.php +++ b/tests/lib/Repository/Values/MultiLanguageTestTrait.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Values; use Ibexa\Contracts\Core\Repository\Values\MultiLanguageDescription; diff --git a/tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php b/tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php index dbbc8f2952..fc10165b1e 100644 --- a/tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php +++ b/tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Values\ObjectState; use Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException; @@ -82,7 +83,7 @@ public function testMissingProperty() $objectStateGroup = new ObjectStateGroup(); $value = $objectStateGroup->notDefined; - $this->fail('Succeeded getting non existing property'); + self::fail('Succeeded getting non existing property'); } /** @@ -96,7 +97,7 @@ public function testReadOnlyProperty() $objectStateGroup = new ObjectStateGroup(); $objectStateGroup->id = 42; - $this->fail('Succeeded setting read only property'); + self::fail('Succeeded setting read only property'); } /** @@ -106,10 +107,10 @@ public function testIsPropertySet() { $objectStateGroup = new ObjectStateGroup(); $value = isset($objectStateGroup->notDefined); - $this->assertFalse($value); + self::assertFalse($value); $value = isset($objectStateGroup->id); - $this->assertTrue($value); + self::assertTrue($value); } /** @@ -123,7 +124,7 @@ public function testUnsetProperty() $objectStateGroup = new ObjectStateGroup(['id' => 2]); unset($objectStateGroup->id); - $this->fail('Unsetting read-only property succeeded'); + self::fail('Unsetting read-only property succeeded'); } } diff --git a/tests/lib/Repository/Values/ObjectState/ObjectStateTest.php b/tests/lib/Repository/Values/ObjectState/ObjectStateTest.php index 41255bfb60..88c03fc148 100644 --- a/tests/lib/Repository/Values/ObjectState/ObjectStateTest.php +++ b/tests/lib/Repository/Values/ObjectState/ObjectStateTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Values\ObjectState; use Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException; @@ -84,7 +85,7 @@ public function testMissingProperty() $objectState = new ObjectState(); $value = $objectState->notDefined; - $this->fail('Succeeded getting non existing property'); + self::fail('Succeeded getting non existing property'); } /** @@ -99,7 +100,7 @@ public function testReadOnlyProperty() $objectState = new ObjectState(); $objectState->id = 42; - $this->fail('Succeeded setting read only property'); + self::fail('Succeeded setting read only property'); } /** @@ -109,10 +110,10 @@ public function testIsPropertySet() { $objectState = new ObjectState(); $value = isset($objectState->notDefined); - $this->assertFalse($value); + self::assertFalse($value); $value = isset($objectState->id); - $this->assertTrue($value); + self::assertTrue($value); } /** @@ -127,7 +128,7 @@ public function testUnsetProperty() $objectState = new ObjectState(['id' => 2]); unset($objectState->id); - $this->fail('Unsetting read-only property succeeded'); + self::fail('Unsetting read-only property succeeded'); } } diff --git a/tests/lib/Repository/Values/User/PolicyTest.php b/tests/lib/Repository/Values/User/PolicyTest.php index 4b82889e59..107ae7f6f6 100644 --- a/tests/lib/Repository/Values/User/PolicyTest.php +++ b/tests/lib/Repository/Values/User/PolicyTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Values\User; use Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException; diff --git a/tests/lib/Repository/Values/User/RoleTest.php b/tests/lib/Repository/Values/User/RoleTest.php index e506323d13..554131e99b 100644 --- a/tests/lib/Repository/Values/User/RoleTest.php +++ b/tests/lib/Repository/Values/User/RoleTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Values\User; use Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException; diff --git a/tests/lib/Repository/Values/User/UserGroupTest.php b/tests/lib/Repository/Values/User/UserGroupTest.php index 755dac342f..3b2e9a43f2 100644 --- a/tests/lib/Repository/Values/User/UserGroupTest.php +++ b/tests/lib/Repository/Values/User/UserGroupTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Values\User; use Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException; @@ -43,17 +44,17 @@ public function testGetName() $contentMock = $this->createMock(Content::class); $versionInfoMock = $this->createMock(VersionInfo::class); - $contentMock->expects($this->once()) + $contentMock->expects(self::once()) ->method('getVersionInfo') ->willReturn($versionInfoMock); - $versionInfoMock->expects($this->once()) + $versionInfoMock->expects(self::once()) ->method('getName') ->willReturn($name); $object = new UserGroup(['content' => $contentMock]); - $this->assertEquals($name, $object->getName()); + self::assertEquals($name, $object->getName()); } /** diff --git a/tests/lib/Repository/Values/User/UserTest.php b/tests/lib/Repository/Values/User/UserTest.php index 24b2cf13f3..0920e9e2c3 100644 --- a/tests/lib/Repository/Values/User/UserTest.php +++ b/tests/lib/Repository/Values/User/UserTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Values\User; use Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException; @@ -50,17 +51,17 @@ public function testGetName() $contentMock = $this->createMock(Content::class); $versionInfoMock = $this->createMock(VersionInfo::class); - $contentMock->expects($this->once()) + $contentMock->expects(self::once()) ->method('getVersionInfo') ->willReturn($versionInfoMock); - $versionInfoMock->expects($this->once()) + $versionInfoMock->expects(self::once()) ->method('getName') ->willReturn($name); $object = new User(['content' => $contentMock]); - $this->assertEquals($name, $object->getName()); + self::assertEquals($name, $object->getName()); } /** diff --git a/tests/lib/Repository/Values/ValueObjectTestTrait.php b/tests/lib/Repository/Values/ValueObjectTestTrait.php index d92dd19d37..1747fc6597 100644 --- a/tests/lib/Repository/Values/ValueObjectTestTrait.php +++ b/tests/lib/Repository/Values/ValueObjectTestTrait.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Repository\Values; use Ibexa\Contracts\Core\Repository\Values\ValueObject; diff --git a/tests/lib/Search/Common/LocationEventSubscriber/LocationEventSubscriberTest.php b/tests/lib/Search/Common/LocationEventSubscriber/LocationEventSubscriberTest.php index c7fbb1a9a7..4ceed30bb0 100644 --- a/tests/lib/Search/Common/LocationEventSubscriber/LocationEventSubscriberTest.php +++ b/tests/lib/Search/Common/LocationEventSubscriber/LocationEventSubscriberTest.php @@ -56,8 +56,8 @@ public function testOnCreateLocation(): void $this->configurePersistenceHandler($spiContent, $spiLocation); - $this->searchHandler->expects($this->atLeastOnce())->method('indexContent')->with($spiContent); - $this->searchHandler->expects($this->atLeastOnce())->method('indexLocation')->with($spiLocation); + $this->searchHandler->expects(self::atLeastOnce())->method('indexContent')->with($spiContent); + $this->searchHandler->expects(self::atLeastOnce())->method('indexLocation')->with($spiLocation); $this->subscriber->onCreateLocation( new CreateLocationEvent( diff --git a/tests/lib/Search/FieldNameResolverTest.php b/tests/lib/Search/FieldNameResolverTest.php index 03b898e244..3fd6c5b9ab 100644 --- a/tests/lib/Search/FieldNameResolverTest.php +++ b/tests/lib/Search/FieldNameResolverTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Search; use ArrayObject; @@ -28,10 +29,10 @@ public function testGetFieldNamesReturnsEmptyArray() $criterionMock = $this->getCriterionMock(); $mockedFieldNameResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getSearchableFieldMap') ->will( - $this->returnValue( + self::returnValue( [ 'content_type_identifier_1' => [ 'field_definition_identifier_1' => [ @@ -56,8 +57,8 @@ public function testGetFieldNamesReturnsEmptyArray() 'field_name' ); - $this->assertIsArray($fieldNames); - $this->assertEmpty($fieldNames); + self::assertIsArray($fieldNames); + self::assertEmpty($fieldNames); } public function testGetFieldNames() @@ -66,10 +67,10 @@ public function testGetFieldNames() $criterionMock = $this->getCriterionMock(); $mockedFieldNameResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getSearchableFieldMap') ->will( - $this->returnValue( + self::returnValue( [ 'content_type_identifier_1' => [ 'field_definition_identifier_1' => [ @@ -92,10 +93,10 @@ public function testGetFieldNames() ); $mockedFieldNameResolver - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('getIndexFieldName') ->with( - $this->isInstanceOf( + self::isInstanceOf( APICriterion::class ), 'content_type_identifier_1', @@ -103,13 +104,13 @@ public function testGetFieldNames() 'field_type_identifier_1', null ) - ->will($this->returnValue(['index_field_name_1' => null])); + ->will(self::returnValue(['index_field_name_1' => null])); $mockedFieldNameResolver - ->expects($this->at(2)) + ->expects(self::at(2)) ->method('getIndexFieldName') ->with( - $this->isInstanceOf( + self::isInstanceOf( APICriterion::class ), 'content_type_identifier_2', @@ -117,15 +118,15 @@ public function testGetFieldNames() 'field_type_identifier_2', null ) - ->will($this->returnValue(['index_field_name_2' => null])); + ->will(self::returnValue(['index_field_name_2' => null])); $fieldNames = $mockedFieldNameResolver->getFieldNames( $criterionMock, 'field_definition_identifier_1' ); - $this->assertIsArray($fieldNames); - $this->assertEquals( + self::assertIsArray($fieldNames); + self::assertEquals( [ 'index_field_name_1', 'index_field_name_2', @@ -140,10 +141,10 @@ public function testGetFieldNamesWithNamedField() $criterionMock = $this->getCriterionMock(); $mockedFieldNameResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getSearchableFieldMap') ->will( - $this->returnValue( + self::returnValue( [ 'content_type_identifier_1' => [ 'field_definition_identifier_1' => [ @@ -166,10 +167,10 @@ public function testGetFieldNamesWithNamedField() ); $mockedFieldNameResolver - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('getIndexFieldName') ->with( - $this->isInstanceOf( + self::isInstanceOf( APICriterion::class ), 'content_type_identifier_1', @@ -177,13 +178,13 @@ public function testGetFieldNamesWithNamedField() 'field_type_identifier_1', 'field_name' ) - ->will($this->returnValue(['index_field_name_1' => null])); + ->will(self::returnValue(['index_field_name_1' => null])); $mockedFieldNameResolver - ->expects($this->at(2)) + ->expects(self::at(2)) ->method('getIndexFieldName') ->with( - $this->isInstanceOf( + self::isInstanceOf( APICriterion::class ), 'content_type_identifier_2', @@ -191,7 +192,7 @@ public function testGetFieldNamesWithNamedField() 'field_type_identifier_2', 'field_name' ) - ->will($this->returnValue(['index_field_name_2' => null])); + ->will(self::returnValue(['index_field_name_2' => null])); $fieldNames = $mockedFieldNameResolver->getFieldNames( $criterionMock, @@ -200,8 +201,8 @@ public function testGetFieldNamesWithNamedField() 'field_name' ); - $this->assertIsArray($fieldNames); - $this->assertEquals( + self::assertIsArray($fieldNames); + self::assertEquals( [ 'index_field_name_1', 'index_field_name_2', @@ -216,10 +217,10 @@ public function testGetFieldNamesWithTypedField() $criterionMock = $this->getCriterionMock(); $mockedFieldNameResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getSearchableFieldMap') ->will( - $this->returnValue( + self::returnValue( [ 'content_type_identifier_1' => [ 'field_definition_identifier_1' => [ @@ -242,10 +243,10 @@ public function testGetFieldNamesWithTypedField() ); $mockedFieldNameResolver - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('getIndexFieldName') ->with( - $this->isInstanceOf( + self::isInstanceOf( APICriterion::class ), 'content_type_identifier_2', @@ -253,7 +254,7 @@ public function testGetFieldNamesWithTypedField() 'field_type_identifier_2', null ) - ->will($this->returnValue(['index_field_name_1' => null])); + ->will(self::returnValue(['index_field_name_1' => null])); $fieldNames = $mockedFieldNameResolver->getFieldNames( $criterionMock, @@ -262,8 +263,8 @@ public function testGetFieldNamesWithTypedField() null ); - $this->assertIsArray($fieldNames); - $this->assertEquals( + self::assertIsArray($fieldNames); + self::assertEquals( [ 'index_field_name_1', ], @@ -277,10 +278,10 @@ public function testGetFieldNamesWithTypedAndNamedField() $criterionMock = $this->getCriterionMock(); $mockedFieldNameResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getSearchableFieldMap') ->will( - $this->returnValue( + self::returnValue( [ 'content_type_identifier_1' => [ 'field_definition_identifier_1' => [ @@ -303,10 +304,10 @@ public function testGetFieldNamesWithTypedAndNamedField() ); $mockedFieldNameResolver - ->expects($this->at(1)) + ->expects(self::at(1)) ->method('getIndexFieldName') ->with( - $this->isInstanceOf( + self::isInstanceOf( APICriterion::class ), 'content_type_identifier_2', @@ -314,7 +315,7 @@ public function testGetFieldNamesWithTypedAndNamedField() 'field_type_identifier_2', 'field_name' ) - ->will($this->returnValue(['index_field_name_1' => null])); + ->will(self::returnValue(['index_field_name_1' => null])); $fieldNames = $mockedFieldNameResolver->getFieldNames( $criterionMock, @@ -323,8 +324,8 @@ public function testGetFieldNamesWithTypedAndNamedField() 'field_name' ); - $this->assertIsArray($fieldNames); - $this->assertEquals( + self::assertIsArray($fieldNames); + self::assertEquals( [ 'index_field_name_1', ], @@ -338,10 +339,10 @@ public function testGetSortFieldName() $sortClauseMock = $this->getSortClauseMock(); $mockedFieldNameResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getSearchableFieldMap') ->will( - $this->returnValue( + self::returnValue( [ 'content_type_identifier' => [ 'field_definition_identifier' => [ @@ -354,10 +355,10 @@ public function testGetSortFieldName() ); $mockedFieldNameResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getIndexFieldName') ->with( - $this->isInstanceOf( + self::isInstanceOf( APISortClause::class ), 'content_type_identifier', @@ -365,7 +366,7 @@ public function testGetSortFieldName() 'field_type_identifier', 'field_name' ) - ->will($this->returnValue(['index_field_name' => null])); + ->will(self::returnValue(['index_field_name' => null])); $fieldName = $mockedFieldNameResolver->getSortFieldName( $sortClauseMock, @@ -374,7 +375,7 @@ public function testGetSortFieldName() 'field_name' ); - $this->assertEquals('index_field_name', $fieldName); + self::assertEquals('index_field_name', $fieldName); } public function testGetSortFieldNameReturnsNull() @@ -383,10 +384,10 @@ public function testGetSortFieldNameReturnsNull() $sortClauseMock = $this->getSortClauseMock(); $mockedFieldNameResolver - ->expects($this->once()) + ->expects(self::once()) ->method('getSearchableFieldMap') ->will( - $this->returnValue( + self::returnValue( [ 'content_type_identifier' => [ 'field_definition_identifier' => [ @@ -405,7 +406,7 @@ public function testGetSortFieldNameReturnsNull() 'field_name' ); - $this->assertNull($fieldName); + self::assertNull($fieldName); } public function testGetIndexFieldNameCustomField() @@ -414,14 +415,14 @@ public function testGetIndexFieldNameCustomField() $customFieldMock = $this->createMock(CustomFieldInterface::class); $customFieldMock - ->expects($this->once()) + ->expects(self::once()) ->method('getCustomField') ->with( 'content_type_identifier', 'field_definition_identifier' ) ->will( - $this->returnValue('custom_field_name') + self::returnValue('custom_field_name') ); $customFieldName = $mockedFieldNameResolver->getIndexFieldName( @@ -433,7 +434,7 @@ public function testGetIndexFieldNameCustomField() false ); - $this->assertEquals('custom_field_name', key($customFieldName)); + self::assertEquals('custom_field_name', key($customFieldName)); } public function testGetIndexFieldNameNamedField() @@ -443,28 +444,28 @@ public function testGetIndexFieldNameNamedField() $searchFieldTypeMock = $this->getSearchFieldTypeMock(); $this->fieldRegistryMock - ->expects($this->once()) + ->expects(self::once()) ->method('getType') ->with('field_type_identifier') ->will( - $this->returnValue($indexFieldType) + self::returnValue($indexFieldType) ); $indexFieldType - ->expects($this->once()) + ->expects(self::once()) ->method('getIndexDefinition') ->will( - $this->returnValue( + self::returnValue( [ 'field_name' => $searchFieldTypeMock, ] ) ); - $indexFieldType->expects($this->never())->method('getDefaultSortField'); + $indexFieldType->expects(self::never())->method('getDefaultSortField'); $this->fieldNameGeneratorMock - ->expects($this->once()) + ->expects(self::once()) ->method('getName') ->with( 'field_name', @@ -472,18 +473,18 @@ public function testGetIndexFieldNameNamedField() 'content_type_identifier' ) ->will( - $this->returnValue('generated_field_name') + self::returnValue('generated_field_name') ); $this->fieldNameGeneratorMock - ->expects($this->once()) + ->expects(self::once()) ->method('getTypedName') ->with( 'generated_field_name', - $this->isInstanceOf(SPIFieldType::class) + self::isInstanceOf(SPIFieldType::class) ) ->will( - $this->returnValue('generated_typed_field_name') + self::returnValue('generated_typed_field_name') ); $fieldName = $mockedFieldNameResolver->getIndexFieldName( @@ -495,7 +496,7 @@ public function testGetIndexFieldNameNamedField() true ); - $this->assertEquals('generated_typed_field_name', key($fieldName)); + self::assertEquals('generated_typed_field_name', key($fieldName)); } public function testGetIndexFieldNameDefaultMatchField() @@ -505,25 +506,25 @@ public function testGetIndexFieldNameDefaultMatchField() $searchFieldTypeMock = $this->getSearchFieldTypeMock(); $this->fieldRegistryMock - ->expects($this->once()) + ->expects(self::once()) ->method('getType') ->with('field_type_identifier') ->will( - $this->returnValue($indexFieldType) + self::returnValue($indexFieldType) ); $indexFieldType - ->expects($this->once()) + ->expects(self::once()) ->method('getDefaultMatchField') ->will( - $this->returnValue('field_name') + self::returnValue('field_name') ); $indexFieldType - ->expects($this->once()) + ->expects(self::once()) ->method('getIndexDefinition') ->will( - $this->returnValue( + self::returnValue( [ 'field_name' => $searchFieldTypeMock, ] @@ -531,7 +532,7 @@ public function testGetIndexFieldNameDefaultMatchField() ); $this->fieldNameGeneratorMock - ->expects($this->once()) + ->expects(self::once()) ->method('getName') ->with( 'field_name', @@ -539,18 +540,18 @@ public function testGetIndexFieldNameDefaultMatchField() 'content_type_identifier' ) ->will( - $this->returnValue('generated_field_name') + self::returnValue('generated_field_name') ); $this->fieldNameGeneratorMock - ->expects($this->once()) + ->expects(self::once()) ->method('getTypedName') ->with( 'generated_field_name', - $this->isInstanceOf(SPIFieldType::class) + self::isInstanceOf(SPIFieldType::class) ) ->will( - $this->returnValue('generated_typed_field_name') + self::returnValue('generated_typed_field_name') ); $fieldName = $mockedFieldNameResolver->getIndexFieldName( @@ -562,7 +563,7 @@ public function testGetIndexFieldNameDefaultMatchField() false ); - $this->assertEquals('generated_typed_field_name', key($fieldName)); + self::assertEquals('generated_typed_field_name', key($fieldName)); } public function testGetIndexFieldNameDefaultSortField() @@ -572,25 +573,25 @@ public function testGetIndexFieldNameDefaultSortField() $searchFieldTypeMock = $this->getSearchFieldTypeMock(); $this->fieldRegistryMock - ->expects($this->once()) + ->expects(self::once()) ->method('getType') ->with('field_type_identifier') ->will( - $this->returnValue($indexFieldType) + self::returnValue($indexFieldType) ); $indexFieldType - ->expects($this->once()) + ->expects(self::once()) ->method('getDefaultSortField') ->will( - $this->returnValue('field_name') + self::returnValue('field_name') ); $indexFieldType - ->expects($this->once()) + ->expects(self::once()) ->method('getIndexDefinition') ->will( - $this->returnValue( + self::returnValue( [ 'field_name' => $searchFieldTypeMock, ] @@ -598,7 +599,7 @@ public function testGetIndexFieldNameDefaultSortField() ); $this->fieldNameGeneratorMock - ->expects($this->once()) + ->expects(self::once()) ->method('getName') ->with( 'field_name', @@ -606,18 +607,18 @@ public function testGetIndexFieldNameDefaultSortField() 'content_type_identifier' ) ->will( - $this->returnValue('generated_field_name') + self::returnValue('generated_field_name') ); $this->fieldNameGeneratorMock - ->expects($this->once()) + ->expects(self::once()) ->method('getTypedName') ->with( 'generated_field_name', - $this->isInstanceOf(SPIFieldType::class) + self::isInstanceOf(SPIFieldType::class) ) ->will( - $this->returnValue('generated_typed_field_name') + self::returnValue('generated_typed_field_name') ); $fieldName = $mockedFieldNameResolver->getIndexFieldName( @@ -629,7 +630,7 @@ public function testGetIndexFieldNameDefaultSortField() true ); - $this->assertEquals('generated_typed_field_name', key($fieldName)); + self::assertEquals('generated_typed_field_name', key($fieldName)); } public function testGetIndexFieldNameDefaultMatchFieldThrowsRuntimeException() @@ -641,25 +642,25 @@ public function testGetIndexFieldNameDefaultMatchFieldThrowsRuntimeException() $searchFieldTypeMock = $this->getSearchFieldTypeMock(); $this->fieldRegistryMock - ->expects($this->once()) + ->expects(self::once()) ->method('getType') ->with('field_type_identifier') ->will( - $this->returnValue($indexFieldType) + self::returnValue($indexFieldType) ); $indexFieldType - ->expects($this->once()) + ->expects(self::once()) ->method('getDefaultMatchField') ->will( - $this->returnValue('non_existent_field_name') + self::returnValue('non_existent_field_name') ); $indexFieldType - ->expects($this->once()) + ->expects(self::once()) ->method('getIndexDefinition') ->will( - $this->returnValue( + self::returnValue( [ 'field_name' => $searchFieldTypeMock, ] @@ -685,25 +686,25 @@ public function testGetIndexFieldNameDefaultSortFieldThrowsRuntimeException() $searchFieldTypeMock = $this->getSearchFieldTypeMock(); $this->fieldRegistryMock - ->expects($this->once()) + ->expects(self::once()) ->method('getType') ->with('field_type_identifier') ->will( - $this->returnValue($indexFieldType) + self::returnValue($indexFieldType) ); $indexFieldType - ->expects($this->once()) + ->expects(self::once()) ->method('getDefaultSortField') ->will( - $this->returnValue('non_existent_field_name') + self::returnValue('non_existent_field_name') ); $indexFieldType - ->expects($this->once()) + ->expects(self::once()) ->method('getIndexDefinition') ->will( - $this->returnValue( + self::returnValue( [ 'field_name' => $searchFieldTypeMock, ] @@ -731,20 +732,20 @@ public function testGetIndexFieldNameNamedFieldThrowsRuntimeException() $searchFieldTypeMock = $this->getSearchFieldTypeMock(); $this->fieldRegistryMock - ->expects($this->once()) + ->expects(self::once()) ->method('getType') ->with('field_type_identifier') ->will( - $this->returnValue($indexFieldType) + self::returnValue($indexFieldType) ); - $indexFieldType->expects($this->never())->method('getDefaultField'); + $indexFieldType->expects(self::never())->method('getDefaultField'); $indexFieldType - ->expects($this->once()) + ->expects(self::once()) ->method('getIndexDefinition') ->will( - $this->returnValue( + self::returnValue( [ 'field_name' => $searchFieldTypeMock, ] diff --git a/tests/lib/Search/Legacy/Content/AbstractTestCase.php b/tests/lib/Search/Legacy/Content/AbstractTestCase.php index 0ae8a3bf37..5a64d8e15e 100644 --- a/tests/lib/Search/Legacy/Content/AbstractTestCase.php +++ b/tests/lib/Search/Legacy/Content/AbstractTestCase.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Search\Legacy\Content; use Ibexa\Contracts\Core\Persistence\Content\Type\Handler as SPIContentTypeHandler; @@ -61,7 +62,7 @@ protected function setUp(): void protected function assertSearchResults($expectedIds, $searchResult) { $ids = $this->getIds($searchResult); - $this->assertEquals($expectedIds, $ids); + self::assertEquals($expectedIds, $ids); } protected function getIds($searchResult) diff --git a/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php b/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php index ec24e4efcb..94d1329cf2 100644 --- a/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Search\Legacy\Content; use Ibexa\Contracts\Core\Persistence\Content\ContentInfo; @@ -107,11 +108,11 @@ protected function getContentMapperMock() ) ->setMethods(['extractContentInfoFromRows']) ->getMock(); - $mapperMock->expects($this->any()) + $mapperMock->expects(self::any()) ->method('extractContentInfoFromRows') - ->with($this->isType('array')) + ->with(self::isType('array')) ->will( - $this->returnCallback( + self::returnCallback( static function ($rows) { $contentInfoObjs = []; foreach ($rows as $row) { @@ -181,7 +182,7 @@ static function ($hit) { }, $result->searchHits ); - $this->assertEqualsCanonicalizing( + self::assertEqualsCanonicalizing( [4, 10, 11, 12, 13, 14, 42, 226], $ids ); @@ -204,7 +205,7 @@ public function testSortDateModified() ) ); - $this->assertEquals( + self::assertEquals( [4, 12, 13, 42, 10, 14, 11, 226], array_map( static function ($hit) { @@ -232,7 +233,7 @@ public function testSortDatePublished() ) ); - $this->assertEquals( + self::assertEquals( [4, 10, 11, 12, 13, 14, 226, 42], array_map( static function ($hit) { @@ -281,7 +282,7 @@ static function ($hit) { foreach ($idMapSet as $idSet) { $contentIdsSubset = array_slice($contentIds, $index, $count = count($idSet)); $index += $count; - $this->assertEqualsCanonicalizing( + self::assertEqualsCanonicalizing( $idSet, $contentIdsSubset ); @@ -328,13 +329,13 @@ static function ($hit) { $expectedCount += count($set); } - $this->assertEquals($expectedCount, $result->totalCount); + self::assertEquals($expectedCount, $result->totalCount); $index = 0; foreach ($idMapSet as $idSet) { $contentIdsSubset = array_slice($contentIds, $index, $count = count($idSet)); $index += $count; - $this->assertEqualsCanonicalizing( + self::assertEqualsCanonicalizing( $idSet, $contentIdsSubset ); @@ -358,7 +359,7 @@ public function testSortContentName() ) ); - $this->assertEquals( + self::assertEquals( [226, 14, 12, 10, 42, 57, 13, 50, 49, 41, 11, 51, 62, 4, 58, 59, 61, 60, 64, 63, 200, 66, 201], array_map( static function ($hit) { @@ -431,7 +432,7 @@ static function ($hit) { foreach ($idMapSet as $idSet) { $contentIdsSubset = array_slice($contentIds, $index, $count = count($idSet)); $index += $count; - $this->assertEqualsCanonicalizing( + self::assertEqualsCanonicalizing( $idSet, $contentIdsSubset ); @@ -460,7 +461,7 @@ public function testSortFieldNumeric() ) ); - $this->assertEquals( + self::assertEquals( [73, 71, 72, 69], array_map( static function ($hit) { diff --git a/tests/lib/Search/Legacy/Content/HandlerContentTest.php b/tests/lib/Search/Legacy/Content/HandlerContentTest.php index 3f37fe0a27..9d4253e42f 100644 --- a/tests/lib/Search/Legacy/Content/HandlerContentTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerContentTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Search\Legacy\Content; use Ibexa\Contracts\Core\Persistence\Content\ContentInfo; @@ -206,11 +207,11 @@ protected function getContentMapperMock() ) ->setMethods(['extractContentInfoFromRows']) ->getMock(); - $mapperMock->expects($this->any()) + $mapperMock->expects(self::any()) ->method('extractContentInfoFromRows') - ->with($this->isType('array')) + ->with(self::isType('array')) ->will( - $this->returnCallback( + self::returnCallback( static function ($rows) { $contentInfoObjs = []; foreach ($rows as $row) { @@ -257,7 +258,7 @@ public function testFindWithoutOffsetLimit() ) ); - $this->assertEquals( + self::assertEquals( 1, $result->totalCount ); @@ -280,11 +281,11 @@ public function testFindWithZeroLimit() ) ); - $this->assertEquals( + self::assertEquals( 1, $result->totalCount ); - $this->assertEquals( + self::assertEquals( [], $result->searchHits ); @@ -307,11 +308,11 @@ public function testFindWithNullLimit() ) ); - $this->assertEquals( + self::assertEquals( 1, $result->totalCount ); - $this->assertCount( + self::assertCount( 1, $result->searchHits ); @@ -334,11 +335,11 @@ public function testFindWithOffsetToNonexistent() ) ); - $this->assertEquals( + self::assertEquals( 1, $result->totalCount ); - $this->assertCount( + self::assertCount( 0, $result->searchHits ); @@ -350,7 +351,7 @@ public function testFindSingle() $contentInfo = $locator->findSingle(new Criterion\ContentId(10)); - $this->assertEquals(10, $contentInfo->id); + self::assertEquals(10, $contentInfo->id); } public function testFindSingleWithNonSearchableField() @@ -434,7 +435,7 @@ public function testContentIdFilterCount() ) ); - $this->assertSame(2, $result->totalCount); + self::assertSame(2, $result->totalCount); } public function testContentAndCombinatorFilter() @@ -485,12 +486,12 @@ public function testContentOrCombinatorFilter() $expectedContentIds = [4, 10, 12]; - $this->assertEquals( + self::assertEquals( count($expectedContentIds), count($result->searchHits) ); foreach ($result->searchHits as $hit) { - $this->assertContains( + self::assertContains( $hit->valueObject->id, $expectedContentIds ); @@ -795,7 +796,7 @@ public function testStatusFilter() ) ); - $this->assertEquals( + self::assertEquals( 185, $searchResult->totalCount ); @@ -1030,7 +1031,7 @@ public function testFullTextFilterNoStopwordRemoval() ) ); - $this->assertCount( + self::assertCount( 10, array_map( static function ($hit) { diff --git a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php index 29299760a2..5f9c438efc 100644 --- a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Search\Legacy\Content; use Ibexa\Contracts\Core\Persistence\Content\Location as SPILocation; @@ -115,11 +116,11 @@ protected function getLocationMapperMock() ->setMethods(['createLocationsFromRows']) ->getMock(); $mapperMock - ->expects($this->any()) + ->expects(self::any()) ->method('createLocationsFromRows') - ->with($this->isType('array')) + ->with(self::isType('array')) ->will( - $this->returnCallback( + self::returnCallback( static function ($rows) { $locations = []; foreach ($rows as $row) { @@ -154,7 +155,7 @@ public function testNoSorting() ); $ids = $this->getIds($locations); - $this->assertEqualsCanonicalizing( + self::assertEqualsCanonicalizing( [179, 180, 181, 182, 183], $ids ); @@ -330,7 +331,7 @@ public function testSortSectionIdentifier() foreach ($idMapSet as $idSet) { $locationIdsSubset = array_slice($locationIds, $index, $count = count($idSet)); $index += $count; - $this->assertEqualsCanonicalizing( + self::assertEqualsCanonicalizing( $idSet, $locationIdsSubset ); @@ -492,13 +493,13 @@ static function ($hit) { $expectedCount += count($set); } - $this->assertEquals($expectedCount, $result->totalCount); + self::assertEquals($expectedCount, $result->totalCount); $index = 0; foreach ($idMapSet as $idSet) { $locationIdsSubset = array_slice($locationIds, $index, $count = count($idSet)); $index += $count; - $this->assertEqualsCanonicalizing( + self::assertEqualsCanonicalizing( $idSet, $locationIdsSubset ); @@ -567,7 +568,7 @@ static function ($hit) { foreach ($idMapSet as $idSet) { $locationIdsSubset = array_slice($locationIds, $index, $count = count($idSet)); $index += $count; - $this->assertEqualsCanonicalizing( + self::assertEqualsCanonicalizing( $idSet, $locationIdsSubset ); @@ -596,7 +597,7 @@ public function testSortFieldNumeric() ) ); - $this->assertEquals( + self::assertEquals( [75, 73, 74, 71], array_map( static function ($hit) { diff --git a/tests/lib/Search/Legacy/Content/HandlerLocationTest.php b/tests/lib/Search/Legacy/Content/HandlerLocationTest.php index ce1010cfd2..2dd446db8c 100644 --- a/tests/lib/Search/Legacy/Content/HandlerLocationTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerLocationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Search\Legacy\Content; use Ibexa\Contracts\Core\Persistence\Content\Location as SPILocation; @@ -176,11 +177,11 @@ protected function getLocationMapperMock() ->setMethods(['createLocationsFromRows']) ->getMock(); $mapperMock - ->expects($this->any()) + ->expects(self::any()) ->method('createLocationsFromRows') - ->with($this->isType('array')) + ->with(self::isType('array')) ->will( - $this->returnCallback( + self::returnCallback( static function ($rows) { $locations = []; foreach ($rows as $row) { @@ -211,8 +212,8 @@ public function testFindWithoutOffsetLimit() ) ); - $this->assertEquals(1, $searchResult->totalCount); - $this->assertCount(1, $searchResult->searchHits); + self::assertEquals(1, $searchResult->totalCount); + self::assertCount(1, $searchResult->searchHits); } public function testFindWithZeroLimit() @@ -229,8 +230,8 @@ public function testFindWithZeroLimit() ) ); - $this->assertEquals(1, $searchResult->totalCount); - $this->assertEquals([], $searchResult->searchHits); + self::assertEquals(1, $searchResult->totalCount); + self::assertEquals([], $searchResult->searchHits); } /** @@ -250,8 +251,8 @@ public function testFindWithNullLimit() ) ); - $this->assertEquals(1, $searchResult->totalCount); - $this->assertCount(1, $searchResult->searchHits); + self::assertEquals(1, $searchResult->totalCount); + self::assertCount(1, $searchResult->searchHits); } /** @@ -271,8 +272,8 @@ public function testFindWithOffsetToNonexistent() ) ); - $this->assertEquals(1, $searchResult->totalCount); - $this->assertEquals([], $searchResult->searchHits); + self::assertEquals(1, $searchResult->totalCount); + self::assertEquals([], $searchResult->searchHits); } public function testLocationIdFilter() @@ -1055,8 +1056,8 @@ public function testMatchAllFilter() ) ); - $this->assertCount(10, $result->searchHits); - $this->assertEquals(186, $result->totalCount); + self::assertCount(10, $result->searchHits); + self::assertEquals(186, $result->totalCount); $this->assertSearchResults( [2, 5, 12, 13, 14, 15, 43, 44, 45, 48], $result @@ -1147,9 +1148,9 @@ public function testFullTextFilterNoStopwordRemoval() ) ); - $this->assertEquals(26, $result->totalCount); - $this->assertCount(10, $result->searchHits); - $this->assertCount( + self::assertEquals(26, $result->totalCount); + self::assertCount(10, $result->searchHits); + self::assertCount( 10, array_map( static function ($hit) { diff --git a/tests/lib/Search/TestCase.php b/tests/lib/Search/TestCase.php index 7539c6e5c8..4a3e0c8bb8 100644 --- a/tests/lib/Search/TestCase.php +++ b/tests/lib/Search/TestCase.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Search; use PHPUnit\Framework\TestCase as BaseTestCase; diff --git a/tests/lib/Specification/AndSpecificationTest.php b/tests/lib/Specification/AndSpecificationTest.php index 417e30ede8..0cd89cfce2 100644 --- a/tests/lib/Specification/AndSpecificationTest.php +++ b/tests/lib/Specification/AndSpecificationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Specification; use Ibexa\Contracts\Core\Specification\AndSpecification; diff --git a/tests/lib/Specification/BaseSpecificationTest.php b/tests/lib/Specification/BaseSpecificationTest.php index e67f1e99d9..f52e687d8a 100644 --- a/tests/lib/Specification/BaseSpecificationTest.php +++ b/tests/lib/Specification/BaseSpecificationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Specification; use Ibexa\Contracts\Core\Specification\AbstractSpecification; diff --git a/tests/lib/Specification/Content/ContentContainerSpecificationTest.php b/tests/lib/Specification/Content/ContentContainerSpecificationTest.php index 686bb488ce..b11d383ae5 100644 --- a/tests/lib/Specification/Content/ContentContainerSpecificationTest.php +++ b/tests/lib/Specification/Content/ContentContainerSpecificationTest.php @@ -23,7 +23,7 @@ public function testConstructor(): void { $contentTypeSpecification = new ContentContainerSpecification(); - $this->assertInstanceOf(ContentSpecification::class, $contentTypeSpecification); + self::assertInstanceOf(ContentSpecification::class, $contentTypeSpecification); } /** @@ -42,11 +42,11 @@ public function testIsSatisfiedBy( ->getMockForAbstractClass(); $contentMock = $this->createMock(Content::class); - $contentMock->expects($this->once()) + $contentMock->expects(self::once()) ->method('getContentType') ->willReturn($contentTypeMock); - $this->assertEquals( + self::assertEquals( $contentContainerSpecification->isSatisfiedBy($contentMock), $shouldBeSatisfied ); diff --git a/tests/lib/Specification/Content/ContentTypeSpecificationTest.php b/tests/lib/Specification/Content/ContentTypeSpecificationTest.php index 6f077be26c..5f947daeb8 100644 --- a/tests/lib/Specification/Content/ContentTypeSpecificationTest.php +++ b/tests/lib/Specification/Content/ContentTypeSpecificationTest.php @@ -28,7 +28,7 @@ public function testConstructorWithExistingContentTypeIdentifier(): void self::EXISTING_CONTENT_TYPE_IDENTIFIER ); - $this->assertInstanceOf(ContentSpecification::class, $contentTypeSpecification); + self::assertInstanceOf(ContentSpecification::class, $contentTypeSpecification); } public function testConstructorWithNotExistingContentTypeIdentifier(): void @@ -37,7 +37,7 @@ public function testConstructorWithNotExistingContentTypeIdentifier(): void self::NOT_EXISTING_CONTENT_TYPE_IDENTIFIER ); - $this->assertInstanceOf(ContentSpecification::class, $contentTypeSpecification); + self::assertInstanceOf(ContentSpecification::class, $contentTypeSpecification); } /** @@ -59,11 +59,11 @@ public function testIsSatisfiedBy( ->getMockForAbstractClass(); $contentMock = $this->createMock(Content::class); - $contentMock->expects($this->once()) + $contentMock->expects(self::once()) ->method('getContentType') ->willReturn($contentTypeMock); - $this->assertEquals( + self::assertEquals( $contentTypeSpecification->isSatisfiedBy($contentMock), $shouldBeSatisfied ); diff --git a/tests/lib/Specification/NotSpecificationTest.php b/tests/lib/Specification/NotSpecificationTest.php index 43f395c665..747b354ffe 100644 --- a/tests/lib/Specification/NotSpecificationTest.php +++ b/tests/lib/Specification/NotSpecificationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Specification; use Ibexa\Contracts\Core\Specification\NotSpecification; diff --git a/tests/lib/Specification/OrSpecificationTest.php b/tests/lib/Specification/OrSpecificationTest.php index dd2615b532..2c6d03b973 100644 --- a/tests/lib/Specification/OrSpecificationTest.php +++ b/tests/lib/Specification/OrSpecificationTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Tests\Core\Specification; use Ibexa\Contracts\Core\Specification\OrSpecification; From 7c15c3467127180a2fcdc0a8de0e4c79dc22e8c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Niedzielski?= Date: Mon, 29 Apr 2024 13:14:11 +0200 Subject: [PATCH 08/53] IBX-8121: Fixed PHPStan --- tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php b/tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php index c21decc634..d51bf65168 100644 --- a/tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php +++ b/tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php @@ -494,7 +494,7 @@ public function testEvaluate( foreach ($targets as $index => $target) { if ($target instanceof LocationCreateStruct) { $this->getPersistenceMock() - ->expects(self::once($index)) + ->expects(self::once()) ->method('locationHandler') ->will(self::returnValue($this->locationHandlerMock)); From dff5811ba54fea64efe63283c44f776a095c9334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Niedzielski?= Date: Mon, 29 Apr 2024 13:14:31 +0200 Subject: [PATCH 09/53] IBX-8121: Fixed PHPUnit configuration --- phpunit.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index cb60d982af..beedb3ec65 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -24,13 +24,13 @@ tests/bundle/Debug - tests/bundle/Installer + tests/bundle/RepositoryInstaller tests/bundle/IO - tests/bundle/LegacySearchEngineBundle + tests/bundle/LegacySearchEngine From 8a24c4f07fca6a032200aa364d4788669e9b5ef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Niedzielski?= Date: Mon, 6 May 2024 15:55:07 +0200 Subject: [PATCH 10/53] Fixed access to non-existent properties --- phpstan-baseline.neon | 40 ------------------- .../LimitationValidationException.php | 2 +- .../Configuration/Parser/LanguagesTest.php | 2 +- .../EventListener/RoutingListenerTest.php | 2 - .../SessionSetDynamicNameListenerTest.php | 4 -- .../Core/Routing/UrlAliasRouterTest.php | 2 - .../Cache/AbstractBaseHandlerTest.php | 2 +- .../InMemoryClearingProxyAdapterTest.php | 5 ++- 8 files changed, 6 insertions(+), 53 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 4819c04f0a..42c0cbea98 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -8155,11 +8155,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/InvalidArgumentType.php - - - message: "#^Access to an undefined property Ibexa\\\\Core\\\\Base\\\\Exceptions\\\\LimitationValidationException\\:\\:\\$validationErrors\\.$#" - count: 1 - path: src/lib/Base/Exceptions/LimitationValidationException.php - - message: "#^Method Ibexa\\\\Core\\\\Base\\\\Exceptions\\\\LimitationValidationException\\:\\:addParameter\\(\\) has no return type specified\\.$#" count: 1 @@ -23875,11 +23870,6 @@ parameters: count: 1 path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php - - - message: "#^Access to an undefined property Ibexa\\\\Tests\\\\Bundle\\\\Core\\\\DependencyInjection\\\\Configuration\\\\Parser\\\\LanguagesTest\\:\\:\\$minimalConfig\\.$#" - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Bundle\\\\Core\\\\DependencyInjection\\\\Configuration\\\\Parser\\\\LanguagesTest\\:\\:getMinimalConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 @@ -24845,11 +24835,6 @@ parameters: count: 1 path: tests/bundle/Core/EventListener/RequestEventListenerTest.php - - - message: "#^Access to an undefined property Ibexa\\\\Tests\\\\Bundle\\\\Core\\\\EventListener\\\\RoutingListenerTest\\:\\:\\$container\\.$#" - count: 1 - path: tests/bundle/Core/EventListener/RoutingListenerTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Bundle\\\\Core\\\\EventListener\\\\RoutingListenerTest\\:\\:testGetSubscribedEvents\\(\\) has no return type specified\\.$#" count: 1 @@ -24900,11 +24885,6 @@ parameters: count: 1 path: tests/bundle/Core/EventListener/SessionInitByPostListenerTest.php - - - message: "#^Access to an undefined property Ibexa\\\\Tests\\\\Bundle\\\\Core\\\\EventListener\\\\SessionSetDynamicNameListenerTest\\:\\:\\$session\\.$#" - count: 1 - path: tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Bundle\\\\Core\\\\EventListener\\\\SessionSetDynamicNameListenerTest\\:\\:onSiteAccessMatchProvider\\(\\) has no return type specified\\.$#" count: 1 @@ -26030,11 +26010,6 @@ parameters: count: 1 path: tests/bundle/Core/Routing/JsRouting/ExposedRoutesExtractorTest.php - - - message: "#^Access to an undefined property Ibexa\\\\Tests\\\\Bundle\\\\Core\\\\Routing\\\\UrlAliasRouterTest\\:\\:\\$container\\.$#" - count: 1 - path: tests/bundle/Core/Routing/UrlAliasRouterTest.php - - message: "#^Call to an undefined method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Routing\\\\UrlAliasRouter\\:\\:setConfigResolver\\(\\)\\.$#" count: 1 @@ -49090,11 +49065,6 @@ parameters: count: 1 path: tests/lib/Pagination/LocationSearchHitAdapterTest.php - - - message: "#^Access to an undefined property Symfony\\\\Component\\\\Cache\\\\CacheItem\\:\\:\\$defaultLifetime\\.$#" - count: 1 - path: tests/lib/Persistence/Cache/AbstractBaseHandlerTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\Persistence\\\\Cache\\\\AbstractBaseHandlerTest\\:\\:getCacheItem\\(\\) has parameter \\$key with no type specified\\.$#" count: 1 @@ -49370,16 +49340,6 @@ parameters: count: 3 path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - message: "#^Access to an undefined property Symfony\\\\Component\\\\Cache\\\\CacheItem\\:\\:\\$defaultLifetime\\.$#" - count: 1 - path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php - - - - message: "#^Access to an undefined property Symfony\\\\Component\\\\Cache\\\\CacheItem\\:\\:\\$prevTags\\.$#" - count: 1 - path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\Persistence\\\\Cache\\\\Adapter\\\\InMemoryClearingProxyAdapterTest\\:\\:arrayAsGenerator\\(\\) has parameter \\$array with no value type specified in iterable type array\\.$#" count: 1 diff --git a/src/lib/Base/Exceptions/LimitationValidationException.php b/src/lib/Base/Exceptions/LimitationValidationException.php index e826b2f657..a5af9facb6 100644 --- a/src/lib/Base/Exceptions/LimitationValidationException.php +++ b/src/lib/Base/Exceptions/LimitationValidationException.php @@ -35,7 +35,7 @@ class LimitationValidationException extends APILimitationValidationException imp */ public function __construct(array $errors) { - $this->validationErrors = $errors; + $this->errors = $errors; $this->setMessageTemplate('Limitations did not validate'); parent::__construct($this->getBaseTranslation()); } diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php index e3d91b5296..b610cd1b5f 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php @@ -20,7 +20,7 @@ protected function getContainerExtensions(): array protected function getMinimalConfiguration(): array { - return $this->minimalConfig = Yaml::parse(file_get_contents(__DIR__ . '/../../Fixtures/ezpublish_minimal.yml')); + return Yaml::parse(file_get_contents(__DIR__ . '/../../Fixtures/ezpublish_minimal.yml')); } public function testLanguagesSingleSiteaccess() diff --git a/tests/bundle/Core/EventListener/RoutingListenerTest.php b/tests/bundle/Core/EventListener/RoutingListenerTest.php index e6dbf63ee7..062022db67 100644 --- a/tests/bundle/Core/EventListener/RoutingListenerTest.php +++ b/tests/bundle/Core/EventListener/RoutingListenerTest.php @@ -15,7 +15,6 @@ use Ibexa\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator; use Ibexa\Core\MVC\Symfony\SiteAccess; use PHPUnit\Framework\TestCase; -use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\HttpKernelInterface; @@ -33,7 +32,6 @@ class RoutingListenerTest extends TestCase protected function setUp(): void { parent::setUp(); - $this->container = $this->createMock(ContainerInterface::class); $this->configResolver = $this->createMock(ConfigResolverInterface::class); $this->urlAliasRouter = $this->createMock(UrlAliasRouter::class); $this->urlAliasGenerator = $this->createMock(UrlAliasGenerator::class); diff --git a/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php b/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php index 7654eae3b7..9e99dddb69 100644 --- a/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php +++ b/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php @@ -15,7 +15,6 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Session\Session; -use Symfony\Component\HttpFoundation\Session\SessionInterface as SymfonySessionInterface; use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageFactoryInterface; @@ -38,9 +37,6 @@ protected function setUp(): void $this->configResolver = $this->getMockBuilder(ConfigResolverInterface::class) ->disableOriginalConstructor() ->getMock(); - $this->session = $this->getMockBuilder(SymfonySessionInterface::class) - ->disableOriginalConstructor() - ->getMock(); $this->sessionStorage = $this->getMockBuilder(NativeSessionStorage::class) ->disableOriginalConstructor() ->getMock(); diff --git a/tests/bundle/Core/Routing/UrlAliasRouterTest.php b/tests/bundle/Core/Routing/UrlAliasRouterTest.php index e4327497fd..39f8c8c626 100644 --- a/tests/bundle/Core/Routing/UrlAliasRouterTest.php +++ b/tests/bundle/Core/Routing/UrlAliasRouterTest.php @@ -18,7 +18,6 @@ use Ibexa\Core\MVC\Symfony\View\Manager as ViewManager; use Ibexa\Core\Repository\Values\Content\Location; use Ibexa\Tests\Core\MVC\Symfony\Routing\UrlAliasRouterTest as BaseUrlAliasRouterTest; -use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\Routing\Exception\ResourceNotFoundException; use Symfony\Component\Routing\RequestContext; @@ -59,7 +58,6 @@ protected function getRouter(LocationService $locationService, URLAliasService $ protected function resetConfigResolver() { $this->configResolver = $this->createMock(ConfigResolverInterface::class); - $this->container = $this->createMock(ContainerInterface::class); $this->router->setConfigResolver($this->configResolver); } diff --git a/tests/lib/Persistence/Cache/AbstractBaseHandlerTest.php b/tests/lib/Persistence/Cache/AbstractBaseHandlerTest.php index 8577ef7117..4495f26423 100644 --- a/tests/lib/Persistence/Cache/AbstractBaseHandlerTest.php +++ b/tests/lib/Persistence/Cache/AbstractBaseHandlerTest.php @@ -117,7 +117,7 @@ static function ($key, $value, $isHit, $defaultLifetime = 0) { $item->key = $key; $item->value = $value; $item->isHit = $isHit; - $item->defaultLifetime = $defaultLifetime; + $item->expiresAfter($defaultLifetime); $item->isTaggable = true; return $item; diff --git a/tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php b/tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php index d763cd9e84..7340251524 100644 --- a/tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php +++ b/tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php @@ -49,11 +49,12 @@ protected function setUp(): void $this->cacheItemsClosure = \Closure::bind( static function ($key, $value, $isHit, $defaultLifetime = 0, $tags = []) { $item = new CacheItem(); + $item->isTaggable = true; $item->key = $key; $item->value = $value; $item->isHit = $isHit; - $item->prevTags = $tags; - $item->defaultLifetime = $defaultLifetime; + $item->tag($tags); + $item->expiresAfter($defaultLifetime); return $item; }, From ea46ad8add2a563a2967b9e0b4dc4add9cccf075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Niedzielski?= Date: Fri, 10 May 2024 09:32:06 +0200 Subject: [PATCH 11/53] IBX-8119: Fixed tests for 5.0 --- phpstan-baseline.neon | 5 ----- phpunit-integration-legacy-solr.xml | 1 - phpunit-integration-legacy.xml | 1 - phpunit.xml | 1 - .../DependencyInjection/IbexaInstallerExtensionTest.php | 2 +- .../Core/Repository/PermissionResolverTest.php | 4 ++-- tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php | 8 +++----- .../ez_render_content_query.test | 2 +- .../ez_render_content_query_esi.test | 2 +- .../ez_render_location_query.test | 2 +- .../ez_render_location_query_esi.test | 2 +- .../ibexa_render_content_query.test | 2 +- .../ibexa_render_content_query_esi.test | 2 +- .../ibexa_render_location_query.test | 2 +- .../ibexa_render_location_query_esi.test | 2 +- .../Content/FieldValue/Converter/DateAndTimeTest.php | 2 +- tests/lib/Search/FieldNameResolverTest.php | 4 ++-- 17 files changed, 17 insertions(+), 27 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 42c0cbea98..072b8cefea 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -44130,11 +44130,6 @@ parameters: count: 1 path: tests/lib/FieldType/TimeTest.php - - - message: "#^Access to an undefined property Ibexa\\\\Tests\\\\Core\\\\FieldType\\\\Url\\\\Gateway\\\\DoctrineStorageTest\\:\\:\\$storageGateway\\.$#" - count: 1 - path: tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\FieldType\\\\Url\\\\Gateway\\\\DoctrineStorageTest\\:\\:testGetIdUrlMap\\(\\) has no return type specified\\.$#" count: 1 diff --git a/phpunit-integration-legacy-solr.xml b/phpunit-integration-legacy-solr.xml index 2008a3ff12..3d0b871b97 100644 --- a/phpunit-integration-legacy-solr.xml +++ b/phpunit-integration-legacy-solr.xml @@ -8,7 +8,6 @@ convertWarningsToExceptions="true" beStrictAboutTestsThatDoNotTestAnything="false" colors="true" - failOnWarning="true" > diff --git a/phpunit-integration-legacy.xml b/phpunit-integration-legacy.xml index 5a608b168f..5a574be479 100644 --- a/phpunit-integration-legacy.xml +++ b/phpunit-integration-legacy.xml @@ -8,7 +8,6 @@ convertWarningsToExceptions="true" beStrictAboutTestsThatDoNotTestAnything="false" colors="true" - failOnWarning="true" > diff --git a/phpunit.xml b/phpunit.xml index beedb3ec65..8776b68e66 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -7,7 +7,6 @@ convertWarningsToExceptions="true" beStrictAboutTestsThatDoNotTestAnything="false" colors="true" - failOnWarning="true" > diff --git a/tests/bundle/RepositoryInstaller/DependencyInjection/IbexaInstallerExtensionTest.php b/tests/bundle/RepositoryInstaller/DependencyInjection/IbexaInstallerExtensionTest.php index 19ff4e77d1..56b4533d56 100644 --- a/tests/bundle/RepositoryInstaller/DependencyInjection/IbexaInstallerExtensionTest.php +++ b/tests/bundle/RepositoryInstaller/DependencyInjection/IbexaInstallerExtensionTest.php @@ -33,7 +33,7 @@ public function testLoadLoadsTaggedCoreInstaller(): void $this->assertContainerBuilderHasServiceDefinitionWithTag( CoreInstaller::class, InstallerTagPass::INSTALLER_TAG, - ['type' => 'clean'] + ['type' => 'ibexa-oss'] ); } diff --git a/tests/integration/Core/Repository/PermissionResolverTest.php b/tests/integration/Core/Repository/PermissionResolverTest.php index e9785fe175..285d1b4112 100644 --- a/tests/integration/Core/Repository/PermissionResolverTest.php +++ b/tests/integration/Core/Repository/PermissionResolverTest.php @@ -1031,8 +1031,8 @@ public function testLookupLimitationsWithLimitations(): void new LookupPolicyLimitations( $role->getPolicies()[1], [ - new Limitation\SectionLimitation(['limitationValues' => [2]]), new Limitation\LanguageLimitation(['limitationValues' => ['eng-US']]), + new Limitation\SectionLimitation(['limitationValues' => [2]]), ] ), ] @@ -1093,7 +1093,7 @@ public function testLookupLimitationsWithFilteredLimitations(): void new LookupPolicyLimitations( $role->getPolicies()[1], [ - new Limitation\SectionLimitation(['limitationValues' => [2]]), + 1 => new Limitation\SectionLimitation(['limitationValues' => [2]]), ] ), ] diff --git a/tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php b/tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php index 0ca25eabab..7eb8835c53 100644 --- a/tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php +++ b/tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php @@ -16,6 +16,8 @@ */ class DoctrineStorageTest extends TestCase { + private DoctrineStorage $storageGateway; + /** * @covers \Ibexa\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage::getIdUrlMap */ @@ -197,11 +199,7 @@ public function testUnlinkUrl() protected function getStorageGateway(): Gateway { - if (!isset($this->storageGateway)) { - $this->storageGateway = new DoctrineStorage($this->getDatabaseConnection()); - } - - return $this->storageGateway; + return $this->storageGateway ??= new DoctrineStorage($this->getDatabaseConnection()); } } diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ez_render_content_query.test b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ez_render_content_query.test index 50d4150144..93d7f5f4de 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ez_render_content_query.test +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ez_render_content_query.test @@ -12,7 +12,7 @@ return array() --EXPECT-- array ( 0 => - Symfony\Component\HttpKernel\Controller\ControllerReference::__set_state(array( + \Symfony\Component\HttpKernel\Controller\ControllerReference::__set_state(array( 'controller' => 'ibexa_query_render::renderQuery', 'attributes' => array ( diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ez_render_content_query_esi.test b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ez_render_content_query_esi.test index deea30cbe0..41c83b4f6c 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ez_render_content_query_esi.test +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ez_render_content_query_esi.test @@ -12,7 +12,7 @@ return array() --EXPECT-- array ( 0 => - Symfony\Component\HttpKernel\Controller\ControllerReference::__set_state(array( + \Symfony\Component\HttpKernel\Controller\ControllerReference::__set_state(array( 'controller' => 'ibexa_query_render::renderQuery', 'attributes' => array ( diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ez_render_location_query.test b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ez_render_location_query.test index 87d38f00c8..1b2ad20022 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ez_render_location_query.test +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ez_render_location_query.test @@ -12,7 +12,7 @@ return array() --EXPECT-- array ( 0 => - Symfony\Component\HttpKernel\Controller\ControllerReference::__set_state(array( + \Symfony\Component\HttpKernel\Controller\ControllerReference::__set_state(array( 'controller' => 'ibexa_query_render::renderQuery', 'attributes' => array ( diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ez_render_location_query_esi.test b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ez_render_location_query_esi.test index 47138cd606..878942f4a0 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ez_render_location_query_esi.test +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ez_render_location_query_esi.test @@ -12,7 +12,7 @@ return array() --EXPECT-- array ( 0 => - Symfony\Component\HttpKernel\Controller\ControllerReference::__set_state(array( + \Symfony\Component\HttpKernel\Controller\ControllerReference::__set_state(array( 'controller' => 'ibexa_query_render::renderQuery', 'attributes' => array ( diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_content_query.test b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_content_query.test index b827277a24..822184519a 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_content_query.test +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_content_query.test @@ -12,7 +12,7 @@ return array() --EXPECT-- array ( 0 => - Symfony\Component\HttpKernel\Controller\ControllerReference::__set_state(array( + \Symfony\Component\HttpKernel\Controller\ControllerReference::__set_state(array( 'controller' => 'ibexa_query_render::renderQuery', 'attributes' => array ( diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_content_query_esi.test b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_content_query_esi.test index f4781eb192..9f3842ced1 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_content_query_esi.test +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_content_query_esi.test @@ -12,7 +12,7 @@ return array() --EXPECT-- array ( 0 => - Symfony\Component\HttpKernel\Controller\ControllerReference::__set_state(array( + \Symfony\Component\HttpKernel\Controller\ControllerReference::__set_state(array( 'controller' => 'ibexa_query_render::renderQuery', 'attributes' => array ( diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_location_query.test b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_location_query.test index bc1ff47d6c..ce86af76b4 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_location_query.test +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_location_query.test @@ -12,7 +12,7 @@ return array() --EXPECT-- array ( 0 => - Symfony\Component\HttpKernel\Controller\ControllerReference::__set_state(array( + \Symfony\Component\HttpKernel\Controller\ControllerReference::__set_state(array( 'controller' => 'ibexa_query_render::renderQuery', 'attributes' => array ( diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_location_query_esi.test b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_location_query_esi.test index c7e7596d36..24872ce331 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_location_query_esi.test +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_location_query_esi.test @@ -12,7 +12,7 @@ return array() --EXPECT-- array ( 0 => - Symfony\Component\HttpKernel\Controller\ControllerReference::__set_state(array( + \Symfony\Component\HttpKernel\Controller\ControllerReference::__set_state(array( 'controller' => 'ibexa_query_render::renderQuery', 'attributes' => array ( diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php index 9a1afa260e..b369d82a9f 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php @@ -350,7 +350,7 @@ private function getXMLStringFromDateInterval(DateInterval $dateInterval) */ public function testGetDateIntervalFromXML() { - $dateIntervalReference = DateInterval::createFromDateString('2 years, 1 month, -4 days, 2 hours, 0 minute, 34 seconds'); + $dateIntervalReference = DateInterval::createFromDateString('2 years, 1 months, -4 days, 2 hours, 0 minutes, 34 seconds'); $refConverter = new ReflectionObject($this->converter); $refMethod = $refConverter->getMethod('getDateIntervalFromXML'); diff --git a/tests/lib/Search/FieldNameResolverTest.php b/tests/lib/Search/FieldNameResolverTest.php index 3fd6c5b9ab..543bdccdeb 100644 --- a/tests/lib/Search/FieldNameResolverTest.php +++ b/tests/lib/Search/FieldNameResolverTest.php @@ -726,7 +726,7 @@ public function testGetIndexFieldNameNamedFieldThrowsRuntimeException() $this->expectException(\RuntimeException::class); $mockedFieldNameResolver = $this->getMockedFieldNameResolver( - ['getSortFieldName', 'getSearchableFieldMap', 'getFieldNames', 'getFieldTypes', 'getSortFieldName'] + ['getSortFieldName', 'getSearchableFieldMap', 'getFieldNames', 'getFieldTypes'] ); $indexFieldType = $this->getIndexFieldTypeMock(); $searchFieldTypeMock = $this->getSearchFieldTypeMock(); @@ -739,7 +739,7 @@ public function testGetIndexFieldNameNamedFieldThrowsRuntimeException() self::returnValue($indexFieldType) ); - $indexFieldType->expects(self::never())->method('getDefaultField'); + $indexFieldType->expects(self::never())->method('getDefaultMatchField'); $indexFieldType ->expects(self::once()) From fdb152a69bd8f3305641bfa7636831672f4bf024 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 17 May 2024 15:50:09 +0200 Subject: [PATCH 12/53] Wrapped `iterable`s used as arrays with `iterator_to_array` (#372) For more details see https://github.com/ibexa/core/pull/372 Key changes: * Wrapped `iterable`s used as arrays with `iterator_to_array` * [Tests] Wrapped `iterable`s used as arrays with `iterator_to_array` * [PHPStan] Aligned baseline with the changes --- phpstan-baseline.neon | 225 ------------------ .../Command/RegenerateUrlAliasesCommand.php | 3 +- src/contracts/Repository/LanguageService.php | 2 +- .../Repository/Values/User/RoleAssignment.php | 7 +- .../Routing/Generator/UrlAliasGenerator.php | 6 +- .../Legacy/Content/ObjectState/Mapper.php | 4 +- src/lib/Repository/ContentService.php | 12 +- .../Repository/Mapper/ContentDomainMapper.php | 4 +- .../Variation/VariationHandlerRegistry.php | 14 +- .../Core/Repository/ContentServiceTest.php | 38 +-- .../Core/Repository/LanguageServiceTest.php | 4 +- .../LocationServiceAuthorizationTest.php | 2 +- .../Core/Repository/LocationServiceTest.php | 19 +- .../Repository/PermissionResolverTest.php | 6 +- ...6SearchOneContentMultipleLocationsTest.php | 4 +- .../RoleServiceAuthorizationTest.php | 11 +- .../Core/Repository/RoleServiceTest.php | 20 +- .../TrashServiceAuthorizationTest.php | 4 +- .../URLAliasService/UrlAliasLookupTest.php | 2 +- .../Core/Repository/URLAliasServiceTest.php | 2 +- .../Core/Repository/UserServiceTest.php | 4 +- .../DecoratedLocationServiceTest.php | 2 +- .../Repository/Service/Mock/UrlAliasTest.php | 18 +- 23 files changed, 104 insertions(+), 309 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 072b8cefea..f739aadf2e 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -230,11 +230,6 @@ parameters: count: 1 path: src/bundle/Core/Command/RegenerateUrlAliasesCommand.php - - - message: "#^Cannot access offset int on iterable\\\\.$#" - count: 1 - path: src/bundle/Core/Command/RegenerateUrlAliasesCommand.php - - message: "#^Method Ibexa\\\\Bundle\\\\Core\\\\Command\\\\RegenerateUrlAliasesCommand\\:\\:configure\\(\\) has no return type specified\\.$#" count: 1 @@ -245,11 +240,6 @@ parameters: count: 1 path: src/bundle/Core/Command/RegenerateUrlAliasesCommand.php - - - message: "#^Method Ibexa\\\\Bundle\\\\Core\\\\Command\\\\RegenerateUrlAliasesCommand\\:\\:processLocations\\(\\) has no return type specified\\.$#" - count: 1 - path: src/bundle/Core/Command/RegenerateUrlAliasesCommand.php - - message: "#^Parameter \\#2 \\$array of function array_map expects array, iterable\\ given\\.$#" count: 1 @@ -11895,11 +11885,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGeneratorInterface.php - - - message: "#^Cannot access offset 0 on iterable\\\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Routing/Generator/UrlAliasGenerator.php - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Routing\\\\Generator\\\\UrlAliasGenerator\\:\\:__construct\\(\\) has parameter \\$unsafeCharMap with no value type specified in iterable type array\\.$#" count: 1 @@ -16945,11 +16930,6 @@ parameters: count: 1 path: src/lib/Persistence/Legacy/Content/ObjectState/Handler.php - - - message: "#^Cannot access offset int on iterable\\\\.$#" - count: 4 - path: src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php - - message: "#^Method Ibexa\\\\Core\\\\Persistence\\\\Legacy\\\\Content\\\\ObjectState\\\\Mapper\\:\\:createObjectStateFromData\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" count: 1 @@ -19710,16 +19690,6 @@ parameters: count: 2 path: src/lib/Repository/ContentService.php - - - message: "#^Cannot access offset int on iterable\\\\.$#" - count: 1 - path: src/lib/Repository/ContentService.php - - - - message: "#^Cannot access offset string on iterable\\\\.$#" - count: 1 - path: src/lib/Repository/ContentService.php - - message: "#^Cannot access property \\$defaultValue on Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\FieldDefinition\\|null\\.$#" count: 2 @@ -20060,11 +20030,6 @@ parameters: count: 1 path: src/lib/Repository/Mapper/ContentDomainMapper.php - - - message: "#^Cannot access offset mixed on iterable\\\\.$#" - count: 1 - path: src/lib/Repository/Mapper/ContentDomainMapper.php - - message: "#^Cannot call method error\\(\\) on Psr\\\\Log\\\\LoggerInterface\\|null\\.$#" count: 1 @@ -22935,16 +22900,6 @@ parameters: count: 1 path: src/lib/Token/RandomBytesGenerator.php - - - message: "#^Cannot access offset string on iterable\\\\.$#" - count: 3 - path: src/lib/Variation/VariationHandlerRegistry.php - - - - message: "#^Method Ibexa\\\\Core\\\\Variation\\\\VariationHandlerRegistry\\:\\:__construct\\(\\) has parameter \\$variationHandlers with no value type specified in iterable type iterable\\.$#" - count: 1 - path: src/lib/Variation/VariationHandlerRegistry.php - - message: "#^Method Ibexa\\\\Tests\\\\Bundle\\\\Core\\\\ApiLoader\\\\CacheFactoryTest\\:\\:providerGetService\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 @@ -27115,66 +27070,6 @@ parameters: count: 1 path: tests/integration/Core/Repository/ContentServiceTest.php - - - message: "#^Cannot access offset 0 on iterable\\\\.$#" - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: "#^Cannot access offset 0 on iterable\\\\.$#" - count: 5 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: "#^Cannot access offset 0 on iterable\\\\.$#" - count: 12 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: "#^Cannot access offset 0 on iterable\\\\.$#" - count: 11 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: "#^Cannot access offset 1 on iterable\\\\.$#" - count: 4 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: "#^Cannot access offset 1 on iterable\\\\.$#" - count: 3 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: "#^Cannot access offset 2 on iterable\\\\.$#" - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: "#^Cannot access offset 3 on iterable\\\\.$#" - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: "#^Cannot access offset 4 on iterable\\\\.$#" - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: "#^Cannot access offset 5 on iterable\\\\.$#" - count: 2 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: "#^Cannot access offset mixed on iterable\\\\.$#" - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: "#^Cannot access offset mixed on iterable\\\\.$#" - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - message: "#^Cannot access property \\$sortField on Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Location\\|null\\.$#" count: 1 @@ -27960,11 +27855,6 @@ parameters: count: 1 path: tests/integration/Core/Repository/ContentServiceTest.php - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\ContentServiceTest\\:\\:testPublishVersionNotCreatingUnlimitedArchives\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\ContentServiceTest\\:\\:testPublishVersionSetsExpectedContentInfo\\(\\) has no return type specified\\.$#" count: 1 @@ -33930,16 +33820,6 @@ parameters: count: 1 path: tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php - - - message: "#^Cannot access offset 'eng\\-NZ' on iterable\\\\.$#" - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: "#^Cannot access offset mixed on iterable\\\\.$#" - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\LanguageServiceTest\\:\\:loadLanguagesReturnsAnEmptyArrayByDefault\\(\\) has no return type specified\\.$#" count: 1 @@ -34100,11 +33980,6 @@ parameters: count: 1 path: tests/integration/Core/Repository/Limitation/PermissionResolver/LocationLimitationIntegrationTest.php - - - message: "#^Cannot access offset 0 on iterable\\\\.$#" - count: 1 - path: tests/integration/Core/Repository/LocationServiceAuthorizationTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\LocationServiceAuthorizationTest\\:\\:testCopySubtreeThrowsUnauthorizedException\\(\\) has no return type specified\\.$#" count: 1 @@ -34185,21 +34060,6 @@ parameters: count: 1 path: tests/integration/Core/Repository/LocationServiceTest.php - - - message: "#^Cannot access offset 1 on iterable\\\\.$#" - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: "#^Cannot access offset 5 on iterable\\\\.$#" - count: 2 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: "#^Cannot access offset int\\|false on iterable\\\\.$#" - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - message: "#^Cannot access property \\$id on Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Location\\|null\\.$#" count: 11 @@ -34585,16 +34445,6 @@ parameters: count: 1 path: tests/integration/Core/Repository/LocationServiceTest.php - - - message: "#^Parameter \\#1 \\$array of function array_column expects array, iterable\\ given\\.$#" - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: "#^Parameter \\#1 \\$array of function array_column expects array, iterable\\ given\\.$#" - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - message: "#^Parameter \\#1 \\$expectedLocations of method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\LocationServiceTest\\:\\:assertContentHasExpectedLocations\\(\\) expects array\\, array\\ given\\.$#" count: 1 @@ -35150,11 +35000,6 @@ parameters: count: 3 path: tests/integration/Core/Repository/PermissionResolverTest.php - - - message: "#^Cannot access offset 1 on iterable\\\\.$#" - count: 3 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - message: "#^Cannot access property \\$text on Ibexa\\\\Contracts\\\\Core\\\\FieldType\\\\Value\\|null\\.$#" count: 2 @@ -35380,11 +35225,6 @@ parameters: count: 1 path: tests/integration/Core/Repository/Regression/EZP21798Test.php - - - message: "#^Cannot access offset 0 on iterable\\\\.$#" - count: 2 - path: tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\Regression\\\\EZP21906SearchOneContentMultipleLocationsTest\\:\\:searchContentQueryProvider\\(\\) has no return type specified\\.$#" count: 1 @@ -35680,16 +35520,6 @@ parameters: count: 1 path: tests/integration/Core/Repository/RepositoryTest.php - - - message: "#^Cannot access offset 0 on iterable\\\\.$#" - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: "#^Cannot access offset 0 on iterable\\\\.$#" - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\RoleServiceAuthorizationTest\\:\\:testAssignRoleToUserGroupThrowsUnauthorizedException\\(\\) has no return type specified\\.$#" count: 1 @@ -35800,21 +35630,6 @@ parameters: count: 1 path: tests/integration/Core/Repository/RoleServiceTest.php - - - message: "#^Cannot access offset 0 on iterable\\\\.$#" - count: 4 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: "#^Cannot access offset 0 on iterable\\\\.$#" - count: 4 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: "#^Cannot access offset 0 on iterable\\\\.$#" - count: 2 - path: tests/integration/Core/Repository/RoleServiceTest.php - - message: "#^Cannot access property \\$limitation on Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\RoleAssignment\\|false\\.$#" count: 1 @@ -35985,11 +35800,6 @@ parameters: count: 1 path: tests/integration/Core/Repository/RoleServiceTest.php - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\RoleServiceTest\\:\\:testGetRoleAssignments\\(\\) should return array\\ but returns array\\\\|\\(ArrayAccess&iterable\\\\)\\.$#" - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\RoleServiceTest\\:\\:testGetRoleAssignmentsContainExpectedLimitation\\(\\) has no return type specified\\.$#" count: 1 @@ -38275,11 +38085,6 @@ parameters: count: 1 path: tests/integration/Core/Repository/TokenServiceTest.php - - - message: "#^Cannot access offset 0 on iterable\\\\.$#" - count: 1 - path: tests/integration/Core/Repository/TrashServiceAuthorizationTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\TrashServiceAuthorizationTest\\:\\:testDeleteTrashItemThrowsUnauthorizedException\\(\\) has no return type specified\\.$#" count: 1 @@ -38510,11 +38315,6 @@ parameters: count: 1 path: tests/integration/Core/Repository/URLAliasService/CustomUrlAliasForMultilingualContentTest.php - - - message: "#^Cannot access offset 0 on iterable\\\\.$#" - count: 1 - path: tests/integration/Core/Repository/URLAliasService/UrlAliasLookupTest.php - - message: "#^Cannot access property \\$id on Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Location\\|null\\.$#" count: 1 @@ -38550,11 +38350,6 @@ parameters: count: 1 path: tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php - - - message: "#^Cannot access offset 0 on iterable\\\\.$#" - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - message: "#^Cannot call method fetchAll\\(\\) on Doctrine\\\\DBAL\\\\ForwardCompatibility\\\\Result\\|int\\|string\\.$#" count: 3 @@ -39275,11 +39070,6 @@ parameters: count: 1 path: tests/integration/Core/Repository/UserServiceAuthorizationTest.php - - - message: "#^Cannot access offset 0 on iterable\\\\.$#" - count: 2 - path: tests/integration/Core/Repository/UserServiceTest.php - - message: "#^Cannot call method add\\(\\) on DateTimeImmutable\\|false\\|null\\.$#" count: 3 @@ -57370,16 +57160,6 @@ parameters: count: 5 path: tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php - - - message: "#^Cannot access offset 0 on iterable\\\\.$#" - count: 1 - path: tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php - - - - message: "#^Cannot access offset 1 on iterable\\\\.$#" - count: 1 - path: tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php - - message: "#^Cannot access property \\$locations on iterable\\\\.$#" count: 2 @@ -59440,11 +59220,6 @@ parameters: count: 1 path: tests/lib/Repository/Service/Mock/SearchTest.php - - - message: "#^Cannot access offset 0 on iterable\\\\.$#" - count: 3 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\Repository\\\\Service\\\\Mock\\\\UrlAliasTest\\:\\:getPartlyMockedURLAliasServiceService\\(\\) has parameter \\$prioritizedLanguages with no value type specified in iterable type array\\.$#" count: 1 diff --git a/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php b/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php index 6fbbaedc83..55f5a6d15b 100644 --- a/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php +++ b/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php @@ -185,7 +185,7 @@ protected function getProgressBar($maxSteps, OutputInterface $output) * @param \Ibexa\Contracts\Core\Repository\Values\Content\Location[] $locations * @param \Symfony\Component\Console\Helper\ProgressBar $progressBar */ - private function processLocations(array $locations, ProgressBar $progressBar) + private function processLocations(array $locations, ProgressBar $progressBar): void { $contentList = $this->repository->sudo( static function (Repository $repository) use ($locations) { @@ -204,6 +204,7 @@ static function (Location $location) { ); } ); + $contentList = iterator_to_array($contentList); foreach ($locations as $location) { try { // ignore missing Content items diff --git a/src/contracts/Repository/LanguageService.php b/src/contracts/Repository/LanguageService.php index b9c0ec4943..14db698f70 100644 --- a/src/contracts/Repository/LanguageService.php +++ b/src/contracts/Repository/LanguageService.php @@ -108,7 +108,7 @@ public function loadLanguageListByCode(array $languageCodes): iterable; * * @param int[] $languageIds * - * @return \Ibexa\Contracts\Core\Repository\Values\Content\Language[] list of Languages with id as keys + * @return iterable list of Languages with id as keys */ public function loadLanguageListById(array $languageIds): iterable; diff --git a/src/contracts/Repository/Values/User/RoleAssignment.php b/src/contracts/Repository/Values/User/RoleAssignment.php index e7ebbce0ab..47082d5328 100644 --- a/src/contracts/Repository/Values/User/RoleAssignment.php +++ b/src/contracts/Repository/Values/User/RoleAssignment.php @@ -24,7 +24,12 @@ abstract class RoleAssignment extends ValueObject * * @var int */ - protected $id; + protected int $id; + + public function getId(): int + { + return $this->id; + } /** * Returns the limitation of the role assignment. diff --git a/src/lib/MVC/Symfony/Routing/Generator/UrlAliasGenerator.php b/src/lib/MVC/Symfony/Routing/Generator/UrlAliasGenerator.php index d1fec7eb13..ed127630f2 100644 --- a/src/lib/MVC/Symfony/Routing/Generator/UrlAliasGenerator.php +++ b/src/lib/MVC/Symfony/Routing/Generator/UrlAliasGenerator.php @@ -187,12 +187,14 @@ private function createPathString(Location $location, ?string $siteAccess = null if ($siteAccess) { // We generate for a different SiteAccess, so potentially in a different language. $languages = $this->configResolver->getParameter('languages', null, $siteAccess); - $urlAliases = $urlAliasService->listLocationAliases($location, false, null, null, $languages); + $urlAliases = iterator_to_array( + $urlAliasService->listLocationAliases($location, false, null, null, $languages) + ); // Use the target SiteAccess root location $rootLocationId = $this->configResolver->getParameter('content.tree_root.location_id', null, $siteAccess); } else { $languages = null; - $urlAliases = $urlAliasService->listLocationAliases($location, false); + $urlAliases = iterator_to_array($urlAliasService->listLocationAliases($location, false)); $rootLocationId = $this->rootLocationId; } diff --git a/src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php b/src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php index e49d65c827..872b2b3388 100644 --- a/src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php @@ -49,7 +49,7 @@ public function createObjectStateFromData(array $data) foreach ($data as $stateTranslation) { $languageIds[] = (int)$stateTranslation['ezcobj_state_language_language_id'] & ~1; } - $languages = $this->languageHandler->loadList($languageIds); + $languages = iterator_to_array($this->languageHandler->loadList($languageIds)); $objectState->id = (int)$data[0]['ezcobj_state_id']; $objectState->groupId = (int)$data[0]['ezcobj_state_group_id']; @@ -104,7 +104,7 @@ public function createObjectStateGroupFromData(array $data) foreach ($data as $groupTranslation) { $languageIds[] = (int)$groupTranslation['ezcobj_state_group_language_real_language_id']; } - $languages = $this->languageHandler->loadList($languageIds); + $languages = iterator_to_array($this->languageHandler->loadList($languageIds)); $objectStateGroup->id = (int)$data[0]['ezcobj_state_group_id']; $objectStateGroup->identifier = $data[0]['ezcobj_state_group_identifier']; diff --git a/src/lib/Repository/ContentService.php b/src/lib/Repository/ContentService.php index 4aee3f990a..3820c58445 100644 --- a/src/lib/Repository/ContentService.php +++ b/src/lib/Repository/ContentService.php @@ -556,9 +556,11 @@ public function loadContentListByContentInfo( $contentIds, $translations ); - $contentTypeList = $this->repository->getContentTypeService()->loadContentTypeList( - array_unique($contentTypeIds), - $languages + $contentTypeList = iterator_to_array( + $this->repository->getContentTypeService()->loadContentTypeList( + array_unique($contentTypeIds), + $languages + ) ); foreach ($spiContentList as $contentId => $spiContent) { $contentInfo = $spiContent->versionInfo->contentInfo; @@ -1523,7 +1525,9 @@ protected function copyNonTranslatableFieldsFromPublishedVersion(APIContent $cur } $mainLanguageCode = $publishedContent->getVersionInfo()->getContentInfo()->getMainLanguageCode(); - $publishedContentFieldsInMainLanguage = $publishedContent->getFieldsByLanguage($mainLanguageCode); + $publishedContentFieldsInMainLanguage = iterator_to_array( + $publishedContent->getFieldsByLanguage($mainLanguageCode) + ); $fieldValues = []; $persistenceFields = []; diff --git a/src/lib/Repository/Mapper/ContentDomainMapper.php b/src/lib/Repository/Mapper/ContentDomainMapper.php index bf881fbde7..eb6b00e2e2 100644 --- a/src/lib/Repository/Mapper/ContentDomainMapper.php +++ b/src/lib/Repository/Mapper/ContentDomainMapper.php @@ -624,7 +624,9 @@ public function buildContentDomainObjectsOnSearchResult(SearchResult $result, ar } $missingContentList = []; - $contentList = $this->contentHandler->loadContentList($contentIds, array_unique($translations)); + $contentList = iterator_to_array( + $this->contentHandler->loadContentList($contentIds, array_unique($translations)) + ); $contentTypeList = $this->contentTypeHandler->loadContentTypeList(array_unique($contentTypeIds)); foreach ($result->searchHits as $key => $hit) { if (isset($contentList[$hit->valueObject->id])) { diff --git a/src/lib/Variation/VariationHandlerRegistry.php b/src/lib/Variation/VariationHandlerRegistry.php index 6861af5559..220975200f 100644 --- a/src/lib/Variation/VariationHandlerRegistry.php +++ b/src/lib/Variation/VariationHandlerRegistry.php @@ -10,20 +10,18 @@ use Ibexa\Contracts\Core\Exception\InvalidArgumentException; use Ibexa\Contracts\Core\Variation\VariationHandler; -use Traversable; final class VariationHandlerRegistry { - /** @var iterable */ - private iterable $variationHandlers; + /** @var array */ + private array $variationHandlers; + /** + * @param iterable $variationHandlers + */ public function __construct(iterable $variationHandlers) { - $handlers = $variationHandlers instanceof Traversable - ? iterator_to_array($variationHandlers) - : $variationHandlers; - - foreach ($handlers as $identifier => $handler) { + foreach ($variationHandlers as $identifier => $handler) { $this->setVariationHandler($identifier, $handler); } } diff --git a/tests/integration/Core/Repository/ContentServiceTest.php b/tests/integration/Core/Repository/ContentServiceTest.php index ff46b4e9c2..a13cd9368a 100644 --- a/tests/integration/Core/Repository/ContentServiceTest.php +++ b/tests/integration/Core/Repository/ContentServiceTest.php @@ -665,7 +665,7 @@ public function testLoadContentInfoThrowsNotFoundException() public function testLoadContentInfoList() { $mediaFolderId = $this->generateId('object', self::MEDIA_CONTENT_ID); - $list = $this->contentService->loadContentInfoList([$mediaFolderId]); + $list = iterator_to_array($this->contentService->loadContentInfoList([$mediaFolderId])); self::assertCount(1, $list); self::assertEquals([$mediaFolderId], array_keys($list), 'Array key was not content id'); @@ -867,7 +867,7 @@ public function testLoadVersionInfoByIdGetInitialLanguage(VersionInfo $versionIn */ public function testLoadVersionInfoByIdGetLanguages(VersionInfo $versionInfo): void { - $actualLanguages = $versionInfo->getLanguages(); + $actualLanguages = iterator_to_array($versionInfo->getLanguages()); $expectedLanguages = ['eng-US']; foreach ($expectedLanguages as $i => $expectedLanguage) { @@ -2000,12 +2000,12 @@ public function testPublishVersionFromOldContentDraftArchivesNewerVersionNo() * * @depends testPublishVersionFromContentDraft */ - public function testPublishVersionNotCreatingUnlimitedArchives() + public function testPublishVersionNotCreatingUnlimitedArchives(): void { $content = $this->createContentVersion1(); // load first to make sure list gets updated also (cache) - $versionInfoList = $this->contentService->loadVersions($content->contentInfo); + $versionInfoList = iterator_to_array($this->contentService->loadVersions($content->contentInfo)); self::assertCount(1, $versionInfoList); self::assertEquals(1, $versionInfoList[0]->versionNo); @@ -2033,7 +2033,7 @@ public function testPublishVersionNotCreatingUnlimitedArchives() $draftedContentVersion = $this->contentService->createContentDraft($content->contentInfo); $this->contentService->publishVersion($draftedContentVersion->getVersionInfo()); - $versionInfoList = $this->contentService->loadVersions($content->contentInfo); + $versionInfoList = iterator_to_array($this->contentService->loadVersions($content->contentInfo)); self::assertCount(6, $versionInfoList); self::assertEquals(2, $versionInfoList[0]->versionNo); @@ -2433,7 +2433,7 @@ public function testLoadContentDrafts() $this->contentService->createContentDraft($demoDesignContentInfo); // Now $contentDrafts should contain two drafted versions - $draftedVersions = $this->contentService->loadContentDrafts(); + $draftedVersions = iterator_to_array($this->contentService->loadContentDrafts()); $actual = [ $draftedVersions[0]->status, @@ -2479,8 +2479,8 @@ public function testLoadContentDraftsWithFirstParameter() $this->permissionResolver->setCurrentUserReference($oldCurrentUser); // Now $contentDrafts for the previous current user and the new user - $newCurrentUserDrafts = $this->contentService->loadContentDrafts($user); - $oldCurrentUserDrafts = $this->contentService->loadContentDrafts(); + $newCurrentUserDrafts = iterator_to_array($this->contentService->loadContentDrafts($user)); + $oldCurrentUserDrafts = iterator_to_array($this->contentService->loadContentDrafts()); self::assertSame([], $oldCurrentUserDrafts); @@ -3178,7 +3178,9 @@ public function testDeleteVersion() // Delete the previously created draft $this->contentService->deleteVersion($draft->getVersionInfo()); - $versions = $this->contentService->loadVersions($content->getVersionInfo()->getContentInfo()); + $versions = iterator_to_array( + $this->contentService->loadVersions($content->getVersionInfo()->getContentInfo()) + ); self::assertCount(1, $versions); self::assertEquals( @@ -3659,7 +3661,7 @@ public function testLoadRelations() { $draft = $this->createContentWithRelations(); - $relations = $this->contentService->loadRelations($draft->getVersionInfo()); + $relations = iterator_to_array($this->contentService->loadRelations($draft->getVersionInfo())); usort( $relations, @@ -3732,7 +3734,7 @@ public function testLoadRelationsSkipsArchivedContent() $trashService->trash($demoDesignLocation); // Load all relations - $relations = $this->contentService->loadRelations($draft->getVersionInfo()); + $relations = iterator_to_array($this->contentService->loadRelations($draft->getVersionInfo())); self::assertCount(1, $relations); self::assertEquals( @@ -3783,7 +3785,7 @@ public function testLoadRelationsSkipsDraftContent() $demoDesign ); - $relations = $this->contentService->loadRelations($mediaDraft->getVersionInfo()); + $relations = iterator_to_array($this->contentService->loadRelations($mediaDraft->getVersionInfo())); self::assertCount(1, $relations); self::assertEquals( @@ -3970,7 +3972,7 @@ public function testLoadReverseRelations() $this->contentService->publishVersion($demoDesignDraft->getVersionInfo()); $relations = $this->contentService->loadRelations($versionInfo); - $reverseRelations = $this->contentService->loadReverseRelations($contentInfo); + $reverseRelations = iterator_to_array($this->contentService->loadReverseRelations($contentInfo)); self::assertEquals($contentInfo->id, $relation1->getDestinationContentInfo()->id); self::assertEquals($mediaDraft->id, $relation1->getSourceContentInfo()->id); @@ -4062,7 +4064,7 @@ public function testLoadReverseRelationsSkipsArchivedContent() // Load all relations $relations = $this->contentService->loadRelations($versionInfo); - $reverseRelations = $this->contentService->loadReverseRelations($contentInfo); + $reverseRelations = iterator_to_array($this->contentService->loadReverseRelations($contentInfo)); self::assertEquals($contentInfo->id, $relation1->getDestinationContentInfo()->id); self::assertEquals($mediaDraft->id, $relation1->getSourceContentInfo()->id); @@ -4126,7 +4128,7 @@ public function testLoadReverseRelationsSkipsDraftContent() // will not be loaded as reverse relation for "Media" page $relations = $this->contentService->loadRelations($media->versionInfo); - $reverseRelations = $this->contentService->loadReverseRelations($media->contentInfo); + $reverseRelations = iterator_to_array($this->contentService->loadReverseRelations($media->contentInfo)); self::assertEquals($media->contentInfo->id, $relation1->getDestinationContentInfo()->id); self::assertEquals($newDraftVersionInfo->contentInfo->id, $relation1->getSourceContentInfo()->id); @@ -5998,7 +6000,7 @@ public function testLoadVersionsAfterDeletingTwoDrafts() $this->updateFolder($content, [self::ENG_GB => 'Foo3']); $this->updateFolder($content, [self::ENG_GB => 'Foo4']); - $versions = $this->contentService->loadVersions($content->contentInfo); + $versions = iterator_to_array($this->contentService->loadVersions($content->contentInfo)); foreach ($versions as $key => $version) { if ($version->isDraft()) { @@ -6518,7 +6520,7 @@ public function testHideContentWithParentLocation() $this->contentService->hideContent($publishedContent->contentInfo); - $locations = $this->locationService->loadLocations($publishedContent->contentInfo); + $locations = iterator_to_array($this->locationService->loadLocations($publishedContent->contentInfo)); $childContentCreate = $this->contentService->newContentCreateStruct($contentType, self::ENG_US); $childContentCreate->setField('name', 'Child'); @@ -6534,7 +6536,7 @@ public function testHideContentWithParentLocation() $publishedChildContent = $this->contentService->publishVersion($childContent->versionInfo); - $childLocations = $this->locationService->loadLocations($publishedChildContent->contentInfo); + $childLocations = iterator_to_array($this->locationService->loadLocations($publishedChildContent->contentInfo)); self::assertTrue($locations[0]->hidden); self::assertTrue($locations[0]->invisible); diff --git a/tests/integration/Core/Repository/LanguageServiceTest.php b/tests/integration/Core/Repository/LanguageServiceTest.php index 82d74732c3..38d22dd396 100644 --- a/tests/integration/Core/Repository/LanguageServiceTest.php +++ b/tests/integration/Core/Repository/LanguageServiceTest.php @@ -182,7 +182,7 @@ public function testLoadLanguageById() $language ); - $languages = $languageService->loadLanguageListById([$languageId]); + $languages = iterator_to_array($languageService->loadLanguageListById([$languageId])); self::assertIsIterable($languages); self::assertCount(1, $languages); @@ -377,7 +377,7 @@ public function testLoadLanguage() $language ); - $languages = $languageService->loadLanguageListByCode(['eng-NZ']); + $languages = iterator_to_array($languageService->loadLanguageListByCode(['eng-NZ'])); self::assertIsIterable($languages); self::assertCount(1, $languages); diff --git a/tests/integration/Core/Repository/LocationServiceAuthorizationTest.php b/tests/integration/Core/Repository/LocationServiceAuthorizationTest.php index c503f98966..b00d9dbc3d 100644 --- a/tests/integration/Core/Repository/LocationServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/LocationServiceAuthorizationTest.php @@ -225,7 +225,7 @@ public function testLoadLocationsNoAccess() $editorGroupContentInfo = $repository->getContentService()->loadContentInfo($editorsGroupId); // this should return one location for admin - $locations = $locationService->loadLocations($editorGroupContentInfo); + $locations = iterator_to_array($locationService->loadLocations($editorGroupContentInfo)); self::assertCount(1, $locations); self::assertInstanceOf(Location::class, $locations[0]); diff --git a/tests/integration/Core/Repository/LocationServiceTest.php b/tests/integration/Core/Repository/LocationServiceTest.php index 709eef3a7d..4f14bcadd0 100644 --- a/tests/integration/Core/Repository/LocationServiceTest.php +++ b/tests/integration/Core/Repository/LocationServiceTest.php @@ -686,7 +686,7 @@ public function testLoadLocationList(): void // 5 is the ID of an existing location, 442 is a non-existing id $locationService = $repository->getLocationService(); - $locations = $locationService->loadLocationList([5, 442]); + $locations = iterator_to_array($locationService->loadLocationList([5, 442])); self::assertIsIterable($locations); self::assertCount(1, $locations); @@ -731,7 +731,7 @@ public function testLoadLocationListPrioritizedLanguagesFallbackAndAlwaysAvailab // 5 is the ID of an existing location, 442 is a non-existing id $locationService = $repository->getLocationService(); - $locations = $locationService->loadLocationList([5, 442], ['pol-PL'], true); + $locations = iterator_to_array($locationService->loadLocationList([5, 442], ['pol-PL'], true)); self::assertIsIterable($locations); self::assertCount(1, $locations); @@ -751,7 +751,7 @@ public function testLoadLocationListWithRootLocationId() // 1 is the ID of an root location $locationService = $repository->getLocationService(); - $locations = $locationService->loadLocationList([1]); + $locations = iterator_to_array($locationService->loadLocationList([1])); self::assertIsIterable($locations); self::assertCount(1, $locations); @@ -778,7 +778,7 @@ public function testLoadLocationListInCorrectOrder() // Call loadLocation to cache it in memory as it might possibly affect list order $locationService->loadLocation($cachedLocationId); - $locations = $locationService->loadLocationList($locationIdsToLoad); + $locations = iterator_to_array($locationService->loadLocationList($locationIdsToLoad)); $locationIds = array_column($locations, 'id'); self::assertEquals($locationIdsToLoad, $locationIds); @@ -1723,15 +1723,15 @@ public function testSwapLocationForContentWithCustomUrlAliases(): void $urlAlias = $urlAliasService->createUrlAlias($location1, '/custom-location1', 'eng-GB', false, true); $urlAliasService->createUrlAlias($location1, '/custom-location1', 'pol-PL', false, true); $urlAliasService->createUrlAlias($location2, '/custom-location2', 'eng-GB', false, true); - $location1UrlAliases = $urlAliasService->listLocationAliases($location1); - $location2UrlAliases = $urlAliasService->listLocationAliases($location2); + $location1UrlAliases = iterator_to_array($urlAliasService->listLocationAliases($location1)); + $location2UrlAliases = iterator_to_array($urlAliasService->listLocationAliases($location2)); $locationService->swapLocation($location1, $location2); $location1 = $locationService->loadLocation($location1->contentInfo->mainLocationId); $location2 = $locationService->loadLocation($location2->contentInfo->mainLocationId); - $location1UrlAliasesAfterSwap = $urlAliasService->listLocationAliases($location1); - $location2UrlAliasesAfterSwap = $urlAliasService->listLocationAliases($location2); + $location1UrlAliasesAfterSwap = iterator_to_array($urlAliasService->listLocationAliases($location1)); + $location2UrlAliasesAfterSwap = iterator_to_array($urlAliasService->listLocationAliases($location2)); $keyUrlAlias = array_search($urlAlias->id, array_column($location1UrlAliasesAfterSwap, 'id')); @@ -3745,8 +3745,7 @@ private function assertAliasExists( Location $location, URLAliasServiceInterface $urlAliasService ): void { - $articleAliasesBeforeDelete = $urlAliasService - ->listLocationAliases($location); + $articleAliasesBeforeDelete = iterator_to_array($urlAliasService->listLocationAliases($location)); self::assertNotEmpty( array_filter( diff --git a/tests/integration/Core/Repository/PermissionResolverTest.php b/tests/integration/Core/Repository/PermissionResolverTest.php index 285d1b4112..90e1f3f8c1 100644 --- a/tests/integration/Core/Repository/PermissionResolverTest.php +++ b/tests/integration/Core/Repository/PermissionResolverTest.php @@ -1029,7 +1029,7 @@ public function testLookupLimitationsWithLimitations(): void [], [ new LookupPolicyLimitations( - $role->getPolicies()[1], + [...$role->getPolicies()][1], [ new Limitation\LanguageLimitation(['limitationValues' => ['eng-US']]), new Limitation\SectionLimitation(['limitationValues' => [2]]), @@ -1091,7 +1091,7 @@ public function testLookupLimitationsWithFilteredLimitations(): void [], [ new LookupPolicyLimitations( - $role->getPolicies()[1], + [...$role->getPolicies()][1], [ 1 => new Limitation\SectionLimitation(['limitationValues' => [2]]), ] @@ -1147,7 +1147,7 @@ public function testLookupLimitationsWithRoleLimitationsHasAccess(): void [$roleLimitation], [ new LookupPolicyLimitations( - $role->getPolicies()[1], + [...$role->getPolicies()][1], [new Limitation\LanguageLimitation(['limitationValues' => ['eng-US']])] ), ] diff --git a/tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php b/tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php index e3435bcf7f..23f7dd0e6d 100644 --- a/tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php +++ b/tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php @@ -38,7 +38,7 @@ protected function setUp(): void [$locationService->newLocationCreateStruct(2)] ); $folder1 = $contentService->publishVersion($draft1->versionInfo); - $locationsFolder1 = $locationService->loadLocations($folder1->contentInfo); + $locationsFolder1 = iterator_to_array($locationService->loadLocations($folder1->contentInfo)); $contentCreateStruct2 = $contentService->newContentCreateStruct( $contentTypeService->loadContentTypeByIdentifier('folder'), @@ -50,7 +50,7 @@ protected function setUp(): void [$locationService->newLocationCreateStruct(2)] ); $folder2 = $contentService->publishVersion($draft2->versionInfo); - $locationsFolder2 = $locationService->loadLocations($folder2->contentInfo); + $locationsFolder2 = iterator_to_array($locationService->loadLocations($folder2->contentInfo)); $feedbackFormContentInfo = $contentService->loadContentInfo(58); $locationCreateStruct1 = $locationService->newLocationCreateStruct($locationsFolder1[0]->id); diff --git a/tests/integration/Core/Repository/RoleServiceAuthorizationTest.php b/tests/integration/Core/Repository/RoleServiceAuthorizationTest.php index 58e76ab082..8a36532a93 100644 --- a/tests/integration/Core/Repository/RoleServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/RoleServiceAuthorizationTest.php @@ -9,6 +9,8 @@ use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\SubtreeLimitation; +use Ibexa\Contracts\Core\Repository\Values\User\PolicyDraft; +use Ibexa\Contracts\Core\Repository\Values\User\UserRoleAssignment; /** * Test case for operations in the RoleService using in memory storage. @@ -279,7 +281,9 @@ public function testRemovePolicyThrowsUnauthorizedException() $permissionResolver->setCurrentUserReference($user); // This call will fail with an "UnauthorizedException" - $roleService->removePolicyByRoleDraft($roleDraft, $roleDraft->getPolicies()[0]); + $policyDraft = [...$roleDraft->getPolicies()][0]; + self::assertInstanceOf(PolicyDraft::class, $policyDraft); + $roleService->removePolicyByRoleDraft($roleDraft, $policyDraft); /* END: Use Case */ } @@ -613,11 +617,12 @@ public function testGetRoleAssignmentsForUserWithSubtreeLimitation() $repository->getPermissionResolver()->setCurrentUserReference($user); /* END: Use Case */ - $roleAssignments = $roleService->getRoleAssignmentsForUser($user); + $roleAssignments = iterator_to_array($roleService->getRoleAssignmentsForUser($user)); self::assertCount(1, $roleAssignments); $roleAssignment = $roleAssignments[0]; - self::assertSame($user, $roleAssignment->user); + self::assertInstanceOf(UserRoleAssignment::class, $roleAssignment); + self::assertSame($user, $roleAssignment->getUser()); } /** diff --git a/tests/integration/Core/Repository/RoleServiceTest.php b/tests/integration/Core/Repository/RoleServiceTest.php index 63658b8206..4e2d424375 100644 --- a/tests/integration/Core/Repository/RoleServiceTest.php +++ b/tests/integration/Core/Repository/RoleServiceTest.php @@ -1799,7 +1799,7 @@ public function testAddPolicyWithRoleAssignment() $role = $roleService->loadRole($roleDraft->id); $roleService->assignRoleToUserGroup($role, $userGroup); - $roleAssignmentsBeforeNewPolicy = $roleService->getRoleAssignments($role)[0]; + $roleAssignmentsBeforeNewPolicy = [...$roleService->getRoleAssignments($role)][0]; /* Add new policy to existing role */ $roleUpdateDraft = $roleService->createRoleDraft($role); @@ -1810,10 +1810,10 @@ public function testAddPolicyWithRoleAssignment() $roleService->publishRoleDraft($roleUpdateDraft); $roleAfterUpdate = $roleService->loadRole($role->id); - $roleAssignmentsAfterNewPolicy = $roleService->getRoleAssignments($roleAfterUpdate)[0]; + $roleAssignmentsAfterNewPolicy = [...$roleService->getRoleAssignments($roleAfterUpdate)][0]; /* END: Use Case */ - self::assertNotEquals($roleAssignmentsBeforeNewPolicy->id, $roleAssignmentsAfterNewPolicy->id); + self::assertNotEquals($roleAssignmentsBeforeNewPolicy->getId(), $roleAssignmentsAfterNewPolicy->getId()); } /** @@ -1840,9 +1840,9 @@ public function testLoadRoleAssignment() // Assignment to user $role = $roleService->loadRole(2); $roleService->assignRoleToUser($role, $user); - $userRoleAssignments = $roleService->getRoleAssignmentsForUser($user); + $userRoleAssignments = iterator_to_array($roleService->getRoleAssignmentsForUser($user)); - $userRoleAssignment = $roleService->loadRoleAssignment($userRoleAssignments[0]->id); + $userRoleAssignment = $roleService->loadRoleAssignment($userRoleAssignments[0]->getId()); /* END: Use Case */ self::assertInstanceOf(UserGroupRoleAssignment::class, $groupRoleAssignment); @@ -1886,7 +1886,7 @@ public function testGetRoleAssignments() $role = $roleService->loadRoleByIdentifier('Editor'); // Load all assigned users and user groups - $roleAssignments = $roleService->getRoleAssignments($role); + $roleAssignments = iterator_to_array($roleService->getRoleAssignments($role)); /* END: Use Case */ @@ -1937,7 +1937,7 @@ public function testLoadRoleAssignments(): void $loadedRole = $roleService->loadRole($role->id); - $roleAssignments = $roleService->loadRoleAssignments($loadedRole, 0, 1); + $roleAssignments = iterator_to_array($roleService->loadRoleAssignments($loadedRole, 0, 1)); self::assertCount(1, $roleAssignments); self::assertInstanceOf(UserRoleAssignment::class, $roleAssignments[0]); @@ -2800,7 +2800,7 @@ public function testUnassignRoleByAssignment() $newAssignmentCount = count($roleService->getRoleAssignmentsForUser($user)); self::assertEquals($originalAssignmentCount + 1, $newAssignmentCount); - $assignments = $roleService->getRoleAssignmentsForUser($user); + $assignments = iterator_to_array($roleService->getRoleAssignmentsForUser($user)); $roleService->removeRoleAssignment($assignments[0]); $finalAssignmentCount = count($roleService->getRoleAssignmentsForUser($user)); self::assertEquals($newAssignmentCount - 1, $finalAssignmentCount); @@ -2822,7 +2822,7 @@ public function testUnassignRoleByAssignmentThrowsUnauthorizedException() try { $adminUserGroup = $repository->getUserService()->loadUserGroup(12); - $assignments = $roleService->getRoleAssignmentsForUserGroup($adminUserGroup); + $assignments = iterator_to_array($roleService->getRoleAssignmentsForUserGroup($adminUserGroup)); $roleService->removeRoleAssignment($assignments[0]); } catch (Exception $e) { self::fail( @@ -2847,7 +2847,7 @@ public function testUnassignRoleByAssignmentThrowsNotFoundException() try { $editorsUserGroup = $repository->getUserService()->loadUserGroup(13); - $assignments = $roleService->getRoleAssignmentsForUserGroup($editorsUserGroup); + $assignments = iterator_to_array($roleService->getRoleAssignmentsForUserGroup($editorsUserGroup)); $roleService->removeRoleAssignment($assignments[0]); } catch (Exception $e) { self::fail( diff --git a/tests/integration/Core/Repository/TrashServiceAuthorizationTest.php b/tests/integration/Core/Repository/TrashServiceAuthorizationTest.php index 0bf404e336..a2eaf0850d 100644 --- a/tests/integration/Core/Repository/TrashServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/TrashServiceAuthorizationTest.php @@ -312,8 +312,8 @@ public function testTrashRequiresPremissionsToRemoveAllSubitems() $objectStateService->loadObjectStateGroup(2), $objectStateService->loadObjectState(2) ); - $parentLocation = $locationService->loadLocations($parentContent->contentInfo)[0]; - $childContent = $this->createFolder(['eng-US' => 'Child Folder'], $parentLocation->id); + $parentLocation = [...$locationService->loadLocations($parentContent->contentInfo)][0]; + $this->createFolder(['eng-US' => 'Child Folder'], $parentLocation->id); $this->refreshSearch($repository); $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/URLAliasService/UrlAliasLookupTest.php b/tests/integration/Core/Repository/URLAliasService/UrlAliasLookupTest.php index d61140be32..860e8fb8e7 100644 --- a/tests/integration/Core/Repository/URLAliasService/UrlAliasLookupTest.php +++ b/tests/integration/Core/Repository/URLAliasService/UrlAliasLookupTest.php @@ -28,7 +28,7 @@ public function testLookup(): void $folderMainLocation->id, $urlAlias->destination ); - $systemUrlAliasList = $urlAliasService->listLocationAliases($folderMainLocation, false); + $systemUrlAliasList = iterator_to_array($urlAliasService->listLocationAliases($folderMainLocation, false)); self::assertCount(1, $systemUrlAliasList); self::assertEquals($urlAlias, $systemUrlAliasList[0]); } diff --git a/tests/integration/Core/Repository/URLAliasServiceTest.php b/tests/integration/Core/Repository/URLAliasServiceTest.php index ce03cf089b..5f1392bbf9 100644 --- a/tests/integration/Core/Repository/URLAliasServiceTest.php +++ b/tests/integration/Core/Repository/URLAliasServiceTest.php @@ -1064,7 +1064,7 @@ public function testLookupOnRenamedParent() // 5. Navigate to "Article" $urlAliasService->lookup('/My-Folder/My-Article'); - $aliases = $urlAliasService->listLocationAliases($articleLocation, false); + $aliases = iterator_to_array($urlAliasService->listLocationAliases($articleLocation, false)); self::assertEquals('/My-Folder-Modified/My-Article', $aliases[0]->path); } diff --git a/tests/integration/Core/Repository/UserServiceTest.php b/tests/integration/Core/Repository/UserServiceTest.php index 3665012aa3..f89b0b74ca 100644 --- a/tests/integration/Core/Repository/UserServiceTest.php +++ b/tests/integration/Core/Repository/UserServiceTest.php @@ -1589,7 +1589,7 @@ public function testLoadUserByEmail(): void $user = $this->createUserVersion1(); // Load the newly created user - $usersReloaded = $userService->loadUsersByEmail('user@example.com', Language::ALL); + $usersReloaded = iterator_to_array($userService->loadUsersByEmail('user@example.com', Language::ALL)); self::assertCount(1, $usersReloaded); $this->assertIsSameUser($user, $usersReloaded[0]); @@ -1775,7 +1775,7 @@ public function testUpdateUserEmail(): void self::assertInstanceOf(User::class, $updatedUser); // Check that we can load user by email - $users = $userService->loadUsersByEmail('user2@example.com'); + $users = iterator_to_array($userService->loadUsersByEmail('user2@example.com')); self::assertCount(1, $users); self::assertInstanceOf(User::class, $users[0]); } diff --git a/tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php b/tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php index 7d74b7bab3..7904333c0c 100644 --- a/tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php +++ b/tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php @@ -132,7 +132,7 @@ public function testLoadLocations(): void ->method('setMapping') ->withConsecutive([1, 2], [3, 4]); - $actualLocations = $this->locationService->loadLocations($contentInfo); + $actualLocations = iterator_to_array($this->locationService->loadLocations($contentInfo)); $location1 = $actualLocations[0]; self::assertInstanceOf(Location::class, $location1); diff --git a/tests/lib/Repository/Service/Mock/UrlAliasTest.php b/tests/lib/Repository/Service/Mock/UrlAliasTest.php index 96e419ca44..1a63a1960a 100644 --- a/tests/lib/Repository/Service/Mock/UrlAliasTest.php +++ b/tests/lib/Repository/Service/Mock/UrlAliasTest.php @@ -753,7 +753,7 @@ public function testListLocationAliasesWithShowAllTranslations() ->willReturn([$spiUrlAlias]); $location = $this->getLocationStub(); - $urlAliases = $urlAliasService->listLocationAliases($location, false, null); + $urlAliases = iterator_to_array($urlAliasService->listLocationAliases($location, false)); self::assertCount(1, $urlAliases); self::assertInstanceOf(URLAlias::class, $urlAliases[0]); @@ -809,12 +809,14 @@ public function testListLocationAliasesWithShowAllTranslationsCustomConfiguratio ->willReturn([$spiUrlAlias]); $location = $this->getLocationStub(); - $urlAliases = $urlAliasService->listLocationAliases( - $location, - false, - null, - true, - ['fre-FR'] + $urlAliases = iterator_to_array( + $urlAliasService->listLocationAliases( + $location, + false, + null, + true, + ['fre-FR'] + ) ); self::assertCount(1, $urlAliases); @@ -2417,7 +2419,7 @@ public function testListGlobalAliases() ] ); - $urlAliases = $urlAliasService->listGlobalAliases(); + $urlAliases = iterator_to_array($urlAliasService->listGlobalAliases()); self::assertCount(1, $urlAliases); self::assertInstanceOf(URLAlias::class, $urlAliases[0]); From 631b41612cc215b6d0e354c8f23c4ea071ca9537 Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Fri, 17 May 2024 16:36:53 +0200 Subject: [PATCH 13/53] IBX-3957: Made NOP URL aliases not reusable and original (#350) For more details see https://issues.ibexa.co/browse/IBX-3957 and https://github.com/ibexa/core/pull/350 Breaking change: if there exists a custom URL alias having a path "/a/b" where "a" is a virtual (NOP) entry - not pointing to any content - renaming or creating another content on the same level using a colliding name - "a" in this case - will result in actually creating "/a2" entry, as "/a" is already taken by "/a/b" path. --- .../UrlAlias/Gateway/DoctrineDatabase.php | 2 +- .../Legacy/Content/UrlAlias/Handler.php | 6 +-- .../Core/Repository/URLAliasServiceTest.php | 49 +++++++++++++++++++ 3 files changed, 52 insertions(+), 5 deletions(-) diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php index 1b708c059b..88fa221b2f 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php @@ -603,7 +603,7 @@ public function insertRow(array $values): int $values['is_original'] = 1; } if ($values['action'] === self::NOP_ACTION) { - $values['is_original'] = 0; + $values['is_original'] = 1; } $query = $this->connection->createQueryBuilder(); diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php index b841ce4bac..a518739f7d 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php @@ -231,11 +231,9 @@ private function internalPublishUrlAliasForLocation( } // Row exists, check if it is reusable. There are 3 cases when this is possible: - // 1. NOP entry - // 2. existing location or custom alias entry - // 3. history entry + // 1. existing location or custom alias entry + // 2. history entry if ( - $row['action'] === Gateway::NOP_ACTION || $row['action'] === $action || (int)$row['is_original'] === 0 ) { diff --git a/tests/integration/Core/Repository/URLAliasServiceTest.php b/tests/integration/Core/Repository/URLAliasServiceTest.php index 5f1392bbf9..595796090c 100644 --- a/tests/integration/Core/Repository/URLAliasServiceTest.php +++ b/tests/integration/Core/Repository/URLAliasServiceTest.php @@ -1487,6 +1487,55 @@ public function testOverrideHistoryUrlAliasAtTheSameLocation(): void self::assertFalse($newAlias->isHistory); } + public function testRenamingParentContentDoesntBreakChildAlias(): void + { + $repository = $this->getRepository(); + $urlAliasService = $repository->getURLAliasService(); + $contentService = $repository->getContentService(); + + $languageCode = 'eng-GB'; + + // 1. Create parent folder + $folder = $this->createFolder([$languageCode => 'a'], 2); + $folderLocationId = $folder->contentInfo->getMainLocationId(); + + // 2. Create child folder + $child = $this->createFolder([$languageCode => 'b'], $folderLocationId); + $childLocation = $child->getVersionInfo()->getContentInfo()->getMainLocation(); + + self::assertInstanceOf(Location::class, $childLocation); + + $childLocationId = $childLocation->id; + + // 3. Create custom URL alias for child folder + $urlAliasService->createUrlAlias($childLocation, '/c/b', $languageCode); + $lookup = $urlAliasService->lookup('/c/b'); + + self::assertSame('/c/b', $lookup->path); + self::assertSame($childLocationId, $lookup->destination); + + // 4. Rename "A" to "C" + $folderDraft = $contentService->createContentDraft($folder->contentInfo); + $folderUpdateStruct = $contentService->newContentUpdateStruct(); + $folderUpdateStruct->setField('name', 'c'); + $renamedFolder = $contentService->updateContent($folderDraft->getVersionInfo(), $folderUpdateStruct); + $contentService->publishVersion($renamedFolder->getVersionInfo()); + + // Loading aliases shouldn't throw a `BadStateException` + $childLocationAliases = $urlAliasService->listLocationAliases($childLocation); + $childLocationAliasesUnpacked = iterator_to_array($childLocationAliases); + + self::assertCount(1, $childLocationAliasesUnpacked); + self::assertSame('/c/b', $childLocationAliasesUnpacked[0]->path); + + // Renamed content should have '/c2' path alias + $lookupRenamed = $urlAliasService->lookup('c2'); + $originalLookup = $urlAliasService->lookup('/c/b'); + + self::assertSame($childLocationId, $originalLookup->destination); + self::assertSame('/c2', $lookupRenamed->path); + } + /** * Lookup given URL and check if it is archived and points to the given Location Id. * From 38bf9d2123603105d71d74ea5289169a34a188cc Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 20 May 2024 10:48:19 +0200 Subject: [PATCH 14/53] IBX-8139: Dropped `class_alias` BC layer statements from all classes (#366) For more details see https://issues.ibexa.co/browse/IBX-8139 and https://github.com/ibexa/core/pull/366 Key changes: * Dropped class_alias BC layer from production code * Dropped class_alias BC layer from test code * [Composer] Dropped legacy namespaces from autoload section --- composer.json | 15 +-------------- src/bundle/Core/ApiLoader/CacheFactory.php | 2 -- .../Exception/InvalidRepositoryException.php | 2 -- .../ApiLoader/Exception/InvalidSearchEngine.php | 2 -- .../Exception/InvalidSearchEngineIndexer.php | 2 -- .../ApiLoader/Exception/InvalidStorageEngine.php | 2 -- .../ApiLoader/RepositoryConfigurationProvider.php | 2 -- src/bundle/Core/ApiLoader/RepositoryFactory.php | 2 -- src/bundle/Core/ApiLoader/SearchEngineFactory.php | 2 -- .../Core/ApiLoader/SearchEngineIndexerFactory.php | 2 -- .../Core/ApiLoader/StorageConnectionFactory.php | 2 -- .../Core/ApiLoader/StorageEngineFactory.php | 2 -- src/bundle/Core/Cache/Warmer/ProxyCacheWarmer.php | 2 -- .../Core/Command/BackwardCompatibleCommand.php | 2 -- src/bundle/Core/Command/CheckURLsCommand.php | 2 -- .../Core/Command/CleanupVersionsCommand.php | 2 -- src/bundle/Core/Command/CopySubtreeCommand.php | 2 -- .../Core/Command/DebugConfigResolverCommand.php | 2 -- .../Command/DeleteContentTranslationCommand.php | 2 -- .../Core/Command/NormalizeImagesPathsCommand.php | 2 -- .../Core/Command/RegenerateUrlAliasesCommand.php | 2 -- src/bundle/Core/Command/ReindexCommand.php | 2 -- .../Core/Command/ResizeOriginalImagesCommand.php | 2 -- .../Core/Command/UpdateTimestampsToUTCCommand.php | 2 -- src/bundle/Core/Controller.php | 2 -- .../Core/Converter/ContentParamConverter.php | 2 -- .../Core/Converter/LocationParamConverter.php | 2 -- .../Core/Converter/RepositoryParamConverter.php | 2 -- .../Compiler/BinaryContentDownloadPass.php | 2 -- .../Compiler/ChainConfigResolverPass.php | 2 -- .../Compiler/ChainRoutingPass.php | 2 -- .../Compiler/ConsoleCacheWarmupPass.php | 2 -- .../Compiler/ConsoleCommandPass.php | 2 -- .../EntityManagerFactoryServiceLocatorPass.php | 2 -- .../FieldTypeParameterProviderRegistryPass.php | 2 -- .../DependencyInjection/Compiler/FragmentPass.php | 2 -- .../DependencyInjection/Compiler/ImaginePass.php | 2 -- .../Compiler/InjectEntityManagerMappingsPass.php | 2 -- .../Compiler/LazyDoctrineRepositoriesPass.php | 2 -- .../Compiler/NotificationRendererPass.php | 2 -- .../Compiler/PlaceholderProviderPass.php | 2 -- .../Compiler/QueryTypePass.php | 2 -- .../Compiler/RegisterSearchEngineIndexerPass.php | 2 -- .../Compiler/RegisterSearchEnginePass.php | 2 -- .../Compiler/RegisterStorageEnginePass.php | 2 -- .../DependencyInjection/Compiler/RouterPass.php | 2 -- .../DependencyInjection/Compiler/SecurityPass.php | 2 -- .../Compiler/SessionConfigurationPass.php | 2 -- .../Compiler/SiteAccessMatcherRegistryPass.php | 2 -- .../Compiler/SlugConverterConfigurationPass.php | 2 -- .../Compiler/StorageConnectionPass.php | 2 -- .../Compiler/TranslationCollectorPass.php | 2 -- .../Compiler/URLHandlerPass.php | 2 -- .../Compiler/ViewProvidersPass.php | 2 -- .../Core/DependencyInjection/Configuration.php | 2 -- .../Configuration/AbstractParser.php | 2 -- .../Configuration/ChainConfigResolver.php | 2 -- .../ComplexSettings/ComplexSettingParser.php | 2 -- .../ComplexSettingParserInterface.php | 2 -- .../ComplexSettingValueResolver.php | 2 -- .../Configuration/ConfigBuilderInterface.php | 2 -- .../Configuration/ConfigParser.php | 2 -- .../Configuration/ConfigResolver.php | 2 -- .../ConfigResolver/ContainerConfigResolver.php | 2 -- .../ConfigResolver/DefaultScopeConfigResolver.php | 2 -- .../ConfigResolver/GlobalScopeConfigResolver.php | 2 -- .../ConfigResolver/SiteAccessConfigResolver.php | 2 -- .../SiteAccessGroupConfigResolver.php | 2 -- .../StaticSiteAccessConfigResolver.php | 2 -- .../Configuration/ContainerConfigBuilder.php | 2 -- .../Configuration/FieldTypeParserInterface.php | 2 -- .../Parser/AbstractFieldTypeParser.php | 2 -- .../Configuration/Parser/Common.php | 2 -- .../Configuration/Parser/Content.php | 2 -- .../Configuration/Parser/ContentView.php | 2 -- .../Parser/FieldDefinitionEditTemplates.php | 2 -- .../Parser/FieldDefinitionSettingsTemplates.php | 2 -- .../Configuration/Parser/FieldEditTemplates.php | 2 -- .../Configuration/Parser/FieldTemplates.php | 2 -- .../Configuration/Parser/FieldType/ImageAsset.php | 2 -- .../Configuration/Parser/IO.php | 2 -- .../Configuration/Parser/Image.php | 2 -- .../Configuration/Parser/Languages.php | 2 -- .../Configuration/Parser/LocationView.php | 2 -- .../Configuration/Parser/Templates.php | 2 -- .../Configuration/Parser/TwigVariablesParser.php | 2 -- .../Configuration/Parser/UrlChecker.php | 2 -- .../Parser/UserContentTypeIdentifier.php | 3 --- .../Configuration/Parser/View.php | 2 -- .../Configuration/ParserInterface.php | 2 -- .../SiteAccessAware/Configuration.php | 2 -- .../ConfigurationMapperInterface.php | 2 -- .../SiteAccessAware/ConfigurationProcessor.php | 2 -- .../SiteAccessAware/Contextualizer.php | 2 -- .../SiteAccessAware/ContextualizerInterface.php | 2 -- .../SiteAccessAware/DynamicSettingParser.php | 2 -- .../DynamicSettingParserInterface.php | 2 -- .../HookableConfigurationMapperInterface.php | 2 -- .../Suggestion/Collector/SuggestionCollector.php | 2 -- .../SuggestionCollectorAwareInterface.php | 2 -- .../Collector/SuggestionCollectorInterface.php | 2 -- .../Configuration/Suggestion/ConfigSuggestion.php | 2 -- .../Formatter/SuggestionFormatterInterface.php | 2 -- .../Formatter/YamlSuggestionFormatter.php | 2 -- .../DependencyInjection/IbexaCoreExtension.php | 2 -- .../Security/HttpBasicFactory.php | 2 -- .../PolicyProvider/PoliciesConfigBuilder.php | 2 -- .../PolicyProvider/PolicyProviderInterface.php | 2 -- .../PolicyProvider/RepositoryPolicyProvider.php | 2 -- .../PolicyProvider/YamlPolicyProvider.php | 2 -- .../Core/DependencyInjection/ServiceTags.php | 2 -- src/bundle/Core/Entity/EntityManagerFactory.php | 2 -- .../BackgroundIndexingTerminateListener.php | 2 -- .../BackwardCompatibleCommandListener.php | 2 -- .../EventListener/CacheViewResponseListener.php | 2 -- .../Core/EventListener/ConfigScopeListener.php | 2 -- .../Core/EventListener/ConsoleCommandListener.php | 2 -- .../ContentDownloadRouteReferenceListener.php | 2 -- .../Core/EventListener/ExceptionListener.php | 2 -- .../Core/EventListener/IndexRequestListener.php | 2 -- src/bundle/Core/EventListener/LocaleListener.php | 2 -- .../EventListener/OriginalRequestListener.php | 2 -- .../Core/EventListener/PreviewRequestListener.php | 2 -- ...ectExplicitFrontControllerRequestsListener.php | 2 -- .../Core/EventListener/RequestEventListener.php | 2 -- src/bundle/Core/EventListener/RoutingListener.php | 2 -- .../EventListener/SessionInitByPostListener.php | 2 -- .../SessionSetDynamicNameListener.php | 2 -- .../Core/EventListener/SiteAccessListener.php | 2 -- .../Core/EventListener/ViewControllerListener.php | 2 -- .../Core/EventListener/ViewRendererListener.php | 2 -- .../CrowdinRequestLocaleSubscriber.php | 2 -- .../Core/Features/Context/BasicContentContext.php | 2 -- .../Core/Features/Context/ConsoleContext.php | 2 -- .../Core/Features/Context/ContentContext.php | 2 -- .../Features/Context/ContentPreviewContext.php | 2 -- .../Core/Features/Context/ContentTypeContext.php | 2 -- .../Core/Features/Context/ExceptionContext.php | 2 -- .../Core/Features/Context/FieldTypeContext.php | 2 -- .../Features/Context/QueryControllerContext.php | 2 -- src/bundle/Core/Features/Context/RoleContext.php | 2 -- src/bundle/Core/Features/Context/UserContext.php | 2 -- .../Features/Context/YamlConfigurationContext.php | 2 -- .../Core/Fragment/DecoratedFragmentRenderer.php | 2 -- .../Core/Fragment/DirectFragmentRenderer.php | 2 -- .../Core/Fragment/FragmentListenerFactory.php | 2 -- .../Core/Fragment/InlineFragmentRenderer.php | 2 -- .../Fragment/SiteAccessSerializationTrait.php | 2 -- src/bundle/Core/IbexaCoreBundle.php | 2 -- src/bundle/Core/Imagine/AliasCleaner.php | 2 -- src/bundle/Core/Imagine/AliasGenerator.php | 2 -- src/bundle/Core/Imagine/BinaryLoader.php | 2 -- .../Imagine/Cache/AliasGeneratorDecorator.php | 2 -- .../Core/Imagine/Cache/Resolver/ProxyResolver.php | 2 -- .../Imagine/Cache/Resolver/RelativeResolver.php | 2 -- src/bundle/Core/Imagine/Cache/ResolverFactory.php | 2 -- src/bundle/Core/Imagine/Filter/AbstractFilter.php | 2 -- .../Core/Imagine/Filter/FilterConfiguration.php | 2 -- .../Core/Imagine/Filter/FilterInterface.php | 2 -- .../Imagine/Filter/Gmagick/ReduceNoiseFilter.php | 2 -- .../Core/Imagine/Filter/Gmagick/SwirlFilter.php | 2 -- .../Imagine/Filter/Imagick/ReduceNoiseFilter.php | 2 -- .../Core/Imagine/Filter/Imagick/SwirlFilter.php | 2 -- .../Imagine/Filter/Loader/BorderFilterLoader.php | 2 -- .../Imagine/Filter/Loader/CropFilterLoader.php | 2 -- .../Imagine/Filter/Loader/FilterLoaderWrapped.php | 2 -- .../Filter/Loader/GrayscaleFilterLoader.php | 2 -- .../Filter/Loader/ReduceNoiseFilterLoader.php | 2 -- .../Filter/Loader/ScaleDownOnlyFilterLoader.php | 2 -- .../Filter/Loader/ScaleExactFilterLoader.php | 2 -- .../Imagine/Filter/Loader/ScaleFilterLoader.php | 2 -- .../Loader/ScaleHeightDownOnlyFilterLoader.php | 2 -- .../Filter/Loader/ScaleHeightFilterLoader.php | 2 -- .../Filter/Loader/ScalePercentFilterLoader.php | 2 -- .../Loader/ScaleWidthDownOnlyFilterLoader.php | 2 -- .../Filter/Loader/ScaleWidthFilterLoader.php | 2 -- .../Imagine/Filter/Loader/SwirlFilterLoader.php | 2 -- .../Core/Imagine/Filter/UnsupportedFilter.php | 2 -- src/bundle/Core/Imagine/IORepositoryResolver.php | 2 -- .../Core/Imagine/ImageAsset/AliasGenerator.php | 2 -- .../Core/Imagine/PlaceholderAliasGenerator.php | 2 -- .../PlaceholderAliasGeneratorConfigurator.php | 2 -- src/bundle/Core/Imagine/PlaceholderProvider.php | 2 -- .../PlaceholderProvider/GenericProvider.php | 2 -- .../PlaceholderProvider/RemoteProvider.php | 2 -- .../Core/Imagine/PlaceholderProviderRegistry.php | 2 -- .../Variation/ImagineAwareAliasGenerator.php | 2 -- .../Core/Imagine/VariationPathGenerator.php | 2 -- .../AliasDirectoryVariationPathGenerator.php | 2 -- .../OriginalDirectoryVariationPathGenerator.php | 2 -- .../Imagine/VariationPurger/IOVariationPurger.php | 2 -- .../Imagine/VariationPurger/ImageFileList.php | 2 -- .../VariationPurger/ImageFileRowReader.php | 2 -- .../VariationPurger/ImageFileVariationPurger.php | 2 -- .../LegacyStorageImageFileList.php | 2 -- .../LegacyStorageImageFileRowReader.php | 2 -- .../Core/Matcher/ServiceAwareMatcherFactory.php | 2 -- src/bundle/Core/Matcher/ViewMatcherRegistry.php | 2 -- src/bundle/Core/Routing/DefaultRouter.php | 2 -- .../Routing/JsRouting/ExposedRoutesExtractor.php | 2 -- src/bundle/Core/Routing/UrlAliasRouter.php | 2 -- .../Core/Session/Handler/NativeSessionHandler.php | 2 -- .../SiteAccess/Config/ComplexConfigProcessor.php | 2 -- .../Core/SiteAccess/Config/IOConfigResolver.php | 2 -- src/bundle/Core/SiteAccess/LanguageResolver.php | 2 -- src/bundle/Core/SiteAccess/Matcher.php | 2 -- src/bundle/Core/SiteAccess/MatcherBuilder.php | 2 -- .../SiteAccess/SiteAccessConfigurationFilter.php | 2 -- .../Core/SiteAccess/SiteAccessMatcherRegistry.php | 2 -- .../SiteAccessMatcherRegistryInterface.php | 2 -- .../Twig/ContextAwareTwigVariablesExtension.php | 2 -- src/bundle/Core/Translation/Collector.php | 2 -- src/bundle/Core/Translation/GlobCollector.php | 2 -- .../AbstractConfigResolverBasedURLHandler.php | 2 -- .../URLChecker/Handler/AbstractURLHandler.php | 2 -- .../Core/URLChecker/Handler/HTTPHandler.php | 2 -- .../Core/URLChecker/Handler/MailToHandler.php | 2 -- src/bundle/Core/URLChecker/URLChecker.php | 2 -- .../Core/URLChecker/URLCheckerInterface.php | 2 -- .../Core/URLChecker/URLHandlerInterface.php | 2 -- src/bundle/Core/URLChecker/URLHandlerRegistry.php | 2 -- .../URLChecker/URLHandlerRegistryInterface.php | 2 -- src/bundle/Core/View/Manager.php | 2 -- src/bundle/Core/View/Provider/Configured.php | 2 -- src/bundle/Debug/Collector/IbexaCoreCollector.php | 2 -- .../Debug/Collector/PersistenceCacheCollector.php | 2 -- .../Debug/Collector/SiteAccessCollector.php | 2 -- .../Compiler/DataCollectorPass.php | 2 -- .../DependencyInjection/IbexaDebugExtension.php | 2 -- src/bundle/Debug/IbexaDebugBundle.php | 2 -- src/bundle/IO/ApiLoader/HandlerRegistry.php | 2 -- src/bundle/IO/BinaryStreamResponse.php | 2 -- src/bundle/IO/Command/MigrateFilesCommand.php | 2 -- .../Compiler/IOConfigurationPass.php | 2 -- .../Compiler/MigrationFileListerPass.php | 2 -- .../IO/DependencyInjection/Configuration.php | 2 -- .../DependencyInjection/ConfigurationFactory.php | 2 -- .../BinarydataHandler/Flysystem.php | 2 -- .../ConfigurationFactory/Flysystem.php | 2 -- .../MetadataHandler/Flysystem.php | 2 -- .../MetadataHandler/LegacyDFSCluster.php | 2 -- .../IO/DependencyInjection/IbexaIOExtension.php | 2 -- .../IO/EventListener/StreamFileListener.php | 2 -- src/bundle/IO/IbexaIOBundle.php | 2 -- .../IO/Migration/FileLister/BinaryFileLister.php | 2 -- .../FileIterator/LegacyStorageFileIterator.php | 2 -- .../FileLister/FileIteratorInterface.php | 2 -- .../LegacyStorageBinaryFileRowReader.php | 2 -- .../FileRowReader/LegacyStorageFileRowReader.php | 2 -- .../LegacyStorageMediaFileRowReader.php | 2 -- .../FileLister/FileRowReaderInterface.php | 2 -- .../IO/Migration/FileLister/ImageFileLister.php | 2 -- src/bundle/IO/Migration/FileListerInterface.php | 2 -- src/bundle/IO/Migration/FileListerRegistry.php | 2 -- .../FileListerRegistry/ConfigurableRegistry.php | 2 -- .../IO/Migration/FileMigrator/FileMigrator.php | 2 -- src/bundle/IO/Migration/FileMigratorInterface.php | 2 -- src/bundle/IO/Migration/MigrationHandler.php | 2 -- .../IO/Migration/MigrationHandlerInterface.php | 2 -- .../ApiLoader/ConnectionFactory.php | 2 -- .../IbexaLegacySearchEngineExtension.php | 2 -- .../IbexaLegacySearchEngineBundle.php | 2 -- .../Command/InstallPlatformCommand.php | 2 -- .../Command/ValidatePasswordHashesCommand.php | 2 -- .../Compiler/InstallerTagPass.php | 2 -- .../IbexaRepositoryInstallerExtension.php | 2 -- .../Event/Subscriber/BuildSchemaSubscriber.php | 2 -- .../IbexaRepositoryInstallerBundle.php | 2 -- .../Installer/CoreInstaller.php | 2 -- .../Installer/DbBasedInstaller.php | 2 -- .../RepositoryInstaller/Installer/Installer.php | 2 -- src/contracts/Container.php | 2 -- .../Exception/InvalidArgumentException.php | 2 -- src/contracts/Exception/InvalidArgumentType.php | 2 -- .../FieldType/BinaryBase/PathGenerator.php | 2 -- .../BinaryBase/PathGeneratorInterface.php | 2 -- .../BinaryBase/RouteAwarePathGenerator.php | 2 -- src/contracts/FieldType/Comparable.php | 2 -- src/contracts/FieldType/FieldStorage.php | 2 -- src/contracts/FieldType/FieldType.php | 2 -- src/contracts/FieldType/GatewayBasedStorage.php | 2 -- src/contracts/FieldType/Generic/Type.php | 2 -- .../ConstraintViolationAdapter.php | 2 -- src/contracts/FieldType/Indexable.php | 2 -- src/contracts/FieldType/StorageGateway.php | 2 -- src/contracts/FieldType/ValidationError.php | 2 -- .../ValidationError/AbstractValidationError.php | 2 -- .../NonConfigurableValidationError.php | 2 -- .../UnknownValidatorValidationError.php | 2 -- src/contracts/FieldType/Value.php | 2 -- .../FieldType/ValueSerializerInterface.php | 2 -- src/contracts/HashGenerator.php | 2 -- src/contracts/IO/BinaryFile.php | 2 -- src/contracts/IO/BinaryFileCreateStruct.php | 2 -- src/contracts/IO/MimeTypeDetector.php | 2 -- src/contracts/Limitation/Target.php | 2 -- .../Limitation/Target/Builder/VersionBuilder.php | 2 -- src/contracts/Limitation/Target/Version.php | 2 -- src/contracts/Limitation/TargetAwareType.php | 2 -- src/contracts/Limitation/Type.php | 2 -- .../ConfigScopeChangeSubscriber.php | 2 -- .../MVC/Templating/BaseRenderStrategy.php | 2 -- src/contracts/MVC/Templating/RenderStrategy.php | 2 -- src/contracts/MVC/View/VariableProvider.php | 2 -- src/contracts/Options/MutableOptionsBag.php | 2 -- src/contracts/Options/OptionsBag.php | 2 -- src/contracts/Persistence/Bookmark/Bookmark.php | 2 -- .../Persistence/Bookmark/CreateStruct.php | 2 -- src/contracts/Persistence/Bookmark/Handler.php | 2 -- src/contracts/Persistence/Content.php | 2 -- src/contracts/Persistence/Content/ContentInfo.php | 2 -- src/contracts/Persistence/Content/ContentItem.php | 2 -- .../Persistence/Content/CreateStruct.php | 2 -- src/contracts/Persistence/Content/Field.php | 2 -- .../Persistence/Content/FieldTypeConstraints.php | 2 -- src/contracts/Persistence/Content/FieldValue.php | 2 -- src/contracts/Persistence/Content/Handler.php | 2 -- src/contracts/Persistence/Content/Language.php | 2 -- .../Persistence/Content/Language/CreateStruct.php | 2 -- .../Persistence/Content/Language/Handler.php | 2 -- src/contracts/Persistence/Content/LoadStruct.php | 2 -- src/contracts/Persistence/Content/Location.php | 2 -- .../Persistence/Content/Location/CreateStruct.php | 2 -- .../Persistence/Content/Location/Handler.php | 2 -- .../Content/Location/Trash/Handler.php | 2 -- .../Content/Location/Trash/TrashResult.php | 2 -- .../Persistence/Content/Location/Trashed.php | 2 -- .../Persistence/Content/Location/UpdateStruct.php | 2 -- .../Content/LocationWithContentInfo.php | 2 -- .../Persistence/Content/MetadataUpdateStruct.php | 2 -- src/contracts/Persistence/Content/ObjectState.php | 2 -- .../Persistence/Content/ObjectState/Group.php | 2 -- .../Persistence/Content/ObjectState/Handler.php | 2 -- .../Content/ObjectState/InputStruct.php | 2 -- src/contracts/Persistence/Content/Relation.php | 2 -- .../Persistence/Content/Relation/CreateStruct.php | 2 -- src/contracts/Persistence/Content/Section.php | 2 -- .../Persistence/Content/Section/Handler.php | 2 -- src/contracts/Persistence/Content/Type.php | 2 -- .../Persistence/Content/Type/CreateStruct.php | 2 -- .../Content/Type/DeleteByParamsStruct.php | 2 -- .../Persistence/Content/Type/FieldDefinition.php | 2 -- src/contracts/Persistence/Content/Type/Group.php | 2 -- .../Content/Type/Group/CreateStruct.php | 2 -- .../Content/Type/Group/UpdateStruct.php | 2 -- .../Persistence/Content/Type/Handler.php | 2 -- .../Persistence/Content/Type/UpdateStruct.php | 2 -- .../Persistence/Content/UpdateStruct.php | 2 -- src/contracts/Persistence/Content/UrlAlias.php | 2 -- .../Persistence/Content/UrlAlias/Handler.php | 2 -- src/contracts/Persistence/Content/UrlWildcard.php | 2 -- .../Persistence/Content/UrlWildcard/Handler.php | 2 -- src/contracts/Persistence/Content/VersionInfo.php | 2 -- src/contracts/Persistence/FieldType.php | 2 -- .../Persistence/FieldType/IsEmptyValue.php | 2 -- .../Persistence/Filter/Content/Handler.php | 2 -- .../Content/LazyContentItemListIterator.php | 2 -- .../Persistence/Filter/CriterionVisitor.php | 2 -- .../Filter/Doctrine/FilteringQueryBuilder.php | 2 -- .../Persistence/Filter/LazyListIterator.php | 2 -- .../Persistence/Filter/Location/Handler.php | 2 -- .../Filter/Location/LazyLocationListIterator.php | 2 -- .../Persistence/Filter/SortClauseVisitor.php | 2 -- src/contracts/Persistence/Handler.php | 2 -- .../Persistence/Notification/CreateStruct.php | 2 -- .../Persistence/Notification/Handler.php | 2 -- .../Persistence/Notification/Notification.php | 2 -- .../Persistence/Notification/UpdateStruct.php | 2 -- src/contracts/Persistence/Setting/Handler.php | 2 -- src/contracts/Persistence/Setting/Setting.php | 2 -- src/contracts/Persistence/TransactionHandler.php | 2 -- src/contracts/Persistence/URL/Handler.php | 2 -- src/contracts/Persistence/URL/URL.php | 2 -- src/contracts/Persistence/URL/URLUpdateStruct.php | 2 -- src/contracts/Persistence/User.php | 2 -- src/contracts/Persistence/User/Handler.php | 2 -- src/contracts/Persistence/User/Policy.php | 2 -- src/contracts/Persistence/User/Role.php | 2 -- src/contracts/Persistence/User/RoleAssignment.php | 2 -- src/contracts/Persistence/User/RoleCopyStruct.php | 2 -- .../Persistence/User/RoleCreateStruct.php | 2 -- .../Persistence/User/RoleUpdateStruct.php | 2 -- .../Persistence/User/UserTokenUpdateStruct.php | 2 -- .../Persistence/UserPreference/Handler.php | 2 -- .../Persistence/UserPreference/UserPreference.php | 2 -- .../UserPreference/UserPreferenceSetStruct.php | 2 -- src/contracts/Persistence/ValueObject.php | 2 -- src/contracts/Repository/BookmarkService.php | 2 -- src/contracts/Repository/ContentService.php | 2 -- src/contracts/Repository/ContentTypeService.php | 2 -- .../Decorator/BookmarkServiceDecorator.php | 2 -- .../Decorator/ContentServiceDecorator.php | 2 -- .../Decorator/ContentTypeServiceDecorator.php | 2 -- .../Decorator/FieldTypeServiceDecorator.php | 2 -- .../Decorator/LanguageServiceDecorator.php | 2 -- .../Decorator/LocationServiceDecorator.php | 2 -- .../Decorator/NotificationServiceDecorator.php | 2 -- .../Decorator/ObjectStateServiceDecorator.php | 2 -- .../Repository/Decorator/RoleServiceDecorator.php | 2 -- .../Decorator/SearchServiceDecorator.php | 2 -- .../Decorator/SectionServiceDecorator.php | 2 -- .../Decorator/SettingServiceDecorator.php | 2 -- .../Decorator/TranslationServiceDecorator.php | 2 -- .../Decorator/TrashServiceDecorator.php | 2 -- .../Decorator/URLAliasServiceDecorator.php | 2 -- .../Repository/Decorator/URLServiceDecorator.php | 2 -- .../Decorator/URLWildcardServiceDecorator.php | 2 -- .../Decorator/UserPreferenceServiceDecorator.php | 2 -- .../Repository/Decorator/UserServiceDecorator.php | 2 -- src/contracts/Repository/Event/AfterEvent.php | 2 -- src/contracts/Repository/Event/BeforeEvent.php | 2 -- .../Events/Bookmark/BeforeCreateBookmarkEvent.php | 2 -- .../Events/Bookmark/BeforeDeleteBookmarkEvent.php | 2 -- .../Events/Bookmark/CreateBookmarkEvent.php | 2 -- .../Events/Bookmark/DeleteBookmarkEvent.php | 2 -- .../Events/Content/AddRelationEvent.php | 2 -- .../Events/Content/BeforeAddRelationEvent.php | 2 -- .../Events/Content/BeforeCopyContentEvent.php | 2 -- .../Content/BeforeCreateContentDraftEvent.php | 2 -- .../Events/Content/BeforeCreateContentEvent.php | 2 -- .../Events/Content/BeforeDeleteContentEvent.php | 2 -- .../Events/Content/BeforeDeleteRelationEvent.php | 2 -- .../Content/BeforeDeleteTranslationEvent.php | 2 -- .../Events/Content/BeforeDeleteVersionEvent.php | 2 -- .../Events/Content/BeforeHideContentEvent.php | 2 -- .../Events/Content/BeforePublishVersionEvent.php | 2 -- .../Events/Content/BeforeRevealContentEvent.php | 2 -- .../Events/Content/BeforeUpdateContentEvent.php | 2 -- .../Content/BeforeUpdateContentMetadataEvent.php | 2 -- .../Events/Content/CopyContentEvent.php | 2 -- .../Events/Content/CreateContentDraftEvent.php | 2 -- .../Events/Content/CreateContentEvent.php | 2 -- .../Events/Content/DeleteContentEvent.php | 2 -- .../Events/Content/DeleteRelationEvent.php | 2 -- .../Events/Content/DeleteTranslationEvent.php | 2 -- .../Events/Content/DeleteVersionEvent.php | 2 -- .../Events/Content/HideContentEvent.php | 2 -- .../Events/Content/PublishVersionEvent.php | 2 -- .../Events/Content/RevealContentEvent.php | 2 -- .../Events/Content/UpdateContentEvent.php | 2 -- .../Events/Content/UpdateContentMetadataEvent.php | 2 -- .../ContentType/AddFieldDefinitionEvent.php | 2 -- .../ContentType/AssignContentTypeGroupEvent.php | 2 -- .../ContentType/BeforeAddFieldDefinitionEvent.php | 2 -- .../BeforeAssignContentTypeGroupEvent.php | 2 -- .../ContentType/BeforeCopyContentTypeEvent.php | 2 -- .../BeforeCreateContentTypeDraftEvent.php | 2 -- .../ContentType/BeforeCreateContentTypeEvent.php | 2 -- .../BeforeCreateContentTypeGroupEvent.php | 2 -- .../ContentType/BeforeDeleteContentTypeEvent.php | 2 -- .../BeforeDeleteContentTypeGroupEvent.php | 2 -- .../BeforePublishContentTypeDraftEvent.php | 2 -- .../BeforeRemoveContentTypeTranslationEvent.php | 2 -- .../BeforeRemoveFieldDefinitionEvent.php | 2 -- .../BeforeUnassignContentTypeGroupEvent.php | 2 -- .../BeforeUpdateContentTypeDraftEvent.php | 2 -- .../BeforeUpdateContentTypeGroupEvent.php | 2 -- .../BeforeUpdateFieldDefinitionEvent.php | 2 -- .../Events/ContentType/CopyContentTypeEvent.php | 2 -- .../ContentType/CreateContentTypeDraftEvent.php | 2 -- .../Events/ContentType/CreateContentTypeEvent.php | 2 -- .../ContentType/CreateContentTypeGroupEvent.php | 2 -- .../Events/ContentType/DeleteContentTypeEvent.php | 2 -- .../ContentType/DeleteContentTypeGroupEvent.php | 2 -- .../ContentType/PublishContentTypeDraftEvent.php | 2 -- .../RemoveContentTypeTranslationEvent.php | 2 -- .../ContentType/RemoveFieldDefinitionEvent.php | 2 -- .../ContentType/UnassignContentTypeGroupEvent.php | 2 -- .../ContentType/UpdateContentTypeDraftEvent.php | 2 -- .../ContentType/UpdateContentTypeGroupEvent.php | 2 -- .../ContentType/UpdateFieldDefinitionEvent.php | 2 -- .../Events/Language/BeforeCreateLanguageEvent.php | 2 -- .../Events/Language/BeforeDeleteLanguageEvent.php | 2 -- .../Language/BeforeDisableLanguageEvent.php | 2 -- .../Events/Language/BeforeEnableLanguageEvent.php | 2 -- .../Language/BeforeUpdateLanguageNameEvent.php | 2 -- .../Events/Language/CreateLanguageEvent.php | 2 -- .../Events/Language/DeleteLanguageEvent.php | 2 -- .../Events/Language/DisableLanguageEvent.php | 2 -- .../Events/Language/EnableLanguageEvent.php | 2 -- .../Events/Language/UpdateLanguageNameEvent.php | 2 -- .../Events/Location/BeforeCopySubtreeEvent.php | 2 -- .../Events/Location/BeforeCreateLocationEvent.php | 2 -- .../Events/Location/BeforeDeleteLocationEvent.php | 2 -- .../Events/Location/BeforeHideLocationEvent.php | 2 -- .../Events/Location/BeforeMoveSubtreeEvent.php | 2 -- .../Events/Location/BeforeSwapLocationEvent.php | 2 -- .../Events/Location/BeforeUnhideLocationEvent.php | 2 -- .../Events/Location/BeforeUpdateLocationEvent.php | 2 -- .../Events/Location/CopySubtreeEvent.php | 2 -- .../Events/Location/CreateLocationEvent.php | 2 -- .../Events/Location/DeleteLocationEvent.php | 2 -- .../Events/Location/HideLocationEvent.php | 2 -- .../Events/Location/MoveSubtreeEvent.php | 2 -- .../Events/Location/SwapLocationEvent.php | 2 -- .../Events/Location/UnhideLocationEvent.php | 2 -- .../Events/Location/UpdateLocationEvent.php | 2 -- .../BeforeCreateNotificationEvent.php | 2 -- .../BeforeDeleteNotificationEvent.php | 2 -- .../BeforeMarkNotificationAsReadEvent.php | 2 -- .../Notification/CreateNotificationEvent.php | 2 -- .../Notification/DeleteNotificationEvent.php | 2 -- .../Notification/MarkNotificationAsReadEvent.php | 2 -- .../ObjectState/BeforeCreateObjectStateEvent.php | 2 -- .../BeforeCreateObjectStateGroupEvent.php | 2 -- .../ObjectState/BeforeDeleteObjectStateEvent.php | 2 -- .../BeforeDeleteObjectStateGroupEvent.php | 2 -- .../ObjectState/BeforeSetContentStateEvent.php | 2 -- .../BeforeSetPriorityOfObjectStateEvent.php | 2 -- .../ObjectState/BeforeUpdateObjectStateEvent.php | 2 -- .../BeforeUpdateObjectStateGroupEvent.php | 2 -- .../Events/ObjectState/CreateObjectStateEvent.php | 2 -- .../ObjectState/CreateObjectStateGroupEvent.php | 2 -- .../Events/ObjectState/DeleteObjectStateEvent.php | 2 -- .../ObjectState/DeleteObjectStateGroupEvent.php | 2 -- .../Events/ObjectState/SetContentStateEvent.php | 2 -- .../ObjectState/SetPriorityOfObjectStateEvent.php | 2 -- .../Events/ObjectState/UpdateObjectStateEvent.php | 2 -- .../ObjectState/UpdateObjectStateGroupEvent.php | 2 -- .../Events/Role/AddPolicyByRoleDraftEvent.php | 2 -- .../Events/Role/AssignRoleToUserEvent.php | 2 -- .../Events/Role/AssignRoleToUserGroupEvent.php | 2 -- .../Role/BeforeAddPolicyByRoleDraftEvent.php | 2 -- .../Events/Role/BeforeAssignRoleToUserEvent.php | 2 -- .../Role/BeforeAssignRoleToUserGroupEvent.php | 2 -- .../Events/Role/BeforeCopyRoleEvent.php | 2 -- .../Events/Role/BeforeCreateRoleDraftEvent.php | 2 -- .../Events/Role/BeforeCreateRoleEvent.php | 2 -- .../Events/Role/BeforeDeletePolicyEvent.php | 2 -- .../Events/Role/BeforeDeleteRoleDraftEvent.php | 2 -- .../Events/Role/BeforeDeleteRoleEvent.php | 2 -- .../Events/Role/BeforePublishRoleDraftEvent.php | 2 -- .../Role/BeforeRemovePolicyByRoleDraftEvent.php | 2 -- .../Role/BeforeRemoveRoleAssignmentEvent.php | 2 -- .../Role/BeforeUpdatePolicyByRoleDraftEvent.php | 2 -- .../Events/Role/BeforeUpdateRoleDraftEvent.php | 2 -- .../Repository/Events/Role/CopyRoleEvent.php | 2 -- .../Events/Role/CreateRoleDraftEvent.php | 2 -- .../Repository/Events/Role/CreateRoleEvent.php | 2 -- .../Repository/Events/Role/DeletePolicyEvent.php | 2 -- .../Events/Role/DeleteRoleDraftEvent.php | 2 -- .../Repository/Events/Role/DeleteRoleEvent.php | 2 -- .../Events/Role/PublishRoleDraftEvent.php | 2 -- .../Events/Role/RemovePolicyByRoleDraftEvent.php | 2 -- .../Events/Role/RemoveRoleAssignmentEvent.php | 2 -- .../Events/Role/UpdatePolicyByRoleDraftEvent.php | 2 -- .../Events/Role/UpdateRoleDraftEvent.php | 2 -- .../Events/Section/AssignSectionEvent.php | 2 -- .../Section/AssignSectionToSubtreeEvent.php | 2 -- .../Events/Section/BeforeAssignSectionEvent.php | 2 -- .../Section/BeforeAssignSectionToSubtreeEvent.php | 2 -- .../Events/Section/BeforeCreateSectionEvent.php | 2 -- .../Events/Section/BeforeDeleteSectionEvent.php | 2 -- .../Events/Section/BeforeUpdateSectionEvent.php | 2 -- .../Events/Section/CreateSectionEvent.php | 2 -- .../Events/Section/DeleteSectionEvent.php | 2 -- .../Events/Section/UpdateSectionEvent.php | 2 -- .../Events/Setting/BeforeCreateSettingEvent.php | 2 -- .../Events/Setting/BeforeDeleteSettingEvent.php | 2 -- .../Events/Setting/BeforeUpdateSettingEvent.php | 2 -- .../Events/Setting/CreateSettingEvent.php | 2 -- .../Events/Setting/DeleteSettingEvent.php | 2 -- .../Events/Setting/UpdateSettingEvent.php | 2 -- .../Events/Trash/BeforeDeleteTrashItemEvent.php | 2 -- .../Events/Trash/BeforeEmptyTrashEvent.php | 2 -- .../Events/Trash/BeforeRecoverEvent.php | 2 -- .../Repository/Events/Trash/BeforeTrashEvent.php | 2 -- .../Events/Trash/DeleteTrashItemEvent.php | 2 -- .../Repository/Events/Trash/EmptyTrashEvent.php | 2 -- .../Repository/Events/Trash/RecoverEvent.php | 2 -- .../Repository/Events/Trash/TrashEvent.php | 2 -- .../Events/URL/BeforeUpdateUrlEvent.php | 2 -- .../Repository/Events/URL/UpdateUrlEvent.php | 2 -- .../URLAlias/BeforeCreateGlobalUrlAliasEvent.php | 2 -- .../Events/URLAlias/BeforeCreateUrlAliasEvent.php | 2 -- ...oreRefreshSystemUrlAliasesForLocationEvent.php | 2 -- .../Events/URLAlias/BeforeRemoveAliasesEvent.php | 2 -- .../Events/URLAlias/CreateGlobalUrlAliasEvent.php | 2 -- .../Events/URLAlias/CreateUrlAliasEvent.php | 2 -- .../RefreshSystemUrlAliasesForLocationEvent.php | 2 -- .../Events/URLAlias/RemoveAliasesEvent.php | 2 -- .../Events/URLWildcard/BeforeCreateEvent.php | 2 -- .../Events/URLWildcard/BeforeRemoveEvent.php | 2 -- .../Events/URLWildcard/BeforeTranslateEvent.php | 2 -- .../Events/URLWildcard/BeforeUpdateEvent.php | 2 -- .../Repository/Events/URLWildcard/CreateEvent.php | 2 -- .../Repository/Events/URLWildcard/RemoveEvent.php | 2 -- .../Events/URLWildcard/TranslateEvent.php | 2 -- .../Repository/Events/URLWildcard/UpdateEvent.php | 2 -- .../Events/User/AssignUserToUserGroupEvent.php | 2 -- .../User/BeforeAssignUserToUserGroupEvent.php | 2 -- .../Events/User/BeforeCreateUserEvent.php | 2 -- .../Events/User/BeforeCreateUserGroupEvent.php | 2 -- .../Events/User/BeforeDeleteUserEvent.php | 2 -- .../Events/User/BeforeDeleteUserGroupEvent.php | 2 -- .../Events/User/BeforeMoveUserGroupEvent.php | 2 -- .../User/BeforeUnAssignUserFromUserGroupEvent.php | 2 -- .../Events/User/BeforeUpdateUserEvent.php | 2 -- .../Events/User/BeforeUpdateUserGroupEvent.php | 2 -- .../Events/User/BeforeUpdateUserPasswordEvent.php | 2 -- .../Events/User/BeforeUpdateUserTokenEvent.php | 2 -- .../Repository/Events/User/CreateUserEvent.php | 2 -- .../Events/User/CreateUserGroupEvent.php | 2 -- .../Repository/Events/User/DeleteUserEvent.php | 2 -- .../Events/User/DeleteUserGroupEvent.php | 2 -- .../Repository/Events/User/MoveUserGroupEvent.php | 2 -- .../User/UnAssignUserFromUserGroupEvent.php | 2 -- .../Repository/Events/User/UpdateUserEvent.php | 2 -- .../Events/User/UpdateUserGroupEvent.php | 2 -- .../Events/User/UpdateUserPasswordEvent.php | 2 -- .../Events/User/UpdateUserTokenEvent.php | 2 -- .../BeforeSetUserPreferenceEvent.php | 2 -- .../UserPreference/SetUserPreferenceEvent.php | 2 -- .../Repository/Exceptions/BadStateException.php | 2 -- .../ContentFieldValidationException.php | 2 -- ...tentTypeFieldDefinitionValidationException.php | 2 -- .../Exceptions/ContentTypeValidationException.php | 2 -- .../Exceptions/ContentValidationException.php | 2 -- src/contracts/Repository/Exceptions/Exception.php | 2 -- .../Repository/Exceptions/ForbiddenException.php | 2 -- .../Exceptions/InvalidArgumentException.php | 2 -- .../Exceptions/InvalidVariationException.php | 2 -- .../Exceptions/LimitationValidationException.php | 2 -- .../Repository/Exceptions/NotFoundException.php | 2 -- .../Exceptions/NotImplementedException.php | 2 -- .../Exceptions/OutOfBoundsException.php | 2 -- .../PasswordInUnsupportedFormatException.php | 2 -- .../Exceptions/PropertyNotFoundException.php | 2 -- .../Exceptions/PropertyReadOnlyException.php | 2 -- .../Exceptions/UnauthorizedException.php | 2 -- src/contracts/Repository/FieldType.php | 2 -- src/contracts/Repository/FieldTypeService.php | 2 -- .../Repository/Iterator/BatchIterator.php | 2 -- .../Repository/Iterator/BatchIteratorAdapter.php | 2 -- .../AbstractSearchAdapter.php | 2 -- .../ContentFilteringAdapter.php | 2 -- .../ContentInfoSearchAdapter.php | 2 -- .../BatchIteratorAdapter/ContentSearchAdapter.php | 2 -- .../LocationFilteringAdapter.php | 2 -- .../LocationSearchAdapter.php | 2 -- src/contracts/Repository/LanguageResolver.php | 2 -- src/contracts/Repository/LanguageService.php | 2 -- .../Repository/Lists/UnauthorizedListItem.php | 2 -- src/contracts/Repository/LocationService.php | 2 -- src/contracts/Repository/NotificationService.php | 2 -- src/contracts/Repository/ObjectStateService.php | 2 -- src/contracts/Repository/PasswordHashService.php | 2 -- .../Repository/PermissionCriterionResolver.php | 2 -- src/contracts/Repository/PermissionResolver.php | 2 -- src/contracts/Repository/PermissionService.php | 2 -- src/contracts/Repository/Repository.php | 2 -- src/contracts/Repository/RoleService.php | 2 -- src/contracts/Repository/SearchService.php | 2 -- src/contracts/Repository/SectionService.php | 2 -- src/contracts/Repository/SettingService.php | 2 -- .../Field/FieldTypeBasedThumbnailStrategy.php | 2 -- .../ContentThumbnail/Field/ThumbnailStrategy.php | 2 -- .../ContentThumbnail/ThumbnailStrategy.php | 2 -- src/contracts/Repository/Translatable.php | 2 -- src/contracts/Repository/TranslationService.php | 2 -- src/contracts/Repository/TrashService.php | 2 -- src/contracts/Repository/URLAliasService.php | 2 -- src/contracts/Repository/URLService.php | 2 -- src/contracts/Repository/URLWildcardService.php | 2 -- .../Repository/UserPreferenceService.php | 2 -- src/contracts/Repository/UserService.php | 2 -- .../Repository/Validator/ContentValidator.php | 2 -- .../Repository/Values/Bookmark/BookmarkList.php | 2 -- .../Repository/Values/Content/Content.php | 2 -- .../Values/Content/ContentCreateStruct.php | 2 -- .../Values/Content/ContentDraftList.php | 2 -- .../Repository/Values/Content/ContentInfo.php | 2 -- .../Repository/Values/Content/ContentList.php | 2 -- .../Content/ContentMetadataUpdateStruct.php | 2 -- .../Repository/Values/Content/ContentStruct.php | 2 -- .../Values/Content/ContentUpdateStruct.php | 2 -- .../DraftList/ContentDraftListItemInterface.php | 2 -- .../DraftList/Item/ContentDraftListItem.php | 2 -- .../Item/UnauthorizedContentDraftListItem.php | 2 -- src/contracts/Repository/Values/Content/Field.php | 2 -- .../Repository/Values/Content/Language.php | 2 -- .../Values/Content/LanguageCreateStruct.php | 2 -- .../Repository/Values/Content/Location.php | 2 -- .../Values/Content/LocationCreateStruct.php | 2 -- .../Repository/Values/Content/LocationList.php | 2 -- .../Repository/Values/Content/LocationQuery.php | 2 -- .../Values/Content/LocationUpdateStruct.php | 2 -- src/contracts/Repository/Values/Content/Query.php | 2 -- .../Values/Content/Query/Aggregation.php | 2 -- .../Aggregation/AbstractRangeAggregation.php | 2 -- .../Aggregation/AbstractStatsAggregation.php | 2 -- .../Query/Aggregation/AbstractTermAggregation.php | 2 -- .../ContentTypeGroupTermAggregation.php | 2 -- .../Aggregation/ContentTypeTermAggregation.php | 2 -- .../Aggregation/DateMetadataRangeAggregation.php | 2 -- .../Field/AbstractFieldRangeAggregation.php | 2 -- .../Field/AbstractFieldStatsAggregation.php | 2 -- .../Field/AbstractFieldTermAggregation.php | 2 -- .../Aggregation/Field/AuthorTermAggregation.php | 2 -- .../Aggregation/Field/CheckboxTermAggregation.php | 2 -- .../Aggregation/Field/CountryTermAggregation.php | 2 -- .../Aggregation/Field/DateRangeAggregation.php | 2 -- .../Field/DateTimeRangeAggregation.php | 2 -- .../Aggregation/Field/FieldAggregationTrait.php | 2 -- .../Aggregation/Field/FloatRangeAggregation.php | 2 -- .../Aggregation/Field/FloatStatsAggregation.php | 2 -- .../Aggregation/Field/IntegerRangeAggregation.php | 2 -- .../Aggregation/Field/IntegerStatsAggregation.php | 2 -- .../Aggregation/Field/KeywordTermAggregation.php | 2 -- .../Field/SelectionTermAggregation.php | 2 -- .../Aggregation/Field/TimeRangeAggregation.php | 2 -- .../Query/Aggregation/FieldAggregation.php | 2 -- .../Query/Aggregation/LanguageTermAggregation.php | 2 -- .../Location/LocationChildrenTermAggregation.php | 2 -- .../Location/SubtreeTermAggregation.php | 2 -- .../Query/Aggregation/LocationAggregation.php | 2 -- .../Aggregation/ObjectStateTermAggregation.php | 2 -- .../Values/Content/Query/Aggregation/Range.php | 2 -- .../Content/Query/Aggregation/RawAggregation.php | 2 -- .../Query/Aggregation/RawRangeAggregation.php | 2 -- .../Query/Aggregation/RawStatsAggregation.php | 2 -- .../Query/Aggregation/RawTermAggregation.php | 2 -- .../Query/Aggregation/SectionTermAggregation.php | 2 -- .../Aggregation/UserMetadataTermAggregation.php | 2 -- .../Aggregation/VisibilityTermAggregation.php | 2 -- .../Repository/Values/Content/Query/Criterion.php | 2 -- .../Values/Content/Query/Criterion/Ancestor.php | 2 -- .../Query/Criterion/CompositeCriterion.php | 2 -- .../Values/Content/Query/Criterion/ContentId.php | 2 -- .../Query/Criterion/ContentTypeGroupId.php | 2 -- .../Content/Query/Criterion/ContentTypeId.php | 2 -- .../Query/Criterion/ContentTypeIdentifier.php | 2 -- .../Content/Query/Criterion/CustomField.php | 2 -- .../Content/Query/Criterion/DateMetadata.php | 2 -- .../Values/Content/Query/Criterion/Field.php | 2 -- .../Content/Query/Criterion/FieldRelation.php | 2 -- .../Values/Content/Query/Criterion/FullText.php | 2 -- .../Content/Query/Criterion/IsFieldEmpty.php | 2 -- .../Content/Query/Criterion/IsUserBased.php | 2 -- .../Content/Query/Criterion/IsUserEnabled.php | 2 -- .../Content/Query/Criterion/LanguageCode.php | 2 -- .../Values/Content/Query/Criterion/Location.php | 2 -- .../Content/Query/Criterion/Location/Depth.php | 2 -- .../Query/Criterion/Location/IsMainLocation.php | 2 -- .../Content/Query/Criterion/Location/Priority.php | 2 -- .../Values/Content/Query/Criterion/LocationId.php | 2 -- .../Content/Query/Criterion/LocationRemoteId.php | 2 -- .../Values/Content/Query/Criterion/LogicalAnd.php | 2 -- .../Values/Content/Query/Criterion/LogicalNot.php | 2 -- .../Content/Query/Criterion/LogicalOperator.php | 2 -- .../Values/Content/Query/Criterion/LogicalOr.php | 2 -- .../Query/Criterion/MapLocationDistance.php | 2 -- .../Values/Content/Query/Criterion/MatchAll.php | 2 -- .../Values/Content/Query/Criterion/MatchNone.php | 2 -- .../Content/Query/Criterion/MoreLikeThis.php | 2 -- .../Content/Query/Criterion/ObjectStateId.php | 2 -- .../Query/Criterion/ObjectStateIdentifier.php | 2 -- .../Values/Content/Query/Criterion/Operator.php | 2 -- .../Query/Criterion/Operator/Specifications.php | 2 -- .../Content/Query/Criterion/ParentLocationId.php | 2 -- .../Values/Content/Query/Criterion/RemoteId.php | 2 -- .../Values/Content/Query/Criterion/SectionId.php | 2 -- .../Content/Query/Criterion/SectionIdentifier.php | 2 -- .../Values/Content/Query/Criterion/Sibling.php | 2 -- .../Values/Content/Query/Criterion/Subtree.php | 2 -- .../Values/Content/Query/Criterion/UserEmail.php | 2 -- .../Values/Content/Query/Criterion/UserId.php | 2 -- .../Values/Content/Query/Criterion/UserLogin.php | 2 -- .../Content/Query/Criterion/UserMetadata.php | 2 -- .../Values/Content/Query/Criterion/Value.php | 2 -- .../Query/Criterion/Value/MapLocationValue.php | 2 -- .../Values/Content/Query/Criterion/Visibility.php | 2 -- .../Values/Content/Query/CriterionInterface.php | 2 -- .../Values/Content/Query/CustomFieldInterface.php | 2 -- .../Values/Content/Query/FacetBuilder.php | 2 -- .../FacetBuilder/ContentTypeFacetBuilder.php | 2 -- .../Query/FacetBuilder/CriterionFacetBuilder.php | 2 -- .../Query/FacetBuilder/DateRangeFacetBuilder.php | 2 -- .../Query/FacetBuilder/FieldFacetBuilder.php | 2 -- .../Query/FacetBuilder/FieldRangeFacetBuilder.php | 2 -- .../Content/Query/FacetBuilder/Location.php | 2 -- .../Location/LocationFacetBuilder.php | 2 -- .../Query/FacetBuilder/LocationFacetBuilder.php | 2 -- .../Query/FacetBuilder/SectionFacetBuilder.php | 2 -- .../Query/FacetBuilder/TermFacetBuilder.php | 2 -- .../Query/FacetBuilder/UserFacetBuilder.php | 2 -- .../Values/Content/Query/SortClause.php | 2 -- .../Values/Content/Query/SortClause/ContentId.php | 2 -- .../Content/Query/SortClause/ContentName.php | 2 -- .../Query/SortClause/ContentTranslatedName.php | 2 -- .../Content/Query/SortClause/CustomField.php | 2 -- .../Content/Query/SortClause/DateModified.php | 2 -- .../Content/Query/SortClause/DatePublished.php | 2 -- .../Values/Content/Query/SortClause/Field.php | 2 -- .../Values/Content/Query/SortClause/Location.php | 2 -- .../Content/Query/SortClause/Location/Depth.php | 2 -- .../Content/Query/SortClause/Location/Id.php | 2 -- .../Query/SortClause/Location/IsMainLocation.php | 2 -- .../Content/Query/SortClause/Location/Path.php | 2 -- .../Query/SortClause/Location/Priority.php | 2 -- .../Query/SortClause/Location/Visibility.php | 2 -- .../Query/SortClause/MapLocationDistance.php | 2 -- .../Values/Content/Query/SortClause/Random.php | 2 -- .../Values/Content/Query/SortClause/Score.php | 2 -- .../Query/SortClause/SectionIdentifier.php | 2 -- .../Content/Query/SortClause/SectionName.php | 2 -- .../Values/Content/Query/SortClause/Target.php | 2 -- .../Query/SortClause/Target/CustomFieldTarget.php | 2 -- .../Query/SortClause/Target/FieldTarget.php | 2 -- .../Query/SortClause/Target/MapLocationTarget.php | 2 -- .../Query/SortClause/Target/RandomTarget.php | 2 -- .../Query/SortClause/Trash/ContentTypeName.php | 2 -- .../Query/SortClause/Trash/DateTrashed.php | 2 -- .../Content/Query/SortClause/Trash/UserLogin.php | 2 -- .../Repository/Values/Content/Relation.php | 2 -- .../Repository/Values/Content/RelationList.php | 2 -- .../RelationList/Item/RelationListItem.php | 2 -- .../Item/UnauthorizedRelationListItem.php | 2 -- .../RelationList/RelationListItemInterface.php | 2 -- .../Values/Content/Search/AggregationResult.php | 2 -- .../AggregationResult/RangeAggregationResult.php | 2 -- .../RangeAggregationResultEntry.php | 2 -- .../AggregationResult/StatsAggregationResult.php | 2 -- .../AggregationResult/TermAggregationResult.php | 2 -- .../TermAggregationResultEntry.php | 2 -- .../Search/AggregationResultCollection.php | 2 -- .../Repository/Values/Content/Search/Facet.php | 2 -- .../Content/Search/Facet/ContentTypeFacet.php | 2 -- .../Content/Search/Facet/CriterionFacet.php | 2 -- .../Content/Search/Facet/DateRangeFacet.php | 2 -- .../Values/Content/Search/Facet/FieldFacet.php | 2 -- .../Content/Search/Facet/FieldRangeFacet.php | 2 -- .../Values/Content/Search/Facet/LocationFacet.php | 2 -- .../Content/Search/Facet/RangeFacetEntry.php | 2 -- .../Values/Content/Search/Facet/SectionFacet.php | 2 -- .../Values/Content/Search/Facet/TermFacet.php | 2 -- .../Values/Content/Search/Facet/UserFacet.php | 2 -- .../Values/Content/Search/SearchHit.php | 2 -- .../Values/Content/Search/SearchResult.php | 2 -- .../Repository/Values/Content/Section.php | 2 -- .../Values/Content/SectionCreateStruct.php | 2 -- .../Repository/Values/Content/SectionStruct.php | 2 -- .../Values/Content/SectionUpdateStruct.php | 2 -- .../Repository/Values/Content/Thumbnail.php | 2 -- .../Values/Content/Trash/SearchResult.php | 2 -- .../Content/Trash/TrashItemDeleteResult.php | 2 -- .../Content/Trash/TrashItemDeleteResultList.php | 2 -- .../Repository/Values/Content/TrashItem.php | 2 -- .../Repository/Values/Content/URLAlias.php | 2 -- .../Repository/Values/Content/URLWildcard.php | 2 -- .../Values/Content/URLWildcardStruct.php | 2 -- .../Content/URLWildcardTranslationResult.php | 2 -- .../Values/Content/URLWildcardUpdateStruct.php | 2 -- .../Repository/Values/Content/VersionInfo.php | 2 -- .../Repository/Values/ContentType/ContentType.php | 2 -- .../ContentType/ContentTypeCreateStruct.php | 2 -- .../Values/ContentType/ContentTypeDraft.php | 2 -- .../Values/ContentType/ContentTypeGroup.php | 2 -- .../ContentType/ContentTypeGroupCreateStruct.php | 2 -- .../Values/ContentType/ContentTypeGroupStruct.php | 2 -- .../ContentType/ContentTypeGroupUpdateStruct.php | 2 -- .../ContentType/ContentTypeUpdateStruct.php | 2 -- .../Values/ContentType/FieldDefinition.php | 2 -- .../ContentType/FieldDefinitionCollection.php | 2 -- .../ContentType/FieldDefinitionCreateStruct.php | 2 -- .../ContentType/FieldDefinitionUpdateStruct.php | 2 -- .../Values/Filter/CriterionQueryBuilder.php | 2 -- src/contracts/Repository/Values/Filter/Filter.php | 2 -- .../Values/Filter/FilteringCriterion.php | 2 -- .../Values/Filter/FilteringSortClause.php | 2 -- .../Values/Filter/SortClauseQueryBuilder.php | 2 -- .../Values/MultiLanguageDescription.php | 2 -- .../Repository/Values/MultiLanguageName.php | 2 -- .../Values/Notification/CreateStruct.php | 2 -- .../Values/Notification/Notification.php | 2 -- .../Values/Notification/NotificationList.php | 2 -- .../Repository/Values/ObjectState/ObjectState.php | 2 -- .../ObjectState/ObjectStateCreateStruct.php | 2 -- .../Values/ObjectState/ObjectStateGroup.php | 2 -- .../ObjectState/ObjectStateGroupCreateStruct.php | 2 -- .../ObjectState/ObjectStateGroupUpdateStruct.php | 2 -- .../ObjectState/ObjectStateUpdateStruct.php | 2 -- .../Repository/Values/Setting/Setting.php | 2 -- .../Values/Setting/SettingCreateStruct.php | 2 -- .../Values/Setting/SettingUpdateStruct.php | 2 -- src/contracts/Repository/Values/Translation.php | 2 -- .../Repository/Values/Translation/Message.php | 2 -- .../Repository/Values/Translation/Plural.php | 2 -- .../Repository/Values/Trash/Query/Criterion.php | 2 -- .../Repository/Values/Trash/Query/SortClause.php | 2 -- .../Repository/Values/URL/Query/Criterion.php | 2 -- .../Values/URL/Query/Criterion/LogicalAnd.php | 2 -- .../Values/URL/Query/Criterion/LogicalNot.php | 2 -- .../URL/Query/Criterion/LogicalOperator.php | 2 -- .../Values/URL/Query/Criterion/LogicalOr.php | 2 -- .../Values/URL/Query/Criterion/MatchAll.php | 2 -- .../Values/URL/Query/Criterion/MatchNone.php | 2 -- .../Values/URL/Query/Criterion/Matcher.php | 2 -- .../Values/URL/Query/Criterion/Pattern.php | 2 -- .../Values/URL/Query/Criterion/SectionId.php | 2 -- .../URL/Query/Criterion/SectionIdentifier.php | 2 -- .../Values/URL/Query/Criterion/Validity.php | 2 -- .../Values/URL/Query/Criterion/VisibleOnly.php | 2 -- .../Repository/Values/URL/Query/SortClause.php | 2 -- .../Repository/Values/URL/Query/SortClause/Id.php | 2 -- .../Values/URL/Query/SortClause/URL.php | 2 -- .../Repository/Values/URL/SearchResult.php | 2 -- src/contracts/Repository/Values/URL/URL.php | 2 -- src/contracts/Repository/Values/URL/URLQuery.php | 2 -- .../Repository/Values/URL/URLUpdateStruct.php | 2 -- .../Repository/Values/URL/UsageSearchResult.php | 2 -- .../Repository/Values/User/Limitation.php | 2 -- .../Values/User/Limitation/BlockingLimitation.php | 2 -- .../User/Limitation/ContentTypeLimitation.php | 2 -- .../Values/User/Limitation/LanguageLimitation.php | 2 -- .../Values/User/Limitation/LocationLimitation.php | 2 -- .../User/Limitation/NewObjectStateLimitation.php | 2 -- .../User/Limitation/NewSectionLimitation.php | 2 -- .../User/Limitation/ObjectStateLimitation.php | 2 -- .../Values/User/Limitation/OwnerLimitation.php | 2 -- .../Limitation/ParentContentTypeLimitation.php | 2 -- .../User/Limitation/ParentDepthLimitation.php | 2 -- .../User/Limitation/ParentOwnerLimitation.php | 2 -- .../User/Limitation/ParentUserGroupLimitation.php | 2 -- .../Values/User/Limitation/RoleLimitation.php | 2 -- .../Values/User/Limitation/SectionLimitation.php | 2 -- .../User/Limitation/SiteAccessLimitation.php | 2 -- .../Values/User/Limitation/StatusLimitation.php | 2 -- .../Values/User/Limitation/SubtreeLimitation.php | 2 -- .../User/Limitation/UserGroupLimitation.php | 2 -- .../Values/User/LookupLimitationResult.php | 2 -- .../Values/User/LookupPolicyLimitations.php | 2 -- .../Repository/Values/User/PasswordInfo.php | 2 -- .../Values/User/PasswordValidationContext.php | 2 -- src/contracts/Repository/Values/User/Policy.php | 2 -- .../Repository/Values/User/PolicyCreateStruct.php | 2 -- .../Repository/Values/User/PolicyDraft.php | 2 -- .../Repository/Values/User/PolicyStruct.php | 2 -- .../Repository/Values/User/PolicyUpdateStruct.php | 2 -- src/contracts/Repository/Values/User/Role.php | 2 -- .../Repository/Values/User/RoleAssignment.php | 2 -- .../Repository/Values/User/RoleCopyStruct.php | 2 -- .../Repository/Values/User/RoleCreateStruct.php | 2 -- .../Repository/Values/User/RoleDraft.php | 2 -- .../Repository/Values/User/RoleUpdateStruct.php | 2 -- src/contracts/Repository/Values/User/User.php | 2 -- .../Repository/Values/User/UserCreateStruct.php | 2 -- .../Repository/Values/User/UserGroup.php | 2 -- .../Values/User/UserGroupCreateStruct.php | 2 -- .../Values/User/UserGroupRoleAssignment.php | 2 -- .../Values/User/UserGroupUpdateStruct.php | 2 -- .../Repository/Values/User/UserReference.php | 2 -- .../Repository/Values/User/UserRoleAssignment.php | 2 -- .../Values/User/UserTokenUpdateStruct.php | 2 -- .../Repository/Values/User/UserUpdateStruct.php | 2 -- .../Values/UserPreference/UserPreference.php | 2 -- .../Values/UserPreference/UserPreferenceList.php | 2 -- .../UserPreference/UserPreferenceSetStruct.php | 2 -- src/contracts/Repository/Values/ValueObject.php | 2 -- src/contracts/Search/Capable.php | 2 -- src/contracts/Search/Content/IndexerGateway.php | 2 -- .../Search/ContentTranslationHandler.php | 2 -- src/contracts/Search/Document.php | 2 -- src/contracts/Search/Field.php | 2 -- src/contracts/Search/FieldType.php | 2 -- src/contracts/Search/FieldType/BooleanField.php | 2 -- src/contracts/Search/FieldType/CustomField.php | 2 -- src/contracts/Search/FieldType/DateField.php | 2 -- src/contracts/Search/FieldType/DocumentField.php | 2 -- src/contracts/Search/FieldType/FloatField.php | 2 -- src/contracts/Search/FieldType/FullTextField.php | 2 -- .../Search/FieldType/GeoLocationField.php | 2 -- .../Search/FieldType/IdentifierField.php | 2 -- src/contracts/Search/FieldType/IntegerField.php | 2 -- .../Search/FieldType/MultipleBooleanField.php | 2 -- .../Search/FieldType/MultipleIdentifierField.php | 2 -- .../Search/FieldType/MultipleIntegerField.php | 2 -- .../FieldType/MultipleRemoteIdentifierField.php | 2 -- .../Search/FieldType/MultipleStringField.php | 2 -- src/contracts/Search/FieldType/PriceField.php | 2 -- .../Search/FieldType/RemoteIdentifierField.php | 2 -- src/contracts/Search/FieldType/StringField.php | 2 -- src/contracts/Search/FieldType/TextField.php | 2 -- src/contracts/Search/Handler.php | 2 -- src/contracts/Search/VersatileHandler.php | 2 -- src/contracts/SiteAccess/ConfigProcessor.php | 2 -- .../SiteAccess/ConfigResolverInterface.php | 2 -- .../Content/ContentContainerSpecification.php | 2 -- .../Content/ContentSpecification.php | 2 -- .../Content/ContentTypeSpecification.php | 2 -- src/contracts/Test/Persistence/Fixture.php | 2 -- .../Fixture/BaseInMemoryCachedFileFixture.php | 2 -- .../Persistence/Fixture/FileFixtureFactory.php | 2 -- .../Test/Persistence/Fixture/FixtureImporter.php | 2 -- .../Persistence/Fixture/PhpArrayFileFixture.php | 2 -- .../Test/Persistence/Fixture/YamlFixture.php | 2 -- src/contracts/Test/Repository/SetupFactory.php | 2 -- .../Test/Repository/SetupFactory/Legacy.php | 2 -- src/contracts/User/Identity.php | 2 -- src/contracts/User/IdentityAware.php | 2 -- src/contracts/Variation/Values/ImageVariation.php | 2 -- src/contracts/Variation/Values/Variation.php | 2 -- src/contracts/Variation/VariationHandler.php | 2 -- src/contracts/Variation/VariationPurger.php | 2 -- .../Container/ApiLoader/RepositoryFactory.php | 2 -- .../Compiler/AbstractFieldTypeBasedPass.php | 2 -- .../Container/Compiler/FieldTypeRegistryPass.php | 2 -- .../Compiler/GenericFieldTypeConverterPass.php | 2 -- .../Persistence/FieldTypeRegistryPass.php | 2 -- .../Search/AggregateFieldValueMapperPass.php | 2 -- .../Compiler/Search/FieldRegistryPass.php | 2 -- .../Search/Legacy/CriteriaConverterPass.php | 2 -- .../CriterionFieldValueHandlerRegistryPass.php | 2 -- .../Search/Legacy/SortClauseConverterPass.php | 2 -- .../Storage/ExternalStorageRegistryPass.php | 2 -- .../Legacy/FieldValueConverterRegistryPass.php | 2 -- .../Legacy/RoleLimitationConverterPass.php | 2 -- .../BackwardCompatibleIterator.php | 2 -- src/lib/Base/Exceptions/BadStateException.php | 2 -- .../ContentFieldValidationException.php | 2 -- ...tentTypeFieldDefinitionValidationException.php | 2 -- .../Exceptions/ContentTypeValidationException.php | 2 -- .../Exceptions/ContentValidationException.php | 2 -- src/lib/Base/Exceptions/DatabaseException.php | 2 -- src/lib/Base/Exceptions/ForbiddenException.php | 2 -- src/lib/Base/Exceptions/Httpable.php | 2 -- .../Base/Exceptions/InvalidArgumentException.php | 2 -- src/lib/Base/Exceptions/InvalidArgumentType.php | 2 -- src/lib/Base/Exceptions/InvalidArgumentValue.php | 2 -- .../Exceptions/LimitationValidationException.php | 2 -- src/lib/Base/Exceptions/MissingClass.php | 2 -- .../Exceptions/MissingUserFieldTypeException.php | 2 -- .../NotFound/FieldTypeNotFoundException.php | 2 -- .../NotFound/LimitationNotFoundException.php | 2 -- src/lib/Base/Exceptions/NotFoundException.php | 2 -- src/lib/Base/Exceptions/UnauthorizedException.php | 2 -- .../UserPasswordValidationException.php | 2 -- src/lib/Base/ServiceContainer.php | 2 -- src/lib/Base/Translatable.php | 2 -- src/lib/Base/TranslatableBase.php | 2 -- src/lib/Base/Utils/DeprecationWarner.php | 2 -- src/lib/Base/Utils/DeprecationWarnerInterface.php | 2 -- src/lib/Event/BookmarkService.php | 2 -- src/lib/Event/ContentService.php | 2 -- src/lib/Event/ContentTypeService.php | 2 -- src/lib/Event/FieldTypeService.php | 2 -- src/lib/Event/LanguageService.php | 2 -- src/lib/Event/LocationService.php | 2 -- src/lib/Event/NotificationService.php | 2 -- src/lib/Event/ObjectStateService.php | 2 -- src/lib/Event/Repository.php | 2 -- src/lib/Event/RoleService.php | 2 -- src/lib/Event/SearchService.php | 2 -- src/lib/Event/SectionService.php | 2 -- src/lib/Event/SettingService.php | 2 -- src/lib/Event/TranslationService.php | 2 -- src/lib/Event/TrashService.php | 2 -- src/lib/Event/URLAliasService.php | 2 -- src/lib/Event/URLService.php | 2 -- src/lib/Event/URLWildcardService.php | 2 -- src/lib/Event/UserPreferenceService.php | 2 -- src/lib/Event/UserService.php | 2 -- src/lib/FieldType/Author/Author.php | 2 -- src/lib/FieldType/Author/AuthorCollection.php | 2 -- src/lib/FieldType/Author/SearchField.php | 2 -- src/lib/FieldType/Author/Type.php | 2 -- src/lib/FieldType/Author/Value.php | 2 -- .../FieldType/BinaryBase/BinaryBaseStorage.php | 2 -- .../BinaryBase/BinaryBaseStorage/Gateway.php | 2 -- .../BinaryBaseStorage/Gateway/DoctrineStorage.php | 2 -- .../PathGenerator/LegacyPathGenerator.php | 2 -- src/lib/FieldType/BinaryBase/Type.php | 2 -- src/lib/FieldType/BinaryBase/Value.php | 2 -- .../FieldType/BinaryFile/BinaryFileStorage.php | 2 -- .../BinaryFileStorage/Gateway/DoctrineStorage.php | 2 -- src/lib/FieldType/BinaryFile/SearchField.php | 2 -- src/lib/FieldType/BinaryFile/Type.php | 2 -- src/lib/FieldType/BinaryFile/Value.php | 2 -- src/lib/FieldType/Checkbox/SearchField.php | 2 -- src/lib/FieldType/Checkbox/Type.php | 2 -- src/lib/FieldType/Checkbox/Value.php | 2 -- .../FieldType/Country/Exception/InvalidValue.php | 2 -- src/lib/FieldType/Country/SearchField.php | 2 -- src/lib/FieldType/Country/Type.php | 2 -- src/lib/FieldType/Country/Value.php | 2 -- src/lib/FieldType/Date/SearchField.php | 2 -- src/lib/FieldType/Date/Type.php | 2 -- src/lib/FieldType/Date/Value.php | 2 -- src/lib/FieldType/DateAndTime/SearchField.php | 2 -- src/lib/FieldType/DateAndTime/Type.php | 2 -- src/lib/FieldType/DateAndTime/Value.php | 2 -- src/lib/FieldType/EmailAddress/SearchField.php | 2 -- src/lib/FieldType/EmailAddress/Type.php | 2 -- src/lib/FieldType/EmailAddress/Value.php | 2 -- src/lib/FieldType/FieldSettings.php | 2 -- src/lib/FieldType/FieldType.php | 2 -- src/lib/FieldType/FieldTypeRegistry.php | 2 -- src/lib/FieldType/Float/SearchField.php | 2 -- src/lib/FieldType/Float/Type.php | 2 -- src/lib/FieldType/Float/Value.php | 2 -- src/lib/FieldType/GatewayBasedStorage.php | 2 -- src/lib/FieldType/Handler.php | 2 -- src/lib/FieldType/ISBN/SearchField.php | 2 -- src/lib/FieldType/ISBN/Type.php | 2 -- src/lib/FieldType/ISBN/Value.php | 2 -- src/lib/FieldType/Image/AliasCleanerInterface.php | 2 -- src/lib/FieldType/Image/IO/Legacy.php | 2 -- src/lib/FieldType/Image/IO/OptionsProvider.php | 2 -- src/lib/FieldType/Image/ImageStorage.php | 2 -- src/lib/FieldType/Image/ImageStorage/Gateway.php | 2 -- .../ImageStorage/Gateway/DoctrineStorage.php | 2 -- .../Image/ImageThumbnailProxyStrategy.php | 2 -- .../FieldType/Image/ImageThumbnailStrategy.php | 2 -- src/lib/FieldType/Image/NullAliasCleaner.php | 2 -- src/lib/FieldType/Image/PathGenerator.php | 2 -- .../Image/PathGenerator/LegacyPathGenerator.php | 2 -- src/lib/FieldType/Image/SearchField.php | 2 -- src/lib/FieldType/Image/Type.php | 2 -- src/lib/FieldType/Image/Value.php | 2 -- src/lib/FieldType/ImageAsset/AssetMapper.php | 2 -- .../ImageAsset/ImageAssetThumbnailStrategy.php | 2 -- src/lib/FieldType/ImageAsset/SearchField.php | 2 -- src/lib/FieldType/ImageAsset/Type.php | 2 -- src/lib/FieldType/ImageAsset/Value.php | 2 -- src/lib/FieldType/Integer/SearchField.php | 2 -- src/lib/FieldType/Integer/Type.php | 2 -- src/lib/FieldType/Integer/Value.php | 2 -- src/lib/FieldType/Keyword/KeywordStorage.php | 2 -- .../FieldType/Keyword/KeywordStorage/Gateway.php | 2 -- .../KeywordStorage/Gateway/DoctrineStorage.php | 2 -- src/lib/FieldType/Keyword/SearchField.php | 2 -- src/lib/FieldType/Keyword/Type.php | 2 -- src/lib/FieldType/Keyword/Value.php | 2 -- .../FieldType/MapLocation/MapLocationStorage.php | 2 -- .../MapLocation/MapLocationStorage/Gateway.php | 2 -- .../Gateway/DoctrineStorage.php | 2 -- src/lib/FieldType/MapLocation/SearchField.php | 2 -- src/lib/FieldType/MapLocation/Type.php | 2 -- src/lib/FieldType/MapLocation/Value.php | 2 -- src/lib/FieldType/Media/MediaStorage.php | 2 -- .../MediaStorage/Gateway/DoctrineStorage.php | 2 -- src/lib/FieldType/Media/SearchField.php | 2 -- src/lib/FieldType/Media/Type.php | 2 -- src/lib/FieldType/Media/Value.php | 2 -- src/lib/FieldType/Null/Type.php | 2 -- src/lib/FieldType/Null/Value.php | 2 -- src/lib/FieldType/NullStorage.php | 2 -- src/lib/FieldType/Relation/SearchField.php | 2 -- src/lib/FieldType/Relation/Type.php | 2 -- src/lib/FieldType/Relation/Value.php | 2 -- src/lib/FieldType/RelationList/SearchField.php | 2 -- src/lib/FieldType/RelationList/Type.php | 2 -- src/lib/FieldType/RelationList/Value.php | 2 -- src/lib/FieldType/Selection/SearchField.php | 2 -- src/lib/FieldType/Selection/Type.php | 2 -- src/lib/FieldType/Selection/Value.php | 2 -- src/lib/FieldType/StorageGateway.php | 2 -- src/lib/FieldType/TextBlock/SearchField.php | 2 -- src/lib/FieldType/TextBlock/Type.php | 2 -- src/lib/FieldType/TextBlock/Value.php | 2 -- src/lib/FieldType/TextLine/SearchField.php | 2 -- src/lib/FieldType/TextLine/Type.php | 2 -- src/lib/FieldType/TextLine/Value.php | 2 -- src/lib/FieldType/Time/SearchField.php | 2 -- src/lib/FieldType/Time/Type.php | 2 -- src/lib/FieldType/Time/Value.php | 2 -- src/lib/FieldType/Unindexed.php | 2 -- src/lib/FieldType/Url/SearchField.php | 2 -- src/lib/FieldType/Url/Type.php | 2 -- src/lib/FieldType/Url/UrlStorage.php | 2 -- src/lib/FieldType/Url/UrlStorage/Gateway.php | 2 -- .../Url/UrlStorage/Gateway/DoctrineStorage.php | 2 -- src/lib/FieldType/Url/Value.php | 2 -- src/lib/FieldType/User/Type.php | 2 -- src/lib/FieldType/User/UserStorage.php | 2 -- src/lib/FieldType/User/UserStorage/Gateway.php | 2 -- .../User/UserStorage/Gateway/DoctrineStorage.php | 2 -- src/lib/FieldType/User/Value.php | 2 -- src/lib/FieldType/ValidationError.php | 2 -- src/lib/FieldType/Validator.php | 2 -- .../FieldType/Validator/EmailAddressValidator.php | 2 -- .../Validator/FileExtensionBlackListValidator.php | 2 -- src/lib/FieldType/Validator/FileSizeValidator.php | 2 -- .../FieldType/Validator/FloatValueValidator.php | 2 -- src/lib/FieldType/Validator/ImageValidator.php | 2 -- .../FieldType/Validator/IntegerValueValidator.php | 2 -- .../FieldType/Validator/StringLengthValidator.php | 2 -- src/lib/FieldType/Value.php | 2 -- .../ValueSerializer/SymfonySerializerAdapter.php | 2 -- src/lib/Helper/ContentInfoLocationLoader.php | 2 -- .../SudoMainLocationLoader.php | 2 -- src/lib/Helper/ContentPreviewHelper.php | 2 -- src/lib/Helper/FieldHelper.php | 2 -- .../ArrayTranslatorFieldsGroupsList.php | 2 -- src/lib/Helper/FieldsGroups/FieldsGroupsList.php | 2 -- .../RepositoryConfigFieldsGroupsListFactory.php | 2 -- src/lib/Helper/PreviewLocationProvider.php | 2 -- src/lib/Helper/TranslationHelper.php | 2 -- src/lib/IO/ConfigScopeChangeAwareIOService.php | 2 -- .../IO/Exception/BinaryFileNotFoundException.php | 2 -- src/lib/IO/Exception/IOException.php | 2 -- .../InvalidBinaryAbsolutePathException.php | 2 -- .../IO/Exception/InvalidBinaryFileIdException.php | 2 -- .../IO/Exception/InvalidBinaryPrefixException.php | 2 -- src/lib/IO/FilePathNormalizer/Flysystem.php | 2 -- src/lib/IO/FilePathNormalizerInterface.php | 2 -- src/lib/IO/IOBinarydataHandler.php | 2 -- src/lib/IO/IOBinarydataHandler/Flysystem.php | 2 -- .../SiteAccessDependentBinaryDataHandler.php | 2 -- .../SiteAccessDependentMetadataHandler.php | 2 -- src/lib/IO/IOConfigProvider.php | 2 -- src/lib/IO/IOMetadataHandler.php | 2 -- src/lib/IO/IOMetadataHandler/Flysystem.php | 2 -- src/lib/IO/IOService.php | 2 -- src/lib/IO/IOServiceInterface.php | 2 -- src/lib/IO/MetadataHandler.php | 2 -- src/lib/IO/MetadataHandler/ImageSize.php | 2 -- src/lib/IO/MimeTypeDetector/FileInfo.php | 2 -- src/lib/IO/TolerantIOService.php | 2 -- src/lib/IO/UrlDecorator.php | 2 -- src/lib/IO/UrlDecorator/AbsolutePrefix.php | 2 -- src/lib/IO/UrlDecorator/Prefix.php | 2 -- src/lib/IO/UrlRedecorator.php | 2 -- src/lib/IO/UrlRedecoratorInterface.php | 2 -- src/lib/IO/Values/BinaryFile.php | 2 -- src/lib/IO/Values/BinaryFileCreateStruct.php | 2 -- src/lib/IO/Values/MissingBinaryFile.php | 2 -- .../AbstractPersistenceLimitationType.php | 2 -- src/lib/Limitation/BlockingLimitationType.php | 2 -- src/lib/Limitation/ContentTypeLimitationType.php | 2 -- .../LanguageLimitation/ContentDeleteEvaluator.php | 2 -- .../ContentTranslationEvaluator.php | 2 -- .../LanguageLimitation/NewDraftEvaluator.php | 2 -- .../VersionPublishingEvaluator.php | 2 -- .../LanguageLimitation/VersionTargetEvaluator.php | 2 -- .../VersionTranslationUpdateEvaluator.php | 2 -- src/lib/Limitation/LanguageLimitationType.php | 2 -- src/lib/Limitation/LocationLimitationType.php | 2 -- .../Limitation/NewObjectStateLimitationType.php | 2 -- src/lib/Limitation/NewSectionLimitationType.php | 2 -- src/lib/Limitation/ObjectStateLimitationType.php | 2 -- src/lib/Limitation/OwnerLimitationType.php | 2 -- .../ParentContentTypeLimitationType.php | 2 -- src/lib/Limitation/ParentDepthLimitationType.php | 2 -- src/lib/Limitation/ParentOwnerLimitationType.php | 2 -- .../Limitation/ParentUserGroupLimitationType.php | 2 -- src/lib/Limitation/SectionLimitationType.php | 2 -- src/lib/Limitation/SiteAccessLimitationType.php | 2 -- src/lib/Limitation/StatusLimitationType.php | 2 -- src/lib/Limitation/SubtreeLimitationType.php | 2 -- src/lib/Limitation/TargetOnlyLimitationType.php | 2 -- src/lib/Limitation/UserGroupLimitationType.php | 2 -- src/lib/MVC/Exception/HiddenLocationException.php | 2 -- .../MVC/Exception/InvalidSiteAccessException.php | 2 -- src/lib/MVC/Exception/NoViewTemplateException.php | 2 -- .../MVC/Exception/ParameterNotFoundException.php | 2 -- .../Exception/SourceImageNotFoundException.php | 2 -- src/lib/MVC/RepositoryAware.php | 2 -- src/lib/MVC/RepositoryAwareInterface.php | 2 -- .../AbstractPropertyWhitelistNormalizer.php | 2 -- .../Serializer/CompoundMatcherNormalizer.php | 2 -- .../Serializer/HostElementNormalizer.php | 2 -- .../Component/Serializer/HostTextNormalizer.php | 2 -- .../Component/Serializer/MapNormalizer.php | 2 -- .../Component/Serializer/RegexHostNormalizer.php | 2 -- .../Component/Serializer/RegexNormalizer.php | 2 -- .../Component/Serializer/RegexURINormalizer.php | 2 -- .../Component/Serializer/SerializerTrait.php | 2 -- .../Serializer/SimplifiedRequestNormalizer.php | 2 -- .../Component/Serializer/URIElementNormalizer.php | 2 -- .../Component/Serializer/URITextNormalizer.php | 2 -- src/lib/MVC/Symfony/ConfigDumperInterface.php | 2 -- .../Configuration/VersatileScopeInterface.php | 2 -- .../Controller/Content/DownloadController.php | 2 -- .../Content/DownloadRedirectionController.php | 2 -- .../Controller/Content/PreviewController.php | 2 -- .../Controller/Content/QueryController.php | 2 -- .../Symfony/Controller/Content/ViewController.php | 2 -- src/lib/MVC/Symfony/Controller/Controller.php | 2 -- .../Symfony/Controller/QueryRenderController.php | 2 -- .../MVC/Symfony/Controller/SecurityController.php | 2 -- .../Symfony/Event/APIContentExceptionEvent.php | 2 -- src/lib/MVC/Symfony/Event/ConsoleInitEvent.php | 2 -- .../MVC/Symfony/Event/ContentCacheClearEvent.php | 2 -- .../MVC/Symfony/Event/InteractiveLoginEvent.php | 2 -- .../Symfony/Event/PostSiteAccessMatchEvent.php | 2 -- src/lib/MVC/Symfony/Event/PreContentViewEvent.php | 2 -- .../Symfony/Event/ResolveRenderOptionsEvent.php | 2 -- .../Event/RouteReferenceGenerationEvent.php | 2 -- src/lib/MVC/Symfony/Event/ScopeChangeEvent.php | 2 -- .../ContentViewTwigVariablesSubscriber.php | 2 -- .../EventListener/LanguageSwitchListener.php | 2 -- .../EventListener/SiteAccessMatchListener.php | 2 -- .../ExpressionLanguage/ExpressionLanguage.php | 2 -- .../TwigVariableProviderExtension.php | 2 -- .../BinaryBase/ContentDownloadUrlGenerator.php | 2 -- .../FieldType/ImageAsset/ParameterProvider.php | 2 -- .../FieldType/Relation/ParameterProvider.php | 2 -- .../FieldType/RelationList/ParameterProvider.php | 2 -- .../Symfony/FieldType/User/ParameterProvider.php | 2 -- .../ParameterProvider/LocaleParameterProvider.php | 2 -- .../FieldType/View/ParameterProviderInterface.php | 2 -- .../FieldType/View/ParameterProviderRegistry.php | 2 -- .../View/ParameterProviderRegistryInterface.php | 2 -- src/lib/MVC/Symfony/Locale/LocaleConverter.php | 2 -- .../Symfony/Locale/LocaleConverterInterface.php | 2 -- .../Locale/UserLanguagePreferenceProvider.php | 2 -- .../UserLanguagePreferenceProviderInterface.php | 2 -- src/lib/MVC/Symfony/MVCEvents.php | 2 -- .../Symfony/Matcher/ClassNameMatcherFactory.php | 2 -- .../ConfigurableMatcherFactoryInterface.php | 2 -- .../MVC/Symfony/Matcher/ContentBased/Depth.php | 2 -- .../Symfony/Matcher/ContentBased/Id/Content.php | 2 -- .../Matcher/ContentBased/Id/ContentType.php | 2 -- .../Matcher/ContentBased/Id/ContentTypeGroup.php | 2 -- .../Symfony/Matcher/ContentBased/Id/Location.php | 2 -- .../Matcher/ContentBased/Id/LocationRemote.php | 2 -- .../Matcher/ContentBased/Id/ParentContentType.php | 2 -- .../Matcher/ContentBased/Id/ParentLocation.php | 2 -- .../Symfony/Matcher/ContentBased/Id/Remote.php | 2 -- .../Symfony/Matcher/ContentBased/Id/Section.php | 2 -- .../ContentBased/Identifier/ContentType.php | 2 -- .../ContentBased/Identifier/ParentContentType.php | 2 -- .../Matcher/ContentBased/Identifier/Section.php | 2 -- .../Matcher/ContentBased/MatcherInterface.php | 2 -- .../Matcher/ContentBased/MultipleValued.php | 2 -- .../MVC/Symfony/Matcher/ContentBased/UrlAlias.php | 2 -- ...namicallyConfiguredMatcherFactoryDecorator.php | 2 -- .../Symfony/Matcher/MatcherFactoryInterface.php | 2 -- .../MVC/Symfony/Matcher/ViewMatcherInterface.php | 2 -- src/lib/MVC/Symfony/RequestStackAware.php | 2 -- src/lib/MVC/Symfony/Routing/ChainRouter.php | 2 -- src/lib/MVC/Symfony/Routing/Generator.php | 2 -- .../Routing/Generator/RouteReferenceGenerator.php | 2 -- .../RouteReferenceGeneratorInterface.php | 2 -- .../Routing/Generator/UrlAliasGenerator.php | 2 -- src/lib/MVC/Symfony/Routing/RouteReference.php | 2 -- src/lib/MVC/Symfony/Routing/SimplifiedRequest.php | 2 -- src/lib/MVC/Symfony/Routing/UrlAliasRouter.php | 2 -- src/lib/MVC/Symfony/Routing/UrlWildcardRouter.php | 2 -- .../AnonymousAuthenticationProvider.php | 2 -- .../Authentication/AuthenticatorInterface.php | 2 -- .../DefaultAuthenticationSuccessHandler.php | 2 -- ...RememberMeRepositoryAuthenticationProvider.php | 2 -- .../RepositoryAuthenticationProvider.php | 2 -- .../Symfony/Security/Authorization/Attribute.php | 2 -- .../Security/Authorization/Voter/CoreVoter.php | 2 -- .../Authorization/Voter/ValueObjectVoter.php | 2 -- .../Security/EventListener/SecurityListener.php | 2 -- .../Exception/UnauthorizedSiteAccessException.php | 2 -- src/lib/MVC/Symfony/Security/HttpUtils.php | 2 -- .../Symfony/Security/InteractiveLoginToken.php | 2 -- .../Symfony/Security/ReferenceUserInterface.php | 2 -- src/lib/MVC/Symfony/Security/User.php | 2 -- .../Security/User/APIUserProviderInterface.php | 2 -- .../MVC/Symfony/Security/User/BaseProvider.php | 2 -- .../MVC/Symfony/Security/User/EmailProvider.php | 2 -- .../Symfony/Security/User/UsernameProvider.php | 2 -- src/lib/MVC/Symfony/Security/UserChecker.php | 2 -- src/lib/MVC/Symfony/Security/UserInterface.php | 2 -- src/lib/MVC/Symfony/Security/UserWrapped.php | 2 -- src/lib/MVC/Symfony/SiteAccess.php | 2 -- src/lib/MVC/Symfony/SiteAccess/Matcher.php | 2 -- .../MVC/Symfony/SiteAccess/Matcher/Compound.php | 2 -- .../SiteAccess/Matcher/Compound/LogicalAnd.php | 2 -- .../SiteAccess/Matcher/Compound/LogicalOr.php | 2 -- .../SiteAccess/Matcher/CompoundInterface.php | 2 -- .../Symfony/SiteAccess/Matcher/HostElement.php | 2 -- .../MVC/Symfony/SiteAccess/Matcher/HostText.php | 2 -- src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php | 2 -- .../MVC/Symfony/SiteAccess/Matcher/Map/Host.php | 2 -- .../MVC/Symfony/SiteAccess/Matcher/Map/Port.php | 2 -- .../MVC/Symfony/SiteAccess/Matcher/Map/URI.php | 2 -- src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php | 2 -- .../MVC/Symfony/SiteAccess/Matcher/Regex/Host.php | 2 -- .../MVC/Symfony/SiteAccess/Matcher/Regex/URI.php | 2 -- .../MVC/Symfony/SiteAccess/Matcher/URIElement.php | 2 -- .../MVC/Symfony/SiteAccess/Matcher/URIText.php | 2 -- src/lib/MVC/Symfony/SiteAccess/MatcherBuilder.php | 2 -- .../SiteAccess/MatcherBuilderInterface.php | 2 -- .../Provider/ChainSiteAccessProvider.php | 2 -- .../Provider/StaticSiteAccessProvider.php | 2 -- src/lib/MVC/Symfony/SiteAccess/Router.php | 2 -- .../MVC/Symfony/SiteAccess/SiteAccessAware.php | 2 -- .../SiteAccess/SiteAccessProviderInterface.php | 2 -- .../SiteAccess/SiteAccessRouterInterface.php | 2 -- .../MVC/Symfony/SiteAccess/SiteAccessService.php | 2 -- .../SiteAccess/SiteAccessServiceInterface.php | 2 -- src/lib/MVC/Symfony/SiteAccess/URILexer.php | 2 -- .../MVC/Symfony/SiteAccess/VersatileMatcher.php | 2 -- src/lib/MVC/Symfony/SiteAccessGroup.php | 2 -- .../Exception/InvalidResponseException.php | 2 -- .../Exception/MissingFieldBlockException.php | 2 -- .../Templating/FieldBlockRendererInterface.php | 2 -- src/lib/MVC/Symfony/Templating/GlobalHelper.php | 2 -- .../Symfony/Templating/RenderContentStrategy.php | 2 -- .../Symfony/Templating/RenderLocationStrategy.php | 2 -- src/lib/MVC/Symfony/Templating/RenderOptions.php | 2 -- src/lib/MVC/Symfony/Templating/RenderStrategy.php | 2 -- .../Twig/Extension/ContentExtension.php | 2 -- .../Templating/Twig/Extension/CoreExtension.php | 2 -- .../Twig/Extension/DataAttributesExtension.php | 2 -- .../Twig/Extension/FieldRenderingExtension.php | 2 -- .../Twig/Extension/FileSizeExtension.php | 2 -- .../Templating/Twig/Extension/ImageExtension.php | 2 -- .../Twig/Extension/QueryRenderingExtension.php | 2 -- .../Twig/Extension/RenderContentExtension.php | 2 -- .../Templating/Twig/Extension/RenderExtension.php | 2 -- .../Twig/Extension/RenderLocationExtension.php | 2 -- .../Twig/Extension/RoutingExtension.php | 2 -- .../Templating/Twig/FieldBlockRenderer.php | 2 -- .../Symfony/Templating/Twig/ResourceProvider.php | 2 -- .../Templating/Twig/ResourceProviderInterface.php | 2 -- .../Translation/CatalogueMapperFileWriter.php | 2 -- .../ExceptionMessageTemplateFileVisitor.php | 2 -- .../FieldTypesTranslationExtractor.php | 2 -- .../TranslatableExceptionsFileVisitor.php | 2 -- .../Translation/ValidationErrorFileVisitor.php | 2 -- src/lib/MVC/Symfony/View/BaseView.php | 2 -- .../Symfony/View/Builder/ContentViewBuilder.php | 2 -- .../ParametersFilter/RequestAttributes.php | 2 -- .../View/Builder/Registry/ControllerMatch.php | 2 -- src/lib/MVC/Symfony/View/Builder/ViewBuilder.php | 2 -- .../Symfony/View/Builder/ViewBuilderRegistry.php | 2 -- src/lib/MVC/Symfony/View/CachableView.php | 2 -- src/lib/MVC/Symfony/View/Configurator.php | 2 -- .../Symfony/View/Configurator/ViewProvider.php | 2 -- src/lib/MVC/Symfony/View/ContentValueView.php | 2 -- src/lib/MVC/Symfony/View/ContentView.php | 2 -- .../View/CustomLocationControllerChecker.php | 2 -- src/lib/MVC/Symfony/View/EmbedView.php | 2 -- .../Event/FilterViewBuilderParametersEvent.php | 2 -- .../View/Event/FilterViewParametersEvent.php | 2 -- .../View/GenericVariableProviderRegistry.php | 2 -- src/lib/MVC/Symfony/View/LocationValueView.php | 2 -- src/lib/MVC/Symfony/View/LoginFormView.php | 2 -- src/lib/MVC/Symfony/View/Manager.php | 2 -- src/lib/MVC/Symfony/View/ParametersInjector.php | 2 -- .../View/ParametersInjector/CustomParameters.php | 2 -- .../ParametersInjector/EmbedObjectParameters.php | 2 -- .../EventDispatcherInjector.php | 2 -- .../Symfony/View/ParametersInjector/NoLayout.php | 2 -- .../View/ParametersInjector/ValueObjectsIds.php | 2 -- .../View/ParametersInjector/ViewbaseLayout.php | 2 -- src/lib/MVC/Symfony/View/Provider/Configured.php | 2 -- src/lib/MVC/Symfony/View/Provider/Content.php | 2 -- src/lib/MVC/Symfony/View/Provider/Location.php | 2 -- src/lib/MVC/Symfony/View/Provider/Registry.php | 2 -- src/lib/MVC/Symfony/View/QueryView.php | 2 -- src/lib/MVC/Symfony/View/Renderer.php | 2 -- .../Symfony/View/Renderer/TemplateRenderer.php | 2 -- .../MVC/Symfony/View/VariableProviderRegistry.php | 2 -- src/lib/MVC/Symfony/View/View.php | 2 -- src/lib/MVC/Symfony/View/ViewEvents.php | 2 -- src/lib/MVC/Symfony/View/ViewManagerInterface.php | 2 -- src/lib/MVC/Symfony/View/ViewProvider.php | 2 -- .../Renderer/NotificationRenderer.php | 2 -- src/lib/Notification/Renderer/Registry.php | 2 -- .../Pagerfanta/AbstractSearchResultAdapter.php | 2 -- .../AdapterFactory/SearchHitAdapterFactory.php | 2 -- .../SearchHitAdapterFactoryInterface.php | 2 -- .../Pagerfanta/ContentFilteringAdapter.php | 2 -- .../Pagerfanta/ContentSearchAdapter.php | 2 -- .../Pagerfanta/ContentSearchHitAdapter.php | 2 -- .../Pagerfanta/FixedSearchResultHitAdapter.php | 2 -- .../Pagerfanta/LocationFilteringAdapter.php | 2 -- .../Pagerfanta/LocationSearchAdapter.php | 2 -- .../Pagerfanta/LocationSearchHitAdapter.php | 2 -- src/lib/Pagination/Pagerfanta/Pagerfanta.php | 2 -- .../Pagination/Pagerfanta/SearchResultAdapter.php | 2 -- src/lib/Persistence/Cache/AbstractHandler.php | 2 -- .../Persistence/Cache/AbstractInMemoryHandler.php | 2 -- .../Cache/AbstractInMemoryPersistenceHandler.php | 2 -- .../Adapter/TransactionAwareAdapterInterface.php | 2 -- .../Adapter/TransactionalInMemoryCacheAdapter.php | 2 -- src/lib/Persistence/Cache/BookmarkHandler.php | 2 -- src/lib/Persistence/Cache/ContentHandler.php | 2 -- .../Persistence/Cache/ContentLanguageHandler.php | 2 -- src/lib/Persistence/Cache/ContentTypeHandler.php | 2 -- src/lib/Persistence/Cache/Handler.php | 2 -- .../Persistence/Cache/InMemory/InMemoryCache.php | 2 -- src/lib/Persistence/Cache/LocationHandler.php | 2 -- src/lib/Persistence/Cache/NotificationHandler.php | 2 -- src/lib/Persistence/Cache/ObjectStateHandler.php | 2 -- src/lib/Persistence/Cache/PersistenceLogger.php | 2 -- src/lib/Persistence/Cache/SectionHandler.php | 2 -- src/lib/Persistence/Cache/SettingHandler.php | 2 -- src/lib/Persistence/Cache/TransactionHandler.php | 2 -- src/lib/Persistence/Cache/TrashHandler.php | 2 -- src/lib/Persistence/Cache/URLHandler.php | 2 -- src/lib/Persistence/Cache/UrlAliasHandler.php | 2 -- src/lib/Persistence/Cache/UrlWildcardHandler.php | 2 -- src/lib/Persistence/Cache/UserHandler.php | 2 -- .../Persistence/Cache/UserPreferenceHandler.php | 2 -- src/lib/Persistence/FieldType.php | 2 -- src/lib/Persistence/FieldTypeRegistry.php | 2 -- src/lib/Persistence/Legacy/Bookmark/Gateway.php | 2 -- .../Legacy/Bookmark/Gateway/DoctrineDatabase.php | 2 -- .../Bookmark/Gateway/ExceptionConversion.php | 2 -- src/lib/Persistence/Legacy/Bookmark/Handler.php | 2 -- src/lib/Persistence/Legacy/Bookmark/Mapper.php | 2 -- .../Persistence/Legacy/Content/FieldHandler.php | 2 -- .../Legacy/Content/FieldValue/Converter.php | 2 -- .../FieldValue/Converter/AuthorConverter.php | 2 -- .../FieldValue/Converter/BinaryFileConverter.php | 2 -- .../FieldValue/Converter/CheckboxConverter.php | 2 -- .../FieldValue/Converter/CountryConverter.php | 2 -- .../FieldValue/Converter/DateAndTimeConverter.php | 2 -- .../FieldValue/Converter/DateConverter.php | 2 -- .../Converter/EmailAddressConverter.php | 2 -- .../FieldValue/Converter/Exception/NotFound.php | 2 -- .../FieldValue/Converter/FloatConverter.php | 2 -- .../FieldValue/Converter/ISBNConverter.php | 2 -- .../FieldValue/Converter/ImageAssetConverter.php | 2 -- .../FieldValue/Converter/ImageConverter.php | 2 -- .../FieldValue/Converter/IntegerConverter.php | 2 -- .../FieldValue/Converter/KeywordConverter.php | 2 -- .../FieldValue/Converter/MapLocationConverter.php | 2 -- .../FieldValue/Converter/MediaConverter.php | 2 -- .../FieldValue/Converter/NullConverter.php | 2 -- .../FieldValue/Converter/RelationConverter.php | 2 -- .../Converter/RelationListConverter.php | 2 -- .../FieldValue/Converter/SelectionConverter.php | 2 -- .../Converter/SerializableConverter.php | 2 -- .../FieldValue/Converter/TextBlockConverter.php | 2 -- .../FieldValue/Converter/TextLineConverter.php | 2 -- .../FieldValue/Converter/TimeConverter.php | 2 -- .../Content/FieldValue/Converter/UrlConverter.php | 2 -- .../FieldValue/Converter/UserConverter.php | 2 -- .../Content/FieldValue/ConverterRegistry.php | 2 -- src/lib/Persistence/Legacy/Content/Gateway.php | 2 -- .../Legacy/Content/Gateway/DoctrineDatabase.php | 2 -- .../Gateway/DoctrineDatabase/QueryBuilder.php | 2 -- .../Content/Gateway/ExceptionConversion.php | 2 -- src/lib/Persistence/Legacy/Content/Handler.php | 2 -- .../Legacy/Content/Language/CachingHandler.php | 2 -- .../Legacy/Content/Language/Gateway.php | 2 -- .../Content/Language/Gateway/DoctrineDatabase.php | 2 -- .../Language/Gateway/ExceptionConversion.php | 2 -- .../Legacy/Content/Language/Handler.php | 2 -- .../Legacy/Content/Language/Mapper.php | 2 -- .../Legacy/Content/Language/MaskGenerator.php | 2 -- .../Legacy/Content/Location/Gateway.php | 2 -- .../Content/Location/Gateway/DoctrineDatabase.php | 2 -- .../Location/Gateway/ExceptionConversion.php | 2 -- .../Legacy/Content/Location/Handler.php | 2 -- .../Legacy/Content/Location/Mapper.php | 2 -- .../Legacy/Content/Location/Trash/Handler.php | 2 -- src/lib/Persistence/Legacy/Content/Mapper.php | 2 -- .../MultilingualStorageFieldDefinition.php | 2 -- .../Legacy/Content/ObjectState/Gateway.php | 2 -- .../ObjectState/Gateway/DoctrineDatabase.php | 2 -- .../ObjectState/Gateway/ExceptionConversion.php | 2 -- .../Legacy/Content/ObjectState/Handler.php | 2 -- .../Legacy/Content/ObjectState/Mapper.php | 2 -- .../Legacy/Content/Section/Gateway.php | 2 -- .../Content/Section/Gateway/DoctrineDatabase.php | 2 -- .../Section/Gateway/ExceptionConversion.php | 2 -- .../Legacy/Content/Section/Handler.php | 2 -- .../Legacy/Content/StorageFieldDefinition.php | 2 -- .../Legacy/Content/StorageFieldValue.php | 2 -- .../Persistence/Legacy/Content/StorageHandler.php | 2 -- .../Legacy/Content/StorageRegistry.php | 2 -- .../Persistence/Legacy/Content/TreeHandler.php | 2 -- .../Legacy/Content/Type/ContentUpdater.php | 2 -- .../Legacy/Content/Type/ContentUpdater/Action.php | 2 -- .../Type/ContentUpdater/Action/AddField.php | 2 -- .../Type/ContentUpdater/Action/RemoveField.php | 2 -- .../Persistence/Legacy/Content/Type/Gateway.php | 2 -- .../Content/Type/Gateway/DoctrineDatabase.php | 2 -- .../Content/Type/Gateway/ExceptionConversion.php | 2 -- .../Persistence/Legacy/Content/Type/Handler.php | 2 -- .../Persistence/Legacy/Content/Type/Mapper.php | 2 -- .../Legacy/Content/Type/MemoryCachingHandler.php | 2 -- .../Legacy/Content/Type/Update/Handler.php | 2 -- .../Type/Update/Handler/DoctrineDatabase.php | 2 -- .../UrlAlias/DTO/SwappedLocationProperties.php | 2 -- .../UrlAlias/DTO/UrlAliasForSwappedLocation.php | 2 -- .../Legacy/Content/UrlAlias/Gateway.php | 2 -- .../Content/UrlAlias/Gateway/DoctrineDatabase.php | 2 -- .../UrlAlias/Gateway/ExceptionConversion.php | 2 -- .../Legacy/Content/UrlAlias/Handler.php | 2 -- .../Legacy/Content/UrlAlias/Mapper.php | 2 -- .../Legacy/Content/UrlAlias/SlugConverter.php | 2 -- .../Legacy/Content/UrlWildcard/Gateway.php | 2 -- .../UrlWildcard/Gateway/DoctrineDatabase.php | 2 -- .../UrlWildcard/Gateway/ExceptionConversion.php | 2 -- .../Legacy/Content/UrlWildcard/Handler.php | 2 -- .../Legacy/Content/UrlWildcard/Mapper.php | 2 -- .../Legacy/Exception/GroupNotEmpty.php | 2 -- .../Legacy/Exception/RemoveLastGroupFromType.php | 2 -- .../Persistence/Legacy/Exception/RoleNotFound.php | 2 -- .../Legacy/Exception/StorageNotFound.php | 2 -- .../Legacy/Exception/TypeGroupNotFound.php | 2 -- .../Persistence/Legacy/Exception/TypeNotFound.php | 2 -- .../Legacy/Exception/TypeStillHasContent.php | 2 -- .../Content/ContentIdQueryBuilder.php | 2 -- .../Content/DateMetadataQueryBuilder.php | 2 -- .../Content/LanguageCodeQueryBuilder.php | 2 -- .../Content/ObjectStateIdQueryBuilder.php | 2 -- .../Content/ObjectStateIdentifierQueryBuilder.php | 2 -- .../Content/RemoteIdQueryBuilder.php | 2 -- .../Content/Section/IdQueryBuilder.php | 2 -- .../Content/Section/IdentifierQueryBuilder.php | 2 -- .../Content/SiblingQueryBuilder.php | 2 -- .../Content/Type/BaseQueryBuilder.php | 2 -- .../Content/Type/GroupIdQueryBuilder.php | 2 -- .../Content/Type/IdQueryBuilder.php | 2 -- .../Content/Type/IdentifierQueryBuilder.php | 2 -- .../Location/AncestorQueryBuilder.php | 2 -- .../BaseLocationCriterionQueryBuilder.php | 2 -- .../Location/DepthQueryBuilder.php | 2 -- .../Location/IdQueryBuilder.php | 2 -- .../Location/IsMainLocationQueryBuilder.php | 2 -- .../Location/ParentLocationIdQueryBuilder.php | 2 -- .../Location/PriorityQueryBuilder.php | 2 -- .../Location/RemoteIdQueryBuilder.php | 2 -- .../Location/SubtreeQueryBuilder.php | 2 -- .../Location/VisibilityQueryBuilder.php | 2 -- .../LogicalAndQueryBuilder.php | 2 -- .../LogicalNotQueryBuilder.php | 2 -- .../LogicalOrQueryBuilder.php | 2 -- .../MatchAllQueryBuilder.php | 2 -- .../MatchNoneQueryBuilder.php | 2 -- .../User/BaseUserCriterionQueryBuilder.php | 2 -- .../User/IsUserBasedQueryBuilder.php | 2 -- .../User/IsUserEnabledQueryBuilder.php | 2 -- .../User/Metadata/GroupQueryBuilder.php | 2 -- .../User/Metadata/ModifierQueryBuilder.php | 2 -- .../User/Metadata/OwnerQueryBuilder.php | 2 -- .../User/UserEmailQueryBuilder.php | 2 -- .../User/UserIdQueryBuilder.php | 2 -- .../User/UserLoginQueryBuilder.php | 2 -- .../Legacy/Filter/CriterionVisitor.php | 2 -- .../Gateway/Content/Doctrine/DoctrineGateway.php | 2 -- .../Filter/Gateway/Content/GatewayDataMapper.php | 2 -- .../Content/Mapper/DoctrineGatewayDataMapper.php | 2 -- .../Persistence/Legacy/Filter/Gateway/Gateway.php | 2 -- .../Gateway/Location/Doctrine/DoctrineGateway.php | 2 -- .../Filter/Handler/ContentFilteringHandler.php | 2 -- .../Filter/Handler/LocationFilteringHandler.php | 2 -- .../DateModifiedSortClauseQueryBuilder.php | 2 -- .../DatePublishedSortClauseQueryBuilder.php | 2 -- .../Content/IdSortClauseQueryBuilder.php | 2 -- .../Content/NameSortClauseQueryBuilder.php | 2 -- .../SectionIdentifierSortClauseQueryBuilder.php | 2 -- .../Content/SectionNameSortClauseQueryBuilder.php | 2 -- .../BaseLocationSortClauseQueryBuilder.php | 2 -- .../Location/DepthQueryBuilder.php | 2 -- .../Location/IdQueryBuilder.php | 2 -- .../Location/PathQueryBuilder.php | 2 -- .../Location/PriorityQueryBuilder.php | 2 -- .../Location/VisibilityQueryBuilder.php | 2 -- .../Legacy/Filter/SortClauseVisitor.php | 2 -- src/lib/Persistence/Legacy/Handler.php | 2 -- .../Persistence/Legacy/Notification/Gateway.php | 2 -- .../Notification/Gateway/DoctrineDatabase.php | 2 -- .../Notification/Gateway/ExceptionConversion.php | 2 -- .../Persistence/Legacy/Notification/Handler.php | 2 -- .../Persistence/Legacy/Notification/Mapper.php | 2 -- src/lib/Persistence/Legacy/Setting/Gateway.php | 2 -- .../Legacy/Setting/Gateway/DoctrineDatabase.php | 2 -- .../Setting/Gateway/ExceptionConversion.php | 2 -- src/lib/Persistence/Legacy/Setting/Handler.php | 2 -- .../DatabasePlatform/FallbackGateway.php | 2 -- .../DatabasePlatform/SqliteGateway.php | 2 -- .../Persistence/Legacy/SharedGateway/Gateway.php | 2 -- .../Legacy/SharedGateway/GatewayFactory.php | 2 -- src/lib/Persistence/Legacy/TransactionHandler.php | 2 -- src/lib/Persistence/Legacy/URL/Gateway.php | 2 -- .../Legacy/URL/Gateway/DoctrineDatabase.php | 2 -- .../Legacy/URL/Gateway/ExceptionConversion.php | 2 -- src/lib/Persistence/Legacy/URL/Handler.php | 2 -- src/lib/Persistence/Legacy/URL/Mapper.php | 2 -- .../Legacy/URL/Query/CriteriaConverter.php | 2 -- .../Legacy/URL/Query/CriterionHandler.php | 2 -- .../Legacy/URL/Query/CriterionHandler/Base.php | 2 -- .../URL/Query/CriterionHandler/LogicalAnd.php | 2 -- .../URL/Query/CriterionHandler/LogicalNot.php | 2 -- .../URL/Query/CriterionHandler/LogicalOr.php | 2 -- .../URL/Query/CriterionHandler/MatchAll.php | 2 -- .../URL/Query/CriterionHandler/MatchNone.php | 2 -- .../Legacy/URL/Query/CriterionHandler/Pattern.php | 2 -- .../URL/Query/CriterionHandler/SectionId.php | 2 -- .../Query/CriterionHandler/SectionIdentifier.php | 2 -- .../URL/Query/CriterionHandler/Validity.php | 2 -- .../URL/Query/CriterionHandler/VisibleOnly.php | 2 -- src/lib/Persistence/Legacy/User/Gateway.php | 2 -- .../Legacy/User/Gateway/DoctrineDatabase.php | 2 -- .../Legacy/User/Gateway/ExceptionConversion.php | 2 -- src/lib/Persistence/Legacy/User/Handler.php | 2 -- src/lib/Persistence/Legacy/User/Mapper.php | 2 -- src/lib/Persistence/Legacy/User/Role/Gateway.php | 2 -- .../Legacy/User/Role/Gateway/DoctrineDatabase.php | 2 -- .../User/Role/Gateway/ExceptionConversion.php | 2 -- .../Legacy/User/Role/LimitationConverter.php | 2 -- .../Legacy/User/Role/LimitationHandler.php | 2 -- .../Role/LimitationHandler/ObjectStateHandler.php | 2 -- .../Persistence/Legacy/UserPreference/Gateway.php | 2 -- .../UserPreference/Gateway/DoctrineDatabase.php | 2 -- .../Gateway/ExceptionConversion.php | 2 -- .../Persistence/Legacy/UserPreference/Handler.php | 2 -- .../Persistence/Legacy/UserPreference/Mapper.php | 2 -- src/lib/Persistence/TransformationProcessor.php | 2 -- .../TransformationProcessor/DefinitionBased.php | 2 -- .../DefinitionBased/Parser.php | 2 -- .../TransformationProcessor/PcreCompiler.php | 2 -- .../TransformationProcessor/PreprocessedBased.php | 2 -- src/lib/Persistence/Utf8Converter.php | 2 -- src/lib/Query/QueryFactory.php | 2 -- src/lib/Query/QueryFactoryInterface.php | 2 -- src/lib/QueryType/ArrayQueryTypeRegistry.php | 2 -- .../BuiltIn/AbstractLocationQueryType.php | 2 -- src/lib/QueryType/BuiltIn/AbstractQueryType.php | 2 -- src/lib/QueryType/BuiltIn/AncestorsQueryType.php | 2 -- src/lib/QueryType/BuiltIn/ChildrenQueryType.php | 2 -- .../QueryType/BuiltIn/GeoLocationQueryType.php | 2 -- .../BuiltIn/RelatedToContentQueryType.php | 2 -- src/lib/QueryType/BuiltIn/SiblingsQueryType.php | 2 -- src/lib/QueryType/BuiltIn/SortClausesFactory.php | 2 -- .../BuiltIn/SortClausesFactoryInterface.php | 2 -- .../SortSpec/Exception/SyntaxErrorException.php | 2 -- .../Exception/UnsupportedSortClauseException.php | 2 -- .../CustomFieldSortClauseParser.php | 2 -- .../SortClauseParser/DefaultSortClauseParser.php | 2 -- .../SortClauseParser/FieldSortClauseParser.php | 2 -- .../MapDistanceSortClauseParser.php | 2 -- .../SortClauseParser/RandomSortClauseParser.php | 2 -- .../SortSpec/SortClauseParserDispatcher.php | 2 -- .../SortSpec/SortClauseParserInterface.php | 2 -- .../QueryType/BuiltIn/SortSpec/SortSpecLexer.php | 2 -- .../BuiltIn/SortSpec/SortSpecLexerInterface.php | 2 -- .../QueryType/BuiltIn/SortSpec/SortSpecParser.php | 2 -- .../BuiltIn/SortSpec/SortSpecParserInterface.php | 2 -- src/lib/QueryType/BuiltIn/SortSpec/Token.php | 2 -- src/lib/QueryType/BuiltIn/SubtreeQueryType.php | 2 -- src/lib/QueryType/ContentViewQueryTypeMapper.php | 2 -- .../QueryType/OptionsResolverBasedQueryType.php | 2 -- .../QueryParameterContentViewQueryTypeMapper.php | 2 -- src/lib/QueryType/QueryType.php | 2 -- src/lib/QueryType/QueryTypeRegistry.php | 2 -- src/lib/Repository/BookmarkService.php | 2 -- src/lib/Repository/ContentService.php | 2 -- src/lib/Repository/ContentTypeService.php | 2 -- .../EventSubscriber/DeleteUserSubscriber.php | 2 -- src/lib/Repository/FieldTypeService.php | 2 -- src/lib/Repository/Helper/NameSchemaService.php | 2 -- src/lib/Repository/Helper/RelationProcessor.php | 2 -- src/lib/Repository/Helper/RoleDomainMapper.php | 2 -- src/lib/Repository/LanguageService.php | 2 -- .../LocationResolver/LocationResolver.php | 2 -- .../PermissionAwareLocationResolver.php | 2 -- src/lib/Repository/LocationService.php | 2 -- src/lib/Repository/Mapper/ContentDomainMapper.php | 2 -- src/lib/Repository/Mapper/ContentMapper.php | 2 -- .../Repository/Mapper/ContentTypeDomainMapper.php | 2 -- .../Repository/Mapper/ProxyAwareDomainMapper.php | 2 -- src/lib/Repository/Mapper/RoleDomainMapper.php | 2 -- src/lib/Repository/NotificationService.php | 2 -- src/lib/Repository/ObjectStateService.php | 2 -- .../Permission/CachedPermissionService.php | 2 -- .../Repository/Permission/LimitationService.php | 2 -- .../Permission/PermissionCriterionResolver.php | 2 -- .../Repository/Permission/PermissionResolver.php | 2 -- .../Repository/PermissionsCriterionHandler.php | 2 -- .../Repository/ProxyFactory/ProxyDomainMapper.php | 2 -- .../ProxyFactory/ProxyDomainMapperFactory.php | 2 -- .../ProxyDomainMapperFactoryInterface.php | 2 -- .../ProxyFactory/ProxyDomainMapperInterface.php | 2 -- .../Repository/ProxyFactory/ProxyGenerator.php | 2 -- .../ProxyFactory/ProxyGeneratorInterface.php | 2 -- src/lib/Repository/Repository.php | 2 -- src/lib/Repository/RoleService.php | 2 -- src/lib/Repository/SearchService.php | 2 -- src/lib/Repository/SectionService.php | 2 -- src/lib/Repository/SettingService.php | 2 -- .../SiteAccessAware/Config/IOConfigResolver.php | 2 -- .../Repository/SiteAccessAware/ContentService.php | 2 -- .../SiteAccessAware/ContentTypeService.php | 2 -- .../Language/AbstractLanguageResolver.php | 2 -- .../SiteAccessAware/Language/LanguageResolver.php | 2 -- .../SiteAccessAware/LanguageService.php | 2 -- .../SiteAccessAware/LocationService.php | 2 -- .../SiteAccessAware/NotificationService.php | 2 -- .../SiteAccessAware/ObjectStateService.php | 2 -- src/lib/Repository/SiteAccessAware/Repository.php | 2 -- .../Repository/SiteAccessAware/SearchService.php | 2 -- .../Repository/SiteAccessAware/SectionService.php | 2 -- .../Repository/SiteAccessAware/SettingService.php | 2 -- .../Repository/SiteAccessAware/TrashService.php | 2 -- .../SiteAccessAware/URLAliasService.php | 2 -- .../Repository/SiteAccessAware/UserService.php | 2 -- .../Field/ContentFieldStrategy.php | 2 -- .../FirstMatchingFieldStrategy.php | 2 -- .../Strategy/ContentThumbnail/StaticStrategy.php | 2 -- .../ContentThumbnail/ThumbnailChainStrategy.php | 2 -- .../ContentValidator/ContentValidatorStrategy.php | 2 -- src/lib/Repository/TrashService.php | 2 -- src/lib/Repository/URLAliasService.php | 2 -- src/lib/Repository/URLService.php | 2 -- src/lib/Repository/URLWildcardService.php | 2 -- .../Exception/UnsupportedPasswordHashType.php | 2 -- src/lib/Repository/User/PasswordHashService.php | 2 -- .../User/PasswordHashServiceInterface.php | 2 -- src/lib/Repository/User/PasswordValidator.php | 2 -- .../User/PasswordValidatorInterface.php | 2 -- src/lib/Repository/UserPreferenceService.php | 2 -- src/lib/Repository/UserService.php | 2 -- .../Validator/ContentCreateStructValidator.php | 2 -- .../Validator/ContentUpdateStructValidator.php | 2 -- .../Validator/UserPasswordValidator.php | 2 -- src/lib/Repository/Validator/VersionValidator.php | 2 -- src/lib/Repository/Values/Content/Content.php | 2 -- .../Values/Content/ContentCreateStruct.php | 2 -- .../Values/Content/ContentUpdateStruct.php | 2 -- src/lib/Repository/Values/Content/Location.php | 2 -- .../Content/Query/Criterion/PermissionSubtree.php | 2 -- src/lib/Repository/Values/Content/Relation.php | 2 -- src/lib/Repository/Values/Content/TrashItem.php | 2 -- src/lib/Repository/Values/Content/VersionInfo.php | 2 -- .../Repository/Values/ContentType/ContentType.php | 2 -- .../ContentType/ContentTypeCreateStruct.php | 2 -- .../Values/ContentType/ContentTypeDraft.php | 2 -- .../Values/ContentType/ContentTypeGroup.php | 2 -- .../Values/ContentType/FieldDefinition.php | 2 -- .../ContentType/FieldDefinitionCollection.php | 2 -- .../Repository/Values/ContentType/FieldType.php | 2 -- .../Values/MultiLanguageDescriptionTrait.php | 2 -- .../Repository/Values/MultiLanguageNameTrait.php | 2 -- src/lib/Repository/Values/MultiLanguageTrait.php | 2 -- .../Repository/Values/ObjectState/ObjectState.php | 2 -- .../Values/ObjectState/ObjectStateGroup.php | 2 -- src/lib/Repository/Values/User/Policy.php | 2 -- .../Repository/Values/User/PolicyCreateStruct.php | 2 -- src/lib/Repository/Values/User/PolicyDraft.php | 2 -- .../Repository/Values/User/PolicyUpdateStruct.php | 2 -- src/lib/Repository/Values/User/Role.php | 2 -- src/lib/Repository/Values/User/RoleCopyStruct.php | 2 -- .../Repository/Values/User/RoleCreateStruct.php | 2 -- src/lib/Repository/Values/User/RoleDraft.php | 2 -- src/lib/Repository/Values/User/User.php | 2 -- .../Repository/Values/User/UserCreateStruct.php | 2 -- src/lib/Repository/Values/User/UserGroup.php | 2 -- .../Values/User/UserGroupCreateStruct.php | 2 -- .../Values/User/UserGroupRoleAssignment.php | 2 -- src/lib/Repository/Values/User/UserReference.php | 2 -- .../Repository/Values/User/UserRoleAssignment.php | 2 -- src/lib/Search/Common/BackgroundIndexer.php | 2 -- .../Common/BackgroundIndexer/NullIndexer.php | 2 -- .../AbstractSearchEventSubscriber.php | 2 -- .../EventSubscriber/ContentEventSubscriber.php | 2 -- .../EventSubscriber/LocationEventSubscriber.php | 2 -- .../ObjectStateEventSubscriber.php | 2 -- .../EventSubscriber/SectionEventSubscriber.php | 2 -- .../EventSubscriber/TrashEventSubscriber.php | 2 -- .../EventSubscriber/UserEventSubscriber.php | 2 -- src/lib/Search/Common/FieldNameGenerator.php | 2 -- src/lib/Search/Common/FieldNameResolver.php | 2 -- src/lib/Search/Common/FieldRegistry.php | 2 -- src/lib/Search/Common/FieldValueMapper.php | 2 -- .../Search/Common/FieldValueMapper/Aggregate.php | 2 -- .../Common/FieldValueMapper/BooleanMapper.php | 2 -- .../Search/Common/FieldValueMapper/DateMapper.php | 2 -- .../Common/FieldValueMapper/DocumentMapper.php | 2 -- .../Common/FieldValueMapper/FloatMapper.php | 2 -- .../Common/FieldValueMapper/GeoLocationMapper.php | 2 -- .../Common/FieldValueMapper/IdentifierMapper.php | 2 -- .../Common/FieldValueMapper/IntegerMapper.php | 2 -- .../FieldValueMapper/MultipleBooleanMapper.php | 2 -- .../FieldValueMapper/MultipleIdentifierMapper.php | 2 -- .../FieldValueMapper/MultipleIntegerMapper.php | 2 -- .../MultipleRemoteIdentifierMapper.php | 2 -- .../FieldValueMapper/MultipleStringMapper.php | 2 -- .../Common/FieldValueMapper/PriceMapper.php | 2 -- .../FieldValueMapper/RemoteIdentifierMapper.php | 2 -- .../Common/FieldValueMapper/StringMapper.php | 2 -- src/lib/Search/Common/IncrementalIndexer.php | 2 -- src/lib/Search/Common/Indexer.php | 2 -- .../Content/Common/Gateway/CriteriaConverter.php | 2 -- .../Content/Common/Gateway/CriterionHandler.php | 2 -- .../CriterionHandler/CompositeCriterion.php | 2 -- .../Common/Gateway/CriterionHandler/ContentId.php | 2 -- .../CriterionHandler/ContentTypeGroupId.php | 2 -- .../Gateway/CriterionHandler/ContentTypeId.php | 2 -- .../CriterionHandler/ContentTypeIdentifier.php | 2 -- .../Gateway/CriterionHandler/DateMetadata.php | 2 -- .../Common/Gateway/CriterionHandler/Field.php | 2 -- .../Common/Gateway/CriterionHandler/FieldBase.php | 2 -- .../Gateway/CriterionHandler/FieldEmpty.php | 2 -- .../Gateway/CriterionHandler/FieldRelation.php | 2 -- .../CriterionHandler/FieldValue/Converter.php | 2 -- .../CriterionHandler/FieldValue/Handler.php | 2 -- .../FieldValue/Handler/Collection.php | 2 -- .../FieldValue/Handler/Composite.php | 2 -- .../FieldValue/Handler/Keyword.php | 2 -- .../FieldValue/Handler/Simple.php | 2 -- .../FieldValue/HandlerRegistry.php | 2 -- .../Common/Gateway/CriterionHandler/FullText.php | 2 -- .../Gateway/CriterionHandler/IsUserBased.php | 2 -- .../Gateway/CriterionHandler/IsUserEnabled.php | 2 -- .../Gateway/CriterionHandler/LanguageCode.php | 2 -- .../Gateway/CriterionHandler/LogicalAnd.php | 2 -- .../Gateway/CriterionHandler/LogicalNot.php | 2 -- .../Common/Gateway/CriterionHandler/LogicalOr.php | 2 -- .../CriterionHandler/MapLocationDistance.php | 2 -- .../Common/Gateway/CriterionHandler/MatchAll.php | 2 -- .../Common/Gateway/CriterionHandler/MatchNone.php | 2 -- .../Gateway/CriterionHandler/ObjectStateId.php | 2 -- .../CriterionHandler/ObjectStateIdentifier.php | 2 -- .../Common/Gateway/CriterionHandler/RemoteId.php | 2 -- .../Common/Gateway/CriterionHandler/SectionId.php | 2 -- .../CriterionHandler/SectionIdentifier.php | 2 -- .../Common/Gateway/CriterionHandler/UserEmail.php | 2 -- .../Common/Gateway/CriterionHandler/UserId.php | 2 -- .../Common/Gateway/CriterionHandler/UserLogin.php | 2 -- .../Gateway/CriterionHandler/UserMetadata.php | 2 -- .../Common/Gateway/SortClauseConverter.php | 2 -- .../Content/Common/Gateway/SortClauseHandler.php | 2 -- .../Gateway/SortClauseHandler/AbstractRandom.php | 2 -- .../Gateway/SortClauseHandler/ContentId.php | 2 -- .../Gateway/SortClauseHandler/ContentName.php | 2 -- .../Gateway/SortClauseHandler/DateModified.php | 2 -- .../Gateway/SortClauseHandler/DatePublished.php | 2 -- .../Factory/RandomSortClauseHandlerFactory.php | 2 -- .../Common/Gateway/SortClauseHandler/Field.php | 2 -- .../SortClauseHandler/MapLocationDistance.php | 2 -- .../SortClauseHandler/Random/MySqlRandom.php | 2 -- .../SortClauseHandler/Random/PgSqlRandom.php | 2 -- .../SortClauseHandler/Random/SqlLiteRandom.php | 2 -- .../SortClauseHandler/SectionIdentifier.php | 2 -- .../Gateway/SortClauseHandler/SectionName.php | 2 -- .../SortClauseHandler/Trash/ContentTypeName.php | 2 -- .../SortClauseHandler/Trash/DateTrashed.php | 2 -- .../Gateway/SortClauseHandler/Trash/UserLogin.php | 2 -- src/lib/Search/Legacy/Content/FullTextData.php | 2 -- src/lib/Search/Legacy/Content/FullTextValue.php | 2 -- src/lib/Search/Legacy/Content/Gateway.php | 2 -- .../Content/Gateway/CriterionHandler/Ancestor.php | 2 -- .../Gateway/CriterionHandler/LocationId.php | 2 -- .../Gateway/CriterionHandler/LocationRemoteId.php | 2 -- .../Gateway/CriterionHandler/ParentLocationId.php | 2 -- .../CriterionHandler/PermissionSubtree.php | 2 -- .../Content/Gateway/CriterionHandler/Subtree.php | 2 -- .../Gateway/CriterionHandler/Visibility.php | 2 -- .../Legacy/Content/Gateway/DoctrineDatabase.php | 2 -- .../Content/Gateway/ExceptionConversion.php | 2 -- src/lib/Search/Legacy/Content/Handler.php | 2 -- src/lib/Search/Legacy/Content/Indexer.php | 2 -- src/lib/Search/Legacy/Content/IndexerGateway.php | 2 -- .../Search/Legacy/Content/Location/Gateway.php | 2 -- .../Gateway/CriterionHandler/Ancestor.php | 2 -- .../Gateway/CriterionHandler/Location/Depth.php | 2 -- .../CriterionHandler/Location/IsMainLocation.php | 2 -- .../CriterionHandler/Location/Priority.php | 2 -- .../Gateway/CriterionHandler/LocationId.php | 2 -- .../Gateway/CriterionHandler/LocationRemoteId.php | 2 -- .../Gateway/CriterionHandler/ParentLocationId.php | 2 -- .../Location/Gateway/CriterionHandler/Subtree.php | 2 -- .../Gateway/CriterionHandler/Visibility.php | 2 -- .../Content/Location/Gateway/DoctrineDatabase.php | 2 -- .../Location/Gateway/ExceptionConversion.php | 2 -- .../Gateway/SortClauseHandler/Location/Depth.php | 2 -- .../Gateway/SortClauseHandler/Location/Id.php | 2 -- .../SortClauseHandler/Location/IsMainLocation.php | 2 -- .../Gateway/SortClauseHandler/Location/Path.php | 2 -- .../SortClauseHandler/Location/Priority.php | 2 -- .../SortClauseHandler/Location/Visibility.php | 2 -- .../Legacy/Content/Mapper/FullTextMapper.php | 2 -- .../Search/Legacy/Content/WordIndexer/Gateway.php | 2 -- .../WordIndexer/Gateway/DoctrineDatabase.php | 2 -- .../WordIndexer/Repository/SearchIndex.php | 2 -- tests/bundle/Core/ApiLoader/CacheFactoryTest.php | 2 -- .../RepositoryConfigurationProviderTest.php | 2 -- .../ApiLoader/StorageConnectionFactoryTest.php | 2 -- .../Core/ApiLoader/StorageEngineFactoryTest.php | 2 -- .../Core/Cache/Warmer/ProxyCacheWarmerTest.php | 2 -- tests/bundle/Core/ChainConfigResolverTest.php | 2 -- tests/bundle/Core/ConfigResolverTest.php | 2 -- .../Core/Converter/AbstractParamConverterTest.php | 2 -- .../Core/Converter/ContentParamConverterTest.php | 2 -- .../Core/Converter/LocationParamConverterTest.php | 2 -- .../Compiler/ChainConfigResolverPassTest.php | 2 -- .../Compiler/ChainRoutingPassTest.php | 2 -- .../Compiler/ConsoleCommandPassTest.php | 2 -- ...EntityManagerFactoryServiceLocatorPassTest.php | 2 -- ...FieldTypeParameterProviderRegistryPassTest.php | 2 -- .../Compiler/FragmentPassTest.php | 2 -- .../InjectEntityManagerMappingPassTest.php | 2 -- .../Compiler/LazyDoctrineRepositoriesPassTest.php | 2 -- .../Compiler/NotificationRendererPassTest.php | 2 -- .../Compiler/PlaceholderProviderPassTest.php | 2 -- .../Compiler/QueryTypePassTest.php | 2 -- .../RegisterSearchEngineIndexerPassTest.php | 2 -- .../Compiler/RegisterSearchEnginePassTest.php | 2 -- .../Compiler/RegisterStorageEnginePassTest.php | 2 -- .../Compiler/SecurityPassTest.php | 2 -- .../SiteAccessMatcherRegistryPassTest.php | 2 -- .../SlugConverterConfigurationPassTest.php | 2 -- .../Compiler/TranslationCollectorPassTest.php | 2 -- .../Compiler/URLHandlerPassTest.php | 2 -- .../Compiler/ViewProvidersPassTest.php | 2 -- .../ComplexSettings/ComplexSettingParserTest.php | 2 -- .../ComplexSettingValueResolverTest.php | 2 -- .../Configuration/ConfigParserTest.php | 2 -- .../ConfigResolver/ChainConfigResolverTest.php | 2 -- .../ConfigResolver/ConfigResolverTest.php | 2 -- .../DefaultScopeConfigResolverTest.php | 2 -- .../GlobalScopeConfigResolverTest.php | 2 -- .../SiteAccessGroupConfigResolverTest.php | 2 -- .../StaticSiteAccessConfigResolverTest.php | 2 -- .../Parser/AbstractParserTestCase.php | 2 -- .../Configuration/Parser/CommonTest.php | 2 -- .../Configuration/Parser/ContentTest.php | 2 -- .../Parser/FieldType/ImageAssetTest.php | 2 -- .../Configuration/Parser/IOTest.php | 2 -- .../Configuration/Parser/ImageTest.php | 2 -- .../Configuration/Parser/LanguagesTest.php | 2 -- .../Configuration/Parser/TemplatesTest.php | 2 -- .../Configuration/Parser/ViewTest.php | 2 -- .../ConfigurationProcessorTest.php | 2 -- .../SiteAccessAware/ContextualizerTest.php | 2 -- .../SiteAccessAware/DynamicSettingParserTest.php | 2 -- .../Collector/SuggestionCollectorTest.php | 2 -- .../Suggestion/ConfigSuggestionTest.php | 2 -- .../Formatter/YamlSuggestionFormatterTest.php | 2 -- .../IbexaCoreExtensionTest.php | 2 -- .../PolicyProvider/PoliciesConfigBuilderTest.php | 2 -- .../PolicyProvider/YamlPolicyProviderTest.php | 2 -- .../AnnotationEntityBundle.php | 2 -- .../Stub/Filter/CustomCriterionQueryBuilder.php | 2 -- .../Stub/Filter/CustomSortClauseQueryBuilder.php | 2 -- .../QueryTypeBundle/QueryType/TestQueryType.php | 2 -- .../Stub/QueryTypeBundle/QueryTypeBundle.php | 2 -- .../Stub/StubPolicyProvider.php | 2 -- .../Stub/StubYamlPolicyProvider.php | 2 -- .../Stub/XmlEntityBundle/XmlEntityBundle.php | 2 -- .../Core/Entity/EntityManagerFactoryTest.php | 2 -- .../BackgroundIndexingTerminateListenerTest.php | 2 -- .../EventListener/ConfigScopeListenerTest.php | 2 -- .../EventListener/ConsoleCommandListenerTest.php | 2 -- .../ContentDownloadRouteReferenceListenerTest.php | 2 -- .../Core/EventListener/ExceptionListenerTest.php | 2 -- .../EventListener/IndexRequestListenerTest.php | 2 -- .../Core/EventListener/LocaleListenerTest.php | 2 -- .../EventListener/OriginalRequestListenerTest.php | 2 -- ...xplicitFrontControllerRequestsListenerTest.php | 2 -- .../EventListener/RequestEventListenerTest.php | 2 -- .../Core/EventListener/RoutingListenerTest.php | 2 -- .../SessionInitByPostListenerTest.php | 2 -- .../SessionSetDynamicNameListenerTest.php | 2 -- .../Core/EventListener/SiteAccessListenerTest.php | 2 -- .../EventListener/Stubs/FooServiceInterface.php | 2 -- .../Core/EventListener/Stubs/TestOutput.php | 2 -- .../Core/EventListener/Stubs/ViewManager.php | 2 -- .../Core/EventListener/Stubs/ViewProvider.php | 2 -- .../EventListener/ViewControllerListenerTest.php | 2 -- .../CrowdinRequestLocaleSubscriberTest.php | 2 -- .../Fragment/DecoratedFragmentRendererTest.php | 2 -- .../Core/Fragment/DirectFragmentRendererTest.php | 2 -- .../Core/Fragment/FragmentListenerFactoryTest.php | 2 -- .../Core/Fragment/FragmentRendererBaseTest.php | 2 -- .../Core/Fragment/InlineFragmentRendererTest.php | 2 -- tests/bundle/Core/Imagine/AliasCleanerTest.php | 2 -- tests/bundle/Core/Imagine/AliasGeneratorTest.php | 2 -- tests/bundle/Core/Imagine/BinaryLoaderTest.php | 2 -- .../Imagine/Cache/Resolver/ProxyResolverTest.php | 2 -- .../Cache/Resolver/RelativeResolverTest.php | 2 -- .../Core/Imagine/Cache/ResolverFactoryTest.php | 2 -- .../Core/Imagine/Filter/AbstractFilterTest.php | 2 -- .../Imagine/Filter/FilterConfigurationTest.php | 2 -- .../Filter/Loader/BorderFilterLoaderTest.php | 2 -- .../Filter/Loader/CropFilterLoaderTest.php | 2 -- .../Filter/Loader/GrayscaleFilterLoaderTest.php | 2 -- .../Filter/Loader/ReduceNoiseFilterLoaderTest.php | 2 -- .../Loader/ScaleDownOnlyFilterLoaderTest.php | 2 -- .../Filter/Loader/ScaleExactFilterLoaderTest.php | 2 -- .../Filter/Loader/ScaleFilterLoaderTest.php | 2 -- .../ScaleHeightDownOnlyFilterLoaderTest.php | 2 -- .../Filter/Loader/ScaleHeightFilterLoaderTest.php | 2 -- .../Loader/ScalePercentFilterLoaderTest.php | 2 -- .../Loader/ScaleWidthDownOnlyFilterLoaderTest.php | 2 -- .../Filter/Loader/ScaleWidthFilterLoaderTest.php | 2 -- .../Filter/Loader/SwirlFilterLoaderTest.php | 2 -- .../Core/Imagine/Filter/UnsupportedFilterTest.php | 2 -- .../Core/Imagine/IORepositoryResolverTest.php | 2 -- .../Imagine/ImageAsset/AliasGeneratorTest.php | 2 -- .../PlaceholderAliasGeneratorConfiguratorTest.php | 2 -- .../Imagine/PlaceholderAliasGeneratorTest.php | 2 -- .../PlaceholderProvider/GenericProviderTest.php | 2 -- .../Imagine/PlaceholderProviderRegistryTest.php | 2 -- .../AliasDirectoryVariationPathGeneratorTest.php | 2 -- ...riginalDirectoryVariationPathGeneratorTest.php | 2 -- .../VariationPurger/IOVariationPurgerTest.php | 2 -- .../ImageFileVariationPurgerTest.php | 2 -- .../LegacyStorageImageFileListTest.php | 2 -- .../Core/Matcher/ViewMatcherRegistryTest.php | 2 -- tests/bundle/Core/Routing/DefaultRouterTest.php | 2 -- .../JsRouting/ExposedRoutesExtractorTest.php | 2 -- tests/bundle/Core/Routing/UrlAliasRouterTest.php | 2 -- .../SiteAccess/Config/IOConfigResolverTest.php | 2 -- .../bundle/Core/SiteAccess/MatcherBuilderTest.php | 2 -- .../SiteAccess/SiteAccessMatcherRegistryTest.php | 2 -- .../bundle/Core/Translation/GlobCollectorTest.php | 2 -- tests/bundle/Core/URLChecker/URLCheckerTest.php | 2 -- .../Debug/Collector/IbexaCoreCollectorTest.php | 2 -- .../Compiler/DataCollectorPassTest.php | 2 -- .../Compiler/IOConfigurationPassTest.php | 2 -- .../ConfigurationFactory/BaseFlysystemTest.php | 2 -- .../BinarydataHandler/FlysystemTest.php | 2 -- .../MetadataHandler/FlysystemTest.php | 2 -- .../MetadataHandler/LegacyDFSClusterTest.php | 2 -- .../ConfigurationFactoryTest.php | 2 -- .../DependencyInjection/IbexaIOExtensionTest.php | 2 -- .../IO/EventListener/StreamFileListenerTest.php | 2 -- .../Compiler/InstallerTagPassTest.php | 2 -- .../IbexaInstallerExtensionTest.php | 2 -- .../IbexaRepositoryInstallerBundleTest.php | 2 -- .../Core/BaseCoreFieldTypeIntegrationTest.php | 2 -- tests/integration/Core/BaseGatewayTest.php | 2 -- .../BinaryBaseStorageGatewayTest.php | 2 -- .../BinaryBaseStorage/BinaryBaseStorageTest.php | 2 -- .../LanguageLimitationIntegrationTest.php | 2 -- .../Filter/Doctrine/FilteringQueryBuilderTest.php | 2 -- .../Search/Content/IndexerGatewayTest.php | 2 -- .../Variation/InMemoryVariationHandler.php | 2 -- .../Core/Repository/BaseContentServiceTest.php | 2 -- .../Repository/BaseContentTypeServiceTest.php | 2 -- .../Repository/BaseNonRedundantFieldSetTest.php | 2 -- tests/integration/Core/Repository/BaseTest.php | 2 -- .../Core/Repository/BaseTrashServiceTest.php | 2 -- .../Core/Repository/BaseURLServiceTest.php | 2 -- .../Core/Repository/BookmarkServiceTest.php | 2 -- .../Core/Repository/Common/SlugConverter.php | 2 -- .../Compiler/SetAllServicesPublicPass.php | 2 -- .../ContentService/VersionValidatorTest.php | 2 -- .../ContentServiceAuthorizationTest.php | 2 -- .../Core/Repository/ContentServiceTest.php | 2 -- .../ContentTypeServiceAuthorizationTest.php | 2 -- .../Core/Repository/ContentTypeServiceTest.php | 2 -- .../FieldType/AuthorIntegrationTest.php | 2 -- .../Repository/FieldType/BaseIntegrationTest.php | 2 -- .../FieldType/BinaryFileIntegrationTest.php | 2 -- .../FieldType/CheckboxIntegrationTest.php | 2 -- .../FieldType/CountryIntegrationTest.php | 2 -- .../FieldType/DateAndTimeIntegrationTest.php | 2 -- .../Repository/FieldType/DateIntegrationTest.php | 2 -- .../FieldType/EmailAddressIntegrationTest.php | 2 -- .../FieldType/FileSearchBaseIntegrationTest.php | 2 -- .../Repository/FieldType/FloatIntegrationTest.php | 2 -- .../Repository/FieldType/ISBNIntegrationTest.php | 2 -- .../Repository/FieldType/ImageIntegrationTest.php | 2 -- .../FieldType/IntegerIntegrationTest.php | 2 -- .../FieldType/KeywordIntegrationTest.php | 2 -- .../FieldType/MapLocationIntegrationTest.php | 2 -- .../Repository/FieldType/MediaIntegrationTest.php | 2 -- .../FieldType/RelationIntegrationTest.php | 2 -- .../FieldType/RelationListIntegrationTest.php | 2 -- .../RelationSearchBaseIntegrationTestTrait.php | 2 -- .../FieldType/SearchBaseIntegrationTest.php | 2 -- .../SearchMultivaluedBaseIntegrationTest.php | 2 -- .../FieldType/SelectionIntegrationTest.php | 2 -- .../SelectionMultilingualIntegrationTest.php | 2 -- .../FieldType/TextBlockIntegrationTest.php | 2 -- .../FieldType/TextLineIntegrationTest.php | 2 -- .../Repository/FieldType/TimeIntegrationTest.php | 2 -- .../Repository/FieldType/UrlIntegrationTest.php | 2 -- .../Repository/FieldType/UserIntegrationTest.php | 2 -- .../Core/Repository/FieldTypeServiceTest.php | 2 -- .../Filtering/BaseRepositoryFilteringTestCase.php | 2 -- .../Repository/Filtering/ContentFilteringTest.php | 2 -- .../Filtering/LocationFilteringTest.php | 2 -- tests/integration/Core/Repository/IdManager.php | 2 -- .../LanguageServiceAuthorizationTest.php | 2 -- ...nguageServiceMaximumSupportedLanguagesTest.php | 2 -- .../Core/Repository/LanguageServiceTest.php | 2 -- .../BaseLimitationIntegrationTest.php | 2 -- .../ContentLimitationsMixIntegrationTest.php | 2 -- .../LocationLimitationIntegrationTest.php | 2 -- .../LocationServiceAuthorizationTest.php | 2 -- .../Core/Repository/LocationServiceTest.php | 2 -- .../Core/Repository/NonRedundantFieldSetTest.php | 2 -- .../Core/Repository/NotificationServiceTest.php | 2 -- .../ObjectStateServiceAuthorizationTest.php | 2 -- .../Core/Repository/ObjectStateServiceTest.php | 2 -- .../Repository/Parallel/BaseParallelTestCase.php | 2 -- .../Repository/Parallel/ContentServiceTest.php | 2 -- .../Core/Repository/PermissionResolverTest.php | 2 -- .../Regression/EZP20018LanguageTest.php | 2 -- .../Regression/EZP20018ObjectStateTest.php | 2 -- .../Regression/EZP20018VisibilityTest.php | 2 -- .../Core/Repository/Regression/EZP21069Test.php | 2 -- .../Core/Repository/Regression/EZP21089Test.php | 2 -- .../Regression/EZP21109EzIntegerTest.php | 2 -- .../Regression/EZP21771EzStringTest.php | 2 -- .../Core/Repository/Regression/EZP21798Test.php | 2 -- ...21906SearchOneContentMultipleLocationsTest.php | 2 -- .../EZP22408DeleteRelatedObjectTest.php | 2 -- .../EZP22409RelationListTypeStateTest.php | 2 -- .../Regression/EZP22612URLAliasTranslations.php | 2 -- .../Regression/EZP22840RoleLimitations.php | 2 -- .../EZP22958SearchSubtreePathstringFormatTest.php | 2 -- .../EZP26327UrlAliasHistorizationTest.php | 2 -- .../EZP26367UrlAliasHistoryRedirectLoopTest.php | 2 -- .../EZP26551DeleteContentTypeDraftTest.php | 2 -- .../Regression/EZP28799SubtreeSearchTest.php | 2 -- .../Core/Repository/Regression/EnvTest.php | 2 -- .../Regression/PureNegativeQueryTest.php | 2 -- .../Core/Repository/RepositoryTest.php | 2 -- .../Repository/RoleServiceAuthorizationTest.php | 2 -- .../Core/Repository/RoleServiceTest.php | 2 -- .../Core/Repository/SearchEngineIndexingTest.php | 2 -- .../Aggregation/AbstractAggregationTest.php | 2 -- .../ContentTypeGroupTermAggregationTest.php | 2 -- .../ContentTypeTermAggregationTest.php | 2 -- .../TermAggregationDataSetBuilder.php | 2 -- .../DateMetadataRangeAggregationTest.php | 2 -- .../Field/AuthorTermAggregationTest.php | 2 -- .../Field/CheckboxTermAggregationTest.php | 2 -- .../Field/CountryTermAggregationTest.php | 2 -- .../Field/DateRangeAggregationTest.php | 2 -- .../Field/DateTimeRangeAggregationTest.php | 2 -- .../Field/FloatRangeAggregationTest.php | 2 -- .../Field/FloatStatsAggregationTest.php | 2 -- .../Field/IntegerRangeAggregationTest.php | 2 -- .../Field/IntegerStatsAggregationTest.php | 2 -- .../Field/KeywordTermAggregationTest.php | 2 -- .../Field/SelectionTermAggregationTest.php | 2 -- .../Field/TimeRangeAggregationTest.php | 2 -- .../FieldAggregationFixtureGenerator.php | 2 -- .../Aggregation/LanguageTermAggregationTest.php | 2 -- .../LocationChildrenTermAggregationTest.php | 2 -- .../ObjectStateTermAggregationTest.php | 2 -- .../Aggregation/RawRangeAggregationTest.php | 2 -- .../Aggregation/RawStatsAggregationTest.php | 2 -- .../Aggregation/RawTermAggregationTest.php | 2 -- .../Aggregation/SectionTermAggregationTest.php | 2 -- .../Aggregation/SubtreeTermAggregationTest.php | 2 -- .../UserMetadataTermAggregationTest.php | 2 -- .../Aggregation/VisibilityTermAggregationTest.php | 2 -- .../SearchService/DeleteTranslationTest.php | 2 -- .../SearchService/RemoteIdIndexingTest.php | 2 -- .../SortClause/AbstractSortClauseTest.php | 2 -- .../SortClause/ContentTranslatedNameTest.php | 2 -- .../SearchService/SortClause/ScoreTest.php | 2 -- .../Repository/SearchServiceAuthorizationTest.php | 2 -- .../Core/Repository/SearchServiceFulltextTest.php | 2 -- .../Core/Repository/SearchServiceLocationTest.php | 2 -- .../Core/Repository/SearchServiceTest.php | 2 -- ...archServiceTranslationLanguageFallbackTest.php | 2 -- .../SectionServiceAuthorizationTest.php | 2 -- .../Core/Repository/SectionServiceTest.php | 2 -- .../Core/Repository/SettingServiceTest.php | 2 -- .../Repository/TrashServiceAuthorizationTest.php | 2 -- .../Core/Repository/TrashServiceTest.php | 2 -- .../CustomUrlAliasForMultilingualContentTest.php | 2 -- .../URLAliasServiceAuthorizationTest.php | 2 -- .../Core/Repository/URLAliasServiceTest.php | 2 -- .../Repository/URLServiceAuthorizationTest.php | 2 -- .../Core/Repository/URLServiceTest.php | 2 -- .../URLWildcardServiceAuthorizationTest.php | 2 -- .../Core/Repository/URLWildcardServiceTest.php | 2 -- .../Core/Repository/UserPreferenceServiceTest.php | 2 -- .../Repository/UserServiceAuthorizationTest.php | 2 -- .../Core/Repository/UserServiceTest.php | 2 -- .../Values/User/Limitation/BaseLimitationTest.php | 2 -- .../User/Limitation/ContentTypeLimitationTest.php | 2 -- .../User/Limitation/LanguageLimitationTest.php | 2 -- .../User/Limitation/LocationLimitationTest.php | 2 -- .../Limitation/NewObjectStateLimitationTest.php | 2 -- .../User/Limitation/NewSectionLimitationTest.php | 2 -- .../User/Limitation/ObjectStateLimitationTest.php | 2 -- .../User/Limitation/OwnerLimitationTest.php | 2 -- .../ParentContentTypeLimitationTest.php | 2 -- .../User/Limitation/ParentDepthLimitationTest.php | 2 -- .../User/Limitation/ParentOwnerLimitationTest.php | 2 -- .../Limitation/ParentUserGroupLimitationTest.php | 2 -- .../User/Limitation/RolePolicyLimitationTest.php | 2 -- .../User/Limitation/SectionLimitationTest.php | 2 -- .../User/Limitation/StatusLimitationTest.php | 2 -- .../User/Limitation/SubtreeLimitationTest.php | 2 -- .../User/Limitation/UserGroupLimitationTest.php | 2 -- .../User/UserStorage/UserStorageGatewayTest.php | 2 -- .../Compiler/FieldTypeRegistryPassTest.php | 2 -- .../GenericFieldTypeConverterPassTest.php | 2 -- .../Compiler/Search/FieldTypeRegistryPassTest.php | 2 -- .../Search/Legacy/CriteriaConverterPassTest.php | 2 -- ...CriterionFieldValueHandlerRegistryPassTest.php | 2 -- .../Search/Legacy/SortClauseConverterPassTest.php | 2 -- .../Storage/ExternalStorageRegistryPassTest.php | 2 -- .../FieldValueConverterRegistryPassTest.php | 2 -- .../Legacy/RoleLimitationConverterPassTest.php | 2 -- .../Compiler/Stubs/GatewayBasedStorageHandler.php | 2 -- .../Container/Compiler/Stubs/GenericFieldType.php | 2 -- .../BackwardCompatibleIteratorTest.php | 2 -- .../DeprecationErrorCollector.php | 2 -- tests/lib/Event/AbstractServiceTest.php | 2 -- tests/lib/Event/BookmarkServiceTest.php | 2 -- tests/lib/Event/ContentServiceTest.php | 2 -- tests/lib/Event/ContentTypeServiceTest.php | 2 -- tests/lib/Event/LanguageServiceTest.php | 2 -- tests/lib/Event/LocationServiceTest.php | 2 -- tests/lib/Event/NotificationServiceTest.php | 2 -- tests/lib/Event/ObjectStateServiceTest.php | 2 -- tests/lib/Event/RoleServiceTest.php | 2 -- tests/lib/Event/SectionServiceTest.php | 2 -- tests/lib/Event/SettingServiceTest.php | 2 -- tests/lib/Event/TrashServiceTest.php | 2 -- tests/lib/Event/URLAliasServiceTest.php | 2 -- tests/lib/Event/URLServiceTest.php | 2 -- tests/lib/Event/URLWildcardServiceTest.php | 2 -- tests/lib/Event/UserPreferenceServiceTest.php | 2 -- tests/lib/Event/UserServiceTest.php | 2 -- tests/lib/FieldType/APIFieldTypeTest.php | 2 -- tests/lib/FieldType/AuthorTest.php | 2 -- tests/lib/FieldType/BaseFieldTypeTest.php | 2 -- tests/lib/FieldType/BinaryBaseTest.php | 2 -- tests/lib/FieldType/BinaryFileTest.php | 2 -- tests/lib/FieldType/CheckboxTest.php | 2 -- tests/lib/FieldType/CountryTest.php | 2 -- tests/lib/FieldType/DateAndTimeTest.php | 2 -- tests/lib/FieldType/DateTest.php | 2 -- tests/lib/FieldType/EmailAddressTest.php | 2 -- tests/lib/FieldType/EmailAddressValidatorTest.php | 2 -- tests/lib/FieldType/FieldTypeMockTest.php | 2 -- tests/lib/FieldType/FieldTypeTest.php | 2 -- tests/lib/FieldType/FileSizeValidatorTest.php | 2 -- tests/lib/FieldType/FloatTest.php | 2 -- tests/lib/FieldType/FloatValueValidatorTest.php | 2 -- tests/lib/FieldType/Generic/GenericTest.php | 2 -- tests/lib/FieldType/Generic/Stubs/Type.php | 2 -- tests/lib/FieldType/Generic/Stubs/Value.php | 2 -- .../SymfonySerializerAdapterTest.php | 2 -- tests/lib/FieldType/ISBNTest.php | 2 -- tests/lib/FieldType/Image/IO/LegacyTest.php | 2 -- .../PathGenerator/LegacyPathGeneratorTest.php | 2 -- .../lib/FieldType/ImageAsset/AssetMapperTest.php | 2 -- tests/lib/FieldType/ImageAssetTest.php | 2 -- tests/lib/FieldType/ImageTest.php | 2 -- tests/lib/FieldType/IntegerTest.php | 2 -- tests/lib/FieldType/IntegerValueValidatorTest.php | 2 -- tests/lib/FieldType/KeywordTest.php | 2 -- tests/lib/FieldType/MapLocationTest.php | 2 -- tests/lib/FieldType/MediaTest.php | 2 -- tests/lib/FieldType/RelationListTest.php | 2 -- tests/lib/FieldType/RelationTest.php | 2 -- tests/lib/FieldType/SelectionTest.php | 2 -- tests/lib/FieldType/StringLengthValidatorTest.php | 2 -- tests/lib/FieldType/TextBlockTest.php | 2 -- tests/lib/FieldType/TextLineTest.php | 2 -- tests/lib/FieldType/TimeTest.php | 2 -- .../FieldType/Url/Gateway/DoctrineStorageTest.php | 2 -- tests/lib/FieldType/Url/UrlStorageTest.php | 2 -- tests/lib/FieldType/UrlTest.php | 2 -- tests/lib/FieldType/UserTest.php | 2 -- .../SudoMainLocationLoaderTest.php | 2 -- tests/lib/Helper/ContentPreviewHelperTest.php | 2 -- tests/lib/Helper/FieldHelperTest.php | 2 -- .../ArrayTranslatorFieldsGroupsListTest.php | 2 -- ...epositoryConfigFieldsGroupsListFactoryTest.php | 2 -- tests/lib/Helper/PreviewLocationProviderTest.php | 2 -- tests/lib/Helper/TranslationHelperTest.php | 2 -- .../IO/ConfigScopeChangeAwareIOServiceTest.php | 2 -- .../lib/IO/IOBinarydataHandler/FlysystemTest.php | 2 -- tests/lib/IO/IOMetadataHandler/FlysystemTest.php | 2 -- tests/lib/IO/IOServiceTest.php | 2 -- tests/lib/IO/MetadataHandler/ImageSizeTest.php | 2 -- tests/lib/IO/MimeTypeDetector/FileInfoTest.php | 2 -- tests/lib/IO/TolerantIOServiceTest.php | 2 -- tests/lib/IO/UrlDecorator/AbsolutePrefixTest.php | 2 -- tests/lib/IO/UrlDecorator/PrefixTest.php | 2 -- tests/lib/IO/UrlRedecoratorTest.php | 2 -- tests/lib/Limitation/Base.php | 2 -- .../lib/Limitation/BlockingLimitationTypeTest.php | 2 -- .../Limitation/ContentTypeLimitationTypeTest.php | 2 -- .../ContentDeleteEvaluatorTest.php | 2 -- .../lib/Limitation/LocationLimitationTypeTest.php | 2 -- .../NewObjectStateLimitationTypeTest.php | 2 -- .../Limitation/ObjectStateLimitationTypeTest.php | 2 -- .../ParentContentTypeLimitationTypeTest.php | 2 -- .../Limitation/ParentDepthLimitationTypeTest.php | 2 -- .../lib/Limitation/SectionLimitationTypeTest.php | 2 -- .../Limitation/SiteAccessLimitationTypeTest.php | 2 -- tests/lib/Limitation/StatusLimitationTypeTest.php | 2 -- .../lib/Limitation/SubtreeLimitationTypeTest.php | 2 -- .../Serializer/CompoundMatcherNormalizerTest.php | 2 -- .../Serializer/HostElementNormalizerTest.php | 2 -- .../Serializer/HostTextNormalizerTest.php | 2 -- .../Component/Serializer/MapNormalizerTest.php | 2 -- .../Serializer/RegexHostNormalizerTest.php | 2 -- .../Component/Serializer/RegexNormalizerTest.php | 2 -- .../Serializer/RegexURINormalizerTest.php | 2 -- .../SimplifiedRequestNormalizerTest.php | 2 -- .../Component/Serializer/Stubs/CompoundStub.php | 2 -- .../Component/Serializer/Stubs/MatcherStub.php | 2 -- .../Component/Serializer/Stubs/RegexMatcher.php | 2 -- .../Component/Serializer/Stubs/SerializerStub.php | 2 -- .../Serializer/URIElementNormalizerTest.php | 2 -- .../Serializer/URITextNormalizerTest.php | 2 -- .../lib/MVC/Symfony/Controller/ControllerTest.php | 2 -- .../Controller/QueryRenderControllerTest.php | 2 -- .../Symfony/Event/ContentCacheClearEventTest.php | 2 -- .../Symfony/Event/InteractiveLoginEventTest.php | 2 -- .../Event/RouteReferenceGenerationEventTest.php | 2 -- .../MVC/Symfony/Event/ScopeChangeEventTest.php | 2 -- .../ContentViewTwigVariablesSubscriberTest.php | 2 -- .../EventListener/LanguageSwitchListenerTest.php | 2 -- .../EventListener/SiteAccessMatchListenerTest.php | 2 -- .../ImageAsset/ParameterProviderTest.php | 2 -- .../FieldType/Relation/ParameterProviderTest.php | 2 -- .../RelationList/ParameterProviderTest.php | 2 -- .../FieldType/User/ParameterProviderTest.php | 2 -- .../LocaleParameterProviderTest.php | 2 -- .../View/ParameterProviderRegistryTest.php | 2 -- .../MVC/Symfony/Locale/LocaleConverterTest.php | 2 -- .../Locale/UserLanguagePreferenceProviderTest.php | 2 -- .../MVC/Symfony/Matcher/ContentBased/BaseTest.php | 2 -- .../Symfony/Matcher/ContentBased/DepthTest.php | 2 -- .../Matcher/ContentBased/Id/ContentTest.php | 2 -- .../ContentBased/Id/ContentTypeGroupTest.php | 2 -- .../Matcher/ContentBased/Id/ContentTypeTest.php | 2 -- .../Matcher/ContentBased/Id/LocationTest.php | 2 -- .../ContentBased/Id/ParentContentTypeTest.php | 2 -- .../ContentBased/Id/ParentLocationTest.php | 2 -- .../Matcher/ContentBased/Id/RemoteTest.php | 2 -- .../Matcher/ContentBased/Id/SectionTest.php | 2 -- .../ContentBased/Identifier/ContentTypeTest.php | 2 -- .../Identifier/ParentContentTypeTest.php | 2 -- .../ContentBased/Identifier/SectionTest.php | 2 -- .../Matcher/ContentBased/MultipleValuedTest.php | 2 -- .../Symfony/Matcher/ContentBased/UrlAliasTest.php | 2 -- ...callyConfiguredMatcherFactoryDecoratorTest.php | 2 -- tests/lib/MVC/Symfony/Routing/GeneratorTest.php | 2 -- .../Routing/RouteReferenceGeneratorTest.php | 2 -- .../MVC/Symfony/Routing/RouteReferenceTest.php | 2 -- .../MVC/Symfony/Routing/SimplifiedRequestTest.php | 2 -- .../MVC/Symfony/Routing/UrlAliasGeneratorTest.php | 2 -- .../MVC/Symfony/Routing/UrlAliasRouterTest.php | 2 -- .../AnonymousAuthenticationProviderTest.php | 2 -- .../DefaultAuthenticationSuccessHandlerTest.php | 2 -- ...mberMeRepositoryAuthenticationProviderTest.php | 2 -- .../RepositoryAuthenticationProviderTest.php | 2 -- .../EventListener/SecurityListenerTest.php | 2 -- tests/lib/MVC/Symfony/Security/HttpUtilsTest.php | 2 -- .../Security/InteractiveLoginTokenTest.php | 2 -- .../Symfony/Security/User/EmailProviderTest.php | 2 -- .../Security/User/UsernameProviderTest.php | 2 -- .../lib/MVC/Symfony/Security/UserCheckerTest.php | 2 -- tests/lib/MVC/Symfony/Security/UserTest.php | 2 -- .../lib/MVC/Symfony/Security/UserWrappedTest.php | 2 -- .../MVC/Symfony/Security/Voter/CoreVoterTest.php | 2 -- .../Security/Voter/ValueObjectVoterTest.php | 2 -- .../SiteAccess/Compound/CompoundAndTest.php | 2 -- .../SiteAccess/Compound/CompoundOrTest.php | 2 -- .../SiteAccess/MatcherSerializationTest.php | 2 -- .../Provider/ChainSiteAccessProviderTest.php | 2 -- .../lib/MVC/Symfony/SiteAccess/RouterBaseTest.php | 2 -- .../Symfony/SiteAccess/RouterHostElementTest.php | 2 -- .../Symfony/SiteAccess/RouterHostPortURITest.php | 2 -- .../Symfony/SiteAccess/RouterHostRegexTest.php | 2 -- .../MVC/Symfony/SiteAccess/RouterHostTextTest.php | 2 -- .../MVC/Symfony/SiteAccess/RouterMapURITest.php | 2 -- .../Symfony/SiteAccess/RouterPortHostURITest.php | 2 -- .../Symfony/SiteAccess/RouterSpecialPortsTest.php | 2 -- tests/lib/MVC/Symfony/SiteAccess/RouterTest.php | 2 -- .../Symfony/SiteAccess/RouterURIElement2Test.php | 2 -- .../Symfony/SiteAccess/RouterURIElementTest.php | 2 -- .../MVC/Symfony/SiteAccess/RouterURIRegexTest.php | 2 -- .../MVC/Symfony/SiteAccess/RouterURITextTest.php | 2 -- .../Symfony/SiteAccess/SiteAccessServiceTest.php | 2 -- .../MVC/Symfony/SiteAccess/SiteAccessSetting.php | 2 -- .../Symfony/Templating/BaseRenderStrategyTest.php | 2 -- .../MVC/Symfony/Templating/GlobalHelperTest.php | 2 -- .../Templating/RenderContentStrategyTest.php | 2 -- .../Templating/RenderLocationStrategyTest.php | 2 -- .../MVC/Symfony/Templating/RenderOptionsTest.php | 2 -- .../MVC/Symfony/Templating/RenderStrategyTest.php | 2 -- .../Twig/Extension/ContentExtensionTest.php | 2 -- .../Extension/DataAttributesExtensionTest.php | 2 -- .../FieldRenderingExtensionIntegrationTest.php | 2 -- .../Twig/Extension/FileSizeExtensionTest.php | 2 -- .../FileSystemTwigIntegrationTestCase.php | 2 -- .../Extension/QueryRenderingExtensionTest.php | 2 -- .../Twig/Extension/RoutingExtensionTest.php | 2 -- .../Templating/Twig/ResourceProviderTest.php | 2 -- tests/lib/MVC/Symfony/View/AbstractViewTest.php | 2 -- .../View/Builder/ContentViewBuilderTest.php | 2 -- tests/lib/MVC/Symfony/View/ContentViewTest.php | 2 -- tests/lib/MVC/Symfony/View/LoginFormViewTest.php | 2 -- .../View/Renderer/TemplateRendererTest.php | 2 -- .../Symfony/View/VariableProviderRegistryTest.php | 2 -- tests/lib/MVC/Symfony/View/ViewManagerTest.php | 2 -- .../SearchHitAdapterFactoryTest.php | 2 -- .../Pagination/ContentFilteringAdapterTest.php | 2 -- tests/lib/Pagination/ContentSearchAdapterTest.php | 2 -- .../Pagination/ContentSearchHitAdapterTest.php | 2 -- .../FixedSearchResultHitAdapterTest.php | 2 -- .../Pagination/LocationFilteringAdapterTest.php | 2 -- .../lib/Pagination/LocationSearchAdapterTest.php | 2 -- .../Pagination/LocationSearchHitAdapterTest.php | 2 -- tests/lib/Pagination/PagerfantaTest.php | 2 -- .../Persistence/Cache/AbstractBaseHandlerTest.php | 2 -- .../Cache/AbstractCacheHandlerTest.php | 2 -- .../Cache/AbstractInMemoryCacheHandlerTest.php | 2 -- .../Adapter/InMemoryClearingProxyAdapterTest.php | 2 -- .../lib/Persistence/Cache/BookmarkHandlerTest.php | 2 -- .../lib/Persistence/Cache/ContentHandlerTest.php | 2 -- .../Cache/ContentLanguageHandlerTest.php | 2 -- .../Persistence/Cache/ContentTypeHandlerTest.php | 2 -- .../Cache/InMemory/InMemoryCacheTest.php | 1 - .../lib/Persistence/Cache/LocationHandlerTest.php | 2 -- .../Persistence/Cache/NotificationHandlerTest.php | 2 -- .../Persistence/Cache/ObjectStateHandlerTest.php | 2 -- .../Persistence/Cache/PersistenceHandlerTest.php | 2 -- .../Persistence/Cache/PersistenceLoggerTest.php | 2 -- .../lib/Persistence/Cache/SectionHandlerTest.php | 2 -- .../lib/Persistence/Cache/SettingHandlerTest.php | 2 -- .../Persistence/Cache/TransactionHandlerTest.php | 2 -- tests/lib/Persistence/Cache/TrashHandlerTest.php | 2 -- tests/lib/Persistence/Cache/URLHandlerTest.php | 2 -- .../lib/Persistence/Cache/UrlAliasHandlerTest.php | 2 -- .../Persistence/Cache/UrlWildcardHandlerTest.php | 2 -- tests/lib/Persistence/Cache/UserHandlerTest.php | 2 -- .../Cache/UserPreferenceHandlerTest.php | 2 -- .../lib/Persistence/DatabaseConnectionFactory.php | 2 -- tests/lib/Persistence/FieldTypeRegistryTest.php | 2 -- .../FieldValue/Converter/ImageConverterTest.php | 2 -- .../Bookmark/Gateway/DoctrineDatabaseTest.php | 2 -- .../Persistence/Legacy/Bookmark/HandlerTest.php | 2 -- .../Persistence/Legacy/Bookmark/MapperTest.php | 2 -- .../Legacy/Content/ContentHandlerTest.php | 2 -- .../Legacy/Content/FieldHandlerTest.php | 2 -- .../Content/FieldValue/Converter/AuthorTest.php | 2 -- .../Content/FieldValue/Converter/CheckboxTest.php | 2 -- .../Content/FieldValue/Converter/CountryTest.php | 2 -- .../FieldValue/Converter/DateAndTimeTest.php | 2 -- .../Content/FieldValue/Converter/DateTest.php | 2 -- .../Content/FieldValue/Converter/ISBNTest.php | 2 -- .../Content/FieldValue/Converter/KeywordTest.php | 2 -- .../Content/FieldValue/Converter/MediaTest.php | 2 -- .../FieldValue/Converter/RelationListTest.php | 2 -- .../Content/FieldValue/Converter/RelationTest.php | 2 -- .../FieldValue/Converter/SelectionTest.php | 2 -- .../Converter/SerializableConverterTest.php | 2 -- .../FieldValue/Converter/TextBlockTest.php | 2 -- .../Content/FieldValue/Converter/TextLineTest.php | 2 -- .../Content/FieldValue/Converter/TimeTest.php | 2 -- .../Content/FieldValue/Converter/UrlTest.php | 2 -- .../Content/FieldValueConverterRegistryTest.php | 2 -- .../Content/Gateway/DoctrineDatabaseTest.php | 2 -- .../RandomSortClauseHandlerFactoryTest.php | 2 -- .../Language/CachingLanguageHandlerTest.php | 2 -- .../Language/Gateway/DoctrineDatabaseTest.php | 2 -- .../Content/Language/LanguageHandlerTest.php | 2 -- .../Legacy/Content/Language/MapperTest.php | 2 -- .../Legacy/Content/Language/MaskGeneratorTest.php | 2 -- .../Legacy/Content/LanguageAwareTestCase.php | 2 -- .../Legacy/Content/LanguageHandlerMock.php | 2 -- .../Location/Gateway/DoctrineDatabaseTest.php | 2 -- .../Gateway/DoctrineDatabaseTrashTest.php | 2 -- .../Legacy/Content/Location/MapperTest.php | 2 -- .../Legacy/Content/Location/TrashHandlerTest.php | 2 -- .../Legacy/Content/LocationHandlerTest.php | 2 -- .../lib/Persistence/Legacy/Content/MapperTest.php | 2 -- .../ObjectState/Gateway/DoctrineDatabaseTest.php | 2 -- .../Legacy/Content/ObjectState/MapperTest.php | 2 -- .../ObjectState/ObjectStateHandlerTest.php | 2 -- .../Section/Gateway/DoctrineDatabaseTest.php | 2 -- .../Legacy/Content/Section/SectionHandlerTest.php | 2 -- .../Legacy/Content/StorageHandlerTest.php | 2 -- .../Legacy/Content/StorageRegistryTest.php | 2 -- .../Legacy/Content/TreeHandlerTest.php | 2 -- .../Content/Type/ContentTypeHandlerTest.php | 2 -- .../Type/ContentUpdater/Action/AddFieldTest.php | 2 -- .../ContentUpdater/Action/RemoveFieldTest.php | 2 -- .../Legacy/Content/Type/ContentUpdaterTest.php | 2 -- .../Content/Type/Gateway/DoctrineDatabaseTest.php | 2 -- .../Legacy/Content/Type/MapperTest.php | 2 -- .../Type/Update/Handler/DoctrineDatabaseTest.php | 2 -- .../UrlAlias/Gateway/DoctrineDatabaseTest.php | 2 -- .../Legacy/Content/UrlAlias/SlugConverterTest.php | 2 -- .../Content/UrlAlias/UrlAliasHandlerTest.php | 2 -- .../Content/UrlAlias/UrlAliasMapperTest.php | 2 -- .../UrlWildcard/Gateway/DoctrineDatabaseTest.php | 2 -- .../UrlWildcard/UrlWildcardHandlerTest.php | 2 -- .../Content/UrlWildcard/UrlWildcardMapperTest.php | 2 -- .../FieldValue/Converter/ImageConverterTest.php | 2 -- .../BaseCriterionVisitorQueryBuilderTestCase.php | 2 -- .../LanguageCodeQueryBuilderQueryBuilderTest.php | 2 -- .../Location/AncestorQueryBuilderTest.php | 2 -- .../Location/LocationIdQueryBuilderTest.php | 2 -- .../Location/ParentLocationQueryBuilderTest.php | 2 -- ...ogicalOperatorQueryBuilderQueryBuilderTest.php | 2 -- tests/lib/Persistence/Legacy/HandlerTest.php | 2 -- .../Notification/Gateway/DoctrineDatabaseTest.php | 2 -- .../Legacy/Notification/HandlerTest.php | 2 -- .../Legacy/Notification/MapperTest.php | 2 -- .../Legacy/Setting/SettingHandlerTest.php | 2 -- .../Legacy/SharedGateway/GatewayFactoryTest.php | 2 -- tests/lib/Persistence/Legacy/TestCase.php | 2 -- .../Persistence/Legacy/TransactionHandlerTest.php | 2 -- .../Legacy/URL/Gateway/DoctrineDatabaseTest.php | 2 -- tests/lib/Persistence/Legacy/URL/HandlerTest.php | 2 -- tests/lib/Persistence/Legacy/URL/MapperTest.php | 2 -- .../Legacy/URL/Query/CriteriaConverterTest.php | 2 -- .../CriterionHandler/CriterionHandlerTest.php | 2 -- .../URL/Query/CriterionHandler/LogicalAndTest.php | 2 -- .../URL/Query/CriterionHandler/LogicalNotTest.php | 2 -- .../URL/Query/CriterionHandler/LogicalOrTest.php | 2 -- .../URL/Query/CriterionHandler/MatchAllTest.php | 2 -- .../URL/Query/CriterionHandler/MatchNoneTest.php | 2 -- .../URL/Query/CriterionHandler/PatternTest.php | 2 -- .../URL/Query/CriterionHandler/ValidityTest.php | 2 -- .../Query/CriterionHandler/VisibleOnlyTest.php | 2 -- .../Legacy/User/Gateway/DoctrineDatabaseTest.php | 2 -- .../User/Role/Gateway/DoctrineDatabaseTest.php | 2 -- .../Legacy/User/Role/LimitationConverterTest.php | 2 -- .../Persistence/Legacy/User/UserHandlerTest.php | 2 -- .../Gateway/DoctrineDatabaseTest.php | 2 -- .../Legacy/UserPreference/HandlerTest.php | 2 -- .../Legacy/UserPreference/MapperTest.php | 2 -- .../Target/Builder/VersionBuilderTest.php | 2 -- ...ormationProcessorDefinitionBasedParserTest.php | 2 -- ...TransformationProcessorDefinitionBasedTest.php | 2 -- .../TransformationProcessorPcreCompilerTest.php | 2 -- ...ansformationProcessorPreprocessedBasedTest.php | 2 -- tests/lib/Query/QueryFactoryTest.php | 2 -- .../QueryType/BuiltIn/AbstractQueryTypeTest.php | 2 -- .../QueryType/BuiltIn/AncestorsQueryTypeTest.php | 2 -- .../QueryType/BuiltIn/ChildrenQueryTypeTest.php | 2 -- .../BuiltIn/GeoLocationQueryTypeTest.php | 2 -- .../BuiltIn/RelatedToContentQueryTypeTest.php | 2 -- .../QueryType/BuiltIn/SiblingsQueryTypeTest.php | 2 -- .../CustomFieldSortClauseParserTest.php | 2 -- .../DefaultSortClauseParserTest.php | 2 -- .../FieldSortClauseParserTest.php | 2 -- .../MapDistanceSortClauseParserTest.php | 2 -- .../RandomSortClauseParserTest.php | 2 -- .../SortSpec/SortClauseParserDispatcherTest.php | 2 -- .../BuiltIn/SortSpec/SortSpecLexerStub.php | 2 -- .../BuiltIn/SortSpec/SortSpecLexerTest.php | 2 -- .../BuiltIn/SortSpec/SortSpecParserTest.php | 2 -- tests/lib/QueryType/BuiltIn/SubtreeQueryTest.php | 2 -- .../Repository/Common/FacetedSearchProvider.php | 2 -- .../ContentThumbnail/ContentFieldStrategyTest.php | 2 -- .../ContentThumbnail/StaticStrategyTest.php | 2 -- .../ThumbnailChainStrategyTest.php | 2 -- .../ContentValidatorStrategyTest.php | 2 -- .../Decorator/BookmarkServiceDecoratorTest.php | 2 -- .../Decorator/ContentServiceDecoratorTest.php | 2 -- .../Decorator/ContentTypeServiceDecoratorTest.php | 2 -- .../Decorator/FieldTypeServiceDecoratorTest.php | 2 -- .../Decorator/LanguageServiceDecoratorTest.php | 2 -- .../Decorator/LocationServiceDecoratorTest.php | 2 -- .../NotificationServiceDecoratorTest.php | 2 -- .../Decorator/ObjectStateServiceDecoratorTest.php | 2 -- .../Decorator/RoleServiceDecoratorTest.php | 2 -- .../Decorator/SearchServiceDecoratorTest.php | 2 -- .../Decorator/SectionServiceDecoratorTest.php | 2 -- .../Decorator/SettingServiceDecoratorTest.php | 2 -- .../Decorator/TranslationServiceDecoratorTest.php | 2 -- .../Decorator/TrashServiceDecoratorTest.php | 2 -- .../Decorator/URLAliasServiceDecoratorTest.php | 2 -- .../Decorator/URLServiceDecoratorTest.php | 2 -- .../Decorator/URLWildcardServiceDecoratorTest.php | 2 -- .../UserPreferenceServiceDecoratorTest.php | 2 -- .../Decorator/UserServiceDecoratorTest.php | 2 -- .../Repository/Filtering/TestContentProvider.php | 2 -- .../Repository/Helper/FieldTypeRegistryTest.php | 2 -- tests/lib/Repository/IdManager/Php.php | 2 -- .../AbstractSearchAdapterTest.php | 2 -- .../ContentFilteringAdapterTest.php | 2 -- .../ContentInfoSearchAdapterTest.php | 2 -- .../ContentSearchAdapterTest.php | 2 -- .../LocationFilteringAdapterTest.php | 2 -- .../LocationSearchAdapterTest.php | 2 -- .../lib/Repository/Iterator/BatchIteratorTest.php | 2 -- .../Iterator/BatchIteratorTestAdapter.php | 2 -- tests/lib/Repository/LegacySchemaImporter.php | 2 -- .../PermissionAwareLocationResolverTest.php | 2 -- .../AllValidationErrorsOccur.php | 2 -- .../PHPUnitConstraint/ContentItemEquals.php | 2 -- .../PHPUnitConstraint/ValidationErrorOccurs.php | 2 -- .../Repository/Parallel/ParallelProcessList.php | 2 -- .../Permission/CachedPermissionServiceTest.php | 2 -- .../PermissionCriterionResolverTest.php | 2 -- tests/lib/Repository/Service/Mock/Base.php | 2 -- .../lib/Repository/Service/Mock/BookmarkTest.php | 2 -- tests/lib/Repository/Service/Mock/ContentTest.php | 2 -- .../Repository/Service/Mock/PermissionTest.php | 2 -- .../Mock/PermissionsCriterionHandlerTest.php | 2 -- .../Service/Mock/RelationProcessorTest.php | 2 -- .../Repository/Service/Mock/RepositoryTest.php | 2 -- tests/lib/Repository/Service/Mock/RoleTest.php | 2 -- tests/lib/Repository/Service/Mock/SearchTest.php | 2 -- .../lib/Repository/Service/Mock/UrlAliasTest.php | 2 -- tests/lib/Repository/Service/Mock/UrlTest.php | 2 -- .../Repository/Service/Mock/UrlWildcardTest.php | 2 -- .../Service/Mock/UserPasswordValidatorTest.php | 2 -- .../Service/Mock/UserPreferenceTest.php | 2 -- tests/lib/Repository/Service/Mock/UserTest.php | 2 -- tests/lib/Repository/Service/Mock/ValueStub.php | 2 -- .../SiteAccessAware/AbstractServiceTest.php | 2 -- .../SiteAccessAware/ContentServiceTest.php | 2 -- .../SiteAccessAware/ContentTypeServiceTest.php | 2 -- .../Language/LanguageResolverTest.php | 2 -- .../SiteAccessAware/LanguageServiceTest.php | 2 -- .../SiteAccessAware/LocationServiceTest.php | 2 -- .../SiteAccessAware/ObjectStateServiceTest.php | 2 -- .../SiteAccessAware/SearchServiceTest.php | 2 -- .../SiteAccessAware/TrashServiceTest.php | 2 -- .../SiteAccessAware/UrlAliasServiceTest.php | 2 -- .../SiteAccessAware/UserServiceTest.php | 2 -- .../Repository/User/PasswordHashServiceTest.php | 2 -- .../Repository/Values/Content/ContentInfoTest.php | 2 -- .../lib/Repository/Values/Content/ContentTest.php | 2 -- .../Repository/Values/Content/LanguageTest.php | 2 -- .../Repository/Values/Content/LocationTest.php | 2 -- .../Location/SubtreeTermAggregationTest.php | 2 -- .../Content/Query/Aggregation/RangeTest.php | 2 -- .../lib/Repository/Values/Content/SectionTest.php | 2 -- .../Repository/Values/Content/TrashItemTest.php | 2 -- .../Repository/Values/Content/VersionInfoTest.php | 2 -- .../Values/ContentType/ContentTypeDraftTest.php | 2 -- .../Values/ContentType/ContentTypeTest.php | 2 -- .../ContentType/FieldDefinitionCollectionTest.php | 2 -- tests/lib/Repository/Values/Filter/FilterTest.php | 2 -- .../Repository/Values/MultiLanguageTestTrait.php | 2 -- .../Values/ObjectState/ObjectStateGroupTest.php | 2 -- .../Values/ObjectState/ObjectStateTest.php | 2 -- tests/lib/Repository/Values/User/PolicyTest.php | 2 -- tests/lib/Repository/Values/User/RoleTest.php | 2 -- .../lib/Repository/Values/User/UserGroupTest.php | 2 -- tests/lib/Repository/Values/User/UserTest.php | 2 -- .../Repository/Values/ValueObjectTestTrait.php | 2 -- .../RemoteIdentifierMapperTest.php | 2 -- .../LocationEventSubscriberTest.php | 2 -- tests/lib/Search/FieldNameResolverTest.php | 2 -- .../Search/Legacy/Content/AbstractTestCase.php | 2 -- .../Legacy/Content/HandlerContentSortTest.php | 2 -- .../Search/Legacy/Content/HandlerContentTest.php | 2 -- .../Legacy/Content/HandlerLocationSortTest.php | 2 -- .../Search/Legacy/Content/HandlerLocationTest.php | 2 -- tests/lib/Search/TestCase.php | 2 -- .../Content/ContentContainerSpecificationTest.php | 2 -- .../Content/ContentTypeSpecificationTest.php | 2 -- 2745 files changed, 1 insertion(+), 5502 deletions(-) diff --git a/composer.json b/composer.json index 02227f8fd8..2dcea1f3b2 100644 --- a/composer.json +++ b/composer.json @@ -98,20 +98,7 @@ "Ibexa\\Core\\": "src/lib", "Ibexa\\Tests\\Core\\": "tests/lib", "Ibexa\\Tests\\Integration\\Core\\": "tests/integration/Core", - "Ibexa\\Tests\\Bundle\\Core\\": "tests/bundle/Core", - "eZ\\Publish\\API\\Repository\\Tests\\": "src/contracts/Test/Repository", - "eZ\\Publish\\SPI\\Tests\\": "src/contracts/Test", - "eZ\\Publish\\API\\": "src/contracts", - "eZ\\Publish\\SPI\\": "src/contracts", - "eZ\\Publish\\Core\\": "src/lib", - "eZ\\Bundle\\EzPublishCoreBundle\\": "src/bundle/Core", - "eZ\\Bundle\\EzPublishDebugBundle\\": "src/bundle/Debug", - "eZ\\Bundle\\EzPublishIOBundle\\": "src/bundle/IO", - "eZ\\Bundle\\EzPublishLegacySearchEngineBundle\\": "src/bundle/LegacySearchEngine", - "eZ\\Bundle\\EzPublishCoreBundle\\Tests\\": "tests/bundle/Core", - "eZ\\Publish\\Core\\MVC\\Symfony\\Templating\\Tests\\": "tests/lib/MVC/Symfony/Templating", - "eZ\\Publish\\Core\\Persistence\\Legacy\\Tests\\": "tests/lib/Persistence/Legacy", - "EzSystems\\PlatformInstallerBundle\\": "src/bundle/RepositoryInstaller" + "Ibexa\\Tests\\Bundle\\Core\\": "tests/bundle/Core" } }, "autoload-dev": { diff --git a/src/bundle/Core/ApiLoader/CacheFactory.php b/src/bundle/Core/ApiLoader/CacheFactory.php index 76c64e8313..39af86f7de 100644 --- a/src/bundle/Core/ApiLoader/CacheFactory.php +++ b/src/bundle/Core/ApiLoader/CacheFactory.php @@ -42,5 +42,3 @@ public function getCachePool(ConfigResolverInterface $configResolver) ); } } - -class_alias(CacheFactory::class, 'eZ\Bundle\EzPublishCoreBundle\ApiLoader\CacheFactory'); diff --git a/src/bundle/Core/ApiLoader/Exception/InvalidRepositoryException.php b/src/bundle/Core/ApiLoader/Exception/InvalidRepositoryException.php index d210cb1f9a..0c3fe878f6 100644 --- a/src/bundle/Core/ApiLoader/Exception/InvalidRepositoryException.php +++ b/src/bundle/Core/ApiLoader/Exception/InvalidRepositoryException.php @@ -12,5 +12,3 @@ class InvalidRepositoryException extends InvalidArgumentException { } - -class_alias(InvalidRepositoryException::class, 'eZ\Bundle\EzPublishCoreBundle\ApiLoader\Exception\InvalidRepositoryException'); diff --git a/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngine.php b/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngine.php index 0188c33f0c..1ddb12ba6b 100644 --- a/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngine.php +++ b/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngine.php @@ -12,5 +12,3 @@ class InvalidSearchEngine extends InvalidArgumentException { } - -class_alias(InvalidSearchEngine::class, 'eZ\Bundle\EzPublishCoreBundle\ApiLoader\Exception\InvalidSearchEngine'); diff --git a/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngineIndexer.php b/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngineIndexer.php index 13918a4424..beef3cd514 100644 --- a/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngineIndexer.php +++ b/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngineIndexer.php @@ -12,5 +12,3 @@ class InvalidSearchEngineIndexer extends InvalidArgumentException { } - -class_alias(InvalidSearchEngineIndexer::class, 'eZ\Bundle\EzPublishCoreBundle\ApiLoader\Exception\InvalidSearchEngineIndexer'); diff --git a/src/bundle/Core/ApiLoader/Exception/InvalidStorageEngine.php b/src/bundle/Core/ApiLoader/Exception/InvalidStorageEngine.php index 89936af64b..fde4dfddd8 100644 --- a/src/bundle/Core/ApiLoader/Exception/InvalidStorageEngine.php +++ b/src/bundle/Core/ApiLoader/Exception/InvalidStorageEngine.php @@ -12,5 +12,3 @@ class InvalidStorageEngine extends InvalidArgumentException { } - -class_alias(InvalidStorageEngine::class, 'eZ\Bundle\EzPublishCoreBundle\ApiLoader\Exception\InvalidStorageEngine'); diff --git a/src/bundle/Core/ApiLoader/RepositoryConfigurationProvider.php b/src/bundle/Core/ApiLoader/RepositoryConfigurationProvider.php index 681bef61a6..eaab7d983d 100644 --- a/src/bundle/Core/ApiLoader/RepositoryConfigurationProvider.php +++ b/src/bundle/Core/ApiLoader/RepositoryConfigurationProvider.php @@ -73,5 +73,3 @@ public function getStorageConnectionName(): string : self::DEFAULT_CONNECTION_NAME; } } - -class_alias(RepositoryConfigurationProvider::class, 'eZ\Bundle\EzPublishCoreBundle\ApiLoader\RepositoryConfigurationProvider'); diff --git a/src/bundle/Core/ApiLoader/RepositoryFactory.php b/src/bundle/Core/ApiLoader/RepositoryFactory.php index 41c1de89c2..676131f33d 100644 --- a/src/bundle/Core/ApiLoader/RepositoryFactory.php +++ b/src/bundle/Core/ApiLoader/RepositoryFactory.php @@ -134,5 +134,3 @@ public function buildRepository( ); } } - -class_alias(RepositoryFactory::class, 'eZ\Bundle\EzPublishCoreBundle\ApiLoader\RepositoryFactory'); diff --git a/src/bundle/Core/ApiLoader/SearchEngineFactory.php b/src/bundle/Core/ApiLoader/SearchEngineFactory.php index adf691b794..2fb9b26ab9 100644 --- a/src/bundle/Core/ApiLoader/SearchEngineFactory.php +++ b/src/bundle/Core/ApiLoader/SearchEngineFactory.php @@ -85,5 +85,3 @@ public function buildSearchEngine(): SearchHandler return $this->searchEngines[$searchEngineAlias]; } } - -class_alias(SearchEngineFactory::class, 'eZ\Bundle\EzPublishCoreBundle\ApiLoader\SearchEngineFactory'); diff --git a/src/bundle/Core/ApiLoader/SearchEngineIndexerFactory.php b/src/bundle/Core/ApiLoader/SearchEngineIndexerFactory.php index 4996de1dee..231e4637ac 100644 --- a/src/bundle/Core/ApiLoader/SearchEngineIndexerFactory.php +++ b/src/bundle/Core/ApiLoader/SearchEngineIndexerFactory.php @@ -88,5 +88,3 @@ public function buildSearchEngineIndexer(): SearchEngineIndexer return $this->searchEngineIndexers[$searchEngineAlias]; } } - -class_alias(SearchEngineIndexerFactory::class, 'eZ\Bundle\EzPublishCoreBundle\ApiLoader\SearchEngineIndexerFactory'); diff --git a/src/bundle/Core/ApiLoader/StorageConnectionFactory.php b/src/bundle/Core/ApiLoader/StorageConnectionFactory.php index 911664983f..ce9b0d9cc7 100644 --- a/src/bundle/Core/ApiLoader/StorageConnectionFactory.php +++ b/src/bundle/Core/ApiLoader/StorageConnectionFactory.php @@ -53,5 +53,3 @@ public function getConnection() return $this->container->get($doctrineConnectionId); } } - -class_alias(StorageConnectionFactory::class, 'eZ\Bundle\EzPublishCoreBundle\ApiLoader\StorageConnectionFactory'); diff --git a/src/bundle/Core/ApiLoader/StorageEngineFactory.php b/src/bundle/Core/ApiLoader/StorageEngineFactory.php index 0e2ed665d2..8040dfa5ce 100644 --- a/src/bundle/Core/ApiLoader/StorageEngineFactory.php +++ b/src/bundle/Core/ApiLoader/StorageEngineFactory.php @@ -82,5 +82,3 @@ public function buildStorageEngine(): PersistenceHandler return $this->storageEngines[$repositoryConfig['storage']['engine']]; } } - -class_alias(StorageEngineFactory::class, 'eZ\Bundle\EzPublishCoreBundle\ApiLoader\StorageEngineFactory'); diff --git a/src/bundle/Core/Cache/Warmer/ProxyCacheWarmer.php b/src/bundle/Core/Cache/Warmer/ProxyCacheWarmer.php index bb1e498886..12d74a0be4 100644 --- a/src/bundle/Core/Cache/Warmer/ProxyCacheWarmer.php +++ b/src/bundle/Core/Cache/Warmer/ProxyCacheWarmer.php @@ -52,5 +52,3 @@ public function warmUp($cacheDir): void $this->proxyGenerator->warmUp(self::PROXY_CLASSES); } } - -class_alias(ProxyCacheWarmer::class, 'eZ\Bundle\EzPublishCoreBundle\Cache\Warmer\ProxyCacheWarmer'); diff --git a/src/bundle/Core/Command/BackwardCompatibleCommand.php b/src/bundle/Core/Command/BackwardCompatibleCommand.php index 3adee22ade..29fd1bdea2 100644 --- a/src/bundle/Core/Command/BackwardCompatibleCommand.php +++ b/src/bundle/Core/Command/BackwardCompatibleCommand.php @@ -17,5 +17,3 @@ interface BackwardCompatibleCommand */ public function getDeprecatedAliases(): array; } - -class_alias(BackwardCompatibleCommand::class, 'eZ\Bundle\EzPublishCoreBundle\Command\BackwardCompatibleCommand'); diff --git a/src/bundle/Core/Command/CheckURLsCommand.php b/src/bundle/Core/Command/CheckURLsCommand.php index 7716722b69..b9b5b3ee26 100644 --- a/src/bundle/Core/Command/CheckURLsCommand.php +++ b/src/bundle/Core/Command/CheckURLsCommand.php @@ -124,5 +124,3 @@ public function getDeprecatedAliases(): array return ['ezplatform:check-urls']; } } - -class_alias(CheckURLsCommand::class, 'eZ\Bundle\EzPublishCoreBundle\Command\CheckURLsCommand'); diff --git a/src/bundle/Core/Command/CleanupVersionsCommand.php b/src/bundle/Core/Command/CleanupVersionsCommand.php index 73d73faa25..cec0bffd7b 100644 --- a/src/bundle/Core/Command/CleanupVersionsCommand.php +++ b/src/bundle/Core/Command/CleanupVersionsCommand.php @@ -307,5 +307,3 @@ public function getDeprecatedAliases(): array return ['ezplatform:content:cleanup-versions']; } } - -class_alias(CleanupVersionsCommand::class, 'eZ\Bundle\EzPublishCoreBundle\Command\CleanupVersionsCommand'); diff --git a/src/bundle/Core/Command/CopySubtreeCommand.php b/src/bundle/Core/Command/CopySubtreeCommand.php index 5cea94a657..3e2c00c2da 100644 --- a/src/bundle/Core/Command/CopySubtreeCommand.php +++ b/src/bundle/Core/Command/CopySubtreeCommand.php @@ -189,5 +189,3 @@ public function getDeprecatedAliases(): array return ['ezplatform:copy-subtree']; } } - -class_alias(CopySubtreeCommand::class, 'eZ\Bundle\EzPublishCoreBundle\Command\CopySubtreeCommand'); diff --git a/src/bundle/Core/Command/DebugConfigResolverCommand.php b/src/bundle/Core/Command/DebugConfigResolverCommand.php index ba4cba3929..f9ba80ffcc 100644 --- a/src/bundle/Core/Command/DebugConfigResolverCommand.php +++ b/src/bundle/Core/Command/DebugConfigResolverCommand.php @@ -119,5 +119,3 @@ public function getDeprecatedAliases(): array return ['ezplatform:debug:config-resolver', 'ezplatform:debug:config']; } } - -class_alias(DebugConfigResolverCommand::class, 'eZ\Bundle\EzPublishCoreBundle\Command\DebugConfigResolverCommand'); diff --git a/src/bundle/Core/Command/DeleteContentTranslationCommand.php b/src/bundle/Core/Command/DeleteContentTranslationCommand.php index 9752bfd09e..fef5088ba0 100644 --- a/src/bundle/Core/Command/DeleteContentTranslationCommand.php +++ b/src/bundle/Core/Command/DeleteContentTranslationCommand.php @@ -202,5 +202,3 @@ public function getDeprecatedAliases(): array return ['ezplatform:delete-content-translation']; } } - -class_alias(DeleteContentTranslationCommand::class, 'eZ\Bundle\EzPublishCoreBundle\Command\DeleteContentTranslationCommand'); diff --git a/src/bundle/Core/Command/NormalizeImagesPathsCommand.php b/src/bundle/Core/Command/NormalizeImagesPathsCommand.php index f224c012eb..85c2704379 100644 --- a/src/bundle/Core/Command/NormalizeImagesPathsCommand.php +++ b/src/bundle/Core/Command/NormalizeImagesPathsCommand.php @@ -309,5 +309,3 @@ private function normalizeImagePaths(array $imagePathsToNormalize, SymfonyStyle return $oldBinaryFilesToDelete; } } - -class_alias(NormalizeImagesPathsCommand::class, 'eZ\Bundle\EzPublishCoreBundle\Command\NormalizeImagesPathsCommand'); diff --git a/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php b/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php index 55f5a6d15b..ee5f216e40 100644 --- a/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php +++ b/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php @@ -337,5 +337,3 @@ public function getDeprecatedAliases(): array return ['ezplatform:urls:regenerate-aliases']; } } - -class_alias(RegenerateUrlAliasesCommand::class, 'eZ\Bundle\EzPublishCoreBundle\Command\RegenerateUrlAliasesCommand'); diff --git a/src/bundle/Core/Command/ReindexCommand.php b/src/bundle/Core/Command/ReindexCommand.php index 704a1d3dfe..e086e0083f 100644 --- a/src/bundle/Core/Command/ReindexCommand.php +++ b/src/bundle/Core/Command/ReindexCommand.php @@ -480,5 +480,3 @@ public function getDeprecatedAliases(): array return ['ezplatform:reindex']; } } - -class_alias(ReindexCommand::class, 'eZ\Bundle\EzPublishCoreBundle\Command\ReindexCommand'); diff --git a/src/bundle/Core/Command/ResizeOriginalImagesCommand.php b/src/bundle/Core/Command/ResizeOriginalImagesCommand.php index 52f5f5bc4d..9970584765 100644 --- a/src/bundle/Core/Command/ResizeOriginalImagesCommand.php +++ b/src/bundle/Core/Command/ResizeOriginalImagesCommand.php @@ -315,5 +315,3 @@ public function getDeprecatedAliases(): array return ['ezplatform:images:resize-original']; } } - -class_alias(ResizeOriginalImagesCommand::class, 'eZ\Bundle\EzPublishCoreBundle\Command\ResizeOriginalImagesCommand'); diff --git a/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php b/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php index 3a7fc01c08..ecc69e1669 100644 --- a/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php +++ b/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php @@ -509,5 +509,3 @@ public function getDeprecatedAliases(): array return ['ezplatform:timestamps:to-utc']; } } - -class_alias(UpdateTimestampsToUTCCommand::class, 'eZ\Bundle\EzPublishCoreBundle\Command\UpdateTimestampsToUTCCommand'); diff --git a/src/bundle/Core/Controller.php b/src/bundle/Core/Controller.php index a890a553e9..d1ef464d23 100644 --- a/src/bundle/Core/Controller.php +++ b/src/bundle/Core/Controller.php @@ -53,5 +53,3 @@ public static function getSubscribedServices(): array ); } } - -class_alias(Controller::class, 'eZ\Bundle\EzPublishCoreBundle\Controller'); diff --git a/src/bundle/Core/Converter/ContentParamConverter.php b/src/bundle/Core/Converter/ContentParamConverter.php index a517c30c3d..1bdcf082a9 100644 --- a/src/bundle/Core/Converter/ContentParamConverter.php +++ b/src/bundle/Core/Converter/ContentParamConverter.php @@ -35,5 +35,3 @@ protected function loadValueObject($id) return $this->contentService->loadContent($id); } } - -class_alias(ContentParamConverter::class, 'eZ\Bundle\EzPublishCoreBundle\Converter\ContentParamConverter'); diff --git a/src/bundle/Core/Converter/LocationParamConverter.php b/src/bundle/Core/Converter/LocationParamConverter.php index 4669c25af9..85db939580 100644 --- a/src/bundle/Core/Converter/LocationParamConverter.php +++ b/src/bundle/Core/Converter/LocationParamConverter.php @@ -48,5 +48,3 @@ protected function loadValueObject($id): Location return $this->locationService->loadLocation($id, $prioritizedLanguages); } } - -class_alias(LocationParamConverter::class, 'eZ\Bundle\EzPublishCoreBundle\Converter\LocationParamConverter'); diff --git a/src/bundle/Core/Converter/RepositoryParamConverter.php b/src/bundle/Core/Converter/RepositoryParamConverter.php index 875345b69d..23b064330c 100644 --- a/src/bundle/Core/Converter/RepositoryParamConverter.php +++ b/src/bundle/Core/Converter/RepositoryParamConverter.php @@ -52,5 +52,3 @@ public function apply(Request $request, ParamConverter $configuration) return true; } } - -class_alias(RepositoryParamConverter::class, 'eZ\Bundle\EzPublishCoreBundle\Converter\RepositoryParamConverter'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/BinaryContentDownloadPass.php b/src/bundle/Core/DependencyInjection/Compiler/BinaryContentDownloadPass.php index b47dc795f6..be62d4d949 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/BinaryContentDownloadPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/BinaryContentDownloadPass.php @@ -41,5 +41,3 @@ private function addCall(ContainerBuilder $container, Reference $reference, $tar $definition->addMethodCall('setDownloadUrlGenerator', [$reference]); } } - -class_alias(BinaryContentDownloadPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\BinaryContentDownloadPass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPass.php b/src/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPass.php index 0fd2280c12..9093bede65 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPass.php @@ -49,5 +49,3 @@ public function process(ContainerBuilder $container) } } } - -class_alias(ChainConfigResolverPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\ChainConfigResolverPass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/ChainRoutingPass.php b/src/bundle/Core/DependencyInjection/Compiler/ChainRoutingPass.php index 18c3dda701..5d9c517ddd 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/ChainRoutingPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/ChainRoutingPass.php @@ -72,5 +72,3 @@ public function process(ContainerBuilder $container) } } } - -class_alias(ChainRoutingPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\ChainRoutingPass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/ConsoleCacheWarmupPass.php b/src/bundle/Core/DependencyInjection/Compiler/ConsoleCacheWarmupPass.php index 4681ed2fc1..af65886591 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/ConsoleCacheWarmupPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/ConsoleCacheWarmupPass.php @@ -47,5 +47,3 @@ public function process(ContainerBuilder $container) $container->getDefinition('cache_warmer')->replaceArgument(0, $warmers); } } - -class_alias(ConsoleCacheWarmupPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\ConsoleCacheWarmupPass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/ConsoleCommandPass.php b/src/bundle/Core/DependencyInjection/Compiler/ConsoleCommandPass.php index bc4849a7d8..471937ade6 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/ConsoleCommandPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/ConsoleCommandPass.php @@ -28,5 +28,3 @@ public function process(ContainerBuilder $container) } } } - -class_alias(ConsoleCommandPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\ConsoleCommandPass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/EntityManagerFactoryServiceLocatorPass.php b/src/bundle/Core/DependencyInjection/Compiler/EntityManagerFactoryServiceLocatorPass.php index 7699bafacd..2a8040d611 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/EntityManagerFactoryServiceLocatorPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/EntityManagerFactoryServiceLocatorPass.php @@ -40,5 +40,3 @@ private function getIbexaEntityManagers(ContainerBuilder $container): array return $entityManagers; } } - -class_alias(EntityManagerFactoryServiceLocatorPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\EntityManagerFactoryServiceLocatorPass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPass.php b/src/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPass.php index b07da6d610..351b49e537 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPass.php @@ -59,5 +59,3 @@ public function process(ContainerBuilder $container) } } } - -class_alias(FieldTypeParameterProviderRegistryPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\FieldTypeParameterProviderRegistryPass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/FragmentPass.php b/src/bundle/Core/DependencyInjection/Compiler/FragmentPass.php index 066c50e2c4..6f9f2c7aa6 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/FragmentPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/FragmentPass.php @@ -60,5 +60,3 @@ public function process(ContainerBuilder $container) } } } - -class_alias(FragmentPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\FragmentPass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/ImaginePass.php b/src/bundle/Core/DependencyInjection/Compiler/ImaginePass.php index 719ad2c8f1..f21605b412 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/ImaginePass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/ImaginePass.php @@ -56,5 +56,3 @@ private function processSwirlFilter(ContainerBuilder $container, $driver) } } } - -class_alias(ImaginePass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\ImaginePass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/InjectEntityManagerMappingsPass.php b/src/bundle/Core/DependencyInjection/Compiler/InjectEntityManagerMappingsPass.php index 8d5f502ecc..94d187a18a 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/InjectEntityManagerMappingsPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/InjectEntityManagerMappingsPass.php @@ -156,5 +156,3 @@ private function getEntityMapForConfigurationService(array $entityMappings): arr ); } } - -class_alias(InjectEntityManagerMappingsPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\InjectEntityManagerMappingsPass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/LazyDoctrineRepositoriesPass.php b/src/bundle/Core/DependencyInjection/Compiler/LazyDoctrineRepositoriesPass.php index adf5975f4f..35bd040ce3 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/LazyDoctrineRepositoriesPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/LazyDoctrineRepositoriesPass.php @@ -55,5 +55,3 @@ public function process(ContainerBuilder $container): void ); } } - -class_alias(LazyDoctrineRepositoriesPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\LazyDoctrineRepositoriesPass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/NotificationRendererPass.php b/src/bundle/Core/DependencyInjection/Compiler/NotificationRendererPass.php index f6091c19cd..bb9f90d91e 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/NotificationRendererPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/NotificationRendererPass.php @@ -40,5 +40,3 @@ public function process(ContainerBuilder $container) } } } - -class_alias(NotificationRendererPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\NotificationRendererPass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPass.php b/src/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPass.php index 21c7dcafb7..59d317a6cd 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPass.php @@ -39,5 +39,3 @@ public function process(ContainerBuilder $container) } } } - -class_alias(PlaceholderProviderPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\PlaceholderProviderPass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/QueryTypePass.php b/src/bundle/Core/DependencyInjection/Compiler/QueryTypePass.php index 61dd867c3c..05eb7e7ed7 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/QueryTypePass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/QueryTypePass.php @@ -43,5 +43,3 @@ public function process(ContainerBuilder $container): void $aggregatorDefinition->addMethodCall('addQueryTypes', [$queryTypes]); } } - -class_alias(QueryTypePass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\QueryTypePass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEngineIndexerPass.php b/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEngineIndexerPass.php index 4707a69ee8..d5b2d6d372 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEngineIndexerPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEngineIndexerPass.php @@ -69,5 +69,3 @@ public function process(ContainerBuilder $container) } } } - -class_alias(RegisterSearchEngineIndexerPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\RegisterSearchEngineIndexerPass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEnginePass.php b/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEnginePass.php index 383dd14753..99075e7f7b 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEnginePass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEnginePass.php @@ -69,5 +69,3 @@ public function process(ContainerBuilder $container) } } } - -class_alias(RegisterSearchEnginePass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\RegisterSearchEnginePass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePass.php b/src/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePass.php index 2306ba17c7..34adfbacf1 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePass.php @@ -62,5 +62,3 @@ public function process(ContainerBuilder $container) } } } - -class_alias(RegisterStorageEnginePass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\RegisterStorageEnginePass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/RouterPass.php b/src/bundle/Core/DependencyInjection/Compiler/RouterPass.php index 937c809ad9..51cc81949f 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/RouterPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/RouterPass.php @@ -30,5 +30,3 @@ public function process(ContainerBuilder $container) ->setClass(DefaultRouter::class); } } - -class_alias(RouterPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\RouterPass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/SecurityPass.php b/src/bundle/Core/DependencyInjection/Compiler/SecurityPass.php index 4add7aa5fb..78a6787d72 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/SecurityPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/SecurityPass.php @@ -125,5 +125,3 @@ public function process(ContainerBuilder $container) ); } } - -class_alias(SecurityPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\SecurityPass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/SessionConfigurationPass.php b/src/bundle/Core/DependencyInjection/Compiler/SessionConfigurationPass.php index 6fde946cac..2177d6b712 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/SessionConfigurationPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/SessionConfigurationPass.php @@ -84,5 +84,3 @@ public function process(ContainerBuilder $container) } } } - -class_alias(SessionConfigurationPass::class, 'EzSystems\EzPlatformCoreBundle\DependencyInjection\Compiler'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/SiteAccessMatcherRegistryPass.php b/src/bundle/Core/DependencyInjection/Compiler/SiteAccessMatcherRegistryPass.php index 102e4e2fab..e4e8c38442 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/SiteAccessMatcherRegistryPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/SiteAccessMatcherRegistryPass.php @@ -42,5 +42,3 @@ public function process(ContainerBuilder $container): void } } } - -class_alias(SiteAccessMatcherRegistryPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\SiteAccessMatcherRegistryPass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPass.php b/src/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPass.php index 77bc0d2d20..935d0004e5 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPass.php @@ -76,5 +76,3 @@ public function process(ContainerBuilder $container) $slugConverterDefinition->setArgument(1, $mergedConfiguration); } } - -class_alias(SlugConverterConfigurationPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\SlugConverterConfigurationPass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/StorageConnectionPass.php b/src/bundle/Core/DependencyInjection/Compiler/StorageConnectionPass.php index afd4ecdd12..4974ebfa15 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/StorageConnectionPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/StorageConnectionPass.php @@ -45,5 +45,3 @@ public function process(ContainerBuilder $container) } } } - -class_alias(StorageConnectionPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\StorageConnectionPass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPass.php b/src/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPass.php index 1342765abb..243a7062b4 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPass.php @@ -59,5 +59,3 @@ public function process(ContainerBuilder $container) $container->setParameter('available_translations', array_values(array_unique($availableTranslations))); } } - -class_alias(TranslationCollectorPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\TranslationCollectorPass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/URLHandlerPass.php b/src/bundle/Core/DependencyInjection/Compiler/URLHandlerPass.php index 2f98d59c6b..e02fedab63 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/URLHandlerPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/URLHandlerPass.php @@ -45,5 +45,3 @@ public function process(ContainerBuilder $container) } } } - -class_alias(URLHandlerPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\URLHandlerPass'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/ViewProvidersPass.php b/src/bundle/Core/DependencyInjection/Compiler/ViewProvidersPass.php index 468cdca1ea..ca0bb62309 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/ViewProvidersPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/ViewProvidersPass.php @@ -89,5 +89,3 @@ public function process(ContainerBuilder $container) } } } - -class_alias(ViewProvidersPass::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Compiler\ViewProvidersPass'); diff --git a/src/bundle/Core/DependencyInjection/Configuration.php b/src/bundle/Core/DependencyInjection/Configuration.php index 25e2ad74db..a577754db4 100644 --- a/src/bundle/Core/DependencyInjection/Configuration.php +++ b/src/bundle/Core/DependencyInjection/Configuration.php @@ -565,5 +565,3 @@ private function addUITranslationsSection($rootNode): ArrayNodeDefinition ->end(); } } - -class_alias(Configuration::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/AbstractParser.php b/src/bundle/Core/DependencyInjection/Configuration/AbstractParser.php index 2f3b712ac6..18598b16a2 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/AbstractParser.php +++ b/src/bundle/Core/DependencyInjection/Configuration/AbstractParser.php @@ -43,5 +43,3 @@ public function postMap(array $config, ContextualizerInterface $contextualizer) { } } - -class_alias(AbstractParser::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\AbstractParser'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/ChainConfigResolver.php b/src/bundle/Core/DependencyInjection/Configuration/ChainConfigResolver.php index e158f93593..ffdb5e1c9b 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ChainConfigResolver.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ChainConfigResolver.php @@ -114,5 +114,3 @@ public function getDefaultNamespace(): string throw new \LogicException('getDefaultNamespace() is not supported by the ChainConfigResolver'); } } - -class_alias(ChainConfigResolver::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ChainConfigResolver'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParser.php b/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParser.php index 0d7c6be371..9183bb8f41 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParser.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParser.php @@ -70,5 +70,3 @@ public function parseComplexSetting($string) return $this->matchDynamicSettings($string); } } - -class_alias(ComplexSettingParser::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ComplexSettings\ComplexSettingParser'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserInterface.php b/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserInterface.php index 785b33399a..70bcf9c260 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserInterface.php @@ -34,5 +34,3 @@ public function containsDynamicSettings($string); */ public function parseComplexSetting($string); } - -class_alias(ComplexSettingParserInterface::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ComplexSettings\ComplexSettingParserInterface'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolver.php b/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolver.php index 67fb6f3609..8db6ff6b38 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolver.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolver.php @@ -57,5 +57,3 @@ public function resolveSetting($argumentString) return $value; } } - -class_alias(ComplexSettingValueResolver::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ComplexSettings\ComplexSettingValueResolver'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/ConfigBuilderInterface.php b/src/bundle/Core/DependencyInjection/Configuration/ConfigBuilderInterface.php index 594b64ad60..24c75a8e68 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ConfigBuilderInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ConfigBuilderInterface.php @@ -29,5 +29,3 @@ public function addConfig(array $config); */ public function addResource(ResourceInterface $resource); } - -class_alias(ConfigBuilderInterface::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ConfigBuilderInterface'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/ConfigParser.php b/src/bundle/Core/DependencyInjection/Configuration/ConfigParser.php index 2cec92863e..bc5661c4b6 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ConfigParser.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ConfigParser.php @@ -88,5 +88,3 @@ public function addSemanticConfig(NodeBuilder $nodeBuilder) } } } - -class_alias(ConfigParser::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ConfigParser'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php index ceeb68163b..a3a609a558 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php @@ -334,5 +334,3 @@ private function logTooEarlyLoadedListIfNeeded($paramName) $this->tooEarlyLoadedList[$blame][] = $paramName; } } - -class_alias(ConfigResolver::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ConfigResolver'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ContainerConfigResolver.php b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ContainerConfigResolver.php index 2018b5119b..aaaf388d46 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ContainerConfigResolver.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ContainerConfigResolver.php @@ -70,5 +70,3 @@ private function getScopeRelativeParamName(string $paramName, string $namespace, return "$namespace.$scope.$paramName"; } } - -class_alias(ContainerConfigResolver::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ConfigResolver\ContainerConfigResolver'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/DefaultScopeConfigResolver.php b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/DefaultScopeConfigResolver.php index 328f69687d..f0e650c5a5 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/DefaultScopeConfigResolver.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/DefaultScopeConfigResolver.php @@ -30,5 +30,3 @@ public function getParameter(string $paramName, ?string $namespace = null, ?stri return parent::getParameter($paramName, $namespace, self::SCOPE_NAME); } } - -class_alias(DefaultScopeConfigResolver::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ConfigResolver\DefaultScopeConfigResolver'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/GlobalScopeConfigResolver.php b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/GlobalScopeConfigResolver.php index d0ed41a515..5cd192fb1f 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/GlobalScopeConfigResolver.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/GlobalScopeConfigResolver.php @@ -30,5 +30,3 @@ public function getParameter(string $paramName, ?string $namespace = null, ?stri return parent::getParameter($paramName, $namespace, self::SCOPE_NAME); } } - -class_alias(GlobalScopeConfigResolver::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ConfigResolver\GlobalScopeConfigResolver'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessConfigResolver.php b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessConfigResolver.php index b1bae07ffa..1ca3e12d83 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessConfigResolver.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessConfigResolver.php @@ -123,5 +123,3 @@ abstract protected function resolverHasParameter(SiteAccess $siteAccess, string abstract protected function getParameterFromResolver(SiteAccess $siteAccess, string $paramName, string $namespace); } - -class_alias(SiteAccessConfigResolver::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ConfigResolver\SiteAccessConfigResolver'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessGroupConfigResolver.php b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessGroupConfigResolver.php index f763914a19..5040aa9dd1 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessGroupConfigResolver.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessGroupConfigResolver.php @@ -107,5 +107,3 @@ private function isSiteAccessGroupScope($scope): bool return array_key_exists($scope, $this->siteAccessGroups); } } - -class_alias(SiteAccessGroupConfigResolver::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ConfigResolver\SiteAccessGroupConfigResolver'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/StaticSiteAccessConfigResolver.php b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/StaticSiteAccessConfigResolver.php index ea39515a54..f5d4411483 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/StaticSiteAccessConfigResolver.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/StaticSiteAccessConfigResolver.php @@ -44,5 +44,3 @@ protected function isSiteAccessSupported(SiteAccess $siteAccess): bool return StaticSiteAccessProvider::class === $siteAccess->provider; } } - -class_alias(StaticSiteAccessConfigResolver::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ConfigResolver\StaticSiteAccessConfigResolver'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/ContainerConfigBuilder.php b/src/bundle/Core/DependencyInjection/Configuration/ContainerConfigBuilder.php index 70638c80c9..c5a3451a45 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ContainerConfigBuilder.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ContainerConfigBuilder.php @@ -19,5 +19,3 @@ public function __construct(ContainerBuilder $containerBuilder) $this->containerBuilder = $containerBuilder; } } - -class_alias(ContainerConfigBuilder::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ContainerConfigBuilder'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/FieldTypeParserInterface.php b/src/bundle/Core/DependencyInjection/Configuration/FieldTypeParserInterface.php index 97d0068e8e..87d8eb13b6 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/FieldTypeParserInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/FieldTypeParserInterface.php @@ -26,5 +26,3 @@ public function getFieldTypeIdentifier(); */ public function addFieldTypeSemanticConfig(NodeBuilder $nodeBuilder); } - -class_alias(FieldTypeParserInterface::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\FieldTypeParserInterface'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/AbstractFieldTypeParser.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/AbstractFieldTypeParser.php index 537437eb25..ddaf1fc56c 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/AbstractFieldTypeParser.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/AbstractFieldTypeParser.php @@ -29,5 +29,3 @@ public function addSemanticConfig(NodeBuilder $nodeBuilder) $this->addFieldTypeSemanticConfig($fieldTypeNodeBuilder); } } - -class_alias(AbstractFieldTypeParser::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser\AbstractFieldTypeParser'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/Common.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/Common.php index f444a97fec..6eeaa1d927 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/Common.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/Common.php @@ -304,5 +304,3 @@ private function addDatabaseConfigSuggestion($sa, array $databaseConfig) $this->suggestionCollector->addSuggestion($suggestion); } } - -class_alias(Common::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser\Common'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/Content.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/Content.php index 21547fa6de..629ec24275 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/Content.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/Content.php @@ -80,5 +80,3 @@ public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerIn } } } - -class_alias(Content::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser\Content'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/ContentView.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/ContentView.php index 85792b8b15..d077b26383 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/ContentView.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/ContentView.php @@ -12,5 +12,3 @@ class ContentView extends View public const NODE_KEY = 'content_view'; public const INFO = 'Template selection settings when displaying a content'; } - -class_alias(ContentView::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser\ContentView'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldDefinitionEditTemplates.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldDefinitionEditTemplates.php index ce3a7d5837..5cf5565a76 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldDefinitionEditTemplates.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldDefinitionEditTemplates.php @@ -13,5 +13,3 @@ class FieldDefinitionEditTemplates extends Templates public const INFO = 'Settings for field definition templates'; public const INFO_TEMPLATE_KEY = 'Template file where to find block definition to display field definition settings'; } - -class_alias(FieldDefinitionEditTemplates::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser\FieldDefinitionEditTemplates'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldDefinitionSettingsTemplates.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldDefinitionSettingsTemplates.php index 390576d71e..7a0be083bd 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldDefinitionSettingsTemplates.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldDefinitionSettingsTemplates.php @@ -13,5 +13,3 @@ class FieldDefinitionSettingsTemplates extends Templates public const INFO = 'Template settings for field definition settings rendered by the ibexa_render_field_definition_settings() Twig function'; public const INFO_TEMPLATE_KEY = 'Template file where to find block definition to display field definition settings'; } - -class_alias(FieldDefinitionSettingsTemplates::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser\FieldDefinitionSettingsTemplates'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldEditTemplates.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldEditTemplates.php index 666d8910ac..2ba08f9dd2 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldEditTemplates.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldEditTemplates.php @@ -13,5 +13,3 @@ class FieldEditTemplates extends Templates public const INFO = 'Settings for field edit templates'; public const INFO_TEMPLATE_KEY = 'Template file where to find block definition to display fields'; } - -class_alias(FieldEditTemplates::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser\FieldEditTemplates'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldTemplates.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldTemplates.php index e4d4c65c64..c42a0b3d77 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldTemplates.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldTemplates.php @@ -13,5 +13,3 @@ class FieldTemplates extends Templates public const INFO = 'Template settings for fields rendered by the ibexa_render_field() Twig function'; public const INFO_TEMPLATE_KEY = 'Template file where to find block definition to display fields'; } - -class_alias(FieldTemplates::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser\FieldTemplates'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAsset.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAsset.php index c6782f86f6..b55119dc07 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAsset.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAsset.php @@ -63,5 +63,3 @@ public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerIn } } } - -class_alias(ImageAsset::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser\FieldType\ImageAsset'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/IO.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/IO.php index 5412989ea8..7a02a2cdb1 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/IO.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/IO.php @@ -133,5 +133,3 @@ private function addComplexParametersDependencies($parameter, $scope, ContainerB } } } - -class_alias(IO::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser\IO'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/Image.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/Image.php index c509fda7e2..769ac4b1db 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/Image.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/Image.php @@ -140,5 +140,3 @@ public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerIn } } } - -class_alias(Image::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser\Image'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/Languages.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/Languages.php index a0193499ae..c0779fea1f 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/Languages.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/Languages.php @@ -67,5 +67,3 @@ public function postMap(array $config, ContextualizerInterface $contextualizer) ); } } - -class_alias(Languages::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser\Languages'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/LocationView.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/LocationView.php index c39ec2f7fe..b7b13c07a8 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/LocationView.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/LocationView.php @@ -51,5 +51,3 @@ public function preMap(array $config, ContextualizerInterface $contextualizer) $contextualizer->mapConfigArray(ContentView::NODE_KEY, $config, ContextualizerInterface::MERGE_FROM_SECOND_LEVEL); } } - -class_alias(LocationView::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser\LocationView'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/Templates.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/Templates.php index 84297411ca..b287780e67 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/Templates.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/Templates.php @@ -57,5 +57,3 @@ public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerIn // Nothing to do here. } } - -class_alias(Templates::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser\Templates'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/TwigVariablesParser.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/TwigVariablesParser.php index 2ba35a41a6..17109a37e0 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/TwigVariablesParser.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/TwigVariablesParser.php @@ -48,5 +48,3 @@ public function mapConfig( } } } - -class_alias(TwigVariablesParser::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser\TwigVariablesParser'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/UrlChecker.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/UrlChecker.php index ba9bfdf03f..52432524a4 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/UrlChecker.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/UrlChecker.php @@ -36,5 +36,3 @@ public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerIn } } } - -class_alias(UrlChecker::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser\UrlChecker'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/UserContentTypeIdentifier.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/UserContentTypeIdentifier.php index 21005138b3..c3a60c72b8 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/UserContentTypeIdentifier.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/UserContentTypeIdentifier.php @@ -56,6 +56,3 @@ public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerIn ); } } - -class_alias(UserContentTypeIdentifier::class, 'EzSystems\EzPlatformAdminUiBundle\DependencyInjection\Configuration\Parser\UserIdentifier'); -class_alias(UserContentTypeIdentifier::class, 'Ibexa\Bundle\AdminUi\DependencyInjection\Configuration\Parser\UserIdentifier'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/View.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/View.php index 0cbb977aeb..485c51ab0e 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/View.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/View.php @@ -79,5 +79,3 @@ public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerIn // Nothing to do here. } } - -class_alias(View::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Parser\View'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/ParserInterface.php b/src/bundle/Core/DependencyInjection/Configuration/ParserInterface.php index e172062d15..3a928ad096 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ParserInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ParserInterface.php @@ -19,5 +19,3 @@ interface ParserInterface extends HookableConfigurationMapperInterface */ public function addSemanticConfig(NodeBuilder $nodeBuilder); } - -class_alias(ParserInterface::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ParserInterface'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Configuration.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Configuration.php index 4306a3fa78..eb7aeaeaa3 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Configuration.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Configuration.php @@ -66,5 +66,3 @@ public function generateScopeBaseNode(ArrayNodeDefinition $rootNode, $scopeNodeN return $contextNode; } } - -class_alias(Configuration::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\Configuration'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationMapperInterface.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationMapperInterface.php index b285bb3927..4987162091 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationMapperInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationMapperInterface.php @@ -29,5 +29,3 @@ interface ConfigurationMapperInterface */ public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer); } - -class_alias(ConfigurationMapperInterface::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ConfigurationMapperInterface'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php index 0e725689aa..f08c94117f 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php @@ -193,5 +193,3 @@ public function getContextualizer() return $this->contextualizer; } } - -class_alias(ConfigurationProcessor::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ConfigurationProcessor'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php index c0ad0f2d0a..1ab945571d 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php @@ -386,5 +386,3 @@ private function mergeSettingsForSiteAccess( return $mergedSettings; } } - -class_alias(Contextualizer::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\Contextualizer'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerInterface.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerInterface.php index ea9e20e494..178a29e82d 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerInterface.php @@ -235,5 +235,3 @@ public function setGroupsBySiteAccess(array $groupsBySiteAccess); */ public function getGroupsBySiteAccess(); } - -class_alias(ContextualizerInterface::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParser.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParser.php index 325350f93f..3c4a4403db 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParser.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParser.php @@ -46,5 +46,3 @@ private function removeBoundaryDelimiter($setting) return substr($setting, 1, -1); } } - -class_alias(DynamicSettingParser::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\DynamicSettingParser'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserInterface.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserInterface.php index 57a67d900d..b51db576a9 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserInterface.php @@ -52,5 +52,3 @@ public function isDynamicSetting($setting); */ public function parseDynamicSetting($setting); } - -class_alias(DynamicSettingParserInterface::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\DynamicSettingParserInterface'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/HookableConfigurationMapperInterface.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/HookableConfigurationMapperInterface.php index 302401823c..fe5874612b 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/HookableConfigurationMapperInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/HookableConfigurationMapperInterface.php @@ -41,5 +41,3 @@ public function preMap(array $config, ContextualizerInterface $contextualizer); */ public function postMap(array $config, ContextualizerInterface $contextualizer); } - -class_alias(HookableConfigurationMapperInterface::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\HookableConfigurationMapperInterface'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollector.php b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollector.php index c470209adb..e03723c8e9 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollector.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollector.php @@ -42,5 +42,3 @@ public function hasSuggestions() return !empty($this->suggestions); } } - -class_alias(SuggestionCollector::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Suggestion\Collector\SuggestionCollector'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorAwareInterface.php b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorAwareInterface.php index 79eabdb74a..7f0372a981 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorAwareInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorAwareInterface.php @@ -16,5 +16,3 @@ interface SuggestionCollectorAwareInterface */ public function setSuggestionCollector(SuggestionCollectorInterface $suggestionCollector); } - -class_alias(SuggestionCollectorAwareInterface::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Suggestion\Collector\SuggestionCollectorAwareInterface'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorInterface.php b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorInterface.php index 4238a92411..cc8d964265 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorInterface.php @@ -33,5 +33,3 @@ public function getSuggestions(); */ public function hasSuggestions(); } - -class_alias(SuggestionCollectorInterface::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Suggestion\Collector\SuggestionCollectorInterface'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestion.php b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestion.php index 9e6fce39fd..f64c5ca1cd 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestion.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestion.php @@ -87,5 +87,3 @@ public function isMandatory() return $this->mandatory; } } - -class_alias(ConfigSuggestion::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Suggestion\ConfigSuggestion'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/SuggestionFormatterInterface.php b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/SuggestionFormatterInterface.php index 953126247d..a2ca9a1ca9 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/SuggestionFormatterInterface.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/SuggestionFormatterInterface.php @@ -19,5 +19,3 @@ interface SuggestionFormatterInterface { public function format(ConfigSuggestion $configSuggestion); } - -class_alias(SuggestionFormatterInterface::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Suggestion\Formatter\SuggestionFormatterInterface'); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatter.php b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatter.php index 8b4fcd3bac..0d39fb9d65 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatter.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatter.php @@ -36,5 +36,3 @@ public function format(ConfigSuggestion $configSuggestion) return $message; } } - -class_alias(YamlSuggestionFormatter::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Suggestion\Formatter\YamlSuggestionFormatter'); diff --git a/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php b/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php index 8b99223fde..e03d76950c 100644 --- a/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php +++ b/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php @@ -1027,5 +1027,3 @@ private function prependJMSTranslation(ContainerBuilder $container): void ]); } } - -class_alias(IbexaCoreExtension::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\EzPublishCoreExtension'); diff --git a/src/bundle/Core/DependencyInjection/Security/HttpBasicFactory.php b/src/bundle/Core/DependencyInjection/Security/HttpBasicFactory.php index 6062a7e5f5..a052de46d2 100644 --- a/src/bundle/Core/DependencyInjection/Security/HttpBasicFactory.php +++ b/src/bundle/Core/DependencyInjection/Security/HttpBasicFactory.php @@ -21,5 +21,3 @@ public function getKey(): string return 'ezpublish_http_basic'; } } - -class_alias(HttpBasicFactory::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\HttpBasicFactory'); diff --git a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilder.php b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilder.php index f23c4026a6..d06af61da2 100644 --- a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilder.php +++ b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilder.php @@ -58,5 +58,3 @@ private function policyExists(array $policyMap, $module, $function) return array_key_exists($module, $policyMap) && array_key_exists($function, $policyMap[$module]); } } - -class_alias(PoliciesConfigBuilder::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\PoliciesConfigBuilder'); diff --git a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PolicyProviderInterface.php b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PolicyProviderInterface.php index e8333bbc47..e86bdc107e 100644 --- a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PolicyProviderInterface.php +++ b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PolicyProviderInterface.php @@ -62,5 +62,3 @@ interface PolicyProviderInterface */ public function addPolicies(ConfigBuilderInterface $configBuilder); } - -class_alias(PolicyProviderInterface::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\PolicyProviderInterface'); diff --git a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/RepositoryPolicyProvider.php b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/RepositoryPolicyProvider.php index 22e116f3b9..ff267c0446 100644 --- a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/RepositoryPolicyProvider.php +++ b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/RepositoryPolicyProvider.php @@ -17,5 +17,3 @@ public function getFiles() return []; } } - -class_alias(RepositoryPolicyProvider::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\RepositoryPolicyProvider'); diff --git a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProvider.php b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProvider.php index 0eff6a5941..53c2160ac5 100644 --- a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProvider.php +++ b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProvider.php @@ -41,5 +41,3 @@ public function addPolicies(ConfigBuilderInterface $configBuilder) */ abstract protected function getFiles(); } - -class_alias(YamlPolicyProvider::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\YamlPolicyProvider'); diff --git a/src/bundle/Core/DependencyInjection/ServiceTags.php b/src/bundle/Core/DependencyInjection/ServiceTags.php index 15e7210492..ca2101a7f3 100644 --- a/src/bundle/Core/DependencyInjection/ServiceTags.php +++ b/src/bundle/Core/DependencyInjection/ServiceTags.php @@ -25,5 +25,3 @@ class ServiceTags */ public const FILTERING_SORT_CLAUSE_QUERY_BUILDER = 'ibexa.filter.sort_clause.query.builder'; } - -class_alias(ServiceTags::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\ServiceTags'); diff --git a/src/bundle/Core/Entity/EntityManagerFactory.php b/src/bundle/Core/Entity/EntityManagerFactory.php index 574c15371a..a9730fb14e 100644 --- a/src/bundle/Core/Entity/EntityManagerFactory.php +++ b/src/bundle/Core/Entity/EntityManagerFactory.php @@ -69,5 +69,3 @@ protected function getEntityManagerServiceId(string $connection): string return sprintf('doctrine.orm.ibexa_%s_entity_manager', $connection); } } - -class_alias(EntityManagerFactory::class, 'eZ\Bundle\EzPublishCoreBundle\Entity\EntityManagerFactory'); diff --git a/src/bundle/Core/EventListener/BackgroundIndexingTerminateListener.php b/src/bundle/Core/EventListener/BackgroundIndexingTerminateListener.php index d7ca44970e..3751246259 100644 --- a/src/bundle/Core/EventListener/BackgroundIndexingTerminateListener.php +++ b/src/bundle/Core/EventListener/BackgroundIndexingTerminateListener.php @@ -137,5 +137,3 @@ public function reindex() } } } - -class_alias(BackgroundIndexingTerminateListener::class, 'eZ\Bundle\EzPublishCoreBundle\EventListener\BackgroundIndexingTerminateListener'); diff --git a/src/bundle/Core/EventListener/BackwardCompatibleCommandListener.php b/src/bundle/Core/EventListener/BackwardCompatibleCommandListener.php index 615c3f1fc7..20a8e2c025 100644 --- a/src/bundle/Core/EventListener/BackwardCompatibleCommandListener.php +++ b/src/bundle/Core/EventListener/BackwardCompatibleCommandListener.php @@ -46,5 +46,3 @@ public function onConsoleCommand(ConsoleCommandEvent $event): void } } } - -class_alias(BackwardCompatibleCommandListener::class, 'eZ\Bundle\EzPublishCoreBundle\EventListener\BackwardCompatibleCommandListener'); diff --git a/src/bundle/Core/EventListener/CacheViewResponseListener.php b/src/bundle/Core/EventListener/CacheViewResponseListener.php index ac298147c9..ba3584f668 100644 --- a/src/bundle/Core/EventListener/CacheViewResponseListener.php +++ b/src/bundle/Core/EventListener/CacheViewResponseListener.php @@ -58,5 +58,3 @@ public function configureCache(ResponseEvent $event) } } } - -class_alias(CacheViewResponseListener::class, 'eZ\Bundle\EzPublishCoreBundle\EventListener\CacheViewResponseListener'); diff --git a/src/bundle/Core/EventListener/ConfigScopeListener.php b/src/bundle/Core/EventListener/ConfigScopeListener.php index a97e3ba92f..728c96fc3a 100644 --- a/src/bundle/Core/EventListener/ConfigScopeListener.php +++ b/src/bundle/Core/EventListener/ConfigScopeListener.php @@ -71,5 +71,3 @@ public function setViewProviders(array $viewProviders) $this->viewProviders = $viewProviders; } } - -class_alias(ConfigScopeListener::class, 'eZ\Bundle\EzPublishCoreBundle\EventListener\ConfigScopeListener'); diff --git a/src/bundle/Core/EventListener/ConsoleCommandListener.php b/src/bundle/Core/EventListener/ConsoleCommandListener.php index 484be6e007..3bb7bd5db9 100644 --- a/src/bundle/Core/EventListener/ConsoleCommandListener.php +++ b/src/bundle/Core/EventListener/ConsoleCommandListener.php @@ -82,5 +82,3 @@ public function setDebug($debug = false) $this->debug = $debug; } } - -class_alias(ConsoleCommandListener::class, 'eZ\Bundle\EzPublishCoreBundle\EventListener\ConsoleCommandListener'); diff --git a/src/bundle/Core/EventListener/ContentDownloadRouteReferenceListener.php b/src/bundle/Core/EventListener/ContentDownloadRouteReferenceListener.php index 1cb9c69039..749f94d93b 100644 --- a/src/bundle/Core/EventListener/ContentDownloadRouteReferenceListener.php +++ b/src/bundle/Core/EventListener/ContentDownloadRouteReferenceListener.php @@ -121,5 +121,3 @@ function (Options $options) { ); } } - -class_alias(ContentDownloadRouteReferenceListener::class, 'eZ\Bundle\EzPublishCoreBundle\EventListener\ContentDownloadRouteReferenceListener'); diff --git a/src/bundle/Core/EventListener/ExceptionListener.php b/src/bundle/Core/EventListener/ExceptionListener.php index 7e1c322f83..9664b5b562 100644 --- a/src/bundle/Core/EventListener/ExceptionListener.php +++ b/src/bundle/Core/EventListener/ExceptionListener.php @@ -84,5 +84,3 @@ private function getTranslatedMessage(Exception $exception) return $message; } } - -class_alias(ExceptionListener::class, 'eZ\Bundle\EzPublishCoreBundle\EventListener\ExceptionListener'); diff --git a/src/bundle/Core/EventListener/IndexRequestListener.php b/src/bundle/Core/EventListener/IndexRequestListener.php index 6fcf98714a..c76fca8211 100644 --- a/src/bundle/Core/EventListener/IndexRequestListener.php +++ b/src/bundle/Core/EventListener/IndexRequestListener.php @@ -55,5 +55,3 @@ public function onKernelRequestIndex(RequestEvent $event) } } } - -class_alias(IndexRequestListener::class, 'eZ\Bundle\EzPublishCoreBundle\EventListener\IndexRequestListener'); diff --git a/src/bundle/Core/EventListener/LocaleListener.php b/src/bundle/Core/EventListener/LocaleListener.php index 738bc08f11..89ce7b6864 100644 --- a/src/bundle/Core/EventListener/LocaleListener.php +++ b/src/bundle/Core/EventListener/LocaleListener.php @@ -68,5 +68,3 @@ public function setDefaultLocale(KernelEvent $event): void $this->innerListener->setDefaultLocale($event); } } - -class_alias(LocaleListener::class, 'eZ\Bundle\EzPublishCoreBundle\EventListener\LocaleListener'); diff --git a/src/bundle/Core/EventListener/OriginalRequestListener.php b/src/bundle/Core/EventListener/OriginalRequestListener.php index 952353fe93..9581201495 100644 --- a/src/bundle/Core/EventListener/OriginalRequestListener.php +++ b/src/bundle/Core/EventListener/OriginalRequestListener.php @@ -50,5 +50,3 @@ public function onKernelRequest(RequestEvent $event) $request->attributes->set('_ez_original_request', $originalRequest); } } - -class_alias(OriginalRequestListener::class, 'eZ\Bundle\EzPublishCoreBundle\EventListener\OriginalRequestListener'); diff --git a/src/bundle/Core/EventListener/PreviewRequestListener.php b/src/bundle/Core/EventListener/PreviewRequestListener.php index a60de5483d..6698c1b171 100644 --- a/src/bundle/Core/EventListener/PreviewRequestListener.php +++ b/src/bundle/Core/EventListener/PreviewRequestListener.php @@ -46,5 +46,3 @@ public function onKernelRequest(RequestEvent $event): void } } } - -class_alias(PreviewRequestListener::class, 'eZ\Bundle\EzPublishCoreBundle\EventListener\PreviewRequestListener'); diff --git a/src/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListener.php b/src/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListener.php index e9c5c71060..530d545589 100644 --- a/src/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListener.php +++ b/src/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListener.php @@ -52,5 +52,3 @@ public function onKernelRequest(RequestEvent $event) } } } - -class_alias(RejectExplicitFrontControllerRequestsListener::class, 'eZ\Bundle\EzPublishCoreBundle\EventListener\RejectExplicitFrontControllerRequestsListener'); diff --git a/src/bundle/Core/EventListener/RequestEventListener.php b/src/bundle/Core/EventListener/RequestEventListener.php index 4085d8b889..265c5a6211 100644 --- a/src/bundle/Core/EventListener/RequestEventListener.php +++ b/src/bundle/Core/EventListener/RequestEventListener.php @@ -144,5 +144,3 @@ public function onKernelRequestRedirect(RequestEvent $event) } } } - -class_alias(RequestEventListener::class, 'eZ\Bundle\EzPublishCoreBundle\EventListener\RequestEventListener'); diff --git a/src/bundle/Core/EventListener/RoutingListener.php b/src/bundle/Core/EventListener/RoutingListener.php index 68794f91c7..87d391ca01 100644 --- a/src/bundle/Core/EventListener/RoutingListener.php +++ b/src/bundle/Core/EventListener/RoutingListener.php @@ -50,5 +50,3 @@ public function onSiteAccessMatch(PostSiteAccessMatchEvent $event) $this->urlAliasGenerator->setExcludedUriPrefixes($this->configResolver->getParameter('content.tree_root.excluded_uri_prefixes')); } } - -class_alias(RoutingListener::class, 'eZ\Bundle\EzPublishCoreBundle\EventListener\RoutingListener'); diff --git a/src/bundle/Core/EventListener/SessionInitByPostListener.php b/src/bundle/Core/EventListener/SessionInitByPostListener.php index 31bac46af5..080437135a 100644 --- a/src/bundle/Core/EventListener/SessionInitByPostListener.php +++ b/src/bundle/Core/EventListener/SessionInitByPostListener.php @@ -50,5 +50,3 @@ public function onSiteAccessMatch(PostSiteAccessMatchEvent $event) } } } - -class_alias(SessionInitByPostListener::class, 'eZ\Bundle\EzPublishCoreBundle\EventListener\SessionInitByPostListener'); diff --git a/src/bundle/Core/EventListener/SessionSetDynamicNameListener.php b/src/bundle/Core/EventListener/SessionSetDynamicNameListener.php index 90b8e0af18..6bc0ebf5c1 100644 --- a/src/bundle/Core/EventListener/SessionSetDynamicNameListener.php +++ b/src/bundle/Core/EventListener/SessionSetDynamicNameListener.php @@ -95,5 +95,3 @@ private function getSessionName($sessionName, SiteAccess $siteAccess) return $sessionName; } } - -class_alias(SessionSetDynamicNameListener::class, 'eZ\Bundle\EzPublishCoreBundle\EventListener\SessionSetDynamicNameListener'); diff --git a/src/bundle/Core/EventListener/SiteAccessListener.php b/src/bundle/Core/EventListener/SiteAccessListener.php index 5c067d473d..07b70100e6 100644 --- a/src/bundle/Core/EventListener/SiteAccessListener.php +++ b/src/bundle/Core/EventListener/SiteAccessListener.php @@ -148,5 +148,3 @@ private function generateViewParametersArray(string $vpString): array return $viewParameters; } } - -class_alias(SiteAccessListener::class, 'eZ\Bundle\EzPublishCoreBundle\EventListener\SiteAccessListener'); diff --git a/src/bundle/Core/EventListener/ViewControllerListener.php b/src/bundle/Core/EventListener/ViewControllerListener.php index ec42bfc18f..c3437c5459 100644 --- a/src/bundle/Core/EventListener/ViewControllerListener.php +++ b/src/bundle/Core/EventListener/ViewControllerListener.php @@ -80,5 +80,3 @@ public function getController(ControllerEvent $event) } } } - -class_alias(ViewControllerListener::class, 'eZ\Bundle\EzPublishCoreBundle\EventListener\ViewControllerListener'); diff --git a/src/bundle/Core/EventListener/ViewRendererListener.php b/src/bundle/Core/EventListener/ViewRendererListener.php index 83f24b1034..53b95658aa 100644 --- a/src/bundle/Core/EventListener/ViewRendererListener.php +++ b/src/bundle/Core/EventListener/ViewRendererListener.php @@ -44,5 +44,3 @@ public function renderView(ViewEvent $event) $event->setResponse($response); } } - -class_alias(ViewRendererListener::class, 'eZ\Bundle\EzPublishCoreBundle\EventListener\ViewRendererListener'); diff --git a/src/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriber.php b/src/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriber.php index 986a2d92f3..5ca68d08d2 100644 --- a/src/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriber.php +++ b/src/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriber.php @@ -35,5 +35,3 @@ public function setInContextAcceptLanguage(RequestEvent $e) $e->getRequest()->headers->set('accept-language', 'ach-UG'); } } - -class_alias(CrowdinRequestLocaleSubscriber::class, 'eZ\Bundle\EzPublishCoreBundle\EventSubscriber\CrowdinRequestLocaleSubscriber'); diff --git a/src/bundle/Core/Features/Context/BasicContentContext.php b/src/bundle/Core/Features/Context/BasicContentContext.php index 7a35067a92..7ea60ead8d 100644 --- a/src/bundle/Core/Features/Context/BasicContentContext.php +++ b/src/bundle/Core/Features/Context/BasicContentContext.php @@ -194,5 +194,3 @@ private function getDummyXmlText() return '
    This is a paragraph.
    '; } } - -class_alias(BasicContentContext::class, 'eZ\Bundle\EzPublishCoreBundle\Features\Context\BasicContentContext'); diff --git a/src/bundle/Core/Features/Context/ConsoleContext.php b/src/bundle/Core/Features/Context/ConsoleContext.php index 7e0921259d..b5a4b0df6a 100644 --- a/src/bundle/Core/Features/Context/ConsoleContext.php +++ b/src/bundle/Core/Features/Context/ConsoleContext.php @@ -209,5 +209,3 @@ private function getDefaultSiteaccessName() return $this->defaultSiteaccess; } } - -class_alias(ConsoleContext::class, 'eZ\Bundle\EzPublishCoreBundle\Features\Context\ConsoleContext'); diff --git a/src/bundle/Core/Features/Context/ContentContext.php b/src/bundle/Core/Features/Context/ContentContext.php index e404b4f9ec..c35ffd6d7a 100644 --- a/src/bundle/Core/Features/Context/ContentContext.php +++ b/src/bundle/Core/Features/Context/ContentContext.php @@ -155,5 +155,3 @@ function () use ($createStruct, $locationCreateStruct) { return $this->currentDraft; } } - -class_alias(ContentContext::class, 'eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentContext'); diff --git a/src/bundle/Core/Features/Context/ContentPreviewContext.php b/src/bundle/Core/Features/Context/ContentPreviewContext.php index dfd9c9c7f1..398adf72ca 100644 --- a/src/bundle/Core/Features/Context/ContentPreviewContext.php +++ b/src/bundle/Core/Features/Context/ContentPreviewContext.php @@ -114,5 +114,3 @@ public function iModifyAFieldFromTheDraft() ); } } - -class_alias(ContentPreviewContext::class, 'eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentPreviewContext'); diff --git a/src/bundle/Core/Features/Context/ContentTypeContext.php b/src/bundle/Core/Features/Context/ContentTypeContext.php index ebb6600a07..7d0b3328ad 100644 --- a/src/bundle/Core/Features/Context/ContentTypeContext.php +++ b/src/bundle/Core/Features/Context/ContentTypeContext.php @@ -241,5 +241,3 @@ protected function checkContentTypeExistenceByIdentifier($identifier, $groupIden return $contentType ? true : false; } } - -class_alias(ContentTypeContext::class, 'eZ\Bundle\EzPublishCoreBundle\Features\Context\ContentTypeContext'); diff --git a/src/bundle/Core/Features/Context/ExceptionContext.php b/src/bundle/Core/Features/Context/ExceptionContext.php index c6ec93b2d6..101dbf6fdc 100644 --- a/src/bundle/Core/Features/Context/ExceptionContext.php +++ b/src/bundle/Core/Features/Context/ExceptionContext.php @@ -65,5 +65,3 @@ public function anAccessDeniedExceptionIsThrown($exceptionString) $this->assertSession()->elementExists('xpath', "//abbr[@title='$exceptionString']"); } } - -class_alias(ExceptionContext::class, 'eZ\Bundle\EzPublishCoreBundle\Features\Context\ExceptionContext'); diff --git a/src/bundle/Core/Features/Context/FieldTypeContext.php b/src/bundle/Core/Features/Context/FieldTypeContext.php index 8f45e517ed..c1628862e2 100644 --- a/src/bundle/Core/Features/Context/FieldTypeContext.php +++ b/src/bundle/Core/Features/Context/FieldTypeContext.php @@ -388,5 +388,3 @@ public function createContentOfThisTypeWithProperties($fieldType, TableNode $pro } } } - -class_alias(FieldTypeContext::class, 'eZ\Bundle\EzPublishCoreBundle\Features\Context\FieldTypeContext'); diff --git a/src/bundle/Core/Features/Context/QueryControllerContext.php b/src/bundle/Core/Features/Context/QueryControllerContext.php index c356ae5199..64667f2023 100644 --- a/src/bundle/Core/Features/Context/QueryControllerContext.php +++ b/src/bundle/Core/Features/Context/QueryControllerContext.php @@ -91,5 +91,3 @@ private function getVariableTypesFromTemplate(): array return $items; } } - -class_alias(QueryControllerContext::class, 'eZ\Bundle\EzPublishCoreBundle\Features\Context\QueryControllerContext'); diff --git a/src/bundle/Core/Features/Context/RoleContext.php b/src/bundle/Core/Features/Context/RoleContext.php index e870a5e8fe..595a505a1a 100644 --- a/src/bundle/Core/Features/Context/RoleContext.php +++ b/src/bundle/Core/Features/Context/RoleContext.php @@ -133,5 +133,3 @@ public function iDontSeeRole($name) ); } } - -class_alias(RoleContext::class, 'eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext'); diff --git a/src/bundle/Core/Features/Context/UserContext.php b/src/bundle/Core/Features/Context/UserContext.php index b50de7f76a..8bb1659968 100644 --- a/src/bundle/Core/Features/Context/UserContext.php +++ b/src/bundle/Core/Features/Context/UserContext.php @@ -582,5 +582,3 @@ private function findNonExistingUserName() throw new \Exception('Possible endless loop when attempting to find a new name for the User.'); } } - -class_alias(UserContext::class, 'eZ\Bundle\EzPublishCoreBundle\Features\Context\UserContext'); diff --git a/src/bundle/Core/Features/Context/YamlConfigurationContext.php b/src/bundle/Core/Features/Context/YamlConfigurationContext.php index 523073019c..c0a0d4922c 100644 --- a/src/bundle/Core/Features/Context/YamlConfigurationContext.php +++ b/src/bundle/Core/Features/Context/YamlConfigurationContext.php @@ -116,5 +116,3 @@ public function clearSymfonyCache(): void $application->run($input); } } - -class_alias(YamlConfigurationContext::class, 'eZ\Bundle\EzPublishCoreBundle\Features\Context\YamlConfigurationContext'); diff --git a/src/bundle/Core/Fragment/DecoratedFragmentRenderer.php b/src/bundle/Core/Fragment/DecoratedFragmentRenderer.php index e9c30242c1..86803515c2 100644 --- a/src/bundle/Core/Fragment/DecoratedFragmentRenderer.php +++ b/src/bundle/Core/Fragment/DecoratedFragmentRenderer.php @@ -81,5 +81,3 @@ public function getName() return $this->innerRenderer->getName(); } } - -class_alias(DecoratedFragmentRenderer::class, 'eZ\Bundle\EzPublishCoreBundle\Fragment\DecoratedFragmentRenderer'); diff --git a/src/bundle/Core/Fragment/DirectFragmentRenderer.php b/src/bundle/Core/Fragment/DirectFragmentRenderer.php index 9a832a5eae..43472416a7 100644 --- a/src/bundle/Core/Fragment/DirectFragmentRenderer.php +++ b/src/bundle/Core/Fragment/DirectFragmentRenderer.php @@ -160,5 +160,3 @@ public function getName(): string return self::NAME; } } - -class_alias(DirectFragmentRenderer::class, 'eZ\Bundle\EzPublishCoreBundle\Fragment\DirectFragmentRenderer'); diff --git a/src/bundle/Core/Fragment/FragmentListenerFactory.php b/src/bundle/Core/Fragment/FragmentListenerFactory.php index 605fa025f9..625eb65938 100644 --- a/src/bundle/Core/Fragment/FragmentListenerFactory.php +++ b/src/bundle/Core/Fragment/FragmentListenerFactory.php @@ -36,5 +36,3 @@ public function buildFragmentListener(UriSigner $uriSigner, $fragmentPath, $frag return new $fragmentListenerClass($uriSigner, $fragmentPath); } } - -class_alias(FragmentListenerFactory::class, 'eZ\Bundle\EzPublishCoreBundle\Fragment\FragmentListenerFactory'); diff --git a/src/bundle/Core/Fragment/InlineFragmentRenderer.php b/src/bundle/Core/Fragment/InlineFragmentRenderer.php index af79884745..955efac827 100644 --- a/src/bundle/Core/Fragment/InlineFragmentRenderer.php +++ b/src/bundle/Core/Fragment/InlineFragmentRenderer.php @@ -66,5 +66,3 @@ public function getName() return $this->innerRenderer->getName(); } } - -class_alias(InlineFragmentRenderer::class, 'eZ\Bundle\EzPublishCoreBundle\Fragment\InlineFragmentRenderer'); diff --git a/src/bundle/Core/Fragment/SiteAccessSerializationTrait.php b/src/bundle/Core/Fragment/SiteAccessSerializationTrait.php index 0bde8b1b38..2e4c6be5fb 100644 --- a/src/bundle/Core/Fragment/SiteAccessSerializationTrait.php +++ b/src/bundle/Core/Fragment/SiteAccessSerializationTrait.php @@ -38,5 +38,3 @@ public function serializeSiteAccess(SiteAccess $siteAccess, ControllerReference } } } - -class_alias(SiteAccessSerializationTrait::class, 'eZ\Bundle\EzPublishCoreBundle\Fragment\SiteAccessSerializationTrait'); diff --git a/src/bundle/Core/IbexaCoreBundle.php b/src/bundle/Core/IbexaCoreBundle.php index 1f5a94220e..47f5a11c81 100644 --- a/src/bundle/Core/IbexaCoreBundle.php +++ b/src/bundle/Core/IbexaCoreBundle.php @@ -137,5 +137,3 @@ public function getContainerExtension() return $this->extension; } } - -class_alias(IbexaCoreBundle::class, 'eZ\Bundle\EzPublishCoreBundle\EzPublishCoreBundle'); diff --git a/src/bundle/Core/Imagine/AliasCleaner.php b/src/bundle/Core/Imagine/AliasCleaner.php index a4e272cc1d..78ff42b9cf 100644 --- a/src/bundle/Core/Imagine/AliasCleaner.php +++ b/src/bundle/Core/Imagine/AliasCleaner.php @@ -25,5 +25,3 @@ public function removeAliases($originalPath) $this->aliasResolver->remove([$originalPath], []); } } - -class_alias(AliasCleaner::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\AliasCleaner'); diff --git a/src/bundle/Core/Imagine/AliasGenerator.php b/src/bundle/Core/Imagine/AliasGenerator.php index 7e99bb7779..5f8d3c2e0e 100644 --- a/src/bundle/Core/Imagine/AliasGenerator.php +++ b/src/bundle/Core/Imagine/AliasGenerator.php @@ -166,5 +166,3 @@ public function supportsValue(Value $value) return $value instanceof ImageValue; } } - -class_alias(AliasGenerator::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\AliasGenerator'); diff --git a/src/bundle/Core/Imagine/BinaryLoader.php b/src/bundle/Core/Imagine/BinaryLoader.php index d9b278ed41..48d7cf755a 100644 --- a/src/bundle/Core/Imagine/BinaryLoader.php +++ b/src/bundle/Core/Imagine/BinaryLoader.php @@ -71,5 +71,3 @@ public function find($path) } } } - -class_alias(BinaryLoader::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\BinaryLoader'); diff --git a/src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php b/src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php index 171e1a4e9e..9421529e86 100644 --- a/src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php +++ b/src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php @@ -136,5 +136,3 @@ public function getVariationNameTag(): string return self::IMAGE_VARIATION_NAME_IDENTIFIER; } } - -class_alias(AliasGeneratorDecorator::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Cache\AliasGeneratorDecorator'); diff --git a/src/bundle/Core/Imagine/Cache/Resolver/ProxyResolver.php b/src/bundle/Core/Imagine/Cache/Resolver/ProxyResolver.php index 60fb75fc2d..b2eeee613f 100644 --- a/src/bundle/Core/Imagine/Cache/Resolver/ProxyResolver.php +++ b/src/bundle/Core/Imagine/Cache/Resolver/ProxyResolver.php @@ -33,5 +33,3 @@ protected function rewriteUrl($url) return $proxyHost . $relativeUrl; } } - -class_alias(ProxyResolver::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Cache\Resolver\ProxyResolver'); diff --git a/src/bundle/Core/Imagine/Cache/Resolver/RelativeResolver.php b/src/bundle/Core/Imagine/Cache/Resolver/RelativeResolver.php index 735ccdb7fd..bfb59d333e 100644 --- a/src/bundle/Core/Imagine/Cache/Resolver/RelativeResolver.php +++ b/src/bundle/Core/Imagine/Cache/Resolver/RelativeResolver.php @@ -35,5 +35,3 @@ protected function rewriteUrl($url) return parse_url($url, PHP_URL_PATH); } } - -class_alias(RelativeResolver::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Cache\Resolver\RelativeResolver'); diff --git a/src/bundle/Core/Imagine/Cache/ResolverFactory.php b/src/bundle/Core/Imagine/Cache/ResolverFactory.php index a70fb803de..d6666ffa4e 100644 --- a/src/bundle/Core/Imagine/Cache/ResolverFactory.php +++ b/src/bundle/Core/Imagine/Cache/ResolverFactory.php @@ -67,5 +67,3 @@ public function createCacheResolver() return new $this->resolverDecoratorClass($this->resolver, [$imageHost]); } } - -class_alias(ResolverFactory::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Cache\ResolverFactory'); diff --git a/src/bundle/Core/Imagine/Filter/AbstractFilter.php b/src/bundle/Core/Imagine/Filter/AbstractFilter.php index b3c9ee2550..2a0956a27f 100644 --- a/src/bundle/Core/Imagine/Filter/AbstractFilter.php +++ b/src/bundle/Core/Imagine/Filter/AbstractFilter.php @@ -45,5 +45,3 @@ public function getOptions() return $this->options; } } - -class_alias(AbstractFilter::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\AbstractFilter'); diff --git a/src/bundle/Core/Imagine/Filter/FilterConfiguration.php b/src/bundle/Core/Imagine/Filter/FilterConfiguration.php index 2e6eaa4013..22ab6b5596 100644 --- a/src/bundle/Core/Imagine/Filter/FilterConfiguration.php +++ b/src/bundle/Core/Imagine/Filter/FilterConfiguration.php @@ -96,5 +96,3 @@ private function getVariationPostProcessors($variationName, array $configuredVar return []; } } - -class_alias(FilterConfiguration::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\FilterConfiguration'); diff --git a/src/bundle/Core/Imagine/Filter/FilterInterface.php b/src/bundle/Core/Imagine/Filter/FilterInterface.php index e20ca2ab6c..0396468396 100644 --- a/src/bundle/Core/Imagine/Filter/FilterInterface.php +++ b/src/bundle/Core/Imagine/Filter/FilterInterface.php @@ -53,5 +53,3 @@ public function setOptions(array $options); */ public function getOptions(); } - -class_alias(FilterInterface::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\FilterInterface'); diff --git a/src/bundle/Core/Imagine/Filter/Gmagick/ReduceNoiseFilter.php b/src/bundle/Core/Imagine/Filter/Gmagick/ReduceNoiseFilter.php index 7a34a3b214..c57da06e43 100644 --- a/src/bundle/Core/Imagine/Filter/Gmagick/ReduceNoiseFilter.php +++ b/src/bundle/Core/Imagine/Filter/Gmagick/ReduceNoiseFilter.php @@ -26,5 +26,3 @@ public function apply(ImageInterface $image) return $image; } } - -class_alias(ReduceNoiseFilter::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\Gmagick\ReduceNoiseFilter'); diff --git a/src/bundle/Core/Imagine/Filter/Gmagick/SwirlFilter.php b/src/bundle/Core/Imagine/Filter/Gmagick/SwirlFilter.php index 1004430024..39290e0f10 100644 --- a/src/bundle/Core/Imagine/Filter/Gmagick/SwirlFilter.php +++ b/src/bundle/Core/Imagine/Filter/Gmagick/SwirlFilter.php @@ -26,5 +26,3 @@ public function apply(ImageInterface $image) return $image; } } - -class_alias(SwirlFilter::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\Gmagick\SwirlFilter'); diff --git a/src/bundle/Core/Imagine/Filter/Imagick/ReduceNoiseFilter.php b/src/bundle/Core/Imagine/Filter/Imagick/ReduceNoiseFilter.php index a4e4b4a494..b0858347c9 100644 --- a/src/bundle/Core/Imagine/Filter/Imagick/ReduceNoiseFilter.php +++ b/src/bundle/Core/Imagine/Filter/Imagick/ReduceNoiseFilter.php @@ -26,5 +26,3 @@ public function apply(ImageInterface $image) return $image; } } - -class_alias(ReduceNoiseFilter::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\Imagick\ReduceNoiseFilter'); diff --git a/src/bundle/Core/Imagine/Filter/Imagick/SwirlFilter.php b/src/bundle/Core/Imagine/Filter/Imagick/SwirlFilter.php index 793daae3ae..4c75ea173e 100644 --- a/src/bundle/Core/Imagine/Filter/Imagick/SwirlFilter.php +++ b/src/bundle/Core/Imagine/Filter/Imagick/SwirlFilter.php @@ -26,5 +26,3 @@ public function apply(ImageInterface $image) return $image; } } - -class_alias(SwirlFilter::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\Imagick\SwirlFilter'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/BorderFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/BorderFilterLoader.php index edd3f73641..a65b95d9d1 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/BorderFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/BorderFilterLoader.php @@ -43,5 +43,3 @@ public function load(ImageInterface $image, array $options = []) return $border->apply($image); } } - -class_alias(BorderFilterLoader::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\Loader\BorderFilterLoader'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/CropFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/CropFilterLoader.php index 58af50df60..9066dddd9f 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/CropFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/CropFilterLoader.php @@ -33,5 +33,3 @@ public function load(ImageInterface $image, array $options = []) ); } } - -class_alias(CropFilterLoader::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\Loader\CropFilterLoader'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/FilterLoaderWrapped.php b/src/bundle/Core/Imagine/Filter/Loader/FilterLoaderWrapped.php index e75a9250be..5aa4c68170 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/FilterLoaderWrapped.php +++ b/src/bundle/Core/Imagine/Filter/Loader/FilterLoaderWrapped.php @@ -22,5 +22,3 @@ public function setInnerLoader(LoaderInterface $innerLoader) $this->innerLoader = $innerLoader; } } - -class_alias(FilterLoaderWrapped::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\Loader\FilterLoaderWrapped'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoader.php index cdc8f61f59..8ae93cf653 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoader.php @@ -25,5 +25,3 @@ public function load(ImageInterface $image, array $options = []) return $image; } } - -class_alias(GrayscaleFilterLoader::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\Loader\GrayscaleFilterLoader'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoader.php index d544d17070..427fea0744 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoader.php @@ -43,5 +43,3 @@ public function load(ImageInterface $image, array $options = []) return $this->filter->apply($image); } } - -class_alias(ReduceNoiseFilterLoader::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\Loader\ReduceNoiseFilterLoader'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoader.php index f7274704c8..066f92f7e6 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoader.php @@ -43,5 +43,3 @@ public function load(ImageInterface $image, array $options = []) ); } } - -class_alias(ScaleDownOnlyFilterLoader::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\Loader\ScaleDownOnlyFilterLoader'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoader.php index 3f6d43330d..e387f83612 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoader.php @@ -27,5 +27,3 @@ public function load(ImageInterface $image, array $options = []) return $this->innerLoader->load($image, ['size' => $options]); } } - -class_alias(ScaleExactFilterLoader::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\Loader\ScaleExactFilterLoader'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoader.php index d8cbb21b2d..f7125fa3de 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoader.php @@ -42,5 +42,3 @@ public function load(ImageInterface $image, array $options = []) return $this->innerLoader->load($image, [$method => $value]); } } - -class_alias(ScaleFilterLoader::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\Loader\ScaleFilterLoader'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoader.php index 0baae5a879..664ab72d12 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoader.php @@ -33,5 +33,3 @@ public function load(ImageInterface $image, array $options = []) ); } } - -class_alias(ScaleHeightDownOnlyFilterLoader::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\Loader\ScaleHeightDownOnlyFilterLoader'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoader.php index 09bd4ddf41..3ccb2b236c 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoader.php @@ -27,5 +27,3 @@ public function load(ImageInterface $image, array $options = []) return $this->innerLoader->load($image, ['heighten' => $options[0]]); } } - -class_alias(ScaleHeightFilterLoader::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\Loader\ScaleHeightFilterLoader'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoader.php index 61a0600f2f..00aeaa1379 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoader.php @@ -35,5 +35,3 @@ public function load(ImageInterface $image, array $options = []) return $this->innerLoader->load($image, ['size' => [$targetWidth, $targetHeight]]); } } - -class_alias(ScalePercentFilterLoader::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\Loader\ScalePercentFilterLoader'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoader.php index 9dc6d66434..38784811ed 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoader.php @@ -33,5 +33,3 @@ public function load(ImageInterface $image, array $options = []) ); } } - -class_alias(ScaleWidthDownOnlyFilterLoader::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\Loader\ScaleWidthDownOnlyFilterLoader'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoader.php index ce1a2e5eb8..d381442c5a 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoader.php @@ -27,5 +27,3 @@ public function load(ImageInterface $image, array $options = []) return $this->innerLoader->load($image, ['widen' => $options[0]]); } } - -class_alias(ScaleWidthFilterLoader::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\Loader\ScaleWidthFilterLoader'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoader.php index c312ac55a1..918bd250d3 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoader.php @@ -32,5 +32,3 @@ public function load(ImageInterface $image, array $options = []) return $this->filter->apply($image); } } - -class_alias(SwirlFilterLoader::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\Loader\SwirlFilterLoader'); diff --git a/src/bundle/Core/Imagine/Filter/UnsupportedFilter.php b/src/bundle/Core/Imagine/Filter/UnsupportedFilter.php index 357f4b7a45..2b6cfd1f48 100644 --- a/src/bundle/Core/Imagine/Filter/UnsupportedFilter.php +++ b/src/bundle/Core/Imagine/Filter/UnsupportedFilter.php @@ -20,5 +20,3 @@ public function apply(ImageInterface $image) throw new NotSupportedException('The filter is not supported by your current configuration.'); } } - -class_alias(UnsupportedFilter::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\UnsupportedFilter'); diff --git a/src/bundle/Core/Imagine/IORepositoryResolver.php b/src/bundle/Core/Imagine/IORepositoryResolver.php index 2e78515154..a4d2241ad3 100644 --- a/src/bundle/Core/Imagine/IORepositoryResolver.php +++ b/src/bundle/Core/Imagine/IORepositoryResolver.php @@ -128,5 +128,3 @@ public function remove(array $paths, array $filters) } } } - -class_alias(IORepositoryResolver::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\IORepositoryResolver'); diff --git a/src/bundle/Core/Imagine/ImageAsset/AliasGenerator.php b/src/bundle/Core/Imagine/ImageAsset/AliasGenerator.php index 9c4f8fab73..148d594baf 100644 --- a/src/bundle/Core/Imagine/ImageAsset/AliasGenerator.php +++ b/src/bundle/Core/Imagine/ImageAsset/AliasGenerator.php @@ -79,5 +79,3 @@ public function supportsValue(Value $value): bool return $value instanceof ImageAssetValue; } } - -class_alias(AliasGenerator::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\ImageAsset\AliasGenerator'); diff --git a/src/bundle/Core/Imagine/PlaceholderAliasGenerator.php b/src/bundle/Core/Imagine/PlaceholderAliasGenerator.php index d92543a6be..4de8618e25 100644 --- a/src/bundle/Core/Imagine/PlaceholderAliasGenerator.php +++ b/src/bundle/Core/Imagine/PlaceholderAliasGenerator.php @@ -117,5 +117,3 @@ private function isOriginalImageAvailable(ImageValue $imageValue): bool return true; } } - -class_alias(PlaceholderAliasGenerator::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\PlaceholderAliasGenerator'); diff --git a/src/bundle/Core/Imagine/PlaceholderAliasGeneratorConfigurator.php b/src/bundle/Core/Imagine/PlaceholderAliasGeneratorConfigurator.php index ee228a68db..a8a3b6d894 100644 --- a/src/bundle/Core/Imagine/PlaceholderAliasGeneratorConfigurator.php +++ b/src/bundle/Core/Imagine/PlaceholderAliasGeneratorConfigurator.php @@ -44,5 +44,3 @@ public function configure(PlaceholderAliasGenerator $generator) } } } - -class_alias(PlaceholderAliasGeneratorConfigurator::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\PlaceholderAliasGeneratorConfigurator'); diff --git a/src/bundle/Core/Imagine/PlaceholderProvider.php b/src/bundle/Core/Imagine/PlaceholderProvider.php index 5628c38823..8a78a6ea24 100644 --- a/src/bundle/Core/Imagine/PlaceholderProvider.php +++ b/src/bundle/Core/Imagine/PlaceholderProvider.php @@ -21,5 +21,3 @@ interface PlaceholderProvider */ public function getPlaceholder(ImageValue $value, array $options = []): string; } - -class_alias(PlaceholderProvider::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\PlaceholderProvider'); diff --git a/src/bundle/Core/Imagine/PlaceholderProvider/GenericProvider.php b/src/bundle/Core/Imagine/PlaceholderProvider/GenericProvider.php index 07d8df192e..ca397bcd99 100644 --- a/src/bundle/Core/Imagine/PlaceholderProvider/GenericProvider.php +++ b/src/bundle/Core/Imagine/PlaceholderProvider/GenericProvider.php @@ -103,5 +103,3 @@ private function resolveOptions(array $options): array return $resolver->resolve($options); } } - -class_alias(GenericProvider::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\PlaceholderProvider\GenericProvider'); diff --git a/src/bundle/Core/Imagine/PlaceholderProvider/RemoteProvider.php b/src/bundle/Core/Imagine/PlaceholderProvider/RemoteProvider.php index a5c065d80e..9ec16b2c5d 100644 --- a/src/bundle/Core/Imagine/PlaceholderProvider/RemoteProvider.php +++ b/src/bundle/Core/Imagine/PlaceholderProvider/RemoteProvider.php @@ -74,5 +74,3 @@ private function resolveOptions(array $options): array return $resolver->resolve($options); } } - -class_alias(RemoteProvider::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\PlaceholderProvider\RemoteProvider'); diff --git a/src/bundle/Core/Imagine/PlaceholderProviderRegistry.php b/src/bundle/Core/Imagine/PlaceholderProviderRegistry.php index 2a434276e7..3ef89d4ff8 100644 --- a/src/bundle/Core/Imagine/PlaceholderProviderRegistry.php +++ b/src/bundle/Core/Imagine/PlaceholderProviderRegistry.php @@ -43,5 +43,3 @@ public function getProvider(string $type): PlaceholderProvider return $this->providers[$type]; } } - -class_alias(PlaceholderProviderRegistry::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\PlaceholderProviderRegistry'); diff --git a/src/bundle/Core/Imagine/Variation/ImagineAwareAliasGenerator.php b/src/bundle/Core/Imagine/Variation/ImagineAwareAliasGenerator.php index 99fd010a1f..7e9fd7a11a 100644 --- a/src/bundle/Core/Imagine/Variation/ImagineAwareAliasGenerator.php +++ b/src/bundle/Core/Imagine/Variation/ImagineAwareAliasGenerator.php @@ -120,5 +120,3 @@ private function getVariationBinaryFile($originalPath, $variationName) return $this->ioService->loadBinaryFile($variationPath); } } - -class_alias(ImagineAwareAliasGenerator::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\Variation\ImagineAwareAliasGenerator'); diff --git a/src/bundle/Core/Imagine/VariationPathGenerator.php b/src/bundle/Core/Imagine/VariationPathGenerator.php index 5d12bf0aeb..151a70a89e 100644 --- a/src/bundle/Core/Imagine/VariationPathGenerator.php +++ b/src/bundle/Core/Imagine/VariationPathGenerator.php @@ -15,5 +15,3 @@ interface VariationPathGenerator extends VariationPathGeneratorContract { } - -class_alias(VariationPathGenerator::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\VariationPathGenerator'); diff --git a/src/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGenerator.php b/src/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGenerator.php index 2ccae432f6..9f58757065 100644 --- a/src/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGenerator.php +++ b/src/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGenerator.php @@ -30,5 +30,3 @@ public function getVariationPath($originalPath, $filter) ); } } - -class_alias(AliasDirectoryVariationPathGenerator::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\VariationPathGenerator\AliasDirectoryVariationPathGenerator'); diff --git a/src/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGenerator.php b/src/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGenerator.php index de05a6240e..702f34dff0 100644 --- a/src/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGenerator.php +++ b/src/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGenerator.php @@ -30,5 +30,3 @@ public function getVariationPath($originalPath, $filter) ); } } - -class_alias(OriginalDirectoryVariationPathGenerator::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\VariationPathGenerator\OriginalDirectoryVariationPathGenerator'); diff --git a/src/bundle/Core/Imagine/VariationPurger/IOVariationPurger.php b/src/bundle/Core/Imagine/VariationPurger/IOVariationPurger.php index 7d6bc5849d..f4d67a314e 100644 --- a/src/bundle/Core/Imagine/VariationPurger/IOVariationPurger.php +++ b/src/bundle/Core/Imagine/VariationPurger/IOVariationPurger.php @@ -72,5 +72,3 @@ public function purge(array $aliasNames) } } } - -class_alias(IOVariationPurger::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\VariationPurger\IOVariationPurger'); diff --git a/src/bundle/Core/Imagine/VariationPurger/ImageFileList.php b/src/bundle/Core/Imagine/VariationPurger/ImageFileList.php index 38c86ddafa..4f574a6d0c 100644 --- a/src/bundle/Core/Imagine/VariationPurger/ImageFileList.php +++ b/src/bundle/Core/Imagine/VariationPurger/ImageFileList.php @@ -16,5 +16,3 @@ interface ImageFileList extends Countable, Iterator { } - -class_alias(ImageFileList::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\VariationPurger\ImageFileList'); diff --git a/src/bundle/Core/Imagine/VariationPurger/ImageFileRowReader.php b/src/bundle/Core/Imagine/VariationPurger/ImageFileRowReader.php index d9edadf084..b06e93e63f 100644 --- a/src/bundle/Core/Imagine/VariationPurger/ImageFileRowReader.php +++ b/src/bundle/Core/Imagine/VariationPurger/ImageFileRowReader.php @@ -33,5 +33,3 @@ public function getRow(); */ public function getCount(); } - -class_alias(ImageFileRowReader::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\VariationPurger\ImageFileRowReader'); diff --git a/src/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurger.php b/src/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurger.php index 51fe1d944e..0159672668 100644 --- a/src/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurger.php +++ b/src/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurger.php @@ -70,5 +70,3 @@ public function setLogger($logger) $this->logger = $logger; } } - -class_alias(ImageFileVariationPurger::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\VariationPurger\ImageFileVariationPurger'); diff --git a/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileList.php b/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileList.php index f8960fc965..6809724625 100644 --- a/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileList.php +++ b/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileList.php @@ -105,5 +105,3 @@ private function fetchRow(): void $this->item = $imageId; } } - -class_alias(LegacyStorageImageFileList::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\VariationPurger\LegacyStorageImageFileList'); diff --git a/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileRowReader.php b/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileRowReader.php index d0c26e19e6..c4a4810ef7 100644 --- a/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileRowReader.php +++ b/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileRowReader.php @@ -39,5 +39,3 @@ public function getCount() return $this->statement->rowCount(); } } - -class_alias(LegacyStorageImageFileRowReader::class, 'eZ\Bundle\EzPublishCoreBundle\Imagine\VariationPurger\LegacyStorageImageFileRowReader'); diff --git a/src/bundle/Core/Matcher/ServiceAwareMatcherFactory.php b/src/bundle/Core/Matcher/ServiceAwareMatcherFactory.php index 872af03779..e4de647611 100644 --- a/src/bundle/Core/Matcher/ServiceAwareMatcherFactory.php +++ b/src/bundle/Core/Matcher/ServiceAwareMatcherFactory.php @@ -48,5 +48,3 @@ protected function getMatcher($matcherIdentifier): ViewMatcherInterface : parent::getMatcher($matcherIdentifier); } } - -class_alias(ServiceAwareMatcherFactory::class, 'eZ\Bundle\EzPublishCoreBundle\Matcher\ServiceAwareMatcherFactory'); diff --git a/src/bundle/Core/Matcher/ViewMatcherRegistry.php b/src/bundle/Core/Matcher/ViewMatcherRegistry.php index 96c7275c01..7fbbae6a85 100644 --- a/src/bundle/Core/Matcher/ViewMatcherRegistry.php +++ b/src/bundle/Core/Matcher/ViewMatcherRegistry.php @@ -57,5 +57,3 @@ public function hasMatcher(string $matcherIdentifier): bool return isset($this->matchers[$matcherIdentifier]); } } - -class_alias(ViewMatcherRegistry::class, 'eZ\Bundle\EzPublishCoreBundle\Matcher\ViewMatcherRegistry'); diff --git a/src/bundle/Core/Routing/DefaultRouter.php b/src/bundle/Core/Routing/DefaultRouter.php index f8a8ebecc4..3b081ebc4c 100644 --- a/src/bundle/Core/Routing/DefaultRouter.php +++ b/src/bundle/Core/Routing/DefaultRouter.php @@ -186,5 +186,3 @@ public function getContextBySimplifiedRequest(SimplifiedRequest $simplifiedReque return $context; } } - -class_alias(DefaultRouter::class, 'eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter'); diff --git a/src/bundle/Core/Routing/JsRouting/ExposedRoutesExtractor.php b/src/bundle/Core/Routing/JsRouting/ExposedRoutesExtractor.php index 48eb33d7fc..64d01dfcbd 100644 --- a/src/bundle/Core/Routing/JsRouting/ExposedRoutesExtractor.php +++ b/src/bundle/Core/Routing/JsRouting/ExposedRoutesExtractor.php @@ -96,5 +96,3 @@ public function isRouteExposed(Route $route, $name): bool return $this->innerExtractor->isRouteExposed($route, $name); } } - -class_alias(ExposedRoutesExtractor::class, 'eZ\Bundle\EzPublishCoreBundle\Routing\JsRouting\ExposedRoutesExtractor'); diff --git a/src/bundle/Core/Routing/UrlAliasRouter.php b/src/bundle/Core/Routing/UrlAliasRouter.php index cd1a9d910b..aadfcea15d 100644 --- a/src/bundle/Core/Routing/UrlAliasRouter.php +++ b/src/bundle/Core/Routing/UrlAliasRouter.php @@ -57,5 +57,3 @@ protected function getUrlAlias($pathinfo) return $this->urlAliasService->lookup($pathPrefix . $pathinfo); } } - -class_alias(UrlAliasRouter::class, 'eZ\Bundle\EzPublishCoreBundle\Routing\UrlAliasRouter'); diff --git a/src/bundle/Core/Session/Handler/NativeSessionHandler.php b/src/bundle/Core/Session/Handler/NativeSessionHandler.php index efbfcff48c..7342577861 100644 --- a/src/bundle/Core/Session/Handler/NativeSessionHandler.php +++ b/src/bundle/Core/Session/Handler/NativeSessionHandler.php @@ -35,5 +35,3 @@ public function __construct($savePath = null, $saveHandler = null) } } } - -class_alias(NativeSessionHandler::class, 'eZ\Bundle\EzPublishCoreBundle\Session\Handler\NativeSessionHandler'); diff --git a/src/bundle/Core/SiteAccess/Config/ComplexConfigProcessor.php b/src/bundle/Core/SiteAccess/Config/ComplexConfigProcessor.php index a5da7d4a1e..5329e4dffc 100644 --- a/src/bundle/Core/SiteAccess/Config/ComplexConfigProcessor.php +++ b/src/bundle/Core/SiteAccess/Config/ComplexConfigProcessor.php @@ -83,5 +83,3 @@ public function processSettingValue(string $value): string return $value; } } - -class_alias(ComplexConfigProcessor::class, 'eZ\Bundle\EzPublishCoreBundle\SiteAccess\Config\ComplexConfigProcessor'); diff --git a/src/bundle/Core/SiteAccess/Config/IOConfigResolver.php b/src/bundle/Core/SiteAccess/Config/IOConfigResolver.php index 4df7118c8a..4ee9d9b377 100644 --- a/src/bundle/Core/SiteAccess/Config/IOConfigResolver.php +++ b/src/bundle/Core/SiteAccess/Config/IOConfigResolver.php @@ -39,5 +39,3 @@ public function getUrlPrefix(): string return $this->complexConfigProcessor->processComplexSetting('io.url_prefix'); } } - -class_alias(IOConfigResolver::class, 'eZ\Bundle\EzPublishCoreBundle\SiteAccess\Config\IOConfigResolver'); diff --git a/src/bundle/Core/SiteAccess/LanguageResolver.php b/src/bundle/Core/SiteAccess/LanguageResolver.php index 196cd0888f..374f6ea837 100644 --- a/src/bundle/Core/SiteAccess/LanguageResolver.php +++ b/src/bundle/Core/SiteAccess/LanguageResolver.php @@ -37,5 +37,3 @@ protected function getConfiguredLanguages(): array return $this->configResolver->getParameter('languages'); } } - -class_alias(LanguageResolver::class, 'eZ\Bundle\EzPublishCoreBundle\SiteAccess\LanguageResolver'); diff --git a/src/bundle/Core/SiteAccess/Matcher.php b/src/bundle/Core/SiteAccess/Matcher.php index 4ee5cf3c44..80af8b31a0 100644 --- a/src/bundle/Core/SiteAccess/Matcher.php +++ b/src/bundle/Core/SiteAccess/Matcher.php @@ -21,5 +21,3 @@ interface Matcher extends BaseMatcher */ public function setMatchingConfiguration($matchingConfiguration); } - -class_alias(Matcher::class, 'eZ\Bundle\EzPublishCoreBundle\SiteAccess\Matcher'); diff --git a/src/bundle/Core/SiteAccess/MatcherBuilder.php b/src/bundle/Core/SiteAccess/MatcherBuilder.php index 9d230ef008..db8e23ed23 100644 --- a/src/bundle/Core/SiteAccess/MatcherBuilder.php +++ b/src/bundle/Core/SiteAccess/MatcherBuilder.php @@ -49,5 +49,3 @@ public function buildMatcher($matchingClass, $matchingConfiguration, SimplifiedR return parent::buildMatcher($matchingClass, $matchingConfiguration, $request); } } - -class_alias(MatcherBuilder::class, 'eZ\Bundle\EzPublishCoreBundle\SiteAccess\MatcherBuilder'); diff --git a/src/bundle/Core/SiteAccess/SiteAccessConfigurationFilter.php b/src/bundle/Core/SiteAccess/SiteAccessConfigurationFilter.php index c3aae28912..cc0207f14a 100644 --- a/src/bundle/Core/SiteAccess/SiteAccessConfigurationFilter.php +++ b/src/bundle/Core/SiteAccess/SiteAccessConfigurationFilter.php @@ -32,5 +32,3 @@ interface SiteAccessConfigurationFilter */ public function filter(array $siteAccessConfiguration); } - -class_alias(SiteAccessConfigurationFilter::class, 'eZ\Bundle\EzPublishCoreBundle\SiteAccess\SiteAccessConfigurationFilter'); diff --git a/src/bundle/Core/SiteAccess/SiteAccessMatcherRegistry.php b/src/bundle/Core/SiteAccess/SiteAccessMatcherRegistry.php index bbab246675..6bcca7c216 100644 --- a/src/bundle/Core/SiteAccess/SiteAccessMatcherRegistry.php +++ b/src/bundle/Core/SiteAccess/SiteAccessMatcherRegistry.php @@ -45,5 +45,3 @@ public function hasMatcher(string $identifier): bool return isset($this->matchers[$identifier]); } } - -class_alias(SiteAccessMatcherRegistry::class, 'eZ\Bundle\EzPublishCoreBundle\SiteAccess\SiteAccessMatcherRegistry'); diff --git a/src/bundle/Core/SiteAccess/SiteAccessMatcherRegistryInterface.php b/src/bundle/Core/SiteAccess/SiteAccessMatcherRegistryInterface.php index 2a4190286e..b7865a6611 100644 --- a/src/bundle/Core/SiteAccess/SiteAccessMatcherRegistryInterface.php +++ b/src/bundle/Core/SiteAccess/SiteAccessMatcherRegistryInterface.php @@ -24,5 +24,3 @@ public function getMatcher(string $identifier): Matcher; public function hasMatcher(string $identifier): bool; } - -class_alias(SiteAccessMatcherRegistryInterface::class, 'eZ\Bundle\EzPublishCoreBundle\SiteAccess\SiteAccessMatcherRegistryInterface'); diff --git a/src/bundle/Core/Templating/Twig/ContextAwareTwigVariablesExtension.php b/src/bundle/Core/Templating/Twig/ContextAwareTwigVariablesExtension.php index b1ab34fab1..d3442193b7 100644 --- a/src/bundle/Core/Templating/Twig/ContextAwareTwigVariablesExtension.php +++ b/src/bundle/Core/Templating/Twig/ContextAwareTwigVariablesExtension.php @@ -28,5 +28,3 @@ public function getGlobals(): array return $this->configResolver->getParameter('twig_variables'); } } - -class_alias(ContextAwareTwigVariablesExtension::class, 'eZ\Bundle\EzPublishCoreBundle\Templating\Twig\ContextAwareTwigVariablesExtension'); diff --git a/src/bundle/Core/Translation/Collector.php b/src/bundle/Core/Translation/Collector.php index e006148460..b2de6b0b43 100644 --- a/src/bundle/Core/Translation/Collector.php +++ b/src/bundle/Core/Translation/Collector.php @@ -17,5 +17,3 @@ interface Collector */ public function collect(); } - -class_alias(Collector::class, 'eZ\Bundle\EzPublishCoreBundle\Translation\Collector'); diff --git a/src/bundle/Core/Translation/GlobCollector.php b/src/bundle/Core/Translation/GlobCollector.php index 5d3f783bf3..2e04d7e6bb 100644 --- a/src/bundle/Core/Translation/GlobCollector.php +++ b/src/bundle/Core/Translation/GlobCollector.php @@ -44,5 +44,3 @@ public function collect() return $meta; } } - -class_alias(GlobCollector::class, 'eZ\Bundle\EzPublishCoreBundle\Translation\GlobCollector'); diff --git a/src/bundle/Core/URLChecker/Handler/AbstractConfigResolverBasedURLHandler.php b/src/bundle/Core/URLChecker/Handler/AbstractConfigResolverBasedURLHandler.php index 20f98a2b5d..8ec374a82d 100644 --- a/src/bundle/Core/URLChecker/Handler/AbstractConfigResolverBasedURLHandler.php +++ b/src/bundle/Core/URLChecker/Handler/AbstractConfigResolverBasedURLHandler.php @@ -53,5 +53,3 @@ public function getOptions(): array return $this->getOptionsResolver()->resolve($options); } } - -class_alias(AbstractConfigResolverBasedURLHandler::class, 'eZ\Bundle\EzPublishCoreBundle\URLChecker\Handler\AbstractConfigResolverBasedURLHandler'); diff --git a/src/bundle/Core/URLChecker/Handler/AbstractURLHandler.php b/src/bundle/Core/URLChecker/Handler/AbstractURLHandler.php index 9725f02b9a..a683598f56 100644 --- a/src/bundle/Core/URLChecker/Handler/AbstractURLHandler.php +++ b/src/bundle/Core/URLChecker/Handler/AbstractURLHandler.php @@ -54,5 +54,3 @@ protected function setUrlStatus(URL $url, $isValid) } } } - -class_alias(AbstractURLHandler::class, 'eZ\Bundle\EzPublishCoreBundle\URLChecker\Handler\AbstractURLHandler'); diff --git a/src/bundle/Core/URLChecker/Handler/HTTPHandler.php b/src/bundle/Core/URLChecker/Handler/HTTPHandler.php index 4ce062cdcc..f8b91b1fac 100644 --- a/src/bundle/Core/URLChecker/Handler/HTTPHandler.php +++ b/src/bundle/Core/URLChecker/Handler/HTTPHandler.php @@ -158,5 +158,3 @@ private function isSuccessful($statusCode) return $statusCode >= 200 && $statusCode < 300; } } - -class_alias(HTTPHandler::class, 'eZ\Bundle\EzPublishCoreBundle\URLChecker\Handler\HTTPHandler'); diff --git a/src/bundle/Core/URLChecker/Handler/MailToHandler.php b/src/bundle/Core/URLChecker/Handler/MailToHandler.php index 038247be60..d8a44142b2 100644 --- a/src/bundle/Core/URLChecker/Handler/MailToHandler.php +++ b/src/bundle/Core/URLChecker/Handler/MailToHandler.php @@ -54,5 +54,3 @@ protected function getOptionsResolver(): OptionsResolver return $resolver; } } - -class_alias(MailToHandler::class, 'eZ\Bundle\EzPublishCoreBundle\URLChecker\Handler\MailToHandler'); diff --git a/src/bundle/Core/URLChecker/URLChecker.php b/src/bundle/Core/URLChecker/URLChecker.php index bc0329e5b3..852dbd58c0 100644 --- a/src/bundle/Core/URLChecker/URLChecker.php +++ b/src/bundle/Core/URLChecker/URLChecker.php @@ -96,5 +96,3 @@ private function groupByScheme(SearchResult $urls) return $grouped; } } - -class_alias(URLChecker::class, 'eZ\Bundle\EzPublishCoreBundle\URLChecker\URLChecker'); diff --git a/src/bundle/Core/URLChecker/URLCheckerInterface.php b/src/bundle/Core/URLChecker/URLCheckerInterface.php index 2b99771c8a..99ef261002 100644 --- a/src/bundle/Core/URLChecker/URLCheckerInterface.php +++ b/src/bundle/Core/URLChecker/URLCheckerInterface.php @@ -18,5 +18,3 @@ interface URLCheckerInterface */ public function check(URLQuery $query); } - -class_alias(URLCheckerInterface::class, 'eZ\Bundle\EzPublishCoreBundle\URLChecker\URLCheckerInterface'); diff --git a/src/bundle/Core/URLChecker/URLHandlerInterface.php b/src/bundle/Core/URLChecker/URLHandlerInterface.php index 5f0759a238..74299d0c4c 100644 --- a/src/bundle/Core/URLChecker/URLHandlerInterface.php +++ b/src/bundle/Core/URLChecker/URLHandlerInterface.php @@ -16,5 +16,3 @@ interface URLHandlerInterface */ public function validate(array $urls); } - -class_alias(URLHandlerInterface::class, 'eZ\Bundle\EzPublishCoreBundle\URLChecker\URLHandlerInterface'); diff --git a/src/bundle/Core/URLChecker/URLHandlerRegistry.php b/src/bundle/Core/URLChecker/URLHandlerRegistry.php index f20158b310..4a256eab0a 100644 --- a/src/bundle/Core/URLChecker/URLHandlerRegistry.php +++ b/src/bundle/Core/URLChecker/URLHandlerRegistry.php @@ -50,5 +50,3 @@ public function getHandler($scheme) return $this->handlers[$scheme]; } } - -class_alias(URLHandlerRegistry::class, 'eZ\Bundle\EzPublishCoreBundle\URLChecker\URLHandlerRegistry'); diff --git a/src/bundle/Core/URLChecker/URLHandlerRegistryInterface.php b/src/bundle/Core/URLChecker/URLHandlerRegistryInterface.php index 8f4bc5d5d1..0a9146380c 100644 --- a/src/bundle/Core/URLChecker/URLHandlerRegistryInterface.php +++ b/src/bundle/Core/URLChecker/URLHandlerRegistryInterface.php @@ -37,5 +37,3 @@ public function supported($scheme); */ public function getHandler($scheme); } - -class_alias(URLHandlerRegistryInterface::class, 'eZ\Bundle\EzPublishCoreBundle\URLChecker\URLHandlerRegistryInterface'); diff --git a/src/bundle/Core/View/Manager.php b/src/bundle/Core/View/Manager.php index c309cb8633..7f3e601522 100644 --- a/src/bundle/Core/View/Manager.php +++ b/src/bundle/Core/View/Manager.php @@ -37,5 +37,3 @@ public function setSiteAccess(SiteAccess $siteAccess = null) } } } - -class_alias(Manager::class, 'eZ\Bundle\EzPublishCoreBundle\View\Manager'); diff --git a/src/bundle/Core/View/Provider/Configured.php b/src/bundle/Core/View/Provider/Configured.php index 05dbf49b18..5f2293f110 100644 --- a/src/bundle/Core/View/Provider/Configured.php +++ b/src/bundle/Core/View/Provider/Configured.php @@ -25,5 +25,3 @@ public function setSiteAccess(SiteAccess $siteAccess = null) } } } - -class_alias(Configured::class, 'eZ\Bundle\EzPublishCoreBundle\View\Provider\Configured'); diff --git a/src/bundle/Debug/Collector/IbexaCoreCollector.php b/src/bundle/Debug/Collector/IbexaCoreCollector.php index 5c7e1f4754..842a9fe500 100644 --- a/src/bundle/Debug/Collector/IbexaCoreCollector.php +++ b/src/bundle/Debug/Collector/IbexaCoreCollector.php @@ -112,5 +112,3 @@ public function reset() ]; } } - -class_alias(IbexaCoreCollector::class, 'eZ\Bundle\EzPublishDebugBundle\Collector\EzPublishCoreCollector'); diff --git a/src/bundle/Debug/Collector/PersistenceCacheCollector.php b/src/bundle/Debug/Collector/PersistenceCacheCollector.php index 3d519fcc9c..f16599035d 100644 --- a/src/bundle/Debug/Collector/PersistenceCacheCollector.php +++ b/src/bundle/Debug/Collector/PersistenceCacheCollector.php @@ -147,5 +147,3 @@ public function reset(): void $this->data = []; } } - -class_alias(PersistenceCacheCollector::class, 'eZ\Bundle\EzPublishDebugBundle\Collector\PersistenceCacheCollector'); diff --git a/src/bundle/Debug/Collector/SiteAccessCollector.php b/src/bundle/Debug/Collector/SiteAccessCollector.php index d25698bd5c..7b061065f3 100644 --- a/src/bundle/Debug/Collector/SiteAccessCollector.php +++ b/src/bundle/Debug/Collector/SiteAccessCollector.php @@ -44,5 +44,3 @@ public function reset(): void $this->data = []; } } - -class_alias(SiteAccessCollector::class, 'eZ\Bundle\EzPublishDebugBundle\Collector\SiteAccessCollector'); diff --git a/src/bundle/Debug/DependencyInjection/Compiler/DataCollectorPass.php b/src/bundle/Debug/DependencyInjection/Compiler/DataCollectorPass.php index b2fd21ae6e..beaeb405f5 100644 --- a/src/bundle/Debug/DependencyInjection/Compiler/DataCollectorPass.php +++ b/src/bundle/Debug/DependencyInjection/Compiler/DataCollectorPass.php @@ -35,5 +35,3 @@ public function process(ContainerBuilder $container) } } } - -class_alias(DataCollectorPass::class, 'eZ\Bundle\EzPublishDebugBundle\DependencyInjection\Compiler\DataCollectorPass'); diff --git a/src/bundle/Debug/DependencyInjection/IbexaDebugExtension.php b/src/bundle/Debug/DependencyInjection/IbexaDebugExtension.php index 7e64eeab6b..ee6afd2199 100644 --- a/src/bundle/Debug/DependencyInjection/IbexaDebugExtension.php +++ b/src/bundle/Debug/DependencyInjection/IbexaDebugExtension.php @@ -33,5 +33,3 @@ public function load(array $configs, ContainerBuilder $container): void $loader->load('services.yml'); } } - -class_alias(IbexaDebugExtension::class, 'eZ\Bundle\EzPublishDebugBundle\DependencyInjection\EzPublishDebugExtension'); diff --git a/src/bundle/Debug/IbexaDebugBundle.php b/src/bundle/Debug/IbexaDebugBundle.php index b70822b426..5b93da4ff2 100644 --- a/src/bundle/Debug/IbexaDebugBundle.php +++ b/src/bundle/Debug/IbexaDebugBundle.php @@ -19,5 +19,3 @@ public function build(ContainerBuilder $container) $container->addCompilerPass(new DataCollectorPass()); } } - -class_alias(IbexaDebugBundle::class, 'eZ\Bundle\EzPublishDebugBundle\EzPublishDebugBundle'); diff --git a/src/bundle/IO/ApiLoader/HandlerRegistry.php b/src/bundle/IO/ApiLoader/HandlerRegistry.php index 0a28f5a5b0..76aa227d72 100644 --- a/src/bundle/IO/ApiLoader/HandlerRegistry.php +++ b/src/bundle/IO/ApiLoader/HandlerRegistry.php @@ -42,5 +42,3 @@ public function getConfiguredHandler($handlerName) return $this->handlersMap[$handlerName]; } } - -class_alias(HandlerRegistry::class, 'eZ\Bundle\EzPublishIOBundle\ApiLoader\HandlerRegistry'); diff --git a/src/bundle/IO/BinaryStreamResponse.php b/src/bundle/IO/BinaryStreamResponse.php index d4f12ed1ea..9bc3011499 100644 --- a/src/bundle/IO/BinaryStreamResponse.php +++ b/src/bundle/IO/BinaryStreamResponse.php @@ -226,5 +226,3 @@ public function getContent() return null; } } - -class_alias(BinaryStreamResponse::class, 'eZ\Bundle\EzPublishIOBundle\BinaryStreamResponse'); diff --git a/src/bundle/IO/Command/MigrateFilesCommand.php b/src/bundle/IO/Command/MigrateFilesCommand.php index 302290eedb..02dc895727 100644 --- a/src/bundle/IO/Command/MigrateFilesCommand.php +++ b/src/bundle/IO/Command/MigrateFilesCommand.php @@ -325,5 +325,3 @@ public function getDeprecatedAliases(): array return ['ezplatform:io:migrate-files']; } } - -class_alias(MigrateFilesCommand::class, 'eZ\Bundle\EzPublishIOBundle\Command\MigrateFilesCommand'); diff --git a/src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php b/src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php index e79b9d3862..db23094834 100644 --- a/src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php +++ b/src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php @@ -122,5 +122,3 @@ protected function getFactory(ArrayObject $factories, $type, ContainerBuilder $c return $factories[$type]; } } - -class_alias(IOConfigurationPass::class, 'eZ\Bundle\EzPublishIOBundle\DependencyInjection\Compiler\IOConfigurationPass'); diff --git a/src/bundle/IO/DependencyInjection/Compiler/MigrationFileListerPass.php b/src/bundle/IO/DependencyInjection/Compiler/MigrationFileListerPass.php index 5ba4111631..3bf3bf324f 100644 --- a/src/bundle/IO/DependencyInjection/Compiler/MigrationFileListerPass.php +++ b/src/bundle/IO/DependencyInjection/Compiler/MigrationFileListerPass.php @@ -38,5 +38,3 @@ public function process(ContainerBuilder $container) $fileListerRegistryDef->setArguments([$fileListers]); } } - -class_alias(MigrationFileListerPass::class, 'eZ\Bundle\EzPublishIOBundle\DependencyInjection\Compiler\MigrationFileListerPass'); diff --git a/src/bundle/IO/DependencyInjection/Configuration.php b/src/bundle/IO/DependencyInjection/Configuration.php index b23bbe78cd..6b51c4429d 100644 --- a/src/bundle/IO/DependencyInjection/Configuration.php +++ b/src/bundle/IO/DependencyInjection/Configuration.php @@ -77,5 +77,3 @@ private function addHandlersSection(NodeDefinition $node, $name, $info, ArrayObj } } } - -class_alias(Configuration::class, 'eZ\Bundle\EzPublishIOBundle\DependencyInjection\Configuration'); diff --git a/src/bundle/IO/DependencyInjection/ConfigurationFactory.php b/src/bundle/IO/DependencyInjection/ConfigurationFactory.php index a27c08549e..c688b648da 100644 --- a/src/bundle/IO/DependencyInjection/ConfigurationFactory.php +++ b/src/bundle/IO/DependencyInjection/ConfigurationFactory.php @@ -58,5 +58,3 @@ public function getParentServiceId(); */ public function configureHandler(ServiceDefinition $serviceDefinition, array $config); } - -class_alias(ConfigurationFactory::class, 'eZ\Bundle\EzPublishIOBundle\DependencyInjection\ConfigurationFactory'); diff --git a/src/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/Flysystem.php b/src/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/Flysystem.php index 8be748b5cb..5d6d3bd740 100644 --- a/src/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/Flysystem.php +++ b/src/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/Flysystem.php @@ -16,5 +16,3 @@ public function getParentServiceId() return 'ibexa.core.io.binarydata_handler.flysystem'; } } - -class_alias(Flysystem::class, 'eZ\Bundle\EzPublishIOBundle\DependencyInjection\ConfigurationFactory\BinarydataHandler\Flysystem'); diff --git a/src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php b/src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php index 095b97b385..34bf3812fe 100644 --- a/src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php +++ b/src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php @@ -79,5 +79,3 @@ private function createFilesystem(ContainerBuilder $container, $name, $adapter) return $filesystemId; } } - -class_alias(Flysystem::class, 'eZ\Bundle\EzPublishIOBundle\DependencyInjection\ConfigurationFactory\Flysystem'); diff --git a/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/Flysystem.php b/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/Flysystem.php index 793573b001..f0c2f999cc 100644 --- a/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/Flysystem.php +++ b/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/Flysystem.php @@ -16,5 +16,3 @@ public function getParentServiceId() return 'ibexa.core.io.metadata_handler.flysystem'; } } - -class_alias(Flysystem::class, 'eZ\Bundle\EzPublishIOBundle\DependencyInjection\ConfigurationFactory\MetadataHandler\Flysystem'); diff --git a/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php b/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php index bea2c9a959..02b5095963 100644 --- a/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php +++ b/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php @@ -38,5 +38,3 @@ public function addConfiguration(ArrayNodeDefinition $node) ->end(); } } - -class_alias(LegacyDFSCluster::class, 'eZ\Bundle\EzPublishIOBundle\DependencyInjection\ConfigurationFactory\MetadataHandler\LegacyDFSCluster'); diff --git a/src/bundle/IO/DependencyInjection/IbexaIOExtension.php b/src/bundle/IO/DependencyInjection/IbexaIOExtension.php index fe1987fee2..54eded7d7a 100644 --- a/src/bundle/IO/DependencyInjection/IbexaIOExtension.php +++ b/src/bundle/IO/DependencyInjection/IbexaIOExtension.php @@ -128,5 +128,3 @@ public function getConfiguration(array $config, ContainerBuilder $container) return $configuration; } } - -class_alias(IbexaIOExtension::class, 'eZ\Bundle\EzPublishIOBundle\DependencyInjection\EzPublishIOExtension'); diff --git a/src/bundle/IO/EventListener/StreamFileListener.php b/src/bundle/IO/EventListener/StreamFileListener.php index 1b04344b49..0e6391f8ca 100644 --- a/src/bundle/IO/EventListener/StreamFileListener.php +++ b/src/bundle/IO/EventListener/StreamFileListener.php @@ -87,5 +87,3 @@ private function isIoUri($uri, $urlPrefix) return strpos(ltrim($uri, '/'), $urlPrefix) === 0; } } - -class_alias(StreamFileListener::class, 'eZ\Bundle\EzPublishIOBundle\EventListener\StreamFileListener'); diff --git a/src/bundle/IO/IbexaIOBundle.php b/src/bundle/IO/IbexaIOBundle.php index d43611bf0b..d0fa03daef 100644 --- a/src/bundle/IO/IbexaIOBundle.php +++ b/src/bundle/IO/IbexaIOBundle.php @@ -43,5 +43,3 @@ public function getContainerExtension() return $this->extension; } } - -class_alias(IbexaIOBundle::class, 'eZ\Bundle\EzPublishIOBundle\EzPublishIOBundle'); diff --git a/src/bundle/IO/Migration/FileLister/BinaryFileLister.php b/src/bundle/IO/Migration/FileLister/BinaryFileLister.php index f995e6fd13..5167339c1d 100644 --- a/src/bundle/IO/Migration/FileLister/BinaryFileLister.php +++ b/src/bundle/IO/Migration/FileLister/BinaryFileLister.php @@ -68,5 +68,3 @@ public function loadMetadataList($limit = null, $offset = null) return $metadataList; } } - -class_alias(BinaryFileLister::class, 'eZ\Bundle\EzPublishIOBundle\Migration\FileLister\BinaryFileLister'); diff --git a/src/bundle/IO/Migration/FileLister/FileIterator/LegacyStorageFileIterator.php b/src/bundle/IO/Migration/FileLister/FileIterator/LegacyStorageFileIterator.php index dad0222b7d..d50e0cf5b5 100644 --- a/src/bundle/IO/Migration/FileLister/FileIterator/LegacyStorageFileIterator.php +++ b/src/bundle/IO/Migration/FileLister/FileIterator/LegacyStorageFileIterator.php @@ -79,5 +79,3 @@ private function fetchRow() $this->item = $fileId; } } - -class_alias(LegacyStorageFileIterator::class, 'eZ\Bundle\EzPublishIOBundle\Migration\FileLister\FileIterator\LegacyStorageFileIterator'); diff --git a/src/bundle/IO/Migration/FileLister/FileIteratorInterface.php b/src/bundle/IO/Migration/FileLister/FileIteratorInterface.php index 55c3d9909f..548f9ce550 100644 --- a/src/bundle/IO/Migration/FileLister/FileIteratorInterface.php +++ b/src/bundle/IO/Migration/FileLister/FileIteratorInterface.php @@ -16,5 +16,3 @@ interface FileIteratorInterface extends Countable, Iterator { } - -class_alias(FileIteratorInterface::class, 'eZ\Bundle\EzPublishIOBundle\Migration\FileLister\FileIteratorInterface'); diff --git a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageBinaryFileRowReader.php b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageBinaryFileRowReader.php index ce48f347ce..1ab91ed65e 100644 --- a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageBinaryFileRowReader.php +++ b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageBinaryFileRowReader.php @@ -19,5 +19,3 @@ protected function getStorageTable() return 'ezbinaryfile'; } } - -class_alias(LegacyStorageBinaryFileRowReader::class, 'eZ\Bundle\EzPublishIOBundle\Migration\FileLister\FileRowReader\LegacyStorageBinaryFileRowReader'); diff --git a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php index a264ef8bf4..f8100f4493 100644 --- a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php +++ b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php @@ -64,5 +64,3 @@ private function prependMimeToPath($path, $mimeType) return substr($mimeType, 0, strpos($mimeType, '/')) . '/' . $path; } } - -class_alias(LegacyStorageFileRowReader::class, 'eZ\Bundle\EzPublishIOBundle\Migration\FileLister\FileRowReader\LegacyStorageFileRowReader'); diff --git a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageMediaFileRowReader.php b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageMediaFileRowReader.php index 40dd049303..ad61ffc1fe 100644 --- a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageMediaFileRowReader.php +++ b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageMediaFileRowReader.php @@ -19,5 +19,3 @@ protected function getStorageTable() return 'ezmedia'; } } - -class_alias(LegacyStorageMediaFileRowReader::class, 'eZ\Bundle\EzPublishIOBundle\Migration\FileLister\FileRowReader\LegacyStorageMediaFileRowReader'); diff --git a/src/bundle/IO/Migration/FileLister/FileRowReaderInterface.php b/src/bundle/IO/Migration/FileLister/FileRowReaderInterface.php index 412fb986ce..ecdc468994 100644 --- a/src/bundle/IO/Migration/FileLister/FileRowReaderInterface.php +++ b/src/bundle/IO/Migration/FileLister/FileRowReaderInterface.php @@ -33,5 +33,3 @@ public function getRow(); */ public function getCount(); } - -class_alias(FileRowReaderInterface::class, 'eZ\Bundle\EzPublishIOBundle\Migration\FileLister\FileRowReaderInterface'); diff --git a/src/bundle/IO/Migration/FileLister/ImageFileLister.php b/src/bundle/IO/Migration/FileLister/ImageFileLister.php index 4c0d724647..faa463ac54 100644 --- a/src/bundle/IO/Migration/FileLister/ImageFileLister.php +++ b/src/bundle/IO/Migration/FileLister/ImageFileLister.php @@ -93,5 +93,3 @@ public function loadMetadataList($limit = null, $offset = null) return $metadataList; } } - -class_alias(ImageFileLister::class, 'eZ\Bundle\EzPublishIOBundle\Migration\FileLister\ImageFileLister'); diff --git a/src/bundle/IO/Migration/FileListerInterface.php b/src/bundle/IO/Migration/FileListerInterface.php index 54d9fa04dc..c6bca6b7a0 100644 --- a/src/bundle/IO/Migration/FileListerInterface.php +++ b/src/bundle/IO/Migration/FileListerInterface.php @@ -26,5 +26,3 @@ public function countFiles(); */ public function loadMetadataList($limit = null, $offset = null); } - -class_alias(FileListerInterface::class, 'eZ\Bundle\EzPublishIOBundle\Migration\FileListerInterface'); diff --git a/src/bundle/IO/Migration/FileListerRegistry.php b/src/bundle/IO/Migration/FileListerRegistry.php index f447893ebb..710c33bed0 100644 --- a/src/bundle/IO/Migration/FileListerRegistry.php +++ b/src/bundle/IO/Migration/FileListerRegistry.php @@ -30,5 +30,3 @@ public function getItem($identifier); */ public function getIdentifiers(); } - -class_alias(FileListerRegistry::class, 'eZ\Bundle\EzPublishIOBundle\Migration\FileListerRegistry'); diff --git a/src/bundle/IO/Migration/FileListerRegistry/ConfigurableRegistry.php b/src/bundle/IO/Migration/FileListerRegistry/ConfigurableRegistry.php index e912e74b19..c4b008e31c 100644 --- a/src/bundle/IO/Migration/FileListerRegistry/ConfigurableRegistry.php +++ b/src/bundle/IO/Migration/FileListerRegistry/ConfigurableRegistry.php @@ -54,5 +54,3 @@ public function getIdentifiers() return array_keys($this->registry); } } - -class_alias(ConfigurableRegistry::class, 'eZ\Bundle\EzPublishIOBundle\Migration\FileListerRegistry\ConfigurableRegistry'); diff --git a/src/bundle/IO/Migration/FileMigrator/FileMigrator.php b/src/bundle/IO/Migration/FileMigrator/FileMigrator.php index 5567336310..09ebabe0cc 100644 --- a/src/bundle/IO/Migration/FileMigrator/FileMigrator.php +++ b/src/bundle/IO/Migration/FileMigrator/FileMigrator.php @@ -78,5 +78,3 @@ private function migrateMetadata(BinaryFile $binaryFile): bool return true; } } - -class_alias(FileMigrator::class, 'eZ\Bundle\EzPublishIOBundle\Migration\FileMigrator\FileMigrator'); diff --git a/src/bundle/IO/Migration/FileMigratorInterface.php b/src/bundle/IO/Migration/FileMigratorInterface.php index 245e9d70a3..7b0ee46b3b 100644 --- a/src/bundle/IO/Migration/FileMigratorInterface.php +++ b/src/bundle/IO/Migration/FileMigratorInterface.php @@ -23,5 +23,3 @@ interface FileMigratorInterface extends MigrationHandlerInterface */ public function migrateFile(BinaryFile $binaryFile); } - -class_alias(FileMigratorInterface::class, 'eZ\Bundle\EzPublishIOBundle\Migration\FileMigratorInterface'); diff --git a/src/bundle/IO/Migration/MigrationHandler.php b/src/bundle/IO/Migration/MigrationHandler.php index 87d48be12e..2a6a0cabd3 100644 --- a/src/bundle/IO/Migration/MigrationHandler.php +++ b/src/bundle/IO/Migration/MigrationHandler.php @@ -79,5 +79,3 @@ final protected function logMissingFile($id) $this->logInfo("File with id $id not found"); } } - -class_alias(MigrationHandler::class, 'eZ\Bundle\EzPublishIOBundle\Migration\MigrationHandler'); diff --git a/src/bundle/IO/Migration/MigrationHandlerInterface.php b/src/bundle/IO/Migration/MigrationHandlerInterface.php index 6dc64f422d..bee26d49d8 100644 --- a/src/bundle/IO/Migration/MigrationHandlerInterface.php +++ b/src/bundle/IO/Migration/MigrationHandlerInterface.php @@ -27,5 +27,3 @@ public function setIODataHandlersByIdentifiers( $toBinarydataHandlerIdentifier ); } - -class_alias(MigrationHandlerInterface::class, 'eZ\Bundle\EzPublishIOBundle\Migration\MigrationHandlerInterface'); diff --git a/src/bundle/LegacySearchEngine/ApiLoader/ConnectionFactory.php b/src/bundle/LegacySearchEngine/ApiLoader/ConnectionFactory.php index 46f23aa720..bca14ec78a 100644 --- a/src/bundle/LegacySearchEngine/ApiLoader/ConnectionFactory.php +++ b/src/bundle/LegacySearchEngine/ApiLoader/ConnectionFactory.php @@ -54,5 +54,3 @@ public function getConnection() return $this->container->get($doctrineConnectionId); } } - -class_alias(ConnectionFactory::class, 'eZ\Bundle\EzPublishLegacySearchEngineBundle\ApiLoader\ConnectionFactory'); diff --git a/src/bundle/LegacySearchEngine/DependencyInjection/IbexaLegacySearchEngineExtension.php b/src/bundle/LegacySearchEngine/DependencyInjection/IbexaLegacySearchEngineExtension.php index f5d745bb2e..fdbaa0dce1 100644 --- a/src/bundle/LegacySearchEngine/DependencyInjection/IbexaLegacySearchEngineExtension.php +++ b/src/bundle/LegacySearchEngine/DependencyInjection/IbexaLegacySearchEngineExtension.php @@ -35,5 +35,3 @@ public function load(array $configs, ContainerBuilder $container) $loader->load('services.yml'); } } - -class_alias(IbexaLegacySearchEngineExtension::class, 'eZ\Bundle\EzPublishLegacySearchEngineBundle\DependencyInjection\EzPublishLegacySearchEngineExtension'); diff --git a/src/bundle/LegacySearchEngine/IbexaLegacySearchEngineBundle.php b/src/bundle/LegacySearchEngine/IbexaLegacySearchEngineBundle.php index bea1756337..e9ce3e7ab3 100644 --- a/src/bundle/LegacySearchEngine/IbexaLegacySearchEngineBundle.php +++ b/src/bundle/LegacySearchEngine/IbexaLegacySearchEngineBundle.php @@ -35,5 +35,3 @@ public function getContainerExtension() return $this->extension; } } - -class_alias(IbexaLegacySearchEngineBundle::class, 'eZ\Bundle\EzPublishLegacySearchEngineBundle\EzPublishLegacySearchEngineBundle'); diff --git a/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php b/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php index 55e7123ab1..f55c2ec35f 100644 --- a/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php +++ b/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php @@ -280,5 +280,3 @@ public function getDeprecatedAliases(): array return ['ezplatform:install']; } } - -class_alias(InstallPlatformCommand::class, 'EzSystems\PlatformInstallerBundle\Command\InstallPlatformCommand'); diff --git a/src/bundle/RepositoryInstaller/Command/ValidatePasswordHashesCommand.php b/src/bundle/RepositoryInstaller/Command/ValidatePasswordHashesCommand.php index faba75b0e1..b1aaded552 100644 --- a/src/bundle/RepositoryInstaller/Command/ValidatePasswordHashesCommand.php +++ b/src/bundle/RepositoryInstaller/Command/ValidatePasswordHashesCommand.php @@ -59,5 +59,3 @@ public function getDeprecatedAliases(): array return ['ezplatform:user:validate-password-hashes']; } } - -class_alias(ValidatePasswordHashesCommand::class, 'EzSystems\PlatformInstallerBundle\Command\ValidatePasswordHashesCommand'); diff --git a/src/bundle/RepositoryInstaller/DependencyInjection/Compiler/InstallerTagPass.php b/src/bundle/RepositoryInstaller/DependencyInjection/Compiler/InstallerTagPass.php index ef01fcbef5..b3d46c96cb 100644 --- a/src/bundle/RepositoryInstaller/DependencyInjection/Compiler/InstallerTagPass.php +++ b/src/bundle/RepositoryInstaller/DependencyInjection/Compiler/InstallerTagPass.php @@ -49,5 +49,3 @@ public function process(ContainerBuilder $container) $installCommandDef->replaceArgument('$installers', $installers); } } - -class_alias(InstallerTagPass::class, 'EzSystems\PlatformInstallerBundle\DependencyInjection\Compiler\InstallerTagPass'); diff --git a/src/bundle/RepositoryInstaller/DependencyInjection/IbexaRepositoryInstallerExtension.php b/src/bundle/RepositoryInstaller/DependencyInjection/IbexaRepositoryInstallerExtension.php index dae6b66a7e..a5c61cf0f8 100644 --- a/src/bundle/RepositoryInstaller/DependencyInjection/IbexaRepositoryInstallerExtension.php +++ b/src/bundle/RepositoryInstaller/DependencyInjection/IbexaRepositoryInstallerExtension.php @@ -20,5 +20,3 @@ public function load(array $configs, ContainerBuilder $container) $loader->load('services.yml'); } } - -class_alias(IbexaRepositoryInstallerExtension::class, 'EzSystems\PlatformInstallerBundle\DependencyInjection\EzSystemsPlatformInstallerExtension'); diff --git a/src/bundle/RepositoryInstaller/Event/Subscriber/BuildSchemaSubscriber.php b/src/bundle/RepositoryInstaller/Event/Subscriber/BuildSchemaSubscriber.php index b886bbbcd9..46ee5f4437 100644 --- a/src/bundle/RepositoryInstaller/Event/Subscriber/BuildSchemaSubscriber.php +++ b/src/bundle/RepositoryInstaller/Event/Subscriber/BuildSchemaSubscriber.php @@ -47,5 +47,3 @@ public function onBuildSchema(SchemaBuilderEvent $event): void ->importSchemaFromFile($this->schemaFilePath); } } - -class_alias(BuildSchemaSubscriber::class, 'EzSystems\PlatformInstallerBundle\Event\Subscriber\BuildSchemaSubscriber'); diff --git a/src/bundle/RepositoryInstaller/IbexaRepositoryInstallerBundle.php b/src/bundle/RepositoryInstaller/IbexaRepositoryInstallerBundle.php index 497b7c21ad..3e8a553fd9 100644 --- a/src/bundle/RepositoryInstaller/IbexaRepositoryInstallerBundle.php +++ b/src/bundle/RepositoryInstaller/IbexaRepositoryInstallerBundle.php @@ -33,5 +33,3 @@ public function build(ContainerBuilder $container) $container->addCompilerPass(new InstallerTagPass()); } } - -class_alias(IbexaRepositoryInstallerBundle::class, 'EzSystems\PlatformInstallerBundle\EzSystemsPlatformInstallerBundle'); diff --git a/src/bundle/RepositoryInstaller/Installer/CoreInstaller.php b/src/bundle/RepositoryInstaller/Installer/CoreInstaller.php index 6b05899ffe..4b4ffb6bb4 100644 --- a/src/bundle/RepositoryInstaller/Installer/CoreInstaller.php +++ b/src/bundle/RepositoryInstaller/Installer/CoreInstaller.php @@ -125,5 +125,3 @@ public function createConfiguration() { } } - -class_alias(CoreInstaller::class, 'EzSystems\PlatformInstallerBundle\Installer\CoreInstaller'); diff --git a/src/bundle/RepositoryInstaller/Installer/DbBasedInstaller.php b/src/bundle/RepositoryInstaller/Installer/DbBasedInstaller.php index 06a21973b0..9188a527f0 100644 --- a/src/bundle/RepositoryInstaller/Installer/DbBasedInstaller.php +++ b/src/bundle/RepositoryInstaller/Installer/DbBasedInstaller.php @@ -105,5 +105,3 @@ final protected function getKernelSQLFileForDBMS($relativeFilePath) return realpath($filePath); } } - -class_alias(DbBasedInstaller::class, 'EzSystems\PlatformInstallerBundle\Installer\DbBasedInstaller'); diff --git a/src/bundle/RepositoryInstaller/Installer/Installer.php b/src/bundle/RepositoryInstaller/Installer/Installer.php index 80640b6a90..5318ea42b6 100644 --- a/src/bundle/RepositoryInstaller/Installer/Installer.php +++ b/src/bundle/RepositoryInstaller/Installer/Installer.php @@ -37,5 +37,3 @@ public function createConfiguration(); */ public function importBinaries(); } - -class_alias(Installer::class, 'EzSystems\PlatformInstallerBundle\Installer\Installer'); diff --git a/src/contracts/Container.php b/src/contracts/Container.php index 29856c9771..5605a97d9c 100644 --- a/src/contracts/Container.php +++ b/src/contracts/Container.php @@ -23,5 +23,3 @@ interface Container */ public function getRepository(); } - -class_alias(Container::class, 'eZ\Publish\API\Container'); diff --git a/src/contracts/Exception/InvalidArgumentException.php b/src/contracts/Exception/InvalidArgumentException.php index 73fcdd53df..dc617ec4f7 100644 --- a/src/contracts/Exception/InvalidArgumentException.php +++ b/src/contracts/Exception/InvalidArgumentException.php @@ -32,5 +32,3 @@ public function __construct(string $argumentName, string $whatIsWrong, Exception parent::__construct($message, 0, $previous); } } - -class_alias(InvalidArgumentException::class, 'eZ\Publish\SPI\Exception\InvalidArgumentException'); diff --git a/src/contracts/Exception/InvalidArgumentType.php b/src/contracts/Exception/InvalidArgumentType.php index 35b78d3efe..95f0984d1c 100644 --- a/src/contracts/Exception/InvalidArgumentType.php +++ b/src/contracts/Exception/InvalidArgumentType.php @@ -37,5 +37,3 @@ public function __construct(string $argumentName, string $expectedType, $value = parent::__construct($argumentName, $whatIsWrong, $previous); } } - -class_alias(InvalidArgumentType::class, 'eZ\Publish\SPI\Exception\InvalidArgumentType'); diff --git a/src/contracts/FieldType/BinaryBase/PathGenerator.php b/src/contracts/FieldType/BinaryBase/PathGenerator.php index db5f9fac26..637f385d34 100644 --- a/src/contracts/FieldType/BinaryBase/PathGenerator.php +++ b/src/contracts/FieldType/BinaryBase/PathGenerator.php @@ -17,5 +17,3 @@ abstract class PathGenerator implements PathGeneratorInterface { abstract public function getStoragePathForField(Field $field, VersionInfo $versionInfo); } - -class_alias(PathGenerator::class, 'eZ\Publish\SPI\FieldType\BinaryBase\PathGenerator'); diff --git a/src/contracts/FieldType/BinaryBase/PathGeneratorInterface.php b/src/contracts/FieldType/BinaryBase/PathGeneratorInterface.php index 181977cb88..df92a6b47d 100644 --- a/src/contracts/FieldType/BinaryBase/PathGeneratorInterface.php +++ b/src/contracts/FieldType/BinaryBase/PathGeneratorInterface.php @@ -15,5 +15,3 @@ interface PathGeneratorInterface { public function getStoragePathForField(Field $field, VersionInfo $versionInfo); } - -class_alias(PathGeneratorInterface::class, 'eZ\Publish\SPI\FieldType\BinaryBase\PathGeneratorInterface'); diff --git a/src/contracts/FieldType/BinaryBase/RouteAwarePathGenerator.php b/src/contracts/FieldType/BinaryBase/RouteAwarePathGenerator.php index a77784c4e2..0d0e5d9fae 100644 --- a/src/contracts/FieldType/BinaryBase/RouteAwarePathGenerator.php +++ b/src/contracts/FieldType/BinaryBase/RouteAwarePathGenerator.php @@ -22,5 +22,3 @@ public function getParameters(Field $field, VersionInfo $versionInfo): array; public function generate(string $route, array $parameters = []): string; } - -class_alias(RouteAwarePathGenerator::class, 'eZ\Publish\SPI\FieldType\BinaryBase\RouteAwarePathGenerator'); diff --git a/src/contracts/FieldType/Comparable.php b/src/contracts/FieldType/Comparable.php index 401df31d1a..14d65b8d4f 100644 --- a/src/contracts/FieldType/Comparable.php +++ b/src/contracts/FieldType/Comparable.php @@ -12,5 +12,3 @@ interface Comparable { public function valuesEqual(Value $value1, Value $value2): bool; } - -class_alias(Comparable::class, 'eZ\Publish\SPI\FieldType\Comparable'); diff --git a/src/contracts/FieldType/FieldStorage.php b/src/contracts/FieldType/FieldStorage.php index 20b15013f3..42568531a3 100644 --- a/src/contracts/FieldType/FieldStorage.php +++ b/src/contracts/FieldType/FieldStorage.php @@ -89,5 +89,3 @@ public function hasFieldData(); */ public function getIndexData(VersionInfo $versionInfo, Field $field, array $context); } - -class_alias(FieldStorage::class, 'eZ\Publish\SPI\FieldType\FieldStorage'); diff --git a/src/contracts/FieldType/FieldType.php b/src/contracts/FieldType/FieldType.php index f193c9b535..5cdb9f6cbb 100644 --- a/src/contracts/FieldType/FieldType.php +++ b/src/contracts/FieldType/FieldType.php @@ -380,5 +380,3 @@ abstract public function fromPersistenceValue(FieldValue $fieldValue); */ abstract public function getRelations(Value $value); } - -class_alias(FieldType::class, 'eZ\Publish\SPI\FieldType\FieldType'); diff --git a/src/contracts/FieldType/GatewayBasedStorage.php b/src/contracts/FieldType/GatewayBasedStorage.php index bacb073f6e..b4cc5d313b 100644 --- a/src/contracts/FieldType/GatewayBasedStorage.php +++ b/src/contracts/FieldType/GatewayBasedStorage.php @@ -55,5 +55,3 @@ public function copyLegacyField(VersionInfo $versionInfo, Field $field, Field $o return $this->storeFieldData($versionInfo, $field, $context); } } - -class_alias(GatewayBasedStorage::class, 'eZ\Publish\SPI\FieldType\GatewayBasedStorage'); diff --git a/src/contracts/FieldType/Generic/Type.php b/src/contracts/FieldType/Generic/Type.php index aa0028cd67..74626118cf 100644 --- a/src/contracts/FieldType/Generic/Type.php +++ b/src/contracts/FieldType/Generic/Type.php @@ -357,5 +357,3 @@ public function getRelations(Value $value): array return []; } } - -class_alias(Type::class, 'eZ\Publish\SPI\FieldType\Generic\Type'); diff --git a/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php b/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php index a7f63aa101..ce3b46643c 100644 --- a/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php +++ b/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php @@ -56,5 +56,3 @@ public function getTarget(): string return $this->target; } } - -class_alias(ConstraintViolationAdapter::class, 'eZ\Publish\SPI\FieldType\Generic\ValidationError\ConstraintViolationAdapter'); diff --git a/src/contracts/FieldType/Indexable.php b/src/contracts/FieldType/Indexable.php index 4bc7eda331..879c1ca09f 100644 --- a/src/contracts/FieldType/Indexable.php +++ b/src/contracts/FieldType/Indexable.php @@ -55,5 +55,3 @@ public function getDefaultMatchField(); */ public function getDefaultSortField(); } - -class_alias(Indexable::class, 'eZ\Publish\SPI\FieldType\Indexable'); diff --git a/src/contracts/FieldType/StorageGateway.php b/src/contracts/FieldType/StorageGateway.php index 5219135508..80f40d3d7c 100644 --- a/src/contracts/FieldType/StorageGateway.php +++ b/src/contracts/FieldType/StorageGateway.php @@ -25,5 +25,3 @@ protected function getSequenceName($table, $column) return sprintf('%s_%s_seq', $table, $column); } } - -class_alias(StorageGateway::class, 'eZ\Publish\SPI\FieldType\StorageGateway'); diff --git a/src/contracts/FieldType/ValidationError.php b/src/contracts/FieldType/ValidationError.php index a303afc89f..310728ba31 100644 --- a/src/contracts/FieldType/ValidationError.php +++ b/src/contracts/FieldType/ValidationError.php @@ -39,5 +39,3 @@ public function setTarget($target); */ public function getTarget(); } - -class_alias(ValidationError::class, 'eZ\Publish\SPI\FieldType\ValidationError'); diff --git a/src/contracts/FieldType/ValidationError/AbstractValidationError.php b/src/contracts/FieldType/ValidationError/AbstractValidationError.php index 6126bc18b1..ba7bf17c7b 100644 --- a/src/contracts/FieldType/ValidationError/AbstractValidationError.php +++ b/src/contracts/FieldType/ValidationError/AbstractValidationError.php @@ -55,5 +55,3 @@ public function getTarget(): string return $this->target; } } - -class_alias(AbstractValidationError::class, 'eZ\Publish\SPI\FieldType\ValidationError\AbstractValidationError'); diff --git a/src/contracts/FieldType/ValidationError/NonConfigurableValidationError.php b/src/contracts/FieldType/ValidationError/NonConfigurableValidationError.php index 979902fdf5..97daa6c83a 100644 --- a/src/contracts/FieldType/ValidationError/NonConfigurableValidationError.php +++ b/src/contracts/FieldType/ValidationError/NonConfigurableValidationError.php @@ -21,5 +21,3 @@ public function __construct(string $fieldTypeValidatorIdentifier, string $target ); } } - -class_alias(NonConfigurableValidationError::class, 'eZ\Publish\SPI\FieldType\ValidationError\NonConfigurableValidationError'); diff --git a/src/contracts/FieldType/ValidationError/UnknownValidatorValidationError.php b/src/contracts/FieldType/ValidationError/UnknownValidatorValidationError.php index 6c0f577909..2b51304f55 100644 --- a/src/contracts/FieldType/ValidationError/UnknownValidatorValidationError.php +++ b/src/contracts/FieldType/ValidationError/UnknownValidatorValidationError.php @@ -21,5 +21,3 @@ public function __construct(string $validatorIdentifier, string $target) ); } } - -class_alias(UnknownValidatorValidationError::class, 'eZ\Publish\SPI\FieldType\ValidationError\UnknownValidatorValidationError'); diff --git a/src/contracts/FieldType/Value.php b/src/contracts/FieldType/Value.php index 3a9e92c316..6b5a2d4517 100644 --- a/src/contracts/FieldType/Value.php +++ b/src/contracts/FieldType/Value.php @@ -19,5 +19,3 @@ interface Value */ public function __toString(); } - -class_alias(Value::class, 'eZ\Publish\SPI\FieldType\Value'); diff --git a/src/contracts/FieldType/ValueSerializerInterface.php b/src/contracts/FieldType/ValueSerializerInterface.php index 45d67a62de..d8b7052f09 100644 --- a/src/contracts/FieldType/ValueSerializerInterface.php +++ b/src/contracts/FieldType/ValueSerializerInterface.php @@ -51,5 +51,3 @@ public function encode(?array $data, array $context = []): ?string; */ public function decode(?string $data, array $context = []): ?array; } - -class_alias(ValueSerializerInterface::class, 'eZ\Publish\SPI\FieldType\ValueSerializerInterface'); diff --git a/src/contracts/HashGenerator.php b/src/contracts/HashGenerator.php index 5aa871674f..18274c244a 100644 --- a/src/contracts/HashGenerator.php +++ b/src/contracts/HashGenerator.php @@ -16,5 +16,3 @@ interface HashGenerator */ public function generate(); } - -class_alias(HashGenerator::class, 'eZ\Publish\SPI\HashGenerator'); diff --git a/src/contracts/IO/BinaryFile.php b/src/contracts/IO/BinaryFile.php index eaec6c39e0..45dcb7aa28 100644 --- a/src/contracts/IO/BinaryFile.php +++ b/src/contracts/IO/BinaryFile.php @@ -55,5 +55,3 @@ class BinaryFile */ public $mimeType; } - -class_alias(BinaryFile::class, 'eZ\Publish\SPI\IO\BinaryFile'); diff --git a/src/contracts/IO/BinaryFileCreateStruct.php b/src/contracts/IO/BinaryFileCreateStruct.php index cda1528408..01621157a1 100644 --- a/src/contracts/IO/BinaryFileCreateStruct.php +++ b/src/contracts/IO/BinaryFileCreateStruct.php @@ -67,5 +67,3 @@ public function setInputStream($inputStream) $this->inputStream = $inputStream; } } - -class_alias(BinaryFileCreateStruct::class, 'eZ\Publish\SPI\IO\BinaryFileCreateStruct'); diff --git a/src/contracts/IO/MimeTypeDetector.php b/src/contracts/IO/MimeTypeDetector.php index cda2100fe6..7f8885c834 100644 --- a/src/contracts/IO/MimeTypeDetector.php +++ b/src/contracts/IO/MimeTypeDetector.php @@ -27,5 +27,3 @@ public function getFromPath($path); */ public function getFromBuffer($buffer); } - -class_alias(MimeTypeDetector::class, 'eZ\Publish\SPI\IO\MimeTypeDetector'); diff --git a/src/contracts/Limitation/Target.php b/src/contracts/Limitation/Target.php index 0f4b6f4404..c54066a18c 100644 --- a/src/contracts/Limitation/Target.php +++ b/src/contracts/Limitation/Target.php @@ -18,5 +18,3 @@ interface Target { } - -class_alias(Target::class, 'eZ\Publish\SPI\Limitation\Target'); diff --git a/src/contracts/Limitation/Target/Builder/VersionBuilder.php b/src/contracts/Limitation/Target/Builder/VersionBuilder.php index baff618ec0..d852793a44 100644 --- a/src/contracts/Limitation/Target/Builder/VersionBuilder.php +++ b/src/contracts/Limitation/Target/Builder/VersionBuilder.php @@ -157,5 +157,3 @@ public function publishTranslations(array $languageCodes): self return $this; } } - -class_alias(VersionBuilder::class, 'eZ\Publish\SPI\Limitation\Target\Builder\VersionBuilder'); diff --git a/src/contracts/Limitation/Target/Version.php b/src/contracts/Limitation/Target/Version.php index 196dae3949..388a368342 100644 --- a/src/contracts/Limitation/Target/Version.php +++ b/src/contracts/Limitation/Target/Version.php @@ -98,5 +98,3 @@ public function getTranslationsToDelete(): array return $this->translationsToDelete; } } - -class_alias(Version::class, 'eZ\Publish\SPI\Limitation\Target\Version'); diff --git a/src/contracts/Limitation/TargetAwareType.php b/src/contracts/Limitation/TargetAwareType.php index de65652542..413a69de69 100644 --- a/src/contracts/Limitation/TargetAwareType.php +++ b/src/contracts/Limitation/TargetAwareType.php @@ -42,5 +42,3 @@ public function evaluate( array $targets = null ): ?bool; } - -class_alias(TargetAwareType::class, 'eZ\Publish\SPI\Limitation\TargetAwareType'); diff --git a/src/contracts/Limitation/Type.php b/src/contracts/Limitation/Type.php index 04d6a92554..c6f3ac801b 100644 --- a/src/contracts/Limitation/Type.php +++ b/src/contracts/Limitation/Type.php @@ -119,5 +119,3 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren */ public function valueSchema(); } - -class_alias(Type::class, 'eZ\Publish\SPI\Limitation\Type'); diff --git a/src/contracts/MVC/EventSubscriber/ConfigScopeChangeSubscriber.php b/src/contracts/MVC/EventSubscriber/ConfigScopeChangeSubscriber.php index 18cdb0a38f..2f86517477 100644 --- a/src/contracts/MVC/EventSubscriber/ConfigScopeChangeSubscriber.php +++ b/src/contracts/MVC/EventSubscriber/ConfigScopeChangeSubscriber.php @@ -17,5 +17,3 @@ interface ConfigScopeChangeSubscriber { public function onConfigScopeChange(ScopeChangeEvent $event): void; } - -class_alias(ConfigScopeChangeSubscriber::class, 'eZ\Publish\SPI\MVC\EventSubscriber\ConfigScopeChangeSubscriber'); diff --git a/src/contracts/MVC/Templating/BaseRenderStrategy.php b/src/contracts/MVC/Templating/BaseRenderStrategy.php index b88eb13acd..a317356242 100644 --- a/src/contracts/MVC/Templating/BaseRenderStrategy.php +++ b/src/contracts/MVC/Templating/BaseRenderStrategy.php @@ -54,5 +54,3 @@ protected function getFragmentRenderer(string $name): FragmentRendererInterface return $this->fragmentRenderers[$name]; } } - -class_alias(BaseRenderStrategy::class, 'eZ\Publish\SPI\MVC\Templating\BaseRenderStrategy'); diff --git a/src/contracts/MVC/Templating/RenderStrategy.php b/src/contracts/MVC/Templating/RenderStrategy.php index 94df12f6fb..91b16e8bf6 100644 --- a/src/contracts/MVC/Templating/RenderStrategy.php +++ b/src/contracts/MVC/Templating/RenderStrategy.php @@ -23,5 +23,3 @@ public function supports(ValueObject $valueObject): bool; public function render(ValueObject $valueObject, RenderOptions $options): string; } - -class_alias(RenderStrategy::class, 'eZ\Publish\SPI\MVC\Templating\RenderStrategy'); diff --git a/src/contracts/MVC/View/VariableProvider.php b/src/contracts/MVC/View/VariableProvider.php index 08df982900..187a5ccddf 100644 --- a/src/contracts/MVC/View/VariableProvider.php +++ b/src/contracts/MVC/View/VariableProvider.php @@ -16,5 +16,3 @@ public function getIdentifier(): string; public function getTwigVariables(View $view, array $options = []): object; } - -class_alias(VariableProvider::class, 'eZ\Publish\SPI\MVC\View\VariableProvider'); diff --git a/src/contracts/Options/MutableOptionsBag.php b/src/contracts/Options/MutableOptionsBag.php index 746bdaffbf..6e688abefc 100644 --- a/src/contracts/Options/MutableOptionsBag.php +++ b/src/contracts/Options/MutableOptionsBag.php @@ -17,5 +17,3 @@ public function set(string $key, $value): void; public function remove(string $key): void; } - -class_alias(MutableOptionsBag::class, 'eZ\Publish\SPI\Options\MutableOptionsBag'); diff --git a/src/contracts/Options/OptionsBag.php b/src/contracts/Options/OptionsBag.php index 715108f086..440921c67e 100644 --- a/src/contracts/Options/OptionsBag.php +++ b/src/contracts/Options/OptionsBag.php @@ -21,5 +21,3 @@ public function get(string $key, $default = null); public function has(string $key): bool; } - -class_alias(OptionsBag::class, 'eZ\Publish\SPI\Options\OptionsBag'); diff --git a/src/contracts/Persistence/Bookmark/Bookmark.php b/src/contracts/Persistence/Bookmark/Bookmark.php index eed036b4a8..e1d7fbbe9a 100644 --- a/src/contracts/Persistence/Bookmark/Bookmark.php +++ b/src/contracts/Persistence/Bookmark/Bookmark.php @@ -42,5 +42,3 @@ class Bookmark extends ValueObject */ public $userId; } - -class_alias(Bookmark::class, 'eZ\Publish\SPI\Persistence\Bookmark\Bookmark'); diff --git a/src/contracts/Persistence/Bookmark/CreateStruct.php b/src/contracts/Persistence/Bookmark/CreateStruct.php index b80bbf1056..8949a24920 100644 --- a/src/contracts/Persistence/Bookmark/CreateStruct.php +++ b/src/contracts/Persistence/Bookmark/CreateStruct.php @@ -35,5 +35,3 @@ class CreateStruct extends ValueObject */ public $userId; } - -class_alias(CreateStruct::class, 'eZ\Publish\SPI\Persistence\Bookmark\CreateStruct'); diff --git a/src/contracts/Persistence/Bookmark/Handler.php b/src/contracts/Persistence/Bookmark/Handler.php index f9ef1a1cae..92aa9ccaa6 100644 --- a/src/contracts/Persistence/Bookmark/Handler.php +++ b/src/contracts/Persistence/Bookmark/Handler.php @@ -77,5 +77,3 @@ public function countUserBookmarks(int $userId): int; */ public function locationSwapped(int $location1Id, int $location2Id): void; } - -class_alias(Handler::class, 'eZ\Publish\SPI\Persistence\Bookmark\Handler'); diff --git a/src/contracts/Persistence/Content.php b/src/contracts/Persistence/Content.php index fbcbda583c..5036309885 100644 --- a/src/contracts/Persistence/Content.php +++ b/src/contracts/Persistence/Content.php @@ -30,5 +30,3 @@ class Content extends ValueObject */ public $fields; } - -class_alias(Content::class, 'eZ\Publish\SPI\Persistence\Content'); diff --git a/src/contracts/Persistence/Content/ContentInfo.php b/src/contracts/Persistence/Content/ContentInfo.php index 22a73c1f8f..fd1d5fa6f5 100644 --- a/src/contracts/Persistence/Content/ContentInfo.php +++ b/src/contracts/Persistence/Content/ContentInfo.php @@ -136,5 +136,3 @@ class ContentInfo extends ValueObject */ public $isHidden = false; } - -class_alias(ContentInfo::class, 'eZ\Publish\SPI\Persistence\Content\ContentInfo'); diff --git a/src/contracts/Persistence/Content/ContentItem.php b/src/contracts/Persistence/Content/ContentItem.php index 609df1b058..2870797717 100644 --- a/src/contracts/Persistence/Content/ContentItem.php +++ b/src/contracts/Persistence/Content/ContentItem.php @@ -55,5 +55,3 @@ public function getType(): Type return $this->type; } } - -class_alias(ContentItem::class, 'eZ\Publish\SPI\Persistence\Content\ContentItem'); diff --git a/src/contracts/Persistence/Content/CreateStruct.php b/src/contracts/Persistence/Content/CreateStruct.php index 11f604020a..d0fbcd214c 100644 --- a/src/contracts/Persistence/Content/CreateStruct.php +++ b/src/contracts/Persistence/Content/CreateStruct.php @@ -79,5 +79,3 @@ class CreateStruct extends ValueObject */ public $isHidden; } - -class_alias(CreateStruct::class, 'eZ\Publish\SPI\Persistence\Content\CreateStruct'); diff --git a/src/contracts/Persistence/Content/Field.php b/src/contracts/Persistence/Content/Field.php index 94f844f868..85b5d40bc1 100644 --- a/src/contracts/Persistence/Content/Field.php +++ b/src/contracts/Persistence/Content/Field.php @@ -65,5 +65,3 @@ public function __clone() $this->value = clone $this->value; } } - -class_alias(Field::class, 'eZ\Publish\SPI\Persistence\Content\Field'); diff --git a/src/contracts/Persistence/Content/FieldTypeConstraints.php b/src/contracts/Persistence/Content/FieldTypeConstraints.php index e4b59f7226..2132c5620f 100644 --- a/src/contracts/Persistence/Content/FieldTypeConstraints.php +++ b/src/contracts/Persistence/Content/FieldTypeConstraints.php @@ -37,5 +37,3 @@ class FieldTypeConstraints extends ValueObject */ public $fieldSettings; } - -class_alias(FieldTypeConstraints::class, 'eZ\Publish\SPI\Persistence\Content\FieldTypeConstraints'); diff --git a/src/contracts/Persistence/Content/FieldValue.php b/src/contracts/Persistence/Content/FieldValue.php index 816229b7fa..2c47ad973d 100644 --- a/src/contracts/Persistence/Content/FieldValue.php +++ b/src/contracts/Persistence/Content/FieldValue.php @@ -47,5 +47,3 @@ class FieldValue extends ValueObject */ public $sortKey; } - -class_alias(FieldValue::class, 'eZ\Publish\SPI\Persistence\Content\FieldValue'); diff --git a/src/contracts/Persistence/Content/Handler.php b/src/contracts/Persistence/Content/Handler.php index 4c2a573bbf..9a1226a05d 100644 --- a/src/contracts/Persistence/Content/Handler.php +++ b/src/contracts/Persistence/Content/Handler.php @@ -404,5 +404,3 @@ public function deleteTranslationFromDraft($contentId, $versionNo, $languageCode */ public function loadVersionInfoList(array $contentIds): array; } - -class_alias(Handler::class, 'eZ\Publish\SPI\Persistence\Content\Handler'); diff --git a/src/contracts/Persistence/Content/Language.php b/src/contracts/Persistence/Content/Language.php index 47620294b5..a61e571ee1 100644 --- a/src/contracts/Persistence/Content/Language.php +++ b/src/contracts/Persistence/Content/Language.php @@ -42,5 +42,3 @@ class Language extends ValueObject */ public $isEnabled = true; } - -class_alias(Language::class, 'eZ\Publish\SPI\Persistence\Content\Language'); diff --git a/src/contracts/Persistence/Content/Language/CreateStruct.php b/src/contracts/Persistence/Content/Language/CreateStruct.php index 0fd75c6b44..eacc58fb95 100644 --- a/src/contracts/Persistence/Content/Language/CreateStruct.php +++ b/src/contracts/Persistence/Content/Language/CreateStruct.php @@ -35,5 +35,3 @@ class CreateStruct extends ValueObject */ public $isEnabled = true; } - -class_alias(CreateStruct::class, 'eZ\Publish\SPI\Persistence\Content\Language\CreateStruct'); diff --git a/src/contracts/Persistence/Content/Language/Handler.php b/src/contracts/Persistence/Content/Language/Handler.php index 68e919aa39..562d8654ee 100644 --- a/src/contracts/Persistence/Content/Language/Handler.php +++ b/src/contracts/Persistence/Content/Language/Handler.php @@ -94,5 +94,3 @@ public function loadAll(); */ public function delete($id); } - -class_alias(Handler::class, 'eZ\Publish\SPI\Persistence\Content\Language\Handler'); diff --git a/src/contracts/Persistence/Content/LoadStruct.php b/src/contracts/Persistence/Content/LoadStruct.php index fe17b360ca..9b1c2b1390 100644 --- a/src/contracts/Persistence/Content/LoadStruct.php +++ b/src/contracts/Persistence/Content/LoadStruct.php @@ -47,5 +47,3 @@ class LoadStruct extends ValueObject */ public $languages = []; } - -class_alias(LoadStruct::class, 'eZ\Publish\SPI\Persistence\Content\LoadStruct'); diff --git a/src/contracts/Persistence/Content/Location.php b/src/contracts/Persistence/Content/Location.php index 14f96f4926..0c7d9c226c 100644 --- a/src/contracts/Persistence/Content/Location.php +++ b/src/contracts/Persistence/Content/Location.php @@ -132,5 +132,3 @@ class Location extends ValueObject */ public $sortOrder; } - -class_alias(Location::class, 'eZ\Publish\SPI\Persistence\Content\Location'); diff --git a/src/contracts/Persistence/Content/Location/CreateStruct.php b/src/contracts/Persistence/Content/Location/CreateStruct.php index f010073acd..14175722e4 100644 --- a/src/contracts/Persistence/Content/Location/CreateStruct.php +++ b/src/contracts/Persistence/Content/Location/CreateStruct.php @@ -113,5 +113,3 @@ class CreateStruct extends ValueObject */ public $parentId; } - -class_alias(CreateStruct::class, 'eZ\Publish\SPI\Persistence\Content\Location\CreateStruct'); diff --git a/src/contracts/Persistence/Content/Location/Handler.php b/src/contracts/Persistence/Content/Location/Handler.php index 8f143ffc7a..5a0d45abbe 100644 --- a/src/contracts/Persistence/Content/Location/Handler.php +++ b/src/contracts/Persistence/Content/Location/Handler.php @@ -259,5 +259,3 @@ public function loadAllLocations($offset, $limit); */ public function countLocationsByContent(int $contentId): int; } - -class_alias(Handler::class, 'eZ\Publish\SPI\Persistence\Content\Location\Handler'); diff --git a/src/contracts/Persistence/Content/Location/Trash/Handler.php b/src/contracts/Persistence/Content/Location/Trash/Handler.php index e97e3a841c..5ba69c3ebd 100644 --- a/src/contracts/Persistence/Content/Location/Trash/Handler.php +++ b/src/contracts/Persistence/Content/Location/Trash/Handler.php @@ -92,5 +92,3 @@ public function emptyTrash(); */ public function deleteTrashItem($trashedId); } - -class_alias(Handler::class, 'eZ\Publish\SPI\Persistence\Content\Location\Trash\Handler'); diff --git a/src/contracts/Persistence/Content/Location/Trash/TrashResult.php b/src/contracts/Persistence/Content/Location/Trash/TrashResult.php index 7eae9c17b2..9a16990698 100644 --- a/src/contracts/Persistence/Content/Location/Trash/TrashResult.php +++ b/src/contracts/Persistence/Content/Location/Trash/TrashResult.php @@ -34,5 +34,3 @@ public function getIterator(): \Traversable return new ArrayIterator($this->items); } } - -class_alias(TrashResult::class, 'eZ\Publish\SPI\Persistence\Content\Location\Trash\TrashResult'); diff --git a/src/contracts/Persistence/Content/Location/Trashed.php b/src/contracts/Persistence/Content/Location/Trashed.php index 8688fc6878..12a8f0c1f2 100644 --- a/src/contracts/Persistence/Content/Location/Trashed.php +++ b/src/contracts/Persistence/Content/Location/Trashed.php @@ -24,5 +24,3 @@ class Trashed extends Location /** @var array Location ID to a Content ID map of removed items */ public array $removedLocationContentIdMap = []; } - -class_alias(Trashed::class, 'eZ\Publish\SPI\Persistence\Content\Location\Trashed'); diff --git a/src/contracts/Persistence/Content/Location/UpdateStruct.php b/src/contracts/Persistence/Content/Location/UpdateStruct.php index 7c910d38a3..17a35318a8 100644 --- a/src/contracts/Persistence/Content/Location/UpdateStruct.php +++ b/src/contracts/Persistence/Content/Location/UpdateStruct.php @@ -48,5 +48,3 @@ class UpdateStruct extends ValueObject */ public $sortOrder; } - -class_alias(UpdateStruct::class, 'eZ\Publish\SPI\Persistence\Content\Location\UpdateStruct'); diff --git a/src/contracts/Persistence/Content/LocationWithContentInfo.php b/src/contracts/Persistence/Content/LocationWithContentInfo.php index 753b8d6532..d792da8928 100644 --- a/src/contracts/Persistence/Content/LocationWithContentInfo.php +++ b/src/contracts/Persistence/Content/LocationWithContentInfo.php @@ -45,5 +45,3 @@ public function getContentInfo(): ContentInfo return $this->contentInfo; } } - -class_alias(LocationWithContentInfo::class, 'eZ\Publish\SPI\Persistence\Content\LocationWithContentInfo'); diff --git a/src/contracts/Persistence/Content/MetadataUpdateStruct.php b/src/contracts/Persistence/Content/MetadataUpdateStruct.php index 40b39ffbad..8c039f6374 100644 --- a/src/contracts/Persistence/Content/MetadataUpdateStruct.php +++ b/src/contracts/Persistence/Content/MetadataUpdateStruct.php @@ -69,5 +69,3 @@ class MetadataUpdateStruct extends ValueObject */ public $isHidden; } - -class_alias(MetadataUpdateStruct::class, 'eZ\Publish\SPI\Persistence\Content\MetadataUpdateStruct'); diff --git a/src/contracts/Persistence/Content/ObjectState.php b/src/contracts/Persistence/Content/ObjectState.php index 816795d347..569cbd3323 100644 --- a/src/contracts/Persistence/Content/ObjectState.php +++ b/src/contracts/Persistence/Content/ObjectState.php @@ -80,5 +80,3 @@ class ObjectState extends ValueObject */ public $description; } - -class_alias(ObjectState::class, 'eZ\Publish\SPI\Persistence\Content\ObjectState'); diff --git a/src/contracts/Persistence/Content/ObjectState/Group.php b/src/contracts/Persistence/Content/ObjectState/Group.php index a17bd121e8..c53ced32d8 100644 --- a/src/contracts/Persistence/Content/ObjectState/Group.php +++ b/src/contracts/Persistence/Content/ObjectState/Group.php @@ -66,5 +66,3 @@ class Group extends ValueObject */ public $description; } - -class_alias(Group::class, 'eZ\Publish\SPI\Persistence\Content\ObjectState\Group'); diff --git a/src/contracts/Persistence/Content/ObjectState/Handler.php b/src/contracts/Persistence/Content/ObjectState/Handler.php index 6138e0561f..6452e2e262 100644 --- a/src/contracts/Persistence/Content/ObjectState/Handler.php +++ b/src/contracts/Persistence/Content/ObjectState/Handler.php @@ -173,5 +173,3 @@ public function getContentState($contentId, $stateGroupId); */ public function getContentCount($stateId); } - -class_alias(Handler::class, 'eZ\Publish\SPI\Persistence\Content\ObjectState\Handler'); diff --git a/src/contracts/Persistence/Content/ObjectState/InputStruct.php b/src/contracts/Persistence/Content/ObjectState/InputStruct.php index ac95a1f504..5b802f7dae 100644 --- a/src/contracts/Persistence/Content/ObjectState/InputStruct.php +++ b/src/contracts/Persistence/Content/ObjectState/InputStruct.php @@ -52,5 +52,3 @@ class InputStruct extends ValueObject */ public $description; } - -class_alias(InputStruct::class, 'eZ\Publish\SPI\Persistence\Content\ObjectState\InputStruct'); diff --git a/src/contracts/Persistence/Content/Relation.php b/src/contracts/Persistence/Content/Relation.php index 7418b070d1..1fa1114139 100644 --- a/src/contracts/Persistence/Content/Relation.php +++ b/src/contracts/Persistence/Content/Relation.php @@ -62,5 +62,3 @@ class Relation extends ValueObject */ public $type; } - -class_alias(Relation::class, 'eZ\Publish\SPI\Persistence\Content\Relation'); diff --git a/src/contracts/Persistence/Content/Relation/CreateStruct.php b/src/contracts/Persistence/Content/Relation/CreateStruct.php index 8de92e6625..a4b8b3e2be 100644 --- a/src/contracts/Persistence/Content/Relation/CreateStruct.php +++ b/src/contracts/Persistence/Content/Relation/CreateStruct.php @@ -54,5 +54,3 @@ class CreateStruct extends ValueObject */ public $type; } - -class_alias(CreateStruct::class, 'eZ\Publish\SPI\Persistence\Content\Relation\CreateStruct'); diff --git a/src/contracts/Persistence/Content/Section.php b/src/contracts/Persistence/Content/Section.php index c465b9c9c0..9fa5fd9992 100644 --- a/src/contracts/Persistence/Content/Section.php +++ b/src/contracts/Persistence/Content/Section.php @@ -32,5 +32,3 @@ class Section extends ValueObject */ public $name; } - -class_alias(Section::class, 'eZ\Publish\SPI\Persistence\Content\Section'); diff --git a/src/contracts/Persistence/Content/Section/Handler.php b/src/contracts/Persistence/Content/Section/Handler.php index e263dfab76..32bfdd3585 100644 --- a/src/contracts/Persistence/Content/Section/Handler.php +++ b/src/contracts/Persistence/Content/Section/Handler.php @@ -108,5 +108,3 @@ public function policiesCount($sectionId); */ public function countRoleAssignmentsUsingSection($sectionId); } - -class_alias(Handler::class, 'eZ\Publish\SPI\Persistence\Content\Section\Handler'); diff --git a/src/contracts/Persistence/Content/Type.php b/src/contracts/Persistence/Content/Type.php index 85df242f45..1a4e9eb447 100644 --- a/src/contracts/Persistence/Content/Type.php +++ b/src/contracts/Persistence/Content/Type.php @@ -190,5 +190,3 @@ class Type extends ValueObject */ public $languageCodes = []; } - -class_alias(Type::class, 'eZ\Publish\SPI\Persistence\Content\Type'); diff --git a/src/contracts/Persistence/Content/Type/CreateStruct.php b/src/contracts/Persistence/Content/Type/CreateStruct.php index 59689e724d..c716b0c682 100644 --- a/src/contracts/Persistence/Content/Type/CreateStruct.php +++ b/src/contracts/Persistence/Content/Type/CreateStruct.php @@ -162,5 +162,3 @@ public function __clone() } } } - -class_alias(CreateStruct::class, 'eZ\Publish\SPI\Persistence\Content\Type\CreateStruct'); diff --git a/src/contracts/Persistence/Content/Type/DeleteByParamsStruct.php b/src/contracts/Persistence/Content/Type/DeleteByParamsStruct.php index 90427da0e3..afb31fbd9e 100644 --- a/src/contracts/Persistence/Content/Type/DeleteByParamsStruct.php +++ b/src/contracts/Persistence/Content/Type/DeleteByParamsStruct.php @@ -21,5 +21,3 @@ class DeleteByParamsStruct extends ValueObject */ public $status; } - -class_alias(DeleteByParamsStruct::class, 'eZ\Publish\SPI\Persistence\Content\Type\DeleteByParamsStruct'); diff --git a/src/contracts/Persistence/Content/Type/FieldDefinition.php b/src/contracts/Persistence/Content/Type/FieldDefinition.php index 54ac445bf6..20dae40ca2 100644 --- a/src/contracts/Persistence/Content/Type/FieldDefinition.php +++ b/src/contracts/Persistence/Content/Type/FieldDefinition.php @@ -135,5 +135,3 @@ public function __construct(array $properties = []) parent::__construct($properties); } } - -class_alias(FieldDefinition::class, 'eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition'); diff --git a/src/contracts/Persistence/Content/Type/Group.php b/src/contracts/Persistence/Content/Type/Group.php index 689966ef51..6d0016cf88 100644 --- a/src/contracts/Persistence/Content/Type/Group.php +++ b/src/contracts/Persistence/Content/Type/Group.php @@ -80,5 +80,3 @@ class Group extends ValueObject */ public $isSystem; } - -class_alias(Group::class, 'eZ\Publish\SPI\Persistence\Content\Type\Group'); diff --git a/src/contracts/Persistence/Content/Type/Group/CreateStruct.php b/src/contracts/Persistence/Content/Type/Group/CreateStruct.php index d8206876c0..05ded2b65e 100644 --- a/src/contracts/Persistence/Content/Type/Group/CreateStruct.php +++ b/src/contracts/Persistence/Content/Type/Group/CreateStruct.php @@ -69,5 +69,3 @@ class CreateStruct extends ValueObject */ public $isSystem = false; } - -class_alias(CreateStruct::class, 'eZ\Publish\SPI\Persistence\Content\Type\Group\CreateStruct'); diff --git a/src/contracts/Persistence/Content/Type/Group/UpdateStruct.php b/src/contracts/Persistence/Content/Type/Group/UpdateStruct.php index f745e09fb3..06ec6acb75 100644 --- a/src/contracts/Persistence/Content/Type/Group/UpdateStruct.php +++ b/src/contracts/Persistence/Content/Type/Group/UpdateStruct.php @@ -62,5 +62,3 @@ class UpdateStruct extends ValueObject */ public $isSystem = false; } - -class_alias(UpdateStruct::class, 'eZ\Publish\SPI\Persistence\Content\Type\Group\UpdateStruct'); diff --git a/src/contracts/Persistence/Content/Type/Handler.php b/src/contracts/Persistence/Content/Type/Handler.php index 6ec5d222a5..2ed1075853 100644 --- a/src/contracts/Persistence/Content/Type/Handler.php +++ b/src/contracts/Persistence/Content/Type/Handler.php @@ -347,5 +347,3 @@ public function removeContentTypeTranslation(int $contentTypeId, string $languag */ public function deleteByUserAndStatus(int $userId, int $status): void; } - -class_alias(Handler::class, 'eZ\Publish\SPI\Persistence\Content\Type\Handler'); diff --git a/src/contracts/Persistence/Content/Type/UpdateStruct.php b/src/contracts/Persistence/Content/Type/UpdateStruct.php index 085b06636f..493546bc4f 100644 --- a/src/contracts/Persistence/Content/Type/UpdateStruct.php +++ b/src/contracts/Persistence/Content/Type/UpdateStruct.php @@ -116,5 +116,3 @@ class UpdateStruct extends ValueObject */ public $defaultAlwaysAvailable; } - -class_alias(UpdateStruct::class, 'eZ\Publish\SPI\Persistence\Content\Type\UpdateStruct'); diff --git a/src/contracts/Persistence/Content/UpdateStruct.php b/src/contracts/Persistence/Content/UpdateStruct.php index 6d9a382f49..6dc3e3d0be 100644 --- a/src/contracts/Persistence/Content/UpdateStruct.php +++ b/src/contracts/Persistence/Content/UpdateStruct.php @@ -43,5 +43,3 @@ class UpdateStruct extends ValueObject */ public $initialLanguageId = false; } - -class_alias(UpdateStruct::class, 'eZ\Publish\SPI\Persistence\Content\UpdateStruct'); diff --git a/src/contracts/Persistence/Content/UrlAlias.php b/src/contracts/Persistence/Content/UrlAlias.php index 67397f7b02..282cfe50d0 100644 --- a/src/contracts/Persistence/Content/UrlAlias.php +++ b/src/contracts/Persistence/Content/UrlAlias.php @@ -104,5 +104,3 @@ class UrlAlias extends ValueObject */ public $forward; } - -class_alias(UrlAlias::class, 'eZ\Publish\SPI\Persistence\Content\UrlAlias'); diff --git a/src/contracts/Persistence/Content/UrlAlias/Handler.php b/src/contracts/Persistence/Content/UrlAlias/Handler.php index eaf439f319..c1a900877e 100644 --- a/src/contracts/Persistence/Content/UrlAlias/Handler.php +++ b/src/contracts/Persistence/Content/UrlAlias/Handler.php @@ -209,5 +209,3 @@ public function deleteCorruptedUrlAliases(); */ public function repairBrokenUrlAliasesForLocation(int $locationId); } - -class_alias(Handler::class, 'eZ\Publish\SPI\Persistence\Content\UrlAlias\Handler'); diff --git a/src/contracts/Persistence/Content/UrlWildcard.php b/src/contracts/Persistence/Content/UrlWildcard.php index 4b46a3f7d1..26916d4292 100644 --- a/src/contracts/Persistence/Content/UrlWildcard.php +++ b/src/contracts/Persistence/Content/UrlWildcard.php @@ -42,5 +42,3 @@ class UrlWildcard extends ValueObject */ public $forward; } - -class_alias(UrlWildcard::class, 'eZ\Publish\SPI\Persistence\Content\UrlWildcard'); diff --git a/src/contracts/Persistence/Content/UrlWildcard/Handler.php b/src/contracts/Persistence/Content/UrlWildcard/Handler.php index 6ee91415aa..a3ef263773 100644 --- a/src/contracts/Persistence/Content/UrlWildcard/Handler.php +++ b/src/contracts/Persistence/Content/UrlWildcard/Handler.php @@ -98,5 +98,3 @@ public function exactSourceUrlExists(string $sourceUrl): bool; */ public function countAll(): int; } - -class_alias(Handler::class, 'eZ\Publish\SPI\Persistence\Content\UrlWildcard\Handler'); diff --git a/src/contracts/Persistence/Content/VersionInfo.php b/src/contracts/Persistence/Content/VersionInfo.php index 9ec5f56422..c8a15df83e 100644 --- a/src/contracts/Persistence/Content/VersionInfo.php +++ b/src/contracts/Persistence/Content/VersionInfo.php @@ -106,5 +106,3 @@ class VersionInfo extends ValueObject */ public $languageCodes = []; } - -class_alias(VersionInfo::class, 'eZ\Publish\SPI\Persistence\Content\VersionInfo'); diff --git a/src/contracts/Persistence/FieldType.php b/src/contracts/Persistence/FieldType.php index 9f00954d12..6df6bdfcc4 100644 --- a/src/contracts/Persistence/FieldType.php +++ b/src/contracts/Persistence/FieldType.php @@ -21,5 +21,3 @@ interface FieldType */ public function getEmptyValue(); } - -class_alias(FieldType::class, 'eZ\Publish\SPI\Persistence\FieldType'); diff --git a/src/contracts/Persistence/FieldType/IsEmptyValue.php b/src/contracts/Persistence/FieldType/IsEmptyValue.php index bb3f21eecb..969bbf59ce 100644 --- a/src/contracts/Persistence/FieldType/IsEmptyValue.php +++ b/src/contracts/Persistence/FieldType/IsEmptyValue.php @@ -23,5 +23,3 @@ interface IsEmptyValue */ public function isEmptyValue(FieldValue $fieldValue): bool; } - -class_alias(IsEmptyValue::class, 'eZ\Publish\SPI\Persistence\FieldType\IsEmptyValue'); diff --git a/src/contracts/Persistence/Filter/Content/Handler.php b/src/contracts/Persistence/Filter/Content/Handler.php index 9038fcfa3e..fde4d03fef 100644 --- a/src/contracts/Persistence/Filter/Content/Handler.php +++ b/src/contracts/Persistence/Filter/Content/Handler.php @@ -24,5 +24,3 @@ public function find(Filter $filter): iterable; public function count(Filter $filter): int; } - -class_alias(Handler::class, 'eZ\Publish\SPI\Persistence\Filter\Content\Handler'); diff --git a/src/contracts/Persistence/Filter/Content/LazyContentItemListIterator.php b/src/contracts/Persistence/Filter/Content/LazyContentItemListIterator.php index 8df13d7919..9fd9e03d77 100644 --- a/src/contracts/Persistence/Filter/Content/LazyContentItemListIterator.php +++ b/src/contracts/Persistence/Filter/Content/LazyContentItemListIterator.php @@ -31,5 +31,3 @@ public function getIterator(): iterable yield from parent::getIterator(); } } - -class_alias(LazyContentItemListIterator::class, 'eZ\Publish\SPI\Persistence\Filter\Content\LazyContentItemListIterator'); diff --git a/src/contracts/Persistence/Filter/CriterionVisitor.php b/src/contracts/Persistence/Filter/CriterionVisitor.php index 768439cfe4..9d3ba0f35b 100644 --- a/src/contracts/Persistence/Filter/CriterionVisitor.php +++ b/src/contracts/Persistence/Filter/CriterionVisitor.php @@ -22,5 +22,3 @@ public function visitCriteria( FilteringCriterion $criterion ): string; } - -class_alias(CriterionVisitor::class, 'eZ\Publish\SPI\Persistence\Filter\CriterionVisitor'); diff --git a/src/contracts/Persistence/Filter/Doctrine/FilteringQueryBuilder.php b/src/contracts/Persistence/Filter/Doctrine/FilteringQueryBuilder.php index 12be24efb4..c4a8551543 100644 --- a/src/contracts/Persistence/Filter/Doctrine/FilteringQueryBuilder.php +++ b/src/contracts/Persistence/Filter/Doctrine/FilteringQueryBuilder.php @@ -243,5 +243,3 @@ public function joinAllLocations(): FilteringQueryBuilder return $this; } } - -class_alias(FilteringQueryBuilder::class, 'eZ\Publish\SPI\Persistence\Filter\Doctrine\FilteringQueryBuilder'); diff --git a/src/contracts/Persistence/Filter/LazyListIterator.php b/src/contracts/Persistence/Filter/LazyListIterator.php index 8e47cf3963..8f341d2fcf 100644 --- a/src/contracts/Persistence/Filter/LazyListIterator.php +++ b/src/contracts/Persistence/Filter/LazyListIterator.php @@ -70,5 +70,3 @@ public function getIterator(): iterable } } } - -class_alias(LazyListIterator::class, 'eZ\Publish\SPI\Persistence\Filter\LazyListIterator'); diff --git a/src/contracts/Persistence/Filter/Location/Handler.php b/src/contracts/Persistence/Filter/Location/Handler.php index 90e947cdc4..cfece4b4d1 100644 --- a/src/contracts/Persistence/Filter/Location/Handler.php +++ b/src/contracts/Persistence/Filter/Location/Handler.php @@ -24,5 +24,3 @@ public function find(Filter $filter): iterable; public function count(Filter $filter): int; } - -class_alias(Handler::class, 'eZ\Publish\SPI\Persistence\Filter\Location\Handler'); diff --git a/src/contracts/Persistence/Filter/Location/LazyLocationListIterator.php b/src/contracts/Persistence/Filter/Location/LazyLocationListIterator.php index 98c8c51254..ee57070c0d 100644 --- a/src/contracts/Persistence/Filter/Location/LazyLocationListIterator.php +++ b/src/contracts/Persistence/Filter/Location/LazyLocationListIterator.php @@ -31,5 +31,3 @@ public function getIterator(): iterable yield from parent::getIterator(); } } - -class_alias(LazyLocationListIterator::class, 'eZ\Publish\SPI\Persistence\Filter\Location\LazyLocationListIterator'); diff --git a/src/contracts/Persistence/Filter/SortClauseVisitor.php b/src/contracts/Persistence/Filter/SortClauseVisitor.php index 33f952b07c..0e7d4ea84e 100644 --- a/src/contracts/Persistence/Filter/SortClauseVisitor.php +++ b/src/contracts/Persistence/Filter/SortClauseVisitor.php @@ -21,5 +21,3 @@ interface SortClauseVisitor */ public function visitSortClauses(FilteringQueryBuilder $queryBuilder, array $sortClauses): void; } - -class_alias(SortClauseVisitor::class, 'eZ\Publish\SPI\Persistence\Filter\SortClauseVisitor'); diff --git a/src/contracts/Persistence/Handler.php b/src/contracts/Persistence/Handler.php index bf8c8e46e9..aa0ddf3bda 100644 --- a/src/contracts/Persistence/Handler.php +++ b/src/contracts/Persistence/Handler.php @@ -124,5 +124,3 @@ public function commit(); */ public function rollback(); } - -class_alias(Handler::class, 'eZ\Publish\SPI\Persistence\Handler'); diff --git a/src/contracts/Persistence/Notification/CreateStruct.php b/src/contracts/Persistence/Notification/CreateStruct.php index 8945d82733..fa27a0c369 100644 --- a/src/contracts/Persistence/Notification/CreateStruct.php +++ b/src/contracts/Persistence/Notification/CreateStruct.php @@ -27,5 +27,3 @@ class CreateStruct extends ValueObject /** @var int */ public $created; } - -class_alias(CreateStruct::class, 'eZ\Publish\SPI\Persistence\Notification\CreateStruct'); diff --git a/src/contracts/Persistence/Notification/Handler.php b/src/contracts/Persistence/Notification/Handler.php index 0ba5686d6a..0329c46c46 100644 --- a/src/contracts/Persistence/Notification/Handler.php +++ b/src/contracts/Persistence/Notification/Handler.php @@ -71,5 +71,3 @@ public function countNotifications(int $currentUserId): int; */ public function delete(APINotification $notification): void; } - -class_alias(Handler::class, 'eZ\Publish\SPI\Persistence\Notification\Handler'); diff --git a/src/contracts/Persistence/Notification/Notification.php b/src/contracts/Persistence/Notification/Notification.php index 8c6c2d03cd..9450fdcd44 100644 --- a/src/contracts/Persistence/Notification/Notification.php +++ b/src/contracts/Persistence/Notification/Notification.php @@ -30,5 +30,3 @@ class Notification extends ValueObject /** @var array */ public $data = []; } - -class_alias(Notification::class, 'eZ\Publish\SPI\Persistence\Notification\Notification'); diff --git a/src/contracts/Persistence/Notification/UpdateStruct.php b/src/contracts/Persistence/Notification/UpdateStruct.php index f10a742270..42209f3eb3 100644 --- a/src/contracts/Persistence/Notification/UpdateStruct.php +++ b/src/contracts/Persistence/Notification/UpdateStruct.php @@ -15,5 +15,3 @@ class UpdateStruct extends ValueObject /** @var bool */ public $isPending; } - -class_alias(UpdateStruct::class, 'eZ\Publish\SPI\Persistence\Notification\UpdateStruct'); diff --git a/src/contracts/Persistence/Setting/Handler.php b/src/contracts/Persistence/Setting/Handler.php index b8d7903abe..38a4b91217 100644 --- a/src/contracts/Persistence/Setting/Handler.php +++ b/src/contracts/Persistence/Setting/Handler.php @@ -35,5 +35,3 @@ public function delete( string $identifier ): void; } - -class_alias(Handler::class, 'eZ\Publish\SPI\Persistence\Setting\Handler'); diff --git a/src/contracts/Persistence/Setting/Setting.php b/src/contracts/Persistence/Setting/Setting.php index e765424537..55329966b7 100644 --- a/src/contracts/Persistence/Setting/Setting.php +++ b/src/contracts/Persistence/Setting/Setting.php @@ -26,5 +26,3 @@ class Setting extends ValueObject /** @var string */ protected $serializedValue; } - -class_alias(Setting::class, 'eZ\Publish\SPI\Persistence\Setting\Setting'); diff --git a/src/contracts/Persistence/TransactionHandler.php b/src/contracts/Persistence/TransactionHandler.php index d377aecbfa..dce9c48c39 100644 --- a/src/contracts/Persistence/TransactionHandler.php +++ b/src/contracts/Persistence/TransactionHandler.php @@ -40,5 +40,3 @@ public function commit(); */ public function rollback(); } - -class_alias(TransactionHandler::class, 'eZ\Publish\SPI\Persistence\TransactionHandler'); diff --git a/src/contracts/Persistence/URL/Handler.php b/src/contracts/Persistence/URL/Handler.php index 79001ed9eb..3f609a7339 100644 --- a/src/contracts/Persistence/URL/Handler.php +++ b/src/contracts/Persistence/URL/Handler.php @@ -64,5 +64,3 @@ public function loadById($id); */ public function loadByUrl($url); } - -class_alias(Handler::class, 'eZ\Publish\SPI\Persistence\URL\Handler'); diff --git a/src/contracts/Persistence/URL/URL.php b/src/contracts/Persistence/URL/URL.php index 4aec2bd608..6743976016 100644 --- a/src/contracts/Persistence/URL/URL.php +++ b/src/contracts/Persistence/URL/URL.php @@ -60,5 +60,3 @@ class URL extends ValueObject */ public $modified; } - -class_alias(URL::class, 'eZ\Publish\SPI\Persistence\URL\URL'); diff --git a/src/contracts/Persistence/URL/URLUpdateStruct.php b/src/contracts/Persistence/URL/URLUpdateStruct.php index 5858d84dbc..cfc6f9f76c 100644 --- a/src/contracts/Persistence/URL/URLUpdateStruct.php +++ b/src/contracts/Persistence/URL/URLUpdateStruct.php @@ -39,5 +39,3 @@ class URLUpdateStruct extends ValueObject */ public $modified; } - -class_alias(URLUpdateStruct::class, 'eZ\Publish\SPI\Persistence\URL\URLUpdateStruct'); diff --git a/src/contracts/Persistence/User.php b/src/contracts/Persistence/User.php index 2aaa50147a..35c1b08ad7 100644 --- a/src/contracts/Persistence/User.php +++ b/src/contracts/Persistence/User.php @@ -70,5 +70,3 @@ class User extends ValueObject */ public $maxLogin = 0; } - -class_alias(User::class, 'eZ\Publish\SPI\Persistence\User'); diff --git a/src/contracts/Persistence/User/Handler.php b/src/contracts/Persistence/User/Handler.php index e822b208e3..db0f71b2b4 100644 --- a/src/contracts/Persistence/User/Handler.php +++ b/src/contracts/Persistence/User/Handler.php @@ -356,5 +356,3 @@ public function unassignRole($contentId, $roleId); */ public function removeRoleAssignment($roleAssignmentId); } - -class_alias(Handler::class, 'eZ\Publish\SPI\Persistence\User\Handler'); diff --git a/src/contracts/Persistence/User/Policy.php b/src/contracts/Persistence/User/Policy.php index 37f0d73986..291254de33 100644 --- a/src/contracts/Persistence/User/Policy.php +++ b/src/contracts/Persistence/User/Policy.php @@ -77,5 +77,3 @@ class Policy extends ValueObject */ public $limitations; } - -class_alias(Policy::class, 'eZ\Publish\SPI\Persistence\User\Policy'); diff --git a/src/contracts/Persistence/User/Role.php b/src/contracts/Persistence/User/Role.php index cb84fb7239..fc81a4b7d0 100644 --- a/src/contracts/Persistence/User/Role.php +++ b/src/contracts/Persistence/User/Role.php @@ -78,5 +78,3 @@ class Role extends ValueObject */ public $policies = []; } - -class_alias(Role::class, 'eZ\Publish\SPI\Persistence\User\Role'); diff --git a/src/contracts/Persistence/User/RoleAssignment.php b/src/contracts/Persistence/User/RoleAssignment.php index 629f088454..d2acc02326 100644 --- a/src/contracts/Persistence/User/RoleAssignment.php +++ b/src/contracts/Persistence/User/RoleAssignment.php @@ -46,5 +46,3 @@ class RoleAssignment extends ValueObject */ public $values; } - -class_alias(RoleAssignment::class, 'eZ\Publish\SPI\Persistence\User\RoleAssignment'); diff --git a/src/contracts/Persistence/User/RoleCopyStruct.php b/src/contracts/Persistence/User/RoleCopyStruct.php index d209e16669..434e1e53a5 100644 --- a/src/contracts/Persistence/User/RoleCopyStruct.php +++ b/src/contracts/Persistence/User/RoleCopyStruct.php @@ -40,5 +40,3 @@ class RoleCopyStruct extends ValueObject */ public $policies = []; } - -class_alias(RoleCopyStruct::class, 'eZ\Publish\SPI\Persistence\User\RoleCopyStruct'); diff --git a/src/contracts/Persistence/User/RoleCreateStruct.php b/src/contracts/Persistence/User/RoleCreateStruct.php index 628fcc2681..7b83d3a148 100644 --- a/src/contracts/Persistence/User/RoleCreateStruct.php +++ b/src/contracts/Persistence/User/RoleCreateStruct.php @@ -27,5 +27,3 @@ class RoleCreateStruct extends ValueObject */ public $policies = []; } - -class_alias(RoleCreateStruct::class, 'eZ\Publish\SPI\Persistence\User\RoleCreateStruct'); diff --git a/src/contracts/Persistence/User/RoleUpdateStruct.php b/src/contracts/Persistence/User/RoleUpdateStruct.php index 2303710c63..ac143e4e1d 100644 --- a/src/contracts/Persistence/User/RoleUpdateStruct.php +++ b/src/contracts/Persistence/User/RoleUpdateStruct.php @@ -45,5 +45,3 @@ class RoleUpdateStruct extends ValueObject */ public $description = []; } - -class_alias(RoleUpdateStruct::class, 'eZ\Publish\SPI\Persistence\User\RoleUpdateStruct'); diff --git a/src/contracts/Persistence/User/UserTokenUpdateStruct.php b/src/contracts/Persistence/User/UserTokenUpdateStruct.php index c870e48184..a4b5c9518e 100644 --- a/src/contracts/Persistence/User/UserTokenUpdateStruct.php +++ b/src/contracts/Persistence/User/UserTokenUpdateStruct.php @@ -36,5 +36,3 @@ class UserTokenUpdateStruct extends ValueObject */ public $userId; } - -class_alias(UserTokenUpdateStruct::class, 'eZ\Publish\SPI\Persistence\User\UserTokenUpdateStruct'); diff --git a/src/contracts/Persistence/UserPreference/Handler.php b/src/contracts/Persistence/UserPreference/Handler.php index 0dfda94280..6e040eef58 100644 --- a/src/contracts/Persistence/UserPreference/Handler.php +++ b/src/contracts/Persistence/UserPreference/Handler.php @@ -47,5 +47,3 @@ public function loadUserPreferences(int $userId, int $offset, int $limit): array */ public function countUserPreferences(int $userId): int; } - -class_alias(Handler::class, 'eZ\Publish\SPI\Persistence\UserPreference\Handler'); diff --git a/src/contracts/Persistence/UserPreference/UserPreference.php b/src/contracts/Persistence/UserPreference/UserPreference.php index 645cc343d3..709989a1e1 100644 --- a/src/contracts/Persistence/UserPreference/UserPreference.php +++ b/src/contracts/Persistence/UserPreference/UserPreference.php @@ -44,5 +44,3 @@ class UserPreference extends ValueObject */ public $value; } - -class_alias(UserPreference::class, 'eZ\Publish\SPI\Persistence\UserPreference\UserPreference'); diff --git a/src/contracts/Persistence/UserPreference/UserPreferenceSetStruct.php b/src/contracts/Persistence/UserPreference/UserPreferenceSetStruct.php index 1de1b6424c..d72bfd67a7 100644 --- a/src/contracts/Persistence/UserPreference/UserPreferenceSetStruct.php +++ b/src/contracts/Persistence/UserPreference/UserPreferenceSetStruct.php @@ -21,5 +21,3 @@ class UserPreferenceSetStruct extends ValueObject /** @var string */ public $value; } - -class_alias(UserPreferenceSetStruct::class, 'eZ\Publish\SPI\Persistence\UserPreference\UserPreferenceSetStruct'); diff --git a/src/contracts/Persistence/ValueObject.php b/src/contracts/Persistence/ValueObject.php index e49b91807b..a1c1c778ec 100644 --- a/src/contracts/Persistence/ValueObject.php +++ b/src/contracts/Persistence/ValueObject.php @@ -17,5 +17,3 @@ abstract class ValueObject extends APIValueObject { } - -class_alias(ValueObject::class, 'eZ\Publish\SPI\Persistence\ValueObject'); diff --git a/src/contracts/Repository/BookmarkService.php b/src/contracts/Repository/BookmarkService.php index a588430b1f..ec1400b022 100644 --- a/src/contracts/Repository/BookmarkService.php +++ b/src/contracts/Repository/BookmarkService.php @@ -62,5 +62,3 @@ public function loadBookmarks(int $offset = 0, int $limit = 25): BookmarkList; */ public function isBookmarked(Location $location): bool; } - -class_alias(BookmarkService::class, 'eZ\Publish\API\Repository\BookmarkService'); diff --git a/src/contracts/Repository/ContentService.php b/src/contracts/Repository/ContentService.php index fb3bccb5c9..99dcc0fc69 100644 --- a/src/contracts/Repository/ContentService.php +++ b/src/contracts/Repository/ContentService.php @@ -617,5 +617,3 @@ public function find(Filter $filter, ?array $languages = null): ContentList; */ public function count(Filter $filter, ?array $languages = null): int; } - -class_alias(ContentService::class, 'eZ\Publish\API\Repository\ContentService'); diff --git a/src/contracts/Repository/ContentTypeService.php b/src/contracts/Repository/ContentTypeService.php index d17aafe53c..8aaa9bc3e7 100644 --- a/src/contracts/Repository/ContentTypeService.php +++ b/src/contracts/Repository/ContentTypeService.php @@ -394,5 +394,3 @@ public function removeContentTypeTranslation(ContentTypeDraft $contentTypeDraft, */ public function deleteUserDrafts(int $userId): void; } - -class_alias(ContentTypeService::class, 'eZ\Publish\API\Repository\ContentTypeService'); diff --git a/src/contracts/Repository/Decorator/BookmarkServiceDecorator.php b/src/contracts/Repository/Decorator/BookmarkServiceDecorator.php index c8891105b3..c8b0574f18 100644 --- a/src/contracts/Repository/Decorator/BookmarkServiceDecorator.php +++ b/src/contracts/Repository/Decorator/BookmarkServiceDecorator.php @@ -44,5 +44,3 @@ public function isBookmarked(Location $location): bool return $this->innerService->isBookmarked($location); } } - -class_alias(BookmarkServiceDecorator::class, 'eZ\Publish\SPI\Repository\Decorator\BookmarkServiceDecorator'); diff --git a/src/contracts/Repository/Decorator/ContentServiceDecorator.php b/src/contracts/Repository/Decorator/ContentServiceDecorator.php index 3575c0df42..0e21ee7b09 100644 --- a/src/contracts/Repository/Decorator/ContentServiceDecorator.php +++ b/src/contracts/Repository/Decorator/ContentServiceDecorator.php @@ -291,5 +291,3 @@ public function count(Filter $filter, ?array $languages = null): int return $this->innerService->count($filter, $languages); } } - -class_alias(ContentServiceDecorator::class, 'eZ\Publish\SPI\Repository\Decorator\ContentServiceDecorator'); diff --git a/src/contracts/Repository/Decorator/ContentTypeServiceDecorator.php b/src/contracts/Repository/Decorator/ContentTypeServiceDecorator.php index 863e725d19..61fbe8f220 100644 --- a/src/contracts/Repository/Decorator/ContentTypeServiceDecorator.php +++ b/src/contracts/Repository/Decorator/ContentTypeServiceDecorator.php @@ -228,5 +228,3 @@ public function deleteUserDrafts(int $userId): void $this->innerService->deleteUserDrafts($userId); } } - -class_alias(ContentTypeServiceDecorator::class, 'eZ\Publish\SPI\Repository\Decorator\ContentTypeServiceDecorator'); diff --git a/src/contracts/Repository/Decorator/FieldTypeServiceDecorator.php b/src/contracts/Repository/Decorator/FieldTypeServiceDecorator.php index f4411748e7..689fdcd564 100644 --- a/src/contracts/Repository/Decorator/FieldTypeServiceDecorator.php +++ b/src/contracts/Repository/Decorator/FieldTypeServiceDecorator.php @@ -36,5 +36,3 @@ public function hasFieldType(string $identifier): bool return $this->innerService->hasFieldType($identifier); } } - -class_alias(FieldTypeServiceDecorator::class, 'eZ\Publish\SPI\Repository\Decorator\FieldTypeServiceDecorator'); diff --git a/src/contracts/Repository/Decorator/LanguageServiceDecorator.php b/src/contracts/Repository/Decorator/LanguageServiceDecorator.php index 0dae7624aa..ac07957a68 100644 --- a/src/contracts/Repository/Decorator/LanguageServiceDecorator.php +++ b/src/contracts/Repository/Decorator/LanguageServiceDecorator.php @@ -84,5 +84,3 @@ public function newLanguageCreateStruct(): LanguageCreateStruct return $this->innerService->newLanguageCreateStruct(); } } - -class_alias(LanguageServiceDecorator::class, 'eZ\Publish\SPI\Repository\Decorator\LanguageServiceDecorator'); diff --git a/src/contracts/Repository/Decorator/LocationServiceDecorator.php b/src/contracts/Repository/Decorator/LocationServiceDecorator.php index 5f11c4cab3..7afa5f436b 100644 --- a/src/contracts/Repository/Decorator/LocationServiceDecorator.php +++ b/src/contracts/Repository/Decorator/LocationServiceDecorator.php @@ -165,5 +165,3 @@ public function count(Filter $filter, ?array $languages = null): int return $this->innerService->count($filter, $languages); } } - -class_alias(LocationServiceDecorator::class, 'eZ\Publish\SPI\Repository\Decorator\LocationServiceDecorator'); diff --git a/src/contracts/Repository/Decorator/NotificationServiceDecorator.php b/src/contracts/Repository/Decorator/NotificationServiceDecorator.php index 34bfac43a0..b39e0a83cc 100644 --- a/src/contracts/Repository/Decorator/NotificationServiceDecorator.php +++ b/src/contracts/Repository/Decorator/NotificationServiceDecorator.php @@ -60,5 +60,3 @@ public function deleteNotification(Notification $notification): void $this->innerService->deleteNotification($notification); } } - -class_alias(NotificationServiceDecorator::class, 'eZ\Publish\SPI\Repository\Decorator\NotificationServiceDecorator'); diff --git a/src/contracts/Repository/Decorator/ObjectStateServiceDecorator.php b/src/contracts/Repository/Decorator/ObjectStateServiceDecorator.php index 848dd1e11d..24f73bb0e5 100644 --- a/src/contracts/Repository/Decorator/ObjectStateServiceDecorator.php +++ b/src/contracts/Repository/Decorator/ObjectStateServiceDecorator.php @@ -158,5 +158,3 @@ public function newObjectStateUpdateStruct(): ObjectStateUpdateStruct return $this->innerService->newObjectStateUpdateStruct(); } } - -class_alias(ObjectStateServiceDecorator::class, 'eZ\Publish\SPI\Repository\Decorator\ObjectStateServiceDecorator'); diff --git a/src/contracts/Repository/Decorator/RoleServiceDecorator.php b/src/contracts/Repository/Decorator/RoleServiceDecorator.php index 4b13dcd2bd..eca74f1274 100644 --- a/src/contracts/Repository/Decorator/RoleServiceDecorator.php +++ b/src/contracts/Repository/Decorator/RoleServiceDecorator.php @@ -215,5 +215,3 @@ public function getLimitationTypesByModuleFunction( return $this->innerService->getLimitationTypesByModuleFunction($module, $function); } } - -class_alias(RoleServiceDecorator::class, 'eZ\Publish\SPI\Repository\Decorator\RoleServiceDecorator'); diff --git a/src/contracts/Repository/Decorator/SearchServiceDecorator.php b/src/contracts/Repository/Decorator/SearchServiceDecorator.php index 82f75f5f55..f193b52204 100644 --- a/src/contracts/Repository/Decorator/SearchServiceDecorator.php +++ b/src/contracts/Repository/Decorator/SearchServiceDecorator.php @@ -71,5 +71,3 @@ public function supports(int $capabilityFlag): bool return $this->innerService->supports($capabilityFlag); } } - -class_alias(SearchServiceDecorator::class, 'eZ\Publish\SPI\Repository\Decorator\SearchServiceDecorator'); diff --git a/src/contracts/Repository/Decorator/SectionServiceDecorator.php b/src/contracts/Repository/Decorator/SectionServiceDecorator.php index 735b2361c3..7927170989 100644 --- a/src/contracts/Repository/Decorator/SectionServiceDecorator.php +++ b/src/contracts/Repository/Decorator/SectionServiceDecorator.php @@ -95,5 +95,3 @@ public function newSectionUpdateStruct(): SectionUpdateStruct return $this->innerService->newSectionUpdateStruct(); } } - -class_alias(SectionServiceDecorator::class, 'eZ\Publish\SPI\Repository\Decorator\SectionServiceDecorator'); diff --git a/src/contracts/Repository/Decorator/SettingServiceDecorator.php b/src/contracts/Repository/Decorator/SettingServiceDecorator.php index d9cef09631..6174be9137 100644 --- a/src/contracts/Repository/Decorator/SettingServiceDecorator.php +++ b/src/contracts/Repository/Decorator/SettingServiceDecorator.php @@ -54,5 +54,3 @@ public function newSettingUpdateStruct(array $properties = []): SettingUpdateStr return $this->innerService->newSettingUpdateStruct($properties); } } - -class_alias(SettingServiceDecorator::class, 'eZ\Publish\SPI\Repository\Decorator\SettingServiceDecorator'); diff --git a/src/contracts/Repository/Decorator/TranslationServiceDecorator.php b/src/contracts/Repository/Decorator/TranslationServiceDecorator.php index 7e1d6b99b3..47617365ce 100644 --- a/src/contracts/Repository/Decorator/TranslationServiceDecorator.php +++ b/src/contracts/Repository/Decorator/TranslationServiceDecorator.php @@ -35,5 +35,3 @@ public function translateString( return $this->innerService->translateString($translation, $locale); } } - -class_alias(TranslationServiceDecorator::class, 'eZ\Publish\SPI\Repository\Decorator\TranslationServiceDecorator'); diff --git a/src/contracts/Repository/Decorator/TrashServiceDecorator.php b/src/contracts/Repository/Decorator/TrashServiceDecorator.php index 2a4a3dabe1..8dc21bdea2 100644 --- a/src/contracts/Repository/Decorator/TrashServiceDecorator.php +++ b/src/contracts/Repository/Decorator/TrashServiceDecorator.php @@ -58,5 +58,3 @@ public function findTrashItems(Query $query): SearchResult return $this->innerService->findTrashItems($query); } } - -class_alias(TrashServiceDecorator::class, 'eZ\Publish\SPI\Repository\Decorator\TrashServiceDecorator'); diff --git a/src/contracts/Repository/Decorator/URLAliasServiceDecorator.php b/src/contracts/Repository/Decorator/URLAliasServiceDecorator.php index df87d13f3b..3b90f711ee 100644 --- a/src/contracts/Repository/Decorator/URLAliasServiceDecorator.php +++ b/src/contracts/Repository/Decorator/URLAliasServiceDecorator.php @@ -107,5 +107,3 @@ public function deleteCorruptedUrlAliases(): int return $this->innerService->deleteCorruptedUrlAliases(); } } - -class_alias(URLAliasServiceDecorator::class, 'eZ\Publish\SPI\Repository\Decorator\URLAliasServiceDecorator'); diff --git a/src/contracts/Repository/Decorator/URLServiceDecorator.php b/src/contracts/Repository/Decorator/URLServiceDecorator.php index 24932e9d8c..a7dd0562d2 100644 --- a/src/contracts/Repository/Decorator/URLServiceDecorator.php +++ b/src/contracts/Repository/Decorator/URLServiceDecorator.php @@ -60,5 +60,3 @@ public function updateUrl( return $this->innerService->updateUrl($url, $struct); } } - -class_alias(URLServiceDecorator::class, 'eZ\Publish\SPI\Repository\Decorator\URLServiceDecorator'); diff --git a/src/contracts/Repository/Decorator/URLWildcardServiceDecorator.php b/src/contracts/Repository/Decorator/URLWildcardServiceDecorator.php index 9edc6aa26d..8c68f43dc2 100644 --- a/src/contracts/Repository/Decorator/URLWildcardServiceDecorator.php +++ b/src/contracts/Repository/Decorator/URLWildcardServiceDecorator.php @@ -72,5 +72,3 @@ public function countAll(): int return $this->innerService->countAll(); } } - -class_alias(URLWildcardServiceDecorator::class, 'eZ\Publish\SPI\Repository\Decorator\URLWildcardServiceDecorator'); diff --git a/src/contracts/Repository/Decorator/UserPreferenceServiceDecorator.php b/src/contracts/Repository/Decorator/UserPreferenceServiceDecorator.php index 633ac544de..15ad6068b7 100644 --- a/src/contracts/Repository/Decorator/UserPreferenceServiceDecorator.php +++ b/src/contracts/Repository/Decorator/UserPreferenceServiceDecorator.php @@ -44,5 +44,3 @@ public function getUserPreferenceCount(): int return $this->innerService->getUserPreferenceCount(); } } - -class_alias(UserPreferenceServiceDecorator::class, 'eZ\Publish\SPI\Repository\Decorator\UserPreferenceServiceDecorator'); diff --git a/src/contracts/Repository/Decorator/UserServiceDecorator.php b/src/contracts/Repository/Decorator/UserServiceDecorator.php index 784a7d669e..0e7ba27413 100644 --- a/src/contracts/Repository/Decorator/UserServiceDecorator.php +++ b/src/contracts/Repository/Decorator/UserServiceDecorator.php @@ -246,5 +246,3 @@ public function getPasswordInfo(User $user): PasswordInfo return $this->innerService->getPasswordInfo($user); } } - -class_alias(UserServiceDecorator::class, 'eZ\Publish\SPI\Repository\Decorator\UserServiceDecorator'); diff --git a/src/contracts/Repository/Event/AfterEvent.php b/src/contracts/Repository/Event/AfterEvent.php index f71f471916..db633cda1a 100644 --- a/src/contracts/Repository/Event/AfterEvent.php +++ b/src/contracts/Repository/Event/AfterEvent.php @@ -16,5 +16,3 @@ abstract class AfterEvent extends Event { } - -class_alias(AfterEvent::class, 'eZ\Publish\SPI\Repository\Event\AfterEvent'); diff --git a/src/contracts/Repository/Event/BeforeEvent.php b/src/contracts/Repository/Event/BeforeEvent.php index 2ff83aae5a..f0b5432f93 100644 --- a/src/contracts/Repository/Event/BeforeEvent.php +++ b/src/contracts/Repository/Event/BeforeEvent.php @@ -16,5 +16,3 @@ abstract class BeforeEvent extends Event { } - -class_alias(BeforeEvent::class, 'eZ\Publish\SPI\Repository\Event\BeforeEvent'); diff --git a/src/contracts/Repository/Events/Bookmark/BeforeCreateBookmarkEvent.php b/src/contracts/Repository/Events/Bookmark/BeforeCreateBookmarkEvent.php index 0ae3caebce..5dd37d081f 100644 --- a/src/contracts/Repository/Events/Bookmark/BeforeCreateBookmarkEvent.php +++ b/src/contracts/Repository/Events/Bookmark/BeforeCreateBookmarkEvent.php @@ -26,5 +26,3 @@ public function getLocation(): Location return $this->location; } } - -class_alias(BeforeCreateBookmarkEvent::class, 'eZ\Publish\API\Repository\Events\Bookmark\BeforeCreateBookmarkEvent'); diff --git a/src/contracts/Repository/Events/Bookmark/BeforeDeleteBookmarkEvent.php b/src/contracts/Repository/Events/Bookmark/BeforeDeleteBookmarkEvent.php index cd4aca5e05..def4418944 100644 --- a/src/contracts/Repository/Events/Bookmark/BeforeDeleteBookmarkEvent.php +++ b/src/contracts/Repository/Events/Bookmark/BeforeDeleteBookmarkEvent.php @@ -26,5 +26,3 @@ public function getLocation(): Location return $this->location; } } - -class_alias(BeforeDeleteBookmarkEvent::class, 'eZ\Publish\API\Repository\Events\Bookmark\BeforeDeleteBookmarkEvent'); diff --git a/src/contracts/Repository/Events/Bookmark/CreateBookmarkEvent.php b/src/contracts/Repository/Events/Bookmark/CreateBookmarkEvent.php index 6fe915c94b..6117d15ab1 100644 --- a/src/contracts/Repository/Events/Bookmark/CreateBookmarkEvent.php +++ b/src/contracts/Repository/Events/Bookmark/CreateBookmarkEvent.php @@ -26,5 +26,3 @@ public function getLocation(): Location return $this->location; } } - -class_alias(CreateBookmarkEvent::class, 'eZ\Publish\API\Repository\Events\Bookmark\CreateBookmarkEvent'); diff --git a/src/contracts/Repository/Events/Bookmark/DeleteBookmarkEvent.php b/src/contracts/Repository/Events/Bookmark/DeleteBookmarkEvent.php index 38faaddda7..72fee09b22 100644 --- a/src/contracts/Repository/Events/Bookmark/DeleteBookmarkEvent.php +++ b/src/contracts/Repository/Events/Bookmark/DeleteBookmarkEvent.php @@ -26,5 +26,3 @@ public function getLocation(): Location return $this->location; } } - -class_alias(DeleteBookmarkEvent::class, 'eZ\Publish\API\Repository\Events\Bookmark\DeleteBookmarkEvent'); diff --git a/src/contracts/Repository/Events/Content/AddRelationEvent.php b/src/contracts/Repository/Events/Content/AddRelationEvent.php index 5e7776cf01..7bbc561cde 100644 --- a/src/contracts/Repository/Events/Content/AddRelationEvent.php +++ b/src/contracts/Repository/Events/Content/AddRelationEvent.php @@ -49,5 +49,3 @@ public function getDestinationContent(): ContentInfo return $this->destinationContent; } } - -class_alias(AddRelationEvent::class, 'eZ\Publish\API\Repository\Events\Content\AddRelationEvent'); diff --git a/src/contracts/Repository/Events/Content/BeforeAddRelationEvent.php b/src/contracts/Repository/Events/Content/BeforeAddRelationEvent.php index 5ff91d2f81..4a5ce76e67 100644 --- a/src/contracts/Repository/Events/Content/BeforeAddRelationEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeAddRelationEvent.php @@ -60,5 +60,3 @@ public function hasRelation(): bool return $this->relation instanceof Relation; } } - -class_alias(BeforeAddRelationEvent::class, 'eZ\Publish\API\Repository\Events\Content\BeforeAddRelationEvent'); diff --git a/src/contracts/Repository/Events/Content/BeforeCopyContentEvent.php b/src/contracts/Repository/Events/Content/BeforeCopyContentEvent.php index 70ef82e562..e4833b4275 100644 --- a/src/contracts/Repository/Events/Content/BeforeCopyContentEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeCopyContentEvent.php @@ -73,5 +73,3 @@ public function hasContent(): bool return $this->content instanceof Content; } } - -class_alias(BeforeCopyContentEvent::class, 'eZ\Publish\API\Repository\Events\Content\BeforeCopyContentEvent'); diff --git a/src/contracts/Repository/Events/Content/BeforeCreateContentDraftEvent.php b/src/contracts/Repository/Events/Content/BeforeCreateContentDraftEvent.php index 7e7976f627..47afdbbe6e 100644 --- a/src/contracts/Repository/Events/Content/BeforeCreateContentDraftEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeCreateContentDraftEvent.php @@ -84,5 +84,3 @@ public function hasContentDraft(): bool return $this->contentDraft instanceof Content; } } - -class_alias(BeforeCreateContentDraftEvent::class, 'eZ\Publish\API\Repository\Events\Content\BeforeCreateContentDraftEvent'); diff --git a/src/contracts/Repository/Events/Content/BeforeCreateContentEvent.php b/src/contracts/Repository/Events/Content/BeforeCreateContentEvent.php index e6d95d55ec..4c57ca3b9b 100644 --- a/src/contracts/Repository/Events/Content/BeforeCreateContentEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeCreateContentEvent.php @@ -74,5 +74,3 @@ public function hasContent(): bool return $this->content instanceof Content; } } - -class_alias(BeforeCreateContentEvent::class, 'eZ\Publish\API\Repository\Events\Content\BeforeCreateContentEvent'); diff --git a/src/contracts/Repository/Events/Content/BeforeDeleteContentEvent.php b/src/contracts/Repository/Events/Content/BeforeDeleteContentEvent.php index 48e20156e1..953ee3f6f3 100644 --- a/src/contracts/Repository/Events/Content/BeforeDeleteContentEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeDeleteContentEvent.php @@ -49,5 +49,3 @@ public function hasLocations(): bool return is_array($this->locations); } } - -class_alias(BeforeDeleteContentEvent::class, 'eZ\Publish\API\Repository\Events\Content\BeforeDeleteContentEvent'); diff --git a/src/contracts/Repository/Events/Content/BeforeDeleteRelationEvent.php b/src/contracts/Repository/Events/Content/BeforeDeleteRelationEvent.php index 473e7ae0c0..c628f72c19 100644 --- a/src/contracts/Repository/Events/Content/BeforeDeleteRelationEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeDeleteRelationEvent.php @@ -36,5 +36,3 @@ public function getDestinationContent(): ContentInfo return $this->destinationContent; } } - -class_alias(BeforeDeleteRelationEvent::class, 'eZ\Publish\API\Repository\Events\Content\BeforeDeleteRelationEvent'); diff --git a/src/contracts/Repository/Events/Content/BeforeDeleteTranslationEvent.php b/src/contracts/Repository/Events/Content/BeforeDeleteTranslationEvent.php index a58bcb4742..61c9763837 100644 --- a/src/contracts/Repository/Events/Content/BeforeDeleteTranslationEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeDeleteTranslationEvent.php @@ -34,5 +34,3 @@ public function getLanguageCode() return $this->languageCode; } } - -class_alias(BeforeDeleteTranslationEvent::class, 'eZ\Publish\API\Repository\Events\Content\BeforeDeleteTranslationEvent'); diff --git a/src/contracts/Repository/Events/Content/BeforeDeleteVersionEvent.php b/src/contracts/Repository/Events/Content/BeforeDeleteVersionEvent.php index 11a32ac01a..fa7245ad7a 100644 --- a/src/contracts/Repository/Events/Content/BeforeDeleteVersionEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeDeleteVersionEvent.php @@ -26,5 +26,3 @@ public function getVersionInfo(): VersionInfo return $this->versionInfo; } } - -class_alias(BeforeDeleteVersionEvent::class, 'eZ\Publish\API\Repository\Events\Content\BeforeDeleteVersionEvent'); diff --git a/src/contracts/Repository/Events/Content/BeforeHideContentEvent.php b/src/contracts/Repository/Events/Content/BeforeHideContentEvent.php index b97db556a3..5d60bb8f5f 100644 --- a/src/contracts/Repository/Events/Content/BeforeHideContentEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeHideContentEvent.php @@ -26,5 +26,3 @@ public function getContentInfo(): ContentInfo return $this->contentInfo; } } - -class_alias(BeforeHideContentEvent::class, 'eZ\Publish\API\Repository\Events\Content\BeforeHideContentEvent'); diff --git a/src/contracts/Repository/Events/Content/BeforePublishVersionEvent.php b/src/contracts/Repository/Events/Content/BeforePublishVersionEvent.php index faa2149f72..130c2d802e 100644 --- a/src/contracts/Repository/Events/Content/BeforePublishVersionEvent.php +++ b/src/contracts/Repository/Events/Content/BeforePublishVersionEvent.php @@ -59,5 +59,3 @@ public function hasContent(): bool return $this->content instanceof Content; } } - -class_alias(BeforePublishVersionEvent::class, 'eZ\Publish\API\Repository\Events\Content\BeforePublishVersionEvent'); diff --git a/src/contracts/Repository/Events/Content/BeforeRevealContentEvent.php b/src/contracts/Repository/Events/Content/BeforeRevealContentEvent.php index 0d188c34a1..197b3baf8a 100644 --- a/src/contracts/Repository/Events/Content/BeforeRevealContentEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeRevealContentEvent.php @@ -26,5 +26,3 @@ public function getContentInfo(): ContentInfo return $this->contentInfo; } } - -class_alias(BeforeRevealContentEvent::class, 'eZ\Publish\API\Repository\Events\Content\BeforeRevealContentEvent'); diff --git a/src/contracts/Repository/Events/Content/BeforeUpdateContentEvent.php b/src/contracts/Repository/Events/Content/BeforeUpdateContentEvent.php index df52d36216..cac5490729 100644 --- a/src/contracts/Repository/Events/Content/BeforeUpdateContentEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeUpdateContentEvent.php @@ -75,5 +75,3 @@ public function hasContent(): bool return $this->content instanceof Content; } } - -class_alias(BeforeUpdateContentEvent::class, 'eZ\Publish\API\Repository\Events\Content\BeforeUpdateContentEvent'); diff --git a/src/contracts/Repository/Events/Content/BeforeUpdateContentMetadataEvent.php b/src/contracts/Repository/Events/Content/BeforeUpdateContentMetadataEvent.php index a36fad381d..f940a44da8 100644 --- a/src/contracts/Repository/Events/Content/BeforeUpdateContentMetadataEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeUpdateContentMetadataEvent.php @@ -60,5 +60,3 @@ public function hasContent(): bool return $this->content instanceof Content; } } - -class_alias(BeforeUpdateContentMetadataEvent::class, 'eZ\Publish\API\Repository\Events\Content\BeforeUpdateContentMetadataEvent'); diff --git a/src/contracts/Repository/Events/Content/CopyContentEvent.php b/src/contracts/Repository/Events/Content/CopyContentEvent.php index 45488792ff..e63a5c9e85 100644 --- a/src/contracts/Repository/Events/Content/CopyContentEvent.php +++ b/src/contracts/Repository/Events/Content/CopyContentEvent.php @@ -60,5 +60,3 @@ public function getVersionInfo(): ?VersionInfo return $this->versionInfo; } } - -class_alias(CopyContentEvent::class, 'eZ\Publish\API\Repository\Events\Content\CopyContentEvent'); diff --git a/src/contracts/Repository/Events/Content/CreateContentDraftEvent.php b/src/contracts/Repository/Events/Content/CreateContentDraftEvent.php index 4474ef9e82..3955565119 100644 --- a/src/contracts/Repository/Events/Content/CreateContentDraftEvent.php +++ b/src/contracts/Repository/Events/Content/CreateContentDraftEvent.php @@ -71,5 +71,3 @@ public function getLanguage(): ?Language return $this->language; } } - -class_alias(CreateContentDraftEvent::class, 'eZ\Publish\API\Repository\Events\Content\CreateContentDraftEvent'); diff --git a/src/contracts/Repository/Events/Content/CreateContentEvent.php b/src/contracts/Repository/Events/Content/CreateContentEvent.php index 43f5899265..5a7d2fb3e1 100644 --- a/src/contracts/Repository/Events/Content/CreateContentEvent.php +++ b/src/contracts/Repository/Events/Content/CreateContentEvent.php @@ -61,5 +61,3 @@ public function getFieldIdentifiersToValidate(): ?array return $this->fieldIdentifiersToValidate; } } - -class_alias(CreateContentEvent::class, 'eZ\Publish\API\Repository\Events\Content\CreateContentEvent'); diff --git a/src/contracts/Repository/Events/Content/DeleteContentEvent.php b/src/contracts/Repository/Events/Content/DeleteContentEvent.php index 4f4f703ab4..41e2599e33 100644 --- a/src/contracts/Repository/Events/Content/DeleteContentEvent.php +++ b/src/contracts/Repository/Events/Content/DeleteContentEvent.php @@ -37,5 +37,3 @@ public function getContentInfo(): ContentInfo return $this->contentInfo; } } - -class_alias(DeleteContentEvent::class, 'eZ\Publish\API\Repository\Events\Content\DeleteContentEvent'); diff --git a/src/contracts/Repository/Events/Content/DeleteRelationEvent.php b/src/contracts/Repository/Events/Content/DeleteRelationEvent.php index 38f8379629..8252930efa 100644 --- a/src/contracts/Repository/Events/Content/DeleteRelationEvent.php +++ b/src/contracts/Repository/Events/Content/DeleteRelationEvent.php @@ -38,5 +38,3 @@ public function getDestinationContent(): ContentInfo return $this->destinationContent; } } - -class_alias(DeleteRelationEvent::class, 'eZ\Publish\API\Repository\Events\Content\DeleteRelationEvent'); diff --git a/src/contracts/Repository/Events/Content/DeleteTranslationEvent.php b/src/contracts/Repository/Events/Content/DeleteTranslationEvent.php index 6c494523eb..16c2372409 100644 --- a/src/contracts/Repository/Events/Content/DeleteTranslationEvent.php +++ b/src/contracts/Repository/Events/Content/DeleteTranslationEvent.php @@ -36,5 +36,3 @@ public function getLanguageCode() return $this->languageCode; } } - -class_alias(DeleteTranslationEvent::class, 'eZ\Publish\API\Repository\Events\Content\DeleteTranslationEvent'); diff --git a/src/contracts/Repository/Events/Content/DeleteVersionEvent.php b/src/contracts/Repository/Events/Content/DeleteVersionEvent.php index b4eebac6ff..29cb76beb7 100644 --- a/src/contracts/Repository/Events/Content/DeleteVersionEvent.php +++ b/src/contracts/Repository/Events/Content/DeleteVersionEvent.php @@ -26,5 +26,3 @@ public function getVersionInfo(): VersionInfo return $this->versionInfo; } } - -class_alias(DeleteVersionEvent::class, 'eZ\Publish\API\Repository\Events\Content\DeleteVersionEvent'); diff --git a/src/contracts/Repository/Events/Content/HideContentEvent.php b/src/contracts/Repository/Events/Content/HideContentEvent.php index a35dbd814c..6cf729721f 100644 --- a/src/contracts/Repository/Events/Content/HideContentEvent.php +++ b/src/contracts/Repository/Events/Content/HideContentEvent.php @@ -26,5 +26,3 @@ public function getContentInfo(): ContentInfo return $this->contentInfo; } } - -class_alias(HideContentEvent::class, 'eZ\Publish\API\Repository\Events\Content\HideContentEvent'); diff --git a/src/contracts/Repository/Events/Content/PublishVersionEvent.php b/src/contracts/Repository/Events/Content/PublishVersionEvent.php index 7a826a6d97..abd18bca8f 100644 --- a/src/contracts/Repository/Events/Content/PublishVersionEvent.php +++ b/src/contracts/Repository/Events/Content/PublishVersionEvent.php @@ -48,5 +48,3 @@ public function getTranslations(): array return $this->translations; } } - -class_alias(PublishVersionEvent::class, 'eZ\Publish\API\Repository\Events\Content\PublishVersionEvent'); diff --git a/src/contracts/Repository/Events/Content/RevealContentEvent.php b/src/contracts/Repository/Events/Content/RevealContentEvent.php index 6cf9e2ce6a..e53d4d00bf 100644 --- a/src/contracts/Repository/Events/Content/RevealContentEvent.php +++ b/src/contracts/Repository/Events/Content/RevealContentEvent.php @@ -26,5 +26,3 @@ public function getContentInfo(): ContentInfo return $this->contentInfo; } } - -class_alias(RevealContentEvent::class, 'eZ\Publish\API\Repository\Events\Content\RevealContentEvent'); diff --git a/src/contracts/Repository/Events/Content/UpdateContentEvent.php b/src/contracts/Repository/Events/Content/UpdateContentEvent.php index f42860ed82..004809882b 100644 --- a/src/contracts/Repository/Events/Content/UpdateContentEvent.php +++ b/src/contracts/Repository/Events/Content/UpdateContentEvent.php @@ -62,5 +62,3 @@ public function getFieldIdentifiersToValidate(): ?array return $this->fieldIdentifiersToValidate; } } - -class_alias(UpdateContentEvent::class, 'eZ\Publish\API\Repository\Events\Content\UpdateContentEvent'); diff --git a/src/contracts/Repository/Events/Content/UpdateContentMetadataEvent.php b/src/contracts/Repository/Events/Content/UpdateContentMetadataEvent.php index 356787dcd8..a48047e1fa 100644 --- a/src/contracts/Repository/Events/Content/UpdateContentMetadataEvent.php +++ b/src/contracts/Repository/Events/Content/UpdateContentMetadataEvent.php @@ -49,5 +49,3 @@ public function getContentMetadataUpdateStruct(): ContentMetadataUpdateStruct return $this->contentMetadataUpdateStruct; } } - -class_alias(UpdateContentMetadataEvent::class, 'eZ\Publish\API\Repository\Events\Content\UpdateContentMetadataEvent'); diff --git a/src/contracts/Repository/Events/ContentType/AddFieldDefinitionEvent.php b/src/contracts/Repository/Events/ContentType/AddFieldDefinitionEvent.php index 1660554ffb..6985436851 100644 --- a/src/contracts/Repository/Events/ContentType/AddFieldDefinitionEvent.php +++ b/src/contracts/Repository/Events/ContentType/AddFieldDefinitionEvent.php @@ -38,5 +38,3 @@ public function getFieldDefinitionCreateStruct(): FieldDefinitionCreateStruct return $this->fieldDefinitionCreateStruct; } } - -class_alias(AddFieldDefinitionEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\AddFieldDefinitionEvent'); diff --git a/src/contracts/Repository/Events/ContentType/AssignContentTypeGroupEvent.php b/src/contracts/Repository/Events/ContentType/AssignContentTypeGroupEvent.php index f677e8fed3..dc73297169 100644 --- a/src/contracts/Repository/Events/ContentType/AssignContentTypeGroupEvent.php +++ b/src/contracts/Repository/Events/ContentType/AssignContentTypeGroupEvent.php @@ -38,5 +38,3 @@ public function getContentTypeGroup(): ContentTypeGroup return $this->contentTypeGroup; } } - -class_alias(AssignContentTypeGroupEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\AssignContentTypeGroupEvent'); diff --git a/src/contracts/Repository/Events/ContentType/BeforeAddFieldDefinitionEvent.php b/src/contracts/Repository/Events/ContentType/BeforeAddFieldDefinitionEvent.php index a51f96eedd..3d343a1450 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeAddFieldDefinitionEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeAddFieldDefinitionEvent.php @@ -36,5 +36,3 @@ public function getFieldDefinitionCreateStruct(): FieldDefinitionCreateStruct return $this->fieldDefinitionCreateStruct; } } - -class_alias(BeforeAddFieldDefinitionEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\BeforeAddFieldDefinitionEvent'); diff --git a/src/contracts/Repository/Events/ContentType/BeforeAssignContentTypeGroupEvent.php b/src/contracts/Repository/Events/ContentType/BeforeAssignContentTypeGroupEvent.php index 5fc0e5027a..c01983125e 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeAssignContentTypeGroupEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeAssignContentTypeGroupEvent.php @@ -36,5 +36,3 @@ public function getContentTypeGroup(): ContentTypeGroup return $this->contentTypeGroup; } } - -class_alias(BeforeAssignContentTypeGroupEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\BeforeAssignContentTypeGroupEvent'); diff --git a/src/contracts/Repository/Events/ContentType/BeforeCopyContentTypeEvent.php b/src/contracts/Repository/Events/ContentType/BeforeCopyContentTypeEvent.php index 279fc193b9..2a706ed4a0 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeCopyContentTypeEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeCopyContentTypeEvent.php @@ -59,5 +59,3 @@ public function hasContentTypeCopy(): bool return $this->contentTypeCopy instanceof ContentType; } } - -class_alias(BeforeCopyContentTypeEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\BeforeCopyContentTypeEvent'); diff --git a/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeDraftEvent.php b/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeDraftEvent.php index b89c178196..0d6d39e9b4 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeDraftEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeDraftEvent.php @@ -50,5 +50,3 @@ public function hasContentTypeDraft(): bool return $this->contentTypeDraft instanceof ContentTypeDraft; } } - -class_alias(BeforeCreateContentTypeDraftEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\BeforeCreateContentTypeDraftEvent'); diff --git a/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeEvent.php b/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeEvent.php index c6ddf7daf8..f4706b7389 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeEvent.php @@ -59,5 +59,3 @@ public function hasContentTypeDraft(): bool return $this->contentTypeDraft instanceof ContentTypeDraft; } } - -class_alias(BeforeCreateContentTypeEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\BeforeCreateContentTypeEvent'); diff --git a/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeGroupEvent.php b/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeGroupEvent.php index a7acbba343..d0ea49b65b 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeGroupEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeGroupEvent.php @@ -50,5 +50,3 @@ public function hasContentTypeGroup(): bool return $this->contentTypeGroup instanceof ContentTypeGroup; } } - -class_alias(BeforeCreateContentTypeGroupEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\BeforeCreateContentTypeGroupEvent'); diff --git a/src/contracts/Repository/Events/ContentType/BeforeDeleteContentTypeEvent.php b/src/contracts/Repository/Events/ContentType/BeforeDeleteContentTypeEvent.php index 0964d0dffe..8258fbaa1b 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeDeleteContentTypeEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeDeleteContentTypeEvent.php @@ -26,5 +26,3 @@ public function getContentType(): ContentType return $this->contentType; } } - -class_alias(BeforeDeleteContentTypeEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\BeforeDeleteContentTypeEvent'); diff --git a/src/contracts/Repository/Events/ContentType/BeforeDeleteContentTypeGroupEvent.php b/src/contracts/Repository/Events/ContentType/BeforeDeleteContentTypeGroupEvent.php index 9ec79e77be..effb3812aa 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeDeleteContentTypeGroupEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeDeleteContentTypeGroupEvent.php @@ -26,5 +26,3 @@ public function getContentTypeGroup(): ContentTypeGroup return $this->contentTypeGroup; } } - -class_alias(BeforeDeleteContentTypeGroupEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\BeforeDeleteContentTypeGroupEvent'); diff --git a/src/contracts/Repository/Events/ContentType/BeforePublishContentTypeDraftEvent.php b/src/contracts/Repository/Events/ContentType/BeforePublishContentTypeDraftEvent.php index 5d63755db7..601c560f4b 100644 --- a/src/contracts/Repository/Events/ContentType/BeforePublishContentTypeDraftEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforePublishContentTypeDraftEvent.php @@ -26,5 +26,3 @@ public function getContentTypeDraft(): ContentTypeDraft return $this->contentTypeDraft; } } - -class_alias(BeforePublishContentTypeDraftEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\BeforePublishContentTypeDraftEvent'); diff --git a/src/contracts/Repository/Events/ContentType/BeforeRemoveContentTypeTranslationEvent.php b/src/contracts/Repository/Events/ContentType/BeforeRemoveContentTypeTranslationEvent.php index f7c115219b..a85344d48e 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeRemoveContentTypeTranslationEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeRemoveContentTypeTranslationEvent.php @@ -58,5 +58,3 @@ public function hasNewContentTypeDraft(): bool return $this->newContentTypeDraft instanceof ContentTypeDraft; } } - -class_alias(BeforeRemoveContentTypeTranslationEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\BeforeRemoveContentTypeTranslationEvent'); diff --git a/src/contracts/Repository/Events/ContentType/BeforeRemoveFieldDefinitionEvent.php b/src/contracts/Repository/Events/ContentType/BeforeRemoveFieldDefinitionEvent.php index e5321118f0..87d8288921 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeRemoveFieldDefinitionEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeRemoveFieldDefinitionEvent.php @@ -36,5 +36,3 @@ public function getFieldDefinition(): FieldDefinition return $this->fieldDefinition; } } - -class_alias(BeforeRemoveFieldDefinitionEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\BeforeRemoveFieldDefinitionEvent'); diff --git a/src/contracts/Repository/Events/ContentType/BeforeUnassignContentTypeGroupEvent.php b/src/contracts/Repository/Events/ContentType/BeforeUnassignContentTypeGroupEvent.php index 2afad1f525..ba712fccc5 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeUnassignContentTypeGroupEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeUnassignContentTypeGroupEvent.php @@ -36,5 +36,3 @@ public function getContentTypeGroup(): ContentTypeGroup return $this->contentTypeGroup; } } - -class_alias(BeforeUnassignContentTypeGroupEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\BeforeUnassignContentTypeGroupEvent'); diff --git a/src/contracts/Repository/Events/ContentType/BeforeUpdateContentTypeDraftEvent.php b/src/contracts/Repository/Events/ContentType/BeforeUpdateContentTypeDraftEvent.php index 5bd9b37e2d..27f66aeecd 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeUpdateContentTypeDraftEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeUpdateContentTypeDraftEvent.php @@ -36,5 +36,3 @@ public function getContentTypeUpdateStruct(): ContentTypeUpdateStruct return $this->contentTypeUpdateStruct; } } - -class_alias(BeforeUpdateContentTypeDraftEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\BeforeUpdateContentTypeDraftEvent'); diff --git a/src/contracts/Repository/Events/ContentType/BeforeUpdateContentTypeGroupEvent.php b/src/contracts/Repository/Events/ContentType/BeforeUpdateContentTypeGroupEvent.php index 07d42b213f..085a83041b 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeUpdateContentTypeGroupEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeUpdateContentTypeGroupEvent.php @@ -36,5 +36,3 @@ public function getContentTypeGroupUpdateStruct(): ContentTypeGroupUpdateStruct return $this->contentTypeGroupUpdateStruct; } } - -class_alias(BeforeUpdateContentTypeGroupEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\BeforeUpdateContentTypeGroupEvent'); diff --git a/src/contracts/Repository/Events/ContentType/BeforeUpdateFieldDefinitionEvent.php b/src/contracts/Repository/Events/ContentType/BeforeUpdateFieldDefinitionEvent.php index 4c9b0790c2..dc1b874ccd 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeUpdateFieldDefinitionEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeUpdateFieldDefinitionEvent.php @@ -49,5 +49,3 @@ public function getFieldDefinitionUpdateStruct(): FieldDefinitionUpdateStruct return $this->fieldDefinitionUpdateStruct; } } - -class_alias(BeforeUpdateFieldDefinitionEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\BeforeUpdateFieldDefinitionEvent'); diff --git a/src/contracts/Repository/Events/ContentType/CopyContentTypeEvent.php b/src/contracts/Repository/Events/ContentType/CopyContentTypeEvent.php index 79e1563112..a64a2be0ce 100644 --- a/src/contracts/Repository/Events/ContentType/CopyContentTypeEvent.php +++ b/src/contracts/Repository/Events/ContentType/CopyContentTypeEvent.php @@ -48,5 +48,3 @@ public function getCreator(): ?User return $this->creator; } } - -class_alias(CopyContentTypeEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\CopyContentTypeEvent'); diff --git a/src/contracts/Repository/Events/ContentType/CreateContentTypeDraftEvent.php b/src/contracts/Repository/Events/ContentType/CreateContentTypeDraftEvent.php index 620e33e243..4084795a14 100644 --- a/src/contracts/Repository/Events/ContentType/CreateContentTypeDraftEvent.php +++ b/src/contracts/Repository/Events/ContentType/CreateContentTypeDraftEvent.php @@ -38,5 +38,3 @@ public function getContentType(): ContentType return $this->contentType; } } - -class_alias(CreateContentTypeDraftEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\CreateContentTypeDraftEvent'); diff --git a/src/contracts/Repository/Events/ContentType/CreateContentTypeEvent.php b/src/contracts/Repository/Events/ContentType/CreateContentTypeEvent.php index 7c17106fc4..bd39572c64 100644 --- a/src/contracts/Repository/Events/ContentType/CreateContentTypeEvent.php +++ b/src/contracts/Repository/Events/ContentType/CreateContentTypeEvent.php @@ -48,5 +48,3 @@ public function getContentTypeGroups(): array return $this->contentTypeGroups; } } - -class_alias(CreateContentTypeEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\CreateContentTypeEvent'); diff --git a/src/contracts/Repository/Events/ContentType/CreateContentTypeGroupEvent.php b/src/contracts/Repository/Events/ContentType/CreateContentTypeGroupEvent.php index e42bd6e672..0d3d537974 100644 --- a/src/contracts/Repository/Events/ContentType/CreateContentTypeGroupEvent.php +++ b/src/contracts/Repository/Events/ContentType/CreateContentTypeGroupEvent.php @@ -38,5 +38,3 @@ public function getContentTypeGroupCreateStruct(): ContentTypeGroupCreateStruct return $this->contentTypeGroupCreateStruct; } } - -class_alias(CreateContentTypeGroupEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\CreateContentTypeGroupEvent'); diff --git a/src/contracts/Repository/Events/ContentType/DeleteContentTypeEvent.php b/src/contracts/Repository/Events/ContentType/DeleteContentTypeEvent.php index 5b52a48780..e3fc0a907d 100644 --- a/src/contracts/Repository/Events/ContentType/DeleteContentTypeEvent.php +++ b/src/contracts/Repository/Events/ContentType/DeleteContentTypeEvent.php @@ -26,5 +26,3 @@ public function getContentType(): ContentType return $this->contentType; } } - -class_alias(DeleteContentTypeEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\DeleteContentTypeEvent'); diff --git a/src/contracts/Repository/Events/ContentType/DeleteContentTypeGroupEvent.php b/src/contracts/Repository/Events/ContentType/DeleteContentTypeGroupEvent.php index 3e3e7b6752..4941f4c66b 100644 --- a/src/contracts/Repository/Events/ContentType/DeleteContentTypeGroupEvent.php +++ b/src/contracts/Repository/Events/ContentType/DeleteContentTypeGroupEvent.php @@ -26,5 +26,3 @@ public function getContentTypeGroup(): ContentTypeGroup return $this->contentTypeGroup; } } - -class_alias(DeleteContentTypeGroupEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\DeleteContentTypeGroupEvent'); diff --git a/src/contracts/Repository/Events/ContentType/PublishContentTypeDraftEvent.php b/src/contracts/Repository/Events/ContentType/PublishContentTypeDraftEvent.php index eadc6aef42..e19b5b0f6c 100644 --- a/src/contracts/Repository/Events/ContentType/PublishContentTypeDraftEvent.php +++ b/src/contracts/Repository/Events/ContentType/PublishContentTypeDraftEvent.php @@ -26,5 +26,3 @@ public function getContentTypeDraft(): ContentTypeDraft return $this->contentTypeDraft; } } - -class_alias(PublishContentTypeDraftEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\PublishContentTypeDraftEvent'); diff --git a/src/contracts/Repository/Events/ContentType/RemoveContentTypeTranslationEvent.php b/src/contracts/Repository/Events/ContentType/RemoveContentTypeTranslationEvent.php index 0081a4ccfb..a6d78df42d 100644 --- a/src/contracts/Repository/Events/ContentType/RemoveContentTypeTranslationEvent.php +++ b/src/contracts/Repository/Events/ContentType/RemoveContentTypeTranslationEvent.php @@ -47,5 +47,3 @@ public function getLanguageCode(): string return $this->languageCode; } } - -class_alias(RemoveContentTypeTranslationEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\RemoveContentTypeTranslationEvent'); diff --git a/src/contracts/Repository/Events/ContentType/RemoveFieldDefinitionEvent.php b/src/contracts/Repository/Events/ContentType/RemoveFieldDefinitionEvent.php index ee1e78de4e..43196645d8 100644 --- a/src/contracts/Repository/Events/ContentType/RemoveFieldDefinitionEvent.php +++ b/src/contracts/Repository/Events/ContentType/RemoveFieldDefinitionEvent.php @@ -38,5 +38,3 @@ public function getFieldDefinition(): FieldDefinition return $this->fieldDefinition; } } - -class_alias(RemoveFieldDefinitionEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\RemoveFieldDefinitionEvent'); diff --git a/src/contracts/Repository/Events/ContentType/UnassignContentTypeGroupEvent.php b/src/contracts/Repository/Events/ContentType/UnassignContentTypeGroupEvent.php index 5f8b2561a7..9adc7dd415 100644 --- a/src/contracts/Repository/Events/ContentType/UnassignContentTypeGroupEvent.php +++ b/src/contracts/Repository/Events/ContentType/UnassignContentTypeGroupEvent.php @@ -38,5 +38,3 @@ public function getContentTypeGroup(): ContentTypeGroup return $this->contentTypeGroup; } } - -class_alias(UnassignContentTypeGroupEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\UnassignContentTypeGroupEvent'); diff --git a/src/contracts/Repository/Events/ContentType/UpdateContentTypeDraftEvent.php b/src/contracts/Repository/Events/ContentType/UpdateContentTypeDraftEvent.php index 91f1993e9e..00d8e74246 100644 --- a/src/contracts/Repository/Events/ContentType/UpdateContentTypeDraftEvent.php +++ b/src/contracts/Repository/Events/ContentType/UpdateContentTypeDraftEvent.php @@ -38,5 +38,3 @@ public function getContentTypeUpdateStruct(): ContentTypeUpdateStruct return $this->contentTypeUpdateStruct; } } - -class_alias(UpdateContentTypeDraftEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\UpdateContentTypeDraftEvent'); diff --git a/src/contracts/Repository/Events/ContentType/UpdateContentTypeGroupEvent.php b/src/contracts/Repository/Events/ContentType/UpdateContentTypeGroupEvent.php index b42b5eebcf..65493292c5 100644 --- a/src/contracts/Repository/Events/ContentType/UpdateContentTypeGroupEvent.php +++ b/src/contracts/Repository/Events/ContentType/UpdateContentTypeGroupEvent.php @@ -38,5 +38,3 @@ public function getContentTypeGroupUpdateStruct(): ContentTypeGroupUpdateStruct return $this->contentTypeGroupUpdateStruct; } } - -class_alias(UpdateContentTypeGroupEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\UpdateContentTypeGroupEvent'); diff --git a/src/contracts/Repository/Events/ContentType/UpdateFieldDefinitionEvent.php b/src/contracts/Repository/Events/ContentType/UpdateFieldDefinitionEvent.php index 4f89a944ee..0368061b75 100644 --- a/src/contracts/Repository/Events/ContentType/UpdateFieldDefinitionEvent.php +++ b/src/contracts/Repository/Events/ContentType/UpdateFieldDefinitionEvent.php @@ -49,5 +49,3 @@ public function getFieldDefinitionUpdateStruct(): FieldDefinitionUpdateStruct return $this->fieldDefinitionUpdateStruct; } } - -class_alias(UpdateFieldDefinitionEvent::class, 'eZ\Publish\API\Repository\Events\ContentType\UpdateFieldDefinitionEvent'); diff --git a/src/contracts/Repository/Events/Language/BeforeCreateLanguageEvent.php b/src/contracts/Repository/Events/Language/BeforeCreateLanguageEvent.php index 2ef254fe9e..04291b8a4a 100644 --- a/src/contracts/Repository/Events/Language/BeforeCreateLanguageEvent.php +++ b/src/contracts/Repository/Events/Language/BeforeCreateLanguageEvent.php @@ -50,5 +50,3 @@ public function hasLanguage(): bool return $this->language instanceof Language; } } - -class_alias(BeforeCreateLanguageEvent::class, 'eZ\Publish\API\Repository\Events\Language\BeforeCreateLanguageEvent'); diff --git a/src/contracts/Repository/Events/Language/BeforeDeleteLanguageEvent.php b/src/contracts/Repository/Events/Language/BeforeDeleteLanguageEvent.php index 10e75759a5..cbbdb0e44d 100644 --- a/src/contracts/Repository/Events/Language/BeforeDeleteLanguageEvent.php +++ b/src/contracts/Repository/Events/Language/BeforeDeleteLanguageEvent.php @@ -26,5 +26,3 @@ public function getLanguage(): Language return $this->language; } } - -class_alias(BeforeDeleteLanguageEvent::class, 'eZ\Publish\API\Repository\Events\Language\BeforeDeleteLanguageEvent'); diff --git a/src/contracts/Repository/Events/Language/BeforeDisableLanguageEvent.php b/src/contracts/Repository/Events/Language/BeforeDisableLanguageEvent.php index 8c514a9cf4..58d35fe568 100644 --- a/src/contracts/Repository/Events/Language/BeforeDisableLanguageEvent.php +++ b/src/contracts/Repository/Events/Language/BeforeDisableLanguageEvent.php @@ -49,5 +49,3 @@ public function hasDisabledLanguage(): bool return $this->disabledLanguage instanceof Language; } } - -class_alias(BeforeDisableLanguageEvent::class, 'eZ\Publish\API\Repository\Events\Language\BeforeDisableLanguageEvent'); diff --git a/src/contracts/Repository/Events/Language/BeforeEnableLanguageEvent.php b/src/contracts/Repository/Events/Language/BeforeEnableLanguageEvent.php index 007de39ec1..cef3f53404 100644 --- a/src/contracts/Repository/Events/Language/BeforeEnableLanguageEvent.php +++ b/src/contracts/Repository/Events/Language/BeforeEnableLanguageEvent.php @@ -49,5 +49,3 @@ public function hasEnabledLanguage(): bool return $this->enabledLanguage instanceof Language; } } - -class_alias(BeforeEnableLanguageEvent::class, 'eZ\Publish\API\Repository\Events\Language\BeforeEnableLanguageEvent'); diff --git a/src/contracts/Repository/Events/Language/BeforeUpdateLanguageNameEvent.php b/src/contracts/Repository/Events/Language/BeforeUpdateLanguageNameEvent.php index da7a9e70a4..550e53609f 100644 --- a/src/contracts/Repository/Events/Language/BeforeUpdateLanguageNameEvent.php +++ b/src/contracts/Repository/Events/Language/BeforeUpdateLanguageNameEvent.php @@ -58,5 +58,3 @@ public function hasUpdatedLanguage(): bool return $this->updatedLanguage instanceof Language; } } - -class_alias(BeforeUpdateLanguageNameEvent::class, 'eZ\Publish\API\Repository\Events\Language\BeforeUpdateLanguageNameEvent'); diff --git a/src/contracts/Repository/Events/Language/CreateLanguageEvent.php b/src/contracts/Repository/Events/Language/CreateLanguageEvent.php index a67d68cec2..fb1c6efd96 100644 --- a/src/contracts/Repository/Events/Language/CreateLanguageEvent.php +++ b/src/contracts/Repository/Events/Language/CreateLanguageEvent.php @@ -38,5 +38,3 @@ public function getLanguageCreateStruct(): LanguageCreateStruct return $this->languageCreateStruct; } } - -class_alias(CreateLanguageEvent::class, 'eZ\Publish\API\Repository\Events\Language\CreateLanguageEvent'); diff --git a/src/contracts/Repository/Events/Language/DeleteLanguageEvent.php b/src/contracts/Repository/Events/Language/DeleteLanguageEvent.php index 7a60c0dca8..5186d48cbd 100644 --- a/src/contracts/Repository/Events/Language/DeleteLanguageEvent.php +++ b/src/contracts/Repository/Events/Language/DeleteLanguageEvent.php @@ -26,5 +26,3 @@ public function getLanguage(): Language return $this->language; } } - -class_alias(DeleteLanguageEvent::class, 'eZ\Publish\API\Repository\Events\Language\DeleteLanguageEvent'); diff --git a/src/contracts/Repository/Events/Language/DisableLanguageEvent.php b/src/contracts/Repository/Events/Language/DisableLanguageEvent.php index 0f2d22decd..0da88b89ae 100644 --- a/src/contracts/Repository/Events/Language/DisableLanguageEvent.php +++ b/src/contracts/Repository/Events/Language/DisableLanguageEvent.php @@ -37,5 +37,3 @@ public function getLanguage(): Language return $this->language; } } - -class_alias(DisableLanguageEvent::class, 'eZ\Publish\API\Repository\Events\Language\DisableLanguageEvent'); diff --git a/src/contracts/Repository/Events/Language/EnableLanguageEvent.php b/src/contracts/Repository/Events/Language/EnableLanguageEvent.php index 12fb30de7a..3fa5468948 100644 --- a/src/contracts/Repository/Events/Language/EnableLanguageEvent.php +++ b/src/contracts/Repository/Events/Language/EnableLanguageEvent.php @@ -37,5 +37,3 @@ public function getLanguage(): Language return $this->language; } } - -class_alias(EnableLanguageEvent::class, 'eZ\Publish\API\Repository\Events\Language\EnableLanguageEvent'); diff --git a/src/contracts/Repository/Events/Language/UpdateLanguageNameEvent.php b/src/contracts/Repository/Events/Language/UpdateLanguageNameEvent.php index c39fb372cc..0e0d02adbb 100644 --- a/src/contracts/Repository/Events/Language/UpdateLanguageNameEvent.php +++ b/src/contracts/Repository/Events/Language/UpdateLanguageNameEvent.php @@ -47,5 +47,3 @@ public function getNewName(): string return $this->newName; } } - -class_alias(UpdateLanguageNameEvent::class, 'eZ\Publish\API\Repository\Events\Language\UpdateLanguageNameEvent'); diff --git a/src/contracts/Repository/Events/Location/BeforeCopySubtreeEvent.php b/src/contracts/Repository/Events/Location/BeforeCopySubtreeEvent.php index 94865160c5..dc04dc4b5e 100644 --- a/src/contracts/Repository/Events/Location/BeforeCopySubtreeEvent.php +++ b/src/contracts/Repository/Events/Location/BeforeCopySubtreeEvent.php @@ -58,5 +58,3 @@ public function hasLocation(): bool return $this->location instanceof Location; } } - -class_alias(BeforeCopySubtreeEvent::class, 'eZ\Publish\API\Repository\Events\Location\BeforeCopySubtreeEvent'); diff --git a/src/contracts/Repository/Events/Location/BeforeCreateLocationEvent.php b/src/contracts/Repository/Events/Location/BeforeCreateLocationEvent.php index fda1f6b50e..9b47d301c9 100644 --- a/src/contracts/Repository/Events/Location/BeforeCreateLocationEvent.php +++ b/src/contracts/Repository/Events/Location/BeforeCreateLocationEvent.php @@ -60,5 +60,3 @@ public function hasLocation(): bool return $this->location instanceof Location; } } - -class_alias(BeforeCreateLocationEvent::class, 'eZ\Publish\API\Repository\Events\Location\BeforeCreateLocationEvent'); diff --git a/src/contracts/Repository/Events/Location/BeforeDeleteLocationEvent.php b/src/contracts/Repository/Events/Location/BeforeDeleteLocationEvent.php index 9120e41b7e..316c903d37 100644 --- a/src/contracts/Repository/Events/Location/BeforeDeleteLocationEvent.php +++ b/src/contracts/Repository/Events/Location/BeforeDeleteLocationEvent.php @@ -26,5 +26,3 @@ public function getLocation(): Location return $this->location; } } - -class_alias(BeforeDeleteLocationEvent::class, 'eZ\Publish\API\Repository\Events\Location\BeforeDeleteLocationEvent'); diff --git a/src/contracts/Repository/Events/Location/BeforeHideLocationEvent.php b/src/contracts/Repository/Events/Location/BeforeHideLocationEvent.php index 1cde181680..d108669424 100644 --- a/src/contracts/Repository/Events/Location/BeforeHideLocationEvent.php +++ b/src/contracts/Repository/Events/Location/BeforeHideLocationEvent.php @@ -49,5 +49,3 @@ public function hasHiddenLocation(): bool return $this->hiddenLocation instanceof Location; } } - -class_alias(BeforeHideLocationEvent::class, 'eZ\Publish\API\Repository\Events\Location\BeforeHideLocationEvent'); diff --git a/src/contracts/Repository/Events/Location/BeforeMoveSubtreeEvent.php b/src/contracts/Repository/Events/Location/BeforeMoveSubtreeEvent.php index b116119355..2dfa9dc116 100644 --- a/src/contracts/Repository/Events/Location/BeforeMoveSubtreeEvent.php +++ b/src/contracts/Repository/Events/Location/BeforeMoveSubtreeEvent.php @@ -35,5 +35,3 @@ public function getNewParentLocation(): Location return $this->newParentLocation; } } - -class_alias(BeforeMoveSubtreeEvent::class, 'eZ\Publish\API\Repository\Events\Location\BeforeMoveSubtreeEvent'); diff --git a/src/contracts/Repository/Events/Location/BeforeSwapLocationEvent.php b/src/contracts/Repository/Events/Location/BeforeSwapLocationEvent.php index 6f10e9f4fb..e84e903a31 100644 --- a/src/contracts/Repository/Events/Location/BeforeSwapLocationEvent.php +++ b/src/contracts/Repository/Events/Location/BeforeSwapLocationEvent.php @@ -35,5 +35,3 @@ public function getLocation2(): Location return $this->location2; } } - -class_alias(BeforeSwapLocationEvent::class, 'eZ\Publish\API\Repository\Events\Location\BeforeSwapLocationEvent'); diff --git a/src/contracts/Repository/Events/Location/BeforeUnhideLocationEvent.php b/src/contracts/Repository/Events/Location/BeforeUnhideLocationEvent.php index 336a707363..081eb4889a 100644 --- a/src/contracts/Repository/Events/Location/BeforeUnhideLocationEvent.php +++ b/src/contracts/Repository/Events/Location/BeforeUnhideLocationEvent.php @@ -49,5 +49,3 @@ public function hasRevealedLocation(): bool return $this->revealedLocation instanceof Location; } } - -class_alias(BeforeUnhideLocationEvent::class, 'eZ\Publish\API\Repository\Events\Location\BeforeUnhideLocationEvent'); diff --git a/src/contracts/Repository/Events/Location/BeforeUpdateLocationEvent.php b/src/contracts/Repository/Events/Location/BeforeUpdateLocationEvent.php index 9d14ef3af6..455d84b4ab 100644 --- a/src/contracts/Repository/Events/Location/BeforeUpdateLocationEvent.php +++ b/src/contracts/Repository/Events/Location/BeforeUpdateLocationEvent.php @@ -59,5 +59,3 @@ public function hasUpdatedLocation(): bool return $this->updatedLocation instanceof Location; } } - -class_alias(BeforeUpdateLocationEvent::class, 'eZ\Publish\API\Repository\Events\Location\BeforeUpdateLocationEvent'); diff --git a/src/contracts/Repository/Events/Location/CopySubtreeEvent.php b/src/contracts/Repository/Events/Location/CopySubtreeEvent.php index acb0be4fe4..e52bb3c734 100644 --- a/src/contracts/Repository/Events/Location/CopySubtreeEvent.php +++ b/src/contracts/Repository/Events/Location/CopySubtreeEvent.php @@ -47,5 +47,3 @@ public function getTargetParentLocation(): Location return $this->targetParentLocation; } } - -class_alias(CopySubtreeEvent::class, 'eZ\Publish\API\Repository\Events\Location\CopySubtreeEvent'); diff --git a/src/contracts/Repository/Events/Location/CreateLocationEvent.php b/src/contracts/Repository/Events/Location/CreateLocationEvent.php index 7aef04e238..fff974a204 100644 --- a/src/contracts/Repository/Events/Location/CreateLocationEvent.php +++ b/src/contracts/Repository/Events/Location/CreateLocationEvent.php @@ -49,5 +49,3 @@ public function getLocationCreateStruct(): LocationCreateStruct return $this->locationCreateStruct; } } - -class_alias(CreateLocationEvent::class, 'eZ\Publish\API\Repository\Events\Location\CreateLocationEvent'); diff --git a/src/contracts/Repository/Events/Location/DeleteLocationEvent.php b/src/contracts/Repository/Events/Location/DeleteLocationEvent.php index 8fc5aca85f..eae70e86ef 100644 --- a/src/contracts/Repository/Events/Location/DeleteLocationEvent.php +++ b/src/contracts/Repository/Events/Location/DeleteLocationEvent.php @@ -26,5 +26,3 @@ public function getLocation(): Location return $this->location; } } - -class_alias(DeleteLocationEvent::class, 'eZ\Publish\API\Repository\Events\Location\DeleteLocationEvent'); diff --git a/src/contracts/Repository/Events/Location/HideLocationEvent.php b/src/contracts/Repository/Events/Location/HideLocationEvent.php index f3bd956d09..7518436127 100644 --- a/src/contracts/Repository/Events/Location/HideLocationEvent.php +++ b/src/contracts/Repository/Events/Location/HideLocationEvent.php @@ -37,5 +37,3 @@ public function getLocation(): Location return $this->location; } } - -class_alias(HideLocationEvent::class, 'eZ\Publish\API\Repository\Events\Location\HideLocationEvent'); diff --git a/src/contracts/Repository/Events/Location/MoveSubtreeEvent.php b/src/contracts/Repository/Events/Location/MoveSubtreeEvent.php index 6ffbea80e7..02a668d525 100644 --- a/src/contracts/Repository/Events/Location/MoveSubtreeEvent.php +++ b/src/contracts/Repository/Events/Location/MoveSubtreeEvent.php @@ -37,5 +37,3 @@ public function getNewParentLocation(): Location return $this->newParentLocation; } } - -class_alias(MoveSubtreeEvent::class, 'eZ\Publish\API\Repository\Events\Location\MoveSubtreeEvent'); diff --git a/src/contracts/Repository/Events/Location/SwapLocationEvent.php b/src/contracts/Repository/Events/Location/SwapLocationEvent.php index 1f6c259781..c60df93659 100644 --- a/src/contracts/Repository/Events/Location/SwapLocationEvent.php +++ b/src/contracts/Repository/Events/Location/SwapLocationEvent.php @@ -37,5 +37,3 @@ public function getLocation2(): Location return $this->location2; } } - -class_alias(SwapLocationEvent::class, 'eZ\Publish\API\Repository\Events\Location\SwapLocationEvent'); diff --git a/src/contracts/Repository/Events/Location/UnhideLocationEvent.php b/src/contracts/Repository/Events/Location/UnhideLocationEvent.php index 7266762257..37b511c41f 100644 --- a/src/contracts/Repository/Events/Location/UnhideLocationEvent.php +++ b/src/contracts/Repository/Events/Location/UnhideLocationEvent.php @@ -37,5 +37,3 @@ public function getLocation(): Location return $this->location; } } - -class_alias(UnhideLocationEvent::class, 'eZ\Publish\API\Repository\Events\Location\UnhideLocationEvent'); diff --git a/src/contracts/Repository/Events/Location/UpdateLocationEvent.php b/src/contracts/Repository/Events/Location/UpdateLocationEvent.php index c645374c6d..642073f96c 100644 --- a/src/contracts/Repository/Events/Location/UpdateLocationEvent.php +++ b/src/contracts/Repository/Events/Location/UpdateLocationEvent.php @@ -48,5 +48,3 @@ public function getLocationUpdateStruct(): LocationUpdateStruct return $this->locationUpdateStruct; } } - -class_alias(UpdateLocationEvent::class, 'eZ\Publish\API\Repository\Events\Location\UpdateLocationEvent'); diff --git a/src/contracts/Repository/Events/Notification/BeforeCreateNotificationEvent.php b/src/contracts/Repository/Events/Notification/BeforeCreateNotificationEvent.php index f9d3a273f9..1b3827c413 100644 --- a/src/contracts/Repository/Events/Notification/BeforeCreateNotificationEvent.php +++ b/src/contracts/Repository/Events/Notification/BeforeCreateNotificationEvent.php @@ -50,5 +50,3 @@ public function hasNotification(): bool return $this->notification instanceof Notification; } } - -class_alias(BeforeCreateNotificationEvent::class, 'eZ\Publish\API\Repository\Events\Notification\BeforeCreateNotificationEvent'); diff --git a/src/contracts/Repository/Events/Notification/BeforeDeleteNotificationEvent.php b/src/contracts/Repository/Events/Notification/BeforeDeleteNotificationEvent.php index 0a63162d9c..bec89d4137 100644 --- a/src/contracts/Repository/Events/Notification/BeforeDeleteNotificationEvent.php +++ b/src/contracts/Repository/Events/Notification/BeforeDeleteNotificationEvent.php @@ -26,5 +26,3 @@ public function getNotification(): Notification return $this->notification; } } - -class_alias(BeforeDeleteNotificationEvent::class, 'eZ\Publish\API\Repository\Events\Notification\BeforeDeleteNotificationEvent'); diff --git a/src/contracts/Repository/Events/Notification/BeforeMarkNotificationAsReadEvent.php b/src/contracts/Repository/Events/Notification/BeforeMarkNotificationAsReadEvent.php index 76197b069c..98cd8baf1f 100644 --- a/src/contracts/Repository/Events/Notification/BeforeMarkNotificationAsReadEvent.php +++ b/src/contracts/Repository/Events/Notification/BeforeMarkNotificationAsReadEvent.php @@ -26,5 +26,3 @@ public function getNotification(): Notification return $this->notification; } } - -class_alias(BeforeMarkNotificationAsReadEvent::class, 'eZ\Publish\API\Repository\Events\Notification\BeforeMarkNotificationAsReadEvent'); diff --git a/src/contracts/Repository/Events/Notification/CreateNotificationEvent.php b/src/contracts/Repository/Events/Notification/CreateNotificationEvent.php index 8c340bbd2c..a5c0294e04 100644 --- a/src/contracts/Repository/Events/Notification/CreateNotificationEvent.php +++ b/src/contracts/Repository/Events/Notification/CreateNotificationEvent.php @@ -38,5 +38,3 @@ public function getCreateStruct(): CreateStruct return $this->createStruct; } } - -class_alias(CreateNotificationEvent::class, 'eZ\Publish\API\Repository\Events\Notification\CreateNotificationEvent'); diff --git a/src/contracts/Repository/Events/Notification/DeleteNotificationEvent.php b/src/contracts/Repository/Events/Notification/DeleteNotificationEvent.php index 1a25c93738..3c300612d7 100644 --- a/src/contracts/Repository/Events/Notification/DeleteNotificationEvent.php +++ b/src/contracts/Repository/Events/Notification/DeleteNotificationEvent.php @@ -26,5 +26,3 @@ public function getNotification(): Notification return $this->notification; } } - -class_alias(DeleteNotificationEvent::class, 'eZ\Publish\API\Repository\Events\Notification\DeleteNotificationEvent'); diff --git a/src/contracts/Repository/Events/Notification/MarkNotificationAsReadEvent.php b/src/contracts/Repository/Events/Notification/MarkNotificationAsReadEvent.php index 0efdc49357..1c45771144 100644 --- a/src/contracts/Repository/Events/Notification/MarkNotificationAsReadEvent.php +++ b/src/contracts/Repository/Events/Notification/MarkNotificationAsReadEvent.php @@ -26,5 +26,3 @@ public function getNotification(): Notification return $this->notification; } } - -class_alias(MarkNotificationAsReadEvent::class, 'eZ\Publish\API\Repository\Events\Notification\MarkNotificationAsReadEvent'); diff --git a/src/contracts/Repository/Events/ObjectState/BeforeCreateObjectStateEvent.php b/src/contracts/Repository/Events/ObjectState/BeforeCreateObjectStateEvent.php index b723a943ab..d0393f2163 100644 --- a/src/contracts/Repository/Events/ObjectState/BeforeCreateObjectStateEvent.php +++ b/src/contracts/Repository/Events/ObjectState/BeforeCreateObjectStateEvent.php @@ -60,5 +60,3 @@ public function hasObjectState(): bool return $this->objectState instanceof ObjectState; } } - -class_alias(BeforeCreateObjectStateEvent::class, 'eZ\Publish\API\Repository\Events\ObjectState\BeforeCreateObjectStateEvent'); diff --git a/src/contracts/Repository/Events/ObjectState/BeforeCreateObjectStateGroupEvent.php b/src/contracts/Repository/Events/ObjectState/BeforeCreateObjectStateGroupEvent.php index d293261e1c..03965101ef 100644 --- a/src/contracts/Repository/Events/ObjectState/BeforeCreateObjectStateGroupEvent.php +++ b/src/contracts/Repository/Events/ObjectState/BeforeCreateObjectStateGroupEvent.php @@ -50,5 +50,3 @@ public function hasObjectStateGroup(): bool return $this->objectStateGroup instanceof ObjectStateGroup; } } - -class_alias(BeforeCreateObjectStateGroupEvent::class, 'eZ\Publish\API\Repository\Events\ObjectState\BeforeCreateObjectStateGroupEvent'); diff --git a/src/contracts/Repository/Events/ObjectState/BeforeDeleteObjectStateEvent.php b/src/contracts/Repository/Events/ObjectState/BeforeDeleteObjectStateEvent.php index 256c0ba2f8..719a8e60da 100644 --- a/src/contracts/Repository/Events/ObjectState/BeforeDeleteObjectStateEvent.php +++ b/src/contracts/Repository/Events/ObjectState/BeforeDeleteObjectStateEvent.php @@ -26,5 +26,3 @@ public function getObjectState(): ObjectState return $this->objectState; } } - -class_alias(BeforeDeleteObjectStateEvent::class, 'eZ\Publish\API\Repository\Events\ObjectState\BeforeDeleteObjectStateEvent'); diff --git a/src/contracts/Repository/Events/ObjectState/BeforeDeleteObjectStateGroupEvent.php b/src/contracts/Repository/Events/ObjectState/BeforeDeleteObjectStateGroupEvent.php index 96f3a79ec8..25486cefa9 100644 --- a/src/contracts/Repository/Events/ObjectState/BeforeDeleteObjectStateGroupEvent.php +++ b/src/contracts/Repository/Events/ObjectState/BeforeDeleteObjectStateGroupEvent.php @@ -26,5 +26,3 @@ public function getObjectStateGroup(): ObjectStateGroup return $this->objectStateGroup; } } - -class_alias(BeforeDeleteObjectStateGroupEvent::class, 'eZ\Publish\API\Repository\Events\ObjectState\BeforeDeleteObjectStateGroupEvent'); diff --git a/src/contracts/Repository/Events/ObjectState/BeforeSetContentStateEvent.php b/src/contracts/Repository/Events/ObjectState/BeforeSetContentStateEvent.php index 88642fac0f..42bc078d59 100644 --- a/src/contracts/Repository/Events/ObjectState/BeforeSetContentStateEvent.php +++ b/src/contracts/Repository/Events/ObjectState/BeforeSetContentStateEvent.php @@ -46,5 +46,3 @@ public function getObjectState(): ObjectState return $this->objectState; } } - -class_alias(BeforeSetContentStateEvent::class, 'eZ\Publish\API\Repository\Events\ObjectState\BeforeSetContentStateEvent'); diff --git a/src/contracts/Repository/Events/ObjectState/BeforeSetPriorityOfObjectStateEvent.php b/src/contracts/Repository/Events/ObjectState/BeforeSetPriorityOfObjectStateEvent.php index c913b01409..d3c9cd3bad 100644 --- a/src/contracts/Repository/Events/ObjectState/BeforeSetPriorityOfObjectStateEvent.php +++ b/src/contracts/Repository/Events/ObjectState/BeforeSetPriorityOfObjectStateEvent.php @@ -34,5 +34,3 @@ public function getPriority() return $this->priority; } } - -class_alias(BeforeSetPriorityOfObjectStateEvent::class, 'eZ\Publish\API\Repository\Events\ObjectState\BeforeSetPriorityOfObjectStateEvent'); diff --git a/src/contracts/Repository/Events/ObjectState/BeforeUpdateObjectStateEvent.php b/src/contracts/Repository/Events/ObjectState/BeforeUpdateObjectStateEvent.php index 32cbba6212..3df199026c 100644 --- a/src/contracts/Repository/Events/ObjectState/BeforeUpdateObjectStateEvent.php +++ b/src/contracts/Repository/Events/ObjectState/BeforeUpdateObjectStateEvent.php @@ -59,5 +59,3 @@ public function hasUpdatedObjectState(): bool return $this->updatedObjectState instanceof ObjectState; } } - -class_alias(BeforeUpdateObjectStateEvent::class, 'eZ\Publish\API\Repository\Events\ObjectState\BeforeUpdateObjectStateEvent'); diff --git a/src/contracts/Repository/Events/ObjectState/BeforeUpdateObjectStateGroupEvent.php b/src/contracts/Repository/Events/ObjectState/BeforeUpdateObjectStateGroupEvent.php index a6a5e694e7..f2411eac80 100644 --- a/src/contracts/Repository/Events/ObjectState/BeforeUpdateObjectStateGroupEvent.php +++ b/src/contracts/Repository/Events/ObjectState/BeforeUpdateObjectStateGroupEvent.php @@ -59,5 +59,3 @@ public function hasUpdatedObjectStateGroup(): bool return $this->updatedObjectStateGroup instanceof ObjectStateGroup; } } - -class_alias(BeforeUpdateObjectStateGroupEvent::class, 'eZ\Publish\API\Repository\Events\ObjectState\BeforeUpdateObjectStateGroupEvent'); diff --git a/src/contracts/Repository/Events/ObjectState/CreateObjectStateEvent.php b/src/contracts/Repository/Events/ObjectState/CreateObjectStateEvent.php index f524c51894..80c9087190 100644 --- a/src/contracts/Repository/Events/ObjectState/CreateObjectStateEvent.php +++ b/src/contracts/Repository/Events/ObjectState/CreateObjectStateEvent.php @@ -49,5 +49,3 @@ public function getObjectStateCreateStruct(): ObjectStateCreateStruct return $this->objectStateCreateStruct; } } - -class_alias(CreateObjectStateEvent::class, 'eZ\Publish\API\Repository\Events\ObjectState\CreateObjectStateEvent'); diff --git a/src/contracts/Repository/Events/ObjectState/CreateObjectStateGroupEvent.php b/src/contracts/Repository/Events/ObjectState/CreateObjectStateGroupEvent.php index c185405f51..e90555a34b 100644 --- a/src/contracts/Repository/Events/ObjectState/CreateObjectStateGroupEvent.php +++ b/src/contracts/Repository/Events/ObjectState/CreateObjectStateGroupEvent.php @@ -38,5 +38,3 @@ public function getObjectStateGroupCreateStruct(): ObjectStateGroupCreateStruct return $this->objectStateGroupCreateStruct; } } - -class_alias(CreateObjectStateGroupEvent::class, 'eZ\Publish\API\Repository\Events\ObjectState\CreateObjectStateGroupEvent'); diff --git a/src/contracts/Repository/Events/ObjectState/DeleteObjectStateEvent.php b/src/contracts/Repository/Events/ObjectState/DeleteObjectStateEvent.php index 4a6f2bf412..469bdfa662 100644 --- a/src/contracts/Repository/Events/ObjectState/DeleteObjectStateEvent.php +++ b/src/contracts/Repository/Events/ObjectState/DeleteObjectStateEvent.php @@ -26,5 +26,3 @@ public function getObjectState(): ObjectState return $this->objectState; } } - -class_alias(DeleteObjectStateEvent::class, 'eZ\Publish\API\Repository\Events\ObjectState\DeleteObjectStateEvent'); diff --git a/src/contracts/Repository/Events/ObjectState/DeleteObjectStateGroupEvent.php b/src/contracts/Repository/Events/ObjectState/DeleteObjectStateGroupEvent.php index 5707efc456..02b8994fdc 100644 --- a/src/contracts/Repository/Events/ObjectState/DeleteObjectStateGroupEvent.php +++ b/src/contracts/Repository/Events/ObjectState/DeleteObjectStateGroupEvent.php @@ -26,5 +26,3 @@ public function getObjectStateGroup(): ObjectStateGroup return $this->objectStateGroup; } } - -class_alias(DeleteObjectStateGroupEvent::class, 'eZ\Publish\API\Repository\Events\ObjectState\DeleteObjectStateGroupEvent'); diff --git a/src/contracts/Repository/Events/ObjectState/SetContentStateEvent.php b/src/contracts/Repository/Events/ObjectState/SetContentStateEvent.php index 8949497f8d..f30e5dffc7 100644 --- a/src/contracts/Repository/Events/ObjectState/SetContentStateEvent.php +++ b/src/contracts/Repository/Events/ObjectState/SetContentStateEvent.php @@ -49,5 +49,3 @@ public function getObjectState(): ObjectState return $this->objectState; } } - -class_alias(SetContentStateEvent::class, 'eZ\Publish\API\Repository\Events\ObjectState\SetContentStateEvent'); diff --git a/src/contracts/Repository/Events/ObjectState/SetPriorityOfObjectStateEvent.php b/src/contracts/Repository/Events/ObjectState/SetPriorityOfObjectStateEvent.php index f717fbacee..78499fbee3 100644 --- a/src/contracts/Repository/Events/ObjectState/SetPriorityOfObjectStateEvent.php +++ b/src/contracts/Repository/Events/ObjectState/SetPriorityOfObjectStateEvent.php @@ -36,5 +36,3 @@ public function getPriority() return $this->priority; } } - -class_alias(SetPriorityOfObjectStateEvent::class, 'eZ\Publish\API\Repository\Events\ObjectState\SetPriorityOfObjectStateEvent'); diff --git a/src/contracts/Repository/Events/ObjectState/UpdateObjectStateEvent.php b/src/contracts/Repository/Events/ObjectState/UpdateObjectStateEvent.php index bc31e657c4..d327ff383d 100644 --- a/src/contracts/Repository/Events/ObjectState/UpdateObjectStateEvent.php +++ b/src/contracts/Repository/Events/ObjectState/UpdateObjectStateEvent.php @@ -48,5 +48,3 @@ public function getObjectStateUpdateStruct(): ObjectStateUpdateStruct return $this->objectStateUpdateStruct; } } - -class_alias(UpdateObjectStateEvent::class, 'eZ\Publish\API\Repository\Events\ObjectState\UpdateObjectStateEvent'); diff --git a/src/contracts/Repository/Events/ObjectState/UpdateObjectStateGroupEvent.php b/src/contracts/Repository/Events/ObjectState/UpdateObjectStateGroupEvent.php index 0bc1afb3e4..46ae8b3eca 100644 --- a/src/contracts/Repository/Events/ObjectState/UpdateObjectStateGroupEvent.php +++ b/src/contracts/Repository/Events/ObjectState/UpdateObjectStateGroupEvent.php @@ -48,5 +48,3 @@ public function getObjectStateGroupUpdateStruct(): ObjectStateGroupUpdateStruct return $this->objectStateGroupUpdateStruct; } } - -class_alias(UpdateObjectStateGroupEvent::class, 'eZ\Publish\API\Repository\Events\ObjectState\UpdateObjectStateGroupEvent'); diff --git a/src/contracts/Repository/Events/Role/AddPolicyByRoleDraftEvent.php b/src/contracts/Repository/Events/Role/AddPolicyByRoleDraftEvent.php index c9c7146090..24af78f65e 100644 --- a/src/contracts/Repository/Events/Role/AddPolicyByRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/AddPolicyByRoleDraftEvent.php @@ -47,5 +47,3 @@ public function getUpdatedRoleDraft(): RoleDraft return $this->updatedRoleDraft; } } - -class_alias(AddPolicyByRoleDraftEvent::class, 'eZ\Publish\API\Repository\Events\Role\AddPolicyByRoleDraftEvent'); diff --git a/src/contracts/Repository/Events/Role/AssignRoleToUserEvent.php b/src/contracts/Repository/Events/Role/AssignRoleToUserEvent.php index 4cffe97741..bfbb85861c 100644 --- a/src/contracts/Repository/Events/Role/AssignRoleToUserEvent.php +++ b/src/contracts/Repository/Events/Role/AssignRoleToUserEvent.php @@ -49,5 +49,3 @@ public function getRoleLimitation(): ?RoleLimitation return $this->roleLimitation; } } - -class_alias(AssignRoleToUserEvent::class, 'eZ\Publish\API\Repository\Events\Role\AssignRoleToUserEvent'); diff --git a/src/contracts/Repository/Events/Role/AssignRoleToUserGroupEvent.php b/src/contracts/Repository/Events/Role/AssignRoleToUserGroupEvent.php index 74e1aea1e7..558caf61e3 100644 --- a/src/contracts/Repository/Events/Role/AssignRoleToUserGroupEvent.php +++ b/src/contracts/Repository/Events/Role/AssignRoleToUserGroupEvent.php @@ -49,5 +49,3 @@ public function getRoleLimitation(): ?RoleLimitation return $this->roleLimitation; } } - -class_alias(AssignRoleToUserGroupEvent::class, 'eZ\Publish\API\Repository\Events\Role\AssignRoleToUserGroupEvent'); diff --git a/src/contracts/Repository/Events/Role/BeforeAddPolicyByRoleDraftEvent.php b/src/contracts/Repository/Events/Role/BeforeAddPolicyByRoleDraftEvent.php index ba3cda04b4..2b2cf734d2 100644 --- a/src/contracts/Repository/Events/Role/BeforeAddPolicyByRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeAddPolicyByRoleDraftEvent.php @@ -59,5 +59,3 @@ public function hasUpdatedRoleDraft(): bool return $this->updatedRoleDraft instanceof RoleDraft; } } - -class_alias(BeforeAddPolicyByRoleDraftEvent::class, 'eZ\Publish\API\Repository\Events\Role\BeforeAddPolicyByRoleDraftEvent'); diff --git a/src/contracts/Repository/Events/Role/BeforeAssignRoleToUserEvent.php b/src/contracts/Repository/Events/Role/BeforeAssignRoleToUserEvent.php index 09fce4ac3a..79e845cf98 100644 --- a/src/contracts/Repository/Events/Role/BeforeAssignRoleToUserEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeAssignRoleToUserEvent.php @@ -46,5 +46,3 @@ public function getRoleLimitation(): ?RoleLimitation return $this->roleLimitation; } } - -class_alias(BeforeAssignRoleToUserEvent::class, 'eZ\Publish\API\Repository\Events\Role\BeforeAssignRoleToUserEvent'); diff --git a/src/contracts/Repository/Events/Role/BeforeAssignRoleToUserGroupEvent.php b/src/contracts/Repository/Events/Role/BeforeAssignRoleToUserGroupEvent.php index 56ef34393f..6e3468cd96 100644 --- a/src/contracts/Repository/Events/Role/BeforeAssignRoleToUserGroupEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeAssignRoleToUserGroupEvent.php @@ -46,5 +46,3 @@ public function getRoleLimitation(): ?RoleLimitation return $this->roleLimitation; } } - -class_alias(BeforeAssignRoleToUserGroupEvent::class, 'eZ\Publish\API\Repository\Events\Role\BeforeAssignRoleToUserGroupEvent'); diff --git a/src/contracts/Repository/Events/Role/BeforeCopyRoleEvent.php b/src/contracts/Repository/Events/Role/BeforeCopyRoleEvent.php index 9380d86af1..88112c8770 100644 --- a/src/contracts/Repository/Events/Role/BeforeCopyRoleEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeCopyRoleEvent.php @@ -62,5 +62,3 @@ public function hasCopiedRole(): bool return $this->copiedRole instanceof Role; } } - -class_alias(BeforeCopyRoleEvent::class, 'eZ\Publish\API\Repository\Events\Role\BeforeCopyRoleEvent'); diff --git a/src/contracts/Repository/Events/Role/BeforeCreateRoleDraftEvent.php b/src/contracts/Repository/Events/Role/BeforeCreateRoleDraftEvent.php index 43082aa118..831b32ba30 100644 --- a/src/contracts/Repository/Events/Role/BeforeCreateRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeCreateRoleDraftEvent.php @@ -50,5 +50,3 @@ public function hasRoleDraft(): bool return $this->roleDraft instanceof RoleDraft; } } - -class_alias(BeforeCreateRoleDraftEvent::class, 'eZ\Publish\API\Repository\Events\Role\BeforeCreateRoleDraftEvent'); diff --git a/src/contracts/Repository/Events/Role/BeforeCreateRoleEvent.php b/src/contracts/Repository/Events/Role/BeforeCreateRoleEvent.php index 779f219e2d..76953db37b 100644 --- a/src/contracts/Repository/Events/Role/BeforeCreateRoleEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeCreateRoleEvent.php @@ -50,5 +50,3 @@ public function hasRoleDraft(): bool return $this->roleDraft instanceof RoleDraft; } } - -class_alias(BeforeCreateRoleEvent::class, 'eZ\Publish\API\Repository\Events\Role\BeforeCreateRoleEvent'); diff --git a/src/contracts/Repository/Events/Role/BeforeDeletePolicyEvent.php b/src/contracts/Repository/Events/Role/BeforeDeletePolicyEvent.php index 0396a2544a..3e4e8089f4 100644 --- a/src/contracts/Repository/Events/Role/BeforeDeletePolicyEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeDeletePolicyEvent.php @@ -26,5 +26,3 @@ public function getPolicy(): Policy return $this->policy; } } - -class_alias(BeforeDeletePolicyEvent::class, 'eZ\Publish\API\Repository\Events\Role\BeforeDeletePolicyEvent'); diff --git a/src/contracts/Repository/Events/Role/BeforeDeleteRoleDraftEvent.php b/src/contracts/Repository/Events/Role/BeforeDeleteRoleDraftEvent.php index 08353c1c41..9e979aa701 100644 --- a/src/contracts/Repository/Events/Role/BeforeDeleteRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeDeleteRoleDraftEvent.php @@ -26,5 +26,3 @@ public function getRoleDraft(): RoleDraft return $this->roleDraft; } } - -class_alias(BeforeDeleteRoleDraftEvent::class, 'eZ\Publish\API\Repository\Events\Role\BeforeDeleteRoleDraftEvent'); diff --git a/src/contracts/Repository/Events/Role/BeforeDeleteRoleEvent.php b/src/contracts/Repository/Events/Role/BeforeDeleteRoleEvent.php index 8eaa962331..4509d9a224 100644 --- a/src/contracts/Repository/Events/Role/BeforeDeleteRoleEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeDeleteRoleEvent.php @@ -26,5 +26,3 @@ public function getRole(): Role return $this->role; } } - -class_alias(BeforeDeleteRoleEvent::class, 'eZ\Publish\API\Repository\Events\Role\BeforeDeleteRoleEvent'); diff --git a/src/contracts/Repository/Events/Role/BeforePublishRoleDraftEvent.php b/src/contracts/Repository/Events/Role/BeforePublishRoleDraftEvent.php index 0cdde2af79..9c497b9314 100644 --- a/src/contracts/Repository/Events/Role/BeforePublishRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/BeforePublishRoleDraftEvent.php @@ -26,5 +26,3 @@ public function getRoleDraft(): RoleDraft return $this->roleDraft; } } - -class_alias(BeforePublishRoleDraftEvent::class, 'eZ\Publish\API\Repository\Events\Role\BeforePublishRoleDraftEvent'); diff --git a/src/contracts/Repository/Events/Role/BeforeRemovePolicyByRoleDraftEvent.php b/src/contracts/Repository/Events/Role/BeforeRemovePolicyByRoleDraftEvent.php index 6ba8bc875f..2c1cb6dbbc 100644 --- a/src/contracts/Repository/Events/Role/BeforeRemovePolicyByRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeRemovePolicyByRoleDraftEvent.php @@ -59,5 +59,3 @@ public function hasUpdatedRoleDraft(): bool return $this->updatedRoleDraft instanceof RoleDraft; } } - -class_alias(BeforeRemovePolicyByRoleDraftEvent::class, 'eZ\Publish\API\Repository\Events\Role\BeforeRemovePolicyByRoleDraftEvent'); diff --git a/src/contracts/Repository/Events/Role/BeforeRemoveRoleAssignmentEvent.php b/src/contracts/Repository/Events/Role/BeforeRemoveRoleAssignmentEvent.php index eef46ac408..36e4ccc8db 100644 --- a/src/contracts/Repository/Events/Role/BeforeRemoveRoleAssignmentEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeRemoveRoleAssignmentEvent.php @@ -26,5 +26,3 @@ public function getRoleAssignment(): RoleAssignment return $this->roleAssignment; } } - -class_alias(BeforeRemoveRoleAssignmentEvent::class, 'eZ\Publish\API\Repository\Events\Role\BeforeRemoveRoleAssignmentEvent'); diff --git a/src/contracts/Repository/Events/Role/BeforeUpdatePolicyByRoleDraftEvent.php b/src/contracts/Repository/Events/Role/BeforeUpdatePolicyByRoleDraftEvent.php index 9899d269fb..f1a56118d7 100644 --- a/src/contracts/Repository/Events/Role/BeforeUpdatePolicyByRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeUpdatePolicyByRoleDraftEvent.php @@ -69,5 +69,3 @@ public function hasUpdatedPolicyDraft(): bool return $this->updatedPolicyDraft instanceof PolicyDraft; } } - -class_alias(BeforeUpdatePolicyByRoleDraftEvent::class, 'eZ\Publish\API\Repository\Events\Role\BeforeUpdatePolicyByRoleDraftEvent'); diff --git a/src/contracts/Repository/Events/Role/BeforeUpdateRoleDraftEvent.php b/src/contracts/Repository/Events/Role/BeforeUpdateRoleDraftEvent.php index 5522f56ce1..f9fad19f97 100644 --- a/src/contracts/Repository/Events/Role/BeforeUpdateRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeUpdateRoleDraftEvent.php @@ -59,5 +59,3 @@ public function hasUpdatedRoleDraft(): bool return $this->updatedRoleDraft instanceof RoleDraft; } } - -class_alias(BeforeUpdateRoleDraftEvent::class, 'eZ\Publish\API\Repository\Events\Role\BeforeUpdateRoleDraftEvent'); diff --git a/src/contracts/Repository/Events/Role/CopyRoleEvent.php b/src/contracts/Repository/Events/Role/CopyRoleEvent.php index 9eeedd480d..402bead5e3 100644 --- a/src/contracts/Repository/Events/Role/CopyRoleEvent.php +++ b/src/contracts/Repository/Events/Role/CopyRoleEvent.php @@ -48,5 +48,3 @@ public function getRoleCopyStruct(): RoleCopyStruct return $this->roleCopyStruct; } } - -class_alias(CopyRoleEvent::class, 'eZ\Publish\API\Repository\Events\Role\CopyRoleEvent'); diff --git a/src/contracts/Repository/Events/Role/CreateRoleDraftEvent.php b/src/contracts/Repository/Events/Role/CreateRoleDraftEvent.php index b7b258e268..1a6877641a 100644 --- a/src/contracts/Repository/Events/Role/CreateRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/CreateRoleDraftEvent.php @@ -38,5 +38,3 @@ public function getRoleDraft(): RoleDraft return $this->roleDraft; } } - -class_alias(CreateRoleDraftEvent::class, 'eZ\Publish\API\Repository\Events\Role\CreateRoleDraftEvent'); diff --git a/src/contracts/Repository/Events/Role/CreateRoleEvent.php b/src/contracts/Repository/Events/Role/CreateRoleEvent.php index 5d912cb6d4..4a806578a2 100644 --- a/src/contracts/Repository/Events/Role/CreateRoleEvent.php +++ b/src/contracts/Repository/Events/Role/CreateRoleEvent.php @@ -38,5 +38,3 @@ public function getRoleDraft(): RoleDraft return $this->roleDraft; } } - -class_alias(CreateRoleEvent::class, 'eZ\Publish\API\Repository\Events\Role\CreateRoleEvent'); diff --git a/src/contracts/Repository/Events/Role/DeletePolicyEvent.php b/src/contracts/Repository/Events/Role/DeletePolicyEvent.php index ae4afd5416..b1511f288c 100644 --- a/src/contracts/Repository/Events/Role/DeletePolicyEvent.php +++ b/src/contracts/Repository/Events/Role/DeletePolicyEvent.php @@ -27,5 +27,3 @@ public function getPolicy(): Policy return $this->policy; } } - -class_alias(DeletePolicyEvent::class, 'eZ\Publish\API\Repository\Events\Role\DeletePolicyEvent'); diff --git a/src/contracts/Repository/Events/Role/DeleteRoleDraftEvent.php b/src/contracts/Repository/Events/Role/DeleteRoleDraftEvent.php index ae0d31c339..f3b5d420bc 100644 --- a/src/contracts/Repository/Events/Role/DeleteRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/DeleteRoleDraftEvent.php @@ -27,5 +27,3 @@ public function getRoleDraft(): RoleDraft return $this->roleDraft; } } - -class_alias(DeleteRoleDraftEvent::class, 'eZ\Publish\API\Repository\Events\Role\DeleteRoleDraftEvent'); diff --git a/src/contracts/Repository/Events/Role/DeleteRoleEvent.php b/src/contracts/Repository/Events/Role/DeleteRoleEvent.php index 88cf49b18a..153f0c862a 100644 --- a/src/contracts/Repository/Events/Role/DeleteRoleEvent.php +++ b/src/contracts/Repository/Events/Role/DeleteRoleEvent.php @@ -27,5 +27,3 @@ public function getRole(): Role return $this->role; } } - -class_alias(DeleteRoleEvent::class, 'eZ\Publish\API\Repository\Events\Role\DeleteRoleEvent'); diff --git a/src/contracts/Repository/Events/Role/PublishRoleDraftEvent.php b/src/contracts/Repository/Events/Role/PublishRoleDraftEvent.php index 99fafd2123..32388b589f 100644 --- a/src/contracts/Repository/Events/Role/PublishRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/PublishRoleDraftEvent.php @@ -27,5 +27,3 @@ public function getRoleDraft(): RoleDraft return $this->roleDraft; } } - -class_alias(PublishRoleDraftEvent::class, 'eZ\Publish\API\Repository\Events\Role\PublishRoleDraftEvent'); diff --git a/src/contracts/Repository/Events/Role/RemovePolicyByRoleDraftEvent.php b/src/contracts/Repository/Events/Role/RemovePolicyByRoleDraftEvent.php index bacdf040a7..07e713e060 100644 --- a/src/contracts/Repository/Events/Role/RemovePolicyByRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/RemovePolicyByRoleDraftEvent.php @@ -48,5 +48,3 @@ public function getUpdatedRoleDraft(): RoleDraft return $this->updatedRoleDraft; } } - -class_alias(RemovePolicyByRoleDraftEvent::class, 'eZ\Publish\API\Repository\Events\Role\RemovePolicyByRoleDraftEvent'); diff --git a/src/contracts/Repository/Events/Role/RemoveRoleAssignmentEvent.php b/src/contracts/Repository/Events/Role/RemoveRoleAssignmentEvent.php index 8cb8208638..5278c115d7 100644 --- a/src/contracts/Repository/Events/Role/RemoveRoleAssignmentEvent.php +++ b/src/contracts/Repository/Events/Role/RemoveRoleAssignmentEvent.php @@ -27,5 +27,3 @@ public function getRoleAssignment(): RoleAssignment return $this->roleAssignment; } } - -class_alias(RemoveRoleAssignmentEvent::class, 'eZ\Publish\API\Repository\Events\Role\RemoveRoleAssignmentEvent'); diff --git a/src/contracts/Repository/Events/Role/UpdatePolicyByRoleDraftEvent.php b/src/contracts/Repository/Events/Role/UpdatePolicyByRoleDraftEvent.php index 294558812d..a624899877 100644 --- a/src/contracts/Repository/Events/Role/UpdatePolicyByRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/UpdatePolicyByRoleDraftEvent.php @@ -59,5 +59,3 @@ public function getUpdatedPolicyDraft(): PolicyDraft return $this->updatedPolicyDraft; } } - -class_alias(UpdatePolicyByRoleDraftEvent::class, 'eZ\Publish\API\Repository\Events\Role\UpdatePolicyByRoleDraftEvent'); diff --git a/src/contracts/Repository/Events/Role/UpdateRoleDraftEvent.php b/src/contracts/Repository/Events/Role/UpdateRoleDraftEvent.php index c4fb732f94..0f2a5ab3a1 100644 --- a/src/contracts/Repository/Events/Role/UpdateRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/UpdateRoleDraftEvent.php @@ -48,5 +48,3 @@ public function getUpdatedRoleDraft(): RoleDraft return $this->updatedRoleDraft; } } - -class_alias(UpdateRoleDraftEvent::class, 'eZ\Publish\API\Repository\Events\Role\UpdateRoleDraftEvent'); diff --git a/src/contracts/Repository/Events/Section/AssignSectionEvent.php b/src/contracts/Repository/Events/Section/AssignSectionEvent.php index 5e0c078502..8a695fc10a 100644 --- a/src/contracts/Repository/Events/Section/AssignSectionEvent.php +++ b/src/contracts/Repository/Events/Section/AssignSectionEvent.php @@ -38,5 +38,3 @@ public function getSection(): Section return $this->section; } } - -class_alias(AssignSectionEvent::class, 'eZ\Publish\API\Repository\Events\Section\AssignSectionEvent'); diff --git a/src/contracts/Repository/Events/Section/AssignSectionToSubtreeEvent.php b/src/contracts/Repository/Events/Section/AssignSectionToSubtreeEvent.php index b85bfa5713..d717259819 100644 --- a/src/contracts/Repository/Events/Section/AssignSectionToSubtreeEvent.php +++ b/src/contracts/Repository/Events/Section/AssignSectionToSubtreeEvent.php @@ -38,5 +38,3 @@ public function getSection(): Section return $this->section; } } - -class_alias(AssignSectionToSubtreeEvent::class, 'eZ\Publish\API\Repository\Events\Section\AssignSectionToSubtreeEvent'); diff --git a/src/contracts/Repository/Events/Section/BeforeAssignSectionEvent.php b/src/contracts/Repository/Events/Section/BeforeAssignSectionEvent.php index d42b68b1a2..a2ae2f3863 100644 --- a/src/contracts/Repository/Events/Section/BeforeAssignSectionEvent.php +++ b/src/contracts/Repository/Events/Section/BeforeAssignSectionEvent.php @@ -36,5 +36,3 @@ public function getSection(): Section return $this->section; } } - -class_alias(BeforeAssignSectionEvent::class, 'eZ\Publish\API\Repository\Events\Section\BeforeAssignSectionEvent'); diff --git a/src/contracts/Repository/Events/Section/BeforeAssignSectionToSubtreeEvent.php b/src/contracts/Repository/Events/Section/BeforeAssignSectionToSubtreeEvent.php index b9e2610af0..a5b06848ef 100644 --- a/src/contracts/Repository/Events/Section/BeforeAssignSectionToSubtreeEvent.php +++ b/src/contracts/Repository/Events/Section/BeforeAssignSectionToSubtreeEvent.php @@ -36,5 +36,3 @@ public function getSection(): Section return $this->section; } } - -class_alias(BeforeAssignSectionToSubtreeEvent::class, 'eZ\Publish\API\Repository\Events\Section\BeforeAssignSectionToSubtreeEvent'); diff --git a/src/contracts/Repository/Events/Section/BeforeCreateSectionEvent.php b/src/contracts/Repository/Events/Section/BeforeCreateSectionEvent.php index ee9b71dcfd..4b2208095e 100644 --- a/src/contracts/Repository/Events/Section/BeforeCreateSectionEvent.php +++ b/src/contracts/Repository/Events/Section/BeforeCreateSectionEvent.php @@ -50,5 +50,3 @@ public function hasSection(): bool return $this->section instanceof Section; } } - -class_alias(BeforeCreateSectionEvent::class, 'eZ\Publish\API\Repository\Events\Section\BeforeCreateSectionEvent'); diff --git a/src/contracts/Repository/Events/Section/BeforeDeleteSectionEvent.php b/src/contracts/Repository/Events/Section/BeforeDeleteSectionEvent.php index 41bb5a3b0b..5caf4732fa 100644 --- a/src/contracts/Repository/Events/Section/BeforeDeleteSectionEvent.php +++ b/src/contracts/Repository/Events/Section/BeforeDeleteSectionEvent.php @@ -26,5 +26,3 @@ public function getSection(): Section return $this->section; } } - -class_alias(BeforeDeleteSectionEvent::class, 'eZ\Publish\API\Repository\Events\Section\BeforeDeleteSectionEvent'); diff --git a/src/contracts/Repository/Events/Section/BeforeUpdateSectionEvent.php b/src/contracts/Repository/Events/Section/BeforeUpdateSectionEvent.php index 00af4e1d38..9c800aee06 100644 --- a/src/contracts/Repository/Events/Section/BeforeUpdateSectionEvent.php +++ b/src/contracts/Repository/Events/Section/BeforeUpdateSectionEvent.php @@ -59,5 +59,3 @@ public function hasUpdatedSection(): bool return $this->updatedSection instanceof Section; } } - -class_alias(BeforeUpdateSectionEvent::class, 'eZ\Publish\API\Repository\Events\Section\BeforeUpdateSectionEvent'); diff --git a/src/contracts/Repository/Events/Section/CreateSectionEvent.php b/src/contracts/Repository/Events/Section/CreateSectionEvent.php index f87e872cd0..8528a0b363 100644 --- a/src/contracts/Repository/Events/Section/CreateSectionEvent.php +++ b/src/contracts/Repository/Events/Section/CreateSectionEvent.php @@ -38,5 +38,3 @@ public function getSection(): Section return $this->section; } } - -class_alias(CreateSectionEvent::class, 'eZ\Publish\API\Repository\Events\Section\CreateSectionEvent'); diff --git a/src/contracts/Repository/Events/Section/DeleteSectionEvent.php b/src/contracts/Repository/Events/Section/DeleteSectionEvent.php index 420314a188..881d512d23 100644 --- a/src/contracts/Repository/Events/Section/DeleteSectionEvent.php +++ b/src/contracts/Repository/Events/Section/DeleteSectionEvent.php @@ -27,5 +27,3 @@ public function getSection(): Section return $this->section; } } - -class_alias(DeleteSectionEvent::class, 'eZ\Publish\API\Repository\Events\Section\DeleteSectionEvent'); diff --git a/src/contracts/Repository/Events/Section/UpdateSectionEvent.php b/src/contracts/Repository/Events/Section/UpdateSectionEvent.php index 2368fcb9b4..0360bd61ed 100644 --- a/src/contracts/Repository/Events/Section/UpdateSectionEvent.php +++ b/src/contracts/Repository/Events/Section/UpdateSectionEvent.php @@ -48,5 +48,3 @@ public function getUpdatedSection(): Section return $this->updatedSection; } } - -class_alias(UpdateSectionEvent::class, 'eZ\Publish\API\Repository\Events\Section\UpdateSectionEvent'); diff --git a/src/contracts/Repository/Events/Setting/BeforeCreateSettingEvent.php b/src/contracts/Repository/Events/Setting/BeforeCreateSettingEvent.php index 58bab2c7b2..da4d4f99c1 100644 --- a/src/contracts/Repository/Events/Setting/BeforeCreateSettingEvent.php +++ b/src/contracts/Repository/Events/Setting/BeforeCreateSettingEvent.php @@ -50,5 +50,3 @@ public function hasSetting(): bool return $this->setting instanceof Setting; } } - -class_alias(BeforeCreateSettingEvent::class, 'eZ\Publish\API\Repository\Events\Setting\BeforeCreateSettingEvent'); diff --git a/src/contracts/Repository/Events/Setting/BeforeDeleteSettingEvent.php b/src/contracts/Repository/Events/Setting/BeforeDeleteSettingEvent.php index ab347b4675..a63f1b5bd2 100644 --- a/src/contracts/Repository/Events/Setting/BeforeDeleteSettingEvent.php +++ b/src/contracts/Repository/Events/Setting/BeforeDeleteSettingEvent.php @@ -26,5 +26,3 @@ public function getSetting(): Setting return $this->setting; } } - -class_alias(BeforeDeleteSettingEvent::class, 'eZ\Publish\API\Repository\Events\Setting\BeforeDeleteSettingEvent'); diff --git a/src/contracts/Repository/Events/Setting/BeforeUpdateSettingEvent.php b/src/contracts/Repository/Events/Setting/BeforeUpdateSettingEvent.php index 07668054f2..9d4dcbc519 100644 --- a/src/contracts/Repository/Events/Setting/BeforeUpdateSettingEvent.php +++ b/src/contracts/Repository/Events/Setting/BeforeUpdateSettingEvent.php @@ -59,5 +59,3 @@ public function hasUpdatedSetting(): bool return $this->updatedSetting instanceof Setting; } } - -class_alias(BeforeUpdateSettingEvent::class, 'eZ\Publish\API\Repository\Events\Setting\BeforeUpdateSettingEvent'); diff --git a/src/contracts/Repository/Events/Setting/CreateSettingEvent.php b/src/contracts/Repository/Events/Setting/CreateSettingEvent.php index bbdb870a7b..ef418dc1bc 100644 --- a/src/contracts/Repository/Events/Setting/CreateSettingEvent.php +++ b/src/contracts/Repository/Events/Setting/CreateSettingEvent.php @@ -38,5 +38,3 @@ public function getSettingCreateStruct(): SettingCreateStruct return $this->settingCreateStruct; } } - -class_alias(CreateSettingEvent::class, 'eZ\Publish\API\Repository\Events\Setting\CreateSettingEvent'); diff --git a/src/contracts/Repository/Events/Setting/DeleteSettingEvent.php b/src/contracts/Repository/Events/Setting/DeleteSettingEvent.php index 9fde763eb5..e1c09c27f7 100644 --- a/src/contracts/Repository/Events/Setting/DeleteSettingEvent.php +++ b/src/contracts/Repository/Events/Setting/DeleteSettingEvent.php @@ -26,5 +26,3 @@ public function getSetting(): Setting return $this->setting; } } - -class_alias(DeleteSettingEvent::class, 'eZ\Publish\API\Repository\Events\Setting\DeleteSettingEvent'); diff --git a/src/contracts/Repository/Events/Setting/UpdateSettingEvent.php b/src/contracts/Repository/Events/Setting/UpdateSettingEvent.php index 58f587aa68..f094a322ce 100644 --- a/src/contracts/Repository/Events/Setting/UpdateSettingEvent.php +++ b/src/contracts/Repository/Events/Setting/UpdateSettingEvent.php @@ -48,5 +48,3 @@ public function getSettingUpdateStruct(): SettingUpdateStruct return $this->settingUpdateStruct; } } - -class_alias(UpdateSettingEvent::class, 'eZ\Publish\API\Repository\Events\Setting\UpdateSettingEvent'); diff --git a/src/contracts/Repository/Events/Trash/BeforeDeleteTrashItemEvent.php b/src/contracts/Repository/Events/Trash/BeforeDeleteTrashItemEvent.php index 76b99bc23c..a8c4775cc5 100644 --- a/src/contracts/Repository/Events/Trash/BeforeDeleteTrashItemEvent.php +++ b/src/contracts/Repository/Events/Trash/BeforeDeleteTrashItemEvent.php @@ -50,5 +50,3 @@ public function hasResult(): bool return $this->result instanceof TrashItemDeleteResult; } } - -class_alias(BeforeDeleteTrashItemEvent::class, 'eZ\Publish\API\Repository\Events\Trash\BeforeDeleteTrashItemEvent'); diff --git a/src/contracts/Repository/Events/Trash/BeforeEmptyTrashEvent.php b/src/contracts/Repository/Events/Trash/BeforeEmptyTrashEvent.php index 95c0851a19..fb6741860c 100644 --- a/src/contracts/Repository/Events/Trash/BeforeEmptyTrashEvent.php +++ b/src/contracts/Repository/Events/Trash/BeforeEmptyTrashEvent.php @@ -40,5 +40,3 @@ public function hasResultList(): bool return $this->resultList instanceof TrashItemDeleteResultList; } } - -class_alias(BeforeEmptyTrashEvent::class, 'eZ\Publish\API\Repository\Events\Trash\BeforeEmptyTrashEvent'); diff --git a/src/contracts/Repository/Events/Trash/BeforeRecoverEvent.php b/src/contracts/Repository/Events/Trash/BeforeRecoverEvent.php index 9a10f276c2..1ac9dcd8e1 100644 --- a/src/contracts/Repository/Events/Trash/BeforeRecoverEvent.php +++ b/src/contracts/Repository/Events/Trash/BeforeRecoverEvent.php @@ -59,5 +59,3 @@ public function hasLocation(): bool return $this->location instanceof Location; } } - -class_alias(BeforeRecoverEvent::class, 'eZ\Publish\API\Repository\Events\Trash\BeforeRecoverEvent'); diff --git a/src/contracts/Repository/Events/Trash/BeforeTrashEvent.php b/src/contracts/Repository/Events/Trash/BeforeTrashEvent.php index 89e6fd6261..d952e1ac42 100644 --- a/src/contracts/Repository/Events/Trash/BeforeTrashEvent.php +++ b/src/contracts/Repository/Events/Trash/BeforeTrashEvent.php @@ -65,5 +65,3 @@ public function isResultSet(): bool return $this->resultSet; } } - -class_alias(BeforeTrashEvent::class, 'eZ\Publish\API\Repository\Events\Trash\BeforeTrashEvent'); diff --git a/src/contracts/Repository/Events/Trash/DeleteTrashItemEvent.php b/src/contracts/Repository/Events/Trash/DeleteTrashItemEvent.php index 73d667d4fe..0015fd9250 100644 --- a/src/contracts/Repository/Events/Trash/DeleteTrashItemEvent.php +++ b/src/contracts/Repository/Events/Trash/DeleteTrashItemEvent.php @@ -38,5 +38,3 @@ public function getResult(): TrashItemDeleteResult return $this->result; } } - -class_alias(DeleteTrashItemEvent::class, 'eZ\Publish\API\Repository\Events\Trash\DeleteTrashItemEvent'); diff --git a/src/contracts/Repository/Events/Trash/EmptyTrashEvent.php b/src/contracts/Repository/Events/Trash/EmptyTrashEvent.php index b9c6f093a6..92db321e86 100644 --- a/src/contracts/Repository/Events/Trash/EmptyTrashEvent.php +++ b/src/contracts/Repository/Events/Trash/EmptyTrashEvent.php @@ -26,5 +26,3 @@ public function getResultList(): TrashItemDeleteResultList return $this->resultList; } } - -class_alias(EmptyTrashEvent::class, 'eZ\Publish\API\Repository\Events\Trash\EmptyTrashEvent'); diff --git a/src/contracts/Repository/Events/Trash/RecoverEvent.php b/src/contracts/Repository/Events/Trash/RecoverEvent.php index 3b56497732..55d47df63f 100644 --- a/src/contracts/Repository/Events/Trash/RecoverEvent.php +++ b/src/contracts/Repository/Events/Trash/RecoverEvent.php @@ -48,5 +48,3 @@ public function getLocation(): Location return $this->location; } } - -class_alias(RecoverEvent::class, 'eZ\Publish\API\Repository\Events\Trash\RecoverEvent'); diff --git a/src/contracts/Repository/Events/Trash/TrashEvent.php b/src/contracts/Repository/Events/Trash/TrashEvent.php index a8d87b9675..50503e9bd2 100644 --- a/src/contracts/Repository/Events/Trash/TrashEvent.php +++ b/src/contracts/Repository/Events/Trash/TrashEvent.php @@ -38,5 +38,3 @@ public function getTrashItem(): ?TrashItem return $this->trashItem; } } - -class_alias(TrashEvent::class, 'eZ\Publish\API\Repository\Events\Trash\TrashEvent'); diff --git a/src/contracts/Repository/Events/URL/BeforeUpdateUrlEvent.php b/src/contracts/Repository/Events/URL/BeforeUpdateUrlEvent.php index 36b71f7213..5f534a28dd 100644 --- a/src/contracts/Repository/Events/URL/BeforeUpdateUrlEvent.php +++ b/src/contracts/Repository/Events/URL/BeforeUpdateUrlEvent.php @@ -59,5 +59,3 @@ public function hasUpdatedUrl(): bool return $this->updatedUrl instanceof URL; } } - -class_alias(BeforeUpdateUrlEvent::class, 'eZ\Publish\API\Repository\Events\URL\BeforeUpdateUrlEvent'); diff --git a/src/contracts/Repository/Events/URL/UpdateUrlEvent.php b/src/contracts/Repository/Events/URL/UpdateUrlEvent.php index 05de8cd6c6..56e123893b 100644 --- a/src/contracts/Repository/Events/URL/UpdateUrlEvent.php +++ b/src/contracts/Repository/Events/URL/UpdateUrlEvent.php @@ -48,5 +48,3 @@ public function getUpdatedUrl(): URL return $this->updatedUrl; } } - -class_alias(UpdateUrlEvent::class, 'eZ\Publish\API\Repository\Events\URL\UpdateUrlEvent'); diff --git a/src/contracts/Repository/Events/URLAlias/BeforeCreateGlobalUrlAliasEvent.php b/src/contracts/Repository/Events/URLAlias/BeforeCreateGlobalUrlAliasEvent.php index 0cdc836a30..ff4eef4428 100644 --- a/src/contracts/Repository/Events/URLAlias/BeforeCreateGlobalUrlAliasEvent.php +++ b/src/contracts/Repository/Events/URLAlias/BeforeCreateGlobalUrlAliasEvent.php @@ -80,5 +80,3 @@ public function hasUrlAlias(): bool return $this->urlAlias instanceof URLAlias; } } - -class_alias(BeforeCreateGlobalUrlAliasEvent::class, 'eZ\Publish\API\Repository\Events\URLAlias\BeforeCreateGlobalUrlAliasEvent'); diff --git a/src/contracts/Repository/Events/URLAlias/BeforeCreateUrlAliasEvent.php b/src/contracts/Repository/Events/URLAlias/BeforeCreateUrlAliasEvent.php index 8bca8af375..a9b7135bb1 100644 --- a/src/contracts/Repository/Events/URLAlias/BeforeCreateUrlAliasEvent.php +++ b/src/contracts/Repository/Events/URLAlias/BeforeCreateUrlAliasEvent.php @@ -82,5 +82,3 @@ public function hasUrlAlias(): bool return $this->urlAlias instanceof URLAlias; } } - -class_alias(BeforeCreateUrlAliasEvent::class, 'eZ\Publish\API\Repository\Events\URLAlias\BeforeCreateUrlAliasEvent'); diff --git a/src/contracts/Repository/Events/URLAlias/BeforeRefreshSystemUrlAliasesForLocationEvent.php b/src/contracts/Repository/Events/URLAlias/BeforeRefreshSystemUrlAliasesForLocationEvent.php index aaecf069cf..a5124320ad 100644 --- a/src/contracts/Repository/Events/URLAlias/BeforeRefreshSystemUrlAliasesForLocationEvent.php +++ b/src/contracts/Repository/Events/URLAlias/BeforeRefreshSystemUrlAliasesForLocationEvent.php @@ -26,5 +26,3 @@ public function getLocation(): Location return $this->location; } } - -class_alias(BeforeRefreshSystemUrlAliasesForLocationEvent::class, 'eZ\Publish\API\Repository\Events\URLAlias\BeforeRefreshSystemUrlAliasesForLocationEvent'); diff --git a/src/contracts/Repository/Events/URLAlias/BeforeRemoveAliasesEvent.php b/src/contracts/Repository/Events/URLAlias/BeforeRemoveAliasesEvent.php index 74f04418b6..1a09d8a321 100644 --- a/src/contracts/Repository/Events/URLAlias/BeforeRemoveAliasesEvent.php +++ b/src/contracts/Repository/Events/URLAlias/BeforeRemoveAliasesEvent.php @@ -25,5 +25,3 @@ public function getAliasList(): array return $this->aliasList; } } - -class_alias(BeforeRemoveAliasesEvent::class, 'eZ\Publish\API\Repository\Events\URLAlias\BeforeRemoveAliasesEvent'); diff --git a/src/contracts/Repository/Events/URLAlias/CreateGlobalUrlAliasEvent.php b/src/contracts/Repository/Events/URLAlias/CreateGlobalUrlAliasEvent.php index d7496da705..3dfe6c382b 100644 --- a/src/contracts/Repository/Events/URLAlias/CreateGlobalUrlAliasEvent.php +++ b/src/contracts/Repository/Events/URLAlias/CreateGlobalUrlAliasEvent.php @@ -72,5 +72,3 @@ public function getUrlAlias(): URLAlias return $this->urlAlias; } } - -class_alias(CreateGlobalUrlAliasEvent::class, 'eZ\Publish\API\Repository\Events\URLAlias\CreateGlobalUrlAliasEvent'); diff --git a/src/contracts/Repository/Events/URLAlias/CreateUrlAliasEvent.php b/src/contracts/Repository/Events/URLAlias/CreateUrlAliasEvent.php index e3de71a35c..c638aa13c8 100644 --- a/src/contracts/Repository/Events/URLAlias/CreateUrlAliasEvent.php +++ b/src/contracts/Repository/Events/URLAlias/CreateUrlAliasEvent.php @@ -74,5 +74,3 @@ public function getUrlAlias(): URLAlias return $this->urlAlias; } } - -class_alias(CreateUrlAliasEvent::class, 'eZ\Publish\API\Repository\Events\URLAlias\CreateUrlAliasEvent'); diff --git a/src/contracts/Repository/Events/URLAlias/RefreshSystemUrlAliasesForLocationEvent.php b/src/contracts/Repository/Events/URLAlias/RefreshSystemUrlAliasesForLocationEvent.php index 912833f6f7..5ec39e41e0 100644 --- a/src/contracts/Repository/Events/URLAlias/RefreshSystemUrlAliasesForLocationEvent.php +++ b/src/contracts/Repository/Events/URLAlias/RefreshSystemUrlAliasesForLocationEvent.php @@ -26,5 +26,3 @@ public function getLocation(): Location return $this->location; } } - -class_alias(RefreshSystemUrlAliasesForLocationEvent::class, 'eZ\Publish\API\Repository\Events\URLAlias\RefreshSystemUrlAliasesForLocationEvent'); diff --git a/src/contracts/Repository/Events/URLAlias/RemoveAliasesEvent.php b/src/contracts/Repository/Events/URLAlias/RemoveAliasesEvent.php index 535d24469b..966dbdf532 100644 --- a/src/contracts/Repository/Events/URLAlias/RemoveAliasesEvent.php +++ b/src/contracts/Repository/Events/URLAlias/RemoveAliasesEvent.php @@ -26,5 +26,3 @@ public function getAliasList(): array return $this->aliasList; } } - -class_alias(RemoveAliasesEvent::class, 'eZ\Publish\API\Repository\Events\URLAlias\RemoveAliasesEvent'); diff --git a/src/contracts/Repository/Events/URLWildcard/BeforeCreateEvent.php b/src/contracts/Repository/Events/URLWildcard/BeforeCreateEvent.php index 8da1253adb..08bca21c0e 100644 --- a/src/contracts/Repository/Events/URLWildcard/BeforeCreateEvent.php +++ b/src/contracts/Repository/Events/URLWildcard/BeforeCreateEvent.php @@ -64,5 +64,3 @@ public function hasUrlWildcard(): bool return $this->urlWildcard instanceof URLWildcard; } } - -class_alias(BeforeCreateEvent::class, 'eZ\Publish\API\Repository\Events\URLWildcard\BeforeCreateEvent'); diff --git a/src/contracts/Repository/Events/URLWildcard/BeforeRemoveEvent.php b/src/contracts/Repository/Events/URLWildcard/BeforeRemoveEvent.php index a3ae15f78d..07c691373e 100644 --- a/src/contracts/Repository/Events/URLWildcard/BeforeRemoveEvent.php +++ b/src/contracts/Repository/Events/URLWildcard/BeforeRemoveEvent.php @@ -26,5 +26,3 @@ public function getUrlWildcard(): URLWildcard return $this->urlWildcard; } } - -class_alias(BeforeRemoveEvent::class, 'eZ\Publish\API\Repository\Events\URLWildcard\BeforeRemoveEvent'); diff --git a/src/contracts/Repository/Events/URLWildcard/BeforeTranslateEvent.php b/src/contracts/Repository/Events/URLWildcard/BeforeTranslateEvent.php index 01f484cacc..21e70d4508 100644 --- a/src/contracts/Repository/Events/URLWildcard/BeforeTranslateEvent.php +++ b/src/contracts/Repository/Events/URLWildcard/BeforeTranslateEvent.php @@ -48,5 +48,3 @@ public function hasResult(): bool return $this->result instanceof URLWildcardTranslationResult; } } - -class_alias(BeforeTranslateEvent::class, 'eZ\Publish\API\Repository\Events\URLWildcard\BeforeTranslateEvent'); diff --git a/src/contracts/Repository/Events/URLWildcard/BeforeUpdateEvent.php b/src/contracts/Repository/Events/URLWildcard/BeforeUpdateEvent.php index a58d96fb38..d95d3b50a6 100644 --- a/src/contracts/Repository/Events/URLWildcard/BeforeUpdateEvent.php +++ b/src/contracts/Repository/Events/URLWildcard/BeforeUpdateEvent.php @@ -38,5 +38,3 @@ public function getUpdateStruct(): URLWildcardUpdateStruct return $this->updateStruct; } } - -class_alias(BeforeUpdateEvent::class, 'eZ\Publish\API\Repository\Events\URLWildcard\BeforeUpdateEvent'); diff --git a/src/contracts/Repository/Events/URLWildcard/CreateEvent.php b/src/contracts/Repository/Events/URLWildcard/CreateEvent.php index b724c71639..34f6f9f1b4 100644 --- a/src/contracts/Repository/Events/URLWildcard/CreateEvent.php +++ b/src/contracts/Repository/Events/URLWildcard/CreateEvent.php @@ -54,5 +54,3 @@ public function getUrlWildcard(): URLWildcard return $this->urlWildcard; } } - -class_alias(CreateEvent::class, 'eZ\Publish\API\Repository\Events\URLWildcard\CreateEvent'); diff --git a/src/contracts/Repository/Events/URLWildcard/RemoveEvent.php b/src/contracts/Repository/Events/URLWildcard/RemoveEvent.php index e6b539567d..6e9bf88ed8 100644 --- a/src/contracts/Repository/Events/URLWildcard/RemoveEvent.php +++ b/src/contracts/Repository/Events/URLWildcard/RemoveEvent.php @@ -27,5 +27,3 @@ public function getUrlWildcard(): URLWildcard return $this->urlWildcard; } } - -class_alias(RemoveEvent::class, 'eZ\Publish\API\Repository\Events\URLWildcard\RemoveEvent'); diff --git a/src/contracts/Repository/Events/URLWildcard/TranslateEvent.php b/src/contracts/Repository/Events/URLWildcard/TranslateEvent.php index e959e66bad..2cf8a6e731 100644 --- a/src/contracts/Repository/Events/URLWildcard/TranslateEvent.php +++ b/src/contracts/Repository/Events/URLWildcard/TranslateEvent.php @@ -36,5 +36,3 @@ public function getResult(): URLWildcardTranslationResult return $this->result; } } - -class_alias(TranslateEvent::class, 'eZ\Publish\API\Repository\Events\URLWildcard\TranslateEvent'); diff --git a/src/contracts/Repository/Events/URLWildcard/UpdateEvent.php b/src/contracts/Repository/Events/URLWildcard/UpdateEvent.php index 8b41cb3d59..77599ff663 100644 --- a/src/contracts/Repository/Events/URLWildcard/UpdateEvent.php +++ b/src/contracts/Repository/Events/URLWildcard/UpdateEvent.php @@ -38,5 +38,3 @@ public function getUpdateStruct(): URLWildcardUpdateStruct return $this->updateStruct; } } - -class_alias(UpdateEvent::class, 'eZ\Publish\API\Repository\Events\URLWildcard\UpdateEvent'); diff --git a/src/contracts/Repository/Events/User/AssignUserToUserGroupEvent.php b/src/contracts/Repository/Events/User/AssignUserToUserGroupEvent.php index a640cd8f3f..17fbf38fef 100644 --- a/src/contracts/Repository/Events/User/AssignUserToUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/AssignUserToUserGroupEvent.php @@ -38,5 +38,3 @@ public function getUserGroup(): UserGroup return $this->userGroup; } } - -class_alias(AssignUserToUserGroupEvent::class, 'eZ\Publish\API\Repository\Events\User\AssignUserToUserGroupEvent'); diff --git a/src/contracts/Repository/Events/User/BeforeAssignUserToUserGroupEvent.php b/src/contracts/Repository/Events/User/BeforeAssignUserToUserGroupEvent.php index 66ac63b513..b1d1aaf6d1 100644 --- a/src/contracts/Repository/Events/User/BeforeAssignUserToUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/BeforeAssignUserToUserGroupEvent.php @@ -36,5 +36,3 @@ public function getUserGroup(): UserGroup return $this->userGroup; } } - -class_alias(BeforeAssignUserToUserGroupEvent::class, 'eZ\Publish\API\Repository\Events\User\BeforeAssignUserToUserGroupEvent'); diff --git a/src/contracts/Repository/Events/User/BeforeCreateUserEvent.php b/src/contracts/Repository/Events/User/BeforeCreateUserEvent.php index 71fc90d243..f2771575e3 100644 --- a/src/contracts/Repository/Events/User/BeforeCreateUserEvent.php +++ b/src/contracts/Repository/Events/User/BeforeCreateUserEvent.php @@ -59,5 +59,3 @@ public function hasUser(): bool return $this->user instanceof User; } } - -class_alias(BeforeCreateUserEvent::class, 'eZ\Publish\API\Repository\Events\User\BeforeCreateUserEvent'); diff --git a/src/contracts/Repository/Events/User/BeforeCreateUserGroupEvent.php b/src/contracts/Repository/Events/User/BeforeCreateUserGroupEvent.php index 911be9b545..dae1206c69 100644 --- a/src/contracts/Repository/Events/User/BeforeCreateUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/BeforeCreateUserGroupEvent.php @@ -59,5 +59,3 @@ public function hasUserGroup(): bool return $this->userGroup instanceof UserGroup; } } - -class_alias(BeforeCreateUserGroupEvent::class, 'eZ\Publish\API\Repository\Events\User\BeforeCreateUserGroupEvent'); diff --git a/src/contracts/Repository/Events/User/BeforeDeleteUserEvent.php b/src/contracts/Repository/Events/User/BeforeDeleteUserEvent.php index f557d152dc..5485f87d05 100644 --- a/src/contracts/Repository/Events/User/BeforeDeleteUserEvent.php +++ b/src/contracts/Repository/Events/User/BeforeDeleteUserEvent.php @@ -49,5 +49,3 @@ public function hasLocations(): bool return is_array($this->locations); } } - -class_alias(BeforeDeleteUserEvent::class, 'eZ\Publish\API\Repository\Events\User\BeforeDeleteUserEvent'); diff --git a/src/contracts/Repository/Events/User/BeforeDeleteUserGroupEvent.php b/src/contracts/Repository/Events/User/BeforeDeleteUserGroupEvent.php index 04e79d3402..2d5d76969e 100644 --- a/src/contracts/Repository/Events/User/BeforeDeleteUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/BeforeDeleteUserGroupEvent.php @@ -49,5 +49,3 @@ public function hasLocations(): bool return is_array($this->locations); } } - -class_alias(BeforeDeleteUserGroupEvent::class, 'eZ\Publish\API\Repository\Events\User\BeforeDeleteUserGroupEvent'); diff --git a/src/contracts/Repository/Events/User/BeforeMoveUserGroupEvent.php b/src/contracts/Repository/Events/User/BeforeMoveUserGroupEvent.php index 010dcbb68f..db6c85b32a 100644 --- a/src/contracts/Repository/Events/User/BeforeMoveUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/BeforeMoveUserGroupEvent.php @@ -35,5 +35,3 @@ public function getNewParent(): UserGroup return $this->newParent; } } - -class_alias(BeforeMoveUserGroupEvent::class, 'eZ\Publish\API\Repository\Events\User\BeforeMoveUserGroupEvent'); diff --git a/src/contracts/Repository/Events/User/BeforeUnAssignUserFromUserGroupEvent.php b/src/contracts/Repository/Events/User/BeforeUnAssignUserFromUserGroupEvent.php index 86ba559534..3ad55444e6 100644 --- a/src/contracts/Repository/Events/User/BeforeUnAssignUserFromUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/BeforeUnAssignUserFromUserGroupEvent.php @@ -36,5 +36,3 @@ public function getUserGroup(): UserGroup return $this->userGroup; } } - -class_alias(BeforeUnAssignUserFromUserGroupEvent::class, 'eZ\Publish\API\Repository\Events\User\BeforeUnAssignUserFromUserGroupEvent'); diff --git a/src/contracts/Repository/Events/User/BeforeUpdateUserEvent.php b/src/contracts/Repository/Events/User/BeforeUpdateUserEvent.php index f5404329ea..163e6c8d9a 100644 --- a/src/contracts/Repository/Events/User/BeforeUpdateUserEvent.php +++ b/src/contracts/Repository/Events/User/BeforeUpdateUserEvent.php @@ -59,5 +59,3 @@ public function hasUpdatedUser(): bool return $this->updatedUser instanceof User; } } - -class_alias(BeforeUpdateUserEvent::class, 'eZ\Publish\API\Repository\Events\User\BeforeUpdateUserEvent'); diff --git a/src/contracts/Repository/Events/User/BeforeUpdateUserGroupEvent.php b/src/contracts/Repository/Events/User/BeforeUpdateUserGroupEvent.php index c6822d9adc..a70046fa6b 100644 --- a/src/contracts/Repository/Events/User/BeforeUpdateUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/BeforeUpdateUserGroupEvent.php @@ -59,5 +59,3 @@ public function hasUpdatedUserGroup(): bool return $this->updatedUserGroup instanceof UserGroup; } } - -class_alias(BeforeUpdateUserGroupEvent::class, 'eZ\Publish\API\Repository\Events\User\BeforeUpdateUserGroupEvent'); diff --git a/src/contracts/Repository/Events/User/BeforeUpdateUserPasswordEvent.php b/src/contracts/Repository/Events/User/BeforeUpdateUserPasswordEvent.php index d5beeca70a..cc93f1423a 100644 --- a/src/contracts/Repository/Events/User/BeforeUpdateUserPasswordEvent.php +++ b/src/contracts/Repository/Events/User/BeforeUpdateUserPasswordEvent.php @@ -58,5 +58,3 @@ public function hasUpdatedUser(): bool return $this->updatedUser instanceof User; } } - -class_alias(BeforeUpdateUserPasswordEvent::class, 'eZ\Publish\API\Repository\Events\User\BeforeUpdateUserPasswordEvent'); diff --git a/src/contracts/Repository/Events/User/BeforeUpdateUserTokenEvent.php b/src/contracts/Repository/Events/User/BeforeUpdateUserTokenEvent.php index a0a262e606..82ca2131dc 100644 --- a/src/contracts/Repository/Events/User/BeforeUpdateUserTokenEvent.php +++ b/src/contracts/Repository/Events/User/BeforeUpdateUserTokenEvent.php @@ -59,5 +59,3 @@ public function hasUpdatedUser(): bool return $this->updatedUser instanceof User; } } - -class_alias(BeforeUpdateUserTokenEvent::class, 'eZ\Publish\API\Repository\Events\User\BeforeUpdateUserTokenEvent'); diff --git a/src/contracts/Repository/Events/User/CreateUserEvent.php b/src/contracts/Repository/Events/User/CreateUserEvent.php index 517ffc4327..f86983991e 100644 --- a/src/contracts/Repository/Events/User/CreateUserEvent.php +++ b/src/contracts/Repository/Events/User/CreateUserEvent.php @@ -48,5 +48,3 @@ public function getUser(): User return $this->user; } } - -class_alias(CreateUserEvent::class, 'eZ\Publish\API\Repository\Events\User\CreateUserEvent'); diff --git a/src/contracts/Repository/Events/User/CreateUserGroupEvent.php b/src/contracts/Repository/Events/User/CreateUserGroupEvent.php index 4fcfe9536b..b7cd39820d 100644 --- a/src/contracts/Repository/Events/User/CreateUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/CreateUserGroupEvent.php @@ -48,5 +48,3 @@ public function getUserGroup(): UserGroup return $this->userGroup; } } - -class_alias(CreateUserGroupEvent::class, 'eZ\Publish\API\Repository\Events\User\CreateUserGroupEvent'); diff --git a/src/contracts/Repository/Events/User/DeleteUserEvent.php b/src/contracts/Repository/Events/User/DeleteUserEvent.php index b9a44523ec..1ceee53299 100644 --- a/src/contracts/Repository/Events/User/DeleteUserEvent.php +++ b/src/contracts/Repository/Events/User/DeleteUserEvent.php @@ -37,5 +37,3 @@ public function getLocations(): array return $this->locations; } } - -class_alias(DeleteUserEvent::class, 'eZ\Publish\API\Repository\Events\User\DeleteUserEvent'); diff --git a/src/contracts/Repository/Events/User/DeleteUserGroupEvent.php b/src/contracts/Repository/Events/User/DeleteUserGroupEvent.php index a86db43307..312b9df192 100644 --- a/src/contracts/Repository/Events/User/DeleteUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/DeleteUserGroupEvent.php @@ -37,5 +37,3 @@ public function getLocations(): array return $this->locations; } } - -class_alias(DeleteUserGroupEvent::class, 'eZ\Publish\API\Repository\Events\User\DeleteUserGroupEvent'); diff --git a/src/contracts/Repository/Events/User/MoveUserGroupEvent.php b/src/contracts/Repository/Events/User/MoveUserGroupEvent.php index 7ffbaa6147..4c0cb5710b 100644 --- a/src/contracts/Repository/Events/User/MoveUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/MoveUserGroupEvent.php @@ -37,5 +37,3 @@ public function getNewParent(): UserGroup return $this->newParent; } } - -class_alias(MoveUserGroupEvent::class, 'eZ\Publish\API\Repository\Events\User\MoveUserGroupEvent'); diff --git a/src/contracts/Repository/Events/User/UnAssignUserFromUserGroupEvent.php b/src/contracts/Repository/Events/User/UnAssignUserFromUserGroupEvent.php index 36c0e38aba..8a563a5c69 100644 --- a/src/contracts/Repository/Events/User/UnAssignUserFromUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/UnAssignUserFromUserGroupEvent.php @@ -38,5 +38,3 @@ public function getUserGroup(): UserGroup return $this->userGroup; } } - -class_alias(UnAssignUserFromUserGroupEvent::class, 'eZ\Publish\API\Repository\Events\User\UnAssignUserFromUserGroupEvent'); diff --git a/src/contracts/Repository/Events/User/UpdateUserEvent.php b/src/contracts/Repository/Events/User/UpdateUserEvent.php index e6c14152f0..61c58e892a 100644 --- a/src/contracts/Repository/Events/User/UpdateUserEvent.php +++ b/src/contracts/Repository/Events/User/UpdateUserEvent.php @@ -48,5 +48,3 @@ public function getUpdatedUser(): User return $this->updatedUser; } } - -class_alias(UpdateUserEvent::class, 'eZ\Publish\API\Repository\Events\User\UpdateUserEvent'); diff --git a/src/contracts/Repository/Events/User/UpdateUserGroupEvent.php b/src/contracts/Repository/Events/User/UpdateUserGroupEvent.php index 0affad6ad6..e51d086141 100644 --- a/src/contracts/Repository/Events/User/UpdateUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/UpdateUserGroupEvent.php @@ -47,5 +47,3 @@ public function getUpdatedUserGroup(): UserGroup return $this->updatedUserGroup; } } - -class_alias(UpdateUserGroupEvent::class, 'eZ\Publish\API\Repository\Events\User\UpdateUserGroupEvent'); diff --git a/src/contracts/Repository/Events/User/UpdateUserPasswordEvent.php b/src/contracts/Repository/Events/User/UpdateUserPasswordEvent.php index 22b8c1f166..b12e1d59f0 100644 --- a/src/contracts/Repository/Events/User/UpdateUserPasswordEvent.php +++ b/src/contracts/Repository/Events/User/UpdateUserPasswordEvent.php @@ -48,5 +48,3 @@ public function getUpdatedUser(): User return $this->updatedUser; } } - -class_alias(UpdateUserPasswordEvent::class, 'eZ\Publish\API\Repository\Events\User\UpdateUserPasswordEvent'); diff --git a/src/contracts/Repository/Events/User/UpdateUserTokenEvent.php b/src/contracts/Repository/Events/User/UpdateUserTokenEvent.php index 6270dfb94a..d6fca1a7b9 100644 --- a/src/contracts/Repository/Events/User/UpdateUserTokenEvent.php +++ b/src/contracts/Repository/Events/User/UpdateUserTokenEvent.php @@ -48,5 +48,3 @@ public function getUpdatedUser(): User return $this->updatedUser; } } - -class_alias(UpdateUserTokenEvent::class, 'eZ\Publish\API\Repository\Events\User\UpdateUserTokenEvent'); diff --git a/src/contracts/Repository/Events/UserPreference/BeforeSetUserPreferenceEvent.php b/src/contracts/Repository/Events/UserPreference/BeforeSetUserPreferenceEvent.php index 145b20927f..f59525ee10 100644 --- a/src/contracts/Repository/Events/UserPreference/BeforeSetUserPreferenceEvent.php +++ b/src/contracts/Repository/Events/UserPreference/BeforeSetUserPreferenceEvent.php @@ -25,5 +25,3 @@ public function getUserPreferenceSetStructs(): array return $this->userPreferenceSetStructs; } } - -class_alias(BeforeSetUserPreferenceEvent::class, 'eZ\Publish\API\Repository\Events\UserPreference\BeforeSetUserPreferenceEvent'); diff --git a/src/contracts/Repository/Events/UserPreference/SetUserPreferenceEvent.php b/src/contracts/Repository/Events/UserPreference/SetUserPreferenceEvent.php index 2d8cc367db..8120251f49 100644 --- a/src/contracts/Repository/Events/UserPreference/SetUserPreferenceEvent.php +++ b/src/contracts/Repository/Events/UserPreference/SetUserPreferenceEvent.php @@ -25,5 +25,3 @@ public function getUserPreferenceSetStructs(): array return $this->userPreferenceSetStructs; } } - -class_alias(SetUserPreferenceEvent::class, 'eZ\Publish\API\Repository\Events\UserPreference\SetUserPreferenceEvent'); diff --git a/src/contracts/Repository/Exceptions/BadStateException.php b/src/contracts/Repository/Exceptions/BadStateException.php index 93b8ad71f9..40f70caf17 100644 --- a/src/contracts/Repository/Exceptions/BadStateException.php +++ b/src/contracts/Repository/Exceptions/BadStateException.php @@ -14,5 +14,3 @@ abstract class BadStateException extends ForbiddenException { } - -class_alias(BadStateException::class, 'eZ\Publish\API\Repository\Exceptions\BadStateException'); diff --git a/src/contracts/Repository/Exceptions/ContentFieldValidationException.php b/src/contracts/Repository/Exceptions/ContentFieldValidationException.php index bc880d6348..b65856a79b 100644 --- a/src/contracts/Repository/Exceptions/ContentFieldValidationException.php +++ b/src/contracts/Repository/Exceptions/ContentFieldValidationException.php @@ -20,5 +20,3 @@ abstract class ContentFieldValidationException extends ForbiddenException */ abstract public function getFieldErrors(); } - -class_alias(ContentFieldValidationException::class, 'eZ\Publish\API\Repository\Exceptions\ContentFieldValidationException'); diff --git a/src/contracts/Repository/Exceptions/ContentTypeFieldDefinitionValidationException.php b/src/contracts/Repository/Exceptions/ContentTypeFieldDefinitionValidationException.php index 05465f7ad6..c2921772fe 100644 --- a/src/contracts/Repository/Exceptions/ContentTypeFieldDefinitionValidationException.php +++ b/src/contracts/Repository/Exceptions/ContentTypeFieldDefinitionValidationException.php @@ -20,5 +20,3 @@ abstract class ContentTypeFieldDefinitionValidationException extends ForbiddenEx */ abstract public function getFieldErrors(); } - -class_alias(ContentTypeFieldDefinitionValidationException::class, 'eZ\Publish\API\Repository\Exceptions\ContentTypeFieldDefinitionValidationException'); diff --git a/src/contracts/Repository/Exceptions/ContentTypeValidationException.php b/src/contracts/Repository/Exceptions/ContentTypeValidationException.php index 70bded8b8a..123f2d0589 100644 --- a/src/contracts/Repository/Exceptions/ContentTypeValidationException.php +++ b/src/contracts/Repository/Exceptions/ContentTypeValidationException.php @@ -14,5 +14,3 @@ abstract class ContentTypeValidationException extends ForbiddenException { } - -class_alias(ContentTypeValidationException::class, 'eZ\Publish\API\Repository\Exceptions\ContentTypeValidationException'); diff --git a/src/contracts/Repository/Exceptions/ContentValidationException.php b/src/contracts/Repository/Exceptions/ContentValidationException.php index b75e70936c..9d2e13f42a 100644 --- a/src/contracts/Repository/Exceptions/ContentValidationException.php +++ b/src/contracts/Repository/Exceptions/ContentValidationException.php @@ -14,5 +14,3 @@ abstract class ContentValidationException extends ForbiddenException { } - -class_alias(ContentValidationException::class, 'eZ\Publish\API\Repository\Exceptions\ContentValidationException'); diff --git a/src/contracts/Repository/Exceptions/Exception.php b/src/contracts/Repository/Exceptions/Exception.php index c404a56f49..37e050ea9d 100644 --- a/src/contracts/Repository/Exceptions/Exception.php +++ b/src/contracts/Repository/Exceptions/Exception.php @@ -16,5 +16,3 @@ interface Exception extends Throwable { } - -class_alias(Exception::class, 'eZ\Publish\API\Repository\Exceptions\Exception'); diff --git a/src/contracts/Repository/Exceptions/ForbiddenException.php b/src/contracts/Repository/Exceptions/ForbiddenException.php index 8777dee41b..24b240a290 100644 --- a/src/contracts/Repository/Exceptions/ForbiddenException.php +++ b/src/contracts/Repository/Exceptions/ForbiddenException.php @@ -18,5 +18,3 @@ abstract class ForbiddenException extends Exception implements RepositoryException { } - -class_alias(ForbiddenException::class, 'eZ\Publish\API\Repository\Exceptions\ForbiddenException'); diff --git a/src/contracts/Repository/Exceptions/InvalidArgumentException.php b/src/contracts/Repository/Exceptions/InvalidArgumentException.php index 44be8a5cfd..9ffbc2f4a6 100644 --- a/src/contracts/Repository/Exceptions/InvalidArgumentException.php +++ b/src/contracts/Repository/Exceptions/InvalidArgumentException.php @@ -14,5 +14,3 @@ abstract class InvalidArgumentException extends ForbiddenException { } - -class_alias(InvalidArgumentException::class, 'eZ\Publish\API\Repository\Exceptions\InvalidArgumentException'); diff --git a/src/contracts/Repository/Exceptions/InvalidVariationException.php b/src/contracts/Repository/Exceptions/InvalidVariationException.php index 648b9252ec..1e0e3eff9c 100644 --- a/src/contracts/Repository/Exceptions/InvalidVariationException.php +++ b/src/contracts/Repository/Exceptions/InvalidVariationException.php @@ -17,5 +17,3 @@ public function __construct($variationName, $variationType, $code = 0, Exception parent::__construct("Invalid variation '$variationName' for $variationType", $code, $previous); } } - -class_alias(InvalidVariationException::class, 'eZ\Publish\API\Repository\Exceptions\InvalidVariationException'); diff --git a/src/contracts/Repository/Exceptions/LimitationValidationException.php b/src/contracts/Repository/Exceptions/LimitationValidationException.php index 6334ac8e8f..fe5494a2a0 100644 --- a/src/contracts/Repository/Exceptions/LimitationValidationException.php +++ b/src/contracts/Repository/Exceptions/LimitationValidationException.php @@ -21,5 +21,3 @@ abstract class LimitationValidationException extends ForbiddenException */ abstract public function getLimitationErrors(); } - -class_alias(LimitationValidationException::class, 'eZ\Publish\API\Repository\Exceptions\LimitationValidationException'); diff --git a/src/contracts/Repository/Exceptions/NotFoundException.php b/src/contracts/Repository/Exceptions/NotFoundException.php index 1c235781cb..bdae3fec81 100644 --- a/src/contracts/Repository/Exceptions/NotFoundException.php +++ b/src/contracts/Repository/Exceptions/NotFoundException.php @@ -18,5 +18,3 @@ abstract class NotFoundException extends Exception implements RepositoryException { } - -class_alias(NotFoundException::class, 'eZ\Publish\API\Repository\Exceptions\NotFoundException'); diff --git a/src/contracts/Repository/Exceptions/NotImplementedException.php b/src/contracts/Repository/Exceptions/NotImplementedException.php index bea7bafb6e..edca5879b3 100644 --- a/src/contracts/Repository/Exceptions/NotImplementedException.php +++ b/src/contracts/Repository/Exceptions/NotImplementedException.php @@ -29,5 +29,3 @@ public function __construct($feature, $code = 0, Exception $previous = null) parent::__construct("Intentionally not implemented: {$feature}", $code, $previous); } } - -class_alias(NotImplementedException::class, 'eZ\Publish\API\Repository\Exceptions\NotImplementedException'); diff --git a/src/contracts/Repository/Exceptions/OutOfBoundsException.php b/src/contracts/Repository/Exceptions/OutOfBoundsException.php index 1084c68c1b..788a6c30f5 100644 --- a/src/contracts/Repository/Exceptions/OutOfBoundsException.php +++ b/src/contracts/Repository/Exceptions/OutOfBoundsException.php @@ -14,5 +14,3 @@ class OutOfBoundsException extends BaseOutOfBoundsException implements RepositoryException { } - -class_alias(OutOfBoundsException::class, 'eZ\Publish\API\Repository\Exceptions\OutOfBoundsException'); diff --git a/src/contracts/Repository/Exceptions/PasswordInUnsupportedFormatException.php b/src/contracts/Repository/Exceptions/PasswordInUnsupportedFormatException.php index 0cda994730..ad02e233d0 100644 --- a/src/contracts/Repository/Exceptions/PasswordInUnsupportedFormatException.php +++ b/src/contracts/Repository/Exceptions/PasswordInUnsupportedFormatException.php @@ -18,5 +18,3 @@ public function __construct(Throwable $previous = null) parent::__construct("User's password is in a format which is not supported any more.", 0, $previous); } } - -class_alias(PasswordInUnsupportedFormatException::class, 'eZ\Publish\API\Repository\Exceptions\PasswordInUnsupportedFormatException'); diff --git a/src/contracts/Repository/Exceptions/PropertyNotFoundException.php b/src/contracts/Repository/Exceptions/PropertyNotFoundException.php index 965fe9d804..13ef626795 100644 --- a/src/contracts/Repository/Exceptions/PropertyNotFoundException.php +++ b/src/contracts/Repository/Exceptions/PropertyNotFoundException.php @@ -32,5 +32,3 @@ public function __construct($propertyName, $className = null, Exception $previou } } } - -class_alias(PropertyNotFoundException::class, 'eZ\Publish\API\Repository\Exceptions\PropertyNotFoundException'); diff --git a/src/contracts/Repository/Exceptions/PropertyReadOnlyException.php b/src/contracts/Repository/Exceptions/PropertyReadOnlyException.php index 281f52ee24..9adfd2c5c5 100644 --- a/src/contracts/Repository/Exceptions/PropertyReadOnlyException.php +++ b/src/contracts/Repository/Exceptions/PropertyReadOnlyException.php @@ -32,5 +32,3 @@ public function __construct($propertyName, $className = null, Exception $previou } } } - -class_alias(PropertyReadOnlyException::class, 'eZ\Publish\API\Repository\Exceptions\PropertyReadOnlyException'); diff --git a/src/contracts/Repository/Exceptions/UnauthorizedException.php b/src/contracts/Repository/Exceptions/UnauthorizedException.php index 227aa6fd64..607a3b7b82 100644 --- a/src/contracts/Repository/Exceptions/UnauthorizedException.php +++ b/src/contracts/Repository/Exceptions/UnauthorizedException.php @@ -17,5 +17,3 @@ abstract class UnauthorizedException extends Exception implements RepositoryException { } - -class_alias(UnauthorizedException::class, 'eZ\Publish\API\Repository\Exceptions\UnauthorizedException'); diff --git a/src/contracts/Repository/FieldType.php b/src/contracts/Repository/FieldType.php index 5262228fba..9a476d01a3 100644 --- a/src/contracts/Repository/FieldType.php +++ b/src/contracts/Repository/FieldType.php @@ -228,5 +228,3 @@ public function validateFieldSettings($fieldSettings): iterable; */ public function validateValue(FieldDefinition $fieldDef, Value $value): iterable; } - -class_alias(FieldType::class, 'eZ\Publish\API\Repository\FieldType'); diff --git a/src/contracts/Repository/FieldTypeService.php b/src/contracts/Repository/FieldTypeService.php index a096857a64..c41615c6f8 100644 --- a/src/contracts/Repository/FieldTypeService.php +++ b/src/contracts/Repository/FieldTypeService.php @@ -42,5 +42,3 @@ public function getFieldType(string $identifier): FieldType; */ public function hasFieldType(string $identifier): bool; } - -class_alias(FieldTypeService::class, 'eZ\Publish\API\Repository\FieldTypeService'); diff --git a/src/contracts/Repository/Iterator/BatchIterator.php b/src/contracts/Repository/Iterator/BatchIterator.php index 163c4454b4..0ad579dc5a 100644 --- a/src/contracts/Repository/Iterator/BatchIterator.php +++ b/src/contracts/Repository/Iterator/BatchIterator.php @@ -98,5 +98,3 @@ private function fetch(): Iterator return $this->adapter->fetch($this->position, $this->batchSize); } } - -class_alias(BatchIterator::class, 'eZ\Publish\API\Repository\Iterator\BatchIterator'); diff --git a/src/contracts/Repository/Iterator/BatchIteratorAdapter.php b/src/contracts/Repository/Iterator/BatchIteratorAdapter.php index abb3c6e2a8..f019a8d441 100644 --- a/src/contracts/Repository/Iterator/BatchIteratorAdapter.php +++ b/src/contracts/Repository/Iterator/BatchIteratorAdapter.php @@ -14,5 +14,3 @@ interface BatchIteratorAdapter { public function fetch(int $offset, int $limit): Iterator; } - -class_alias(BatchIteratorAdapter::class, 'eZ\Publish\API\Repository\Iterator\BatchIteratorAdapter'); diff --git a/src/contracts/Repository/Iterator/BatchIteratorAdapter/AbstractSearchAdapter.php b/src/contracts/Repository/Iterator/BatchIteratorAdapter/AbstractSearchAdapter.php index 3517d2ea3f..6d95b6ac63 100644 --- a/src/contracts/Repository/Iterator/BatchIteratorAdapter/AbstractSearchAdapter.php +++ b/src/contracts/Repository/Iterator/BatchIteratorAdapter/AbstractSearchAdapter.php @@ -51,5 +51,3 @@ final public function fetch(int $offset, int $limit): Iterator abstract protected function executeSearch(Query $query): SearchResult; } - -class_alias(AbstractSearchAdapter::class, 'eZ\Publish\API\Repository\Iterator\BatchIteratorAdapter\AbstractSearchAdapter'); diff --git a/src/contracts/Repository/Iterator/BatchIteratorAdapter/ContentFilteringAdapter.php b/src/contracts/Repository/Iterator/BatchIteratorAdapter/ContentFilteringAdapter.php index 02305e3995..5040118493 100644 --- a/src/contracts/Repository/Iterator/BatchIteratorAdapter/ContentFilteringAdapter.php +++ b/src/contracts/Repository/Iterator/BatchIteratorAdapter/ContentFilteringAdapter.php @@ -39,5 +39,3 @@ public function fetch(int $offset, int $limit): Iterator return $this->contentService->find($filter, $this->languages)->getIterator(); } } - -class_alias(ContentFilteringAdapter::class, 'eZ\Publish\API\Repository\Iterator\BatchIteratorAdapter\ContentFilteringAdapter'); diff --git a/src/contracts/Repository/Iterator/BatchIteratorAdapter/ContentInfoSearchAdapter.php b/src/contracts/Repository/Iterator/BatchIteratorAdapter/ContentInfoSearchAdapter.php index 86f716cd96..8d7b4c318c 100644 --- a/src/contracts/Repository/Iterator/BatchIteratorAdapter/ContentInfoSearchAdapter.php +++ b/src/contracts/Repository/Iterator/BatchIteratorAdapter/ContentInfoSearchAdapter.php @@ -22,5 +22,3 @@ protected function executeSearch(Query $query): SearchResult ); } } - -class_alias(ContentInfoSearchAdapter::class, 'eZ\Publish\API\Repository\Iterator\BatchIteratorAdapter\ContentInfoSearchAdapter'); diff --git a/src/contracts/Repository/Iterator/BatchIteratorAdapter/ContentSearchAdapter.php b/src/contracts/Repository/Iterator/BatchIteratorAdapter/ContentSearchAdapter.php index 790e465e6e..7216153afc 100644 --- a/src/contracts/Repository/Iterator/BatchIteratorAdapter/ContentSearchAdapter.php +++ b/src/contracts/Repository/Iterator/BatchIteratorAdapter/ContentSearchAdapter.php @@ -22,5 +22,3 @@ protected function executeSearch(Query $query): SearchResult ); } } - -class_alias(ContentSearchAdapter::class, 'eZ\Publish\API\Repository\Iterator\BatchIteratorAdapter\ContentSearchAdapter'); diff --git a/src/contracts/Repository/Iterator/BatchIteratorAdapter/LocationFilteringAdapter.php b/src/contracts/Repository/Iterator/BatchIteratorAdapter/LocationFilteringAdapter.php index 16fba5dc00..16467431c1 100644 --- a/src/contracts/Repository/Iterator/BatchIteratorAdapter/LocationFilteringAdapter.php +++ b/src/contracts/Repository/Iterator/BatchIteratorAdapter/LocationFilteringAdapter.php @@ -39,5 +39,3 @@ public function fetch(int $offset, int $limit): Iterator return $this->locationService->find($filter, $this->languages)->getIterator(); } } - -class_alias(LocationFilteringAdapter::class, 'eZ\Publish\API\Repository\Iterator\BatchIteratorAdapter\LocationFilteringAdapter'); diff --git a/src/contracts/Repository/Iterator/BatchIteratorAdapter/LocationSearchAdapter.php b/src/contracts/Repository/Iterator/BatchIteratorAdapter/LocationSearchAdapter.php index b25c8a750d..f5401e01c9 100644 --- a/src/contracts/Repository/Iterator/BatchIteratorAdapter/LocationSearchAdapter.php +++ b/src/contracts/Repository/Iterator/BatchIteratorAdapter/LocationSearchAdapter.php @@ -33,5 +33,3 @@ protected function executeSearch(Query $query): SearchResult ); } } - -class_alias(LocationSearchAdapter::class, 'eZ\Publish\API\Repository\Iterator\BatchIteratorAdapter\LocationSearchAdapter'); diff --git a/src/contracts/Repository/LanguageResolver.php b/src/contracts/Repository/LanguageResolver.php index 1ff75e985d..4fc92bb298 100644 --- a/src/contracts/Repository/LanguageResolver.php +++ b/src/contracts/Repository/LanguageResolver.php @@ -68,5 +68,3 @@ public function setShowAllTranslations(bool $defaultShowAllTranslations): void; */ public function setDefaultUseAlwaysAvailable(bool $defaultUseAlwaysAvailable): void; } - -class_alias(LanguageResolver::class, 'eZ\Publish\API\Repository\LanguageResolver'); diff --git a/src/contracts/Repository/LanguageService.php b/src/contracts/Repository/LanguageService.php index 14db698f70..701b106b57 100644 --- a/src/contracts/Repository/LanguageService.php +++ b/src/contracts/Repository/LanguageService.php @@ -137,5 +137,3 @@ public function getDefaultLanguageCode(): string; */ public function newLanguageCreateStruct(): LanguageCreateStruct; } - -class_alias(LanguageService::class, 'eZ\Publish\API\Repository\LanguageService'); diff --git a/src/contracts/Repository/Lists/UnauthorizedListItem.php b/src/contracts/Repository/Lists/UnauthorizedListItem.php index eae30fdbbb..7b4be7eb27 100644 --- a/src/contracts/Repository/Lists/UnauthorizedListItem.php +++ b/src/contracts/Repository/Lists/UnauthorizedListItem.php @@ -58,5 +58,3 @@ public function getPayload(): array return $this->payload; } } - -class_alias(UnauthorizedListItem::class, 'eZ\Publish\API\Repository\Lists\UnauthorizedListItem'); diff --git a/src/contracts/Repository/LocationService.php b/src/contracts/Repository/LocationService.php index 124f7201d3..392306a00f 100644 --- a/src/contracts/Repository/LocationService.php +++ b/src/contracts/Repository/LocationService.php @@ -275,5 +275,3 @@ public function find(Filter $filter, ?array $languages = null): LocationList; */ public function count(Filter $filter, ?array $languages = null): int; } - -class_alias(LocationService::class, 'eZ\Publish\API\Repository\LocationService'); diff --git a/src/contracts/Repository/NotificationService.php b/src/contracts/Repository/NotificationService.php index 0079f5e0fc..5561e50f14 100644 --- a/src/contracts/Repository/NotificationService.php +++ b/src/contracts/Repository/NotificationService.php @@ -81,5 +81,3 @@ public function createNotification(CreateStruct $createStruct): Notification; */ public function deleteNotification(Notification $notification): void; } - -class_alias(NotificationService::class, 'eZ\Publish\API\Repository\NotificationService'); diff --git a/src/contracts/Repository/ObjectStateService.php b/src/contracts/Repository/ObjectStateService.php index 74f84b2309..cbc8e75e14 100644 --- a/src/contracts/Repository/ObjectStateService.php +++ b/src/contracts/Repository/ObjectStateService.php @@ -233,5 +233,3 @@ public function newObjectStateCreateStruct(string $identifier): ObjectStateCreat */ public function newObjectStateUpdateStruct(): ObjectStateUpdateStruct; } - -class_alias(ObjectStateService::class, 'eZ\Publish\API\Repository\ObjectStateService'); diff --git a/src/contracts/Repository/PasswordHashService.php b/src/contracts/Repository/PasswordHashService.php index a0cea8e285..a2f74da9eb 100644 --- a/src/contracts/Repository/PasswordHashService.php +++ b/src/contracts/Repository/PasswordHashService.php @@ -43,5 +43,3 @@ public function createPasswordHash(string $plainPassword, ?int $hashType = null) */ public function isValidPassword(string $plainPassword, string $passwordHash, ?int $hashType = null): bool; } - -class_alias(PasswordHashService::class, 'eZ\Publish\API\Repository\PasswordHashService'); diff --git a/src/contracts/Repository/PermissionCriterionResolver.php b/src/contracts/Repository/PermissionCriterionResolver.php index ec70545990..0baba717d4 100644 --- a/src/contracts/Repository/PermissionCriterionResolver.php +++ b/src/contracts/Repository/PermissionCriterionResolver.php @@ -40,5 +40,3 @@ public function getPermissionsCriterion(string $module = 'content', string $func */ public function getQueryPermissionsCriterion(): Criterion; } - -class_alias(PermissionCriterionResolver::class, 'eZ\Publish\API\Repository\PermissionCriterionResolver'); diff --git a/src/contracts/Repository/PermissionResolver.php b/src/contracts/Repository/PermissionResolver.php index b8ad3fa1db..32215f1e2b 100644 --- a/src/contracts/Repository/PermissionResolver.php +++ b/src/contracts/Repository/PermissionResolver.php @@ -101,5 +101,3 @@ public function lookupLimitations( array $limitationsIdentifiers = [] ): LookupLimitationResult; } - -class_alias(PermissionResolver::class, 'eZ\Publish\API\Repository\PermissionResolver'); diff --git a/src/contracts/Repository/PermissionService.php b/src/contracts/Repository/PermissionService.php index 4c12599f2c..32127df05d 100644 --- a/src/contracts/Repository/PermissionService.php +++ b/src/contracts/Repository/PermissionService.php @@ -11,5 +11,3 @@ interface PermissionService extends PermissionResolver, PermissionCriterionResolver { } - -class_alias(PermissionService::class, 'eZ\Publish\API\Repository\PermissionService'); diff --git a/src/contracts/Repository/Repository.php b/src/contracts/Repository/Repository.php index ae678a8642..12ab78873a 100644 --- a/src/contracts/Repository/Repository.php +++ b/src/contracts/Repository/Repository.php @@ -206,5 +206,3 @@ public function commit(): void; */ public function rollback(): void; } - -class_alias(Repository::class, 'eZ\Publish\API\Repository\Repository'); diff --git a/src/contracts/Repository/RoleService.php b/src/contracts/Repository/RoleService.php index e9ccb7b700..5ced9eab15 100644 --- a/src/contracts/Repository/RoleService.php +++ b/src/contracts/Repository/RoleService.php @@ -403,5 +403,3 @@ public function getLimitationType(string $identifier): Type; */ public function getLimitationTypesByModuleFunction(string $module, string $function): iterable; } - -class_alias(RoleService::class, 'eZ\Publish\API\Repository\RoleService'); diff --git a/src/contracts/Repository/SearchService.php b/src/contracts/Repository/SearchService.php index 585c5ae894..10d1d63e12 100644 --- a/src/contracts/Repository/SearchService.php +++ b/src/contracts/Repository/SearchService.php @@ -206,5 +206,3 @@ public function findLocations(LocationQuery $query, array $languageFilter = [], */ public function supports(int $capabilityFlag): bool; } - -class_alias(SearchService::class, 'eZ\Publish\API\Repository\SearchService'); diff --git a/src/contracts/Repository/SectionService.php b/src/contracts/Repository/SectionService.php index 5395ddf0cd..324f9e5866 100644 --- a/src/contracts/Repository/SectionService.php +++ b/src/contracts/Repository/SectionService.php @@ -143,5 +143,3 @@ public function newSectionCreateStruct(): SectionCreateStruct; */ public function newSectionUpdateStruct(): SectionUpdateStruct; } - -class_alias(SectionService::class, 'eZ\Publish\API\Repository\SectionService'); diff --git a/src/contracts/Repository/SettingService.php b/src/contracts/Repository/SettingService.php index cd48ea2b65..533b10179f 100644 --- a/src/contracts/Repository/SettingService.php +++ b/src/contracts/Repository/SettingService.php @@ -42,5 +42,3 @@ public function newSettingCreateStruct(array $properties = []): SettingCreateStr public function newSettingUpdateStruct(array $properties = []): SettingUpdateStruct; } - -class_alias(SettingService::class, 'eZ\Publish\API\Repository\SettingService'); diff --git a/src/contracts/Repository/Strategy/ContentThumbnail/Field/FieldTypeBasedThumbnailStrategy.php b/src/contracts/Repository/Strategy/ContentThumbnail/Field/FieldTypeBasedThumbnailStrategy.php index 732606326d..de593a1513 100644 --- a/src/contracts/Repository/Strategy/ContentThumbnail/Field/FieldTypeBasedThumbnailStrategy.php +++ b/src/contracts/Repository/Strategy/ContentThumbnail/Field/FieldTypeBasedThumbnailStrategy.php @@ -12,5 +12,3 @@ interface FieldTypeBasedThumbnailStrategy extends ThumbnailStrategy { public function getFieldTypeIdentifier(): string; } - -class_alias(FieldTypeBasedThumbnailStrategy::class, 'eZ\Publish\SPI\Repository\Strategy\ContentThumbnail\Field\FieldTypeBasedThumbnailStrategy'); diff --git a/src/contracts/Repository/Strategy/ContentThumbnail/Field/ThumbnailStrategy.php b/src/contracts/Repository/Strategy/ContentThumbnail/Field/ThumbnailStrategy.php index 00bc4a3989..f8aa46f6fa 100644 --- a/src/contracts/Repository/Strategy/ContentThumbnail/Field/ThumbnailStrategy.php +++ b/src/contracts/Repository/Strategy/ContentThumbnail/Field/ThumbnailStrategy.php @@ -16,5 +16,3 @@ interface ThumbnailStrategy { public function getThumbnail(Field $field, ?VersionInfo $versionInfo = null): ?Thumbnail; } - -class_alias(ThumbnailStrategy::class, 'eZ\Publish\SPI\Repository\Strategy\ContentThumbnail\Field\ThumbnailStrategy'); diff --git a/src/contracts/Repository/Strategy/ContentThumbnail/ThumbnailStrategy.php b/src/contracts/Repository/Strategy/ContentThumbnail/ThumbnailStrategy.php index 445a3bcb11..f5d771f93d 100644 --- a/src/contracts/Repository/Strategy/ContentThumbnail/ThumbnailStrategy.php +++ b/src/contracts/Repository/Strategy/ContentThumbnail/ThumbnailStrategy.php @@ -16,5 +16,3 @@ interface ThumbnailStrategy { public function getThumbnail(ContentType $contentType, array $fields, ?VersionInfo $versionInfo = null): ?Thumbnail; } - -class_alias(ThumbnailStrategy::class, 'eZ\Publish\SPI\Repository\Strategy\ContentThumbnail\ThumbnailStrategy'); diff --git a/src/contracts/Repository/Translatable.php b/src/contracts/Repository/Translatable.php index af9780a120..77ba4e54f9 100644 --- a/src/contracts/Repository/Translatable.php +++ b/src/contracts/Repository/Translatable.php @@ -21,5 +21,3 @@ interface Translatable */ public function getTranslatableMessage(); } - -class_alias(Translatable::class, 'eZ\Publish\API\Repository\Translatable'); diff --git a/src/contracts/Repository/TranslationService.php b/src/contracts/Repository/TranslationService.php index 0286701c45..19e8edf9be 100644 --- a/src/contracts/Repository/TranslationService.php +++ b/src/contracts/Repository/TranslationService.php @@ -45,5 +45,3 @@ public function translate(Translation $translation, $locale); */ public function translateString($translation, $locale); } - -class_alias(TranslationService::class, 'eZ\Publish\API\Repository\TranslationService'); diff --git a/src/contracts/Repository/TrashService.php b/src/contracts/Repository/TrashService.php index 1f1956444c..8d23646b48 100644 --- a/src/contracts/Repository/TrashService.php +++ b/src/contracts/Repository/TrashService.php @@ -98,5 +98,3 @@ public function deleteTrashItem(TrashItem $trashItem): TrashItemDeleteResult; */ public function findTrashItems(Query $query): SearchResult; } - -class_alias(TrashService::class, 'eZ\Publish\API\Repository\TrashService'); diff --git a/src/contracts/Repository/URLAliasService.php b/src/contracts/Repository/URLAliasService.php index b2df187f29..377a530ca5 100644 --- a/src/contracts/Repository/URLAliasService.php +++ b/src/contracts/Repository/URLAliasService.php @@ -175,5 +175,3 @@ public function refreshSystemUrlAliasesForLocation(Location $location): void; */ public function deleteCorruptedUrlAliases(): int; } - -class_alias(URLAliasService::class, 'eZ\Publish\API\Repository\URLAliasService'); diff --git a/src/contracts/Repository/URLService.php b/src/contracts/Repository/URLService.php index d9e98c2878..9badab0cb4 100644 --- a/src/contracts/Repository/URLService.php +++ b/src/contracts/Repository/URLService.php @@ -88,5 +88,3 @@ public function loadByUrl(string $url): URL; */ public function updateUrl(URL $url, URLUpdateStruct $struct): URL; } - -class_alias(URLService::class, 'eZ\Publish\API\Repository\URLService'); diff --git a/src/contracts/Repository/URLWildcardService.php b/src/contracts/Repository/URLWildcardService.php index 541c964da2..a52de13f3b 100644 --- a/src/contracts/Repository/URLWildcardService.php +++ b/src/contracts/Repository/URLWildcardService.php @@ -109,5 +109,3 @@ public function translate(string $url): URLWildcardTranslationResult; */ public function countAll(): int; } - -class_alias(URLWildcardService::class, 'eZ\Publish\API\Repository\URLWildcardService'); diff --git a/src/contracts/Repository/UserPreferenceService.php b/src/contracts/Repository/UserPreferenceService.php index 62ad0b2925..68322c6049 100644 --- a/src/contracts/Repository/UserPreferenceService.php +++ b/src/contracts/Repository/UserPreferenceService.php @@ -59,5 +59,3 @@ public function loadUserPreferences(int $offset = 0, int $limit = 25): UserPrefe */ public function getUserPreferenceCount(): int; } - -class_alias(UserPreferenceService::class, 'eZ\Publish\API\Repository\UserPreferenceService'); diff --git a/src/contracts/Repository/UserService.php b/src/contracts/Repository/UserService.php index 84413abe9f..faf485aca0 100644 --- a/src/contracts/Repository/UserService.php +++ b/src/contracts/Repository/UserService.php @@ -407,5 +407,3 @@ public function validatePassword(string $password, PasswordValidationContext $co */ public function getPasswordInfo(User $user): PasswordInfo; } - -class_alias(UserService::class, 'eZ\Publish\API\Repository\UserService'); diff --git a/src/contracts/Repository/Validator/ContentValidator.php b/src/contracts/Repository/Validator/ContentValidator.php index e71607afde..2095f98c68 100644 --- a/src/contracts/Repository/Validator/ContentValidator.php +++ b/src/contracts/Repository/Validator/ContentValidator.php @@ -40,5 +40,3 @@ public function validate( ?array $fieldIdentifiers = null ): array; } - -class_alias(ContentValidator::class, 'eZ\Publish\SPI\Repository\Validator\ContentValidator'); diff --git a/src/contracts/Repository/Values/Bookmark/BookmarkList.php b/src/contracts/Repository/Values/Bookmark/BookmarkList.php index e59ebc32b8..0c0d49e2cc 100644 --- a/src/contracts/Repository/Values/Bookmark/BookmarkList.php +++ b/src/contracts/Repository/Values/Bookmark/BookmarkList.php @@ -40,5 +40,3 @@ public function getIterator(): Traversable return new ArrayIterator($this->items); } } - -class_alias(BookmarkList::class, 'eZ\Publish\API\Repository\Values\Bookmark\BookmarkList'); diff --git a/src/contracts/Repository/Values/Content/Content.php b/src/contracts/Repository/Values/Content/Content.php index 5997ade311..da933539f4 100644 --- a/src/contracts/Repository/Values/Content/Content.php +++ b/src/contracts/Repository/Values/Content/Content.php @@ -122,5 +122,3 @@ abstract public function getThumbnail(): ?Thumbnail; abstract public function getDefaultLanguageCode(): string; } - -class_alias(Content::class, 'eZ\Publish\API\Repository\Values\Content\Content'); diff --git a/src/contracts/Repository/Values/Content/ContentCreateStruct.php b/src/contracts/Repository/Values/Content/ContentCreateStruct.php index 0c83975881..fa2b034c1f 100644 --- a/src/contracts/Repository/Values/Content/ContentCreateStruct.php +++ b/src/contracts/Repository/Values/Content/ContentCreateStruct.php @@ -73,5 +73,3 @@ abstract class ContentCreateStruct extends ContentStruct */ public $modificationDate; } - -class_alias(ContentCreateStruct::class, 'eZ\Publish\API\Repository\Values\Content\ContentCreateStruct'); diff --git a/src/contracts/Repository/Values/Content/ContentDraftList.php b/src/contracts/Repository/Values/Content/ContentDraftList.php index f326db8f52..9289b5e122 100644 --- a/src/contracts/Repository/Values/Content/ContentDraftList.php +++ b/src/contracts/Repository/Values/Content/ContentDraftList.php @@ -36,5 +36,3 @@ public function getIterator(): Traversable return new ArrayIterator($this->items); } } - -class_alias(ContentDraftList::class, 'eZ\Publish\API\Repository\Values\Content\ContentDraftList'); diff --git a/src/contracts/Repository/Values/Content/ContentInfo.php b/src/contracts/Repository/Values/Content/ContentInfo.php index 8d2c3cce09..0fc1b2592f 100644 --- a/src/contracts/Repository/Values/Content/ContentInfo.php +++ b/src/contracts/Repository/Values/Content/ContentInfo.php @@ -240,5 +240,3 @@ public function getName(): string return $this->name; } } - -class_alias(ContentInfo::class, 'eZ\Publish\API\Repository\Values\Content\ContentInfo'); diff --git a/src/contracts/Repository/Values/Content/ContentList.php b/src/contracts/Repository/Values/Content/ContentList.php index ff5911b1d5..cef8cc4e73 100644 --- a/src/contracts/Repository/Values/Content/ContentList.php +++ b/src/contracts/Repository/Values/Content/ContentList.php @@ -47,5 +47,3 @@ public function getIterator(): ArrayIterator return new ArrayIterator($this->contentItems); } } - -class_alias(ContentList::class, 'eZ\Publish\API\Repository\Values\Content\ContentList'); diff --git a/src/contracts/Repository/Values/Content/ContentMetadataUpdateStruct.php b/src/contracts/Repository/Values/Content/ContentMetadataUpdateStruct.php index 06083bfca4..315134f1de 100644 --- a/src/contracts/Repository/Values/Content/ContentMetadataUpdateStruct.php +++ b/src/contracts/Repository/Values/Content/ContentMetadataUpdateStruct.php @@ -77,5 +77,3 @@ class ContentMetadataUpdateStruct extends ValueObject */ public $name; } - -class_alias(ContentMetadataUpdateStruct::class, 'eZ\Publish\API\Repository\Values\Content\ContentMetadataUpdateStruct'); diff --git a/src/contracts/Repository/Values/Content/ContentStruct.php b/src/contracts/Repository/Values/Content/ContentStruct.php index 5f730920e4..0cd716a6fd 100644 --- a/src/contracts/Repository/Values/Content/ContentStruct.php +++ b/src/contracts/Repository/Values/Content/ContentStruct.php @@ -31,5 +31,3 @@ abstract class ContentStruct extends ValueObject */ abstract public function setField(string $fieldDefIdentifier, $value, ?string $language = null): void; } - -class_alias(ContentStruct::class, 'eZ\Publish\API\Repository\Values\Content\ContentStruct'); diff --git a/src/contracts/Repository/Values/Content/ContentUpdateStruct.php b/src/contracts/Repository/Values/Content/ContentUpdateStruct.php index f079a3c01b..1ce83acdec 100644 --- a/src/contracts/Repository/Values/Content/ContentUpdateStruct.php +++ b/src/contracts/Repository/Values/Content/ContentUpdateStruct.php @@ -38,5 +38,3 @@ abstract class ContentUpdateStruct extends ContentStruct */ public $creatorId; } - -class_alias(ContentUpdateStruct::class, 'eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct'); diff --git a/src/contracts/Repository/Values/Content/DraftList/ContentDraftListItemInterface.php b/src/contracts/Repository/Values/Content/DraftList/ContentDraftListItemInterface.php index 3dc80be40c..1a16015bee 100644 --- a/src/contracts/Repository/Values/Content/DraftList/ContentDraftListItemInterface.php +++ b/src/contracts/Repository/Values/Content/DraftList/ContentDraftListItemInterface.php @@ -22,5 +22,3 @@ public function getVersionInfo(): ?VersionInfo; */ public function hasVersionInfo(): bool; } - -class_alias(ContentDraftListItemInterface::class, 'eZ\Publish\API\Repository\Values\Content\DraftList\ContentDraftListItemInterface'); diff --git a/src/contracts/Repository/Values/Content/DraftList/Item/ContentDraftListItem.php b/src/contracts/Repository/Values/Content/DraftList/Item/ContentDraftListItem.php index a577ac4e12..422cb91121 100644 --- a/src/contracts/Repository/Values/Content/DraftList/Item/ContentDraftListItem.php +++ b/src/contracts/Repository/Values/Content/DraftList/Item/ContentDraftListItem.php @@ -45,5 +45,3 @@ public function hasVersionInfo(): bool return $this->versionInfo instanceof VersionInfo; } } - -class_alias(ContentDraftListItem::class, 'eZ\Publish\API\Repository\Values\Content\DraftList\Item\ContentDraftListItem'); diff --git a/src/contracts/Repository/Values/Content/DraftList/Item/UnauthorizedContentDraftListItem.php b/src/contracts/Repository/Values/Content/DraftList/Item/UnauthorizedContentDraftListItem.php index fa1a2f4e54..f56a239a46 100644 --- a/src/contracts/Repository/Values/Content/DraftList/Item/UnauthorizedContentDraftListItem.php +++ b/src/contracts/Repository/Values/Content/DraftList/Item/UnauthorizedContentDraftListItem.php @@ -77,5 +77,3 @@ public function hasVersionInfo(): bool return false; } } - -class_alias(UnauthorizedContentDraftListItem::class, 'eZ\Publish\API\Repository\Values\Content\DraftList\Item\UnauthorizedContentDraftListItem'); diff --git a/src/contracts/Repository/Values/Content/Field.php b/src/contracts/Repository/Values/Content/Field.php index 627502d6a5..4b1576dd9e 100644 --- a/src/contracts/Repository/Values/Content/Field.php +++ b/src/contracts/Repository/Values/Content/Field.php @@ -95,5 +95,3 @@ public function isVirtual(): bool return null === $this->id; } } - -class_alias(Field::class, 'eZ\Publish\API\Repository\Values\Content\Field'); diff --git a/src/contracts/Repository/Values/Content/Language.php b/src/contracts/Repository/Values/Content/Language.php index 0594395ab0..cb4ff8bbea 100644 --- a/src/contracts/Repository/Values/Content/Language.php +++ b/src/contracts/Repository/Values/Content/Language.php @@ -65,5 +65,3 @@ public function isEnabled(): bool return $this->enabled; } } - -class_alias(Language::class, 'eZ\Publish\API\Repository\Values\Content\Language'); diff --git a/src/contracts/Repository/Values/Content/LanguageCreateStruct.php b/src/contracts/Repository/Values/Content/LanguageCreateStruct.php index 3efe724cb5..4f254c4653 100644 --- a/src/contracts/Repository/Values/Content/LanguageCreateStruct.php +++ b/src/contracts/Repository/Values/Content/LanguageCreateStruct.php @@ -38,5 +38,3 @@ class LanguageCreateStruct extends ValueObject */ public $enabled = true; } - -class_alias(LanguageCreateStruct::class, 'eZ\Publish\API\Repository\Values\Content\LanguageCreateStruct'); diff --git a/src/contracts/Repository/Values/Content/Location.php b/src/contracts/Repository/Values/Content/Location.php index 972302e695..3d8557ba13 100644 --- a/src/contracts/Repository/Values/Content/Location.php +++ b/src/contracts/Repository/Values/Content/Location.php @@ -322,5 +322,3 @@ public function __get($property) return parent::__get($property); } } - -class_alias(Location::class, 'eZ\Publish\API\Repository\Values\Content\Location'); diff --git a/src/contracts/Repository/Values/Content/LocationCreateStruct.php b/src/contracts/Repository/Values/Content/LocationCreateStruct.php index 2e80acd181..9c7d4950b9 100644 --- a/src/contracts/Repository/Values/Content/LocationCreateStruct.php +++ b/src/contracts/Repository/Values/Content/LocationCreateStruct.php @@ -72,5 +72,3 @@ class LocationCreateStruct extends ValueObject */ public $parentLocationId; } - -class_alias(LocationCreateStruct::class, 'eZ\Publish\API\Repository\Values\Content\LocationCreateStruct'); diff --git a/src/contracts/Repository/Values/Content/LocationList.php b/src/contracts/Repository/Values/Content/LocationList.php index cf6d624d33..02b5081768 100644 --- a/src/contracts/Repository/Values/Content/LocationList.php +++ b/src/contracts/Repository/Values/Content/LocationList.php @@ -53,5 +53,3 @@ public function getTotalCount(): int return $this->totalCount; } } - -class_alias(LocationList::class, 'eZ\Publish\API\Repository\Values\Content\LocationList'); diff --git a/src/contracts/Repository/Values/Content/LocationQuery.php b/src/contracts/Repository/Values/Content/LocationQuery.php index c35464f1f9..763aa16726 100644 --- a/src/contracts/Repository/Values/Content/LocationQuery.php +++ b/src/contracts/Repository/Values/Content/LocationQuery.php @@ -14,5 +14,3 @@ class LocationQuery extends Query { } - -class_alias(LocationQuery::class, 'eZ\Publish\API\Repository\Values\Content\LocationQuery'); diff --git a/src/contracts/Repository/Values/Content/LocationUpdateStruct.php b/src/contracts/Repository/Values/Content/LocationUpdateStruct.php index 421c9c7183..1699815bfd 100644 --- a/src/contracts/Repository/Values/Content/LocationUpdateStruct.php +++ b/src/contracts/Repository/Values/Content/LocationUpdateStruct.php @@ -49,5 +49,3 @@ class LocationUpdateStruct extends ValueObject */ public $sortOrder; } - -class_alias(LocationUpdateStruct::class, 'eZ\Publish\API\Repository\Values\Content\LocationUpdateStruct'); diff --git a/src/contracts/Repository/Values/Content/Query.php b/src/contracts/Repository/Values/Content/Query.php index ebcb9aebc7..e0f5c4459c 100644 --- a/src/contracts/Repository/Values/Content/Query.php +++ b/src/contracts/Repository/Values/Content/Query.php @@ -103,5 +103,3 @@ class Query extends ValueObject */ public $performCount = true; } - -class_alias(Query::class, 'eZ\Publish\API\Repository\Values\Content\Query'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation.php index 05adf06c74..f313f6b093 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation.php @@ -12,5 +12,3 @@ interface Aggregation { public function getName(): string; } - -class_alias(Aggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractRangeAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractRangeAggregation.php index fd2b5bab27..745648fd81 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractRangeAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractRangeAggregation.php @@ -38,5 +38,3 @@ public function getName(): string return $this->name; } } - -class_alias(AbstractRangeAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\AbstractRangeAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractStatsAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractStatsAggregation.php index 5e15dbc4c5..7aafd1b2e9 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractStatsAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractStatsAggregation.php @@ -29,5 +29,3 @@ public function getName(): string return $this->name; } } - -class_alias(AbstractStatsAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\AbstractStatsAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractTermAggregation.php index 2886cf61b7..2736744e73 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractTermAggregation.php @@ -70,5 +70,3 @@ public function setMinCount(int $minCount): self return $this; } } - -class_alias(AbstractTermAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\AbstractTermAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/ContentTypeGroupTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/ContentTypeGroupTermAggregation.php index ca41b42449..cd29c58e1e 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/ContentTypeGroupTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/ContentTypeGroupTermAggregation.php @@ -11,5 +11,3 @@ final class ContentTypeGroupTermAggregation extends AbstractTermAggregation { } - -class_alias(ContentTypeGroupTermAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\ContentTypeGroupTermAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/ContentTypeTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/ContentTypeTermAggregation.php index f8ead7d995..f02c4a721e 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/ContentTypeTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/ContentTypeTermAggregation.php @@ -11,5 +11,3 @@ final class ContentTypeTermAggregation extends AbstractTermAggregation { } - -class_alias(ContentTypeTermAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\ContentTypeTermAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/DateMetadataRangeAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/DateMetadataRangeAggregation.php index 2dfa08ad53..4c977605b4 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/DateMetadataRangeAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/DateMetadataRangeAggregation.php @@ -44,5 +44,3 @@ public static function fromGenerator( return new self($name, $type, $ranges); } } - -class_alias(DateMetadataRangeAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\DateMetadataRangeAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/AbstractFieldRangeAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/AbstractFieldRangeAggregation.php index e63e888c96..ef63bf828f 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/AbstractFieldRangeAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/AbstractFieldRangeAggregation.php @@ -27,5 +27,3 @@ public function __construct( $this->fieldDefinitionIdentifier = $fieldDefinitionIdentifier; } } - -class_alias(AbstractFieldRangeAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Field\AbstractFieldRangeAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/AbstractFieldStatsAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/AbstractFieldStatsAggregation.php index 4cbf8e9d11..aae112eaa7 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/AbstractFieldStatsAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/AbstractFieldStatsAggregation.php @@ -26,5 +26,3 @@ public function __construct( $this->fieldDefinitionIdentifier = $fieldDefinitionIdentifier; } } - -class_alias(AbstractFieldStatsAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Field\AbstractFieldStatsAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/AbstractFieldTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/AbstractFieldTermAggregation.php index acf34c9065..f9c7524eb8 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/AbstractFieldTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/AbstractFieldTermAggregation.php @@ -26,5 +26,3 @@ public function __construct( $this->fieldDefinitionIdentifier = $fieldDefinitionIdentifier; } } - -class_alias(AbstractFieldTermAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Field\AbstractFieldTermAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/AuthorTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/AuthorTermAggregation.php index f179b17751..98fe4a8a28 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/AuthorTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/AuthorTermAggregation.php @@ -11,5 +11,3 @@ final class AuthorTermAggregation extends AbstractFieldTermAggregation { } - -class_alias(AuthorTermAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Field\AuthorTermAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/CheckboxTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/CheckboxTermAggregation.php index b588e8cb3a..47629dc7bd 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/CheckboxTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/CheckboxTermAggregation.php @@ -11,5 +11,3 @@ final class CheckboxTermAggregation extends AbstractFieldTermAggregation { } - -class_alias(CheckboxTermAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Field\CheckboxTermAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/CountryTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/CountryTermAggregation.php index 968ea7f980..dafe9fb50b 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/CountryTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/CountryTermAggregation.php @@ -34,5 +34,3 @@ public function getType(): int return $this->type; } } - -class_alias(CountryTermAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Field\CountryTermAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/DateRangeAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/DateRangeAggregation.php index 8b225caf25..f9dda69189 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/DateRangeAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/DateRangeAggregation.php @@ -27,5 +27,3 @@ public static function fromGenerator( return new self($name, $contentTypeIdentifier, $fieldDefinitionIdentifier, $ranges); } } - -class_alias(DateRangeAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Field\DateRangeAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/DateTimeRangeAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/DateTimeRangeAggregation.php index 3963444ecc..b4a80177df 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/DateTimeRangeAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/DateTimeRangeAggregation.php @@ -27,5 +27,3 @@ public static function fromGenerator( return new self($name, $contentTypeIdentifier, $fieldDefinitionIdentifier, $ranges); } } - -class_alias(DateTimeRangeAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Field\DateTimeRangeAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/FieldAggregationTrait.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/FieldAggregationTrait.php index 065dda94e1..3aaa520e3d 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/FieldAggregationTrait.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/FieldAggregationTrait.php @@ -26,5 +26,3 @@ public function getFieldDefinitionIdentifier(): string return $this->fieldDefinitionIdentifier; } } - -class_alias(FieldAggregationTrait::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Field\FieldAggregationTrait'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/FloatRangeAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/FloatRangeAggregation.php index 188a15396f..af2f5d657d 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/FloatRangeAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/FloatRangeAggregation.php @@ -27,5 +27,3 @@ public static function fromGenerator( return new self($name, $contentTypeIdentifier, $fieldDefinitionIdentifier, $ranges); } } - -class_alias(FloatRangeAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Field\FloatRangeAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/FloatStatsAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/FloatStatsAggregation.php index 8a7e3e236d..bcd2412c4d 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/FloatStatsAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/FloatStatsAggregation.php @@ -11,5 +11,3 @@ final class FloatStatsAggregation extends AbstractFieldStatsAggregation { } - -class_alias(FloatStatsAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Field\FloatStatsAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/IntegerRangeAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/IntegerRangeAggregation.php index e79fe6dd28..0d426371c5 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/IntegerRangeAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/IntegerRangeAggregation.php @@ -27,5 +27,3 @@ public static function fromGenerator( return new static($name, $contentTypeIdentifier, $fieldDefinitionIdentifier, $ranges); } } - -class_alias(IntegerRangeAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Field\IntegerRangeAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/IntegerStatsAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/IntegerStatsAggregation.php index ce84a7f915..742de6b3b7 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/IntegerStatsAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/IntegerStatsAggregation.php @@ -11,5 +11,3 @@ final class IntegerStatsAggregation extends AbstractFieldStatsAggregation { } - -class_alias(IntegerStatsAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Field\IntegerStatsAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/KeywordTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/KeywordTermAggregation.php index 70ec778e82..decb43bdf2 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/KeywordTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/KeywordTermAggregation.php @@ -11,5 +11,3 @@ final class KeywordTermAggregation extends AbstractFieldTermAggregation { } - -class_alias(KeywordTermAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Field\KeywordTermAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/SelectionTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/SelectionTermAggregation.php index 91375c51e9..0bd76091ff 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/SelectionTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/SelectionTermAggregation.php @@ -11,5 +11,3 @@ final class SelectionTermAggregation extends AbstractFieldTermAggregation { } - -class_alias(SelectionTermAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Field\SelectionTermAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/TimeRangeAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/TimeRangeAggregation.php index 30907ec4b1..9342b1c182 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/TimeRangeAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/TimeRangeAggregation.php @@ -27,5 +27,3 @@ public static function fromGenerator( return new self($name, $contentTypeIdentifier, $fieldDefinitionIdentifier, $ranges); } } - -class_alias(TimeRangeAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Field\TimeRangeAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/FieldAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/FieldAggregation.php index 868371ed47..0753176eda 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/FieldAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/FieldAggregation.php @@ -14,5 +14,3 @@ public function getContentTypeIdentifier(): string; public function getFieldDefinitionIdentifier(): string; } - -class_alias(FieldAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\FieldAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/LanguageTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/LanguageTermAggregation.php index fa83872aa9..942a1486f1 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/LanguageTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/LanguageTermAggregation.php @@ -11,5 +11,3 @@ final class LanguageTermAggregation extends AbstractTermAggregation { } - -class_alias(LanguageTermAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\LanguageTermAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Location/LocationChildrenTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Location/LocationChildrenTermAggregation.php index ee719a9265..5276a75b05 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Location/LocationChildrenTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Location/LocationChildrenTermAggregation.php @@ -14,5 +14,3 @@ final class LocationChildrenTermAggregation extends AbstractTermAggregation implements LocationAggregation { } - -class_alias(LocationChildrenTermAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Location\LocationChildrenTermAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Location/SubtreeTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Location/SubtreeTermAggregation.php index faa05e892a..4c8b674191 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Location/SubtreeTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Location/SubtreeTermAggregation.php @@ -47,5 +47,3 @@ public static function fromLocation(string $name, Location $location): self return new self($name, $location->pathString); } } - -class_alias(SubtreeTermAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Location\SubtreeTermAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/LocationAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/LocationAggregation.php index 5e9a3d3d26..c761644781 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/LocationAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/LocationAggregation.php @@ -14,5 +14,3 @@ interface LocationAggregation { } - -class_alias(LocationAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\LocationAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/ObjectStateTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/ObjectStateTermAggregation.php index cca2dc6114..9bb9c37759 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/ObjectStateTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/ObjectStateTermAggregation.php @@ -27,5 +27,3 @@ public function getObjectStateGroupIdentifier(): string return $this->objectStateGroupIdentifier; } } - -class_alias(ObjectStateTermAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\ObjectStateTermAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Range.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Range.php index aea16b7214..2fa5ac01d6 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Range.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Range.php @@ -111,5 +111,3 @@ public static function ofDateTime(?DateTimeInterface $from, ?DateTimeInterface $ return new self($from, $to); } } - -class_alias(Range::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Range'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/RawAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/RawAggregation.php index f0d4d5973e..664945148f 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/RawAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/RawAggregation.php @@ -12,5 +12,3 @@ interface RawAggregation { public function getFieldName(): string; } - -class_alias(RawAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\RawAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/RawRangeAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/RawRangeAggregation.php index 2aac8a6bb8..860a414323 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/RawRangeAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/RawRangeAggregation.php @@ -41,5 +41,3 @@ public static function fromGenerator( return new self($name, $fieldName, $ranges); } } - -class_alias(RawRangeAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\RawRangeAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/RawStatsAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/RawStatsAggregation.php index f8ea562a64..e17577d066 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/RawStatsAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/RawStatsAggregation.php @@ -25,5 +25,3 @@ public function getFieldName(): string return $this->fieldName; } } - -class_alias(RawStatsAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\RawStatsAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/RawTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/RawTermAggregation.php index 9002a92f0f..f48364d924 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/RawTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/RawTermAggregation.php @@ -27,5 +27,3 @@ public function getFieldName(): string return $this->fieldName; } } - -class_alias(RawTermAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\RawTermAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/SectionTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/SectionTermAggregation.php index 9a860f8780..e60f94689b 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/SectionTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/SectionTermAggregation.php @@ -11,5 +11,3 @@ final class SectionTermAggregation extends AbstractTermAggregation { } - -class_alias(SectionTermAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\SectionTermAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/UserMetadataTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/UserMetadataTermAggregation.php index 0221118012..a1fb81d715 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/UserMetadataTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/UserMetadataTermAggregation.php @@ -46,5 +46,3 @@ public function getType(): string return $this->type; } } - -class_alias(UserMetadataTermAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\UserMetadataTermAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/VisibilityTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/VisibilityTermAggregation.php index 77a0642328..9d9f382a1b 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/VisibilityTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/VisibilityTermAggregation.php @@ -11,5 +11,3 @@ final class VisibilityTermAggregation extends AbstractTermAggregation { } - -class_alias(VisibilityTermAggregation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\VisibilityTermAggregation'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion.php b/src/contracts/Repository/Values/Content/Query/Criterion.php index 7e80664698..1de7f59100 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion.php @@ -178,5 +178,3 @@ private function getValueTypeCheckCallback(int $valueTypes): callable return $callback; } } - -class_alias(Criterion::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/Ancestor.php b/src/contracts/Repository/Values/Content/Query/Criterion/Ancestor.php index 984e53fdcb..2e47a5909c 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/Ancestor.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/Ancestor.php @@ -57,5 +57,3 @@ public function getSpecifications(): array ]; } } - -class_alias(Ancestor::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\Ancestor'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/CompositeCriterion.php b/src/contracts/Repository/Values/Content/Query/Criterion/CompositeCriterion.php index 50da25e8ef..960347d893 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/CompositeCriterion.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/CompositeCriterion.php @@ -26,5 +26,3 @@ public function getSpecifications(): array throw new NotImplementedException('getSpecifications() not implemented for CompositeCriterion'); } } - -class_alias(CompositeCriterion::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\CompositeCriterion'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/ContentId.php b/src/contracts/Repository/Values/Content/Query/Criterion/ContentId.php index ec7158bc5a..032a978cf5 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/ContentId.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/ContentId.php @@ -44,5 +44,3 @@ public function getSpecifications(): array ]; } } - -class_alias(ContentId::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\ContentId'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/ContentTypeGroupId.php b/src/contracts/Repository/Values/Content/Query/Criterion/ContentTypeGroupId.php index f68507ad20..0da13cafd3 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/ContentTypeGroupId.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/ContentTypeGroupId.php @@ -54,5 +54,3 @@ public function getSpecifications(): array ]; } } - -class_alias(ContentTypeGroupId::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\ContentTypeGroupId'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/ContentTypeId.php b/src/contracts/Repository/Values/Content/Query/Criterion/ContentTypeId.php index 04e807f871..a0fe2272f3 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/ContentTypeId.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/ContentTypeId.php @@ -47,5 +47,3 @@ public function getSpecifications(): array ]; } } - -class_alias(ContentTypeId::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\ContentTypeId'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/ContentTypeIdentifier.php b/src/contracts/Repository/Values/Content/Query/Criterion/ContentTypeIdentifier.php index cb07f79b5e..e225dccbd9 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/ContentTypeIdentifier.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/ContentTypeIdentifier.php @@ -51,5 +51,3 @@ public function getSpecifications(): array ]; } } - -class_alias(ContentTypeIdentifier::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/CustomField.php b/src/contracts/Repository/Values/Content/Query/Criterion/CustomField.php index 9e347bcff1..c64ca7697e 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/CustomField.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/CustomField.php @@ -33,5 +33,3 @@ public function getSpecifications(): array ]; } } - -class_alias(CustomField::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\CustomField'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/DateMetadata.php b/src/contracts/Repository/Values/Content/Query/Criterion/DateMetadata.php index 78d5397468..eea866fb8f 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/DateMetadata.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/DateMetadata.php @@ -86,5 +86,3 @@ public function getSpecifications(): array ]; } } - -class_alias(DateMetadata::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\DateMetadata'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/Field.php b/src/contracts/Repository/Values/Content/Query/Criterion/Field.php index db05599206..ffb2bd4866 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/Field.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/Field.php @@ -75,5 +75,3 @@ public function getCustomField(string $type, string $field): ?string return $this->customFields[$type][$field]; } } - -class_alias(Field::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\Field'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/FieldRelation.php b/src/contracts/Repository/Values/Content/Query/Criterion/FieldRelation.php index 1e613e2832..6e75a65dc6 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/FieldRelation.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/FieldRelation.php @@ -33,5 +33,3 @@ public function getSpecifications(): array ]; } } - -class_alias(FieldRelation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\FieldRelation'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/FullText.php b/src/contracts/Repository/Values/Content/Query/Criterion/FullText.php index 7d24f1ef65..9389d706a5 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/FullText.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/FullText.php @@ -156,5 +156,3 @@ public function getCustomField(string $type, string $field): ?string return $this->customFields[$type][$field]; } } - -class_alias(FullText::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\FullText'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/IsFieldEmpty.php b/src/contracts/Repository/Values/Content/Query/Criterion/IsFieldEmpty.php index 4380250896..619718e315 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/IsFieldEmpty.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/IsFieldEmpty.php @@ -34,5 +34,3 @@ public function getSpecifications(): array ]; } } - -class_alias(IsFieldEmpty::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\IsFieldEmpty'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/IsUserBased.php b/src/contracts/Repository/Values/Content/Query/Criterion/IsUserBased.php index c112d69c29..aaf23504f8 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/IsUserBased.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/IsUserBased.php @@ -33,5 +33,3 @@ public function getSpecifications(): array ]; } } - -class_alias(IsUserBased::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\IsUserBased'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/IsUserEnabled.php b/src/contracts/Repository/Values/Content/Query/Criterion/IsUserEnabled.php index 6c5581c095..30f2f825c3 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/IsUserEnabled.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/IsUserEnabled.php @@ -30,5 +30,3 @@ public function getSpecifications(): array ]; } } - -class_alias(IsUserEnabled::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\IsUserEnabled'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/LanguageCode.php b/src/contracts/Repository/Values/Content/Query/Criterion/LanguageCode.php index cd5621a3b2..0e589313c4 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/LanguageCode.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/LanguageCode.php @@ -65,5 +65,3 @@ public function getSpecifications(): array ]; } } - -class_alias(LanguageCode::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\LanguageCode'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/Location.php b/src/contracts/Repository/Values/Content/Query/Criterion/Location.php index dfcaa1a7bc..35505a7b3a 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/Location.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/Location.php @@ -16,5 +16,3 @@ abstract class Location extends Criterion { } - -class_alias(Location::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\Location'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/Location/Depth.php b/src/contracts/Repository/Values/Content/Query/Criterion/Location/Depth.php index 2c9eb8767e..18f236da7e 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/Location/Depth.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/Location/Depth.php @@ -76,5 +76,3 @@ public function getSpecifications(): array ]; } } - -class_alias(Depth::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\Location\Depth'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/Location/IsMainLocation.php b/src/contracts/Repository/Values/Content/Query/Criterion/Location/IsMainLocation.php index 4b1cae6af6..2f5ccd5547 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/Location/IsMainLocation.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/Location/IsMainLocation.php @@ -66,5 +66,3 @@ public static function createFromQueryBuilder($target, $operator, $value) return new self($value); } } - -class_alias(IsMainLocation::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\Location\IsMainLocation'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/Location/Priority.php b/src/contracts/Repository/Values/Content/Query/Criterion/Location/Priority.php index ff18469271..4225edc583 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/Location/Priority.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/Location/Priority.php @@ -55,5 +55,3 @@ public static function createFromQueryBuilder($target, $operator, $value) return new self($operator, $value); } } - -class_alias(Priority::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\Location\Priority'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/LocationId.php b/src/contracts/Repository/Values/Content/Query/Criterion/LocationId.php index 3b91b73a7c..1c5c5d061d 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/LocationId.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/LocationId.php @@ -52,5 +52,3 @@ public function getSpecifications(): array ]; } } - -class_alias(LocationId::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\LocationId'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/LocationRemoteId.php b/src/contracts/Repository/Values/Content/Query/Criterion/LocationRemoteId.php index dac6761f0c..3dedd4d081 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/LocationRemoteId.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/LocationRemoteId.php @@ -50,5 +50,3 @@ public function getSpecifications(): array ]; } } - -class_alias(LocationRemoteId::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\LocationRemoteId'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/LogicalAnd.php b/src/contracts/Repository/Values/Content/Query/Criterion/LogicalAnd.php index d36a024272..3bc7bd8d80 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/LogicalAnd.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/LogicalAnd.php @@ -18,5 +18,3 @@ class LogicalAnd extends LogicalOperator implements TrashCriterion, FilteringCriterion { } - -class_alias(LogicalAnd::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\LogicalAnd'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/LogicalNot.php b/src/contracts/Repository/Values/Content/Query/Criterion/LogicalNot.php index 0a0c888773..9d89ee8dbd 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/LogicalNot.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/LogicalNot.php @@ -31,5 +31,3 @@ public function __construct(Criterion $criterion) parent::__construct([$criterion]); } } - -class_alias(LogicalNot::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\LogicalNot'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/LogicalOperator.php b/src/contracts/Repository/Values/Content/Query/Criterion/LogicalOperator.php index da944654a3..c760a7ead7 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/LogicalOperator.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/LogicalOperator.php @@ -56,5 +56,3 @@ public function getSpecifications(): array throw new NotImplementedException('getSpecifications() not implemented for LogicalOperators'); } } - -class_alias(LogicalOperator::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\LogicalOperator'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/LogicalOr.php b/src/contracts/Repository/Values/Content/Query/Criterion/LogicalOr.php index 324f98d4f2..081ebebfa5 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/LogicalOr.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/LogicalOr.php @@ -18,5 +18,3 @@ class LogicalOr extends LogicalOperator implements FilteringCriterion, TrashCriterion { } - -class_alias(LogicalOr::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\LogicalOr'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/MapLocationDistance.php b/src/contracts/Repository/Values/Content/Query/Criterion/MapLocationDistance.php index 770c84886e..752484b96f 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/MapLocationDistance.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/MapLocationDistance.php @@ -95,5 +95,3 @@ public function getCustomField(string $type, string $field): ?string return $this->customFields[$type][$field]; } } - -class_alias(MapLocationDistance::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\MapLocationDistance'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/MatchAll.php b/src/contracts/Repository/Values/Content/Query/Criterion/MatchAll.php index f672690bf7..153da80388 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/MatchAll.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/MatchAll.php @@ -30,5 +30,3 @@ public function getSpecifications(): array return []; } } - -class_alias(MatchAll::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\MatchAll'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/MatchNone.php b/src/contracts/Repository/Values/Content/Query/Criterion/MatchNone.php index 5c485eaf7d..e5bbaa5b3f 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/MatchNone.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/MatchNone.php @@ -30,5 +30,3 @@ public function getSpecifications(): array return []; } } - -class_alias(MatchNone::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\MatchNone'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/MoreLikeThis.php b/src/contracts/Repository/Values/Content/Query/Criterion/MoreLikeThis.php index 8e579204c5..2fe2966308 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/MoreLikeThis.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/MoreLikeThis.php @@ -50,5 +50,3 @@ public function getSpecifications(): array ]; } } - -class_alias(MoreLikeThis::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\MoreLikeThis'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/ObjectStateId.php b/src/contracts/Repository/Values/Content/Query/Criterion/ObjectStateId.php index 4c40058743..e1297ce77f 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/ObjectStateId.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/ObjectStateId.php @@ -50,5 +50,3 @@ public function getSpecifications(): array ]; } } - -class_alias(ObjectStateId::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\ObjectStateId'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/ObjectStateIdentifier.php b/src/contracts/Repository/Values/Content/Query/Criterion/ObjectStateIdentifier.php index b0c7e05409..4b255168f8 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/ObjectStateIdentifier.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/ObjectStateIdentifier.php @@ -40,5 +40,3 @@ public function getSpecifications(): array ]; } } - -class_alias(ObjectStateIdentifier::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\ObjectStateIdentifier'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/Operator.php b/src/contracts/Repository/Values/Content/Query/Criterion/Operator.php index 7bf0451f07..3454bf88ca 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/Operator.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/Operator.php @@ -48,5 +48,3 @@ public static function isUnary(string $operator): bool ); } } - -class_alias(Operator::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/Operator/Specifications.php b/src/contracts/Repository/Values/Content/Query/Criterion/Operator/Specifications.php index f22eeb6973..53a2866610 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/Operator/Specifications.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/Operator/Specifications.php @@ -93,5 +93,3 @@ public function __construct(string $operator, int $valueFormat, ?int $valueTypes $this->valueCount = $valueCount; } } - -class_alias(Specifications::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/ParentLocationId.php b/src/contracts/Repository/Values/Content/Query/Criterion/ParentLocationId.php index 7630f2044f..9efaad45f5 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/ParentLocationId.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/ParentLocationId.php @@ -52,5 +52,3 @@ public function getSpecifications(): array ]; } } - -class_alias(ParentLocationId::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\ParentLocationId'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/RemoteId.php b/src/contracts/Repository/Values/Content/Query/Criterion/RemoteId.php index 67df0be409..ba62e07278 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/RemoteId.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/RemoteId.php @@ -50,5 +50,3 @@ public function getSpecifications(): array ]; } } - -class_alias(RemoteId::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\RemoteId'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/SectionId.php b/src/contracts/Repository/Values/Content/Query/Criterion/SectionId.php index bdfe4ee144..715a9e7ce4 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/SectionId.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/SectionId.php @@ -51,5 +51,3 @@ public function getSpecifications(): array ]; } } - -class_alias(SectionId::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\SectionId'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/SectionIdentifier.php b/src/contracts/Repository/Values/Content/Query/Criterion/SectionIdentifier.php index 9f01d94d1d..6fe99cf4d8 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/SectionIdentifier.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/SectionIdentifier.php @@ -39,5 +39,3 @@ public function getSpecifications(): array ]; } } - -class_alias(SectionIdentifier::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\SectionIdentifier'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/Sibling.php b/src/contracts/Repository/Values/Content/Query/Criterion/Sibling.php index 3af8e1990c..c094a83d14 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/Sibling.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/Sibling.php @@ -33,5 +33,3 @@ public static function fromLocation(Location $location): self return new self($location->id, $location->parentLocationId); } } - -class_alias(Sibling::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\Sibling'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/Subtree.php b/src/contracts/Repository/Values/Content/Query/Criterion/Subtree.php index d6026c81e0..596d847e72 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/Subtree.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/Subtree.php @@ -55,5 +55,3 @@ public function getSpecifications(): array ]; } } - -class_alias(Subtree::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\Subtree'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/UserEmail.php b/src/contracts/Repository/Values/Content/Query/Criterion/UserEmail.php index 55e86a3695..919cac870f 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/UserEmail.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/UserEmail.php @@ -44,5 +44,3 @@ public function getSpecifications(): array ]; } } - -class_alias(UserEmail::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\UserEmail'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/UserId.php b/src/contracts/Repository/Values/Content/Query/Criterion/UserId.php index 7f0740ca7f..23feefec20 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/UserId.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/UserId.php @@ -39,5 +39,3 @@ public function getSpecifications(): array ]; } } - -class_alias(UserId::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\UserId'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/UserLogin.php b/src/contracts/Repository/Values/Content/Query/Criterion/UserLogin.php index e951128bf0..bbb71acc3c 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/UserLogin.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/UserLogin.php @@ -44,5 +44,3 @@ public function getSpecifications(): array ]; } } - -class_alias(UserLogin::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\UserLogin'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/UserMetadata.php b/src/contracts/Repository/Values/Content/Query/Criterion/UserMetadata.php index 13f4775307..e9f1246b95 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/UserMetadata.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/UserMetadata.php @@ -86,5 +86,3 @@ public function getSpecifications(): array ]; } } - -class_alias(UserMetadata::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\UserMetadata'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/Value.php b/src/contracts/Repository/Values/Content/Query/Criterion/Value.php index 1e3767f92e..a3c1022c24 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/Value.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/Value.php @@ -14,5 +14,3 @@ abstract class Value { } - -class_alias(Value::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\Value'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/Value/MapLocationValue.php b/src/contracts/Repository/Values/Content/Query/Criterion/Value/MapLocationValue.php index 64ec82da9a..7753cfa6d4 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/Value/MapLocationValue.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/Value/MapLocationValue.php @@ -39,5 +39,3 @@ public function __construct(float $latitude, float $longitude) $this->longitude = $longitude; } } - -class_alias(MapLocationValue::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\Value\MapLocationValue'); diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/Visibility.php b/src/contracts/Repository/Values/Content/Query/Criterion/Visibility.php index 889d2b86d2..e2be210ad6 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/Visibility.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/Visibility.php @@ -59,5 +59,3 @@ public function getSpecifications(): array ]; } } - -class_alias(Visibility::class, 'eZ\Publish\API\Repository\Values\Content\Query\Criterion\Visibility'); diff --git a/src/contracts/Repository/Values/Content/Query/CriterionInterface.php b/src/contracts/Repository/Values/Content/Query/CriterionInterface.php index 5aa8e077c7..2feb849940 100644 --- a/src/contracts/Repository/Values/Content/Query/CriterionInterface.php +++ b/src/contracts/Repository/Values/Content/Query/CriterionInterface.php @@ -14,5 +14,3 @@ interface CriterionInterface { } - -class_alias(CriterionInterface::class, 'eZ\Publish\API\Repository\Values\Content\Query\CriterionInterface'); diff --git a/src/contracts/Repository/Values/Content/Query/CustomFieldInterface.php b/src/contracts/Repository/Values/Content/Query/CustomFieldInterface.php index 350be4fefa..d08a4d48d4 100644 --- a/src/contracts/Repository/Values/Content/Query/CustomFieldInterface.php +++ b/src/contracts/Repository/Values/Content/Query/CustomFieldInterface.php @@ -39,5 +39,3 @@ public function setCustomField(string $type, string $field, string $customField) */ public function getCustomField(string $type, string $field): ?string; } - -class_alias(CustomFieldInterface::class, 'eZ\Publish\API\Repository\Values\Content\Query\CustomFieldInterface'); diff --git a/src/contracts/Repository/Values/Content/Query/FacetBuilder.php b/src/contracts/Repository/Values/Content/Query/FacetBuilder.php index 727975e100..febd817bcd 100644 --- a/src/contracts/Repository/Values/Content/Query/FacetBuilder.php +++ b/src/contracts/Repository/Values/Content/Query/FacetBuilder.php @@ -52,5 +52,3 @@ abstract class FacetBuilder extends ValueObject */ public $minCount = 1; } - -class_alias(FacetBuilder::class, 'eZ\Publish\API\Repository\Values\Content\Query\FacetBuilder'); diff --git a/src/contracts/Repository/Values/Content/Query/FacetBuilder/ContentTypeFacetBuilder.php b/src/contracts/Repository/Values/Content/Query/FacetBuilder/ContentTypeFacetBuilder.php index 974a607086..41ce5485b1 100644 --- a/src/contracts/Repository/Values/Content/Query/FacetBuilder/ContentTypeFacetBuilder.php +++ b/src/contracts/Repository/Values/Content/Query/FacetBuilder/ContentTypeFacetBuilder.php @@ -20,5 +20,3 @@ class ContentTypeFacetBuilder extends FacetBuilder { } - -class_alias(ContentTypeFacetBuilder::class, 'eZ\Publish\API\Repository\Values\Content\Query\FacetBuilder\ContentTypeFacetBuilder'); diff --git a/src/contracts/Repository/Values/Content/Query/FacetBuilder/CriterionFacetBuilder.php b/src/contracts/Repository/Values/Content/Query/FacetBuilder/CriterionFacetBuilder.php index 49ce729d8d..fb05cabcc0 100644 --- a/src/contracts/Repository/Values/Content/Query/FacetBuilder/CriterionFacetBuilder.php +++ b/src/contracts/Repository/Values/Content/Query/FacetBuilder/CriterionFacetBuilder.php @@ -21,5 +21,3 @@ class CriterionFacetBuilder extends FacetBuilder { } - -class_alias(CriterionFacetBuilder::class, 'eZ\Publish\API\Repository\Values\Content\Query\FacetBuilder\CriterionFacetBuilder'); diff --git a/src/contracts/Repository/Values/Content/Query/FacetBuilder/DateRangeFacetBuilder.php b/src/contracts/Repository/Values/Content/Query/FacetBuilder/DateRangeFacetBuilder.php index bd708e04e4..01c77649b1 100644 --- a/src/contracts/Repository/Values/Content/Query/FacetBuilder/DateRangeFacetBuilder.php +++ b/src/contracts/Repository/Values/Content/Query/FacetBuilder/DateRangeFacetBuilder.php @@ -47,5 +47,3 @@ abstract public function addRange($from, $to); */ abstract public function addUnboundedTo($from); } - -class_alias(DateRangeFacetBuilder::class, 'eZ\Publish\API\Repository\Values\Content\Query\FacetBuilder\DateRangeFacetBuilder'); diff --git a/src/contracts/Repository/Values/Content/Query/FacetBuilder/FieldFacetBuilder.php b/src/contracts/Repository/Values/Content/Query/FacetBuilder/FieldFacetBuilder.php index 3ddf699b7a..b4381c712f 100644 --- a/src/contracts/Repository/Values/Content/Query/FacetBuilder/FieldFacetBuilder.php +++ b/src/contracts/Repository/Values/Content/Query/FacetBuilder/FieldFacetBuilder.php @@ -53,5 +53,3 @@ class FieldFacetBuilder extends FacetBuilder */ public $sort; } - -class_alias(FieldFacetBuilder::class, 'eZ\Publish\API\Repository\Values\Content\Query\FacetBuilder\FieldFacetBuilder'); diff --git a/src/contracts/Repository/Values/Content/Query/FacetBuilder/FieldRangeFacetBuilder.php b/src/contracts/Repository/Values/Content/Query/FacetBuilder/FieldRangeFacetBuilder.php index db12ff8702..40df1aa892 100644 --- a/src/contracts/Repository/Values/Content/Query/FacetBuilder/FieldRangeFacetBuilder.php +++ b/src/contracts/Repository/Values/Content/Query/FacetBuilder/FieldRangeFacetBuilder.php @@ -50,5 +50,3 @@ abstract public function addRange($from, $to); */ abstract public function addUnboundedTo($from); } - -class_alias(FieldRangeFacetBuilder::class, 'eZ\Publish\API\Repository\Values\Content\Query\FacetBuilder\FieldRangeFacetBuilder'); diff --git a/src/contracts/Repository/Values/Content/Query/FacetBuilder/Location.php b/src/contracts/Repository/Values/Content/Query/FacetBuilder/Location.php index 9f32961569..f9994bb7cd 100644 --- a/src/contracts/Repository/Values/Content/Query/FacetBuilder/Location.php +++ b/src/contracts/Repository/Values/Content/Query/FacetBuilder/Location.php @@ -18,5 +18,3 @@ abstract class Location extends FacetBuilder { } - -class_alias(Location::class, 'eZ\Publish\API\Repository\Values\Content\Query\FacetBuilder\Location'); diff --git a/src/contracts/Repository/Values/Content/Query/FacetBuilder/Location/LocationFacetBuilder.php b/src/contracts/Repository/Values/Content/Query/FacetBuilder/Location/LocationFacetBuilder.php index ad673d92ce..78503d6698 100644 --- a/src/contracts/Repository/Values/Content/Query/FacetBuilder/Location/LocationFacetBuilder.php +++ b/src/contracts/Repository/Values/Content/Query/FacetBuilder/Location/LocationFacetBuilder.php @@ -29,5 +29,3 @@ class LocationFacetBuilder extends Location */ public $location; } - -class_alias(LocationFacetBuilder::class, 'eZ\Publish\API\Repository\Values\Content\Query\FacetBuilder\Location\LocationFacetBuilder'); diff --git a/src/contracts/Repository/Values/Content/Query/FacetBuilder/LocationFacetBuilder.php b/src/contracts/Repository/Values/Content/Query/FacetBuilder/LocationFacetBuilder.php index 04b3689867..fc23a30da4 100644 --- a/src/contracts/Repository/Values/Content/Query/FacetBuilder/LocationFacetBuilder.php +++ b/src/contracts/Repository/Values/Content/Query/FacetBuilder/LocationFacetBuilder.php @@ -29,5 +29,3 @@ class LocationFacetBuilder extends FacetBuilder */ public $location; } - -class_alias(LocationFacetBuilder::class, 'eZ\Publish\API\Repository\Values\Content\Query\FacetBuilder\LocationFacetBuilder'); diff --git a/src/contracts/Repository/Values/Content/Query/FacetBuilder/SectionFacetBuilder.php b/src/contracts/Repository/Values/Content/Query/FacetBuilder/SectionFacetBuilder.php index 3fca644ba2..0433ea6bcf 100644 --- a/src/contracts/Repository/Values/Content/Query/FacetBuilder/SectionFacetBuilder.php +++ b/src/contracts/Repository/Values/Content/Query/FacetBuilder/SectionFacetBuilder.php @@ -21,5 +21,3 @@ class SectionFacetBuilder extends FacetBuilder { } - -class_alias(SectionFacetBuilder::class, 'eZ\Publish\API\Repository\Values\Content\Query\FacetBuilder\SectionFacetBuilder'); diff --git a/src/contracts/Repository/Values/Content/Query/FacetBuilder/TermFacetBuilder.php b/src/contracts/Repository/Values/Content/Query/FacetBuilder/TermFacetBuilder.php index d41cb9491b..32a13bda07 100644 --- a/src/contracts/Repository/Values/Content/Query/FacetBuilder/TermFacetBuilder.php +++ b/src/contracts/Repository/Values/Content/Query/FacetBuilder/TermFacetBuilder.php @@ -21,5 +21,3 @@ class TermFacetBuilder extends FacetBuilder { } - -class_alias(TermFacetBuilder::class, 'eZ\Publish\API\Repository\Values\Content\Query\FacetBuilder\TermFacetBuilder'); diff --git a/src/contracts/Repository/Values/Content/Query/FacetBuilder/UserFacetBuilder.php b/src/contracts/Repository/Values/Content/Query/FacetBuilder/UserFacetBuilder.php index e6480c9b8c..f6f6362e86 100644 --- a/src/contracts/Repository/Values/Content/Query/FacetBuilder/UserFacetBuilder.php +++ b/src/contracts/Repository/Values/Content/Query/FacetBuilder/UserFacetBuilder.php @@ -41,5 +41,3 @@ class UserFacetBuilder extends FacetBuilder */ public $type = self::OWNER; } - -class_alias(UserFacetBuilder::class, 'eZ\Publish\API\Repository\Values\Content\Query\FacetBuilder\UserFacetBuilder'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause.php b/src/contracts/Repository/Values/Content/Query/SortClause.php index 1caf089584..ce0041740d 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause.php @@ -62,5 +62,3 @@ public function __construct(string $sortTarget, string $sortDirection, ?Target $ } } } - -class_alias(SortClause::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/ContentId.php b/src/contracts/Repository/Values/Content/Query/SortClause/ContentId.php index 33113a0cb3..054cc3b434 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/ContentId.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/ContentId.php @@ -36,5 +36,3 @@ public function __construct(string $sortDirection = Query::SORT_ASC) parent::__construct('content_id', $sortDirection); } } - -class_alias(ContentId::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\ContentId'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/ContentName.php b/src/contracts/Repository/Values/Content/Query/SortClause/ContentName.php index e2d7dabce2..9456d52cde 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/ContentName.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/ContentName.php @@ -28,5 +28,3 @@ public function __construct(string $sortDirection = Query::SORT_ASC) parent::__construct('content_name', $sortDirection); } } - -class_alias(ContentName::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\ContentName'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/ContentTranslatedName.php b/src/contracts/Repository/Values/Content/Query/SortClause/ContentTranslatedName.php index f14f49f843..6543f3e826 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/ContentTranslatedName.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/ContentTranslatedName.php @@ -18,5 +18,3 @@ public function __construct(string $sortDirection = Query::SORT_ASC) parent::__construct('content_translated_name', $sortDirection); } } - -class_alias(ContentTranslatedName::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\ContentTranslatedName'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/CustomField.php b/src/contracts/Repository/Values/Content/Query/SortClause/CustomField.php index a976ffc83b..4315cf1827 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/CustomField.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/CustomField.php @@ -22,5 +22,3 @@ public function __construct(string $field, string $sortDirection = Query::SORT_A parent::__construct('custom_field', $sortDirection, new CustomFieldTarget($field)); } } - -class_alias(CustomField::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\CustomField'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/DateModified.php b/src/contracts/Repository/Values/Content/Query/SortClause/DateModified.php index fccb75519e..64a4205f58 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/DateModified.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/DateModified.php @@ -27,5 +27,3 @@ public function __construct(string $sortDirection = Query::SORT_ASC) parent::__construct('date_modified', $sortDirection); } } - -class_alias(DateModified::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\DateModified'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/DatePublished.php b/src/contracts/Repository/Values/Content/Query/SortClause/DatePublished.php index fd76318902..6066bd1463 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/DatePublished.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/DatePublished.php @@ -27,5 +27,3 @@ public function __construct(string $sortDirection = Query::SORT_ASC) parent::__construct('date_published', $sortDirection); } } - -class_alias(DatePublished::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\DatePublished'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/Field.php b/src/contracts/Repository/Values/Content/Query/SortClause/Field.php index 91427d9e0a..429d489f31 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/Field.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/Field.php @@ -82,5 +82,3 @@ public function getCustomField(string $type, string $field): ?string return $this->customFields[$type][$field]; } } - -class_alias(Field::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\Field'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/Location.php b/src/contracts/Repository/Values/Content/Query/SortClause/Location.php index af1c901e6a..b262698b3c 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/Location.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/Location.php @@ -16,5 +16,3 @@ abstract class Location extends SortClause { } - -class_alias(Location::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\Location'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/Location/Depth.php b/src/contracts/Repository/Values/Content/Query/SortClause/Location/Depth.php index e4792c6067..746a4c1545 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/Location/Depth.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/Location/Depth.php @@ -28,5 +28,3 @@ public function __construct(string $sortDirection = Query::SORT_ASC) parent::__construct('location_depth', $sortDirection); } } - -class_alias(Depth::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\Location\Depth'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/Location/Id.php b/src/contracts/Repository/Values/Content/Query/SortClause/Location/Id.php index c0c25d90f7..632bad3bbe 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/Location/Id.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/Location/Id.php @@ -29,5 +29,3 @@ public function __construct(string $sortDirection = Query::SORT_ASC) parent::__construct('location_id', $sortDirection); } } - -class_alias(Id::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\Location\Id'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/Location/IsMainLocation.php b/src/contracts/Repository/Values/Content/Query/SortClause/Location/IsMainLocation.php index a25854ef16..30de40a8be 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/Location/IsMainLocation.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/Location/IsMainLocation.php @@ -26,5 +26,3 @@ public function __construct(string $sortDirection = Query::SORT_ASC) parent::__construct('location_is_main', $sortDirection); } } - -class_alias(IsMainLocation::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\Location\IsMainLocation'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/Location/Path.php b/src/contracts/Repository/Values/Content/Query/SortClause/Location/Path.php index cdd8838418..bfb2d96a19 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/Location/Path.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/Location/Path.php @@ -28,5 +28,3 @@ public function __construct(string $sortDirection = Query::SORT_ASC) parent::__construct('location_path', $sortDirection); } } - -class_alias(Path::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\Location\Path'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/Location/Priority.php b/src/contracts/Repository/Values/Content/Query/SortClause/Location/Priority.php index c0a1b2d79b..c8ee1cf9f4 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/Location/Priority.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/Location/Priority.php @@ -28,5 +28,3 @@ public function __construct(string $sortDirection = Query::SORT_ASC) parent::__construct('location_priority', $sortDirection); } } - -class_alias(Priority::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\Location\Priority'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/Location/Visibility.php b/src/contracts/Repository/Values/Content/Query/SortClause/Location/Visibility.php index 4d166ee9f7..e81f600055 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/Location/Visibility.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/Location/Visibility.php @@ -27,5 +27,3 @@ public function __construct(string $sortDirection = Query::SORT_ASC) parent::__construct('location_visibility', $sortDirection); } } - -class_alias(Visibility::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\Location\Visibility'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/MapLocationDistance.php b/src/contracts/Repository/Values/Content/Query/SortClause/MapLocationDistance.php index 0b6ff3a1a6..02f2ddeae4 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/MapLocationDistance.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/MapLocationDistance.php @@ -87,5 +87,3 @@ public function getCustomField(string $type, string $field): ?string return $this->customFields[$type][$field]; } } - -class_alias(MapLocationDistance::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\MapLocationDistance'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/Random.php b/src/contracts/Repository/Values/Content/Query/SortClause/Random.php index 14b1c9d073..d297bfafbe 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/Random.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/Random.php @@ -25,5 +25,3 @@ public function __construct(?int $seed = null, string $sortDirection = Query::SO parent::__construct('random', $sortDirection, new RandomTarget($seed)); } } - -class_alias(Random::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\Random'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/Score.php b/src/contracts/Repository/Values/Content/Query/SortClause/Score.php index 5592b9192f..4b0a313d35 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/Score.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/Score.php @@ -21,5 +21,3 @@ public function __construct(string $sortDirection = Query::SORT_ASC) parent::__construct('score', $sortDirection); } } - -class_alias(Score::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\Score'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/SectionIdentifier.php b/src/contracts/Repository/Values/Content/Query/SortClause/SectionIdentifier.php index 9ae8bc64a9..53f6c015c0 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/SectionIdentifier.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/SectionIdentifier.php @@ -27,5 +27,3 @@ public function __construct(string $sortDirection = Query::SORT_ASC) parent::__construct('section_identifier', $sortDirection); } } - -class_alias(SectionIdentifier::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\SectionIdentifier'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/SectionName.php b/src/contracts/Repository/Values/Content/Query/SortClause/SectionName.php index 0fd370de59..08dd0d21d9 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/SectionName.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/SectionName.php @@ -28,5 +28,3 @@ public function __construct(string $sortDirection = Query::SORT_ASC) parent::__construct('section_name', $sortDirection); } } - -class_alias(SectionName::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\SectionName'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/Target.php b/src/contracts/Repository/Values/Content/Query/SortClause/Target.php index 4436dba417..3160f2f29a 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/Target.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/Target.php @@ -14,5 +14,3 @@ abstract class Target { } - -class_alias(Target::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\Target'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/Target/CustomFieldTarget.php b/src/contracts/Repository/Values/Content/Query/SortClause/Target/CustomFieldTarget.php index 8c21ea9542..bfe7d07df0 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/Target/CustomFieldTarget.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/Target/CustomFieldTarget.php @@ -20,5 +20,3 @@ public function __construct(string $fieldName) $this->fieldName = $fieldName; } } - -class_alias(CustomFieldTarget::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\Target\CustomFieldTarget'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/Target/FieldTarget.php b/src/contracts/Repository/Values/Content/Query/SortClause/Target/FieldTarget.php index 579f64ca55..94b2e4409e 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/Target/FieldTarget.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/Target/FieldTarget.php @@ -35,5 +35,3 @@ public function __construct(string $typeIdentifier, string $fieldIdentifier) $this->fieldIdentifier = $fieldIdentifier; } } - -class_alias(FieldTarget::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\Target\FieldTarget'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/Target/MapLocationTarget.php b/src/contracts/Repository/Values/Content/Query/SortClause/Target/MapLocationTarget.php index 07439e846d..12c043691a 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/Target/MapLocationTarget.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/Target/MapLocationTarget.php @@ -61,5 +61,3 @@ public function __construct( $this->fieldIdentifier = $fieldIdentifier; } } - -class_alias(MapLocationTarget::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\Target\MapLocationTarget'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/Target/RandomTarget.php b/src/contracts/Repository/Values/Content/Query/SortClause/Target/RandomTarget.php index a9aa814aa6..a351525b46 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/Target/RandomTarget.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/Target/RandomTarget.php @@ -28,5 +28,3 @@ public function __construct(?int $seed) $this->seed = $seed; } } - -class_alias(RandomTarget::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\Target\RandomTarget'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/Trash/ContentTypeName.php b/src/contracts/Repository/Values/Content/Query/SortClause/Trash/ContentTypeName.php index f7c0556f1b..6bb93c99a7 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/Trash/ContentTypeName.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/Trash/ContentTypeName.php @@ -19,5 +19,3 @@ public function __construct(string $sortDirection = Query::SORT_ASC) parent::__construct('content_type_name', $sortDirection); } } - -class_alias(ContentTypeName::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\Trash\ContentTypeName'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/Trash/DateTrashed.php b/src/contracts/Repository/Values/Content/Query/SortClause/Trash/DateTrashed.php index dbf17fcb1e..7d39bb3cc2 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/Trash/DateTrashed.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/Trash/DateTrashed.php @@ -19,5 +19,3 @@ public function __construct(string $sortDirection = Query::SORT_ASC) parent::__construct('trashed', $sortDirection); } } - -class_alias(DateTrashed::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\Trash\DateTrashed'); diff --git a/src/contracts/Repository/Values/Content/Query/SortClause/Trash/UserLogin.php b/src/contracts/Repository/Values/Content/Query/SortClause/Trash/UserLogin.php index fe550fbdac..4ee1619502 100644 --- a/src/contracts/Repository/Values/Content/Query/SortClause/Trash/UserLogin.php +++ b/src/contracts/Repository/Values/Content/Query/SortClause/Trash/UserLogin.php @@ -19,5 +19,3 @@ public function __construct(string $sortDirection = Query::SORT_ASC) parent::__construct('user_name', $sortDirection); } } - -class_alias(UserLogin::class, 'eZ\Publish\API\Repository\Values\Content\Query\SortClause\Trash\UserLogin'); diff --git a/src/contracts/Repository/Values/Content/Relation.php b/src/contracts/Repository/Values/Content/Relation.php index 0ba1694316..71376cfff1 100644 --- a/src/contracts/Repository/Values/Content/Relation.php +++ b/src/contracts/Repository/Values/Content/Relation.php @@ -99,5 +99,3 @@ abstract public function getDestinationContentInfo(): ContentInfo; */ protected $type; } - -class_alias(Relation::class, 'eZ\Publish\API\Repository\Values\Content\Relation'); diff --git a/src/contracts/Repository/Values/Content/RelationList.php b/src/contracts/Repository/Values/Content/RelationList.php index f8d8e40d50..6060676c1e 100644 --- a/src/contracts/Repository/Values/Content/RelationList.php +++ b/src/contracts/Repository/Values/Content/RelationList.php @@ -33,5 +33,3 @@ public function getIterator(): Traversable return new ArrayIterator($this->items); } } - -class_alias(RelationList::class, 'eZ\Publish\API\Repository\Values\Content\RelationList'); diff --git a/src/contracts/Repository/Values/Content/RelationList/Item/RelationListItem.php b/src/contracts/Repository/Values/Content/RelationList/Item/RelationListItem.php index bb78a2d18a..96d16e2cb6 100644 --- a/src/contracts/Repository/Values/Content/RelationList/Item/RelationListItem.php +++ b/src/contracts/Repository/Values/Content/RelationList/Item/RelationListItem.php @@ -34,5 +34,3 @@ public function hasRelation(): bool return true; } } - -class_alias(RelationListItem::class, 'eZ\Publish\API\Repository\Values\Content\RelationList\Item\RelationListItem'); diff --git a/src/contracts/Repository/Values/Content/RelationList/Item/UnauthorizedRelationListItem.php b/src/contracts/Repository/Values/Content/RelationList/Item/UnauthorizedRelationListItem.php index 45a24f72d3..398c547e7b 100644 --- a/src/contracts/Repository/Values/Content/RelationList/Item/UnauthorizedRelationListItem.php +++ b/src/contracts/Repository/Values/Content/RelationList/Item/UnauthorizedRelationListItem.php @@ -27,5 +27,3 @@ public function hasRelation(): bool return false; } } - -class_alias(UnauthorizedRelationListItem::class, 'eZ\Publish\API\Repository\Values\Content\RelationList\Item\UnauthorizedRelationListItem'); diff --git a/src/contracts/Repository/Values/Content/RelationList/RelationListItemInterface.php b/src/contracts/Repository/Values/Content/RelationList/RelationListItemInterface.php index 8b337f0996..06499d694d 100644 --- a/src/contracts/Repository/Values/Content/RelationList/RelationListItemInterface.php +++ b/src/contracts/Repository/Values/Content/RelationList/RelationListItemInterface.php @@ -22,5 +22,3 @@ public function getRelation(): ?Relation; */ public function hasRelation(): bool; } - -class_alias(RelationListItemInterface::class, 'eZ\Publish\API\Repository\Values\Content\RelationList\RelationListItemInterface'); diff --git a/src/contracts/Repository/Values/Content/Search/AggregationResult.php b/src/contracts/Repository/Values/Content/Search/AggregationResult.php index 06324e3616..d0d9672920 100644 --- a/src/contracts/Repository/Values/Content/Search/AggregationResult.php +++ b/src/contracts/Repository/Values/Content/Search/AggregationResult.php @@ -31,5 +31,3 @@ public function getName(): string return $this->name; } } - -class_alias(AggregationResult::class, 'eZ\Publish\API\Repository\Values\Content\Search\AggregationResult'); diff --git a/src/contracts/Repository/Values/Content/Search/AggregationResult/RangeAggregationResult.php b/src/contracts/Repository/Values/Content/Search/AggregationResult/RangeAggregationResult.php index 8f7d98908e..a07437968d 100644 --- a/src/contracts/Repository/Values/Content/Search/AggregationResult/RangeAggregationResult.php +++ b/src/contracts/Repository/Values/Content/Search/AggregationResult/RangeAggregationResult.php @@ -87,5 +87,3 @@ public function getIterator(): Iterator } } } - -class_alias(RangeAggregationResult::class, 'eZ\Publish\API\Repository\Values\Content\Search\AggregationResult\RangeAggregationResult'); diff --git a/src/contracts/Repository/Values/Content/Search/AggregationResult/RangeAggregationResultEntry.php b/src/contracts/Repository/Values/Content/Search/AggregationResult/RangeAggregationResultEntry.php index bc461f4631..358bb29374 100644 --- a/src/contracts/Repository/Values/Content/Search/AggregationResult/RangeAggregationResultEntry.php +++ b/src/contracts/Repository/Values/Content/Search/AggregationResult/RangeAggregationResultEntry.php @@ -37,5 +37,3 @@ public function getCount(): int return $this->count; } } - -class_alias(RangeAggregationResultEntry::class, 'eZ\Publish\API\Repository\Values\Content\Search\AggregationResult\RangeAggregationResultEntry'); diff --git a/src/contracts/Repository/Values/Content/Search/AggregationResult/StatsAggregationResult.php b/src/contracts/Repository/Values/Content/Search/AggregationResult/StatsAggregationResult.php index da744bba84..543f5e1f86 100644 --- a/src/contracts/Repository/Values/Content/Search/AggregationResult/StatsAggregationResult.php +++ b/src/contracts/Repository/Values/Content/Search/AggregationResult/StatsAggregationResult.php @@ -63,5 +63,3 @@ public function getSum(): ?float return $this->sum; } } - -class_alias(StatsAggregationResult::class, 'eZ\Publish\API\Repository\Values\Content\Search\AggregationResult\StatsAggregationResult'); diff --git a/src/contracts/Repository/Values/Content/Search/AggregationResult/TermAggregationResult.php b/src/contracts/Repository/Values/Content/Search/AggregationResult/TermAggregationResult.php index cf2f0e4412..3990484cf7 100644 --- a/src/contracts/Repository/Values/Content/Search/AggregationResult/TermAggregationResult.php +++ b/src/contracts/Repository/Values/Content/Search/AggregationResult/TermAggregationResult.php @@ -95,5 +95,3 @@ public static function createForAggregation(Aggregation $aggregation, iterable $ return new self($aggregation->getName(), $entries); } } - -class_alias(TermAggregationResult::class, 'eZ\Publish\API\Repository\Values\Content\Search\AggregationResult\TermAggregationResult'); diff --git a/src/contracts/Repository/Values/Content/Search/AggregationResult/TermAggregationResultEntry.php b/src/contracts/Repository/Values/Content/Search/AggregationResult/TermAggregationResultEntry.php index b97b643202..80bf8d187a 100644 --- a/src/contracts/Repository/Values/Content/Search/AggregationResult/TermAggregationResultEntry.php +++ b/src/contracts/Repository/Values/Content/Search/AggregationResult/TermAggregationResultEntry.php @@ -39,5 +39,3 @@ public function getCount(): int return $this->count; } } - -class_alias(TermAggregationResultEntry::class, 'eZ\Publish\API\Repository\Values\Content\Search\AggregationResult\TermAggregationResultEntry'); diff --git a/src/contracts/Repository/Values/Content/Search/AggregationResultCollection.php b/src/contracts/Repository/Values/Content/Search/AggregationResultCollection.php index 268215ffff..6824c7409b 100644 --- a/src/contracts/Repository/Values/Content/Search/AggregationResultCollection.php +++ b/src/contracts/Repository/Values/Content/Search/AggregationResultCollection.php @@ -112,5 +112,3 @@ public function count(): int return count($this->entries); } } - -class_alias(AggregationResultCollection::class, 'eZ\Publish\API\Repository\Values\Content\Search\AggregationResultCollection'); diff --git a/src/contracts/Repository/Values/Content/Search/Facet.php b/src/contracts/Repository/Values/Content/Search/Facet.php index 8ff27831de..8dfbfba63f 100644 --- a/src/contracts/Repository/Values/Content/Search/Facet.php +++ b/src/contracts/Repository/Values/Content/Search/Facet.php @@ -24,5 +24,3 @@ abstract class Facet extends ValueObject */ public $name; } - -class_alias(Facet::class, 'eZ\Publish\API\Repository\Values\Content\Search\Facet'); diff --git a/src/contracts/Repository/Values/Content/Search/Facet/ContentTypeFacet.php b/src/contracts/Repository/Values/Content/Search/Facet/ContentTypeFacet.php index 68c965dc5d..1478696e49 100644 --- a/src/contracts/Repository/Values/Content/Search/Facet/ContentTypeFacet.php +++ b/src/contracts/Repository/Values/Content/Search/Facet/ContentTypeFacet.php @@ -24,5 +24,3 @@ class ContentTypeFacet extends Facet */ public $entries; } - -class_alias(ContentTypeFacet::class, 'eZ\Publish\API\Repository\Values\Content\Search\Facet\ContentTypeFacet'); diff --git a/src/contracts/Repository/Values/Content/Search/Facet/CriterionFacet.php b/src/contracts/Repository/Values/Content/Search/Facet/CriterionFacet.php index ee74460bc3..88f9d1a360 100644 --- a/src/contracts/Repository/Values/Content/Search/Facet/CriterionFacet.php +++ b/src/contracts/Repository/Values/Content/Search/Facet/CriterionFacet.php @@ -24,5 +24,3 @@ class CriterionFacet extends Facet */ public $count; } - -class_alias(CriterionFacet::class, 'eZ\Publish\API\Repository\Values\Content\Search\Facet\CriterionFacet'); diff --git a/src/contracts/Repository/Values/Content/Search/Facet/DateRangeFacet.php b/src/contracts/Repository/Values/Content/Search/Facet/DateRangeFacet.php index e4c0f86ea8..7ffbdbc62c 100644 --- a/src/contracts/Repository/Values/Content/Search/Facet/DateRangeFacet.php +++ b/src/contracts/Repository/Values/Content/Search/Facet/DateRangeFacet.php @@ -24,5 +24,3 @@ class DateRangeFacet extends Facet */ public $entries; } - -class_alias(DateRangeFacet::class, 'eZ\Publish\API\Repository\Values\Content\Search\Facet\DateRangeFacet'); diff --git a/src/contracts/Repository/Values/Content/Search/Facet/FieldFacet.php b/src/contracts/Repository/Values/Content/Search/Facet/FieldFacet.php index 169d0576a1..73307d30db 100644 --- a/src/contracts/Repository/Values/Content/Search/Facet/FieldFacet.php +++ b/src/contracts/Repository/Values/Content/Search/Facet/FieldFacet.php @@ -47,5 +47,3 @@ class FieldFacet extends Facet */ public $entries; } - -class_alias(FieldFacet::class, 'eZ\Publish\API\Repository\Values\Content\Search\Facet\FieldFacet'); diff --git a/src/contracts/Repository/Values/Content/Search/Facet/FieldRangeFacet.php b/src/contracts/Repository/Values/Content/Search/Facet/FieldRangeFacet.php index 2369ab5f25..276683a5b7 100644 --- a/src/contracts/Repository/Values/Content/Search/Facet/FieldRangeFacet.php +++ b/src/contracts/Repository/Values/Content/Search/Facet/FieldRangeFacet.php @@ -45,5 +45,3 @@ class FieldRangeFacet extends Facet */ public $entries; } - -class_alias(FieldRangeFacet::class, 'eZ\Publish\API\Repository\Values\Content\Search\Facet\FieldRangeFacet'); diff --git a/src/contracts/Repository/Values/Content/Search/Facet/LocationFacet.php b/src/contracts/Repository/Values/Content/Search/Facet/LocationFacet.php index 3e1f225bfc..e0f95ee502 100644 --- a/src/contracts/Repository/Values/Content/Search/Facet/LocationFacet.php +++ b/src/contracts/Repository/Values/Content/Search/Facet/LocationFacet.php @@ -24,5 +24,3 @@ class LocationFacet extends Facet */ public $entries; } - -class_alias(LocationFacet::class, 'eZ\Publish\API\Repository\Values\Content\Search\Facet\LocationFacet'); diff --git a/src/contracts/Repository/Values/Content/Search/Facet/RangeFacetEntry.php b/src/contracts/Repository/Values/Content/Search/Facet/RangeFacetEntry.php index 35622abd9a..0ffbcacd36 100644 --- a/src/contracts/Repository/Values/Content/Search/Facet/RangeFacetEntry.php +++ b/src/contracts/Repository/Values/Content/Search/Facet/RangeFacetEntry.php @@ -57,5 +57,3 @@ class RangeFacetEntry */ public $mean; } - -class_alias(RangeFacetEntry::class, 'eZ\Publish\API\Repository\Values\Content\Search\Facet\RangeFacetEntry'); diff --git a/src/contracts/Repository/Values/Content/Search/Facet/SectionFacet.php b/src/contracts/Repository/Values/Content/Search/Facet/SectionFacet.php index c446613562..3b20ba8d26 100644 --- a/src/contracts/Repository/Values/Content/Search/Facet/SectionFacet.php +++ b/src/contracts/Repository/Values/Content/Search/Facet/SectionFacet.php @@ -24,5 +24,3 @@ class SectionFacet extends Facet */ public $entries; } - -class_alias(SectionFacet::class, 'eZ\Publish\API\Repository\Values\Content\Search\Facet\SectionFacet'); diff --git a/src/contracts/Repository/Values/Content/Search/Facet/TermFacet.php b/src/contracts/Repository/Values/Content/Search/Facet/TermFacet.php index 6c816826c7..36e04656af 100644 --- a/src/contracts/Repository/Values/Content/Search/Facet/TermFacet.php +++ b/src/contracts/Repository/Values/Content/Search/Facet/TermFacet.php @@ -24,5 +24,3 @@ class TermFacet extends Facet */ public $entries; } - -class_alias(TermFacet::class, 'eZ\Publish\API\Repository\Values\Content\Search\Facet\TermFacet'); diff --git a/src/contracts/Repository/Values/Content/Search/Facet/UserFacet.php b/src/contracts/Repository/Values/Content/Search/Facet/UserFacet.php index c3358b00fd..26b205c4ef 100644 --- a/src/contracts/Repository/Values/Content/Search/Facet/UserFacet.php +++ b/src/contracts/Repository/Values/Content/Search/Facet/UserFacet.php @@ -24,5 +24,3 @@ class UserFacet extends Facet */ public $entries; } - -class_alias(UserFacet::class, 'eZ\Publish\API\Repository\Values\Content\Search\Facet\UserFacet'); diff --git a/src/contracts/Repository/Values/Content/Search/SearchHit.php b/src/contracts/Repository/Values/Content/Search/SearchHit.php index cdaf9ea460..cf7004ed17 100644 --- a/src/contracts/Repository/Values/Content/Search/SearchHit.php +++ b/src/contracts/Repository/Values/Content/Search/SearchHit.php @@ -52,5 +52,3 @@ class SearchHit extends ValueObject */ public $highlight; } - -class_alias(SearchHit::class, 'eZ\Publish\API\Repository\Values\Content\Search\SearchHit'); diff --git a/src/contracts/Repository/Values/Content/Search/SearchResult.php b/src/contracts/Repository/Values/Content/Search/SearchResult.php index 99569c4122..e495eed7eb 100644 --- a/src/contracts/Repository/Values/Content/Search/SearchResult.php +++ b/src/contracts/Repository/Values/Content/Search/SearchResult.php @@ -105,5 +105,3 @@ public function getIterator(): Iterator return new ArrayIterator($this->searchHits); } } - -class_alias(SearchResult::class, 'eZ\Publish\API\Repository\Values\Content\Search\SearchResult'); diff --git a/src/contracts/Repository/Values/Content/Section.php b/src/contracts/Repository/Values/Content/Section.php index 959b5ef953..78b5139a10 100644 --- a/src/contracts/Repository/Values/Content/Section.php +++ b/src/contracts/Repository/Values/Content/Section.php @@ -40,5 +40,3 @@ class Section extends ValueObject */ protected $name; } - -class_alias(Section::class, 'eZ\Publish\API\Repository\Values\Content\Section'); diff --git a/src/contracts/Repository/Values/Content/SectionCreateStruct.php b/src/contracts/Repository/Values/Content/SectionCreateStruct.php index efe89b0ee7..f5c6e10509 100644 --- a/src/contracts/Repository/Values/Content/SectionCreateStruct.php +++ b/src/contracts/Repository/Values/Content/SectionCreateStruct.php @@ -15,5 +15,3 @@ class SectionCreateStruct extends SectionStruct { } - -class_alias(SectionCreateStruct::class, 'eZ\Publish\API\Repository\Values\Content\SectionCreateStruct'); diff --git a/src/contracts/Repository/Values/Content/SectionStruct.php b/src/contracts/Repository/Values/Content/SectionStruct.php index 1a09788087..1627f833cd 100644 --- a/src/contracts/Repository/Values/Content/SectionStruct.php +++ b/src/contracts/Repository/Values/Content/SectionStruct.php @@ -28,5 +28,3 @@ abstract class SectionStruct extends ValueObject */ public $name; } - -class_alias(SectionStruct::class, 'eZ\Publish\API\Repository\Values\Content\SectionStruct'); diff --git a/src/contracts/Repository/Values/Content/SectionUpdateStruct.php b/src/contracts/Repository/Values/Content/SectionUpdateStruct.php index f5f57cba0e..ff516fbdb1 100644 --- a/src/contracts/Repository/Values/Content/SectionUpdateStruct.php +++ b/src/contracts/Repository/Values/Content/SectionUpdateStruct.php @@ -14,5 +14,3 @@ class SectionUpdateStruct extends SectionStruct { } - -class_alias(SectionUpdateStruct::class, 'eZ\Publish\API\Repository\Values\Content\SectionUpdateStruct'); diff --git a/src/contracts/Repository/Values/Content/Thumbnail.php b/src/contracts/Repository/Values/Content/Thumbnail.php index 80caed993e..982018e339 100644 --- a/src/contracts/Repository/Values/Content/Thumbnail.php +++ b/src/contracts/Repository/Values/Content/Thumbnail.php @@ -34,5 +34,3 @@ class Thumbnail extends ValueObject /** @var string|null */ protected $mimeType; } - -class_alias(Thumbnail::class, 'eZ\Publish\API\Repository\Values\Content\Thumbnail'); diff --git a/src/contracts/Repository/Values/Content/Trash/SearchResult.php b/src/contracts/Repository/Values/Content/Trash/SearchResult.php index 13cd0d32b7..26586ff933 100644 --- a/src/contracts/Repository/Values/Content/Trash/SearchResult.php +++ b/src/contracts/Repository/Values/Content/Trash/SearchResult.php @@ -51,5 +51,3 @@ public function getIterator(): Traversable return new ArrayIterator($this->items); } } - -class_alias(SearchResult::class, 'eZ\Publish\API\Repository\Values\Content\Trash\SearchResult'); diff --git a/src/contracts/Repository/Values/Content/Trash/TrashItemDeleteResult.php b/src/contracts/Repository/Values/Content/Trash/TrashItemDeleteResult.php index b0f4689a8a..c51d36e40f 100644 --- a/src/contracts/Repository/Values/Content/Trash/TrashItemDeleteResult.php +++ b/src/contracts/Repository/Values/Content/Trash/TrashItemDeleteResult.php @@ -28,5 +28,3 @@ class TrashItemDeleteResult extends ValueObject /** @var array */ public $reverseRelationContentIds = []; } - -class_alias(TrashItemDeleteResult::class, 'eZ\Publish\API\Repository\Values\Content\Trash\TrashItemDeleteResult'); diff --git a/src/contracts/Repository/Values/Content/Trash/TrashItemDeleteResultList.php b/src/contracts/Repository/Values/Content/Trash/TrashItemDeleteResultList.php index 16a87041a4..09cce9987e 100644 --- a/src/contracts/Repository/Values/Content/Trash/TrashItemDeleteResultList.php +++ b/src/contracts/Repository/Values/Content/Trash/TrashItemDeleteResultList.php @@ -25,5 +25,3 @@ public function getIterator(): Traversable return new ArrayIterator($this->items); } } - -class_alias(TrashItemDeleteResultList::class, 'eZ\Publish\API\Repository\Values\Content\Trash\TrashItemDeleteResultList'); diff --git a/src/contracts/Repository/Values/Content/TrashItem.php b/src/contracts/Repository/Values/Content/TrashItem.php index 3e4492d6c4..aac0c3aa77 100644 --- a/src/contracts/Repository/Values/Content/TrashItem.php +++ b/src/contracts/Repository/Values/Content/TrashItem.php @@ -20,5 +20,3 @@ abstract class TrashItem extends Location */ protected $trashed; } - -class_alias(TrashItem::class, 'eZ\Publish\API\Repository\Values\Content\TrashItem'); diff --git a/src/contracts/Repository/Values/Content/URLAlias.php b/src/contracts/Repository/Values/Content/URLAlias.php index 6e4502ff90..b3db8125cb 100644 --- a/src/contracts/Repository/Values/Content/URLAlias.php +++ b/src/contracts/Repository/Values/Content/URLAlias.php @@ -96,5 +96,3 @@ class URLAlias extends ValueObject */ protected $forward; } - -class_alias(URLAlias::class, 'eZ\Publish\API\Repository\Values\Content\URLAlias'); diff --git a/src/contracts/Repository/Values/Content/URLWildcard.php b/src/contracts/Repository/Values/Content/URLWildcard.php index 6a624e0808..5c4e3019af 100644 --- a/src/contracts/Repository/Values/Content/URLWildcard.php +++ b/src/contracts/Repository/Values/Content/URLWildcard.php @@ -48,5 +48,3 @@ class URLWildcard extends ValueObject */ protected $forward; } - -class_alias(URLWildcard::class, 'eZ\Publish\API\Repository\Values\Content\URLWildcard'); diff --git a/src/contracts/Repository/Values/Content/URLWildcardStruct.php b/src/contracts/Repository/Values/Content/URLWildcardStruct.php index 52633c113d..dcf7fe741e 100644 --- a/src/contracts/Repository/Values/Content/URLWildcardStruct.php +++ b/src/contracts/Repository/Values/Content/URLWildcardStruct.php @@ -21,5 +21,3 @@ class URLWildcardStruct extends ValueObject /** @var bool */ public $forward; } - -class_alias(URLWildcardStruct::class, 'eZ\Publish\API\Repository\Values\Content\URLWildcardStruct'); diff --git a/src/contracts/Repository/Values/Content/URLWildcardTranslationResult.php b/src/contracts/Repository/Values/Content/URLWildcardTranslationResult.php index ccdf0e1ae0..7027cf84d3 100644 --- a/src/contracts/Repository/Values/Content/URLWildcardTranslationResult.php +++ b/src/contracts/Repository/Values/Content/URLWildcardTranslationResult.php @@ -32,5 +32,3 @@ class URLWildcardTranslationResult extends ValueObject */ protected $forward; } - -class_alias(URLWildcardTranslationResult::class, 'eZ\Publish\API\Repository\Values\Content\URLWildcardTranslationResult'); diff --git a/src/contracts/Repository/Values/Content/URLWildcardUpdateStruct.php b/src/contracts/Repository/Values/Content/URLWildcardUpdateStruct.php index 76066817a2..6540d06a5d 100644 --- a/src/contracts/Repository/Values/Content/URLWildcardUpdateStruct.php +++ b/src/contracts/Repository/Values/Content/URLWildcardUpdateStruct.php @@ -11,5 +11,3 @@ final class URLWildcardUpdateStruct extends URLWildcardStruct { } - -class_alias(URLWildcardUpdateStruct::class, 'eZ\Publish\API\Repository\Values\Content\URLWildcardUpdateStruct'); diff --git a/src/contracts/Repository/Values/Content/VersionInfo.php b/src/contracts/Repository/Values/Content/VersionInfo.php index f6a8c44a1f..ed05b87d0d 100644 --- a/src/contracts/Repository/Values/Content/VersionInfo.php +++ b/src/contracts/Repository/Values/Content/VersionInfo.php @@ -152,5 +152,3 @@ public function isArchived(): bool return $this->status === self::STATUS_ARCHIVED; } } - -class_alias(VersionInfo::class, 'eZ\Publish\API\Repository\Values\Content\VersionInfo'); diff --git a/src/contracts/Repository/Values/ContentType/ContentType.php b/src/contracts/Repository/Values/ContentType/ContentType.php index b76e351963..997de48c56 100644 --- a/src/contracts/Repository/Values/ContentType/ContentType.php +++ b/src/contracts/Repository/Values/ContentType/ContentType.php @@ -239,5 +239,3 @@ public function isContainer(): bool return $this->isContainer; } } - -class_alias(ContentType::class, 'eZ\Publish\API\Repository\Values\ContentType\ContentType'); diff --git a/src/contracts/Repository/Values/ContentType/ContentTypeCreateStruct.php b/src/contracts/Repository/Values/ContentType/ContentTypeCreateStruct.php index 068651a572..fb5ef0ef3a 100644 --- a/src/contracts/Repository/Values/ContentType/ContentTypeCreateStruct.php +++ b/src/contracts/Repository/Values/ContentType/ContentTypeCreateStruct.php @@ -127,5 +127,3 @@ abstract public function addFieldDefinition(FieldDefinitionCreateStruct $fieldDe */ public $creationDate = null; } - -class_alias(ContentTypeCreateStruct::class, 'eZ\Publish\API\Repository\Values\ContentType\ContentTypeCreateStruct'); diff --git a/src/contracts/Repository/Values/ContentType/ContentTypeDraft.php b/src/contracts/Repository/Values/ContentType/ContentTypeDraft.php index fc0a8f6faf..e39489c66b 100644 --- a/src/contracts/Repository/Values/ContentType/ContentTypeDraft.php +++ b/src/contracts/Repository/Values/ContentType/ContentTypeDraft.php @@ -14,5 +14,3 @@ abstract class ContentTypeDraft extends ContentType { } - -class_alias(ContentTypeDraft::class, 'eZ\Publish\API\Repository\Values\ContentType\ContentTypeDraft'); diff --git a/src/contracts/Repository/Values/ContentType/ContentTypeGroup.php b/src/contracts/Repository/Values/ContentType/ContentTypeGroup.php index 4d8b4e1490..f5c0c5cf1d 100644 --- a/src/contracts/Repository/Values/ContentType/ContentTypeGroup.php +++ b/src/contracts/Repository/Values/ContentType/ContentTypeGroup.php @@ -71,5 +71,3 @@ abstract class ContentTypeGroup extends ValueObject implements MultiLanguageName */ public $isSystem = false; } - -class_alias(ContentTypeGroup::class, 'eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroup'); diff --git a/src/contracts/Repository/Values/ContentType/ContentTypeGroupCreateStruct.php b/src/contracts/Repository/Values/ContentType/ContentTypeGroupCreateStruct.php index c1861ae58d..ca35f19c2f 100644 --- a/src/contracts/Repository/Values/ContentType/ContentTypeGroupCreateStruct.php +++ b/src/contracts/Repository/Values/ContentType/ContentTypeGroupCreateStruct.php @@ -27,5 +27,3 @@ class ContentTypeGroupCreateStruct extends ContentTypeGroupStruct */ public $creationDate = null; } - -class_alias(ContentTypeGroupCreateStruct::class, 'eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroupCreateStruct'); diff --git a/src/contracts/Repository/Values/ContentType/ContentTypeGroupStruct.php b/src/contracts/Repository/Values/ContentType/ContentTypeGroupStruct.php index 57b0e5fd5a..4c12017882 100644 --- a/src/contracts/Repository/Values/ContentType/ContentTypeGroupStruct.php +++ b/src/contracts/Repository/Values/ContentType/ContentTypeGroupStruct.php @@ -24,5 +24,3 @@ abstract class ContentTypeGroupStruct extends ValueObject */ public $isSystem = false; } - -class_alias(ContentTypeGroupStruct::class, 'eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroupStruct'); diff --git a/src/contracts/Repository/Values/ContentType/ContentTypeGroupUpdateStruct.php b/src/contracts/Repository/Values/ContentType/ContentTypeGroupUpdateStruct.php index 323449cb36..6f2e0687a1 100644 --- a/src/contracts/Repository/Values/ContentType/ContentTypeGroupUpdateStruct.php +++ b/src/contracts/Repository/Values/ContentType/ContentTypeGroupUpdateStruct.php @@ -27,5 +27,3 @@ class ContentTypeGroupUpdateStruct extends ContentTypeGroupStruct */ public $modificationDate = null; } - -class_alias(ContentTypeGroupUpdateStruct::class, 'eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroupUpdateStruct'); diff --git a/src/contracts/Repository/Values/ContentType/ContentTypeUpdateStruct.php b/src/contracts/Repository/Values/ContentType/ContentTypeUpdateStruct.php index c9395af1fa..a2270f1525 100644 --- a/src/contracts/Repository/Values/ContentType/ContentTypeUpdateStruct.php +++ b/src/contracts/Repository/Values/ContentType/ContentTypeUpdateStruct.php @@ -106,5 +106,3 @@ class ContentTypeUpdateStruct extends ValueObject */ public $descriptions; } - -class_alias(ContentTypeUpdateStruct::class, 'eZ\Publish\API\Repository\Values\ContentType\ContentTypeUpdateStruct'); diff --git a/src/contracts/Repository/Values/ContentType/FieldDefinition.php b/src/contracts/Repository/Values/ContentType/FieldDefinition.php index ddf0df99a4..c7a05da690 100644 --- a/src/contracts/Repository/Values/ContentType/FieldDefinition.php +++ b/src/contracts/Repository/Values/ContentType/FieldDefinition.php @@ -193,5 +193,3 @@ public function getFieldTypeIdentifier(): string return $this->fieldTypeIdentifier; } } - -class_alias(FieldDefinition::class, 'eZ\Publish\API\Repository\Values\ContentType\FieldDefinition'); diff --git a/src/contracts/Repository/Values/ContentType/FieldDefinitionCollection.php b/src/contracts/Repository/Values/ContentType/FieldDefinitionCollection.php index f43b4c749d..0e357368eb 100644 --- a/src/contracts/Repository/Values/ContentType/FieldDefinitionCollection.php +++ b/src/contracts/Repository/Values/ContentType/FieldDefinitionCollection.php @@ -111,5 +111,3 @@ public function partition(Closure $predicate): array; */ public function toArray(): array; } - -class_alias(FieldDefinitionCollection::class, 'eZ\Publish\API\Repository\Values\ContentType\FieldDefinitionCollection'); diff --git a/src/contracts/Repository/Values/ContentType/FieldDefinitionCreateStruct.php b/src/contracts/Repository/Values/ContentType/FieldDefinitionCreateStruct.php index c4763233dc..2284f50500 100644 --- a/src/contracts/Repository/Values/ContentType/FieldDefinitionCreateStruct.php +++ b/src/contracts/Repository/Values/ContentType/FieldDefinitionCreateStruct.php @@ -120,5 +120,3 @@ class FieldDefinitionCreateStruct extends ValueObject */ public $isSearchable; } - -class_alias(FieldDefinitionCreateStruct::class, 'eZ\Publish\API\Repository\Values\ContentType\FieldDefinitionCreateStruct'); diff --git a/src/contracts/Repository/Values/ContentType/FieldDefinitionUpdateStruct.php b/src/contracts/Repository/Values/ContentType/FieldDefinitionUpdateStruct.php index d2bb8c0d35..2e211ead96 100644 --- a/src/contracts/Repository/Values/ContentType/FieldDefinitionUpdateStruct.php +++ b/src/contracts/Repository/Values/ContentType/FieldDefinitionUpdateStruct.php @@ -108,5 +108,3 @@ class FieldDefinitionUpdateStruct extends ValueObject */ public $isSearchable; } - -class_alias(FieldDefinitionUpdateStruct::class, 'eZ\Publish\API\Repository\Values\ContentType\FieldDefinitionUpdateStruct'); diff --git a/src/contracts/Repository/Values/Filter/CriterionQueryBuilder.php b/src/contracts/Repository/Values/Filter/CriterionQueryBuilder.php index ca3a57b47d..f1d06a75b9 100644 --- a/src/contracts/Repository/Values/Filter/CriterionQueryBuilder.php +++ b/src/contracts/Repository/Values/Filter/CriterionQueryBuilder.php @@ -26,5 +26,3 @@ public function accepts(FilteringCriterion $criterion): bool; */ public function buildQueryConstraint(FilteringQueryBuilder $queryBuilder, FilteringCriterion $criterion): ?string; } - -class_alias(CriterionQueryBuilder::class, 'eZ\Publish\SPI\Repository\Values\Filter\CriterionQueryBuilder'); diff --git a/src/contracts/Repository/Values/Filter/Filter.php b/src/contracts/Repository/Values/Filter/Filter.php index 5c2403d76a..a0b660400d 100644 --- a/src/contracts/Repository/Values/Filter/Filter.php +++ b/src/contracts/Repository/Values/Filter/Filter.php @@ -229,5 +229,3 @@ static function (FilteringSortClause $sortClause): FilteringSortClause { ); } } - -class_alias(Filter::class, 'eZ\Publish\API\Repository\Values\Filter\Filter'); diff --git a/src/contracts/Repository/Values/Filter/FilteringCriterion.php b/src/contracts/Repository/Values/Filter/FilteringCriterion.php index 5e30e9d632..81613180cf 100644 --- a/src/contracts/Repository/Values/Filter/FilteringCriterion.php +++ b/src/contracts/Repository/Values/Filter/FilteringCriterion.php @@ -14,5 +14,3 @@ interface FilteringCriterion { } - -class_alias(FilteringCriterion::class, 'eZ\Publish\SPI\Repository\Values\Filter\FilteringCriterion'); diff --git a/src/contracts/Repository/Values/Filter/FilteringSortClause.php b/src/contracts/Repository/Values/Filter/FilteringSortClause.php index 5608c47db9..deb1478e31 100644 --- a/src/contracts/Repository/Values/Filter/FilteringSortClause.php +++ b/src/contracts/Repository/Values/Filter/FilteringSortClause.php @@ -14,5 +14,3 @@ interface FilteringSortClause { } - -class_alias(FilteringSortClause::class, 'eZ\Publish\SPI\Repository\Values\Filter\FilteringSortClause'); diff --git a/src/contracts/Repository/Values/Filter/SortClauseQueryBuilder.php b/src/contracts/Repository/Values/Filter/SortClauseQueryBuilder.php index b960a30127..17bfdf2dd5 100644 --- a/src/contracts/Repository/Values/Filter/SortClauseQueryBuilder.php +++ b/src/contracts/Repository/Values/Filter/SortClauseQueryBuilder.php @@ -19,5 +19,3 @@ public function buildQuery( FilteringSortClause $sortClause ): void; } - -class_alias(SortClauseQueryBuilder::class, 'eZ\Publish\SPI\Repository\Values\Filter\SortClauseQueryBuilder'); diff --git a/src/contracts/Repository/Values/MultiLanguageDescription.php b/src/contracts/Repository/Values/MultiLanguageDescription.php index 45c86df574..a0ec8799e5 100644 --- a/src/contracts/Repository/Values/MultiLanguageDescription.php +++ b/src/contracts/Repository/Values/MultiLanguageDescription.php @@ -43,5 +43,3 @@ public function getDescriptions(); */ public function getDescription($languageCode = null); } - -class_alias(MultiLanguageDescription::class, 'eZ\Publish\SPI\Repository\Values\MultiLanguageDescription'); diff --git a/src/contracts/Repository/Values/MultiLanguageName.php b/src/contracts/Repository/Values/MultiLanguageName.php index 344942d937..4676183703 100644 --- a/src/contracts/Repository/Values/MultiLanguageName.php +++ b/src/contracts/Repository/Values/MultiLanguageName.php @@ -47,5 +47,3 @@ public function getNames(); */ public function getName($languageCode = null); } - -class_alias(MultiLanguageName::class, 'eZ\Publish\SPI\Repository\Values\MultiLanguageName'); diff --git a/src/contracts/Repository/Values/Notification/CreateStruct.php b/src/contracts/Repository/Values/Notification/CreateStruct.php index e6e812bdf4..9750d48186 100644 --- a/src/contracts/Repository/Values/Notification/CreateStruct.php +++ b/src/contracts/Repository/Values/Notification/CreateStruct.php @@ -24,5 +24,3 @@ class CreateStruct extends ValueObject /** @var array */ public $data = []; } - -class_alias(CreateStruct::class, 'eZ\Publish\API\Repository\Values\Notification\CreateStruct'); diff --git a/src/contracts/Repository/Values/Notification/Notification.php b/src/contracts/Repository/Values/Notification/Notification.php index d99042b121..40bbb17b4f 100644 --- a/src/contracts/Repository/Values/Notification/Notification.php +++ b/src/contracts/Repository/Values/Notification/Notification.php @@ -40,5 +40,3 @@ class Notification extends ValueObject /** @var array */ protected $data = []; } - -class_alias(Notification::class, 'eZ\Publish\API\Repository\Values\Notification\Notification'); diff --git a/src/contracts/Repository/Values/Notification/NotificationList.php b/src/contracts/Repository/Values/Notification/NotificationList.php index 5604be6aa4..8b183f50be 100644 --- a/src/contracts/Repository/Values/Notification/NotificationList.php +++ b/src/contracts/Repository/Values/Notification/NotificationList.php @@ -29,5 +29,3 @@ public function getIterator(): Traversable return new ArrayIterator($this->items); } } - -class_alias(NotificationList::class, 'eZ\Publish\API\Repository\Values\Notification\NotificationList'); diff --git a/src/contracts/Repository/Values/ObjectState/ObjectState.php b/src/contracts/Repository/Values/ObjectState/ObjectState.php index f4c8c6e331..1ca20b9a2c 100644 --- a/src/contracts/Repository/Values/ObjectState/ObjectState.php +++ b/src/contracts/Repository/Values/ObjectState/ObjectState.php @@ -58,5 +58,3 @@ abstract class ObjectState extends ValueObject implements MultiLanguageName, Mul */ abstract public function getObjectStateGroup(): ObjectStateGroup; } - -class_alias(ObjectState::class, 'eZ\Publish\API\Repository\Values\ObjectState\ObjectState'); diff --git a/src/contracts/Repository/Values/ObjectState/ObjectStateCreateStruct.php b/src/contracts/Repository/Values/ObjectState/ObjectStateCreateStruct.php index 316b3d4e31..db1fe8853f 100644 --- a/src/contracts/Repository/Values/ObjectState/ObjectStateCreateStruct.php +++ b/src/contracts/Repository/Values/ObjectState/ObjectStateCreateStruct.php @@ -56,5 +56,3 @@ class ObjectStateCreateStruct extends ValueObject */ public $descriptions; } - -class_alias(ObjectStateCreateStruct::class, 'eZ\Publish\API\Repository\Values\ObjectState\ObjectStateCreateStruct'); diff --git a/src/contracts/Repository/Values/ObjectState/ObjectStateGroup.php b/src/contracts/Repository/Values/ObjectState/ObjectStateGroup.php index 0524cca46d..d057d051e3 100644 --- a/src/contracts/Repository/Values/ObjectState/ObjectStateGroup.php +++ b/src/contracts/Repository/Values/ObjectState/ObjectStateGroup.php @@ -51,5 +51,3 @@ abstract class ObjectStateGroup extends ValueObject implements MultiLanguageName */ protected $languageCodes; } - -class_alias(ObjectStateGroup::class, 'eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup'); diff --git a/src/contracts/Repository/Values/ObjectState/ObjectStateGroupCreateStruct.php b/src/contracts/Repository/Values/ObjectState/ObjectStateGroupCreateStruct.php index cfb4dc0a7f..67463e90b9 100644 --- a/src/contracts/Repository/Values/ObjectState/ObjectStateGroupCreateStruct.php +++ b/src/contracts/Repository/Values/ObjectState/ObjectStateGroupCreateStruct.php @@ -49,5 +49,3 @@ class ObjectStateGroupCreateStruct extends ValueObject */ public $descriptions; } - -class_alias(ObjectStateGroupCreateStruct::class, 'eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroupCreateStruct'); diff --git a/src/contracts/Repository/Values/ObjectState/ObjectStateGroupUpdateStruct.php b/src/contracts/Repository/Values/ObjectState/ObjectStateGroupUpdateStruct.php index 9ab3bec99f..9a24bef2c2 100644 --- a/src/contracts/Repository/Values/ObjectState/ObjectStateGroupUpdateStruct.php +++ b/src/contracts/Repository/Values/ObjectState/ObjectStateGroupUpdateStruct.php @@ -43,5 +43,3 @@ class ObjectStateGroupUpdateStruct extends ValueObject */ public $descriptions; } - -class_alias(ObjectStateGroupUpdateStruct::class, 'eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroupUpdateStruct'); diff --git a/src/contracts/Repository/Values/ObjectState/ObjectStateUpdateStruct.php b/src/contracts/Repository/Values/ObjectState/ObjectStateUpdateStruct.php index 41b58f7513..54acf9c345 100644 --- a/src/contracts/Repository/Values/ObjectState/ObjectStateUpdateStruct.php +++ b/src/contracts/Repository/Values/ObjectState/ObjectStateUpdateStruct.php @@ -43,5 +43,3 @@ class ObjectStateUpdateStruct extends ValueObject */ public $descriptions; } - -class_alias(ObjectStateUpdateStruct::class, 'eZ\Publish\API\Repository\Values\ObjectState\ObjectStateUpdateStruct'); diff --git a/src/contracts/Repository/Values/Setting/Setting.php b/src/contracts/Repository/Values/Setting/Setting.php index d22d616713..f207bffc1c 100644 --- a/src/contracts/Repository/Values/Setting/Setting.php +++ b/src/contracts/Repository/Values/Setting/Setting.php @@ -26,5 +26,3 @@ class Setting extends ValueObject /** @var mixed */ protected $value; } - -class_alias(Setting::class, 'eZ\Publish\API\Repository\Values\Setting\Setting'); diff --git a/src/contracts/Repository/Values/Setting/SettingCreateStruct.php b/src/contracts/Repository/Values/Setting/SettingCreateStruct.php index 0659a192ad..2f60d7dcf6 100644 --- a/src/contracts/Repository/Values/Setting/SettingCreateStruct.php +++ b/src/contracts/Repository/Values/Setting/SettingCreateStruct.php @@ -28,5 +28,3 @@ public function setValue($value): void $this->value = $value; } } - -class_alias(SettingCreateStruct::class, 'eZ\Publish\API\Repository\Values\Setting\SettingCreateStruct'); diff --git a/src/contracts/Repository/Values/Setting/SettingUpdateStruct.php b/src/contracts/Repository/Values/Setting/SettingUpdateStruct.php index 59820c268e..6984803a60 100644 --- a/src/contracts/Repository/Values/Setting/SettingUpdateStruct.php +++ b/src/contracts/Repository/Values/Setting/SettingUpdateStruct.php @@ -18,5 +18,3 @@ public function setValue($value): void $this->value = $value; } } - -class_alias(SettingUpdateStruct::class, 'eZ\Publish\API\Repository\Values\Setting\SettingUpdateStruct'); diff --git a/src/contracts/Repository/Values/Translation.php b/src/contracts/Repository/Values/Translation.php index 6ccabc40f6..45fbc6d4c8 100644 --- a/src/contracts/Repository/Values/Translation.php +++ b/src/contracts/Repository/Values/Translation.php @@ -19,5 +19,3 @@ abstract class Translation extends ValueObject implements Stringable { } - -class_alias(Translation::class, 'eZ\Publish\API\Repository\Values\Translation'); diff --git a/src/contracts/Repository/Values/Translation/Message.php b/src/contracts/Repository/Values/Translation/Message.php index 20b2eed75b..ced2753223 100644 --- a/src/contracts/Repository/Values/Translation/Message.php +++ b/src/contracts/Repository/Values/Translation/Message.php @@ -49,5 +49,3 @@ public function __toString() return strtr($this->message, $this->values); } } - -class_alias(Message::class, 'eZ\Publish\API\Repository\Values\Translation\Message'); diff --git a/src/contracts/Repository/Values/Translation/Plural.php b/src/contracts/Repository/Values/Translation/Plural.php index a05d37ebb3..a705594f49 100644 --- a/src/contracts/Repository/Values/Translation/Plural.php +++ b/src/contracts/Repository/Values/Translation/Plural.php @@ -74,5 +74,3 @@ public function __toString() return strtr((int)$firstValue === 1 ? $this->singular : $this->plural, $this->values); } } - -class_alias(Plural::class, 'eZ\Publish\API\Repository\Values\Translation\Plural'); diff --git a/src/contracts/Repository/Values/Trash/Query/Criterion.php b/src/contracts/Repository/Values/Trash/Query/Criterion.php index 2e794f42f8..0eef9858ce 100644 --- a/src/contracts/Repository/Values/Trash/Query/Criterion.php +++ b/src/contracts/Repository/Values/Trash/Query/Criterion.php @@ -14,5 +14,3 @@ interface Criterion { } - -class_alias(Criterion::class, 'eZ\Publish\SPI\Repository\Values\Trash\Query\Criterion'); diff --git a/src/contracts/Repository/Values/Trash/Query/SortClause.php b/src/contracts/Repository/Values/Trash/Query/SortClause.php index b6dfa3b732..555ac729a8 100644 --- a/src/contracts/Repository/Values/Trash/Query/SortClause.php +++ b/src/contracts/Repository/Values/Trash/Query/SortClause.php @@ -11,5 +11,3 @@ interface SortClause { } - -class_alias(SortClause::class, 'eZ\Publish\SPI\Repository\Values\Trash\Query\SortClause'); diff --git a/src/contracts/Repository/Values/URL/Query/Criterion.php b/src/contracts/Repository/Values/URL/Query/Criterion.php index a4de169660..73b107dbd3 100644 --- a/src/contracts/Repository/Values/URL/Query/Criterion.php +++ b/src/contracts/Repository/Values/URL/Query/Criterion.php @@ -11,5 +11,3 @@ abstract class Criterion { } - -class_alias(Criterion::class, 'eZ\Publish\API\Repository\Values\URL\Query\Criterion'); diff --git a/src/contracts/Repository/Values/URL/Query/Criterion/LogicalAnd.php b/src/contracts/Repository/Values/URL/Query/Criterion/LogicalAnd.php index 645ca037a3..d88a3bef77 100644 --- a/src/contracts/Repository/Values/URL/Query/Criterion/LogicalAnd.php +++ b/src/contracts/Repository/Values/URL/Query/Criterion/LogicalAnd.php @@ -11,5 +11,3 @@ class LogicalAnd extends LogicalOperator { } - -class_alias(LogicalAnd::class, 'eZ\Publish\API\Repository\Values\URL\Query\Criterion\LogicalAnd'); diff --git a/src/contracts/Repository/Values/URL/Query/Criterion/LogicalNot.php b/src/contracts/Repository/Values/URL/Query/Criterion/LogicalNot.php index a8a1ae5cb0..c028f477d4 100644 --- a/src/contracts/Repository/Values/URL/Query/Criterion/LogicalNot.php +++ b/src/contracts/Repository/Values/URL/Query/Criterion/LogicalNot.php @@ -26,5 +26,3 @@ public function __construct(Criterion $criterion) parent::__construct([$criterion]); } } - -class_alias(LogicalNot::class, 'eZ\Publish\API\Repository\Values\URL\Query\Criterion\LogicalNot'); diff --git a/src/contracts/Repository/Values/URL/Query/Criterion/LogicalOperator.php b/src/contracts/Repository/Values/URL/Query/Criterion/LogicalOperator.php index 881181c411..3ec1017eb1 100644 --- a/src/contracts/Repository/Values/URL/Query/Criterion/LogicalOperator.php +++ b/src/contracts/Repository/Values/URL/Query/Criterion/LogicalOperator.php @@ -38,5 +38,3 @@ public function __construct(array $criteria) } } } - -class_alias(LogicalOperator::class, 'eZ\Publish\API\Repository\Values\URL\Query\Criterion\LogicalOperator'); diff --git a/src/contracts/Repository/Values/URL/Query/Criterion/LogicalOr.php b/src/contracts/Repository/Values/URL/Query/Criterion/LogicalOr.php index cf9bf9c386..9843b25534 100644 --- a/src/contracts/Repository/Values/URL/Query/Criterion/LogicalOr.php +++ b/src/contracts/Repository/Values/URL/Query/Criterion/LogicalOr.php @@ -11,5 +11,3 @@ class LogicalOr extends LogicalOperator { } - -class_alias(LogicalOr::class, 'eZ\Publish\API\Repository\Values\URL\Query\Criterion\LogicalOr'); diff --git a/src/contracts/Repository/Values/URL/Query/Criterion/MatchAll.php b/src/contracts/Repository/Values/URL/Query/Criterion/MatchAll.php index a9ebb05e9a..5560cdf703 100644 --- a/src/contracts/Repository/Values/URL/Query/Criterion/MatchAll.php +++ b/src/contracts/Repository/Values/URL/Query/Criterion/MatchAll.php @@ -11,5 +11,3 @@ class MatchAll extends Matcher { } - -class_alias(MatchAll::class, 'eZ\Publish\API\Repository\Values\URL\Query\Criterion\MatchAll'); diff --git a/src/contracts/Repository/Values/URL/Query/Criterion/MatchNone.php b/src/contracts/Repository/Values/URL/Query/Criterion/MatchNone.php index 970f04a3ab..32e76fe30b 100644 --- a/src/contracts/Repository/Values/URL/Query/Criterion/MatchNone.php +++ b/src/contracts/Repository/Values/URL/Query/Criterion/MatchNone.php @@ -11,5 +11,3 @@ class MatchNone extends Matcher { } - -class_alias(MatchNone::class, 'eZ\Publish\API\Repository\Values\URL\Query\Criterion\MatchNone'); diff --git a/src/contracts/Repository/Values/URL/Query/Criterion/Matcher.php b/src/contracts/Repository/Values/URL/Query/Criterion/Matcher.php index 68cf89892c..58809fe50a 100644 --- a/src/contracts/Repository/Values/URL/Query/Criterion/Matcher.php +++ b/src/contracts/Repository/Values/URL/Query/Criterion/Matcher.php @@ -13,5 +13,3 @@ abstract class Matcher extends Criterion { } - -class_alias(Matcher::class, 'eZ\Publish\API\Repository\Values\URL\Query\Criterion\Matcher'); diff --git a/src/contracts/Repository/Values/URL/Query/Criterion/Pattern.php b/src/contracts/Repository/Values/URL/Query/Criterion/Pattern.php index f6ed0cde4d..56daa29e10 100644 --- a/src/contracts/Repository/Values/URL/Query/Criterion/Pattern.php +++ b/src/contracts/Repository/Values/URL/Query/Criterion/Pattern.php @@ -34,5 +34,3 @@ public function __construct(string $pattern) $this->pattern = $pattern; } } - -class_alias(Pattern::class, 'eZ\Publish\API\Repository\Values\URL\Query\Criterion\Pattern'); diff --git a/src/contracts/Repository/Values/URL/Query/Criterion/SectionId.php b/src/contracts/Repository/Values/URL/Query/Criterion/SectionId.php index 1ee93d904d..758335aadf 100644 --- a/src/contracts/Repository/Values/URL/Query/Criterion/SectionId.php +++ b/src/contracts/Repository/Values/URL/Query/Criterion/SectionId.php @@ -28,5 +28,3 @@ public function __construct(array $sectionIds) $this->sectionIds = $sectionIds; } } - -class_alias(SectionId::class, 'eZ\Publish\API\Repository\Values\URL\Query\Criterion\SectionId'); diff --git a/src/contracts/Repository/Values/URL/Query/Criterion/SectionIdentifier.php b/src/contracts/Repository/Values/URL/Query/Criterion/SectionIdentifier.php index 0cadb43744..7717fb2c2f 100644 --- a/src/contracts/Repository/Values/URL/Query/Criterion/SectionIdentifier.php +++ b/src/contracts/Repository/Values/URL/Query/Criterion/SectionIdentifier.php @@ -28,5 +28,3 @@ public function __construct(array $sectionIdentifiers) $this->sectionIdentifiers = $sectionIdentifiers; } } - -class_alias(SectionIdentifier::class, 'eZ\Publish\API\Repository\Values\URL\Query\Criterion\SectionIdentifier'); diff --git a/src/contracts/Repository/Values/URL/Query/Criterion/Validity.php b/src/contracts/Repository/Values/URL/Query/Criterion/Validity.php index 4e57beee20..8aadd1718d 100644 --- a/src/contracts/Repository/Values/URL/Query/Criterion/Validity.php +++ b/src/contracts/Repository/Values/URL/Query/Criterion/Validity.php @@ -30,5 +30,3 @@ public function __construct(bool $isValid) $this->isValid = $isValid; } } - -class_alias(Validity::class, 'eZ\Publish\API\Repository\Values\URL\Query\Criterion\Validity'); diff --git a/src/contracts/Repository/Values/URL/Query/Criterion/VisibleOnly.php b/src/contracts/Repository/Values/URL/Query/Criterion/VisibleOnly.php index 2e545075e7..f80cea53b3 100644 --- a/src/contracts/Repository/Values/URL/Query/Criterion/VisibleOnly.php +++ b/src/contracts/Repository/Values/URL/Query/Criterion/VisibleOnly.php @@ -14,5 +14,3 @@ class VisibleOnly extends Matcher { } - -class_alias(VisibleOnly::class, 'eZ\Publish\API\Repository\Values\URL\Query\Criterion\VisibleOnly'); diff --git a/src/contracts/Repository/Values/URL/Query/SortClause.php b/src/contracts/Repository/Values/URL/Query/SortClause.php index 4c3b87ffb2..26dbcdb6c3 100644 --- a/src/contracts/Repository/Values/URL/Query/SortClause.php +++ b/src/contracts/Repository/Values/URL/Query/SortClause.php @@ -50,5 +50,3 @@ public function __construct(string $sortTarget, string $sortDirection) $this->target = $sortTarget; } } - -class_alias(SortClause::class, 'eZ\Publish\API\Repository\Values\URL\Query\SortClause'); diff --git a/src/contracts/Repository/Values/URL/Query/SortClause/Id.php b/src/contracts/Repository/Values/URL/Query/SortClause/Id.php index 91928eb6a3..c864332a0a 100644 --- a/src/contracts/Repository/Values/URL/Query/SortClause/Id.php +++ b/src/contracts/Repository/Values/URL/Query/SortClause/Id.php @@ -22,5 +22,3 @@ public function __construct(string $sortDirection = self::SORT_ASC) parent::__construct('id', $sortDirection); } } - -class_alias(Id::class, 'eZ\Publish\API\Repository\Values\URL\Query\SortClause\Id'); diff --git a/src/contracts/Repository/Values/URL/Query/SortClause/URL.php b/src/contracts/Repository/Values/URL/Query/SortClause/URL.php index 845b3de948..36198bf82c 100644 --- a/src/contracts/Repository/Values/URL/Query/SortClause/URL.php +++ b/src/contracts/Repository/Values/URL/Query/SortClause/URL.php @@ -22,5 +22,3 @@ public function __construct(string $sortDirection = self::SORT_ASC) parent::__construct('url', $sortDirection); } } - -class_alias(URL::class, 'eZ\Publish\API\Repository\Values\URL\Query\SortClause\URL'); diff --git a/src/contracts/Repository/Values/URL/SearchResult.php b/src/contracts/Repository/Values/URL/SearchResult.php index 3d00dbcee2..6d378c3ea7 100644 --- a/src/contracts/Repository/Values/URL/SearchResult.php +++ b/src/contracts/Repository/Values/URL/SearchResult.php @@ -36,5 +36,3 @@ public function getIterator(): Traversable return new ArrayIterator($this->items); } } - -class_alias(SearchResult::class, 'eZ\Publish\API\Repository\Values\URL\SearchResult'); diff --git a/src/contracts/Repository/Values/URL/URL.php b/src/contracts/Repository/Values/URL/URL.php index a7d531b048..3febc00d4a 100644 --- a/src/contracts/Repository/Values/URL/URL.php +++ b/src/contracts/Repository/Values/URL/URL.php @@ -54,5 +54,3 @@ class URL extends ValueObject */ protected $modified; } - -class_alias(URL::class, 'eZ\Publish\API\Repository\Values\URL\URL'); diff --git a/src/contracts/Repository/Values/URL/URLQuery.php b/src/contracts/Repository/Values/URL/URLQuery.php index 9add10d0ac..1cafdf36f9 100644 --- a/src/contracts/Repository/Values/URL/URLQuery.php +++ b/src/contracts/Repository/Values/URL/URLQuery.php @@ -55,5 +55,3 @@ class URLQuery extends ValueObject */ public $performCount = true; } - -class_alias(URLQuery::class, 'eZ\Publish\API\Repository\Values\URL\URLQuery'); diff --git a/src/contracts/Repository/Values/URL/URLUpdateStruct.php b/src/contracts/Repository/Values/URL/URLUpdateStruct.php index 387bcea96b..c87946a955 100644 --- a/src/contracts/Repository/Values/URL/URLUpdateStruct.php +++ b/src/contracts/Repository/Values/URL/URLUpdateStruct.php @@ -36,5 +36,3 @@ class URLUpdateStruct extends ValueObject */ public $lastChecked; } - -class_alias(URLUpdateStruct::class, 'eZ\Publish\API\Repository\Values\URL\URLUpdateStruct'); diff --git a/src/contracts/Repository/Values/URL/UsageSearchResult.php b/src/contracts/Repository/Values/URL/UsageSearchResult.php index cd057b1bff..a7c95038af 100644 --- a/src/contracts/Repository/Values/URL/UsageSearchResult.php +++ b/src/contracts/Repository/Values/URL/UsageSearchResult.php @@ -33,5 +33,3 @@ public function getIterator(): Traversable return new ArrayIterator($this->items); } } - -class_alias(UsageSearchResult::class, 'eZ\Publish\API\Repository\Values\URL\UsageSearchResult'); diff --git a/src/contracts/Repository/Values/User/Limitation.php b/src/contracts/Repository/Values/User/Limitation.php index 236aa177a3..e7e8613241 100644 --- a/src/contracts/Repository/Values/User/Limitation.php +++ b/src/contracts/Repository/Values/User/Limitation.php @@ -51,5 +51,3 @@ abstract class Limitation extends ValueObject */ abstract public function getIdentifier(): string; } - -class_alias(Limitation::class, 'eZ\Publish\API\Repository\Values\User\Limitation'); diff --git a/src/contracts/Repository/Values/User/Limitation/BlockingLimitation.php b/src/contracts/Repository/Values/User/Limitation/BlockingLimitation.php index f97b07d13e..0fdafa2052 100644 --- a/src/contracts/Repository/Values/User/Limitation/BlockingLimitation.php +++ b/src/contracts/Repository/Values/User/Limitation/BlockingLimitation.php @@ -47,5 +47,3 @@ public function getIdentifier(): string return $this->identifier; } } - -class_alias(BlockingLimitation::class, 'eZ\Publish\API\Repository\Values\User\Limitation\BlockingLimitation'); diff --git a/src/contracts/Repository/Values/User/Limitation/ContentTypeLimitation.php b/src/contracts/Repository/Values/User/Limitation/ContentTypeLimitation.php index 4954687e14..ec38dda56c 100644 --- a/src/contracts/Repository/Values/User/Limitation/ContentTypeLimitation.php +++ b/src/contracts/Repository/Values/User/Limitation/ContentTypeLimitation.php @@ -22,5 +22,3 @@ public function getIdentifier(): string return Limitation::CONTENTTYPE; } } - -class_alias(ContentTypeLimitation::class, 'eZ\Publish\API\Repository\Values\User\Limitation\ContentTypeLimitation'); diff --git a/src/contracts/Repository/Values/User/Limitation/LanguageLimitation.php b/src/contracts/Repository/Values/User/Limitation/LanguageLimitation.php index 1e11507a62..23679c560d 100644 --- a/src/contracts/Repository/Values/User/Limitation/LanguageLimitation.php +++ b/src/contracts/Repository/Values/User/Limitation/LanguageLimitation.php @@ -22,5 +22,3 @@ public function getIdentifier(): string return Limitation::LANGUAGE; } } - -class_alias(LanguageLimitation::class, 'eZ\Publish\API\Repository\Values\User\Limitation\LanguageLimitation'); diff --git a/src/contracts/Repository/Values/User/Limitation/LocationLimitation.php b/src/contracts/Repository/Values/User/Limitation/LocationLimitation.php index 65656933f5..2de7941198 100644 --- a/src/contracts/Repository/Values/User/Limitation/LocationLimitation.php +++ b/src/contracts/Repository/Values/User/Limitation/LocationLimitation.php @@ -22,5 +22,3 @@ public function getIdentifier(): string return Limitation::LOCATION; } } - -class_alias(LocationLimitation::class, 'eZ\Publish\API\Repository\Values\User\Limitation\LocationLimitation'); diff --git a/src/contracts/Repository/Values/User/Limitation/NewObjectStateLimitation.php b/src/contracts/Repository/Values/User/Limitation/NewObjectStateLimitation.php index 9890257229..9e9e6bb856 100644 --- a/src/contracts/Repository/Values/User/Limitation/NewObjectStateLimitation.php +++ b/src/contracts/Repository/Values/User/Limitation/NewObjectStateLimitation.php @@ -22,5 +22,3 @@ public function getIdentifier(): string return Limitation::NEWSTATE; } } - -class_alias(NewObjectStateLimitation::class, 'eZ\Publish\API\Repository\Values\User\Limitation\NewObjectStateLimitation'); diff --git a/src/contracts/Repository/Values/User/Limitation/NewSectionLimitation.php b/src/contracts/Repository/Values/User/Limitation/NewSectionLimitation.php index 84d1442421..dc754438ae 100644 --- a/src/contracts/Repository/Values/User/Limitation/NewSectionLimitation.php +++ b/src/contracts/Repository/Values/User/Limitation/NewSectionLimitation.php @@ -22,5 +22,3 @@ public function getIdentifier(): string return Limitation::NEWSECTION; } } - -class_alias(NewSectionLimitation::class, 'eZ\Publish\API\Repository\Values\User\Limitation\NewSectionLimitation'); diff --git a/src/contracts/Repository/Values/User/Limitation/ObjectStateLimitation.php b/src/contracts/Repository/Values/User/Limitation/ObjectStateLimitation.php index a7ec60f88f..9b77608b41 100644 --- a/src/contracts/Repository/Values/User/Limitation/ObjectStateLimitation.php +++ b/src/contracts/Repository/Values/User/Limitation/ObjectStateLimitation.php @@ -29,5 +29,3 @@ public function getIdentifier(): string return Limitation::STATE; } } - -class_alias(ObjectStateLimitation::class, 'eZ\Publish\API\Repository\Values\User\Limitation\ObjectStateLimitation'); diff --git a/src/contracts/Repository/Values/User/Limitation/OwnerLimitation.php b/src/contracts/Repository/Values/User/Limitation/OwnerLimitation.php index 5a5c45df0f..6f1082e366 100644 --- a/src/contracts/Repository/Values/User/Limitation/OwnerLimitation.php +++ b/src/contracts/Repository/Values/User/Limitation/OwnerLimitation.php @@ -22,5 +22,3 @@ public function getIdentifier(): string return Limitation::OWNER; } } - -class_alias(OwnerLimitation::class, 'eZ\Publish\API\Repository\Values\User\Limitation\OwnerLimitation'); diff --git a/src/contracts/Repository/Values/User/Limitation/ParentContentTypeLimitation.php b/src/contracts/Repository/Values/User/Limitation/ParentContentTypeLimitation.php index b3a831e845..87e87f2b7b 100644 --- a/src/contracts/Repository/Values/User/Limitation/ParentContentTypeLimitation.php +++ b/src/contracts/Repository/Values/User/Limitation/ParentContentTypeLimitation.php @@ -22,5 +22,3 @@ public function getIdentifier(): string return Limitation::PARENTCONTENTTYPE; } } - -class_alias(ParentContentTypeLimitation::class, 'eZ\Publish\API\Repository\Values\User\Limitation\ParentContentTypeLimitation'); diff --git a/src/contracts/Repository/Values/User/Limitation/ParentDepthLimitation.php b/src/contracts/Repository/Values/User/Limitation/ParentDepthLimitation.php index 48ed56014d..8e30bf3e5d 100644 --- a/src/contracts/Repository/Values/User/Limitation/ParentDepthLimitation.php +++ b/src/contracts/Repository/Values/User/Limitation/ParentDepthLimitation.php @@ -22,5 +22,3 @@ public function getIdentifier(): string return Limitation::PARENTDEPTH; } } - -class_alias(ParentDepthLimitation::class, 'eZ\Publish\API\Repository\Values\User\Limitation\ParentDepthLimitation'); diff --git a/src/contracts/Repository/Values/User/Limitation/ParentOwnerLimitation.php b/src/contracts/Repository/Values/User/Limitation/ParentOwnerLimitation.php index 3c89c44d23..b853135e61 100644 --- a/src/contracts/Repository/Values/User/Limitation/ParentOwnerLimitation.php +++ b/src/contracts/Repository/Values/User/Limitation/ParentOwnerLimitation.php @@ -22,5 +22,3 @@ public function getIdentifier(): string return Limitation::PARENTOWNER; } } - -class_alias(ParentOwnerLimitation::class, 'eZ\Publish\API\Repository\Values\User\Limitation\ParentOwnerLimitation'); diff --git a/src/contracts/Repository/Values/User/Limitation/ParentUserGroupLimitation.php b/src/contracts/Repository/Values/User/Limitation/ParentUserGroupLimitation.php index 967ab79c77..1968e9f965 100644 --- a/src/contracts/Repository/Values/User/Limitation/ParentUserGroupLimitation.php +++ b/src/contracts/Repository/Values/User/Limitation/ParentUserGroupLimitation.php @@ -22,5 +22,3 @@ public function getIdentifier(): string return Limitation::PARENTUSERGROUP; } } - -class_alias(ParentUserGroupLimitation::class, 'eZ\Publish\API\Repository\Values\User\Limitation\ParentUserGroupLimitation'); diff --git a/src/contracts/Repository/Values/User/Limitation/RoleLimitation.php b/src/contracts/Repository/Values/User/Limitation/RoleLimitation.php index 5730fd3ca0..7d104186e4 100644 --- a/src/contracts/Repository/Values/User/Limitation/RoleLimitation.php +++ b/src/contracts/Repository/Values/User/Limitation/RoleLimitation.php @@ -13,5 +13,3 @@ abstract class RoleLimitation extends Limitation { } - -class_alias(RoleLimitation::class, 'eZ\Publish\API\Repository\Values\User\Limitation\RoleLimitation'); diff --git a/src/contracts/Repository/Values/User/Limitation/SectionLimitation.php b/src/contracts/Repository/Values/User/Limitation/SectionLimitation.php index 6deb5f5707..23e80a5a75 100644 --- a/src/contracts/Repository/Values/User/Limitation/SectionLimitation.php +++ b/src/contracts/Repository/Values/User/Limitation/SectionLimitation.php @@ -22,5 +22,3 @@ public function getIdentifier(): string return Limitation::SECTION; } } - -class_alias(SectionLimitation::class, 'eZ\Publish\API\Repository\Values\User\Limitation\SectionLimitation'); diff --git a/src/contracts/Repository/Values/User/Limitation/SiteAccessLimitation.php b/src/contracts/Repository/Values/User/Limitation/SiteAccessLimitation.php index e8559ab88e..016cd52b88 100644 --- a/src/contracts/Repository/Values/User/Limitation/SiteAccessLimitation.php +++ b/src/contracts/Repository/Values/User/Limitation/SiteAccessLimitation.php @@ -22,5 +22,3 @@ public function getIdentifier(): string return Limitation::SITEACCESS; } } - -class_alias(SiteAccessLimitation::class, 'eZ\Publish\API\Repository\Values\User\Limitation\SiteAccessLimitation'); diff --git a/src/contracts/Repository/Values/User/Limitation/StatusLimitation.php b/src/contracts/Repository/Values/User/Limitation/StatusLimitation.php index 4de32a1b5c..86dcbe397d 100644 --- a/src/contracts/Repository/Values/User/Limitation/StatusLimitation.php +++ b/src/contracts/Repository/Values/User/Limitation/StatusLimitation.php @@ -25,5 +25,3 @@ public function getIdentifier(): string return Limitation::STATUS; } } - -class_alias(StatusLimitation::class, 'eZ\Publish\API\Repository\Values\User\Limitation\StatusLimitation'); diff --git a/src/contracts/Repository/Values/User/Limitation/SubtreeLimitation.php b/src/contracts/Repository/Values/User/Limitation/SubtreeLimitation.php index a8b6df21a0..e7a62362e7 100644 --- a/src/contracts/Repository/Values/User/Limitation/SubtreeLimitation.php +++ b/src/contracts/Repository/Values/User/Limitation/SubtreeLimitation.php @@ -22,5 +22,3 @@ public function getIdentifier(): string return Limitation::SUBTREE; } } - -class_alias(SubtreeLimitation::class, 'eZ\Publish\API\Repository\Values\User\Limitation\SubtreeLimitation'); diff --git a/src/contracts/Repository/Values/User/Limitation/UserGroupLimitation.php b/src/contracts/Repository/Values/User/Limitation/UserGroupLimitation.php index d6c666bb43..b6ed586dca 100644 --- a/src/contracts/Repository/Values/User/Limitation/UserGroupLimitation.php +++ b/src/contracts/Repository/Values/User/Limitation/UserGroupLimitation.php @@ -22,5 +22,3 @@ public function getIdentifier(): string return Limitation::USERGROUP; } } - -class_alias(UserGroupLimitation::class, 'eZ\Publish\API\Repository\Values\User\Limitation\UserGroupLimitation'); diff --git a/src/contracts/Repository/Values/User/LookupLimitationResult.php b/src/contracts/Repository/Values/User/LookupLimitationResult.php index 4e27a7c1f6..452c374f23 100644 --- a/src/contracts/Repository/Values/User/LookupLimitationResult.php +++ b/src/contracts/Repository/Values/User/LookupLimitationResult.php @@ -61,5 +61,3 @@ public function getLookupPolicyLimitations(): array return $this->lookupPolicyLimitations; } } - -class_alias(LookupLimitationResult::class, 'eZ\Publish\API\Repository\Values\User\LookupLimitationResult'); diff --git a/src/contracts/Repository/Values/User/LookupPolicyLimitations.php b/src/contracts/Repository/Values/User/LookupPolicyLimitations.php index cc221d0fcc..1b1dbd4955 100644 --- a/src/contracts/Repository/Values/User/LookupPolicyLimitations.php +++ b/src/contracts/Repository/Values/User/LookupPolicyLimitations.php @@ -33,5 +33,3 @@ public function __construct(Policy $policy, array $limitations = []) $this->limitations = $limitations; } } - -class_alias(LookupPolicyLimitations::class, 'eZ\Publish\API\Repository\Values\User\LookupPolicyLimitations'); diff --git a/src/contracts/Repository/Values/User/PasswordInfo.php b/src/contracts/Repository/Values/User/PasswordInfo.php index d1207053ec..17c3f34e07 100644 --- a/src/contracts/Repository/Values/User/PasswordInfo.php +++ b/src/contracts/Repository/Values/User/PasswordInfo.php @@ -55,5 +55,3 @@ public function getExpirationWarningDate(): ?DateTimeImmutable return $this->expirationWarningDate; } } - -class_alias(PasswordInfo::class, 'eZ\Publish\API\Repository\Values\User\PasswordInfo'); diff --git a/src/contracts/Repository/Values/User/PasswordValidationContext.php b/src/contracts/Repository/Values/User/PasswordValidationContext.php index de81c4ca0c..0462188deb 100644 --- a/src/contracts/Repository/Values/User/PasswordValidationContext.php +++ b/src/contracts/Repository/Values/User/PasswordValidationContext.php @@ -32,5 +32,3 @@ class PasswordValidationContext extends ValueObject */ protected $user; } - -class_alias(PasswordValidationContext::class, 'eZ\Publish\API\Repository\Values\User\PasswordValidationContext'); diff --git a/src/contracts/Repository/Values/User/Policy.php b/src/contracts/Repository/Values/User/Policy.php index 04c4be5d5a..8279fa6761 100644 --- a/src/contracts/Repository/Values/User/Policy.php +++ b/src/contracts/Repository/Values/User/Policy.php @@ -58,5 +58,3 @@ abstract class Policy extends ValueObject */ abstract public function getLimitations(): iterable; } - -class_alias(Policy::class, 'eZ\Publish\API\Repository\Values\User\Policy'); diff --git a/src/contracts/Repository/Values/User/PolicyCreateStruct.php b/src/contracts/Repository/Values/User/PolicyCreateStruct.php index c79889626e..1f2b92611c 100644 --- a/src/contracts/Repository/Values/User/PolicyCreateStruct.php +++ b/src/contracts/Repository/Values/User/PolicyCreateStruct.php @@ -31,5 +31,3 @@ abstract class PolicyCreateStruct extends PolicyStruct */ public $function; } - -class_alias(PolicyCreateStruct::class, 'eZ\Publish\API\Repository\Values\User\PolicyCreateStruct'); diff --git a/src/contracts/Repository/Values/User/PolicyDraft.php b/src/contracts/Repository/Values/User/PolicyDraft.php index 07ed29b794..96c4c02376 100644 --- a/src/contracts/Repository/Values/User/PolicyDraft.php +++ b/src/contracts/Repository/Values/User/PolicyDraft.php @@ -21,5 +21,3 @@ abstract class PolicyDraft extends Policy */ protected $originalId; } - -class_alias(PolicyDraft::class, 'eZ\Publish\API\Repository\Values\User\PolicyDraft'); diff --git a/src/contracts/Repository/Values/User/PolicyStruct.php b/src/contracts/Repository/Values/User/PolicyStruct.php index 9201b68187..3b83cd7091 100644 --- a/src/contracts/Repository/Values/User/PolicyStruct.php +++ b/src/contracts/Repository/Values/User/PolicyStruct.php @@ -26,5 +26,3 @@ abstract public function getLimitations(): iterable; */ abstract public function addLimitation(Limitation $limitation): void; } - -class_alias(PolicyStruct::class, 'eZ\Publish\API\Repository\Values\User\PolicyStruct'); diff --git a/src/contracts/Repository/Values/User/PolicyUpdateStruct.php b/src/contracts/Repository/Values/User/PolicyUpdateStruct.php index 24e1cc4692..063e5848f4 100644 --- a/src/contracts/Repository/Values/User/PolicyUpdateStruct.php +++ b/src/contracts/Repository/Values/User/PolicyUpdateStruct.php @@ -15,5 +15,3 @@ abstract class PolicyUpdateStruct extends PolicyStruct { } - -class_alias(PolicyUpdateStruct::class, 'eZ\Publish\API\Repository\Values\User\PolicyUpdateStruct'); diff --git a/src/contracts/Repository/Values/User/Role.php b/src/contracts/Repository/Values/User/Role.php index 5bee6ba5fb..08dc08901d 100644 --- a/src/contracts/Repository/Values/User/Role.php +++ b/src/contracts/Repository/Values/User/Role.php @@ -59,5 +59,3 @@ public function getStatus(): int */ abstract public function getPolicies(): iterable; } - -class_alias(Role::class, 'eZ\Publish\API\Repository\Values\User\Role'); diff --git a/src/contracts/Repository/Values/User/RoleAssignment.php b/src/contracts/Repository/Values/User/RoleAssignment.php index 47082d5328..0be7d10268 100644 --- a/src/contracts/Repository/Values/User/RoleAssignment.php +++ b/src/contracts/Repository/Values/User/RoleAssignment.php @@ -45,5 +45,3 @@ abstract public function getRoleLimitation(): ?RoleLimitation; */ abstract public function getRole(): Role; } - -class_alias(RoleAssignment::class, 'eZ\Publish\API\Repository\Values\User\RoleAssignment'); diff --git a/src/contracts/Repository/Values/User/RoleCopyStruct.php b/src/contracts/Repository/Values/User/RoleCopyStruct.php index 8ea1fb7e36..5643bfde8c 100644 --- a/src/contracts/Repository/Values/User/RoleCopyStruct.php +++ b/src/contracts/Repository/Values/User/RoleCopyStruct.php @@ -27,5 +27,3 @@ abstract class RoleCopyStruct extends RoleCreateStruct */ public $status; } - -class_alias(RoleCopyStruct::class, 'eZ\Publish\API\Repository\Values\User\RoleCopyStruct'); diff --git a/src/contracts/Repository/Values/User/RoleCreateStruct.php b/src/contracts/Repository/Values/User/RoleCreateStruct.php index 028f0f345b..036a34261b 100644 --- a/src/contracts/Repository/Values/User/RoleCreateStruct.php +++ b/src/contracts/Repository/Values/User/RoleCreateStruct.php @@ -36,5 +36,3 @@ abstract public function getPolicies(): iterable; */ abstract public function addPolicy(PolicyCreateStruct $policyCreateStruct): void; } - -class_alias(RoleCreateStruct::class, 'eZ\Publish\API\Repository\Values\User\RoleCreateStruct'); diff --git a/src/contracts/Repository/Values/User/RoleDraft.php b/src/contracts/Repository/Values/User/RoleDraft.php index 0ffdaccb50..0f285b3066 100644 --- a/src/contracts/Repository/Values/User/RoleDraft.php +++ b/src/contracts/Repository/Values/User/RoleDraft.php @@ -16,5 +16,3 @@ abstract class RoleDraft extends Role { } - -class_alias(RoleDraft::class, 'eZ\Publish\API\Repository\Values\User\RoleDraft'); diff --git a/src/contracts/Repository/Values/User/RoleUpdateStruct.php b/src/contracts/Repository/Values/User/RoleUpdateStruct.php index 0233c939aa..a65bcd8d39 100644 --- a/src/contracts/Repository/Values/User/RoleUpdateStruct.php +++ b/src/contracts/Repository/Values/User/RoleUpdateStruct.php @@ -22,5 +22,3 @@ class RoleUpdateStruct extends ValueObject */ public $identifier; } - -class_alias(RoleUpdateStruct::class, 'eZ\Publish\API\Repository\Values\User\RoleUpdateStruct'); diff --git a/src/contracts/Repository/Values/User/User.php b/src/contracts/Repository/Values/User/User.php index c3dff9d2f9..37de429c59 100644 --- a/src/contracts/Repository/Values/User/User.php +++ b/src/contracts/Repository/Values/User/User.php @@ -108,5 +108,3 @@ public function getPasswordHash(): string return $this->passwordHash; } } - -class_alias(User::class, 'eZ\Publish\API\Repository\Values\User\User'); diff --git a/src/contracts/Repository/Values/User/UserCreateStruct.php b/src/contracts/Repository/Values/User/UserCreateStruct.php index e8fed34f45..f9f015c2b2 100644 --- a/src/contracts/Repository/Values/User/UserCreateStruct.php +++ b/src/contracts/Repository/Values/User/UserCreateStruct.php @@ -49,5 +49,3 @@ abstract class UserCreateStruct extends ContentCreateStruct */ public $enabled = true; } - -class_alias(UserCreateStruct::class, 'eZ\Publish\API\Repository\Values\User\UserCreateStruct'); diff --git a/src/contracts/Repository/Values/User/UserGroup.php b/src/contracts/Repository/Values/User/UserGroup.php index f04be77fc1..d2498f20b4 100644 --- a/src/contracts/Repository/Values/User/UserGroup.php +++ b/src/contracts/Repository/Values/User/UserGroup.php @@ -24,5 +24,3 @@ abstract class UserGroup extends Content */ protected $parentId; } - -class_alias(UserGroup::class, 'eZ\Publish\API\Repository\Values\User\UserGroup'); diff --git a/src/contracts/Repository/Values/User/UserGroupCreateStruct.php b/src/contracts/Repository/Values/User/UserGroupCreateStruct.php index 950c3e97fc..149a93d328 100644 --- a/src/contracts/Repository/Values/User/UserGroupCreateStruct.php +++ b/src/contracts/Repository/Values/User/UserGroupCreateStruct.php @@ -16,5 +16,3 @@ abstract class UserGroupCreateStruct extends ContentCreateStruct { } - -class_alias(UserGroupCreateStruct::class, 'eZ\Publish\API\Repository\Values\User\UserGroupCreateStruct'); diff --git a/src/contracts/Repository/Values/User/UserGroupRoleAssignment.php b/src/contracts/Repository/Values/User/UserGroupRoleAssignment.php index 9377f8f007..47cbeaa747 100644 --- a/src/contracts/Repository/Values/User/UserGroupRoleAssignment.php +++ b/src/contracts/Repository/Values/User/UserGroupRoleAssignment.php @@ -22,5 +22,3 @@ abstract class UserGroupRoleAssignment extends RoleAssignment */ abstract public function getUserGroup(): UserGroup; } - -class_alias(UserGroupRoleAssignment::class, 'eZ\Publish\API\Repository\Values\User\UserGroupRoleAssignment'); diff --git a/src/contracts/Repository/Values/User/UserGroupUpdateStruct.php b/src/contracts/Repository/Values/User/UserGroupUpdateStruct.php index 80417b75e3..3c56e1f344 100644 --- a/src/contracts/Repository/Values/User/UserGroupUpdateStruct.php +++ b/src/contracts/Repository/Values/User/UserGroupUpdateStruct.php @@ -29,5 +29,3 @@ class UserGroupUpdateStruct extends ValueObject */ public $contentMetadataUpdateStruct = null; } - -class_alias(UserGroupUpdateStruct::class, 'eZ\Publish\API\Repository\Values\User\UserGroupUpdateStruct'); diff --git a/src/contracts/Repository/Values/User/UserReference.php b/src/contracts/Repository/Values/User/UserReference.php index cb0b4b941f..e3ef6b6565 100644 --- a/src/contracts/Repository/Values/User/UserReference.php +++ b/src/contracts/Repository/Values/User/UserReference.php @@ -20,5 +20,3 @@ interface UserReference */ public function getUserId(): int; } - -class_alias(UserReference::class, 'eZ\Publish\API\Repository\Values\User\UserReference'); diff --git a/src/contracts/Repository/Values/User/UserRoleAssignment.php b/src/contracts/Repository/Values/User/UserRoleAssignment.php index c54f7aeaf8..b8fcb3840b 100644 --- a/src/contracts/Repository/Values/User/UserRoleAssignment.php +++ b/src/contracts/Repository/Values/User/UserRoleAssignment.php @@ -22,5 +22,3 @@ abstract class UserRoleAssignment extends RoleAssignment */ abstract public function getUser(): User; } - -class_alias(UserRoleAssignment::class, 'eZ\Publish\API\Repository\Values\User\UserRoleAssignment'); diff --git a/src/contracts/Repository/Values/User/UserTokenUpdateStruct.php b/src/contracts/Repository/Values/User/UserTokenUpdateStruct.php index 1d76f90166..e64e640ce6 100644 --- a/src/contracts/Repository/Values/User/UserTokenUpdateStruct.php +++ b/src/contracts/Repository/Values/User/UserTokenUpdateStruct.php @@ -29,5 +29,3 @@ class UserTokenUpdateStruct extends ValueObject */ public $time; } - -class_alias(UserTokenUpdateStruct::class, 'eZ\Publish\API\Repository\Values\User\UserTokenUpdateStruct'); diff --git a/src/contracts/Repository/Values/User/UserUpdateStruct.php b/src/contracts/Repository/Values/User/UserUpdateStruct.php index 37c6839aed..461daea7b3 100644 --- a/src/contracts/Repository/Values/User/UserUpdateStruct.php +++ b/src/contracts/Repository/Values/User/UserUpdateStruct.php @@ -59,5 +59,3 @@ class UserUpdateStruct extends ValueObject */ public $contentMetadataUpdateStruct = null; } - -class_alias(UserUpdateStruct::class, 'eZ\Publish\API\Repository\Values\User\UserUpdateStruct'); diff --git a/src/contracts/Repository/Values/UserPreference/UserPreference.php b/src/contracts/Repository/Values/UserPreference/UserPreference.php index a3c6bb3f6c..cb9f661c4a 100644 --- a/src/contracts/Repository/Values/UserPreference/UserPreference.php +++ b/src/contracts/Repository/Values/UserPreference/UserPreference.php @@ -36,5 +36,3 @@ class UserPreference extends ValueObject */ protected $value; } - -class_alias(UserPreference::class, 'eZ\Publish\API\Repository\Values\UserPreference\UserPreference'); diff --git a/src/contracts/Repository/Values/UserPreference/UserPreferenceList.php b/src/contracts/Repository/Values/UserPreference/UserPreferenceList.php index 9dc17cfde7..2ce431da56 100644 --- a/src/contracts/Repository/Values/UserPreference/UserPreferenceList.php +++ b/src/contracts/Repository/Values/UserPreference/UserPreferenceList.php @@ -39,5 +39,3 @@ public function getIterator(): \Traversable return new ArrayIterator($this->items); } } - -class_alias(UserPreferenceList::class, 'eZ\Publish\API\Repository\Values\UserPreference\UserPreferenceList'); diff --git a/src/contracts/Repository/Values/UserPreference/UserPreferenceSetStruct.php b/src/contracts/Repository/Values/UserPreference/UserPreferenceSetStruct.php index 29791faa22..8af5c24149 100644 --- a/src/contracts/Repository/Values/UserPreference/UserPreferenceSetStruct.php +++ b/src/contracts/Repository/Values/UserPreference/UserPreferenceSetStruct.php @@ -18,5 +18,3 @@ class UserPreferenceSetStruct extends ValueObject /** @var string */ public $value; } - -class_alias(UserPreferenceSetStruct::class, 'eZ\Publish\API\Repository\Values\UserPreference\UserPreferenceSetStruct'); diff --git a/src/contracts/Repository/Values/ValueObject.php b/src/contracts/Repository/Values/ValueObject.php index 40195ed9e9..397db54052 100644 --- a/src/contracts/Repository/Values/ValueObject.php +++ b/src/contracts/Repository/Values/ValueObject.php @@ -208,5 +208,3 @@ final public function hasAttribute($property) return $this->__isset($property); } } - -class_alias(ValueObject::class, 'eZ\Publish\API\Repository\Values\ValueObject'); diff --git a/src/contracts/Search/Capable.php b/src/contracts/Search/Capable.php index a6504d9595..df1bdaf0a6 100644 --- a/src/contracts/Search/Capable.php +++ b/src/contracts/Search/Capable.php @@ -24,5 +24,3 @@ interface Capable */ public function supports(int $capabilityFlag): bool; } - -class_alias(Capable::class, 'eZ\Publish\SPI\Search\Capable'); diff --git a/src/contracts/Search/Content/IndexerGateway.php b/src/contracts/Search/Content/IndexerGateway.php index 8310154a9a..95f0745176 100644 --- a/src/contracts/Search/Content/IndexerGateway.php +++ b/src/contracts/Search/Content/IndexerGateway.php @@ -52,5 +52,3 @@ public function getAllContent(int $iterationCount): Generator; */ public function countAllContent(): int; } - -class_alias(IndexerGateway::class, 'eZ\Publish\SPI\Search\Content\IndexerGateway'); diff --git a/src/contracts/Search/ContentTranslationHandler.php b/src/contracts/Search/ContentTranslationHandler.php index 54e7af32af..4cfac4c2bd 100644 --- a/src/contracts/Search/ContentTranslationHandler.php +++ b/src/contracts/Search/ContentTranslationHandler.php @@ -18,5 +18,3 @@ interface ContentTranslationHandler */ public function deleteTranslation(int $contentId, string $languageCode): void; } - -class_alias(ContentTranslationHandler::class, 'eZ\Publish\SPI\Search\ContentTranslationHandler'); diff --git a/src/contracts/Search/Document.php b/src/contracts/Search/Document.php index 3203d26aca..7defb40afd 100644 --- a/src/contracts/Search/Document.php +++ b/src/contracts/Search/Document.php @@ -57,5 +57,3 @@ class Document extends ValueObject */ public $documents = []; } - -class_alias(Document::class, 'eZ\Publish\SPI\Search\Document'); diff --git a/src/contracts/Search/Field.php b/src/contracts/Search/Field.php index 1d0c84a66c..b3a154c5b3 100644 --- a/src/contracts/Search/Field.php +++ b/src/contracts/Search/Field.php @@ -72,5 +72,3 @@ public function getType(): FieldType return $this->type; } } - -class_alias(Field::class, 'eZ\Publish\SPI\Search\Field'); diff --git a/src/contracts/Search/FieldType.php b/src/contracts/Search/FieldType.php index c8bb88c0c2..8ecb86a36c 100644 --- a/src/contracts/Search/FieldType.php +++ b/src/contracts/Search/FieldType.php @@ -63,5 +63,3 @@ public function getType(): string return $this->type; } } - -class_alias(FieldType::class, 'eZ\Publish\SPI\Search\FieldType'); diff --git a/src/contracts/Search/FieldType/BooleanField.php b/src/contracts/Search/FieldType/BooleanField.php index cb82ef1e62..49c7c01754 100644 --- a/src/contracts/Search/FieldType/BooleanField.php +++ b/src/contracts/Search/FieldType/BooleanField.php @@ -21,5 +21,3 @@ class BooleanField extends FieldType */ protected $type = 'ez_boolean'; } - -class_alias(BooleanField::class, 'eZ\Publish\SPI\Search\FieldType\BooleanField'); diff --git a/src/contracts/Search/FieldType/CustomField.php b/src/contracts/Search/FieldType/CustomField.php index 42258e9eff..0f75c09aad 100644 --- a/src/contracts/Search/FieldType/CustomField.php +++ b/src/contracts/Search/FieldType/CustomField.php @@ -21,5 +21,3 @@ class CustomField extends FieldType */ public $type; } - -class_alias(CustomField::class, 'eZ\Publish\SPI\Search\FieldType\CustomField'); diff --git a/src/contracts/Search/FieldType/DateField.php b/src/contracts/Search/FieldType/DateField.php index dca1601225..07da212fec 100644 --- a/src/contracts/Search/FieldType/DateField.php +++ b/src/contracts/Search/FieldType/DateField.php @@ -21,5 +21,3 @@ class DateField extends FieldType */ protected $type = 'ez_date'; } - -class_alias(DateField::class, 'eZ\Publish\SPI\Search\FieldType\DateField'); diff --git a/src/contracts/Search/FieldType/DocumentField.php b/src/contracts/Search/FieldType/DocumentField.php index 23c79fcc0a..a98a959d74 100644 --- a/src/contracts/Search/FieldType/DocumentField.php +++ b/src/contracts/Search/FieldType/DocumentField.php @@ -21,5 +21,3 @@ class DocumentField extends FieldType */ protected $type = 'ez_document'; } - -class_alias(DocumentField::class, 'eZ\Publish\SPI\Search\FieldType\DocumentField'); diff --git a/src/contracts/Search/FieldType/FloatField.php b/src/contracts/Search/FieldType/FloatField.php index 8bef513295..baa2ee802e 100644 --- a/src/contracts/Search/FieldType/FloatField.php +++ b/src/contracts/Search/FieldType/FloatField.php @@ -21,5 +21,3 @@ class FloatField extends FieldType */ protected $type = 'ez_float'; } - -class_alias(FloatField::class, 'eZ\Publish\SPI\Search\FieldType\FloatField'); diff --git a/src/contracts/Search/FieldType/FullTextField.php b/src/contracts/Search/FieldType/FullTextField.php index 28fc3f8216..1654c9ab66 100644 --- a/src/contracts/Search/FieldType/FullTextField.php +++ b/src/contracts/Search/FieldType/FullTextField.php @@ -43,5 +43,3 @@ public function __construct(array $transformationRules = [], bool $splitFlag = t parent::__construct(); } } - -class_alias(FullTextField::class, 'eZ\Publish\SPI\Search\FieldType\FullTextField'); diff --git a/src/contracts/Search/FieldType/GeoLocationField.php b/src/contracts/Search/FieldType/GeoLocationField.php index afa1ec080e..67622749a2 100644 --- a/src/contracts/Search/FieldType/GeoLocationField.php +++ b/src/contracts/Search/FieldType/GeoLocationField.php @@ -21,5 +21,3 @@ class GeoLocationField extends FieldType */ protected $type = 'ez_geolocation'; } - -class_alias(GeoLocationField::class, 'eZ\Publish\SPI\Search\FieldType\GeoLocationField'); diff --git a/src/contracts/Search/FieldType/IdentifierField.php b/src/contracts/Search/FieldType/IdentifierField.php index 341536806a..b74a08cd13 100644 --- a/src/contracts/Search/FieldType/IdentifierField.php +++ b/src/contracts/Search/FieldType/IdentifierField.php @@ -28,5 +28,3 @@ class IdentifierField extends FieldType */ protected $raw = false; } - -class_alias(IdentifierField::class, 'eZ\Publish\SPI\Search\FieldType\IdentifierField'); diff --git a/src/contracts/Search/FieldType/IntegerField.php b/src/contracts/Search/FieldType/IntegerField.php index acafba82b1..cf2a562c6f 100644 --- a/src/contracts/Search/FieldType/IntegerField.php +++ b/src/contracts/Search/FieldType/IntegerField.php @@ -21,5 +21,3 @@ class IntegerField extends FieldType */ protected $type = 'ez_integer'; } - -class_alias(IntegerField::class, 'eZ\Publish\SPI\Search\FieldType\IntegerField'); diff --git a/src/contracts/Search/FieldType/MultipleBooleanField.php b/src/contracts/Search/FieldType/MultipleBooleanField.php index ae48b4582d..3ebf9ff4d7 100644 --- a/src/contracts/Search/FieldType/MultipleBooleanField.php +++ b/src/contracts/Search/FieldType/MultipleBooleanField.php @@ -21,5 +21,3 @@ class MultipleBooleanField extends FieldType */ protected $type = 'ez_mboolean'; } - -class_alias(MultipleBooleanField::class, 'eZ\Publish\SPI\Search\FieldType\MultipleBooleanField'); diff --git a/src/contracts/Search/FieldType/MultipleIdentifierField.php b/src/contracts/Search/FieldType/MultipleIdentifierField.php index 55c4ca8d54..b9d0d45b7e 100644 --- a/src/contracts/Search/FieldType/MultipleIdentifierField.php +++ b/src/contracts/Search/FieldType/MultipleIdentifierField.php @@ -28,5 +28,3 @@ class MultipleIdentifierField extends FieldType */ protected $raw = false; } - -class_alias(MultipleIdentifierField::class, 'eZ\Publish\SPI\Search\FieldType\MultipleIdentifierField'); diff --git a/src/contracts/Search/FieldType/MultipleIntegerField.php b/src/contracts/Search/FieldType/MultipleIntegerField.php index 2430b70850..bd2c515f0f 100644 --- a/src/contracts/Search/FieldType/MultipleIntegerField.php +++ b/src/contracts/Search/FieldType/MultipleIntegerField.php @@ -21,5 +21,3 @@ class MultipleIntegerField extends FieldType */ protected $type = 'ez_minteger'; } - -class_alias(MultipleIntegerField::class, 'eZ\Publish\SPI\Search\FieldType\MultipleIntegerField'); diff --git a/src/contracts/Search/FieldType/MultipleRemoteIdentifierField.php b/src/contracts/Search/FieldType/MultipleRemoteIdentifierField.php index c2ae1e4e58..2449c10e16 100644 --- a/src/contracts/Search/FieldType/MultipleRemoteIdentifierField.php +++ b/src/contracts/Search/FieldType/MultipleRemoteIdentifierField.php @@ -23,5 +23,3 @@ class MultipleRemoteIdentifierField extends FieldType */ protected $type = 'ez_mid'; } - -class_alias(MultipleRemoteIdentifierField::class, 'eZ\Publish\SPI\Search\FieldType\MultipleRemoteIdentifierField'); diff --git a/src/contracts/Search/FieldType/MultipleStringField.php b/src/contracts/Search/FieldType/MultipleStringField.php index 04a7f5de5f..3f986d6b84 100644 --- a/src/contracts/Search/FieldType/MultipleStringField.php +++ b/src/contracts/Search/FieldType/MultipleStringField.php @@ -21,5 +21,3 @@ class MultipleStringField extends FieldType */ protected $type = 'ez_mstring'; } - -class_alias(MultipleStringField::class, 'eZ\Publish\SPI\Search\FieldType\MultipleStringField'); diff --git a/src/contracts/Search/FieldType/PriceField.php b/src/contracts/Search/FieldType/PriceField.php index 7bc53b1d76..f5b7f5b87a 100644 --- a/src/contracts/Search/FieldType/PriceField.php +++ b/src/contracts/Search/FieldType/PriceField.php @@ -21,5 +21,3 @@ class PriceField extends FieldType */ protected $type = 'ez_currency'; } - -class_alias(PriceField::class, 'eZ\Publish\SPI\Search\FieldType\PriceField'); diff --git a/src/contracts/Search/FieldType/RemoteIdentifierField.php b/src/contracts/Search/FieldType/RemoteIdentifierField.php index 9f9d74f320..8774e2e718 100644 --- a/src/contracts/Search/FieldType/RemoteIdentifierField.php +++ b/src/contracts/Search/FieldType/RemoteIdentifierField.php @@ -23,5 +23,3 @@ final class RemoteIdentifierField extends FieldType */ protected $type = 'ez_id'; } - -class_alias(RemoteIdentifierField::class, 'eZ\Publish\SPI\Search\FieldType\RemoteIdentifierField'); diff --git a/src/contracts/Search/FieldType/StringField.php b/src/contracts/Search/FieldType/StringField.php index 2bfd2f8a7e..73cf31acc1 100644 --- a/src/contracts/Search/FieldType/StringField.php +++ b/src/contracts/Search/FieldType/StringField.php @@ -21,5 +21,3 @@ class StringField extends FieldType */ protected $type = 'ez_string'; } - -class_alias(StringField::class, 'eZ\Publish\SPI\Search\FieldType\StringField'); diff --git a/src/contracts/Search/FieldType/TextField.php b/src/contracts/Search/FieldType/TextField.php index 7a9853d033..37b51fc750 100644 --- a/src/contracts/Search/FieldType/TextField.php +++ b/src/contracts/Search/FieldType/TextField.php @@ -21,5 +21,3 @@ class TextField extends FieldType */ protected $type = 'ez_text'; } - -class_alias(TextField::class, 'eZ\Publish\SPI\Search\FieldType\TextField'); diff --git a/src/contracts/Search/Handler.php b/src/contracts/Search/Handler.php index bfd390f14b..d15eec6540 100644 --- a/src/contracts/Search/Handler.php +++ b/src/contracts/Search/Handler.php @@ -109,5 +109,3 @@ public function deleteLocation($locationId, $contentId); */ public function purgeIndex(); } - -class_alias(Handler::class, 'eZ\Publish\SPI\Search\Handler'); diff --git a/src/contracts/Search/VersatileHandler.php b/src/contracts/Search/VersatileHandler.php index 6b5a09ed6e..2a9b37e0f3 100644 --- a/src/contracts/Search/VersatileHandler.php +++ b/src/contracts/Search/VersatileHandler.php @@ -17,5 +17,3 @@ interface VersatileHandler extends Handler, Capable, ContentTranslationHandler { } - -class_alias(VersatileHandler::class, 'eZ\Publish\SPI\Search\VersatileHandler'); diff --git a/src/contracts/SiteAccess/ConfigProcessor.php b/src/contracts/SiteAccess/ConfigProcessor.php index b9fb8cda8a..2338a39f3b 100644 --- a/src/contracts/SiteAccess/ConfigProcessor.php +++ b/src/contracts/SiteAccess/ConfigProcessor.php @@ -17,5 +17,3 @@ public function processComplexSetting(string $setting): string; public function processSettingValue(string $value): string; } - -class_alias(ConfigProcessor::class, 'eZ\Publish\SPI\SiteAccess\ConfigProcessor'); diff --git a/src/contracts/SiteAccess/ConfigResolverInterface.php b/src/contracts/SiteAccess/ConfigResolverInterface.php index a478c54e48..cd3ffc56a2 100644 --- a/src/contracts/SiteAccess/ConfigResolverInterface.php +++ b/src/contracts/SiteAccess/ConfigResolverInterface.php @@ -48,5 +48,3 @@ public function setDefaultNamespace(string $defaultNamespace): void; */ public function getDefaultNamespace(): string; } - -class_alias(ConfigResolverInterface::class, 'eZ\Publish\Core\MVC\ConfigResolverInterface'); diff --git a/src/contracts/Specification/Content/ContentContainerSpecification.php b/src/contracts/Specification/Content/ContentContainerSpecification.php index be23125afe..59cb4c03e5 100644 --- a/src/contracts/Specification/Content/ContentContainerSpecification.php +++ b/src/contracts/Specification/Content/ContentContainerSpecification.php @@ -17,5 +17,3 @@ public function isSatisfiedBy(Content $content): bool return $content->getContentType()->isContainer; } } - -class_alias(ContentContainerSpecification::class, 'eZ\Publish\SPI\Specification\Content\ContentContainerSpecification'); diff --git a/src/contracts/Specification/Content/ContentSpecification.php b/src/contracts/Specification/Content/ContentSpecification.php index 1443d685c3..415d3c79c2 100644 --- a/src/contracts/Specification/Content/ContentSpecification.php +++ b/src/contracts/Specification/Content/ContentSpecification.php @@ -14,5 +14,3 @@ interface ContentSpecification { public function isSatisfiedBy(Content $content): bool; } - -class_alias(ContentSpecification::class, 'eZ\Publish\SPI\Specification\Content\ContentSpecification'); diff --git a/src/contracts/Specification/Content/ContentTypeSpecification.php b/src/contracts/Specification/Content/ContentTypeSpecification.php index d3548f04ce..e29909ae01 100644 --- a/src/contracts/Specification/Content/ContentTypeSpecification.php +++ b/src/contracts/Specification/Content/ContentTypeSpecification.php @@ -27,5 +27,3 @@ public function isSatisfiedBy(Content $content): bool return $content->getContentType()->identifier === $this->expectedType; } } - -class_alias(ContentTypeSpecification::class, 'eZ\Publish\SPI\Specification\Content\ContentTypeSpecification'); diff --git a/src/contracts/Test/Persistence/Fixture.php b/src/contracts/Test/Persistence/Fixture.php index 2c71018a32..0f6aebac7b 100644 --- a/src/contracts/Test/Persistence/Fixture.php +++ b/src/contracts/Test/Persistence/Fixture.php @@ -22,5 +22,3 @@ interface Fixture */ public function load(): array; } - -class_alias(Fixture::class, 'eZ\Publish\SPI\Tests\Persistence\Fixture'); diff --git a/src/contracts/Test/Persistence/Fixture/BaseInMemoryCachedFileFixture.php b/src/contracts/Test/Persistence/Fixture/BaseInMemoryCachedFileFixture.php index 2a60192d5c..585766d473 100644 --- a/src/contracts/Test/Persistence/Fixture/BaseInMemoryCachedFileFixture.php +++ b/src/contracts/Test/Persistence/Fixture/BaseInMemoryCachedFileFixture.php @@ -52,5 +52,3 @@ final public function load(): array return self::$inMemoryCachedLoadedData[$this->filePath] ?? []; } } - -class_alias(BaseInMemoryCachedFileFixture::class, 'eZ\Publish\SPI\Tests\Persistence\BaseInMemoryCachedFileFixture'); diff --git a/src/contracts/Test/Persistence/Fixture/FileFixtureFactory.php b/src/contracts/Test/Persistence/Fixture/FileFixtureFactory.php index 5a66b13e3d..1e7b85d5cd 100644 --- a/src/contracts/Test/Persistence/Fixture/FileFixtureFactory.php +++ b/src/contracts/Test/Persistence/Fixture/FileFixtureFactory.php @@ -35,5 +35,3 @@ public function buildFixture(string $filePath): Fixture } } } - -class_alias(FileFixtureFactory::class, 'eZ\Publish\SPI\Tests\Persistence\FileFixtureFactory'); diff --git a/src/contracts/Test/Persistence/Fixture/FixtureImporter.php b/src/contracts/Test/Persistence/Fixture/FixtureImporter.php index 3cf0609118..a59e65a1fe 100644 --- a/src/contracts/Test/Persistence/Fixture/FixtureImporter.php +++ b/src/contracts/Test/Persistence/Fixture/FixtureImporter.php @@ -156,5 +156,3 @@ private function findAutoincrementColumn(array $columns): ?Column return null; } } - -class_alias(FixtureImporter::class, 'eZ\Publish\SPI\Tests\Persistence\FixtureImporter'); diff --git a/src/contracts/Test/Persistence/Fixture/PhpArrayFileFixture.php b/src/contracts/Test/Persistence/Fixture/PhpArrayFileFixture.php index 4c9bdb4e09..805c5044a7 100644 --- a/src/contracts/Test/Persistence/Fixture/PhpArrayFileFixture.php +++ b/src/contracts/Test/Persistence/Fixture/PhpArrayFileFixture.php @@ -20,5 +20,3 @@ protected function loadFixture(): array return require $this->getFilePath(); } } - -class_alias(PhpArrayFileFixture::class, 'eZ\Publish\SPI\Tests\Persistence\PhpArrayFileFixture'); diff --git a/src/contracts/Test/Persistence/Fixture/YamlFixture.php b/src/contracts/Test/Persistence/Fixture/YamlFixture.php index 27c8575dcc..bd35ad0f54 100644 --- a/src/contracts/Test/Persistence/Fixture/YamlFixture.php +++ b/src/contracts/Test/Persistence/Fixture/YamlFixture.php @@ -22,5 +22,3 @@ protected function loadFixture(): array return Yaml::parseFile($this->getFilePath()); } } - -class_alias(YamlFixture::class, 'eZ\Publish\SPI\Tests\Persistence\YamlFixture'); diff --git a/src/contracts/Test/Repository/SetupFactory.php b/src/contracts/Test/Repository/SetupFactory.php index 93a4ef1509..703eaaefe0 100644 --- a/src/contracts/Test/Repository/SetupFactory.php +++ b/src/contracts/Test/Repository/SetupFactory.php @@ -50,5 +50,3 @@ abstract public function getConfigValue($configKey); */ abstract public function getServiceContainer(); } - -class_alias(SetupFactory::class, 'eZ\Publish\API\Repository\Tests\SetupFactory'); diff --git a/src/contracts/Test/Repository/SetupFactory/Legacy.php b/src/contracts/Test/Repository/SetupFactory/Legacy.php index bfd6b7068a..f57a5fcec1 100644 --- a/src/contracts/Test/Repository/SetupFactory/Legacy.php +++ b/src/contracts/Test/Repository/SetupFactory/Legacy.php @@ -392,5 +392,3 @@ public static function getCacheDir(): string return self::getInstallationDir() . '/var/cache'; } } - -class_alias(Legacy::class, 'eZ\Publish\API\Repository\Tests\SetupFactory\Legacy'); diff --git a/src/contracts/User/Identity.php b/src/contracts/User/Identity.php index e516384747..fe71bb1dbd 100644 --- a/src/contracts/User/Identity.php +++ b/src/contracts/User/Identity.php @@ -54,5 +54,3 @@ public function getInformation(); */ public function getHash(); } - -class_alias(Identity::class, 'eZ\Publish\SPI\User\Identity'); diff --git a/src/contracts/User/IdentityAware.php b/src/contracts/User/IdentityAware.php index ea72f22f13..fd2015b2cc 100644 --- a/src/contracts/User/IdentityAware.php +++ b/src/contracts/User/IdentityAware.php @@ -14,5 +14,3 @@ interface IdentityAware { public function setIdentity(Identity $identity); } - -class_alias(IdentityAware::class, 'eZ\Publish\SPI\User\IdentityAware'); diff --git a/src/contracts/Variation/Values/ImageVariation.php b/src/contracts/Variation/Values/ImageVariation.php index 0ffe0efd75..514f22e326 100644 --- a/src/contracts/Variation/Values/ImageVariation.php +++ b/src/contracts/Variation/Values/ImageVariation.php @@ -63,5 +63,3 @@ class ImageVariation extends Variation */ protected bool $isExternal = false; } - -class_alias(ImageVariation::class, 'eZ\Publish\SPI\Variation\Values\ImageVariation'); diff --git a/src/contracts/Variation/Values/Variation.php b/src/contracts/Variation/Values/Variation.php index e9018002f6..9fb3693e75 100644 --- a/src/contracts/Variation/Values/Variation.php +++ b/src/contracts/Variation/Values/Variation.php @@ -63,5 +63,3 @@ class Variation extends ValueObject */ protected $lastModified; } - -class_alias(Variation::class, 'eZ\Publish\SPI\Variation\Values\Variation'); diff --git a/src/contracts/Variation/VariationHandler.php b/src/contracts/Variation/VariationHandler.php index 652496c575..db82180392 100644 --- a/src/contracts/Variation/VariationHandler.php +++ b/src/contracts/Variation/VariationHandler.php @@ -31,5 +31,3 @@ interface VariationHandler */ public function getVariation(Field $field, VersionInfo $versionInfo, $variationName, array $parameters = []); } - -class_alias(VariationHandler::class, 'eZ\Publish\SPI\Variation\VariationHandler'); diff --git a/src/contracts/Variation/VariationPurger.php b/src/contracts/Variation/VariationPurger.php index a611a2b5c1..297960d098 100644 --- a/src/contracts/Variation/VariationPurger.php +++ b/src/contracts/Variation/VariationPurger.php @@ -19,5 +19,3 @@ interface VariationPurger */ public function purge(array $aliasNames); } - -class_alias(VariationPurger::class, 'eZ\Publish\SPI\Variation\VariationPurger'); diff --git a/src/lib/Base/Container/ApiLoader/RepositoryFactory.php b/src/lib/Base/Container/ApiLoader/RepositoryFactory.php index 959bb4b10b..a000ac22f4 100644 --- a/src/lib/Base/Container/ApiLoader/RepositoryFactory.php +++ b/src/lib/Base/Container/ApiLoader/RepositoryFactory.php @@ -139,5 +139,3 @@ public function buildService(Repository $repository, $serviceName) return $repository->$methodName(); } } - -class_alias(RepositoryFactory::class, 'eZ\Publish\Core\Base\Container\ApiLoader\RepositoryFactory'); diff --git a/src/lib/Base/Container/Compiler/AbstractFieldTypeBasedPass.php b/src/lib/Base/Container/Compiler/AbstractFieldTypeBasedPass.php index d8f8075318..a0063f5ae5 100644 --- a/src/lib/Base/Container/Compiler/AbstractFieldTypeBasedPass.php +++ b/src/lib/Base/Container/Compiler/AbstractFieldTypeBasedPass.php @@ -48,5 +48,3 @@ public function getFieldTypeServiceIds(ContainerBuilder $container): iterable abstract public function process(ContainerBuilder $container); } - -class_alias(AbstractFieldTypeBasedPass::class, 'eZ\Publish\Core\Base\Container\Compiler\AbstractFieldTypeBasedPass'); diff --git a/src/lib/Base/Container/Compiler/FieldTypeRegistryPass.php b/src/lib/Base/Container/Compiler/FieldTypeRegistryPass.php index e0a9c5b1ad..d6adcdbd13 100644 --- a/src/lib/Base/Container/Compiler/FieldTypeRegistryPass.php +++ b/src/lib/Base/Container/Compiler/FieldTypeRegistryPass.php @@ -51,5 +51,3 @@ public function process(ContainerBuilder $container): void } } } - -class_alias(FieldTypeRegistryPass::class, 'eZ\Publish\Core\Base\Container\Compiler\FieldTypeRegistryPass'); diff --git a/src/lib/Base/Container/Compiler/GenericFieldTypeConverterPass.php b/src/lib/Base/Container/Compiler/GenericFieldTypeConverterPass.php index 111e15b610..474778b3ef 100644 --- a/src/lib/Base/Container/Compiler/GenericFieldTypeConverterPass.php +++ b/src/lib/Base/Container/Compiler/GenericFieldTypeConverterPass.php @@ -146,5 +146,3 @@ private function isGenericFieldType(ContainerBuilder $container, string $service return $reflection->isSubclassOf(GenericType::class); } } - -class_alias(GenericFieldTypeConverterPass::class, 'eZ\Publish\Core\Base\Container\Compiler\GenericFieldTypeConverterPass'); diff --git a/src/lib/Base/Container/Compiler/Persistence/FieldTypeRegistryPass.php b/src/lib/Base/Container/Compiler/Persistence/FieldTypeRegistryPass.php index fa7a635837..3a50cae01e 100644 --- a/src/lib/Base/Container/Compiler/Persistence/FieldTypeRegistryPass.php +++ b/src/lib/Base/Container/Compiler/Persistence/FieldTypeRegistryPass.php @@ -40,5 +40,3 @@ public function process(ContainerBuilder $container) } } } - -class_alias(FieldTypeRegistryPass::class, 'eZ\Publish\Core\Base\Container\Compiler\Persistence\FieldTypeRegistryPass'); diff --git a/src/lib/Base/Container/Compiler/Search/AggregateFieldValueMapperPass.php b/src/lib/Base/Container/Compiler/Search/AggregateFieldValueMapperPass.php index 34bff08dc3..ad484b7638 100644 --- a/src/lib/Base/Container/Compiler/Search/AggregateFieldValueMapperPass.php +++ b/src/lib/Base/Container/Compiler/Search/AggregateFieldValueMapperPass.php @@ -40,5 +40,3 @@ public function process(ContainerBuilder $container): void } } } - -class_alias(AggregateFieldValueMapperPass::class, 'eZ\Publish\Core\Base\Container\Compiler\Search\AggregateFieldValueMapperPass'); diff --git a/src/lib/Base/Container/Compiler/Search/FieldRegistryPass.php b/src/lib/Base/Container/Compiler/Search/FieldRegistryPass.php index 6c70904c08..5c80610fe5 100644 --- a/src/lib/Base/Container/Compiler/Search/FieldRegistryPass.php +++ b/src/lib/Base/Container/Compiler/Search/FieldRegistryPass.php @@ -57,5 +57,3 @@ public function process(ContainerBuilder $container) } } } - -class_alias(FieldRegistryPass::class, 'eZ\Publish\Core\Base\Container\Compiler\Search\FieldRegistryPass'); diff --git a/src/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPass.php b/src/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPass.php index 72d6a666df..def88898f4 100644 --- a/src/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPass.php +++ b/src/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPass.php @@ -70,5 +70,3 @@ protected function addHandlers(Definition $definition, $handlers) } } } - -class_alias(CriteriaConverterPass::class, 'eZ\Publish\Core\Base\Container\Compiler\Search\Legacy\CriteriaConverterPass'); diff --git a/src/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPass.php b/src/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPass.php index 56726be00e..76a9100e05 100644 --- a/src/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPass.php +++ b/src/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPass.php @@ -57,5 +57,3 @@ public function process(ContainerBuilder $container) } } } - -class_alias(CriterionFieldValueHandlerRegistryPass::class, 'eZ\Publish\Core\Base\Container\Compiler\Search\Legacy\CriterionFieldValueHandlerRegistryPass'); diff --git a/src/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPass.php b/src/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPass.php index daf4e4575d..49cd59ef8a 100644 --- a/src/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPass.php +++ b/src/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPass.php @@ -62,5 +62,3 @@ protected function addHandlers(Definition $definition, $handlers) } } } - -class_alias(SortClauseConverterPass::class, 'eZ\Publish\Core\Base\Container\Compiler\Search\Legacy\SortClauseConverterPass'); diff --git a/src/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPass.php b/src/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPass.php index a58750fa69..c22370951d 100644 --- a/src/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPass.php +++ b/src/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPass.php @@ -135,5 +135,3 @@ public function process(ContainerBuilder $container) } } } - -class_alias(ExternalStorageRegistryPass::class, 'eZ\Publish\Core\Base\Container\Compiler\Storage\ExternalStorageRegistryPass'); diff --git a/src/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPass.php b/src/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPass.php index f14e55410f..ec3801d596 100644 --- a/src/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPass.php +++ b/src/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPass.php @@ -62,5 +62,3 @@ public function process(ContainerBuilder $container): void } } } - -class_alias(FieldValueConverterRegistryPass::class, 'eZ\Publish\Core\Base\Container\Compiler\Storage\Legacy\FieldValueConverterRegistryPass'); diff --git a/src/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPass.php b/src/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPass.php index 7fe26d7b60..75673d2f56 100644 --- a/src/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPass.php +++ b/src/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPass.php @@ -40,5 +40,3 @@ public function process(ContainerBuilder $container) } } } - -class_alias(RoleLimitationConverterPass::class, 'eZ\Publish\Core\Base\Container\Compiler\Storage\Legacy\RoleLimitationConverterPass'); diff --git a/src/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIterator.php b/src/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIterator.php index c71b2056a0..dfd87e5880 100644 --- a/src/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIterator.php +++ b/src/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIterator.php @@ -58,5 +58,3 @@ public function getIterator(): Iterator yield from []; } } - -class_alias(BackwardCompatibleIterator::class, 'eZ\Publish\Core\Base\Container\Compiler\TaggedServiceIdsIterator\BackwardCompatibleIterator'); diff --git a/src/lib/Base/Exceptions/BadStateException.php b/src/lib/Base/Exceptions/BadStateException.php index ce76d2c60c..d52599b78b 100644 --- a/src/lib/Base/Exceptions/BadStateException.php +++ b/src/lib/Base/Exceptions/BadStateException.php @@ -35,5 +35,3 @@ public function __construct($argumentName, $whatIsWrong, Exception $previous = n parent::__construct($this->getBaseTranslation(), 0, $previous); } } - -class_alias(BadStateException::class, 'eZ\Publish\Core\Base\Exceptions\BadStateException'); diff --git a/src/lib/Base/Exceptions/ContentFieldValidationException.php b/src/lib/Base/Exceptions/ContentFieldValidationException.php index 1e10831293..9c7c15055f 100644 --- a/src/lib/Base/Exceptions/ContentFieldValidationException.php +++ b/src/lib/Base/Exceptions/ContentFieldValidationException.php @@ -120,5 +120,3 @@ private function collectValidationErrors(): array return $messages; } } - -class_alias(ContentFieldValidationException::class, 'eZ\Publish\Core\Base\Exceptions\ContentFieldValidationException'); diff --git a/src/lib/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php b/src/lib/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php index 22ebf9360d..2e4e8814cf 100644 --- a/src/lib/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php +++ b/src/lib/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php @@ -55,5 +55,3 @@ public function getFieldErrors() return $this->errors; } } - -class_alias(ContentTypeFieldDefinitionValidationException::class, 'eZ\Publish\Core\Base\Exceptions\ContentTypeFieldDefinitionValidationException'); diff --git a/src/lib/Base/Exceptions/ContentTypeValidationException.php b/src/lib/Base/Exceptions/ContentTypeValidationException.php index 220dd1e953..3087fdf236 100644 --- a/src/lib/Base/Exceptions/ContentTypeValidationException.php +++ b/src/lib/Base/Exceptions/ContentTypeValidationException.php @@ -33,5 +33,3 @@ public function __construct($messageTemplate, array $parameters = []) parent::__construct($this->getBaseTranslation()); } } - -class_alias(ContentTypeValidationException::class, 'eZ\Publish\Core\Base\Exceptions\ContentTypeValidationException'); diff --git a/src/lib/Base/Exceptions/ContentValidationException.php b/src/lib/Base/Exceptions/ContentValidationException.php index 7b249f5062..6a8fec12ab 100644 --- a/src/lib/Base/Exceptions/ContentValidationException.php +++ b/src/lib/Base/Exceptions/ContentValidationException.php @@ -33,5 +33,3 @@ public function __construct($messageTemplate, array $parameters = []) parent::__construct($this->getBaseTranslation()); } } - -class_alias(ContentValidationException::class, 'eZ\Publish\Core\Base\Exceptions\ContentValidationException'); diff --git a/src/lib/Base/Exceptions/DatabaseException.php b/src/lib/Base/Exceptions/DatabaseException.php index 7d4c4ee8dc..e4bce1b475 100644 --- a/src/lib/Base/Exceptions/DatabaseException.php +++ b/src/lib/Base/Exceptions/DatabaseException.php @@ -26,5 +26,3 @@ public static function wrap( return new self($message, $code, $previous); } } - -class_alias(DatabaseException::class, 'eZ\Publish\Core\Base\Exceptions\DatabaseException'); diff --git a/src/lib/Base/Exceptions/ForbiddenException.php b/src/lib/Base/Exceptions/ForbiddenException.php index 6e89faa425..b39e7ea16e 100644 --- a/src/lib/Base/Exceptions/ForbiddenException.php +++ b/src/lib/Base/Exceptions/ForbiddenException.php @@ -33,5 +33,3 @@ public function __construct($messageTemplate, array $parameters = []) parent::__construct($this->getBaseTranslation()); } } - -class_alias(ForbiddenException::class, 'eZ\Publish\Core\Base\Exceptions\ForbiddenException'); diff --git a/src/lib/Base/Exceptions/Httpable.php b/src/lib/Base/Exceptions/Httpable.php index 97147510b0..02a4d1e6cc 100644 --- a/src/lib/Base/Exceptions/Httpable.php +++ b/src/lib/Base/Exceptions/Httpable.php @@ -30,5 +30,3 @@ interface Httpable public const NOT_IMPLEMENTED = 501; public const SERVICE_UNAVAILABLE = 503; } - -class_alias(Httpable::class, 'eZ\Publish\Core\Base\Exceptions\Httpable'); diff --git a/src/lib/Base/Exceptions/InvalidArgumentException.php b/src/lib/Base/Exceptions/InvalidArgumentException.php index 4468260384..6e8dd55ae4 100644 --- a/src/lib/Base/Exceptions/InvalidArgumentException.php +++ b/src/lib/Base/Exceptions/InvalidArgumentException.php @@ -35,5 +35,3 @@ public function __construct($argumentName, $whatIsWrong, Exception $previous = n parent::__construct($this->getBaseTranslation(), 0, $previous); } } - -class_alias(InvalidArgumentException::class, 'eZ\Publish\Core\Base\Exceptions\InvalidArgumentException'); diff --git a/src/lib/Base/Exceptions/InvalidArgumentType.php b/src/lib/Base/Exceptions/InvalidArgumentType.php index 4e95e270e0..8b25d8e757 100644 --- a/src/lib/Base/Exceptions/InvalidArgumentType.php +++ b/src/lib/Base/Exceptions/InvalidArgumentType.php @@ -39,5 +39,3 @@ public function __construct($argumentName, $expectedType, $value = null, Excepti $this->message = $this->getBaseTranslation(); } } - -class_alias(InvalidArgumentType::class, 'eZ\Publish\Core\Base\Exceptions\InvalidArgumentType'); diff --git a/src/lib/Base/Exceptions/InvalidArgumentValue.php b/src/lib/Base/Exceptions/InvalidArgumentValue.php index 94cfb2ec89..a56175ab3c 100644 --- a/src/lib/Base/Exceptions/InvalidArgumentValue.php +++ b/src/lib/Base/Exceptions/InvalidArgumentValue.php @@ -44,5 +44,3 @@ public function __construct($argumentName, $value, $className = null, Exception $this->message = $this->getBaseTranslation(); } } - -class_alias(InvalidArgumentValue::class, 'eZ\Publish\Core\Base\Exceptions\InvalidArgumentValue'); diff --git a/src/lib/Base/Exceptions/LimitationValidationException.php b/src/lib/Base/Exceptions/LimitationValidationException.php index a5af9facb6..a1000bde5d 100644 --- a/src/lib/Base/Exceptions/LimitationValidationException.php +++ b/src/lib/Base/Exceptions/LimitationValidationException.php @@ -50,5 +50,3 @@ public function getLimitationErrors() return $this->errors; } } - -class_alias(LimitationValidationException::class, 'eZ\Publish\Core\Base\Exceptions\LimitationValidationException'); diff --git a/src/lib/Base/Exceptions/MissingClass.php b/src/lib/Base/Exceptions/MissingClass.php index 0209f447b5..1ea3aefd05 100644 --- a/src/lib/Base/Exceptions/MissingClass.php +++ b/src/lib/Base/Exceptions/MissingClass.php @@ -44,5 +44,3 @@ public function __construct($className, $classType = null, Exception $previous = parent::__construct($this->getBaseTranslation(), 0, $previous); } } - -class_alias(MissingClass::class, 'eZ\Publish\Core\Base\Exceptions\MissingClass'); diff --git a/src/lib/Base/Exceptions/MissingUserFieldTypeException.php b/src/lib/Base/Exceptions/MissingUserFieldTypeException.php index caced1bdfa..20d30031a5 100644 --- a/src/lib/Base/Exceptions/MissingUserFieldTypeException.php +++ b/src/lib/Base/Exceptions/MissingUserFieldTypeException.php @@ -25,5 +25,3 @@ public function __construct(ContentType $contentType, string $fieldType) ); } } - -class_alias(MissingUserFieldTypeException::class, 'eZ\Publish\Core\Base\Exceptions\MissingUserFieldTypeException'); diff --git a/src/lib/Base/Exceptions/NotFound/FieldTypeNotFoundException.php b/src/lib/Base/Exceptions/NotFound/FieldTypeNotFoundException.php index 34c03af440..a3bd217a85 100644 --- a/src/lib/Base/Exceptions/NotFound/FieldTypeNotFoundException.php +++ b/src/lib/Base/Exceptions/NotFound/FieldTypeNotFoundException.php @@ -42,5 +42,3 @@ public function __construct($fieldType, Exception $previous = null) parent::__construct($this->getBaseTranslation(), self::INTERNAL_ERROR, $previous); } } - -class_alias(FieldTypeNotFoundException::class, 'eZ\Publish\Core\Base\Exceptions\NotFound\FieldTypeNotFoundException'); diff --git a/src/lib/Base/Exceptions/NotFound/LimitationNotFoundException.php b/src/lib/Base/Exceptions/NotFound/LimitationNotFoundException.php index 7247127faf..12dae4670b 100644 --- a/src/lib/Base/Exceptions/NotFound/LimitationNotFoundException.php +++ b/src/lib/Base/Exceptions/NotFound/LimitationNotFoundException.php @@ -42,5 +42,3 @@ public function __construct($limitation, Exception $previous = null) parent::__construct($this->getBaseTranslation(), self::INTERNAL_ERROR, $previous); } } - -class_alias(LimitationNotFoundException::class, 'eZ\Publish\Core\Base\Exceptions\NotFound\LimitationNotFoundException'); diff --git a/src/lib/Base/Exceptions/NotFoundException.php b/src/lib/Base/Exceptions/NotFoundException.php index 298e1d6b07..bb6b34f2a7 100644 --- a/src/lib/Base/Exceptions/NotFoundException.php +++ b/src/lib/Base/Exceptions/NotFoundException.php @@ -37,5 +37,3 @@ public function __construct($what, $identifier, Exception $previous = null) parent::__construct($this->getBaseTranslation(), self::NOT_FOUND, $previous); } } - -class_alias(NotFoundException::class, 'eZ\Publish\Core\Base\Exceptions\NotFoundException'); diff --git a/src/lib/Base/Exceptions/UnauthorizedException.php b/src/lib/Base/Exceptions/UnauthorizedException.php index b9152240f7..52da1099a7 100644 --- a/src/lib/Base/Exceptions/UnauthorizedException.php +++ b/src/lib/Base/Exceptions/UnauthorizedException.php @@ -49,5 +49,3 @@ public function __construct($module, $function, array $properties = null, Except parent::__construct($this->getBaseTranslation(), self::UNAUTHORIZED, $previous); } } - -class_alias(UnauthorizedException::class, 'eZ\Publish\Core\Base\Exceptions\UnauthorizedException'); diff --git a/src/lib/Base/Exceptions/UserPasswordValidationException.php b/src/lib/Base/Exceptions/UserPasswordValidationException.php index 638e5f9c6d..a3ab00e35b 100644 --- a/src/lib/Base/Exceptions/UserPasswordValidationException.php +++ b/src/lib/Base/Exceptions/UserPasswordValidationException.php @@ -29,5 +29,3 @@ public function __construct(string $argumentName, array $errors, Exception $prev parent::__construct($argumentName, 'The password does not match the following rules: ' . implode(', ', $rules), $previous); } } - -class_alias(UserPasswordValidationException::class, 'eZ\Publish\Core\Base\Exceptions\UserPasswordValidationException'); diff --git a/src/lib/Base/ServiceContainer.php b/src/lib/Base/ServiceContainer.php index 7ee3f742d7..c5cc16002f 100644 --- a/src/lib/Base/ServiceContainer.php +++ b/src/lib/Base/ServiceContainer.php @@ -232,5 +232,3 @@ protected function prepareDirectory($directory, $name) } } } - -class_alias(ServiceContainer::class, 'eZ\Publish\Core\Base\ServiceContainer'); diff --git a/src/lib/Base/Translatable.php b/src/lib/Base/Translatable.php index 413fb198b6..bedbdb21f4 100644 --- a/src/lib/Base/Translatable.php +++ b/src/lib/Base/Translatable.php @@ -66,5 +66,3 @@ public function addParameters(array $parameters); */ public function getBaseTranslation(); } - -class_alias(Translatable::class, 'eZ\Publish\Core\Base\Translatable'); diff --git a/src/lib/Base/TranslatableBase.php b/src/lib/Base/TranslatableBase.php index 7f0ccee7bd..421429060b 100644 --- a/src/lib/Base/TranslatableBase.php +++ b/src/lib/Base/TranslatableBase.php @@ -51,5 +51,3 @@ public function getBaseTranslation() return strtr($this->messageTemplate, $this->parameters); } } - -class_alias(TranslatableBase::class, 'eZ\Publish\Core\Base\TranslatableBase'); diff --git a/src/lib/Base/Utils/DeprecationWarner.php b/src/lib/Base/Utils/DeprecationWarner.php index edf7afb7fa..b592fc52d9 100644 --- a/src/lib/Base/Utils/DeprecationWarner.php +++ b/src/lib/Base/Utils/DeprecationWarner.php @@ -14,5 +14,3 @@ public function log($message) @trigger_error($message, E_USER_DEPRECATED); } } - -class_alias(DeprecationWarner::class, 'eZ\Publish\Core\Base\Utils\DeprecationWarner'); diff --git a/src/lib/Base/Utils/DeprecationWarnerInterface.php b/src/lib/Base/Utils/DeprecationWarnerInterface.php index 975e24b93b..633becd169 100644 --- a/src/lib/Base/Utils/DeprecationWarnerInterface.php +++ b/src/lib/Base/Utils/DeprecationWarnerInterface.php @@ -19,5 +19,3 @@ interface DeprecationWarnerInterface */ public function log($message); } - -class_alias(DeprecationWarnerInterface::class, 'eZ\Publish\Core\Base\Utils\DeprecationWarnerInterface'); diff --git a/src/lib/Event/BookmarkService.php b/src/lib/Event/BookmarkService.php index 9095c36846..c0daea036c 100644 --- a/src/lib/Event/BookmarkService.php +++ b/src/lib/Event/BookmarkService.php @@ -63,5 +63,3 @@ public function deleteBookmark(Location $location): void $this->eventDispatcher->dispatch(new DeleteBookmarkEvent(...$eventData)); } } - -class_alias(BookmarkService::class, 'eZ\Publish\Core\Event\BookmarkService'); diff --git a/src/lib/Event/ContentService.php b/src/lib/Event/ContentService.php index dee89f597c..37378c2b13 100644 --- a/src/lib/Event/ContentService.php +++ b/src/lib/Event/ContentService.php @@ -381,5 +381,3 @@ public function revealContent(ContentInfo $contentInfo): void ); } } - -class_alias(ContentService::class, 'eZ\Publish\Core\Event\ContentService'); diff --git a/src/lib/Event/ContentTypeService.php b/src/lib/Event/ContentTypeService.php index b1beeec89b..a1714e29fa 100644 --- a/src/lib/Event/ContentTypeService.php +++ b/src/lib/Event/ContentTypeService.php @@ -409,5 +409,3 @@ public function removeContentTypeTranslation( return $newContentTypeDraft; } } - -class_alias(ContentTypeService::class, 'eZ\Publish\Core\Event\ContentTypeService'); diff --git a/src/lib/Event/FieldTypeService.php b/src/lib/Event/FieldTypeService.php index 2c5404827d..a4b72a6805 100644 --- a/src/lib/Event/FieldTypeService.php +++ b/src/lib/Event/FieldTypeService.php @@ -26,5 +26,3 @@ public function __construct( $this->eventDispatcher = $eventDispatcher; } } - -class_alias(FieldTypeService::class, 'eZ\Publish\Core\Event\FieldTypeService'); diff --git a/src/lib/Event/LanguageService.php b/src/lib/Event/LanguageService.php index 937452a68d..ca8402ce5d 100644 --- a/src/lib/Event/LanguageService.php +++ b/src/lib/Event/LanguageService.php @@ -149,5 +149,3 @@ public function deleteLanguage(Language $language): void ); } } - -class_alias(LanguageService::class, 'eZ\Publish\Core\Event\LanguageService'); diff --git a/src/lib/Event/LocationService.php b/src/lib/Event/LocationService.php index 8cd0e0e7d3..4af4d37c4b 100644 --- a/src/lib/Event/LocationService.php +++ b/src/lib/Event/LocationService.php @@ -235,5 +235,3 @@ public function deleteLocation(Location $location): void ); } } - -class_alias(LocationService::class, 'eZ\Publish\Core\Event\LocationService'); diff --git a/src/lib/Event/NotificationService.php b/src/lib/Event/NotificationService.php index 26e8da9fb3..414588b71b 100644 --- a/src/lib/Event/NotificationService.php +++ b/src/lib/Event/NotificationService.php @@ -92,5 +92,3 @@ public function deleteNotification(Notification $notification): void ); } } - -class_alias(NotificationService::class, 'eZ\Publish\Core\Event\NotificationService'); diff --git a/src/lib/Event/ObjectStateService.php b/src/lib/Event/ObjectStateService.php index 2147002e71..dced3aaccf 100644 --- a/src/lib/Event/ObjectStateService.php +++ b/src/lib/Event/ObjectStateService.php @@ -236,5 +236,3 @@ public function setContentState( ); } } - -class_alias(ObjectStateService::class, 'eZ\Publish\Core\Event\ObjectStateService'); diff --git a/src/lib/Event/Repository.php b/src/lib/Event/Repository.php index c8164d2eb7..5a7cde3043 100644 --- a/src/lib/Event/Repository.php +++ b/src/lib/Event/Repository.php @@ -234,5 +234,3 @@ public function getUserService(): UserServiceInterface return $this->userService; } } - -class_alias(Repository::class, 'eZ\Publish\Core\Event\Repository'); diff --git a/src/lib/Event/RoleService.php b/src/lib/Event/RoleService.php index 3849dade53..af8d128a65 100644 --- a/src/lib/Event/RoleService.php +++ b/src/lib/Event/RoleService.php @@ -367,5 +367,3 @@ public function removeRoleAssignment(RoleAssignment $roleAssignment): void ); } } - -class_alias(RoleService::class, 'eZ\Publish\Core\Event\RoleService'); diff --git a/src/lib/Event/SearchService.php b/src/lib/Event/SearchService.php index bdfa3047d5..e75dba3f1b 100644 --- a/src/lib/Event/SearchService.php +++ b/src/lib/Event/SearchService.php @@ -26,5 +26,3 @@ public function __construct( $this->eventDispatcher = $eventDispatcher; } } - -class_alias(SearchService::class, 'eZ\Publish\Core\Event\SearchService'); diff --git a/src/lib/Event/SectionService.php b/src/lib/Event/SectionService.php index f2ea08d2ef..e98bf95b23 100644 --- a/src/lib/Event/SectionService.php +++ b/src/lib/Event/SectionService.php @@ -154,5 +154,3 @@ public function deleteSection(Section $section): void ); } } - -class_alias(SectionService::class, 'eZ\Publish\Core\Event\SectionService'); diff --git a/src/lib/Event/SettingService.php b/src/lib/Event/SettingService.php index 5edf08c714..45bbafd46b 100644 --- a/src/lib/Event/SettingService.php +++ b/src/lib/Event/SettingService.php @@ -100,5 +100,3 @@ public function deleteSetting(Setting $setting): void ); } } - -class_alias(SettingService::class, 'eZ\Publish\Core\Event\SettingService'); diff --git a/src/lib/Event/TranslationService.php b/src/lib/Event/TranslationService.php index 2eb5549293..4d535e4323 100644 --- a/src/lib/Event/TranslationService.php +++ b/src/lib/Event/TranslationService.php @@ -26,5 +26,3 @@ public function __construct( $this->eventDispatcher = $eventDispatcher; } } - -class_alias(TranslationService::class, 'eZ\Publish\Core\Event\TranslationService'); diff --git a/src/lib/Event/TrashService.php b/src/lib/Event/TrashService.php index 3deae86516..b2d900bb60 100644 --- a/src/lib/Event/TrashService.php +++ b/src/lib/Event/TrashService.php @@ -129,5 +129,3 @@ public function deleteTrashItem(TrashItem $trashItem): TrashItemDeleteResult return $result; } } - -class_alias(TrashService::class, 'eZ\Publish\Core\Event\TrashService'); diff --git a/src/lib/Event/URLAliasService.php b/src/lib/Event/URLAliasService.php index d5e72a466e..7dc7426bd5 100644 --- a/src/lib/Event/URLAliasService.php +++ b/src/lib/Event/URLAliasService.php @@ -138,5 +138,3 @@ public function refreshSystemUrlAliasesForLocation(Location $location): void ); } } - -class_alias(URLAliasService::class, 'eZ\Publish\Core\Event\URLAliasService'); diff --git a/src/lib/Event/URLService.php b/src/lib/Event/URLService.php index 9558fdd67f..8460bcd838 100644 --- a/src/lib/Event/URLService.php +++ b/src/lib/Event/URLService.php @@ -57,5 +57,3 @@ public function updateUrl( return $updatedUrl; } } - -class_alias(URLService::class, 'eZ\Publish\Core\Event\URLService'); diff --git a/src/lib/Event/URLWildcardService.php b/src/lib/Event/URLWildcardService.php index 7bfc0d698d..80a07b8ea1 100644 --- a/src/lib/Event/URLWildcardService.php +++ b/src/lib/Event/URLWildcardService.php @@ -129,5 +129,3 @@ public function translate(string $url): URLWildcardTranslationResult return $result; } } - -class_alias(URLWildcardService::class, 'eZ\Publish\Core\Event\URLWildcardService'); diff --git a/src/lib/Event/UserPreferenceService.php b/src/lib/Event/UserPreferenceService.php index e03dea9af4..11ba84a4ce 100644 --- a/src/lib/Event/UserPreferenceService.php +++ b/src/lib/Event/UserPreferenceService.php @@ -46,5 +46,3 @@ public function setUserPreference(array $userPreferenceSetStructs): void ); } } - -class_alias(UserPreferenceService::class, 'eZ\Publish\Core\Event\UserPreferenceService'); diff --git a/src/lib/Event/UserService.php b/src/lib/Event/UserService.php index c7d6b81f93..3b8c97bb51 100644 --- a/src/lib/Event/UserService.php +++ b/src/lib/Event/UserService.php @@ -355,5 +355,3 @@ public function unAssignUserFromUserGroup( ); } } - -class_alias(UserService::class, 'eZ\Publish\Core\Event\UserService'); diff --git a/src/lib/FieldType/Author/Author.php b/src/lib/FieldType/Author/Author.php index 0b07025363..f45d7929dc 100644 --- a/src/lib/FieldType/Author/Author.php +++ b/src/lib/FieldType/Author/Author.php @@ -36,5 +36,3 @@ class Author extends ValueObject */ public $email; } - -class_alias(Author::class, 'eZ\Publish\Core\FieldType\Author\Author'); diff --git a/src/lib/FieldType/Author/AuthorCollection.php b/src/lib/FieldType/Author/AuthorCollection.php index 9b3f303278..2d1081ccbf 100644 --- a/src/lib/FieldType/Author/AuthorCollection.php +++ b/src/lib/FieldType/Author/AuthorCollection.php @@ -77,5 +77,3 @@ public function removeAuthorsById(array $authorIds) $this->exchangeArray($aAuthors); } } - -class_alias(AuthorCollection::class, 'eZ\Publish\Core\FieldType\Author\AuthorCollection'); diff --git a/src/lib/FieldType/Author/SearchField.php b/src/lib/FieldType/Author/SearchField.php index 89de149205..a9e28c4381 100644 --- a/src/lib/FieldType/Author/SearchField.php +++ b/src/lib/FieldType/Author/SearchField.php @@ -115,5 +115,3 @@ public function getDefaultSortField() return 'sort_value'; } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\Author\SearchField'); diff --git a/src/lib/FieldType/Author/Type.php b/src/lib/FieldType/Author/Type.php index e4c86e47fd..87d3412456 100644 --- a/src/lib/FieldType/Author/Type.php +++ b/src/lib/FieldType/Author/Type.php @@ -258,5 +258,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\Author\Type'); diff --git a/src/lib/FieldType/Author/Value.php b/src/lib/FieldType/Author/Value.php index 1a632420dc..bac3dfa70b 100644 --- a/src/lib/FieldType/Author/Value.php +++ b/src/lib/FieldType/Author/Value.php @@ -48,5 +48,3 @@ public function __toString() return implode(', ', $authorNames); } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\Author\Value'); diff --git a/src/lib/FieldType/BinaryBase/BinaryBaseStorage.php b/src/lib/FieldType/BinaryBase/BinaryBaseStorage.php index d70f00c742..7fa52f9c68 100644 --- a/src/lib/FieldType/BinaryBase/BinaryBaseStorage.php +++ b/src/lib/FieldType/BinaryBase/BinaryBaseStorage.php @@ -209,5 +209,3 @@ public function getIndexData(VersionInfo $versionInfo, Field $field, array $cont { } } - -class_alias(BinaryBaseStorage::class, 'eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage'); diff --git a/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php b/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php index e1943ca20d..9ad9dd9988 100644 --- a/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php +++ b/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php @@ -66,5 +66,3 @@ abstract public function getReferencedFiles(array $fieldIds, $versionNo); */ abstract public function countFileReferences(array $files); } - -class_alias(Gateway::class, 'eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway'); diff --git a/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php index 1721be5de1..9d12671fb8 100644 --- a/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php @@ -479,5 +479,3 @@ public function countFileReferences(array $files) return $countMap; } } - -class_alias(DoctrineStorage::class, 'eZ\Publish\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage'); diff --git a/src/lib/FieldType/BinaryBase/PathGenerator/LegacyPathGenerator.php b/src/lib/FieldType/BinaryBase/PathGenerator/LegacyPathGenerator.php index a4e59598fd..e8e60f0c1f 100644 --- a/src/lib/FieldType/BinaryBase/PathGenerator/LegacyPathGenerator.php +++ b/src/lib/FieldType/BinaryBase/PathGenerator/LegacyPathGenerator.php @@ -34,5 +34,3 @@ protected function getFirstPartOfMimeType($mimeType) return substr($mimeType, 0, strpos($mimeType, '/')); } } - -class_alias(LegacyPathGenerator::class, 'eZ\Publish\Core\FieldType\BinaryBase\PathGenerator\LegacyPathGenerator'); diff --git a/src/lib/FieldType/BinaryBase/Type.php b/src/lib/FieldType/BinaryBase/Type.php index 784e2b2444..8fcd7d0816 100644 --- a/src/lib/FieldType/BinaryBase/Type.php +++ b/src/lib/FieldType/BinaryBase/Type.php @@ -375,5 +375,3 @@ public function isSearchable() return true; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\BinaryBase\Type'); diff --git a/src/lib/FieldType/BinaryBase/Value.php b/src/lib/FieldType/BinaryBase/Value.php index af1021053f..8def62307b 100644 --- a/src/lib/FieldType/BinaryBase/Value.php +++ b/src/lib/FieldType/BinaryBase/Value.php @@ -123,5 +123,3 @@ public function __isset($propertyName) return parent::__isset($propertyName); } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\BinaryBase\Value'); diff --git a/src/lib/FieldType/BinaryFile/BinaryFileStorage.php b/src/lib/FieldType/BinaryFile/BinaryFileStorage.php index fe75e3780c..ed6a892cfc 100644 --- a/src/lib/FieldType/BinaryFile/BinaryFileStorage.php +++ b/src/lib/FieldType/BinaryFile/BinaryFileStorage.php @@ -15,5 +15,3 @@ class BinaryFileStorage extends BinaryBaseStorage { } - -class_alias(BinaryFileStorage::class, 'eZ\Publish\Core\FieldType\BinaryFile\BinaryFileStorage'); diff --git a/src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php index 6a41c09565..82949b49d8 100644 --- a/src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php @@ -69,5 +69,3 @@ protected function setInsertColumns(QueryBuilder $queryBuilder, VersionInfo $ver ; } } - -class_alias(DoctrineStorage::class, 'eZ\Publish\Core\FieldType\BinaryFile\BinaryFileStorage\Gateway\DoctrineStorage'); diff --git a/src/lib/FieldType/BinaryFile/SearchField.php b/src/lib/FieldType/BinaryFile/SearchField.php index f705b1d013..8857116de7 100644 --- a/src/lib/FieldType/BinaryFile/SearchField.php +++ b/src/lib/FieldType/BinaryFile/SearchField.php @@ -75,5 +75,3 @@ public function getDefaultSortField() return $this->getDefaultMatchField(); } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\BinaryFile\SearchField'); diff --git a/src/lib/FieldType/BinaryFile/Type.php b/src/lib/FieldType/BinaryFile/Type.php index 5ca184c593..d2419fdb75 100644 --- a/src/lib/FieldType/BinaryFile/Type.php +++ b/src/lib/FieldType/BinaryFile/Type.php @@ -121,5 +121,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\BinaryFile\Type'); diff --git a/src/lib/FieldType/BinaryFile/Value.php b/src/lib/FieldType/BinaryFile/Value.php index 0e045aa33e..ae525c6e2b 100644 --- a/src/lib/FieldType/BinaryFile/Value.php +++ b/src/lib/FieldType/BinaryFile/Value.php @@ -21,5 +21,3 @@ class Value extends BaseValue */ public $downloadCount = 0; } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\BinaryFile\Value'); diff --git a/src/lib/FieldType/Checkbox/SearchField.php b/src/lib/FieldType/Checkbox/SearchField.php index 1f0fb0834b..70cf1f1156 100644 --- a/src/lib/FieldType/Checkbox/SearchField.php +++ b/src/lib/FieldType/Checkbox/SearchField.php @@ -63,5 +63,3 @@ public function getDefaultSortField() return $this->getDefaultMatchField(); } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\Checkbox\SearchField'); diff --git a/src/lib/FieldType/Checkbox/Type.php b/src/lib/FieldType/Checkbox/Type.php index b0d6a14c6e..797a289de5 100644 --- a/src/lib/FieldType/Checkbox/Type.php +++ b/src/lib/FieldType/Checkbox/Type.php @@ -151,5 +151,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\Checkbox\Type'); diff --git a/src/lib/FieldType/Checkbox/Value.php b/src/lib/FieldType/Checkbox/Value.php index e1de171cf0..a1339ee241 100644 --- a/src/lib/FieldType/Checkbox/Value.php +++ b/src/lib/FieldType/Checkbox/Value.php @@ -39,5 +39,3 @@ public function __toString() return $this->bool ? '1' : '0'; } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\Checkbox\Value'); diff --git a/src/lib/FieldType/Country/Exception/InvalidValue.php b/src/lib/FieldType/Country/Exception/InvalidValue.php index feeb5a9e7c..f7e5c416cc 100644 --- a/src/lib/FieldType/Country/Exception/InvalidValue.php +++ b/src/lib/FieldType/Country/Exception/InvalidValue.php @@ -24,5 +24,3 @@ public function __construct($value) parent::__construct('$value', "'" . var_export($value, true) . "' is not a valid country identifier"); } } - -class_alias(InvalidValue::class, 'eZ\Publish\Core\FieldType\Country\Exception\InvalidValue'); diff --git a/src/lib/FieldType/Country/SearchField.php b/src/lib/FieldType/Country/SearchField.php index 5c38c4d126..296a17c812 100644 --- a/src/lib/FieldType/Country/SearchField.php +++ b/src/lib/FieldType/Country/SearchField.php @@ -121,5 +121,3 @@ public function getDefaultSortField() return 'sort_value'; } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\Country\SearchField'); diff --git a/src/lib/FieldType/Country/Type.php b/src/lib/FieldType/Country/Type.php index cca3abadb7..4300639f56 100644 --- a/src/lib/FieldType/Country/Type.php +++ b/src/lib/FieldType/Country/Type.php @@ -275,5 +275,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\Country\Type'); diff --git a/src/lib/FieldType/Country/Value.php b/src/lib/FieldType/Country/Value.php index 35917cf7ae..d72e0c44a1 100644 --- a/src/lib/FieldType/Country/Value.php +++ b/src/lib/FieldType/Country/Value.php @@ -48,5 +48,3 @@ public function __toString() return implode(', ', array_column($this->countries, 'Name')); } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\Country\Value'); diff --git a/src/lib/FieldType/Date/SearchField.php b/src/lib/FieldType/Date/SearchField.php index 7189af1a8d..1f211b2e32 100644 --- a/src/lib/FieldType/Date/SearchField.php +++ b/src/lib/FieldType/Date/SearchField.php @@ -72,5 +72,3 @@ public function getDefaultSortField() return $this->getDefaultMatchField(); } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\Date\SearchField'); diff --git a/src/lib/FieldType/Date/Type.php b/src/lib/FieldType/Date/Type.php index 923e067327..d3c94c8fcb 100644 --- a/src/lib/FieldType/Date/Type.php +++ b/src/lib/FieldType/Date/Type.php @@ -245,5 +245,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\Date\Type'); diff --git a/src/lib/FieldType/Date/Value.php b/src/lib/FieldType/Date/Value.php index 22216e273d..62b46e7885 100644 --- a/src/lib/FieldType/Date/Value.php +++ b/src/lib/FieldType/Date/Value.php @@ -92,5 +92,3 @@ public function __toString() return $this->date->format($this->stringFormat); } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\Date\Value'); diff --git a/src/lib/FieldType/DateAndTime/SearchField.php b/src/lib/FieldType/DateAndTime/SearchField.php index 5b466bf1ed..0a1fb15220 100644 --- a/src/lib/FieldType/DateAndTime/SearchField.php +++ b/src/lib/FieldType/DateAndTime/SearchField.php @@ -63,5 +63,3 @@ public function getDefaultSortField() return $this->getDefaultMatchField(); } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\DateAndTime\SearchField'); diff --git a/src/lib/FieldType/DateAndTime/Type.php b/src/lib/FieldType/DateAndTime/Type.php index 40bd2378f6..cdcdfe9db6 100644 --- a/src/lib/FieldType/DateAndTime/Type.php +++ b/src/lib/FieldType/DateAndTime/Type.php @@ -336,5 +336,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\DateAndTime\Type'); diff --git a/src/lib/FieldType/DateAndTime/Value.php b/src/lib/FieldType/DateAndTime/Value.php index 776896a682..fe9865df65 100644 --- a/src/lib/FieldType/DateAndTime/Value.php +++ b/src/lib/FieldType/DateAndTime/Value.php @@ -82,5 +82,3 @@ public function __toString() return $this->value->format($this->stringFormat); } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\DateAndTime\Value'); diff --git a/src/lib/FieldType/EmailAddress/SearchField.php b/src/lib/FieldType/EmailAddress/SearchField.php index 289e7f3efa..fc9bf75f89 100644 --- a/src/lib/FieldType/EmailAddress/SearchField.php +++ b/src/lib/FieldType/EmailAddress/SearchField.php @@ -76,5 +76,3 @@ public function getDefaultSortField() return $this->getDefaultMatchField(); } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\EmailAddress\SearchField'); diff --git a/src/lib/FieldType/EmailAddress/Type.php b/src/lib/FieldType/EmailAddress/Type.php index 8a26254247..df0a8e8a2d 100644 --- a/src/lib/FieldType/EmailAddress/Type.php +++ b/src/lib/FieldType/EmailAddress/Type.php @@ -216,5 +216,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\EmailAddress\Type'); diff --git a/src/lib/FieldType/EmailAddress/Value.php b/src/lib/FieldType/EmailAddress/Value.php index efca47f24c..c7ac67a44c 100644 --- a/src/lib/FieldType/EmailAddress/Value.php +++ b/src/lib/FieldType/EmailAddress/Value.php @@ -36,5 +36,3 @@ public function __toString() return (string)$this->email; } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\EmailAddress\Value'); diff --git a/src/lib/FieldType/FieldSettings.php b/src/lib/FieldType/FieldSettings.php index c35208b650..2eb193bc5c 100644 --- a/src/lib/FieldType/FieldSettings.php +++ b/src/lib/FieldType/FieldSettings.php @@ -57,5 +57,3 @@ public function offsetGet($index) return parent::offsetGet($index); } } - -class_alias(FieldSettings::class, 'eZ\Publish\Core\FieldType\FieldSettings'); diff --git a/src/lib/FieldType/FieldType.php b/src/lib/FieldType/FieldType.php index dfe18ba471..6414b4d118 100644 --- a/src/lib/FieldType/FieldType.php +++ b/src/lib/FieldType/FieldType.php @@ -583,5 +583,3 @@ public function valuesEqual(SPIValue $value1, SPIValue $value2): bool return $this->toHash($value1) === $this->toHash($value2); } } - -class_alias(FieldType::class, 'eZ\Publish\Core\FieldType\FieldType'); diff --git a/src/lib/FieldType/FieldTypeRegistry.php b/src/lib/FieldType/FieldTypeRegistry.php index 7d0cbfe05d..f19f050806 100644 --- a/src/lib/FieldType/FieldTypeRegistry.php +++ b/src/lib/FieldType/FieldTypeRegistry.php @@ -92,5 +92,3 @@ public function getConcreteFieldTypesIdentifiers(): array return $this->concreteFieldTypesIdentifiers; } } - -class_alias(FieldTypeRegistry::class, 'eZ\Publish\Core\FieldType\FieldTypeRegistry'); diff --git a/src/lib/FieldType/Float/SearchField.php b/src/lib/FieldType/Float/SearchField.php index 73be5b540a..102bfde92b 100644 --- a/src/lib/FieldType/Float/SearchField.php +++ b/src/lib/FieldType/Float/SearchField.php @@ -68,5 +68,3 @@ public function getDefaultSortField() return $this->getDefaultMatchField(); } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\Float\SearchField'); diff --git a/src/lib/FieldType/Float/Type.php b/src/lib/FieldType/Float/Type.php index 38b4412f2e..9551224c57 100644 --- a/src/lib/FieldType/Float/Type.php +++ b/src/lib/FieldType/Float/Type.php @@ -274,5 +274,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\Float\Type'); diff --git a/src/lib/FieldType/Float/Value.php b/src/lib/FieldType/Float/Value.php index 4e0e976d2b..fd79d55c9c 100644 --- a/src/lib/FieldType/Float/Value.php +++ b/src/lib/FieldType/Float/Value.php @@ -36,5 +36,3 @@ public function __toString() return (string)$this->value; } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\Float\Value'); diff --git a/src/lib/FieldType/GatewayBasedStorage.php b/src/lib/FieldType/GatewayBasedStorage.php index e97b1dd34f..bc75fbdb97 100644 --- a/src/lib/FieldType/GatewayBasedStorage.php +++ b/src/lib/FieldType/GatewayBasedStorage.php @@ -116,5 +116,3 @@ public function copyLegacyField(VersionInfo $versionInfo, Field $field, Field $o return $this->storeFieldData($versionInfo, $field, $context); } } - -class_alias(GatewayBasedStorage::class, 'eZ\Publish\Core\FieldType\GatewayBasedStorage'); diff --git a/src/lib/FieldType/Handler.php b/src/lib/FieldType/Handler.php index ed705303fa..60acf0cf73 100644 --- a/src/lib/FieldType/Handler.php +++ b/src/lib/FieldType/Handler.php @@ -30,5 +30,3 @@ public function initWithFieldTypeValue($value); */ public function getFieldTypeValue(); } - -class_alias(Handler::class, 'eZ\Publish\Core\FieldType\Handler'); diff --git a/src/lib/FieldType/ISBN/SearchField.php b/src/lib/FieldType/ISBN/SearchField.php index 67b4fb06ba..01c4052bbc 100644 --- a/src/lib/FieldType/ISBN/SearchField.php +++ b/src/lib/FieldType/ISBN/SearchField.php @@ -68,5 +68,3 @@ public function getDefaultSortField() return $this->getDefaultMatchField(); } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\ISBN\SearchField'); diff --git a/src/lib/FieldType/ISBN/Type.php b/src/lib/FieldType/ISBN/Type.php index c5cd544355..c8c86ca402 100644 --- a/src/lib/FieldType/ISBN/Type.php +++ b/src/lib/FieldType/ISBN/Type.php @@ -355,5 +355,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\ISBN\Type'); diff --git a/src/lib/FieldType/ISBN/Value.php b/src/lib/FieldType/ISBN/Value.php index 54ee69bc47..7b260ba7c1 100644 --- a/src/lib/FieldType/ISBN/Value.php +++ b/src/lib/FieldType/ISBN/Value.php @@ -36,5 +36,3 @@ public function __toString() return (string)$this->isbn; } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\ISBN\Value'); diff --git a/src/lib/FieldType/Image/AliasCleanerInterface.php b/src/lib/FieldType/Image/AliasCleanerInterface.php index 22392f6907..6a41c6c01d 100644 --- a/src/lib/FieldType/Image/AliasCleanerInterface.php +++ b/src/lib/FieldType/Image/AliasCleanerInterface.php @@ -19,5 +19,3 @@ interface AliasCleanerInterface */ public function removeAliases($originalPath); } - -class_alias(AliasCleanerInterface::class, 'eZ\Publish\Core\FieldType\Image\AliasCleanerInterface'); diff --git a/src/lib/FieldType/Image/IO/Legacy.php b/src/lib/FieldType/Image/IO/Legacy.php index b440f514d3..956b41e67c 100644 --- a/src/lib/FieldType/Image/IO/Legacy.php +++ b/src/lib/FieldType/Image/IO/Legacy.php @@ -263,5 +263,3 @@ protected function isDraftImagePath($internalPath) return strpos($internalPath, $this->draftPrefix) === 0; } } - -class_alias(Legacy::class, 'eZ\Publish\Core\FieldType\Image\IO\Legacy'); diff --git a/src/lib/FieldType/Image/IO/OptionsProvider.php b/src/lib/FieldType/Image/IO/OptionsProvider.php index 4d7b8bdac1..767bbba442 100644 --- a/src/lib/FieldType/Image/IO/OptionsProvider.php +++ b/src/lib/FieldType/Image/IO/OptionsProvider.php @@ -49,5 +49,3 @@ public function getPublishedImagesDir() return $this->getSetting('image.published_images_dir'); } } - -class_alias(OptionsProvider::class, 'eZ\Publish\Core\FieldType\Image\IO\OptionsProvider'); diff --git a/src/lib/FieldType/Image/ImageStorage.php b/src/lib/FieldType/Image/ImageStorage.php index 87bc4a6955..21e6282a22 100644 --- a/src/lib/FieldType/Image/ImageStorage.php +++ b/src/lib/FieldType/Image/ImageStorage.php @@ -211,5 +211,3 @@ private function buildImageId(VersionInfo $versionInfo, Field $field) ); } } - -class_alias(ImageStorage::class, 'eZ\Publish\Core\FieldType\Image\ImageStorage'); diff --git a/src/lib/FieldType/Image/ImageStorage/Gateway.php b/src/lib/FieldType/Image/ImageStorage/Gateway.php index eb6cdba213..59dcd02aa6 100644 --- a/src/lib/FieldType/Image/ImageStorage/Gateway.php +++ b/src/lib/FieldType/Image/ImageStorage/Gateway.php @@ -82,5 +82,3 @@ abstract public function countDistinctImagesData(): int; abstract public function hasImageReference(string $uri, int $fieldId): bool; } - -class_alias(Gateway::class, 'eZ\Publish\Core\FieldType\Image\ImageStorage\Gateway'); diff --git a/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php index 6a5dda82a1..e3794b2e9d 100644 --- a/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php @@ -492,5 +492,3 @@ public function hasImageReference(string $uri, int $fieldId): bool return (bool)$statement->fetchOne(); } } - -class_alias(DoctrineStorage::class, 'eZ\Publish\Core\FieldType\Image\ImageStorage\Gateway\DoctrineStorage'); diff --git a/src/lib/FieldType/Image/ImageThumbnailProxyStrategy.php b/src/lib/FieldType/Image/ImageThumbnailProxyStrategy.php index eac301a992..1319a9ae42 100644 --- a/src/lib/FieldType/Image/ImageThumbnailProxyStrategy.php +++ b/src/lib/FieldType/Image/ImageThumbnailProxyStrategy.php @@ -55,5 +55,3 @@ public function getThumbnail(Field $field, ?VersionInfo $versionInfo = null): ?T return $this->proxyGenerator->createProxy(Thumbnail::class, $initializer); } } - -class_alias(ImageThumbnailProxyStrategy::class, 'eZ\Publish\Core\FieldType\Image\ImageThumbnailProxyStrategy'); diff --git a/src/lib/FieldType/Image/ImageThumbnailStrategy.php b/src/lib/FieldType/Image/ImageThumbnailStrategy.php index 4c4b63eb8d..79b31c34b7 100644 --- a/src/lib/FieldType/Image/ImageThumbnailStrategy.php +++ b/src/lib/FieldType/Image/ImageThumbnailStrategy.php @@ -107,5 +107,3 @@ private function generateContentDetailsMessage(?APIVersionInfo $versionInfo): st : ''; } } - -class_alias(ImageThumbnailStrategy::class, 'eZ\Publish\Core\FieldType\Image\ImageThumbnailStrategy'); diff --git a/src/lib/FieldType/Image/NullAliasCleaner.php b/src/lib/FieldType/Image/NullAliasCleaner.php index d8cfc90f85..f3ffb523b3 100644 --- a/src/lib/FieldType/Image/NullAliasCleaner.php +++ b/src/lib/FieldType/Image/NullAliasCleaner.php @@ -23,5 +23,3 @@ public function removeAliases($originalPath): void // Nothing to do } } - -class_alias(NullAliasCleaner::class, 'eZ\Publish\Core\FieldType\Image\NullAliasCleaner'); diff --git a/src/lib/FieldType/Image/PathGenerator.php b/src/lib/FieldType/Image/PathGenerator.php index 9b9cd6b7ac..ce88a9a5f9 100644 --- a/src/lib/FieldType/Image/PathGenerator.php +++ b/src/lib/FieldType/Image/PathGenerator.php @@ -22,5 +22,3 @@ abstract class PathGenerator */ abstract public function getStoragePathForField($fieldId, $versionNo, $languageCode); } - -class_alias(PathGenerator::class, 'eZ\Publish\Core\FieldType\Image\PathGenerator'); diff --git a/src/lib/FieldType/Image/PathGenerator/LegacyPathGenerator.php b/src/lib/FieldType/Image/PathGenerator/LegacyPathGenerator.php index a415fcc8c9..4de319195d 100644 --- a/src/lib/FieldType/Image/PathGenerator/LegacyPathGenerator.php +++ b/src/lib/FieldType/Image/PathGenerator/LegacyPathGenerator.php @@ -53,5 +53,3 @@ private function getDirectoryStructure($id) ); } } - -class_alias(LegacyPathGenerator::class, 'eZ\Publish\Core\FieldType\Image\PathGenerator\LegacyPathGenerator'); diff --git a/src/lib/FieldType/Image/SearchField.php b/src/lib/FieldType/Image/SearchField.php index 78de5cab1d..12b4b2e7a1 100644 --- a/src/lib/FieldType/Image/SearchField.php +++ b/src/lib/FieldType/Image/SearchField.php @@ -124,5 +124,3 @@ private function getOrientation( : Orientation::PORTRAIT; } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\Image\SearchField'); diff --git a/src/lib/FieldType/Image/Type.php b/src/lib/FieldType/Image/Type.php index 9f90635e2d..4ea29a04ba 100644 --- a/src/lib/FieldType/Image/Type.php +++ b/src/lib/FieldType/Image/Type.php @@ -475,5 +475,3 @@ public function isSearchable(): bool return true; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\Image\Type'); diff --git a/src/lib/FieldType/Image/Value.php b/src/lib/FieldType/Image/Value.php index 9ae04bb388..e92c18b62c 100644 --- a/src/lib/FieldType/Image/Value.php +++ b/src/lib/FieldType/Image/Value.php @@ -184,5 +184,3 @@ public function __set($propertyName, $propertyValue) throw new PropertyNotFoundException($propertyName, static::class); } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\Image\Value'); diff --git a/src/lib/FieldType/ImageAsset/AssetMapper.php b/src/lib/FieldType/ImageAsset/AssetMapper.php index 179409f217..f1e198eb94 100644 --- a/src/lib/FieldType/ImageAsset/AssetMapper.php +++ b/src/lib/FieldType/ImageAsset/AssetMapper.php @@ -186,5 +186,3 @@ protected function getMappings(): array return $this->configResolver->getParameter('fieldtypes.ezimageasset.mappings'); } } - -class_alias(AssetMapper::class, 'eZ\Publish\Core\FieldType\ImageAsset\AssetMapper'); diff --git a/src/lib/FieldType/ImageAsset/ImageAssetThumbnailStrategy.php b/src/lib/FieldType/ImageAsset/ImageAssetThumbnailStrategy.php index 8a18935059..d94bb14ff2 100644 --- a/src/lib/FieldType/ImageAsset/ImageAssetThumbnailStrategy.php +++ b/src/lib/FieldType/ImageAsset/ImageAssetThumbnailStrategy.php @@ -61,5 +61,3 @@ public function getThumbnail(Field $field, ?VersionInfo $versionInfo = null): ?T ); } } - -class_alias(ImageAssetThumbnailStrategy::class, 'eZ\Publish\Core\FieldType\ImageAsset\ImageAssetThumbnailStrategy'); diff --git a/src/lib/FieldType/ImageAsset/SearchField.php b/src/lib/FieldType/ImageAsset/SearchField.php index d09771717c..1cad284644 100644 --- a/src/lib/FieldType/ImageAsset/SearchField.php +++ b/src/lib/FieldType/ImageAsset/SearchField.php @@ -64,5 +64,3 @@ public function getDefaultSortField(): string return $this->getDefaultMatchField(); } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\ImageAsset\SearchField'); diff --git a/src/lib/FieldType/ImageAsset/Type.php b/src/lib/FieldType/ImageAsset/Type.php index ac77946f59..4a362e6859 100644 --- a/src/lib/FieldType/ImageAsset/Type.php +++ b/src/lib/FieldType/ImageAsset/Type.php @@ -327,5 +327,3 @@ private function validateMaxFileSize(Content $content): ?ValidationError return null; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\ImageAsset\Type'); diff --git a/src/lib/FieldType/ImageAsset/Value.php b/src/lib/FieldType/ImageAsset/Value.php index f02c1abde5..e1510d10fa 100644 --- a/src/lib/FieldType/ImageAsset/Value.php +++ b/src/lib/FieldType/ImageAsset/Value.php @@ -46,5 +46,3 @@ public function __toString() return (string) $this->destinationContentId; } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\ImageAsset\Value'); diff --git a/src/lib/FieldType/Integer/SearchField.php b/src/lib/FieldType/Integer/SearchField.php index ebbbe0251b..667ffe00f2 100644 --- a/src/lib/FieldType/Integer/SearchField.php +++ b/src/lib/FieldType/Integer/SearchField.php @@ -68,5 +68,3 @@ public function getDefaultSortField() return $this->getDefaultMatchField(); } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\Integer\SearchField'); diff --git a/src/lib/FieldType/Integer/Type.php b/src/lib/FieldType/Integer/Type.php index c89f1ae3d1..959a410c9a 100644 --- a/src/lib/FieldType/Integer/Type.php +++ b/src/lib/FieldType/Integer/Type.php @@ -279,5 +279,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\Integer\Type'); diff --git a/src/lib/FieldType/Integer/Value.php b/src/lib/FieldType/Integer/Value.php index e2c59bd604..0e533e9597 100644 --- a/src/lib/FieldType/Integer/Value.php +++ b/src/lib/FieldType/Integer/Value.php @@ -36,5 +36,3 @@ public function __toString() return (string)$this->value; } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\Integer\Value'); diff --git a/src/lib/FieldType/Keyword/KeywordStorage.php b/src/lib/FieldType/Keyword/KeywordStorage.php index 1185ba568a..5c3ccc6d8f 100644 --- a/src/lib/FieldType/Keyword/KeywordStorage.php +++ b/src/lib/FieldType/Keyword/KeywordStorage.php @@ -83,5 +83,3 @@ public function getIndexData(VersionInfo $versionInfo, Field $field, array $cont return null; } } - -class_alias(KeywordStorage::class, 'eZ\Publish\Core\FieldType\Keyword\KeywordStorage'); diff --git a/src/lib/FieldType/Keyword/KeywordStorage/Gateway.php b/src/lib/FieldType/Keyword/KeywordStorage/Gateway.php index e38d58370e..11727de2ba 100644 --- a/src/lib/FieldType/Keyword/KeywordStorage/Gateway.php +++ b/src/lib/FieldType/Keyword/KeywordStorage/Gateway.php @@ -41,5 +41,3 @@ abstract public function getContentTypeId(Field $field); */ abstract public function deleteFieldData($fieldId, $versionNo); } - -class_alias(Gateway::class, 'eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway'); diff --git a/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php index e6293f2cb5..d54595b00b 100644 --- a/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php @@ -366,5 +366,3 @@ protected function deleteOrphanedKeywords() $deleteQuery->execute(); } } - -class_alias(DoctrineStorage::class, 'eZ\Publish\Core\FieldType\Keyword\KeywordStorage\Gateway\DoctrineStorage'); diff --git a/src/lib/FieldType/Keyword/SearchField.php b/src/lib/FieldType/Keyword/SearchField.php index 40478c1ae3..b3cc8ef40b 100644 --- a/src/lib/FieldType/Keyword/SearchField.php +++ b/src/lib/FieldType/Keyword/SearchField.php @@ -56,5 +56,3 @@ public function getDefaultSortField() return 'sort_value'; } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\Keyword\SearchField'); diff --git a/src/lib/FieldType/Keyword/Type.php b/src/lib/FieldType/Keyword/Type.php index 35652c7449..b2336144bc 100644 --- a/src/lib/FieldType/Keyword/Type.php +++ b/src/lib/FieldType/Keyword/Type.php @@ -169,5 +169,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\Keyword\Type'); diff --git a/src/lib/FieldType/Keyword/Value.php b/src/lib/FieldType/Keyword/Value.php index 126425d15a..9dc2aa2103 100644 --- a/src/lib/FieldType/Keyword/Value.php +++ b/src/lib/FieldType/Keyword/Value.php @@ -54,5 +54,3 @@ public function __toString() return implode(', ', $this->values); } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\Keyword\Value'); diff --git a/src/lib/FieldType/MapLocation/MapLocationStorage.php b/src/lib/FieldType/MapLocation/MapLocationStorage.php index 29163b2e26..43423fa346 100644 --- a/src/lib/FieldType/MapLocation/MapLocationStorage.php +++ b/src/lib/FieldType/MapLocation/MapLocationStorage.php @@ -72,5 +72,3 @@ public function getIndexData(VersionInfo $versionInfo, Field $field, array $cont return is_array($field->value->externalData) ? $field->value->externalData['address'] : null; } } - -class_alias(MapLocationStorage::class, 'eZ\Publish\Core\FieldType\MapLocation\MapLocationStorage'); diff --git a/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway.php b/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway.php index 03eb94edb5..629e6da54d 100644 --- a/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway.php +++ b/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway.php @@ -47,5 +47,3 @@ abstract public function getFieldData(VersionInfo $versionInfo, Field $field); */ abstract public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds); } - -class_alias(Gateway::class, 'eZ\Publish\Core\FieldType\MapLocation\MapLocationStorage\Gateway'); diff --git a/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php index 7b88427758..db1dc0cc6b 100644 --- a/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php @@ -237,5 +237,3 @@ public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds) $deleteQuery->execute(); } } - -class_alias(DoctrineStorage::class, 'eZ\Publish\Core\FieldType\MapLocation\MapLocationStorage\Gateway\DoctrineStorage'); diff --git a/src/lib/FieldType/MapLocation/SearchField.php b/src/lib/FieldType/MapLocation/SearchField.php index 14aa363909..169af3822d 100644 --- a/src/lib/FieldType/MapLocation/SearchField.php +++ b/src/lib/FieldType/MapLocation/SearchField.php @@ -77,5 +77,3 @@ public function getDefaultSortField() return $this->getDefaultMatchField(); } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\MapLocation\SearchField'); diff --git a/src/lib/FieldType/MapLocation/Type.php b/src/lib/FieldType/MapLocation/Type.php index 1ae6233ba0..4c204177e9 100644 --- a/src/lib/FieldType/MapLocation/Type.php +++ b/src/lib/FieldType/MapLocation/Type.php @@ -211,5 +211,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\MapLocation\Type'); diff --git a/src/lib/FieldType/MapLocation/Value.php b/src/lib/FieldType/MapLocation/Value.php index d621b1bcf9..5118103b49 100644 --- a/src/lib/FieldType/MapLocation/Value.php +++ b/src/lib/FieldType/MapLocation/Value.php @@ -61,5 +61,3 @@ public function __toString() return (string)$this->address; } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\MapLocation\Value'); diff --git a/src/lib/FieldType/Media/MediaStorage.php b/src/lib/FieldType/Media/MediaStorage.php index edbe3e7029..455b014f2b 100644 --- a/src/lib/FieldType/Media/MediaStorage.php +++ b/src/lib/FieldType/Media/MediaStorage.php @@ -15,5 +15,3 @@ class MediaStorage extends BinaryBaseStorage { } - -class_alias(MediaStorage::class, 'eZ\Publish\Core\FieldType\Media\MediaStorage'); diff --git a/src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php index 45c84c8ebc..09d236e1f9 100644 --- a/src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php @@ -143,5 +143,3 @@ protected function setUpdateColumns(QueryBuilder $queryBuilder, VersionInfo $ver ; } } - -class_alias(DoctrineStorage::class, 'eZ\Publish\Core\FieldType\Media\MediaStorage\Gateway\DoctrineStorage'); diff --git a/src/lib/FieldType/Media/SearchField.php b/src/lib/FieldType/Media/SearchField.php index e606ecf2db..11d8a94cce 100644 --- a/src/lib/FieldType/Media/SearchField.php +++ b/src/lib/FieldType/Media/SearchField.php @@ -75,5 +75,3 @@ public function getDefaultSortField() return $this->getDefaultMatchField(); } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\Media\SearchField'); diff --git a/src/lib/FieldType/Media/Type.php b/src/lib/FieldType/Media/Type.php index 0be65a70eb..b03050222d 100644 --- a/src/lib/FieldType/Media/Type.php +++ b/src/lib/FieldType/Media/Type.php @@ -275,5 +275,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\Media\Type'); diff --git a/src/lib/FieldType/Media/Value.php b/src/lib/FieldType/Media/Value.php index d876e1010e..e14ecf335b 100644 --- a/src/lib/FieldType/Media/Value.php +++ b/src/lib/FieldType/Media/Value.php @@ -49,5 +49,3 @@ class Value extends BaseValue */ public $width = 0; } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\Media\Value'); diff --git a/src/lib/FieldType/Null/Type.php b/src/lib/FieldType/Null/Type.php index f1db6f0def..d38e177193 100644 --- a/src/lib/FieldType/Null/Type.php +++ b/src/lib/FieldType/Null/Type.php @@ -131,5 +131,3 @@ public function isSearchable() return true; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\Null\Type'); diff --git a/src/lib/FieldType/Null/Value.php b/src/lib/FieldType/Null/Value.php index dac36e7cd1..a55d5e16dc 100644 --- a/src/lib/FieldType/Null/Value.php +++ b/src/lib/FieldType/Null/Value.php @@ -36,5 +36,3 @@ public function __toString() return (string)$this->value; } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\Null\Value'); diff --git a/src/lib/FieldType/NullStorage.php b/src/lib/FieldType/NullStorage.php index 7a2d745be9..8ac0416415 100644 --- a/src/lib/FieldType/NullStorage.php +++ b/src/lib/FieldType/NullStorage.php @@ -77,5 +77,3 @@ public function copyLegacyField(VersionInfo $versionInfo, Field $field, Field $o return; } } - -class_alias(NullStorage::class, 'eZ\Publish\Core\FieldType\NullStorage'); diff --git a/src/lib/FieldType/Relation/SearchField.php b/src/lib/FieldType/Relation/SearchField.php index 1dbca6075d..a6375377ea 100644 --- a/src/lib/FieldType/Relation/SearchField.php +++ b/src/lib/FieldType/Relation/SearchField.php @@ -63,5 +63,3 @@ public function getDefaultSortField() return $this->getDefaultMatchField(); } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\Relation\SearchField'); diff --git a/src/lib/FieldType/Relation/Type.php b/src/lib/FieldType/Relation/Type.php index 2ac83793c0..dac17b2234 100644 --- a/src/lib/FieldType/Relation/Type.php +++ b/src/lib/FieldType/Relation/Type.php @@ -361,5 +361,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\Relation\Type'); diff --git a/src/lib/FieldType/Relation/Value.php b/src/lib/FieldType/Relation/Value.php index 8d17fee54c..1ad3a7f949 100644 --- a/src/lib/FieldType/Relation/Value.php +++ b/src/lib/FieldType/Relation/Value.php @@ -39,5 +39,3 @@ public function __toString() return (string)$this->destinationContentId; } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\Relation\Value'); diff --git a/src/lib/FieldType/RelationList/SearchField.php b/src/lib/FieldType/RelationList/SearchField.php index bff8716996..fb0b3e1369 100644 --- a/src/lib/FieldType/RelationList/SearchField.php +++ b/src/lib/FieldType/RelationList/SearchField.php @@ -69,5 +69,3 @@ public function getDefaultSortField() return 'sort_value'; } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\RelationList\SearchField'); diff --git a/src/lib/FieldType/RelationList/Type.php b/src/lib/FieldType/RelationList/Type.php index 752dd9a080..321e2af620 100644 --- a/src/lib/FieldType/RelationList/Type.php +++ b/src/lib/FieldType/RelationList/Type.php @@ -500,5 +500,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\RelationList\Type'); diff --git a/src/lib/FieldType/RelationList/Value.php b/src/lib/FieldType/RelationList/Value.php index a7fea0fd29..d4f9f11524 100644 --- a/src/lib/FieldType/RelationList/Value.php +++ b/src/lib/FieldType/RelationList/Value.php @@ -36,5 +36,3 @@ public function __toString() return implode(',', $this->destinationContentIds); } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\RelationList\Value'); diff --git a/src/lib/FieldType/Selection/SearchField.php b/src/lib/FieldType/Selection/SearchField.php index 8e6f06d86b..f54743fdce 100644 --- a/src/lib/FieldType/Selection/SearchField.php +++ b/src/lib/FieldType/Selection/SearchField.php @@ -100,5 +100,3 @@ public function getDefaultSortField() return 'sort_value'; } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\Selection\SearchField'); diff --git a/src/lib/FieldType/Selection/Type.php b/src/lib/FieldType/Selection/Type.php index 9480a77399..1c727547c4 100644 --- a/src/lib/FieldType/Selection/Type.php +++ b/src/lib/FieldType/Selection/Type.php @@ -319,5 +319,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\Selection\Type'); diff --git a/src/lib/FieldType/Selection/Value.php b/src/lib/FieldType/Selection/Value.php index fbbd1666cc..e3dd36b5f5 100644 --- a/src/lib/FieldType/Selection/Value.php +++ b/src/lib/FieldType/Selection/Value.php @@ -36,5 +36,3 @@ public function __toString() return implode(',', $this->selection); } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\Selection\Value'); diff --git a/src/lib/FieldType/StorageGateway.php b/src/lib/FieldType/StorageGateway.php index 55599777cb..fbb1aee40f 100644 --- a/src/lib/FieldType/StorageGateway.php +++ b/src/lib/FieldType/StorageGateway.php @@ -29,5 +29,3 @@ abstract class StorageGateway extends SPIStorageGateway */ abstract public function setConnection($connection); } - -class_alias(StorageGateway::class, 'eZ\Publish\Core\FieldType\StorageGateway'); diff --git a/src/lib/FieldType/TextBlock/SearchField.php b/src/lib/FieldType/TextBlock/SearchField.php index 3dac6110ed..78b105f981 100644 --- a/src/lib/FieldType/TextBlock/SearchField.php +++ b/src/lib/FieldType/TextBlock/SearchField.php @@ -80,5 +80,3 @@ public function getDefaultSortField() return $this->getDefaultMatchField(); } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\TextBlock\SearchField'); diff --git a/src/lib/FieldType/TextBlock/Type.php b/src/lib/FieldType/TextBlock/Type.php index 45e742b2a3..4b2680646f 100644 --- a/src/lib/FieldType/TextBlock/Type.php +++ b/src/lib/FieldType/TextBlock/Type.php @@ -213,5 +213,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\TextBlock\Type'); diff --git a/src/lib/FieldType/TextBlock/Value.php b/src/lib/FieldType/TextBlock/Value.php index fcdb54de29..bc8d61e013 100644 --- a/src/lib/FieldType/TextBlock/Value.php +++ b/src/lib/FieldType/TextBlock/Value.php @@ -15,5 +15,3 @@ class Value extends TextLineValue { } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\TextBlock\Value'); diff --git a/src/lib/FieldType/TextLine/SearchField.php b/src/lib/FieldType/TextLine/SearchField.php index 0c80f3bb45..5cfd1375f4 100644 --- a/src/lib/FieldType/TextLine/SearchField.php +++ b/src/lib/FieldType/TextLine/SearchField.php @@ -68,5 +68,3 @@ public function getDefaultSortField() return $this->getDefaultMatchField(); } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\TextLine\SearchField'); diff --git a/src/lib/FieldType/TextLine/Type.php b/src/lib/FieldType/TextLine/Type.php index f8c6c98d19..ee1589bbcd 100644 --- a/src/lib/FieldType/TextLine/Type.php +++ b/src/lib/FieldType/TextLine/Type.php @@ -256,5 +256,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\TextLine\Type'); diff --git a/src/lib/FieldType/TextLine/Value.php b/src/lib/FieldType/TextLine/Value.php index 8574995650..82b2f12723 100644 --- a/src/lib/FieldType/TextLine/Value.php +++ b/src/lib/FieldType/TextLine/Value.php @@ -36,5 +36,3 @@ public function __toString() return (string)$this->text; } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\TextLine\Value'); diff --git a/src/lib/FieldType/Time/SearchField.php b/src/lib/FieldType/Time/SearchField.php index dd317adb55..be825875ef 100644 --- a/src/lib/FieldType/Time/SearchField.php +++ b/src/lib/FieldType/Time/SearchField.php @@ -63,5 +63,3 @@ public function getDefaultSortField() return $this->getDefaultMatchField(); } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\Time\SearchField'); diff --git a/src/lib/FieldType/Time/Type.php b/src/lib/FieldType/Time/Type.php index 43f0b03c0b..df3fe4ea21 100644 --- a/src/lib/FieldType/Time/Type.php +++ b/src/lib/FieldType/Time/Type.php @@ -257,5 +257,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\Time\Type'); diff --git a/src/lib/FieldType/Time/Value.php b/src/lib/FieldType/Time/Value.php index 1b25435481..29e9057464 100644 --- a/src/lib/FieldType/Time/Value.php +++ b/src/lib/FieldType/Time/Value.php @@ -104,5 +104,3 @@ public function __toString() return $dateTime->format($this->stringFormat); } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\Time\Value'); diff --git a/src/lib/FieldType/Unindexed.php b/src/lib/FieldType/Unindexed.php index 267ce0798e..0491c2b23a 100644 --- a/src/lib/FieldType/Unindexed.php +++ b/src/lib/FieldType/Unindexed.php @@ -52,5 +52,3 @@ public function getDefaultSortField() return null; } } - -class_alias(Unindexed::class, 'eZ\Publish\Core\FieldType\Unindexed'); diff --git a/src/lib/FieldType/Url/SearchField.php b/src/lib/FieldType/Url/SearchField.php index 96bfe2108d..87b24203e7 100644 --- a/src/lib/FieldType/Url/SearchField.php +++ b/src/lib/FieldType/Url/SearchField.php @@ -80,5 +80,3 @@ public function getDefaultSortField() return $this->getDefaultMatchField(); } } - -class_alias(SearchField::class, 'eZ\Publish\Core\FieldType\Url\SearchField'); diff --git a/src/lib/FieldType/Url/Type.php b/src/lib/FieldType/Url/Type.php index bce00c6a31..c3a2cdf1af 100644 --- a/src/lib/FieldType/Url/Type.php +++ b/src/lib/FieldType/Url/Type.php @@ -190,5 +190,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\Url\Type'); diff --git a/src/lib/FieldType/Url/UrlStorage.php b/src/lib/FieldType/Url/UrlStorage.php index cc000db3e1..b135b5827b 100644 --- a/src/lib/FieldType/Url/UrlStorage.php +++ b/src/lib/FieldType/Url/UrlStorage.php @@ -132,5 +132,3 @@ public function getIndexData(VersionInfo $versionInfo, Field $field, array $cont { } } - -class_alias(UrlStorage::class, 'eZ\Publish\Core\FieldType\Url\UrlStorage'); diff --git a/src/lib/FieldType/Url/UrlStorage/Gateway.php b/src/lib/FieldType/Url/UrlStorage/Gateway.php index 487e5aec90..dac59eb04c 100644 --- a/src/lib/FieldType/Url/UrlStorage/Gateway.php +++ b/src/lib/FieldType/Url/UrlStorage/Gateway.php @@ -64,5 +64,3 @@ abstract public function linkUrl($urlId, $fieldId, $versionNo); */ abstract public function unlinkUrl($fieldId, $versionNo, array $excludeUrlIds = []); } - -class_alias(Gateway::class, 'eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway'); diff --git a/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php index 27cc2bd281..2233118e40 100644 --- a/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php @@ -275,5 +275,3 @@ private function deleteOrphanedUrls(array $potentiallyOrphanedUrls): void $deleteQuery->execute(); } } - -class_alias(DoctrineStorage::class, 'eZ\Publish\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage'); diff --git a/src/lib/FieldType/Url/Value.php b/src/lib/FieldType/Url/Value.php index 7bad6b6d9d..ae76e5a900 100644 --- a/src/lib/FieldType/Url/Value.php +++ b/src/lib/FieldType/Url/Value.php @@ -45,5 +45,3 @@ public function __toString() return (string)$this->link; } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\Url\Value'); diff --git a/src/lib/FieldType/User/Type.php b/src/lib/FieldType/User/Type.php index 426aacac2e..a7bf7ec338 100644 --- a/src/lib/FieldType/User/Type.php +++ b/src/lib/FieldType/User/Type.php @@ -554,5 +554,3 @@ public static function getTranslationMessages(): array ]; } } - -class_alias(Type::class, 'eZ\Publish\Core\FieldType\User\Type'); diff --git a/src/lib/FieldType/User/UserStorage.php b/src/lib/FieldType/User/UserStorage.php index 00a7c61041..353083a147 100644 --- a/src/lib/FieldType/User/UserStorage.php +++ b/src/lib/FieldType/User/UserStorage.php @@ -88,5 +88,3 @@ public function countUsersWithUnsupportedHashType(array $supportedHashTypes): in return $this->gateway->countUsersWithUnsupportedHashType($supportedHashTypes); } } - -class_alias(UserStorage::class, 'eZ\Publish\Core\FieldType\User\UserStorage'); diff --git a/src/lib/FieldType/User/UserStorage/Gateway.php b/src/lib/FieldType/User/UserStorage/Gateway.php index 124b302ec6..c62c119769 100644 --- a/src/lib/FieldType/User/UserStorage/Gateway.php +++ b/src/lib/FieldType/User/UserStorage/Gateway.php @@ -56,5 +56,3 @@ abstract public function deleteFieldData(VersionInfo $versionInfo, array $fieldI */ abstract public function countUsersWithUnsupportedHashType(array $supportedHashTypes): int; } - -class_alias(Gateway::class, 'eZ\Publish\Core\FieldType\User\UserStorage\Gateway'); diff --git a/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php index cf054a4177..94236cec61 100644 --- a/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php @@ -441,5 +441,3 @@ public function countUsersWithUnsupportedHashType(array $supportedHashTypes): in ->fetchColumn(); } } - -class_alias(DoctrineStorage::class, 'eZ\Publish\Core\FieldType\User\UserStorage\Gateway\DoctrineStorage'); diff --git a/src/lib/FieldType/User/Value.php b/src/lib/FieldType/User/Value.php index 473117a1ed..92eefb0355 100644 --- a/src/lib/FieldType/User/Value.php +++ b/src/lib/FieldType/User/Value.php @@ -85,5 +85,3 @@ public function __toString() return (string)$this->login; } } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\User\Value'); diff --git a/src/lib/FieldType/ValidationError.php b/src/lib/FieldType/ValidationError.php index 1cf02925d4..4c47e5c382 100644 --- a/src/lib/FieldType/ValidationError.php +++ b/src/lib/FieldType/ValidationError.php @@ -79,5 +79,3 @@ public function getTarget() return $this->target; } } - -class_alias(ValidationError::class, 'eZ\Publish\Core\FieldType\ValidationError'); diff --git a/src/lib/FieldType/Validator.php b/src/lib/FieldType/Validator.php index 18e5ebfa3b..9d514a9655 100644 --- a/src/lib/FieldType/Validator.php +++ b/src/lib/FieldType/Validator.php @@ -178,5 +178,3 @@ public function __set($name, $value) $this->constraints[$name] = $value; } } - -class_alias(Validator::class, 'eZ\Publish\Core\FieldType\Validator'); diff --git a/src/lib/FieldType/Validator/EmailAddressValidator.php b/src/lib/FieldType/Validator/EmailAddressValidator.php index 4b3d2de6a3..254e2f8f54 100644 --- a/src/lib/FieldType/Validator/EmailAddressValidator.php +++ b/src/lib/FieldType/Validator/EmailAddressValidator.php @@ -104,5 +104,3 @@ public function validate(BaseValue $value, ?FieldDefinition $fieldDefinition = n return false; } } - -class_alias(EmailAddressValidator::class, 'eZ\Publish\Core\FieldType\Validator\EmailAddressValidator'); diff --git a/src/lib/FieldType/Validator/FileExtensionBlackListValidator.php b/src/lib/FieldType/Validator/FileExtensionBlackListValidator.php index 7c9fe25c55..eb1c77766a 100644 --- a/src/lib/FieldType/Validator/FileExtensionBlackListValidator.php +++ b/src/lib/FieldType/Validator/FileExtensionBlackListValidator.php @@ -85,5 +85,3 @@ public function getErrors(): array return $this->errors; } } - -class_alias(FileExtensionBlackListValidator::class, 'eZ\Publish\Core\FieldType\Validator\FileExtensionBlackListValidator'); diff --git a/src/lib/FieldType/Validator/FileSizeValidator.php b/src/lib/FieldType/Validator/FileSizeValidator.php index 339a6ad698..cda86de542 100644 --- a/src/lib/FieldType/Validator/FileSizeValidator.php +++ b/src/lib/FieldType/Validator/FileSizeValidator.php @@ -86,5 +86,3 @@ public function validate(BaseValue $value, ?FieldDefinition $fieldDefinition = n return $isValid; } } - -class_alias(FileSizeValidator::class, 'eZ\Publish\Core\FieldType\Validator\FileSizeValidator'); diff --git a/src/lib/FieldType/Validator/FloatValueValidator.php b/src/lib/FieldType/Validator/FloatValueValidator.php index d7b7206688..579d5e3e9f 100644 --- a/src/lib/FieldType/Validator/FloatValueValidator.php +++ b/src/lib/FieldType/Validator/FloatValueValidator.php @@ -113,5 +113,3 @@ public function validate(BaseValue $value, ?FieldDefinition $fieldDefinition = n return $isValid; } } - -class_alias(FloatValueValidator::class, 'eZ\Publish\Core\FieldType\Validator\FloatValueValidator'); diff --git a/src/lib/FieldType/Validator/ImageValidator.php b/src/lib/FieldType/Validator/ImageValidator.php index 5ba56f359f..c421084d0d 100644 --- a/src/lib/FieldType/Validator/ImageValidator.php +++ b/src/lib/FieldType/Validator/ImageValidator.php @@ -87,5 +87,3 @@ private function innerValidate($filePath, array $mimeTypes): bool return true; } } - -class_alias(ImageValidator::class, 'eZ\Publish\Core\FieldType\Validator\ImageValidator'); diff --git a/src/lib/FieldType/Validator/IntegerValueValidator.php b/src/lib/FieldType/Validator/IntegerValueValidator.php index 1aff6c779e..2b4edfa944 100644 --- a/src/lib/FieldType/Validator/IntegerValueValidator.php +++ b/src/lib/FieldType/Validator/IntegerValueValidator.php @@ -116,5 +116,3 @@ public function validate(BaseValue $value, ?FieldDefinition $fieldDefinition = n return $isValid; } } - -class_alias(IntegerValueValidator::class, 'eZ\Publish\Core\FieldType\Validator\IntegerValueValidator'); diff --git a/src/lib/FieldType/Validator/StringLengthValidator.php b/src/lib/FieldType/Validator/StringLengthValidator.php index 75c2a45e56..459d84981d 100644 --- a/src/lib/FieldType/Validator/StringLengthValidator.php +++ b/src/lib/FieldType/Validator/StringLengthValidator.php @@ -138,5 +138,3 @@ public function validate(BaseValue $value, ?FieldDefinition $fieldDefinition = n return $isValid; } } - -class_alias(StringLengthValidator::class, 'eZ\Publish\Core\FieldType\Validator\StringLengthValidator'); diff --git a/src/lib/FieldType/Value.php b/src/lib/FieldType/Value.php index e09b29cab8..e5d1d80079 100644 --- a/src/lib/FieldType/Value.php +++ b/src/lib/FieldType/Value.php @@ -23,5 +23,3 @@ abstract class Value extends ValueObject implements ValueInterface */ abstract public function __toString(); } - -class_alias(Value::class, 'eZ\Publish\Core\FieldType\Value'); diff --git a/src/lib/FieldType/ValueSerializer/SymfonySerializerAdapter.php b/src/lib/FieldType/ValueSerializer/SymfonySerializerAdapter.php index 82cccee54c..9fcdf51393 100644 --- a/src/lib/FieldType/ValueSerializer/SymfonySerializerAdapter.php +++ b/src/lib/FieldType/ValueSerializer/SymfonySerializerAdapter.php @@ -78,5 +78,3 @@ public function decode(?string $data, array $context = []): ?array return $this->decoder->decode($data, $this->format, $context); } } - -class_alias(SymfonySerializerAdapter::class, 'eZ\Publish\Core\FieldType\ValueSerializer\SymfonySerializerAdapter'); diff --git a/src/lib/Helper/ContentInfoLocationLoader.php b/src/lib/Helper/ContentInfoLocationLoader.php index d5205d5640..9d06413801 100644 --- a/src/lib/Helper/ContentInfoLocationLoader.php +++ b/src/lib/Helper/ContentInfoLocationLoader.php @@ -26,5 +26,3 @@ interface ContentInfoLocationLoader */ public function loadLocation(ContentInfo $contentInfo); } - -class_alias(ContentInfoLocationLoader::class, 'eZ\Publish\Core\Helper\ContentInfoLocationLoader'); diff --git a/src/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoader.php b/src/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoader.php index e54d50e1a9..650abe4b5c 100644 --- a/src/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoader.php +++ b/src/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoader.php @@ -43,5 +43,3 @@ static function (Repository $repository) use ($contentInfo) { } } } - -class_alias(SudoMainLocationLoader::class, 'eZ\Publish\Core\Helper\ContentInfoLocationLoader\SudoMainLocationLoader'); diff --git a/src/lib/Helper/ContentPreviewHelper.php b/src/lib/Helper/ContentPreviewHelper.php index d5c1694e95..cc7791bf0e 100644 --- a/src/lib/Helper/ContentPreviewHelper.php +++ b/src/lib/Helper/ContentPreviewHelper.php @@ -134,5 +134,3 @@ public function setPreviewedLocation(Location $previewedLocation) $this->previewedLocation = $previewedLocation; } } - -class_alias(ContentPreviewHelper::class, 'eZ\Publish\Core\Helper\ContentPreviewHelper'); diff --git a/src/lib/Helper/FieldHelper.php b/src/lib/Helper/FieldHelper.php index b701f5b197..1626a60db4 100644 --- a/src/lib/Helper/FieldHelper.php +++ b/src/lib/Helper/FieldHelper.php @@ -68,5 +68,3 @@ public function getFieldDefinition(ContentInfo $contentInfo, $fieldDefIdentifier ->getFieldDefinition($fieldDefIdentifier); } } - -class_alias(FieldHelper::class, 'eZ\Publish\Core\Helper\FieldHelper'); diff --git a/src/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsList.php b/src/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsList.php index a88afe75a1..016d00cbad 100644 --- a/src/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsList.php +++ b/src/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsList.php @@ -65,5 +65,3 @@ public function getFieldGroup(FieldDefinition $fieldDefinition): string return $fieldDefinition->fieldGroup; } } - -class_alias(ArrayTranslatorFieldsGroupsList::class, 'eZ\Publish\Core\Helper\FieldsGroups\ArrayTranslatorFieldsGroupsList'); diff --git a/src/lib/Helper/FieldsGroups/FieldsGroupsList.php b/src/lib/Helper/FieldsGroups/FieldsGroupsList.php index 4e349a51cc..d2e4cd0b0b 100644 --- a/src/lib/Helper/FieldsGroups/FieldsGroupsList.php +++ b/src/lib/Helper/FieldsGroups/FieldsGroupsList.php @@ -39,5 +39,3 @@ public function getDefaultGroup(); */ public function getFieldGroup(FieldDefinition $fieldDefinition): string; } - -class_alias(FieldsGroupsList::class, 'eZ\Publish\Core\Helper\FieldsGroups\FieldsGroupsList'); diff --git a/src/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactory.php b/src/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactory.php index 815fa4dcd7..9c44ca199e 100644 --- a/src/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactory.php +++ b/src/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactory.php @@ -34,5 +34,3 @@ public function build(TranslatorInterface $translator) ); } } - -class_alias(RepositoryConfigFieldsGroupsListFactory::class, 'eZ\Publish\Core\Helper\FieldsGroups\RepositoryConfigFieldsGroupsListFactory'); diff --git a/src/lib/Helper/PreviewLocationProvider.php b/src/lib/Helper/PreviewLocationProvider.php index 5c2a515c23..1e96f65a6c 100644 --- a/src/lib/Helper/PreviewLocationProvider.php +++ b/src/lib/Helper/PreviewLocationProvider.php @@ -114,5 +114,3 @@ public function loadMainLocationByContent(APIContent $content): ?APILocation return $location; } } - -class_alias(PreviewLocationProvider::class, 'eZ\Publish\Core\Helper\PreviewLocationProvider'); diff --git a/src/lib/Helper/TranslationHelper.php b/src/lib/Helper/TranslationHelper.php index 23484d7c6f..d882889c35 100644 --- a/src/lib/Helper/TranslationHelper.php +++ b/src/lib/Helper/TranslationHelper.php @@ -313,5 +313,3 @@ private function getLanguages($forcedLanguage = null, $fallbackLanguage = null) return $languages; } } - -class_alias(TranslationHelper::class, 'eZ\Publish\Core\Helper\TranslationHelper'); diff --git a/src/lib/IO/ConfigScopeChangeAwareIOService.php b/src/lib/IO/ConfigScopeChangeAwareIOService.php index 467a2abe2b..8f35446630 100644 --- a/src/lib/IO/ConfigScopeChangeAwareIOService.php +++ b/src/lib/IO/ConfigScopeChangeAwareIOService.php @@ -118,5 +118,3 @@ public function onConfigScopeChange(ScopeChangeEvent $event): void $this->setPrefix($this->configResolver->getParameter($this->prefixParameterName)); } } - -class_alias(ConfigScopeChangeAwareIOService::class, 'eZ\Publish\Core\IO\ConfigScopeChangeAwareIOService'); diff --git a/src/lib/IO/Exception/BinaryFileNotFoundException.php b/src/lib/IO/Exception/BinaryFileNotFoundException.php index fca6c6b7b4..6cab9dcfc0 100644 --- a/src/lib/IO/Exception/BinaryFileNotFoundException.php +++ b/src/lib/IO/Exception/BinaryFileNotFoundException.php @@ -17,5 +17,3 @@ public function __construct($path, Exception $previous = null) parent::__construct('BinaryFile', $path, $previous); } } - -class_alias(BinaryFileNotFoundException::class, 'eZ\Publish\Core\IO\Exception\BinaryFileNotFoundException'); diff --git a/src/lib/IO/Exception/IOException.php b/src/lib/IO/Exception/IOException.php index 374d5e26a3..ef557d5159 100644 --- a/src/lib/IO/Exception/IOException.php +++ b/src/lib/IO/Exception/IOException.php @@ -20,5 +20,3 @@ public function __construct($message, Exception $e = null) parent::__construct($message, 0, $e); } } - -class_alias(IOException::class, 'eZ\Publish\Core\IO\Exception\IOException'); diff --git a/src/lib/IO/Exception/InvalidBinaryAbsolutePathException.php b/src/lib/IO/Exception/InvalidBinaryAbsolutePathException.php index 1ebb8c8e7a..175eaa090e 100644 --- a/src/lib/IO/Exception/InvalidBinaryAbsolutePathException.php +++ b/src/lib/IO/Exception/InvalidBinaryAbsolutePathException.php @@ -20,5 +20,3 @@ public function __construct($id, $code = 0) Exception::__construct($this->getBaseTranslation(), $code); } } - -class_alias(InvalidBinaryAbsolutePathException::class, 'eZ\Publish\Core\IO\Exception\InvalidBinaryAbsolutePathException'); diff --git a/src/lib/IO/Exception/InvalidBinaryFileIdException.php b/src/lib/IO/Exception/InvalidBinaryFileIdException.php index 215ca49fb5..0d2b8ff1c7 100644 --- a/src/lib/IO/Exception/InvalidBinaryFileIdException.php +++ b/src/lib/IO/Exception/InvalidBinaryFileIdException.php @@ -16,5 +16,3 @@ public function __construct($id) parent::__construct('BinaryFile::id', $id, 'BinaryFile'); } } - -class_alias(InvalidBinaryFileIdException::class, 'eZ\Publish\Core\IO\Exception\InvalidBinaryFileIdException'); diff --git a/src/lib/IO/Exception/InvalidBinaryPrefixException.php b/src/lib/IO/Exception/InvalidBinaryPrefixException.php index 423f8294ea..ca8dbcd364 100644 --- a/src/lib/IO/Exception/InvalidBinaryPrefixException.php +++ b/src/lib/IO/Exception/InvalidBinaryPrefixException.php @@ -20,5 +20,3 @@ public function __construct($id, $prefix, $code = 0) Exception::__construct($this->getBaseTranslation(), $code); } } - -class_alias(InvalidBinaryPrefixException::class, 'eZ\Publish\Core\IO\Exception\InvalidBinaryPrefixException'); diff --git a/src/lib/IO/FilePathNormalizer/Flysystem.php b/src/lib/IO/FilePathNormalizer/Flysystem.php index 94472cd60f..9fade42eea 100644 --- a/src/lib/IO/FilePathNormalizer/Flysystem.php +++ b/src/lib/IO/FilePathNormalizer/Flysystem.php @@ -43,5 +43,3 @@ public function normalizePath(string $filePath, bool $doHash = true): string return $filePath . $normalizedFileName; } } - -class_alias(Flysystem::class, 'eZ\Publish\Core\IO\FilePathNormalizer\Flysystem'); diff --git a/src/lib/IO/FilePathNormalizerInterface.php b/src/lib/IO/FilePathNormalizerInterface.php index 3d72bcce5c..b367a9b241 100644 --- a/src/lib/IO/FilePathNormalizerInterface.php +++ b/src/lib/IO/FilePathNormalizerInterface.php @@ -15,5 +15,3 @@ interface FilePathNormalizerInterface { public function normalizePath(string $filePath, bool $doHash = true): string; } - -class_alias(FilePathNormalizerInterface::class, 'eZ\Publish\Core\IO\FilePathNormalizerInterface'); diff --git a/src/lib/IO/IOBinarydataHandler.php b/src/lib/IO/IOBinarydataHandler.php index 4b5cf4207d..6b6e697403 100644 --- a/src/lib/IO/IOBinarydataHandler.php +++ b/src/lib/IO/IOBinarydataHandler.php @@ -79,5 +79,3 @@ public function getIdFromUri($binaryFileUri); */ public function deleteDirectory($spiPath); } - -class_alias(IOBinarydataHandler::class, 'eZ\Publish\Core\IO\IOBinarydataHandler'); diff --git a/src/lib/IO/IOBinarydataHandler/Flysystem.php b/src/lib/IO/IOBinarydataHandler/Flysystem.php index 5274a5bc1a..6e8463207c 100644 --- a/src/lib/IO/IOBinarydataHandler/Flysystem.php +++ b/src/lib/IO/IOBinarydataHandler/Flysystem.php @@ -101,5 +101,3 @@ public function deleteDirectory($spiPath): void } } } - -class_alias(Flysystem::class, 'eZ\Publish\Core\IO\IOBinarydataHandler\Flysystem'); diff --git a/src/lib/IO/IOBinarydataHandler/SiteAccessDependentBinaryDataHandler.php b/src/lib/IO/IOBinarydataHandler/SiteAccessDependentBinaryDataHandler.php index 581092828f..c4ab5a7ebb 100644 --- a/src/lib/IO/IOBinarydataHandler/SiteAccessDependentBinaryDataHandler.php +++ b/src/lib/IO/IOBinarydataHandler/SiteAccessDependentBinaryDataHandler.php @@ -73,5 +73,3 @@ public function deleteDirectory($spiPath) return $this->getHandler()->deleteDirectory($spiPath); } } - -class_alias(SiteAccessDependentBinaryDataHandler::class, 'eZ\Publish\Core\IO\IOBinarydataHandler\SiteAccessDependentBinaryDataHandler'); diff --git a/src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php b/src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php index 665c64a46f..b0b570f2c2 100644 --- a/src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php +++ b/src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php @@ -68,5 +68,3 @@ public function deleteDirectory($spiPath) return $this->getHandler()->deleteDirectory($spiPath); } } - -class_alias(SiteAccessDependentMetadataHandler::class, 'eZ\Publish\Core\IO\IOBinarydataHandler\SiteAccessDependentMetadataHandler'); diff --git a/src/lib/IO/IOConfigProvider.php b/src/lib/IO/IOConfigProvider.php index e481d33053..cefcf54e93 100644 --- a/src/lib/IO/IOConfigProvider.php +++ b/src/lib/IO/IOConfigProvider.php @@ -21,5 +21,3 @@ public function getLegacyUrlPrefix(): string; public function getUrlPrefix(): string; } - -class_alias(IOConfigProvider::class, 'eZ\Publish\Core\IO\IOConfigProvider'); diff --git a/src/lib/IO/IOMetadataHandler.php b/src/lib/IO/IOMetadataHandler.php index 657fd7c401..8a8d468f92 100644 --- a/src/lib/IO/IOMetadataHandler.php +++ b/src/lib/IO/IOMetadataHandler.php @@ -65,5 +65,3 @@ public function getMimeType($spiBinaryFileId); public function deleteDirectory($spiPath); } - -class_alias(IOMetadataHandler::class, 'eZ\Publish\Core\IO\IOMetadataHandler'); diff --git a/src/lib/IO/IOMetadataHandler/Flysystem.php b/src/lib/IO/IOMetadataHandler/Flysystem.php index 2c3f6005a3..678d10f4ec 100644 --- a/src/lib/IO/IOMetadataHandler/Flysystem.php +++ b/src/lib/IO/IOMetadataHandler/Flysystem.php @@ -118,5 +118,3 @@ private function getIOBinaryFile(string $spiBinaryFileId): IOBinaryFile return $spiBinaryFile; } } - -class_alias(Flysystem::class, 'eZ\Publish\Core\IO\IOMetadataHandler\Flysystem'); diff --git a/src/lib/IO/IOService.php b/src/lib/IO/IOService.php index 791e05a5bf..468c200eaa 100644 --- a/src/lib/IO/IOService.php +++ b/src/lib/IO/IOService.php @@ -335,5 +335,3 @@ protected function isAbsolutePath($path) return $path[0] === '/' || (PHP_OS === 'WINNT' && $path[1] === ':'); } } - -class_alias(IOService::class, 'eZ\Publish\Core\IO\IOService'); diff --git a/src/lib/IO/IOServiceInterface.php b/src/lib/IO/IOServiceInterface.php index 19d8d62099..affd036b95 100644 --- a/src/lib/IO/IOServiceInterface.php +++ b/src/lib/IO/IOServiceInterface.php @@ -172,5 +172,3 @@ public function newBinaryCreateStructFromUploadedFile(array $uploadedFile); */ public function deleteDirectory($path); } - -class_alias(IOServiceInterface::class, 'eZ\Publish\Core\IO\IOServiceInterface'); diff --git a/src/lib/IO/MetadataHandler.php b/src/lib/IO/MetadataHandler.php index 1d30271053..453fc56198 100644 --- a/src/lib/IO/MetadataHandler.php +++ b/src/lib/IO/MetadataHandler.php @@ -21,5 +21,3 @@ interface MetadataHandler */ public function extract($path); } - -class_alias(MetadataHandler::class, 'eZ\Publish\Core\IO\MetadataHandler'); diff --git a/src/lib/IO/MetadataHandler/ImageSize.php b/src/lib/IO/MetadataHandler/ImageSize.php index 06b9aec4d1..8e41e2c861 100644 --- a/src/lib/IO/MetadataHandler/ImageSize.php +++ b/src/lib/IO/MetadataHandler/ImageSize.php @@ -26,5 +26,3 @@ public function extract($filePath) ]; } } - -class_alias(ImageSize::class, 'eZ\Publish\Core\IO\MetadataHandler\ImageSize'); diff --git a/src/lib/IO/MimeTypeDetector/FileInfo.php b/src/lib/IO/MimeTypeDetector/FileInfo.php index 1633b10f8f..6dfd600c0d 100644 --- a/src/lib/IO/MimeTypeDetector/FileInfo.php +++ b/src/lib/IO/MimeTypeDetector/FileInfo.php @@ -54,5 +54,3 @@ protected function getFileInfo() return $this->fileInfo; } } - -class_alias(FileInfo::class, 'eZ\Publish\Core\IO\MimeTypeDetector\FileInfo'); diff --git a/src/lib/IO/TolerantIOService.php b/src/lib/IO/TolerantIOService.php index c954fa5775..c388b8026a 100644 --- a/src/lib/IO/TolerantIOService.php +++ b/src/lib/IO/TolerantIOService.php @@ -129,5 +129,3 @@ private function logMissingFile($id) $this->logger->info("BinaryFile with id $id not found"); } } - -class_alias(TolerantIOService::class, 'eZ\Publish\Core\IO\TolerantIOService'); diff --git a/src/lib/IO/UrlDecorator.php b/src/lib/IO/UrlDecorator.php index 61999a9ecb..3596534338 100644 --- a/src/lib/IO/UrlDecorator.php +++ b/src/lib/IO/UrlDecorator.php @@ -30,5 +30,3 @@ public function decorate($uri); */ public function undecorate($uri); } - -class_alias(UrlDecorator::class, 'eZ\Publish\Core\IO\UrlDecorator'); diff --git a/src/lib/IO/UrlDecorator/AbsolutePrefix.php b/src/lib/IO/UrlDecorator/AbsolutePrefix.php index 661053b13d..99a08289c8 100644 --- a/src/lib/IO/UrlDecorator/AbsolutePrefix.php +++ b/src/lib/IO/UrlDecorator/AbsolutePrefix.php @@ -32,5 +32,3 @@ public function getPrefix(): string return $prefix; } } - -class_alias(AbsolutePrefix::class, 'eZ\Publish\Core\IO\UrlDecorator\AbsolutePrefix'); diff --git a/src/lib/IO/UrlDecorator/Prefix.php b/src/lib/IO/UrlDecorator/Prefix.php index 66dbcfc2b9..64576fa977 100644 --- a/src/lib/IO/UrlDecorator/Prefix.php +++ b/src/lib/IO/UrlDecorator/Prefix.php @@ -59,5 +59,3 @@ public function undecorate($url) return trim(substr($url, strlen($prefix)), '/'); } } - -class_alias(Prefix::class, 'eZ\Publish\Core\IO\UrlDecorator\Prefix'); diff --git a/src/lib/IO/UrlRedecorator.php b/src/lib/IO/UrlRedecorator.php index b3bc3d2640..ed4f470335 100644 --- a/src/lib/IO/UrlRedecorator.php +++ b/src/lib/IO/UrlRedecorator.php @@ -38,5 +38,3 @@ public function redecorateFromTarget($uri) ); } } - -class_alias(UrlRedecorator::class, 'eZ\Publish\Core\IO\UrlRedecorator'); diff --git a/src/lib/IO/UrlRedecoratorInterface.php b/src/lib/IO/UrlRedecoratorInterface.php index 6466dae982..dcd8f501b0 100644 --- a/src/lib/IO/UrlRedecoratorInterface.php +++ b/src/lib/IO/UrlRedecoratorInterface.php @@ -47,5 +47,3 @@ public function redecorateFromSource($uri); */ public function redecorateFromTarget($uri); } - -class_alias(UrlRedecoratorInterface::class, 'eZ\Publish\Core\IO\UrlRedecoratorInterface'); diff --git a/src/lib/IO/Values/BinaryFile.php b/src/lib/IO/Values/BinaryFile.php index 46c2b09adf..20033a617e 100644 --- a/src/lib/IO/Values/BinaryFile.php +++ b/src/lib/IO/Values/BinaryFile.php @@ -61,5 +61,3 @@ class BinaryFile extends ValueObject */ public $mimeType; } - -class_alias(BinaryFile::class, 'eZ\Publish\Core\IO\Values\BinaryFile'); diff --git a/src/lib/IO/Values/BinaryFileCreateStruct.php b/src/lib/IO/Values/BinaryFileCreateStruct.php index af284e83ab..353b5601fd 100644 --- a/src/lib/IO/Values/BinaryFileCreateStruct.php +++ b/src/lib/IO/Values/BinaryFileCreateStruct.php @@ -44,5 +44,3 @@ class BinaryFileCreateStruct extends ValueObject */ public $mimeType; } - -class_alias(BinaryFileCreateStruct::class, 'eZ\Publish\Core\IO\Values\BinaryFileCreateStruct'); diff --git a/src/lib/IO/Values/MissingBinaryFile.php b/src/lib/IO/Values/MissingBinaryFile.php index 4bebe3c02c..475e9cc82c 100644 --- a/src/lib/IO/Values/MissingBinaryFile.php +++ b/src/lib/IO/Values/MissingBinaryFile.php @@ -15,5 +15,3 @@ class MissingBinaryFile extends BinaryFile { } - -class_alias(MissingBinaryFile::class, 'eZ\Publish\Core\IO\Values\MissingBinaryFile'); diff --git a/src/lib/Limitation/AbstractPersistenceLimitationType.php b/src/lib/Limitation/AbstractPersistenceLimitationType.php index e6bdb26a9c..61a7d19c9c 100644 --- a/src/lib/Limitation/AbstractPersistenceLimitationType.php +++ b/src/lib/Limitation/AbstractPersistenceLimitationType.php @@ -25,5 +25,3 @@ public function __construct(SPIPersistenceHandler $persistence) $this->persistence = $persistence; } } - -class_alias(AbstractPersistenceLimitationType::class, 'eZ\Publish\Core\Limitation\AbstractPersistenceLimitationType'); diff --git a/src/lib/Limitation/BlockingLimitationType.php b/src/lib/Limitation/BlockingLimitationType.php index 38f64cc444..a43604e3d1 100644 --- a/src/lib/Limitation/BlockingLimitationType.php +++ b/src/lib/Limitation/BlockingLimitationType.php @@ -150,5 +150,3 @@ public function valueSchema() throw new NotImplementedException(__METHOD__); } } - -class_alias(BlockingLimitationType::class, 'eZ\Publish\Core\Limitation\BlockingLimitationType'); diff --git a/src/lib/Limitation/ContentTypeLimitationType.php b/src/lib/Limitation/ContentTypeLimitationType.php index 62f13dfdcf..067792d2df 100644 --- a/src/lib/Limitation/ContentTypeLimitationType.php +++ b/src/lib/Limitation/ContentTypeLimitationType.php @@ -234,5 +234,3 @@ private function evaluateMatchingAnyLimitation( : self::ACCESS_GRANTED; } } - -class_alias(ContentTypeLimitationType::class, 'eZ\Publish\Core\Limitation\ContentTypeLimitationType'); diff --git a/src/lib/Limitation/LanguageLimitation/ContentDeleteEvaluator.php b/src/lib/Limitation/LanguageLimitation/ContentDeleteEvaluator.php index 1019b1f9be..09ffba7ccd 100644 --- a/src/lib/Limitation/LanguageLimitation/ContentDeleteEvaluator.php +++ b/src/lib/Limitation/LanguageLimitation/ContentDeleteEvaluator.php @@ -38,5 +38,3 @@ public function evaluate(Target\Version $targetVersion, Limitation $limitationVa return $accessVote; } } - -class_alias(ContentDeleteEvaluator::class, 'eZ\Publish\Core\Limitation\LanguageLimitation\ContentDeleteEvaluator'); diff --git a/src/lib/Limitation/LanguageLimitation/ContentTranslationEvaluator.php b/src/lib/Limitation/LanguageLimitation/ContentTranslationEvaluator.php index f868fbbe9f..f59c5bb5fd 100644 --- a/src/lib/Limitation/LanguageLimitation/ContentTranslationEvaluator.php +++ b/src/lib/Limitation/LanguageLimitation/ContentTranslationEvaluator.php @@ -37,5 +37,3 @@ public function evaluate(Target\Version $targetVersion, Limitation $limitationVa : LanguageLimitationType::ACCESS_GRANTED; } } - -class_alias(ContentTranslationEvaluator::class, 'eZ\Publish\Core\Limitation\LanguageLimitation\ContentTranslationEvaluator'); diff --git a/src/lib/Limitation/LanguageLimitation/NewDraftEvaluator.php b/src/lib/Limitation/LanguageLimitation/NewDraftEvaluator.php index 5dbe8a261b..dac2c2e890 100644 --- a/src/lib/Limitation/LanguageLimitation/NewDraftEvaluator.php +++ b/src/lib/Limitation/LanguageLimitation/NewDraftEvaluator.php @@ -28,5 +28,3 @@ public function evaluate(Target\Version $targetVersion, Limitation $limitationVa return LanguageLimitationType::ACCESS_GRANTED; } } - -class_alias(NewDraftEvaluator::class, 'eZ\Publish\Core\Limitation\LanguageLimitation\NewDraftEvaluator'); diff --git a/src/lib/Limitation/LanguageLimitation/VersionPublishingEvaluator.php b/src/lib/Limitation/LanguageLimitation/VersionPublishingEvaluator.php index 7788285e23..c26264b0ad 100644 --- a/src/lib/Limitation/LanguageLimitation/VersionPublishingEvaluator.php +++ b/src/lib/Limitation/LanguageLimitation/VersionPublishingEvaluator.php @@ -37,5 +37,3 @@ public function evaluate(Target\Version $targetVersion, Limitation $limitationVa : LanguageLimitationType::ACCESS_DENIED; } } - -class_alias(VersionPublishingEvaluator::class, 'eZ\Publish\Core\Limitation\LanguageLimitation\VersionPublishingEvaluator'); diff --git a/src/lib/Limitation/LanguageLimitation/VersionTargetEvaluator.php b/src/lib/Limitation/LanguageLimitation/VersionTargetEvaluator.php index c0893ef662..0f59de81de 100644 --- a/src/lib/Limitation/LanguageLimitation/VersionTargetEvaluator.php +++ b/src/lib/Limitation/LanguageLimitation/VersionTargetEvaluator.php @@ -20,5 +20,3 @@ public function accept(Target\Version $targetVersion): bool; public function evaluate(Target\Version $targetVersion, Limitation $limitationValue): ?bool; } - -class_alias(VersionTargetEvaluator::class, 'eZ\Publish\Core\Limitation\LanguageLimitation\VersionTargetEvaluator'); diff --git a/src/lib/Limitation/LanguageLimitation/VersionTranslationUpdateEvaluator.php b/src/lib/Limitation/LanguageLimitation/VersionTranslationUpdateEvaluator.php index 69af200c50..a9acdb1cb6 100644 --- a/src/lib/Limitation/LanguageLimitation/VersionTranslationUpdateEvaluator.php +++ b/src/lib/Limitation/LanguageLimitation/VersionTranslationUpdateEvaluator.php @@ -53,5 +53,3 @@ public function evaluate(Target\Version $targetVersion, Limitation $limitationVa return $accessVote; } } - -class_alias(VersionTranslationUpdateEvaluator::class, 'eZ\Publish\Core\Limitation\LanguageLimitation\VersionTranslationUpdateEvaluator'); diff --git a/src/lib/Limitation/LanguageLimitationType.php b/src/lib/Limitation/LanguageLimitationType.php index a1299443bd..818e2dc549 100644 --- a/src/lib/Limitation/LanguageLimitationType.php +++ b/src/lib/Limitation/LanguageLimitationType.php @@ -338,5 +338,3 @@ public function valueSchema(): array return []; } } - -class_alias(LanguageLimitationType::class, 'eZ\Publish\Core\Limitation\LanguageLimitationType'); diff --git a/src/lib/Limitation/LocationLimitationType.php b/src/lib/Limitation/LocationLimitationType.php index 45c0e3f535..269771cf6e 100644 --- a/src/lib/Limitation/LocationLimitationType.php +++ b/src/lib/Limitation/LocationLimitationType.php @@ -235,5 +235,3 @@ public function valueSchema() return self::VALUE_SCHEMA_LOCATION_ID; } } - -class_alias(LocationLimitationType::class, 'eZ\Publish\Core\Limitation\LocationLimitationType'); diff --git a/src/lib/Limitation/NewObjectStateLimitationType.php b/src/lib/Limitation/NewObjectStateLimitationType.php index d6e21ec666..c8dd82359a 100644 --- a/src/lib/Limitation/NewObjectStateLimitationType.php +++ b/src/lib/Limitation/NewObjectStateLimitationType.php @@ -167,5 +167,3 @@ public function valueSchema() throw new NotImplementedException(__METHOD__); } } - -class_alias(NewObjectStateLimitationType::class, 'eZ\Publish\Core\Limitation\NewObjectStateLimitationType'); diff --git a/src/lib/Limitation/NewSectionLimitationType.php b/src/lib/Limitation/NewSectionLimitationType.php index 317582025d..f5643bd3cd 100644 --- a/src/lib/Limitation/NewSectionLimitationType.php +++ b/src/lib/Limitation/NewSectionLimitationType.php @@ -200,5 +200,3 @@ private function doEvaluate(APILimitationValue $value, array $targets): bool return true; } } - -class_alias(NewSectionLimitationType::class, 'eZ\Publish\Core\Limitation\NewSectionLimitationType'); diff --git a/src/lib/Limitation/ObjectStateLimitationType.php b/src/lib/Limitation/ObjectStateLimitationType.php index e103e9ab9c..321fdd49c6 100644 --- a/src/lib/Limitation/ObjectStateLimitationType.php +++ b/src/lib/Limitation/ObjectStateLimitationType.php @@ -369,5 +369,3 @@ private function getObjectStateIdsToVerify( return $objectStateIdsToVerify; } } - -class_alias(ObjectStateLimitationType::class, 'eZ\Publish\Core\Limitation\ObjectStateLimitationType'); diff --git a/src/lib/Limitation/OwnerLimitationType.php b/src/lib/Limitation/OwnerLimitationType.php index 3967042601..e06334e5b0 100644 --- a/src/lib/Limitation/OwnerLimitationType.php +++ b/src/lib/Limitation/OwnerLimitationType.php @@ -189,5 +189,3 @@ public function valueSchema() throw new NotImplementedException(__METHOD__); } } - -class_alias(OwnerLimitationType::class, 'eZ\Publish\Core\Limitation\OwnerLimitationType'); diff --git a/src/lib/Limitation/ParentContentTypeLimitationType.php b/src/lib/Limitation/ParentContentTypeLimitationType.php index 16b417f59c..504132f1ee 100644 --- a/src/lib/Limitation/ParentContentTypeLimitationType.php +++ b/src/lib/Limitation/ParentContentTypeLimitationType.php @@ -258,5 +258,3 @@ private function loadParentLocations(ContentInfo $contentInfo) return $parentLocations; } } - -class_alias(ParentContentTypeLimitationType::class, 'eZ\Publish\Core\Limitation\ParentContentTypeLimitationType'); diff --git a/src/lib/Limitation/ParentDepthLimitationType.php b/src/lib/Limitation/ParentDepthLimitationType.php index bcdcf47b1d..0fc70d7873 100644 --- a/src/lib/Limitation/ParentDepthLimitationType.php +++ b/src/lib/Limitation/ParentDepthLimitationType.php @@ -217,5 +217,3 @@ public function valueSchema() throw new NotImplementedException(__METHOD__); } } - -class_alias(ParentDepthLimitationType::class, 'eZ\Publish\Core\Limitation\ParentDepthLimitationType'); diff --git a/src/lib/Limitation/ParentOwnerLimitationType.php b/src/lib/Limitation/ParentOwnerLimitationType.php index 9e90a79321..335f0dee8f 100644 --- a/src/lib/Limitation/ParentOwnerLimitationType.php +++ b/src/lib/Limitation/ParentOwnerLimitationType.php @@ -190,5 +190,3 @@ public function valueSchema() throw new NotImplementedException(__METHOD__); } } - -class_alias(ParentOwnerLimitationType::class, 'eZ\Publish\Core\Limitation\ParentOwnerLimitationType'); diff --git a/src/lib/Limitation/ParentUserGroupLimitationType.php b/src/lib/Limitation/ParentUserGroupLimitationType.php index fb7bc3cf28..6bf4f0d3be 100644 --- a/src/lib/Limitation/ParentUserGroupLimitationType.php +++ b/src/lib/Limitation/ParentUserGroupLimitationType.php @@ -214,5 +214,3 @@ public function valueSchema() throw new NotImplementedException(__METHOD__); } } - -class_alias(ParentUserGroupLimitationType::class, 'eZ\Publish\Core\Limitation\ParentUserGroupLimitationType'); diff --git a/src/lib/Limitation/SectionLimitationType.php b/src/lib/Limitation/SectionLimitationType.php index 015c7cf014..bf6eb784d0 100644 --- a/src/lib/Limitation/SectionLimitationType.php +++ b/src/lib/Limitation/SectionLimitationType.php @@ -184,5 +184,3 @@ public function valueSchema() throw new NotImplementedException(__METHOD__); } } - -class_alias(SectionLimitationType::class, 'eZ\Publish\Core\Limitation\SectionLimitationType'); diff --git a/src/lib/Limitation/SiteAccessLimitationType.php b/src/lib/Limitation/SiteAccessLimitationType.php index 5c7fa94da5..674c7ab10a 100644 --- a/src/lib/Limitation/SiteAccessLimitationType.php +++ b/src/lib/Limitation/SiteAccessLimitationType.php @@ -184,5 +184,3 @@ private function getSiteAccessList(): array return $siteAccessList; } } - -class_alias(SiteAccessLimitationType::class, 'eZ\Publish\Core\Limitation\SiteAccessLimitationType'); diff --git a/src/lib/Limitation/StatusLimitationType.php b/src/lib/Limitation/StatusLimitationType.php index 24f00d6349..23d1a59af4 100644 --- a/src/lib/Limitation/StatusLimitationType.php +++ b/src/lib/Limitation/StatusLimitationType.php @@ -162,5 +162,3 @@ public function valueSchema() throw new NotImplementedException(__METHOD__); } } - -class_alias(StatusLimitationType::class, 'eZ\Publish\Core\Limitation\StatusLimitationType'); diff --git a/src/lib/Limitation/SubtreeLimitationType.php b/src/lib/Limitation/SubtreeLimitationType.php index 2625f07f49..355ac8943f 100644 --- a/src/lib/Limitation/SubtreeLimitationType.php +++ b/src/lib/Limitation/SubtreeLimitationType.php @@ -269,5 +269,3 @@ public function valueSchema() return self::VALUE_SCHEMA_LOCATION_PATH; } } - -class_alias(SubtreeLimitationType::class, 'eZ\Publish\Core\Limitation\SubtreeLimitationType'); diff --git a/src/lib/Limitation/TargetOnlyLimitationType.php b/src/lib/Limitation/TargetOnlyLimitationType.php index b2f84b2768..d341d22855 100644 --- a/src/lib/Limitation/TargetOnlyLimitationType.php +++ b/src/lib/Limitation/TargetOnlyLimitationType.php @@ -33,5 +33,3 @@ interface TargetOnlyLimitationType extends LimitationTypeInterface */ public function getCriterionByTarget(APILimitationValue $value, APIUserReference $currentUser, ?array $targets): CriterionInterface; } - -class_alias(TargetOnlyLimitationType::class, 'eZ\Publish\Core\Limitation\TargetOnlyLimitationType'); diff --git a/src/lib/Limitation/UserGroupLimitationType.php b/src/lib/Limitation/UserGroupLimitationType.php index f2cbfe2422..86340bd19b 100644 --- a/src/lib/Limitation/UserGroupLimitationType.php +++ b/src/lib/Limitation/UserGroupLimitationType.php @@ -222,5 +222,3 @@ public function valueSchema() throw new NotImplementedException(__METHOD__); } } - -class_alias(UserGroupLimitationType::class, 'eZ\Publish\Core\Limitation\UserGroupLimitationType'); diff --git a/src/lib/MVC/Exception/HiddenLocationException.php b/src/lib/MVC/Exception/HiddenLocationException.php index 6801b1be7a..1c8fabd454 100644 --- a/src/lib/MVC/Exception/HiddenLocationException.php +++ b/src/lib/MVC/Exception/HiddenLocationException.php @@ -29,5 +29,3 @@ public function getLocation() return $this->location; } } - -class_alias(HiddenLocationException::class, 'eZ\Publish\Core\MVC\Exception\HiddenLocationException'); diff --git a/src/lib/MVC/Exception/InvalidSiteAccessException.php b/src/lib/MVC/Exception/InvalidSiteAccessException.php index 8ebbc5a3af..c491c2b3d6 100644 --- a/src/lib/MVC/Exception/InvalidSiteAccessException.php +++ b/src/lib/MVC/Exception/InvalidSiteAccessException.php @@ -36,5 +36,3 @@ public function __construct( parent::__construct($message); } } - -class_alias(InvalidSiteAccessException::class, 'eZ\Publish\Core\MVC\Exception\InvalidSiteAccessException'); diff --git a/src/lib/MVC/Exception/NoViewTemplateException.php b/src/lib/MVC/Exception/NoViewTemplateException.php index b433058f99..62f99e6147 100644 --- a/src/lib/MVC/Exception/NoViewTemplateException.php +++ b/src/lib/MVC/Exception/NoViewTemplateException.php @@ -34,5 +34,3 @@ public function getView() return $this->view; } } - -class_alias(NoViewTemplateException::class, 'eZ\Publish\Core\MVC\Exception\NoViewTemplateException'); diff --git a/src/lib/MVC/Exception/ParameterNotFoundException.php b/src/lib/MVC/Exception/ParameterNotFoundException.php index 96e08c8d9c..056f3d4779 100644 --- a/src/lib/MVC/Exception/ParameterNotFoundException.php +++ b/src/lib/MVC/Exception/ParameterNotFoundException.php @@ -22,5 +22,3 @@ public function __construct($paramName, $namespace, array $triedScopes = []) } } } - -class_alias(ParameterNotFoundException::class, 'eZ\Publish\Core\MVC\Exception\ParameterNotFoundException'); diff --git a/src/lib/MVC/Exception/SourceImageNotFoundException.php b/src/lib/MVC/Exception/SourceImageNotFoundException.php index 6057ca766d..4c9593ae80 100644 --- a/src/lib/MVC/Exception/SourceImageNotFoundException.php +++ b/src/lib/MVC/Exception/SourceImageNotFoundException.php @@ -12,5 +12,3 @@ class SourceImageNotFoundException extends NotFoundException { } - -class_alias(SourceImageNotFoundException::class, 'eZ\Publish\Core\MVC\Exception\SourceImageNotFoundException'); diff --git a/src/lib/MVC/RepositoryAware.php b/src/lib/MVC/RepositoryAware.php index 542d7a1fe1..a48d840963 100644 --- a/src/lib/MVC/RepositoryAware.php +++ b/src/lib/MVC/RepositoryAware.php @@ -22,5 +22,3 @@ public function setRepository(Repository $repository) $this->repository = $repository; } } - -class_alias(RepositoryAware::class, 'eZ\Publish\Core\MVC\RepositoryAware'); diff --git a/src/lib/MVC/RepositoryAwareInterface.php b/src/lib/MVC/RepositoryAwareInterface.php index c91a19f54f..01bef85528 100644 --- a/src/lib/MVC/RepositoryAwareInterface.php +++ b/src/lib/MVC/RepositoryAwareInterface.php @@ -16,5 +16,3 @@ interface RepositoryAwareInterface */ public function setRepository(Repository $repository); } - -class_alias(RepositoryAwareInterface::class, 'eZ\Publish\Core\MVC\RepositoryAwareInterface'); diff --git a/src/lib/MVC/Symfony/Component/Serializer/AbstractPropertyWhitelistNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/AbstractPropertyWhitelistNormalizer.php index c2ac95b45f..36154396ab 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/AbstractPropertyWhitelistNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/AbstractPropertyWhitelistNormalizer.php @@ -29,5 +29,3 @@ public function normalize($object, string $format = null, array $context = []) */ abstract protected function getAllowedProperties(): array; } - -class_alias(AbstractPropertyWhitelistNormalizer::class, 'eZ\Publish\Core\MVC\Symfony\Component\Serializer\AbstractPropertyWhitelistNormalizer'); diff --git a/src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php index 02ba5b02fd..5774f29abb 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php @@ -38,5 +38,3 @@ public function supportsDenormalization($data, string $type, string $format = nu return $type === Matcher\Compound::class; } } - -class_alias(CompoundMatcherNormalizer::class, 'eZ\Publish\Core\MVC\Symfony\Component\Serializer\CompoundMatcherNormalizer'); diff --git a/src/lib/MVC/Symfony/Component/Serializer/HostElementNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/HostElementNormalizer.php index e9bcf623fd..0bf22d9025 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/HostElementNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/HostElementNormalizer.php @@ -25,5 +25,3 @@ protected function getAllowedProperties(): array return ['elementNumber', 'hostElements']; } } - -class_alias(HostElementNormalizer::class, 'eZ\Publish\Core\MVC\Symfony\Component\Serializer\HostElementNormalizer'); diff --git a/src/lib/MVC/Symfony/Component/Serializer/HostTextNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/HostTextNormalizer.php index 3fc01369b7..cebf291907 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/HostTextNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/HostTextNormalizer.php @@ -22,5 +22,3 @@ public function supportsNormalization($data, string $format = null) return $data instanceof HostText; } } - -class_alias(HostTextNormalizer::class, 'eZ\Publish\Core\MVC\Symfony\Component\Serializer\HostTextNormalizer'); diff --git a/src/lib/MVC/Symfony/Component/Serializer/MapNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/MapNormalizer.php index c42d46ee7f..5fbeaa5cfe 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/MapNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/MapNormalizer.php @@ -30,5 +30,3 @@ public function supportsNormalization($data, string $format = null) return $data instanceof Map; } } - -class_alias(MapNormalizer::class, 'eZ\Publish\Core\MVC\Symfony\Component\Serializer\MapNormalizer'); diff --git a/src/lib/MVC/Symfony/Component/Serializer/RegexHostNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/RegexHostNormalizer.php index 2430cd45cd..bcb59438e0 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/RegexHostNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/RegexHostNormalizer.php @@ -22,5 +22,3 @@ public function supportsNormalization($data, string $format = null) return $data instanceof Host; } } - -class_alias(RegexHostNormalizer::class, 'eZ\Publish\Core\MVC\Symfony\Component\Serializer\RegexHostNormalizer'); diff --git a/src/lib/MVC/Symfony/Component/Serializer/RegexNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/RegexNormalizer.php index c238aa5c87..0443e6d0c3 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/RegexNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/RegexNormalizer.php @@ -25,5 +25,3 @@ protected function getAllowedProperties(): array return ['regex', 'itemNumber', 'matchedSiteAccess']; } } - -class_alias(RegexNormalizer::class, 'eZ\Publish\Core\MVC\Symfony\Component\Serializer\RegexNormalizer'); diff --git a/src/lib/MVC/Symfony/Component/Serializer/RegexURINormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/RegexURINormalizer.php index 87899b8694..b3fdeb26ef 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/RegexURINormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/RegexURINormalizer.php @@ -22,5 +22,3 @@ public function supportsNormalization($data, string $format = null) return $data instanceof URI; } } - -class_alias(RegexURINormalizer::class, 'eZ\Publish\Core\MVC\Symfony\Component\Serializer\RegexURINormalizer'); diff --git a/src/lib/MVC/Symfony/Component/Serializer/SerializerTrait.php b/src/lib/MVC/Symfony/Component/Serializer/SerializerTrait.php index e54cd3eb9f..838d85ff68 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/SerializerTrait.php +++ b/src/lib/MVC/Symfony/Component/Serializer/SerializerTrait.php @@ -37,5 +37,3 @@ public function getSerializer(): SerializerInterface ); } } - -class_alias(SerializerTrait::class, 'eZ\Publish\Core\MVC\Symfony\Component\Serializer\SerializerTrait'); diff --git a/src/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizer.php index 0eb6a0d15c..05464fa522 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizer.php @@ -35,5 +35,3 @@ public function supportsNormalization($data, $format = null, array $context = [] return $data instanceof SimplifiedRequest; } } - -class_alias(SimplifiedRequestNormalizer::class, 'eZ\Publish\Core\MVC\Symfony\Component\Serializer\SimplifiedRequestNormalizer'); diff --git a/src/lib/MVC/Symfony/Component/Serializer/URIElementNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/URIElementNormalizer.php index e5025ce6d0..df8d5f3066 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/URIElementNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/URIElementNormalizer.php @@ -25,5 +25,3 @@ protected function getAllowedProperties(): array return ['elementNumber', 'uriElements']; } } - -class_alias(URIElementNormalizer::class, 'eZ\Publish\Core\MVC\Symfony\Component\Serializer\URIElementNormalizer'); diff --git a/src/lib/MVC/Symfony/Component/Serializer/URITextNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/URITextNormalizer.php index 2abf059cc2..37dbfcf899 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/URITextNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/URITextNormalizer.php @@ -22,5 +22,3 @@ public function supportsNormalization($data, string $format = null) return $data instanceof URIText; } } - -class_alias(URITextNormalizer::class, 'eZ\Publish\Core\MVC\Symfony\Component\Serializer\URITextNormalizer'); diff --git a/src/lib/MVC/Symfony/ConfigDumperInterface.php b/src/lib/MVC/Symfony/ConfigDumperInterface.php index 3fe551a91c..4ec39b3929 100644 --- a/src/lib/MVC/Symfony/ConfigDumperInterface.php +++ b/src/lib/MVC/Symfony/ConfigDumperInterface.php @@ -24,5 +24,3 @@ interface ConfigDumperInterface */ public function dump(array $configArray, $options = self::OPT_DEFAULT); } - -class_alias(ConfigDumperInterface::class, 'eZ\Publish\Core\MVC\Symfony\ConfigDumperInterface'); diff --git a/src/lib/MVC/Symfony/Configuration/VersatileScopeInterface.php b/src/lib/MVC/Symfony/Configuration/VersatileScopeInterface.php index 2572cce165..cdc1b8cb2f 100644 --- a/src/lib/MVC/Symfony/Configuration/VersatileScopeInterface.php +++ b/src/lib/MVC/Symfony/Configuration/VersatileScopeInterface.php @@ -18,5 +18,3 @@ public function getDefaultScope(): string; public function setDefaultScope(string $scope): void; } - -class_alias(VersatileScopeInterface::class, 'eZ\Publish\Core\MVC\Symfony\Configuration\VersatileScopeInterface'); diff --git a/src/lib/MVC/Symfony/Controller/Content/DownloadController.php b/src/lib/MVC/Symfony/Controller/Content/DownloadController.php index be3fb9501c..5916675c1e 100644 --- a/src/lib/MVC/Symfony/Controller/Content/DownloadController.php +++ b/src/lib/MVC/Symfony/Controller/Content/DownloadController.php @@ -120,5 +120,3 @@ public function downloadBinaryFileAction(int $contentId, string $fieldIdentifier return $response; } } - -class_alias(DownloadController::class, 'eZ\Publish\Core\MVC\Symfony\Controller\Content\DownloadController'); diff --git a/src/lib/MVC/Symfony/Controller/Content/DownloadRedirectionController.php b/src/lib/MVC/Symfony/Controller/Content/DownloadRedirectionController.php index 77797adeeb..49ab74fba1 100644 --- a/src/lib/MVC/Symfony/Controller/Content/DownloadRedirectionController.php +++ b/src/lib/MVC/Symfony/Controller/Content/DownloadRedirectionController.php @@ -92,5 +92,3 @@ protected function findFieldInContent($fieldId, Content $content) throw new InvalidArgumentException("Could not find any Field with ID $fieldId in Content item with ID {$content->id}"); } } - -class_alias(DownloadRedirectionController::class, 'eZ\Publish\Core\MVC\Symfony\Controller\Content\DownloadRedirectionController'); diff --git a/src/lib/MVC/Symfony/Controller/Content/PreviewController.php b/src/lib/MVC/Symfony/Controller/Content/PreviewController.php index 900dc25768..7b0e4a0692 100644 --- a/src/lib/MVC/Symfony/Controller/Content/PreviewController.php +++ b/src/lib/MVC/Symfony/Controller/Content/PreviewController.php @@ -189,5 +189,3 @@ protected function getForwardRequest( ); } } - -class_alias(PreviewController::class, 'eZ\Publish\Core\MVC\Symfony\Controller\Content\PreviewController'); diff --git a/src/lib/MVC/Symfony/Controller/Content/QueryController.php b/src/lib/MVC/Symfony/Controller/Content/QueryController.php index 3f012e8ed7..4ee23943cd 100644 --- a/src/lib/MVC/Symfony/Controller/Content/QueryController.php +++ b/src/lib/MVC/Symfony/Controller/Content/QueryController.php @@ -145,5 +145,3 @@ private function getAdapter(Query $query): AdapterInterface return new ContentSearchHitAdapter($query, $this->searchService); } } - -class_alias(QueryController::class, 'eZ\Publish\Core\MVC\Symfony\Controller\Content\QueryController'); diff --git a/src/lib/MVC/Symfony/Controller/Content/ViewController.php b/src/lib/MVC/Symfony/Controller/Content/ViewController.php index b35a0a34ba..73feb0c081 100644 --- a/src/lib/MVC/Symfony/Controller/Content/ViewController.php +++ b/src/lib/MVC/Symfony/Controller/Content/ViewController.php @@ -178,5 +178,3 @@ protected function performAccessChecks() } } } - -class_alias(ViewController::class, 'eZ\Publish\Core\MVC\Symfony\Controller\Content\ViewController'); diff --git a/src/lib/MVC/Symfony/Controller/Controller.php b/src/lib/MVC/Symfony/Controller/Controller.php index 8d898c9534..a301cc1548 100644 --- a/src/lib/MVC/Symfony/Controller/Controller.php +++ b/src/lib/MVC/Symfony/Controller/Controller.php @@ -126,5 +126,3 @@ public function isGranted(AuthorizationAttribute $attribute) return $this->container->get('security.authorization_checker')->isGranted($attribute); } } - -class_alias(Controller::class, 'eZ\Publish\Core\MVC\Symfony\Controller\Controller'); diff --git a/src/lib/MVC/Symfony/Controller/QueryRenderController.php b/src/lib/MVC/Symfony/Controller/QueryRenderController.php index cca6fd0bd9..af4f8d2dd7 100644 --- a/src/lib/MVC/Symfony/Controller/QueryRenderController.php +++ b/src/lib/MVC/Symfony/Controller/QueryRenderController.php @@ -117,5 +117,3 @@ private function createQueryView(string $template, string $assignResultsTo, iter return $view; } } - -class_alias(QueryRenderController::class, 'eZ\Publish\Core\MVC\Symfony\Controller\QueryRenderController'); diff --git a/src/lib/MVC/Symfony/Controller/SecurityController.php b/src/lib/MVC/Symfony/Controller/SecurityController.php index 9e88ac416f..f1143e693b 100644 --- a/src/lib/MVC/Symfony/Controller/SecurityController.php +++ b/src/lib/MVC/Symfony/Controller/SecurityController.php @@ -42,5 +42,3 @@ public function loginAction() return $view; } } - -class_alias(SecurityController::class, 'eZ\Publish\Core\MVC\Symfony\Controller\SecurityController'); diff --git a/src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php b/src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php index 05ed61599d..b03560c9b3 100644 --- a/src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php +++ b/src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php @@ -81,5 +81,3 @@ public function getContentMeta() return $this->contentMeta; } } - -class_alias(APIContentExceptionEvent::class, 'eZ\Publish\Core\MVC\Symfony\Event\APIContentExceptionEvent'); diff --git a/src/lib/MVC/Symfony/Event/ConsoleInitEvent.php b/src/lib/MVC/Symfony/Event/ConsoleInitEvent.php index c679483c71..78ef9f7fc5 100644 --- a/src/lib/MVC/Symfony/Event/ConsoleInitEvent.php +++ b/src/lib/MVC/Symfony/Event/ConsoleInitEvent.php @@ -21,5 +21,3 @@ public function __construct(InputInterface $input, OutputInterface $output) parent::__construct(null, $input, $output); } } - -class_alias(ConsoleInitEvent::class, 'eZ\Publish\Core\MVC\Symfony\Event\ConsoleInitEvent'); diff --git a/src/lib/MVC/Symfony/Event/ContentCacheClearEvent.php b/src/lib/MVC/Symfony/Event/ContentCacheClearEvent.php index 023d1ecc3f..d61db02b73 100644 --- a/src/lib/MVC/Symfony/Event/ContentCacheClearEvent.php +++ b/src/lib/MVC/Symfony/Event/ContentCacheClearEvent.php @@ -70,5 +70,3 @@ public function setLocationsToClear(array $locationsToClear) $this->locationsToClear = $locationsToClear; } } - -class_alias(ContentCacheClearEvent::class, 'eZ\Publish\Core\MVC\Symfony\Event\ContentCacheClearEvent'); diff --git a/src/lib/MVC/Symfony/Event/InteractiveLoginEvent.php b/src/lib/MVC/Symfony/Event/InteractiveLoginEvent.php index ec5e545455..89d5f6c908 100644 --- a/src/lib/MVC/Symfony/Event/InteractiveLoginEvent.php +++ b/src/lib/MVC/Symfony/Event/InteractiveLoginEvent.php @@ -68,5 +68,3 @@ public function getAPIUser(): APIUser return $this->apiUser; } } - -class_alias(InteractiveLoginEvent::class, 'eZ\Publish\Core\MVC\Symfony\Event\InteractiveLoginEvent'); diff --git a/src/lib/MVC/Symfony/Event/PostSiteAccessMatchEvent.php b/src/lib/MVC/Symfony/Event/PostSiteAccessMatchEvent.php index 1780202ed9..c59c9dae1c 100644 --- a/src/lib/MVC/Symfony/Event/PostSiteAccessMatchEvent.php +++ b/src/lib/MVC/Symfony/Event/PostSiteAccessMatchEvent.php @@ -66,5 +66,3 @@ public function getRequestType() return $this->requestType; } } - -class_alias(PostSiteAccessMatchEvent::class, 'eZ\Publish\Core\MVC\Symfony\Event\PostSiteAccessMatchEvent'); diff --git a/src/lib/MVC/Symfony/Event/PreContentViewEvent.php b/src/lib/MVC/Symfony/Event/PreContentViewEvent.php index 26aee26948..2f3382200f 100644 --- a/src/lib/MVC/Symfony/Event/PreContentViewEvent.php +++ b/src/lib/MVC/Symfony/Event/PreContentViewEvent.php @@ -51,5 +51,3 @@ public function getContentView() return $this->contentView; } } - -class_alias(PreContentViewEvent::class, 'eZ\Publish\Core\MVC\Symfony\Event\PreContentViewEvent'); diff --git a/src/lib/MVC/Symfony/Event/ResolveRenderOptionsEvent.php b/src/lib/MVC/Symfony/Event/ResolveRenderOptionsEvent.php index fed74d63d0..4b28bbd7a5 100644 --- a/src/lib/MVC/Symfony/Event/ResolveRenderOptionsEvent.php +++ b/src/lib/MVC/Symfony/Event/ResolveRenderOptionsEvent.php @@ -32,5 +32,3 @@ public function setRenderOptions(RenderOptions $renderOptions): void $this->renderOptions = $renderOptions; } } - -class_alias(ResolveRenderOptionsEvent::class, 'eZ\Publish\Core\MVC\Symfony\Event\ResolveRenderOptionsEvent'); diff --git a/src/lib/MVC/Symfony/Event/RouteReferenceGenerationEvent.php b/src/lib/MVC/Symfony/Event/RouteReferenceGenerationEvent.php index eb4ba4efd4..09c8dd890e 100644 --- a/src/lib/MVC/Symfony/Event/RouteReferenceGenerationEvent.php +++ b/src/lib/MVC/Symfony/Event/RouteReferenceGenerationEvent.php @@ -52,5 +52,3 @@ public function setRouteReference($routeReference) $this->routeReference = $routeReference; } } - -class_alias(RouteReferenceGenerationEvent::class, 'eZ\Publish\Core\MVC\Symfony\Event\RouteReferenceGenerationEvent'); diff --git a/src/lib/MVC/Symfony/Event/ScopeChangeEvent.php b/src/lib/MVC/Symfony/Event/ScopeChangeEvent.php index 524c69bdfd..c9bdd14e13 100644 --- a/src/lib/MVC/Symfony/Event/ScopeChangeEvent.php +++ b/src/lib/MVC/Symfony/Event/ScopeChangeEvent.php @@ -31,5 +31,3 @@ public function getSiteAccess() return $this->siteAccess; } } - -class_alias(ScopeChangeEvent::class, 'eZ\Publish\Core\MVC\Symfony\Event\ScopeChangeEvent'); diff --git a/src/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriber.php b/src/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriber.php index 814e863690..e1d2b1bcff 100644 --- a/src/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriber.php +++ b/src/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriber.php @@ -88,5 +88,3 @@ private function getExpression(string $twigVariable): string return substr($twigVariable, strlen(self::EXPRESSION_INDICATOR)); } } - -class_alias(ContentViewTwigVariablesSubscriber::class, 'eZ\Publish\Core\MVC\Symfony\EventListener\ContentViewTwigVariablesSubscriber'); diff --git a/src/lib/MVC/Symfony/EventListener/LanguageSwitchListener.php b/src/lib/MVC/Symfony/EventListener/LanguageSwitchListener.php index 423aefd9c6..3db628d0ce 100644 --- a/src/lib/MVC/Symfony/EventListener/LanguageSwitchListener.php +++ b/src/lib/MVC/Symfony/EventListener/LanguageSwitchListener.php @@ -58,5 +58,3 @@ public function onRouteReferenceGeneration(RouteReferenceGenerationEvent $event) } } } - -class_alias(LanguageSwitchListener::class, 'eZ\Publish\Core\MVC\Symfony\EventListener\LanguageSwitchListener'); diff --git a/src/lib/MVC/Symfony/EventListener/SiteAccessMatchListener.php b/src/lib/MVC/Symfony/EventListener/SiteAccessMatchListener.php index cabe9ac865..1141c72e21 100644 --- a/src/lib/MVC/Symfony/EventListener/SiteAccessMatchListener.php +++ b/src/lib/MVC/Symfony/EventListener/SiteAccessMatchListener.php @@ -208,5 +208,3 @@ private function buildMatcherFromSerializedClass( return $matcher; } } - -class_alias(SiteAccessMatchListener::class, 'eZ\Publish\Core\MVC\Symfony\EventListener\SiteAccessMatchListener'); diff --git a/src/lib/MVC/Symfony/ExpressionLanguage/ExpressionLanguage.php b/src/lib/MVC/Symfony/ExpressionLanguage/ExpressionLanguage.php index 5b608b8ab2..44aa116232 100644 --- a/src/lib/MVC/Symfony/ExpressionLanguage/ExpressionLanguage.php +++ b/src/lib/MVC/Symfony/ExpressionLanguage/ExpressionLanguage.php @@ -22,5 +22,3 @@ public function __construct( parent::__construct($cache, $providers); } } - -class_alias(ExpressionLanguage::class, 'eZ\Publish\Core\MVC\Symfony\ExpressionLanguage\ExpressionLanguage'); diff --git a/src/lib/MVC/Symfony/ExpressionLanguage/TwigVariableProviderExtension.php b/src/lib/MVC/Symfony/ExpressionLanguage/TwigVariableProviderExtension.php index 756364f84f..fb5e6f16f5 100644 --- a/src/lib/MVC/Symfony/ExpressionLanguage/TwigVariableProviderExtension.php +++ b/src/lib/MVC/Symfony/ExpressionLanguage/TwigVariableProviderExtension.php @@ -55,5 +55,3 @@ private function hasParameterProvider(array $variables): bool && $variables[self::PROVIDER_REGISTRY_PARAMETER] instanceof VariableProviderRegistry; } } - -class_alias(TwigVariableProviderExtension::class, 'eZ\Publish\Core\MVC\Symfony\ExpressionLanguage\TwigVariableProviderExtension'); diff --git a/src/lib/MVC/Symfony/FieldType/BinaryBase/ContentDownloadUrlGenerator.php b/src/lib/MVC/Symfony/FieldType/BinaryBase/ContentDownloadUrlGenerator.php index 8fec6d19e4..a1fa1cd153 100644 --- a/src/lib/MVC/Symfony/FieldType/BinaryBase/ContentDownloadUrlGenerator.php +++ b/src/lib/MVC/Symfony/FieldType/BinaryBase/ContentDownloadUrlGenerator.php @@ -50,5 +50,3 @@ public function getParameters(Field $field, VersionInfo $versionInfo): array ]; } } - -class_alias(ContentDownloadUrlGenerator::class, 'eZ\Publish\Core\MVC\Symfony\FieldType\BinaryBase\ContentDownloadUrlGenerator'); diff --git a/src/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProvider.php b/src/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProvider.php index b71e6afa2f..6ec28ddfda 100644 --- a/src/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProvider.php +++ b/src/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProvider.php @@ -97,5 +97,3 @@ private function userHasPermissions(ContentInfo $contentInfo): bool return false; } } - -class_alias(ParameterProvider::class, 'eZ\Publish\Core\MVC\Symfony\FieldType\ImageAsset\ParameterProvider'); diff --git a/src/lib/MVC/Symfony/FieldType/Relation/ParameterProvider.php b/src/lib/MVC/Symfony/FieldType/Relation/ParameterProvider.php index 5de229b5db..8115ed1125 100644 --- a/src/lib/MVC/Symfony/FieldType/Relation/ParameterProvider.php +++ b/src/lib/MVC/Symfony/FieldType/Relation/ParameterProvider.php @@ -57,5 +57,3 @@ public function getViewParameters(Field $field): array } } } - -class_alias(ParameterProvider::class, 'eZ\Publish\Core\MVC\Symfony\FieldType\Relation\ParameterProvider'); diff --git a/src/lib/MVC/Symfony/FieldType/RelationList/ParameterProvider.php b/src/lib/MVC/Symfony/FieldType/RelationList/ParameterProvider.php index eae62a2072..9054d74cdf 100644 --- a/src/lib/MVC/Symfony/FieldType/RelationList/ParameterProvider.php +++ b/src/lib/MVC/Symfony/FieldType/RelationList/ParameterProvider.php @@ -56,5 +56,3 @@ public function getViewParameters(Field $field) ]; } } - -class_alias(ParameterProvider::class, 'eZ\Publish\Core\MVC\Symfony\FieldType\RelationList\ParameterProvider'); diff --git a/src/lib/MVC/Symfony/FieldType/User/ParameterProvider.php b/src/lib/MVC/Symfony/FieldType/User/ParameterProvider.php index 4660da692e..f6b23a38b9 100644 --- a/src/lib/MVC/Symfony/FieldType/User/ParameterProvider.php +++ b/src/lib/MVC/Symfony/FieldType/User/ParameterProvider.php @@ -41,5 +41,3 @@ public function getViewParameters(Field $field): array ]; } } - -class_alias(ParameterProvider::class, 'eZ\Publish\Core\MVC\Symfony\FieldType\User\ParameterProvider'); diff --git a/src/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProvider.php b/src/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProvider.php index 9eb07ae8b1..2cb621b511 100644 --- a/src/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProvider.php +++ b/src/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProvider.php @@ -52,5 +52,3 @@ public function getViewParameters(Field $field) return $parameters; } } - -class_alias(LocaleParameterProvider::class, 'eZ\Publish\Core\MVC\Symfony\FieldType\View\ParameterProvider\LocaleParameterProvider'); diff --git a/src/lib/MVC/Symfony/FieldType/View/ParameterProviderInterface.php b/src/lib/MVC/Symfony/FieldType/View/ParameterProviderInterface.php index a4a1c5b8e8..f37c5bcba3 100644 --- a/src/lib/MVC/Symfony/FieldType/View/ParameterProviderInterface.php +++ b/src/lib/MVC/Symfony/FieldType/View/ParameterProviderInterface.php @@ -30,5 +30,3 @@ interface ParameterProviderInterface */ public function getViewParameters(Field $field); } - -class_alias(ParameterProviderInterface::class, 'eZ\Publish\Core\MVC\Symfony\FieldType\View\ParameterProviderInterface'); diff --git a/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistry.php b/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistry.php index ed366129fc..b21a6bfb59 100644 --- a/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistry.php +++ b/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistry.php @@ -54,5 +54,3 @@ public function setParameterProvider(ParameterProviderInterface $parameterProvid $this->providers[$fieldTypeIdentifier] = $parameterProvider; } } - -class_alias(ParameterProviderRegistry::class, 'eZ\Publish\Core\MVC\Symfony\FieldType\View\ParameterProviderRegistry'); diff --git a/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryInterface.php b/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryInterface.php index d40fcf1f62..3a8c2615be 100644 --- a/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryInterface.php +++ b/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryInterface.php @@ -40,5 +40,3 @@ public function getParameterProvider($fieldTypeIdentifier); */ public function setParameterProvider(ParameterProviderInterface $parameterProvider, $fieldTypeIdentifier); } - -class_alias(ParameterProviderRegistryInterface::class, 'eZ\Publish\Core\MVC\Symfony\FieldType\View\ParameterProviderRegistryInterface'); diff --git a/src/lib/MVC/Symfony/Locale/LocaleConverter.php b/src/lib/MVC/Symfony/Locale/LocaleConverter.php index 4a210f985d..8d0c9fe3cd 100644 --- a/src/lib/MVC/Symfony/Locale/LocaleConverter.php +++ b/src/lib/MVC/Symfony/Locale/LocaleConverter.php @@ -85,5 +85,3 @@ public function convertToRepository(string $posixLocale): ?string return $this->reverseConversionMap[$posixLocale]; } } - -class_alias(LocaleConverter::class, 'eZ\Publish\Core\MVC\Symfony\Locale\LocaleConverter'); diff --git a/src/lib/MVC/Symfony/Locale/LocaleConverterInterface.php b/src/lib/MVC/Symfony/Locale/LocaleConverterInterface.php index 387aae3449..a1e8c34f5e 100644 --- a/src/lib/MVC/Symfony/Locale/LocaleConverterInterface.php +++ b/src/lib/MVC/Symfony/Locale/LocaleConverterInterface.php @@ -44,5 +44,3 @@ public function convertToEz($posixLocale); */ public function convertToRepository(string $posixLocale): ?string; } - -class_alias(LocaleConverterInterface::class, 'eZ\Publish\Core\MVC\Symfony\Locale\LocaleConverterInterface'); diff --git a/src/lib/MVC/Symfony/Locale/UserLanguagePreferenceProvider.php b/src/lib/MVC/Symfony/Locale/UserLanguagePreferenceProvider.php index cd317fbe52..bc25aa132b 100644 --- a/src/lib/MVC/Symfony/Locale/UserLanguagePreferenceProvider.php +++ b/src/lib/MVC/Symfony/Locale/UserLanguagePreferenceProvider.php @@ -81,5 +81,3 @@ public function getPreferredLanguages(): array return array_unique(array_merge(...$languageCodes)); } } - -class_alias(UserLanguagePreferenceProvider::class, 'eZ\Publish\Core\MVC\Symfony\Locale\UserLanguagePreferenceProvider'); diff --git a/src/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderInterface.php b/src/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderInterface.php index 49d892625c..55448ce033 100644 --- a/src/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderInterface.php +++ b/src/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderInterface.php @@ -31,5 +31,3 @@ public function getPreferredLocales(Request $request = null): array; */ public function getPreferredLanguages(): array; } - -class_alias(UserLanguagePreferenceProviderInterface::class, 'eZ\Publish\Core\MVC\Symfony\Locale\UserLanguagePreferenceProviderInterface'); diff --git a/src/lib/MVC/Symfony/MVCEvents.php b/src/lib/MVC/Symfony/MVCEvents.php index dd415eaf50..2a40ffb334 100644 --- a/src/lib/MVC/Symfony/MVCEvents.php +++ b/src/lib/MVC/Symfony/MVCEvents.php @@ -77,5 +77,3 @@ final class MVCEvents */ public const CACHE_CLEAR_CONTENT = 'ezpublish.cache_clear.content'; } - -class_alias(MVCEvents::class, 'eZ\Publish\Core\MVC\Symfony\MVCEvents'); diff --git a/src/lib/MVC/Symfony/Matcher/ClassNameMatcherFactory.php b/src/lib/MVC/Symfony/Matcher/ClassNameMatcherFactory.php index 25f588cbe1..5402ffcc09 100644 --- a/src/lib/MVC/Symfony/Matcher/ClassNameMatcherFactory.php +++ b/src/lib/MVC/Symfony/Matcher/ClassNameMatcherFactory.php @@ -144,5 +144,3 @@ public function setMatchConfig(array $matchConfig): void $this->matchConfig = $matchConfig; } } - -class_alias(ClassNameMatcherFactory::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\ClassNameMatcherFactory'); diff --git a/src/lib/MVC/Symfony/Matcher/ConfigurableMatcherFactoryInterface.php b/src/lib/MVC/Symfony/Matcher/ConfigurableMatcherFactoryInterface.php index ed2cc2ac56..6e55532b48 100644 --- a/src/lib/MVC/Symfony/Matcher/ConfigurableMatcherFactoryInterface.php +++ b/src/lib/MVC/Symfony/Matcher/ConfigurableMatcherFactoryInterface.php @@ -14,5 +14,3 @@ interface ConfigurableMatcherFactoryInterface extends MatcherFactoryInterface { public function setMatchConfig(array $matchConfig): void; } - -class_alias(ConfigurableMatcherFactoryInterface::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\ConfigurableMatcherFactoryInterface'); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php index ce3a0af336..03c8747f8c 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php @@ -59,5 +59,3 @@ public function match(View $view) return false; } } - -class_alias(Depth::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Depth'); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Content.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Content.php index 2ce556bacf..313faf0768 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Content.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Content.php @@ -48,5 +48,3 @@ public function match(View $view) return isset($this->values[$view->getContent()->contentInfo->id]); } } - -class_alias(Content::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Id\Content'); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentType.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentType.php index 0606deb3f9..6cb3d694e9 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentType.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentType.php @@ -48,5 +48,3 @@ public function match(View $view) return isset($this->values[$view->getContent()->contentInfo->contentTypeId]); } } - -class_alias(ContentType::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Id\ContentType'); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroup.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroup.php index b6c570b9ef..2d609323f7 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroup.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroup.php @@ -67,5 +67,3 @@ private function matchContentTypeId($contentTypeId) return false; } } - -class_alias(ContentTypeGroup::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Id\ContentTypeGroup'); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Location.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Location.php index 553ddfc1bb..76b776c548 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Location.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Location.php @@ -52,5 +52,3 @@ public function match(View $view) return isset($this->values[$view->getLocation()->id]); } } - -class_alias(Location::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Id\Location'); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationRemote.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationRemote.php index c3ddd19ca3..6187b895d6 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationRemote.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationRemote.php @@ -46,5 +46,3 @@ public function match(View $view) return isset($this->values[$view->getLocation()->remoteId]); } } - -class_alias(LocationRemote::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Id\LocationRemote'); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php index b0f36c2a6c..7d93b13afe 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php @@ -76,5 +76,3 @@ static function (Repository $repository) use ($locationId) { ); } } - -class_alias(ParentContentType::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Id\ParentContentType'); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocation.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocation.php index 1bebc971e9..efadf73c51 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocation.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocation.php @@ -55,5 +55,3 @@ public function match(View $view) return isset($this->values[$view->getLocation()->parentLocationId]); } } - -class_alias(ParentLocation::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Id\ParentLocation'); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Remote.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Remote.php index 8934978fb3..5c404947bf 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Remote.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Remote.php @@ -48,5 +48,3 @@ public function match(View $view) return isset($this->values[$view->getContent()->contentInfo->remoteId]); } } - -class_alias(Remote::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Id\Remote'); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Section.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Section.php index 4e51670d06..3f4d35e4dc 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Section.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Section.php @@ -48,5 +48,3 @@ public function match(View $view) return isset($this->values[$view->getContent()->contentInfo->getSectionId()]); } } - -class_alias(Section::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Id\Section'); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentType.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentType.php index 6161b71258..a1abeecaa9 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentType.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentType.php @@ -60,5 +60,3 @@ public function match(View $view) return isset($this->values[$contentType->identifier]); } } - -class_alias(ContentType::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Identifier\ContentType'); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentType.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentType.php index 0da4ba9e27..52969c39d3 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentType.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentType.php @@ -70,5 +70,3 @@ public function match(View $view) return false; } } - -class_alias(ParentContentType::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Identifier\ParentContentType'); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/Section.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/Section.php index 23c8e1aa0a..41876b240a 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/Section.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/Section.php @@ -74,5 +74,3 @@ static function (Repository $repository) use ($contentInfo) { return isset($this->values[$section->identifier]); } } - -class_alias(Section::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\Identifier\Section'); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/MatcherInterface.php b/src/lib/MVC/Symfony/Matcher/ContentBased/MatcherInterface.php index 41fea2b927..1066f6e84d 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/MatcherInterface.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/MatcherInterface.php @@ -34,5 +34,3 @@ public function matchLocation(Location $location); */ public function matchContentInfo(ContentInfo $contentInfo); } - -class_alias(MatcherInterface::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\MatcherInterface'); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/MultipleValued.php b/src/lib/MVC/Symfony/Matcher/ContentBased/MultipleValued.php index 87e0e671fc..e09fbeb10c 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/MultipleValued.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/MultipleValued.php @@ -49,5 +49,3 @@ public function getRepository() return $this->repository; } } - -class_alias(MultipleValued::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued'); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/UrlAlias.php b/src/lib/MVC/Symfony/Matcher/ContentBased/UrlAlias.php index 8537fe54e2..34107f2aa0 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/UrlAlias.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/UrlAlias.php @@ -79,5 +79,3 @@ public function match(View $view) return $this->matchLocation($view->getLocation()); } } - -class_alias(UrlAlias::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\UrlAlias'); diff --git a/src/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecorator.php b/src/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecorator.php index 4929cf8a24..93a2f92b6e 100644 --- a/src/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecorator.php +++ b/src/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecorator.php @@ -52,5 +52,3 @@ public function match(View $view) return $this->innerConfigurableMatcherFactory->match($view); } } - -class_alias(DynamicallyConfiguredMatcherFactoryDecorator::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\DynamicallyConfiguredMatcherFactoryDecorator'); diff --git a/src/lib/MVC/Symfony/Matcher/MatcherFactoryInterface.php b/src/lib/MVC/Symfony/Matcher/MatcherFactoryInterface.php index b0ec327380..3b78681a48 100644 --- a/src/lib/MVC/Symfony/Matcher/MatcherFactoryInterface.php +++ b/src/lib/MVC/Symfony/Matcher/MatcherFactoryInterface.php @@ -23,5 +23,3 @@ interface MatcherFactoryInterface */ public function match(View $view); } - -class_alias(MatcherFactoryInterface::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\MatcherFactoryInterface'); diff --git a/src/lib/MVC/Symfony/Matcher/ViewMatcherInterface.php b/src/lib/MVC/Symfony/Matcher/ViewMatcherInterface.php index d8769de8f1..87b4269ed1 100644 --- a/src/lib/MVC/Symfony/Matcher/ViewMatcherInterface.php +++ b/src/lib/MVC/Symfony/Matcher/ViewMatcherInterface.php @@ -33,5 +33,3 @@ public function setMatchingConfig($matchingConfig); */ public function match(View $view); } - -class_alias(ViewMatcherInterface::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\ViewMatcherInterface'); diff --git a/src/lib/MVC/Symfony/RequestStackAware.php b/src/lib/MVC/Symfony/RequestStackAware.php index 4f67c09fa6..f01126caaf 100644 --- a/src/lib/MVC/Symfony/RequestStackAware.php +++ b/src/lib/MVC/Symfony/RequestStackAware.php @@ -42,5 +42,3 @@ protected function getCurrentRequest() return $this->requestStack->getCurrentRequest(); } } - -class_alias(RequestStackAware::class, 'eZ\Publish\Core\MVC\Symfony\RequestStackAware'); diff --git a/src/lib/MVC/Symfony/Routing/ChainRouter.php b/src/lib/MVC/Symfony/Routing/ChainRouter.php index 1951c796b7..e7f0d68000 100644 --- a/src/lib/MVC/Symfony/Routing/ChainRouter.php +++ b/src/lib/MVC/Symfony/Routing/ChainRouter.php @@ -13,5 +13,3 @@ class ChainRouter extends BaseChainRouter { } - -class_alias(ChainRouter::class, 'eZ\Publish\Core\MVC\Symfony\Routing\ChainRouter'); diff --git a/src/lib/MVC/Symfony/Routing/Generator.php b/src/lib/MVC/Symfony/Routing/Generator.php index 2fa0b891b9..3605d7c9f7 100644 --- a/src/lib/MVC/Symfony/Routing/Generator.php +++ b/src/lib/MVC/Symfony/Routing/Generator.php @@ -173,5 +173,3 @@ private function getContextBySimplifiedRequest(SimplifiedRequest $simplifiedRequ return $context; } } - -class_alias(Generator::class, 'eZ\Publish\Core\MVC\Symfony\Routing\Generator'); diff --git a/src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGenerator.php b/src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGenerator.php index f23a199f4f..d5de9b41e3 100644 --- a/src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGenerator.php +++ b/src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGenerator.php @@ -49,5 +49,3 @@ public function generate($resource = null, array $params = []) return $event->getRouteReference(); } } - -class_alias(RouteReferenceGenerator::class, 'eZ\Publish\Core\MVC\Symfony\Routing\Generator\RouteReferenceGenerator'); diff --git a/src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGeneratorInterface.php b/src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGeneratorInterface.php index 29764e9de1..4edb02cd39 100644 --- a/src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGeneratorInterface.php +++ b/src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGeneratorInterface.php @@ -23,5 +23,3 @@ interface RouteReferenceGeneratorInterface */ public function generate($resource = null, array $params = []); } - -class_alias(RouteReferenceGeneratorInterface::class, 'eZ\Publish\Core\MVC\Symfony\Routing\Generator\RouteReferenceGeneratorInterface'); diff --git a/src/lib/MVC/Symfony/Routing/Generator/UrlAliasGenerator.php b/src/lib/MVC/Symfony/Routing/Generator/UrlAliasGenerator.php index ed127630f2..18ec998bd3 100644 --- a/src/lib/MVC/Symfony/Routing/Generator/UrlAliasGenerator.php +++ b/src/lib/MVC/Symfony/Routing/Generator/UrlAliasGenerator.php @@ -263,5 +263,3 @@ private function filterCharactersOfURL(string $url): string return strtr($url, $this->unsafeCharMap); } } - -class_alias(UrlAliasGenerator::class, 'eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator'); diff --git a/src/lib/MVC/Symfony/Routing/RouteReference.php b/src/lib/MVC/Symfony/Routing/RouteReference.php index a1a38dbbcc..1441d166b6 100644 --- a/src/lib/MVC/Symfony/Routing/RouteReference.php +++ b/src/lib/MVC/Symfony/Routing/RouteReference.php @@ -87,5 +87,3 @@ public function remove($parameterName) $this->params->remove($parameterName); } } - -class_alias(RouteReference::class, 'eZ\Publish\Core\MVC\Symfony\Routing\RouteReference'); diff --git a/src/lib/MVC/Symfony/Routing/SimplifiedRequest.php b/src/lib/MVC/Symfony/Routing/SimplifiedRequest.php index c6bcee763e..933e4e7901 100644 --- a/src/lib/MVC/Symfony/Routing/SimplifiedRequest.php +++ b/src/lib/MVC/Symfony/Routing/SimplifiedRequest.php @@ -218,5 +218,3 @@ public function getHeaders(): array return $this->headers; } } - -class_alias(SimplifiedRequest::class, 'eZ\Publish\Core\MVC\Symfony\Routing\SimplifiedRequest'); diff --git a/src/lib/MVC/Symfony/Routing/UrlAliasRouter.php b/src/lib/MVC/Symfony/Routing/UrlAliasRouter.php index 9d1f22429e..3cdb02ea24 100644 --- a/src/lib/MVC/Symfony/Routing/UrlAliasRouter.php +++ b/src/lib/MVC/Symfony/Routing/UrlAliasRouter.php @@ -404,5 +404,3 @@ public function getRouteDebugMessage($name, array $parameters = []) return $name; } } - -class_alias(UrlAliasRouter::class, 'eZ\Publish\Core\MVC\Symfony\Routing\UrlAliasRouter'); diff --git a/src/lib/MVC/Symfony/Routing/UrlWildcardRouter.php b/src/lib/MVC/Symfony/Routing/UrlWildcardRouter.php index c8c0d0055f..dae115076e 100644 --- a/src/lib/MVC/Symfony/Routing/UrlWildcardRouter.php +++ b/src/lib/MVC/Symfony/Routing/UrlWildcardRouter.php @@ -171,5 +171,3 @@ public function getRouteDebugMessage($name, array $parameters = []): string return $name; } } - -class_alias(UrlWildcardRouter::class, 'eZ\Publish\Core\MVC\Symfony\Routing\UrlWildcardRouter'); diff --git a/src/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProvider.php b/src/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProvider.php index f4ad03819a..a57a5585dc 100644 --- a/src/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProvider.php +++ b/src/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProvider.php @@ -39,5 +39,3 @@ public function authenticate(TokenInterface $token) return $token; } } - -class_alias(AnonymousAuthenticationProvider::class, 'eZ\Publish\Core\MVC\Symfony\Security\Authentication\AnonymousAuthenticationProvider'); diff --git a/src/lib/MVC/Symfony/Security/Authentication/AuthenticatorInterface.php b/src/lib/MVC/Symfony/Security/Authentication/AuthenticatorInterface.php index c28d1fb7a1..37f4a1c20e 100644 --- a/src/lib/MVC/Symfony/Security/Authentication/AuthenticatorInterface.php +++ b/src/lib/MVC/Symfony/Security/Authentication/AuthenticatorInterface.php @@ -43,5 +43,3 @@ public function authenticate(Request $request); */ public function logout(Request $request); } - -class_alias(AuthenticatorInterface::class, 'eZ\Publish\Core\MVC\Symfony\Security\Authentication\AuthenticatorInterface'); diff --git a/src/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandler.php b/src/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandler.php index a0b4524021..87552b8854 100644 --- a/src/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandler.php +++ b/src/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandler.php @@ -50,5 +50,3 @@ protected function determineTargetUrl(Request $request) return parent::determineTargetUrl($request); } } - -class_alias(DefaultAuthenticationSuccessHandler::class, 'eZ\Publish\Core\MVC\Symfony\Security\Authentication\DefaultAuthenticationSuccessHandler'); diff --git a/src/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProvider.php b/src/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProvider.php index a1e3245456..7e70080f49 100644 --- a/src/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProvider.php +++ b/src/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProvider.php @@ -42,5 +42,3 @@ public function authenticate(TokenInterface $token) return $authenticatedToken; } } - -class_alias(RememberMeRepositoryAuthenticationProvider::class, 'eZ\Publish\Core\MVC\Symfony\Security\Authentication\RememberMeRepositoryAuthenticationProvider'); diff --git a/src/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php b/src/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php index d95ce8b160..2bbbec5a54 100644 --- a/src/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php +++ b/src/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php @@ -131,5 +131,3 @@ private function sleepUsingConstantTimer(float $startTime): void } } } - -class_alias(RepositoryAuthenticationProvider::class, 'eZ\Publish\Core\MVC\Symfony\Security\Authentication\RepositoryAuthenticationProvider'); diff --git a/src/lib/MVC/Symfony/Security/Authorization/Attribute.php b/src/lib/MVC/Symfony/Security/Authorization/Attribute.php index fccb583b54..4eda3f9ada 100644 --- a/src/lib/MVC/Symfony/Security/Authorization/Attribute.php +++ b/src/lib/MVC/Symfony/Security/Authorization/Attribute.php @@ -56,5 +56,3 @@ public function __toString() return "EZ_ROLE_{$this->module}_{$this->function}"; } } - -class_alias(Attribute::class, 'eZ\Publish\Core\MVC\Symfony\Security\Authorization\Attribute'); diff --git a/src/lib/MVC/Symfony/Security/Authorization/Voter/CoreVoter.php b/src/lib/MVC/Symfony/Security/Authorization/Voter/CoreVoter.php index 26cecaedc2..b3695a212c 100644 --- a/src/lib/MVC/Symfony/Security/Authorization/Voter/CoreVoter.php +++ b/src/lib/MVC/Symfony/Security/Authorization/Voter/CoreVoter.php @@ -73,5 +73,3 @@ public function vote(TokenInterface $token, $object, array $attributes) return VoterInterface::ACCESS_ABSTAIN; } } - -class_alias(CoreVoter::class, 'eZ\Publish\Core\MVC\Symfony\Security\Authorization\Voter\CoreVoter'); diff --git a/src/lib/MVC/Symfony/Security/Authorization/Voter/ValueObjectVoter.php b/src/lib/MVC/Symfony/Security/Authorization/Voter/ValueObjectVoter.php index f85ea6569a..d8e36aab95 100644 --- a/src/lib/MVC/Symfony/Security/Authorization/Voter/ValueObjectVoter.php +++ b/src/lib/MVC/Symfony/Security/Authorization/Voter/ValueObjectVoter.php @@ -77,5 +77,3 @@ public function vote(TokenInterface $token, $object, array $attributes) return VoterInterface::ACCESS_ABSTAIN; } } - -class_alias(ValueObjectVoter::class, 'eZ\Publish\Core\MVC\Symfony\Security\Authorization\Voter\ValueObjectVoter'); diff --git a/src/lib/MVC/Symfony/Security/EventListener/SecurityListener.php b/src/lib/MVC/Symfony/Security/EventListener/SecurityListener.php index 14b60f79d2..0cc43aeeb7 100644 --- a/src/lib/MVC/Symfony/Security/EventListener/SecurityListener.php +++ b/src/lib/MVC/Symfony/Security/EventListener/SecurityListener.php @@ -250,5 +250,3 @@ protected function hasAccess(SiteAccess $siteAccess) ); } } - -class_alias(SecurityListener::class, 'eZ\Publish\Core\MVC\Symfony\Security\EventListener\SecurityListener'); diff --git a/src/lib/MVC/Symfony/Security/Exception/UnauthorizedSiteAccessException.php b/src/lib/MVC/Symfony/Security/Exception/UnauthorizedSiteAccessException.php index 06db5e8f73..e2784b329d 100644 --- a/src/lib/MVC/Symfony/Security/Exception/UnauthorizedSiteAccessException.php +++ b/src/lib/MVC/Symfony/Security/Exception/UnauthorizedSiteAccessException.php @@ -22,5 +22,3 @@ public function __construct(SiteAccess $siteAccess, $username, Exception $previo parent::__construct("User '$username' doesn't have user/login permission to SiteAccess '$siteAccess->name'", $previous); } } - -class_alias(UnauthorizedSiteAccessException::class, 'eZ\Publish\Core\MVC\Symfony\Security\Exception\UnauthorizedSiteAccessException'); diff --git a/src/lib/MVC/Symfony/Security/HttpUtils.php b/src/lib/MVC/Symfony/Security/HttpUtils.php index 9e55db0ae7..bc382f66c7 100644 --- a/src/lib/MVC/Symfony/Security/HttpUtils.php +++ b/src/lib/MVC/Symfony/Security/HttpUtils.php @@ -59,5 +59,3 @@ private function isRouteName($path) return $path && strpos($path, 'http') !== 0 && strpos($path, '/') !== 0; } } - -class_alias(HttpUtils::class, 'eZ\Publish\Core\MVC\Symfony\Security\HttpUtils'); diff --git a/src/lib/MVC/Symfony/Security/InteractiveLoginToken.php b/src/lib/MVC/Symfony/Security/InteractiveLoginToken.php index 93a7cb3d79..a8e4417b6b 100644 --- a/src/lib/MVC/Symfony/Security/InteractiveLoginToken.php +++ b/src/lib/MVC/Symfony/Security/InteractiveLoginToken.php @@ -85,5 +85,3 @@ public function isAuthenticated(): bool return parent::isAuthenticated(); } } - -class_alias(InteractiveLoginToken::class, 'eZ\Publish\Core\MVC\Symfony\Security\InteractiveLoginToken'); diff --git a/src/lib/MVC/Symfony/Security/ReferenceUserInterface.php b/src/lib/MVC/Symfony/Security/ReferenceUserInterface.php index bca1ce0825..48002cfa10 100644 --- a/src/lib/MVC/Symfony/Security/ReferenceUserInterface.php +++ b/src/lib/MVC/Symfony/Security/ReferenceUserInterface.php @@ -31,5 +31,3 @@ public function getAPIUserReference(); */ public function getAPIUser(); } - -class_alias(ReferenceUserInterface::class, 'eZ\Publish\Core\MVC\Symfony\Security\ReferenceUserInterface'); diff --git a/src/lib/MVC/Symfony/Security/User.php b/src/lib/MVC/Symfony/Security/User.php index 0e2b1d65a2..1e610e21b4 100644 --- a/src/lib/MVC/Symfony/Security/User.php +++ b/src/lib/MVC/Symfony/Security/User.php @@ -153,5 +153,3 @@ public function __sleep() return ['reference', 'roles']; } } - -class_alias(User::class, 'eZ\Publish\Core\MVC\Symfony\Security\User'); diff --git a/src/lib/MVC/Symfony/Security/User/APIUserProviderInterface.php b/src/lib/MVC/Symfony/Security/User/APIUserProviderInterface.php index 85ca84e081..4d4a2a534f 100644 --- a/src/lib/MVC/Symfony/Security/User/APIUserProviderInterface.php +++ b/src/lib/MVC/Symfony/Security/User/APIUserProviderInterface.php @@ -24,5 +24,3 @@ interface APIUserProviderInterface extends UserProviderInterface */ public function loadUserByAPIUser(APIUser $apiUser); } - -class_alias(APIUserProviderInterface::class, 'eZ\Publish\Core\MVC\Symfony\Security\User\APIUserProviderInterface'); diff --git a/src/lib/MVC/Symfony/Security/User/BaseProvider.php b/src/lib/MVC/Symfony/Security/User/BaseProvider.php index 66769cd8e1..b9f7ffe1c5 100644 --- a/src/lib/MVC/Symfony/Security/User/BaseProvider.php +++ b/src/lib/MVC/Symfony/Security/User/BaseProvider.php @@ -95,5 +95,3 @@ protected function createSecurityUser(APIUser $apiUser): User return new User($apiUser, ['ROLE_USER']); } } - -class_alias(BaseProvider::class, 'eZ\Publish\Core\MVC\Symfony\Security\User\BaseProvider'); diff --git a/src/lib/MVC/Symfony/Security/User/EmailProvider.php b/src/lib/MVC/Symfony/Security/User/EmailProvider.php index 02e7f6dd92..79aae22ed1 100644 --- a/src/lib/MVC/Symfony/Security/User/EmailProvider.php +++ b/src/lib/MVC/Symfony/Security/User/EmailProvider.php @@ -32,5 +32,3 @@ public function loadUserByUsername($user) } } } - -class_alias(EmailProvider::class, 'eZ\Publish\Core\MVC\Symfony\Security\User\EmailProvider'); diff --git a/src/lib/MVC/Symfony/Security/User/UsernameProvider.php b/src/lib/MVC/Symfony/Security/User/UsernameProvider.php index e78196e206..f9adacf79a 100644 --- a/src/lib/MVC/Symfony/Security/User/UsernameProvider.php +++ b/src/lib/MVC/Symfony/Security/User/UsernameProvider.php @@ -32,5 +32,3 @@ public function loadUserByUsername($user) } } } - -class_alias(UsernameProvider::class, 'eZ\Publish\Core\MVC\Symfony\Security\User\UsernameProvider'); diff --git a/src/lib/MVC/Symfony/Security/UserChecker.php b/src/lib/MVC/Symfony/Security/UserChecker.php index 1383a21cb2..40703b4b8b 100644 --- a/src/lib/MVC/Symfony/Security/UserChecker.php +++ b/src/lib/MVC/Symfony/Security/UserChecker.php @@ -53,5 +53,3 @@ public function checkPostAuth(UserInterface $user): void } } } - -class_alias(UserChecker::class, 'eZ\Publish\Core\MVC\Symfony\Security\UserChecker'); diff --git a/src/lib/MVC/Symfony/Security/UserInterface.php b/src/lib/MVC/Symfony/Security/UserInterface.php index 5e75ac23ba..02886004f7 100644 --- a/src/lib/MVC/Symfony/Security/UserInterface.php +++ b/src/lib/MVC/Symfony/Security/UserInterface.php @@ -27,5 +27,3 @@ public function getAPIUser(); */ public function setAPIUser(APIUser $apiUser); } - -class_alias(UserInterface::class, 'eZ\Publish\Core\MVC\Symfony\Security\UserInterface'); diff --git a/src/lib/MVC/Symfony/Security/UserWrapped.php b/src/lib/MVC/Symfony/Security/UserWrapped.php index 7de58b54fb..9022edecce 100644 --- a/src/lib/MVC/Symfony/Security/UserWrapped.php +++ b/src/lib/MVC/Symfony/Security/UserWrapped.php @@ -144,5 +144,3 @@ public function __sleep(): array return ['wrappedUser', 'apiUserReference']; } } - -class_alias(UserWrapped::class, 'eZ\Publish\Core\MVC\Symfony\Security\UserWrapped'); diff --git a/src/lib/MVC/Symfony/SiteAccess.php b/src/lib/MVC/Symfony/SiteAccess.php index 0f38623fab..b7e0755de5 100644 --- a/src/lib/MVC/Symfony/SiteAccess.php +++ b/src/lib/MVC/Symfony/SiteAccess.php @@ -81,5 +81,3 @@ public function jsonSerialize(): array ]; } } - -class_alias(SiteAccess::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess'); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher.php b/src/lib/MVC/Symfony/SiteAccess/Matcher.php index 80205e7515..87c3fff24a 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher.php @@ -36,5 +36,3 @@ public function match(); */ public function getName(); } - -class_alias(Matcher::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher'); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php index f03a8fa8f0..b43d6bd2cc 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php @@ -128,5 +128,3 @@ public function __sleep() return ['subMatchers']; } } - -class_alias(Compound::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Compound'); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalAnd.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalAnd.php index 9d6ee11f19..7d8c895ef6 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalAnd.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalAnd.php @@ -60,5 +60,3 @@ public function reverseMatch($siteAccessName) } } } - -class_alias(LogicalAnd::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Compound\LogicalAnd'); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalOr.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalOr.php index 5dace917c4..b7ed76ccdd 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalOr.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalOr.php @@ -54,5 +54,3 @@ public function reverseMatch($siteAccessName) } } } - -class_alias(LogicalOr::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Compound\LogicalOr'); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/CompoundInterface.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/CompoundInterface.php index 8de1719f4d..e7615e04a4 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/CompoundInterface.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/CompoundInterface.php @@ -34,5 +34,3 @@ public function getSubMatchers(); */ public function setSubMatchers(array $subMatchers); } - -class_alias(CompoundInterface::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\CompoundInterface'); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php index 6d1984c0cc..72927a907b 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php @@ -111,5 +111,3 @@ private function getHostElements() return $this->hostElements = $elements; } } - -class_alias(HostElement::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\HostElement'); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php index 7fede2a377..7bba712087 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php @@ -70,5 +70,3 @@ public function getRequest() return $this->request; } } - -class_alias(HostText::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\HostText'); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php index f16fa5fd02..6b30b4253d 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php @@ -136,5 +136,3 @@ private function getReverseMap($defaultSiteAccess) return $this->reverseMap = array_flip($map); } } - -class_alias(Map::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map'); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php index 7a8b1aff43..d9380fa24b 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php @@ -41,5 +41,3 @@ public function reverseMatch($siteAccessName) return $matcher; } } - -class_alias(Host::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map\Host'); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php index d954bca4e7..33c3b44740 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php @@ -55,5 +55,3 @@ public function reverseMatch($siteAccessName) return $matcher; } } - -class_alias(Port::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map\Port'); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php index 1fdccd82fe..d6a76026ed 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php @@ -88,5 +88,3 @@ public function reverseMatch($siteAccessName) return $matcher; } } - -class_alias(URI::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Map\URI'); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php index f277b34a6d..a00d04cf09 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php @@ -103,5 +103,3 @@ public function setMatchElement($element) $this->element = $element; } } - -class_alias(Regex::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Regex'); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/Host.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/Host.php index e09ff879ba..660bc4ea0e 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/Host.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/Host.php @@ -56,5 +56,3 @@ public function setRequest(SimplifiedRequest $request) parent::setRequest($request); } } - -class_alias(Host::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Regex\Host'); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/URI.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/URI.php index 449a57fab8..a8d8e1a7b1 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/URI.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/URI.php @@ -56,5 +56,3 @@ public function setRequest(SimplifiedRequest $request) parent::setRequest($request); } } - -class_alias(URI::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\Regex\URI'); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php index 7f9a8aa636..797a503b28 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php @@ -184,5 +184,3 @@ public function reverseMatch($siteAccessName) return $this; } } - -class_alias(URIElement::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\URIElement'); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php index abf8f1359d..963407a921 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php @@ -103,5 +103,3 @@ public function getRequest() return $this->request; } } - -class_alias(URIText::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Matcher\URIText'); diff --git a/src/lib/MVC/Symfony/SiteAccess/MatcherBuilder.php b/src/lib/MVC/Symfony/SiteAccess/MatcherBuilder.php index 8c514b8fcf..cfe5772426 100644 --- a/src/lib/MVC/Symfony/SiteAccess/MatcherBuilder.php +++ b/src/lib/MVC/Symfony/SiteAccess/MatcherBuilder.php @@ -40,5 +40,3 @@ public function buildMatcher($matcherIdentifier, $matchingConfiguration, Simplif return $matcher; } } - -class_alias(MatcherBuilder::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\MatcherBuilder'); diff --git a/src/lib/MVC/Symfony/SiteAccess/MatcherBuilderInterface.php b/src/lib/MVC/Symfony/SiteAccess/MatcherBuilderInterface.php index c7bb4391dd..24dae14b79 100644 --- a/src/lib/MVC/Symfony/SiteAccess/MatcherBuilderInterface.php +++ b/src/lib/MVC/Symfony/SiteAccess/MatcherBuilderInterface.php @@ -24,5 +24,3 @@ interface MatcherBuilderInterface */ public function buildMatcher($matcherIdentifier, $matchingConfiguration, SimplifiedRequest $request); } - -class_alias(MatcherBuilderInterface::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\MatcherBuilderInterface'); diff --git a/src/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProvider.php b/src/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProvider.php index 8ac3633a87..302ab528f1 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProvider.php +++ b/src/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProvider.php @@ -62,5 +62,3 @@ public function getSiteAccess(string $name): SiteAccess throw new NotFoundException('Site Access', $name); } } - -class_alias(ChainSiteAccessProvider::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Provider\ChainSiteAccessProvider'); diff --git a/src/lib/MVC/Symfony/SiteAccess/Provider/StaticSiteAccessProvider.php b/src/lib/MVC/Symfony/SiteAccess/Provider/StaticSiteAccessProvider.php index 136694ecfa..3041e593e0 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Provider/StaticSiteAccessProvider.php +++ b/src/lib/MVC/Symfony/SiteAccess/Provider/StaticSiteAccessProvider.php @@ -75,5 +75,3 @@ static function ($groupName) { return $siteAccess; } } - -class_alias(StaticSiteAccessProvider::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Provider\StaticSiteAccessProvider'); diff --git a/src/lib/MVC/Symfony/SiteAccess/Router.php b/src/lib/MVC/Symfony/SiteAccess/Router.php index 770448d4b6..ad2acaa9b6 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Router.php +++ b/src/lib/MVC/Symfony/SiteAccess/Router.php @@ -272,5 +272,3 @@ public function setSiteAccess(SiteAccess $siteAccess = null) $this->siteAccess = $siteAccess; } } - -class_alias(Router::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Router'); diff --git a/src/lib/MVC/Symfony/SiteAccess/SiteAccessAware.php b/src/lib/MVC/Symfony/SiteAccess/SiteAccessAware.php index e2b0e0ee0c..2d8f4a79bd 100644 --- a/src/lib/MVC/Symfony/SiteAccess/SiteAccessAware.php +++ b/src/lib/MVC/Symfony/SiteAccess/SiteAccessAware.php @@ -16,5 +16,3 @@ interface SiteAccessAware { public function setSiteAccess(SiteAccess $siteAccess = null); } - -class_alias(SiteAccessAware::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessAware'); diff --git a/src/lib/MVC/Symfony/SiteAccess/SiteAccessProviderInterface.php b/src/lib/MVC/Symfony/SiteAccess/SiteAccessProviderInterface.php index 6d71d14894..16e1a0bce9 100644 --- a/src/lib/MVC/Symfony/SiteAccess/SiteAccessProviderInterface.php +++ b/src/lib/MVC/Symfony/SiteAccess/SiteAccessProviderInterface.php @@ -22,5 +22,3 @@ public function getSiteAccess(string $name): SiteAccess; public function getSiteAccesses(): Traversable; } - -class_alias(SiteAccessProviderInterface::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessProviderInterface'); diff --git a/src/lib/MVC/Symfony/SiteAccess/SiteAccessRouterInterface.php b/src/lib/MVC/Symfony/SiteAccess/SiteAccessRouterInterface.php index 8fa74733e6..da371570d8 100644 --- a/src/lib/MVC/Symfony/SiteAccess/SiteAccessRouterInterface.php +++ b/src/lib/MVC/Symfony/SiteAccess/SiteAccessRouterInterface.php @@ -35,5 +35,3 @@ public function match(SimplifiedRequest $request); */ public function matchByName($siteAccessName); } - -class_alias(SiteAccessRouterInterface::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessRouterInterface'); diff --git a/src/lib/MVC/Symfony/SiteAccess/SiteAccessService.php b/src/lib/MVC/Symfony/SiteAccess/SiteAccessService.php index 3a27a33f62..a3b83e506d 100644 --- a/src/lib/MVC/Symfony/SiteAccess/SiteAccessService.php +++ b/src/lib/MVC/Symfony/SiteAccess/SiteAccessService.php @@ -92,5 +92,3 @@ public function getSiteAccessesRelation(?SiteAccess $siteAccess = null): array return $saRelationMap[$repository][$rootLocationId]; } } - -class_alias(SiteAccessService::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessService'); diff --git a/src/lib/MVC/Symfony/SiteAccess/SiteAccessServiceInterface.php b/src/lib/MVC/Symfony/SiteAccess/SiteAccessServiceInterface.php index 2bd1dd7342..05f7d29f46 100644 --- a/src/lib/MVC/Symfony/SiteAccess/SiteAccessServiceInterface.php +++ b/src/lib/MVC/Symfony/SiteAccess/SiteAccessServiceInterface.php @@ -36,5 +36,3 @@ public function getCurrent(): ?SiteAccess; */ public function getSiteAccessesRelation(?SiteAccess $siteAccess = null): array; } - -class_alias(SiteAccessServiceInterface::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessServiceInterface'); diff --git a/src/lib/MVC/Symfony/SiteAccess/URILexer.php b/src/lib/MVC/Symfony/SiteAccess/URILexer.php index b47403a11d..91b62d345a 100644 --- a/src/lib/MVC/Symfony/SiteAccess/URILexer.php +++ b/src/lib/MVC/Symfony/SiteAccess/URILexer.php @@ -31,5 +31,3 @@ public function analyseURI($uri); */ public function analyseLink($linkUri); } - -class_alias(URILexer::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\URILexer'); diff --git a/src/lib/MVC/Symfony/SiteAccess/VersatileMatcher.php b/src/lib/MVC/Symfony/SiteAccess/VersatileMatcher.php index 09a66da580..0445e2e9b6 100644 --- a/src/lib/MVC/Symfony/SiteAccess/VersatileMatcher.php +++ b/src/lib/MVC/Symfony/SiteAccess/VersatileMatcher.php @@ -36,5 +36,3 @@ public function reverseMatch($siteAccessName); */ public function getRequest(); } - -class_alias(VersatileMatcher::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\VersatileMatcher'); diff --git a/src/lib/MVC/Symfony/SiteAccessGroup.php b/src/lib/MVC/Symfony/SiteAccessGroup.php index 9f892c726c..32968d3cd9 100644 --- a/src/lib/MVC/Symfony/SiteAccessGroup.php +++ b/src/lib/MVC/Symfony/SiteAccessGroup.php @@ -40,5 +40,3 @@ public function jsonSerialize(): array ]; } } - -class_alias(SiteAccessGroup::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccessGroup'); diff --git a/src/lib/MVC/Symfony/Templating/Exception/InvalidResponseException.php b/src/lib/MVC/Symfony/Templating/Exception/InvalidResponseException.php index 61eed21bfb..9cc72a46f0 100644 --- a/src/lib/MVC/Symfony/Templating/Exception/InvalidResponseException.php +++ b/src/lib/MVC/Symfony/Templating/Exception/InvalidResponseException.php @@ -26,5 +26,3 @@ public function __construct(string $whatIsWrong) ); } } - -class_alias(InvalidResponseException::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Exception\InvalidResponseException'); diff --git a/src/lib/MVC/Symfony/Templating/Exception/MissingFieldBlockException.php b/src/lib/MVC/Symfony/Templating/Exception/MissingFieldBlockException.php index aafd93cb7c..162376330a 100644 --- a/src/lib/MVC/Symfony/Templating/Exception/MissingFieldBlockException.php +++ b/src/lib/MVC/Symfony/Templating/Exception/MissingFieldBlockException.php @@ -12,5 +12,3 @@ class MissingFieldBlockException extends RuntimeException { } - -class_alias(MissingFieldBlockException::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Exception\MissingFieldBlockException'); diff --git a/src/lib/MVC/Symfony/Templating/FieldBlockRendererInterface.php b/src/lib/MVC/Symfony/Templating/FieldBlockRendererInterface.php index 76fafaf50a..201fb58949 100644 --- a/src/lib/MVC/Symfony/Templating/FieldBlockRendererInterface.php +++ b/src/lib/MVC/Symfony/Templating/FieldBlockRendererInterface.php @@ -61,5 +61,3 @@ public function renderFieldDefinitionView(FieldDefinition $fieldDefinition, arra */ public function renderFieldDefinitionEdit(FieldDefinition $fieldDefinition, array $params = []); } - -class_alias(FieldBlockRendererInterface::class, 'eZ\Publish\Core\MVC\Symfony\Templating\FieldBlockRendererInterface'); diff --git a/src/lib/MVC/Symfony/Templating/GlobalHelper.php b/src/lib/MVC/Symfony/Templating/GlobalHelper.php index 854a46435e..83cc7cd0bd 100644 --- a/src/lib/MVC/Symfony/Templating/GlobalHelper.php +++ b/src/lib/MVC/Symfony/Templating/GlobalHelper.php @@ -172,5 +172,3 @@ public function getConfigResolver() return $this->configResolver; } } - -class_alias(GlobalHelper::class, 'eZ\Publish\Core\MVC\Symfony\Templating\GlobalHelper'); diff --git a/src/lib/MVC/Symfony/Templating/RenderContentStrategy.php b/src/lib/MVC/Symfony/Templating/RenderContentStrategy.php index fead09659d..d7d32ab035 100644 --- a/src/lib/MVC/Symfony/Templating/RenderContentStrategy.php +++ b/src/lib/MVC/Symfony/Templating/RenderContentStrategy.php @@ -48,5 +48,3 @@ public function render(ValueObject $valueObject, RenderOptions $options): string return $renderer->render($controllerReference, $currentRequest)->getContent(); } } - -class_alias(RenderContentStrategy::class, 'eZ\Publish\Core\MVC\Symfony\Templating\RenderContentStrategy'); diff --git a/src/lib/MVC/Symfony/Templating/RenderLocationStrategy.php b/src/lib/MVC/Symfony/Templating/RenderLocationStrategy.php index 15b794d85e..cb843a076e 100644 --- a/src/lib/MVC/Symfony/Templating/RenderLocationStrategy.php +++ b/src/lib/MVC/Symfony/Templating/RenderLocationStrategy.php @@ -49,5 +49,3 @@ public function render(ValueObject $valueObject, RenderOptions $options): string return $renderer->render($controllerReference, $currentRequest)->getContent(); } } - -class_alias(RenderLocationStrategy::class, 'eZ\Publish\Core\MVC\Symfony\Templating\RenderLocationStrategy'); diff --git a/src/lib/MVC/Symfony/Templating/RenderOptions.php b/src/lib/MVC/Symfony/Templating/RenderOptions.php index 1abf2f7a36..1170467fb9 100644 --- a/src/lib/MVC/Symfony/Templating/RenderOptions.php +++ b/src/lib/MVC/Symfony/Templating/RenderOptions.php @@ -57,5 +57,3 @@ public function remove(string $key): void unset($this->options[$key]); } } - -class_alias(RenderOptions::class, 'eZ\Publish\Core\MVC\Symfony\Templating\RenderOptions'); diff --git a/src/lib/MVC/Symfony/Templating/RenderStrategy.php b/src/lib/MVC/Symfony/Templating/RenderStrategy.php index c709a851ee..fa0bf8bba5 100644 --- a/src/lib/MVC/Symfony/Templating/RenderStrategy.php +++ b/src/lib/MVC/Symfony/Templating/RenderStrategy.php @@ -48,5 +48,3 @@ public function render(ValueObject $valueObject, RenderOptions $options): string )); } } - -class_alias(RenderStrategy::class, 'eZ\Publish\Core\MVC\Symfony\Templating\RenderStrategy'); diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php index f19f336033..781c6db17c 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php @@ -327,5 +327,3 @@ public function getFirstFilledImageFieldIdentifier(Content $content) return null; } } - -class_alias(ContentExtension::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\ContentExtension'); diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/CoreExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/CoreExtension.php index 821433e884..7ca88d03ac 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/CoreExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/CoreExtension.php @@ -33,5 +33,3 @@ public function getGlobals(): array ]; } } - -class_alias(CoreExtension::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\CoreExtension'); diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/DataAttributesExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/DataAttributesExtension.php index 4e6b1c170c..6fd90f50ad 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/DataAttributesExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/DataAttributesExtension.php @@ -63,5 +63,3 @@ public function serializeDataAttributes(array $dataAttributes): string return rtrim($result); } } - -class_alias(DataAttributesExtension::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\DataAttributesExtension'); diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtension.php index 88950eebc7..ea2820c699 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtension.php @@ -208,5 +208,3 @@ private function getFieldTypeIdentifier(Content $content, Field $field) return $this->fieldTypeIdentifiers[$key]; } } - -class_alias(FieldRenderingExtension::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\FieldRenderingExtension'); diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php index b5664bb77d..971f8bbd7a 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php @@ -120,5 +120,3 @@ public function sizeFilter($number, $precision) return $formatter->format($number); } } - -class_alias(FileSizeExtension::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\FileSizeExtension'); diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/ImageExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/ImageExtension.php index 10776d185c..86ef0ab649 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/ImageExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/ImageExtension.php @@ -109,5 +109,3 @@ public function getImageAssetContentFieldIdentifier(): string return $this->assetMapper->getContentFieldIdentifier(); } } - -class_alias(ImageExtension::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\ImageExtension'); diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/QueryRenderingExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/QueryRenderingExtension.php index 989fdb568c..8e4e53cbf2 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/QueryRenderingExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/QueryRenderingExtension.php @@ -97,5 +97,3 @@ private function assertTypeIsValid(string $type): void } } } - -class_alias(QueryRenderingExtension::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\QueryRenderingExtension'); diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderContentExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderContentExtension.php index 9fa3ebaf9f..25ae6de87e 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderContentExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderContentExtension.php @@ -65,5 +65,3 @@ public function renderContent(Content $content, array $options = []): string return $this->renderContentStrategy->render($content, $event->getRenderOptions()); } } - -class_alias(RenderContentExtension::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\RenderContentExtension'); diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderExtension.php index c441f8b13c..13421a3d31 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderExtension.php @@ -73,5 +73,3 @@ public function render(ValueObject $valueObject, array $options = []): string return $this->renderStrategy->render($valueObject, $event->getRenderOptions()); } } - -class_alias(RenderExtension::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\RenderExtension'); diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderLocationExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderLocationExtension.php index ef7f24cd4b..c0b838ddb3 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderLocationExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderLocationExtension.php @@ -65,5 +65,3 @@ public function renderLocation(Location $location, array $options = []): string return $this->renderLocationStrategy->render($location, $event->getRenderOptions()); } } - -class_alias(RenderLocationExtension::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\RenderLocationExtension'); diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtension.php index ac5f0dfffd..a759af0cb5 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtension.php @@ -179,5 +179,3 @@ public function isUrlGenerationSafe(Node $argsNode): array return []; } } - -class_alias(RoutingExtension::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\RoutingExtension'); diff --git a/src/lib/MVC/Symfony/Templating/Twig/FieldBlockRenderer.php b/src/lib/MVC/Symfony/Templating/Twig/FieldBlockRenderer.php index 5475e30bb7..b62dbcd58e 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/FieldBlockRenderer.php +++ b/src/lib/MVC/Symfony/Templating/Twig/FieldBlockRenderer.php @@ -345,5 +345,3 @@ private function sortResources(array $resources): array return $resources; } } - -class_alias(FieldBlockRenderer::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Twig\FieldBlockRenderer'); diff --git a/src/lib/MVC/Symfony/Templating/Twig/ResourceProvider.php b/src/lib/MVC/Symfony/Templating/Twig/ResourceProvider.php index 2737ca7780..1901db6a66 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/ResourceProvider.php +++ b/src/lib/MVC/Symfony/Templating/Twig/ResourceProvider.php @@ -43,5 +43,3 @@ public function getFieldDefinitionEditResources(): array return $this->configResolver->getParameter('fielddefinition_edit_templates'); } } - -class_alias(ResourceProvider::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Twig\ResourceProvider'); diff --git a/src/lib/MVC/Symfony/Templating/Twig/ResourceProviderInterface.php b/src/lib/MVC/Symfony/Templating/Twig/ResourceProviderInterface.php index b7bc1a9e33..1e88c17d5f 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/ResourceProviderInterface.php +++ b/src/lib/MVC/Symfony/Templating/Twig/ResourceProviderInterface.php @@ -30,5 +30,3 @@ public function getFieldDefinitionViewResources(): array; */ public function getFieldDefinitionEditResources(): array; } - -class_alias(ResourceProviderInterface::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Twig\ResourceProviderInterface'); diff --git a/src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php b/src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php index cbf8035d72..f78e1b9470 100644 --- a/src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php +++ b/src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php @@ -126,5 +126,3 @@ private function makeXliffMessage(Message $message) return $newMessage; } } - -class_alias(CatalogueMapperFileWriter::class, 'eZ\Publish\Core\MVC\Symfony\Translation\CatalogueMapperFileWriter'); diff --git a/src/lib/MVC/Symfony/Translation/ExceptionMessageTemplateFileVisitor.php b/src/lib/MVC/Symfony/Translation/ExceptionMessageTemplateFileVisitor.php index e4bf154c5e..2f4e163ce0 100644 --- a/src/lib/MVC/Symfony/Translation/ExceptionMessageTemplateFileVisitor.php +++ b/src/lib/MVC/Symfony/Translation/ExceptionMessageTemplateFileVisitor.php @@ -128,5 +128,3 @@ private function isIgnore($node): bool return false; } } - -class_alias(ExceptionMessageTemplateFileVisitor::class, 'eZ\Publish\Core\MVC\Symfony\Translation\ExceptionMessageTemplateFileVisitor'); diff --git a/src/lib/MVC/Symfony/Translation/FieldTypesTranslationExtractor.php b/src/lib/MVC/Symfony/Translation/FieldTypesTranslationExtractor.php index 8345a54d3b..980e490fea 100644 --- a/src/lib/MVC/Symfony/Translation/FieldTypesTranslationExtractor.php +++ b/src/lib/MVC/Symfony/Translation/FieldTypesTranslationExtractor.php @@ -40,5 +40,3 @@ public function extract() return $catalogue; } } - -class_alias(FieldTypesTranslationExtractor::class, 'eZ\Publish\Core\MVC\Symfony\Translation\FieldTypesTranslationExtractor'); diff --git a/src/lib/MVC/Symfony/Translation/TranslatableExceptionsFileVisitor.php b/src/lib/MVC/Symfony/Translation/TranslatableExceptionsFileVisitor.php index 4a61f2dd6f..37ab1998fa 100644 --- a/src/lib/MVC/Symfony/Translation/TranslatableExceptionsFileVisitor.php +++ b/src/lib/MVC/Symfony/Translation/TranslatableExceptionsFileVisitor.php @@ -226,5 +226,3 @@ private function getDocCommentForNode(Node $node) return null; } } - -class_alias(TranslatableExceptionsFileVisitor::class, 'eZ\Publish\Core\MVC\Symfony\Translation\TranslatableExceptionsFileVisitor'); diff --git a/src/lib/MVC/Symfony/Translation/ValidationErrorFileVisitor.php b/src/lib/MVC/Symfony/Translation/ValidationErrorFileVisitor.php index 1b5b21ae09..076157b360 100644 --- a/src/lib/MVC/Symfony/Translation/ValidationErrorFileVisitor.php +++ b/src/lib/MVC/Symfony/Translation/ValidationErrorFileVisitor.php @@ -226,5 +226,3 @@ private function getDocCommentForNode(Node $node) return null; } } - -class_alias(ValidationErrorFileVisitor::class, 'eZ\Publish\Core\MVC\Symfony\Translation\ValidationErrorFileVisitor'); diff --git a/src/lib/MVC/Symfony/View/BaseView.php b/src/lib/MVC/Symfony/View/BaseView.php index bdeb883134..237b77f8d5 100644 --- a/src/lib/MVC/Symfony/View/BaseView.php +++ b/src/lib/MVC/Symfony/View/BaseView.php @@ -217,5 +217,3 @@ public function isCacheEnabled() return $this->isCacheEnabled; } } - -class_alias(BaseView::class, 'eZ\Publish\Core\MVC\Symfony\View\BaseView'); diff --git a/src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php b/src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php index fe5cb6acea..6037543115 100644 --- a/src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php +++ b/src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php @@ -295,5 +295,3 @@ private function isEmbed($parameters) return false; } } - -class_alias(ContentViewBuilder::class, 'eZ\Publish\Core\MVC\Symfony\View\Builder\ContentViewBuilder'); diff --git a/src/lib/MVC/Symfony/View/Builder/ParametersFilter/RequestAttributes.php b/src/lib/MVC/Symfony/View/Builder/ParametersFilter/RequestAttributes.php index 8ec87d1539..d03b53a0b5 100644 --- a/src/lib/MVC/Symfony/View/Builder/ParametersFilter/RequestAttributes.php +++ b/src/lib/MVC/Symfony/View/Builder/ParametersFilter/RequestAttributes.php @@ -37,5 +37,3 @@ public function addRequestAttributes(FilterViewBuilderParametersEvent $e) } } } - -class_alias(RequestAttributes::class, 'eZ\Publish\Core\MVC\Symfony\View\Builder\ParametersFilter\RequestAttributes'); diff --git a/src/lib/MVC/Symfony/View/Builder/Registry/ControllerMatch.php b/src/lib/MVC/Symfony/View/Builder/Registry/ControllerMatch.php index 034e5b10cf..c6f95844b4 100644 --- a/src/lib/MVC/Symfony/View/Builder/Registry/ControllerMatch.php +++ b/src/lib/MVC/Symfony/View/Builder/Registry/ControllerMatch.php @@ -57,5 +57,3 @@ public function getFromRegistry($controllerString) return null; } } - -class_alias(ControllerMatch::class, 'eZ\Publish\Core\MVC\Symfony\View\Builder\Registry\ControllerMatch'); diff --git a/src/lib/MVC/Symfony/View/Builder/ViewBuilder.php b/src/lib/MVC/Symfony/View/Builder/ViewBuilder.php index 9bb333b46d..0802ce0918 100644 --- a/src/lib/MVC/Symfony/View/Builder/ViewBuilder.php +++ b/src/lib/MVC/Symfony/View/Builder/ViewBuilder.php @@ -32,5 +32,3 @@ public function matches($argument); */ public function buildView(array $parameters); } - -class_alias(ViewBuilder::class, 'eZ\Publish\Core\MVC\Symfony\View\Builder\ViewBuilder'); diff --git a/src/lib/MVC/Symfony/View/Builder/ViewBuilderRegistry.php b/src/lib/MVC/Symfony/View/Builder/ViewBuilderRegistry.php index d8c29c4cc0..789eb32709 100644 --- a/src/lib/MVC/Symfony/View/Builder/ViewBuilderRegistry.php +++ b/src/lib/MVC/Symfony/View/Builder/ViewBuilderRegistry.php @@ -28,5 +28,3 @@ public function getFromRegistry($argument); */ public function addToRegistry(array $objects); } - -class_alias(ViewBuilderRegistry::class, 'eZ\Publish\Core\MVC\Symfony\View\Builder\ViewBuilderRegistry'); diff --git a/src/lib/MVC/Symfony/View/CachableView.php b/src/lib/MVC/Symfony/View/CachableView.php index 7e9f073729..233a9dcc35 100644 --- a/src/lib/MVC/Symfony/View/CachableView.php +++ b/src/lib/MVC/Symfony/View/CachableView.php @@ -28,5 +28,3 @@ public function setCacheEnabled($cacheEnabled); */ public function isCacheEnabled(); } - -class_alias(CachableView::class, 'eZ\Publish\Core\MVC\Symfony\View\CachableView'); diff --git a/src/lib/MVC/Symfony/View/Configurator.php b/src/lib/MVC/Symfony/View/Configurator.php index ad516bc03e..519699052b 100644 --- a/src/lib/MVC/Symfony/View/Configurator.php +++ b/src/lib/MVC/Symfony/View/Configurator.php @@ -16,5 +16,3 @@ interface Configurator { public function configure(View $view); } - -class_alias(Configurator::class, 'eZ\Publish\Core\MVC\Symfony\View\Configurator'); diff --git a/src/lib/MVC/Symfony/View/Configurator/ViewProvider.php b/src/lib/MVC/Symfony/View/Configurator/ViewProvider.php index db75ad84dc..22a433edd9 100644 --- a/src/lib/MVC/Symfony/View/Configurator/ViewProvider.php +++ b/src/lib/MVC/Symfony/View/Configurator/ViewProvider.php @@ -52,5 +52,3 @@ public function configure(View $view) } } } - -class_alias(ViewProvider::class, 'eZ\Publish\Core\MVC\Symfony\View\Configurator\ViewProvider'); diff --git a/src/lib/MVC/Symfony/View/ContentValueView.php b/src/lib/MVC/Symfony/View/ContentValueView.php index 47d68ede1c..d7723d4ce1 100644 --- a/src/lib/MVC/Symfony/View/ContentValueView.php +++ b/src/lib/MVC/Symfony/View/ContentValueView.php @@ -19,5 +19,3 @@ interface ContentValueView */ public function getContent(); } - -class_alias(ContentValueView::class, 'eZ\Publish\Core\MVC\Symfony\View\ContentValueView'); diff --git a/src/lib/MVC/Symfony/View/ContentView.php b/src/lib/MVC/Symfony/View/ContentView.php index 981b960163..1713c0ac87 100644 --- a/src/lib/MVC/Symfony/View/ContentView.php +++ b/src/lib/MVC/Symfony/View/ContentView.php @@ -112,5 +112,3 @@ public function isEmbed() return $this->isEmbed; } } - -class_alias(ContentView::class, 'eZ\Publish\Core\MVC\Symfony\View\ContentView'); diff --git a/src/lib/MVC/Symfony/View/CustomLocationControllerChecker.php b/src/lib/MVC/Symfony/View/CustomLocationControllerChecker.php index 116e209408..8bcb2a0386 100644 --- a/src/lib/MVC/Symfony/View/CustomLocationControllerChecker.php +++ b/src/lib/MVC/Symfony/View/CustomLocationControllerChecker.php @@ -55,5 +55,3 @@ public function addViewProviders(array $viewProviders) $this->viewProviders = $viewProviders; } } - -class_alias(CustomLocationControllerChecker::class, 'eZ\Publish\Core\MVC\Symfony\View\CustomLocationControllerChecker'); diff --git a/src/lib/MVC/Symfony/View/EmbedView.php b/src/lib/MVC/Symfony/View/EmbedView.php index b18f7c00de..381422205c 100644 --- a/src/lib/MVC/Symfony/View/EmbedView.php +++ b/src/lib/MVC/Symfony/View/EmbedView.php @@ -33,5 +33,3 @@ public function setIsEmbed($value); */ public function isEmbed(); } - -class_alias(EmbedView::class, 'eZ\Publish\Core\MVC\Symfony\View\EmbedView'); diff --git a/src/lib/MVC/Symfony/View/Event/FilterViewBuilderParametersEvent.php b/src/lib/MVC/Symfony/View/Event/FilterViewBuilderParametersEvent.php index 9794e2c16d..914b9f2466 100644 --- a/src/lib/MVC/Symfony/View/Event/FilterViewBuilderParametersEvent.php +++ b/src/lib/MVC/Symfony/View/Event/FilterViewBuilderParametersEvent.php @@ -50,5 +50,3 @@ public function getParameters() return $this->parameters; } } - -class_alias(FilterViewBuilderParametersEvent::class, 'eZ\Publish\Core\MVC\Symfony\View\Event\FilterViewBuilderParametersEvent'); diff --git a/src/lib/MVC/Symfony/View/Event/FilterViewParametersEvent.php b/src/lib/MVC/Symfony/View/Event/FilterViewParametersEvent.php index 8a289349f0..496719cd45 100644 --- a/src/lib/MVC/Symfony/View/Event/FilterViewParametersEvent.php +++ b/src/lib/MVC/Symfony/View/Event/FilterViewParametersEvent.php @@ -86,5 +86,3 @@ public function getView() return $this->view; } } - -class_alias(FilterViewParametersEvent::class, 'eZ\Publish\Core\MVC\Symfony\View\Event\FilterViewParametersEvent'); diff --git a/src/lib/MVC/Symfony/View/GenericVariableProviderRegistry.php b/src/lib/MVC/Symfony/View/GenericVariableProviderRegistry.php index f3b69beba7..b9c234f043 100644 --- a/src/lib/MVC/Symfony/View/GenericVariableProviderRegistry.php +++ b/src/lib/MVC/Symfony/View/GenericVariableProviderRegistry.php @@ -43,5 +43,3 @@ public function hasTwigVariableProvider(string $identifier): bool return isset($this->twigVariableProviders[$identifier]); } } - -class_alias(GenericVariableProviderRegistry::class, 'eZ\Publish\Core\MVC\Symfony\View\GenericVariableProviderRegistry'); diff --git a/src/lib/MVC/Symfony/View/LocationValueView.php b/src/lib/MVC/Symfony/View/LocationValueView.php index e0a03ee080..ad447f489b 100644 --- a/src/lib/MVC/Symfony/View/LocationValueView.php +++ b/src/lib/MVC/Symfony/View/LocationValueView.php @@ -14,5 +14,3 @@ interface LocationValueView */ public function getLocation(); } - -class_alias(LocationValueView::class, 'eZ\Publish\Core\MVC\Symfony\View\LocationValueView'); diff --git a/src/lib/MVC/Symfony/View/LoginFormView.php b/src/lib/MVC/Symfony/View/LoginFormView.php index 5fd90888c1..b8b611d521 100644 --- a/src/lib/MVC/Symfony/View/LoginFormView.php +++ b/src/lib/MVC/Symfony/View/LoginFormView.php @@ -46,5 +46,3 @@ protected function getInternalParameters(): array ]; } } - -class_alias(LoginFormView::class, 'eZ\Publish\Core\MVC\Symfony\View\LoginFormView'); diff --git a/src/lib/MVC/Symfony/View/Manager.php b/src/lib/MVC/Symfony/View/Manager.php index ecb4e9acef..21b051c20f 100644 --- a/src/lib/MVC/Symfony/View/Manager.php +++ b/src/lib/MVC/Symfony/View/Manager.php @@ -255,5 +255,3 @@ public function renderContentView(View $view, array $defaultParams = []) return $this->templateEngine->render($templateIdentifier, $params); } } - -class_alias(Manager::class, 'eZ\Publish\Core\MVC\Symfony\View\Manager'); diff --git a/src/lib/MVC/Symfony/View/ParametersInjector.php b/src/lib/MVC/Symfony/View/ParametersInjector.php index 06ac8fa01c..86aba1522a 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector.php @@ -14,5 +14,3 @@ interface ParametersInjector { public function injectViewParameters(View $view, array $parameters); } - -class_alias(ParametersInjector::class, 'eZ\Publish\Core\MVC\Symfony\View\ParametersInjector'); diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/CustomParameters.php b/src/lib/MVC/Symfony/View/ParametersInjector/CustomParameters.php index 87ce2a1630..bc848a6e9d 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/CustomParameters.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/CustomParameters.php @@ -31,5 +31,3 @@ public function injectCustomParameters(FilterViewParametersEvent $event) } } } - -class_alias(CustomParameters::class, 'eZ\Publish\Core\MVC\Symfony\View\ParametersInjector\CustomParameters'); diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/EmbedObjectParameters.php b/src/lib/MVC/Symfony/View/ParametersInjector/EmbedObjectParameters.php index ab4c31f78d..8e3c65f125 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/EmbedObjectParameters.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/EmbedObjectParameters.php @@ -32,5 +32,3 @@ public function injectEmbedObjectParameters(FilterViewParametersEvent $event) } } } - -class_alias(EmbedObjectParameters::class, 'eZ\Publish\Core\MVC\Symfony\View\ParametersInjector\EmbedObjectParameters'); diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/EventDispatcherInjector.php b/src/lib/MVC/Symfony/View/ParametersInjector/EventDispatcherInjector.php index 99abc7272a..a3b3ce339a 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/EventDispatcherInjector.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/EventDispatcherInjector.php @@ -33,5 +33,3 @@ public function injectViewParameters(View $view, array $parameters) $view->addParameters($event->getViewParameters()); } } - -class_alias(EventDispatcherInjector::class, 'eZ\Publish\Core\MVC\Symfony\View\ParametersInjector\EventDispatcherInjector'); diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/NoLayout.php b/src/lib/MVC/Symfony/View/ParametersInjector/NoLayout.php index a71f6704ae..0e9fdbcee5 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/NoLayout.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/NoLayout.php @@ -31,5 +31,3 @@ public function injectCustomParameters(FilterViewParametersEvent $event) ); } } - -class_alias(NoLayout::class, 'eZ\Publish\Core\MVC\Symfony\View\ParametersInjector\NoLayout'); diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/ValueObjectsIds.php b/src/lib/MVC/Symfony/View/ParametersInjector/ValueObjectsIds.php index 4218dcf18a..3afde6a271 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/ValueObjectsIds.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/ValueObjectsIds.php @@ -38,5 +38,3 @@ public function injectValueObjectsIds(View\Event\FilterViewParametersEvent $even } } } - -class_alias(ValueObjectsIds::class, 'eZ\Publish\Core\MVC\Symfony\View\ParametersInjector\ValueObjectsIds'); diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/ViewbaseLayout.php b/src/lib/MVC/Symfony/View/ParametersInjector/ViewbaseLayout.php index b90d0ac79c..96f3c00927 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/ViewbaseLayout.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/ViewbaseLayout.php @@ -49,5 +49,3 @@ public function injectViewbaseLayout(FilterViewParametersEvent $event) $event->getParameterBag()->set('page_layout', $pageLayout); } } - -class_alias(ViewbaseLayout::class, 'eZ\Publish\Core\MVC\Symfony\View\ParametersInjector\ViewbaseLayout'); diff --git a/src/lib/MVC/Symfony/View/Provider/Configured.php b/src/lib/MVC/Symfony/View/Provider/Configured.php index d2bf56d6be..4f7a38d255 100644 --- a/src/lib/MVC/Symfony/View/Provider/Configured.php +++ b/src/lib/MVC/Symfony/View/Provider/Configured.php @@ -62,5 +62,3 @@ protected function buildContentView(array $viewConfig) return $view; } } - -class_alias(Configured::class, 'eZ\Publish\Core\MVC\Symfony\View\Provider\Configured'); diff --git a/src/lib/MVC/Symfony/View/Provider/Content.php b/src/lib/MVC/Symfony/View/Provider/Content.php index 59e5f6d896..6e534fc4cc 100644 --- a/src/lib/MVC/Symfony/View/Provider/Content.php +++ b/src/lib/MVC/Symfony/View/Provider/Content.php @@ -28,5 +28,3 @@ interface Content */ public function getView(ContentInfo $contentInfo, $viewType); } - -class_alias(Content::class, 'eZ\Publish\Core\MVC\Symfony\View\Provider\Content'); diff --git a/src/lib/MVC/Symfony/View/Provider/Location.php b/src/lib/MVC/Symfony/View/Provider/Location.php index d3c01d92cd..bb20ff2b23 100644 --- a/src/lib/MVC/Symfony/View/Provider/Location.php +++ b/src/lib/MVC/Symfony/View/Provider/Location.php @@ -28,5 +28,3 @@ interface Location */ public function getView(APIContentLocation $location, $viewType); } - -class_alias(Location::class, 'eZ\Publish\Core\MVC\Symfony\View\Provider\Location'); diff --git a/src/lib/MVC/Symfony/View/Provider/Registry.php b/src/lib/MVC/Symfony/View/Provider/Registry.php index 8eb4373f63..ba751daf5a 100644 --- a/src/lib/MVC/Symfony/View/Provider/Registry.php +++ b/src/lib/MVC/Symfony/View/Provider/Registry.php @@ -46,5 +46,3 @@ public function setViewProviders(array $viewProviders) $this->viewProviders = $viewProviders; } } - -class_alias(Registry::class, 'eZ\Publish\Core\MVC\Symfony\View\Provider\Registry'); diff --git a/src/lib/MVC/Symfony/View/QueryView.php b/src/lib/MVC/Symfony/View/QueryView.php index c006faaf24..27577ff17b 100644 --- a/src/lib/MVC/Symfony/View/QueryView.php +++ b/src/lib/MVC/Symfony/View/QueryView.php @@ -11,5 +11,3 @@ final class QueryView extends BaseView { } - -class_alias(QueryView::class, 'eZ\Publish\Core\MVC\Symfony\View\QueryView'); diff --git a/src/lib/MVC/Symfony/View/Renderer.php b/src/lib/MVC/Symfony/View/Renderer.php index 8d03b30f26..0175dd4679 100644 --- a/src/lib/MVC/Symfony/View/Renderer.php +++ b/src/lib/MVC/Symfony/View/Renderer.php @@ -19,5 +19,3 @@ interface Renderer */ public function render(View $view); } - -class_alias(Renderer::class, 'eZ\Publish\Core\MVC\Symfony\View\Renderer'); diff --git a/src/lib/MVC/Symfony/View/Renderer/TemplateRenderer.php b/src/lib/MVC/Symfony/View/Renderer/TemplateRenderer.php index e7fe4df7dd..91644d1664 100644 --- a/src/lib/MVC/Symfony/View/Renderer/TemplateRenderer.php +++ b/src/lib/MVC/Symfony/View/Renderer/TemplateRenderer.php @@ -56,5 +56,3 @@ public function render(View $view) ); } } - -class_alias(TemplateRenderer::class, 'eZ\Publish\Core\MVC\Symfony\View\Renderer\TemplateRenderer'); diff --git a/src/lib/MVC/Symfony/View/VariableProviderRegistry.php b/src/lib/MVC/Symfony/View/VariableProviderRegistry.php index 3e6ed27488..01f9228f61 100644 --- a/src/lib/MVC/Symfony/View/VariableProviderRegistry.php +++ b/src/lib/MVC/Symfony/View/VariableProviderRegistry.php @@ -18,5 +18,3 @@ public function getTwigVariableProvider(string $identifier): VariableProvider; public function hasTwigVariableProvider(string $identifier): bool; } - -class_alias(VariableProviderRegistry::class, 'eZ\Publish\Core\MVC\Symfony\View\VariableProviderRegistry'); diff --git a/src/lib/MVC/Symfony/View/View.php b/src/lib/MVC/Symfony/View/View.php index 4d80d97cc5..1da8611ad7 100644 --- a/src/lib/MVC/Symfony/View/View.php +++ b/src/lib/MVC/Symfony/View/View.php @@ -133,5 +133,3 @@ public function setResponse(Response $response); */ public function getResponse(); } - -class_alias(View::class, 'eZ\Publish\Core\MVC\Symfony\View\View'); diff --git a/src/lib/MVC/Symfony/View/ViewEvents.php b/src/lib/MVC/Symfony/View/ViewEvents.php index e9786c67e6..1e6e983a12 100644 --- a/src/lib/MVC/Symfony/View/ViewEvents.php +++ b/src/lib/MVC/Symfony/View/ViewEvents.php @@ -30,5 +30,3 @@ final class ViewEvents */ public const FILTER_VIEW_PARAMETERS = 'view.parameters_injection'; } - -class_alias(ViewEvents::class, 'eZ\Publish\Core\MVC\Symfony\View\ViewEvents'); diff --git a/src/lib/MVC/Symfony/View/ViewManagerInterface.php b/src/lib/MVC/Symfony/View/ViewManagerInterface.php index 2c3cc38bf2..6c8cafbd50 100644 --- a/src/lib/MVC/Symfony/View/ViewManagerInterface.php +++ b/src/lib/MVC/Symfony/View/ViewManagerInterface.php @@ -58,5 +58,3 @@ public function renderLocation(Location $location, $viewType = self::VIEW_TYPE_F */ public function renderContentView(View $view, array $defaultParams = []); } - -class_alias(ViewManagerInterface::class, 'eZ\Publish\Core\MVC\Symfony\View\ViewManagerInterface'); diff --git a/src/lib/MVC/Symfony/View/ViewProvider.php b/src/lib/MVC/Symfony/View/ViewProvider.php index dfa1bf0dd6..90a0aa05e4 100644 --- a/src/lib/MVC/Symfony/View/ViewProvider.php +++ b/src/lib/MVC/Symfony/View/ViewProvider.php @@ -14,5 +14,3 @@ interface ViewProvider */ public function getView(View $view); } - -class_alias(ViewProvider::class, 'eZ\Publish\Core\MVC\Symfony\View\ViewProvider'); diff --git a/src/lib/Notification/Renderer/NotificationRenderer.php b/src/lib/Notification/Renderer/NotificationRenderer.php index c0797b1f58..dbcaa9820c 100644 --- a/src/lib/Notification/Renderer/NotificationRenderer.php +++ b/src/lib/Notification/Renderer/NotificationRenderer.php @@ -26,5 +26,3 @@ public function render(Notification $notification): string; */ public function generateUrl(Notification $notification): ?string; } - -class_alias(NotificationRenderer::class, 'eZ\Publish\Core\Notification\Renderer\NotificationRenderer'); diff --git a/src/lib/Notification/Renderer/Registry.php b/src/lib/Notification/Renderer/Registry.php index 25c344a146..1fa2f09dec 100644 --- a/src/lib/Notification/Renderer/Registry.php +++ b/src/lib/Notification/Renderer/Registry.php @@ -42,5 +42,3 @@ public function hasRenderer(string $alias): bool return isset($this->registry[$alias]); } } - -class_alias(Registry::class, 'eZ\Publish\Core\Notification\Renderer\Registry'); diff --git a/src/lib/Pagination/Pagerfanta/AbstractSearchResultAdapter.php b/src/lib/Pagination/Pagerfanta/AbstractSearchResultAdapter.php index fb274cc338..2817deba58 100644 --- a/src/lib/Pagination/Pagerfanta/AbstractSearchResultAdapter.php +++ b/src/lib/Pagination/Pagerfanta/AbstractSearchResultAdapter.php @@ -173,5 +173,3 @@ abstract protected function executeQuery( array $languageFilter ): SearchResult; } - -class_alias(AbstractSearchResultAdapter::class, 'eZ\Publish\Core\Pagination\Pagerfanta\AbstractSearchResultAdapter'); diff --git a/src/lib/Pagination/Pagerfanta/AdapterFactory/SearchHitAdapterFactory.php b/src/lib/Pagination/Pagerfanta/AdapterFactory/SearchHitAdapterFactory.php index 949cd8d311..97684cd854 100644 --- a/src/lib/Pagination/Pagerfanta/AdapterFactory/SearchHitAdapterFactory.php +++ b/src/lib/Pagination/Pagerfanta/AdapterFactory/SearchHitAdapterFactory.php @@ -49,5 +49,3 @@ public function createFixedAdapter(Query $query, array $languageFilter = []): Ad return new FixedSearchResultHitAdapter($searchResults); } } - -class_alias(SearchHitAdapterFactory::class, 'eZ\Publish\Core\Pagination\Pagerfanta\AdapterFactory\SearchHitAdapterFactory'); diff --git a/src/lib/Pagination/Pagerfanta/AdapterFactory/SearchHitAdapterFactoryInterface.php b/src/lib/Pagination/Pagerfanta/AdapterFactory/SearchHitAdapterFactoryInterface.php index ebdfc54c04..7717cfc618 100644 --- a/src/lib/Pagination/Pagerfanta/AdapterFactory/SearchHitAdapterFactoryInterface.php +++ b/src/lib/Pagination/Pagerfanta/AdapterFactory/SearchHitAdapterFactoryInterface.php @@ -20,5 +20,3 @@ public function createAdapter(Query $query, array $languageFilter = []): Adapter public function createFixedAdapter(Query $query, array $languageFilter = []): AdapterInterface; } - -class_alias(SearchHitAdapterFactoryInterface::class, 'eZ\Publish\Core\Pagination\Pagerfanta\AdapterFactory\SearchHitAdapterFactoryInterface'); diff --git a/src/lib/Pagination/Pagerfanta/ContentFilteringAdapter.php b/src/lib/Pagination/Pagerfanta/ContentFilteringAdapter.php index 8b4683e296..6a4f6f413e 100644 --- a/src/lib/Pagination/Pagerfanta/ContentFilteringAdapter.php +++ b/src/lib/Pagination/Pagerfanta/ContentFilteringAdapter.php @@ -61,5 +61,3 @@ public function getSlice($offset, $length): iterable return $results; } } - -class_alias(ContentFilteringAdapter::class, 'eZ\Publish\Core\Pagination\Pagerfanta\ContentFilteringAdapter'); diff --git a/src/lib/Pagination/Pagerfanta/ContentSearchAdapter.php b/src/lib/Pagination/Pagerfanta/ContentSearchAdapter.php index 9a7a399083..2f50492f11 100644 --- a/src/lib/Pagination/Pagerfanta/ContentSearchAdapter.php +++ b/src/lib/Pagination/Pagerfanta/ContentSearchAdapter.php @@ -31,5 +31,3 @@ public function getSlice($offset, $length) return $list; } } - -class_alias(ContentSearchAdapter::class, 'eZ\Publish\Core\Pagination\Pagerfanta\ContentSearchAdapter'); diff --git a/src/lib/Pagination/Pagerfanta/ContentSearchHitAdapter.php b/src/lib/Pagination/Pagerfanta/ContentSearchHitAdapter.php index 6211971e16..00e5b02b83 100644 --- a/src/lib/Pagination/Pagerfanta/ContentSearchHitAdapter.php +++ b/src/lib/Pagination/Pagerfanta/ContentSearchHitAdapter.php @@ -25,5 +25,3 @@ protected function executeQuery( return $searchService->findContent($query, $languageFilter); } } - -class_alias(ContentSearchHitAdapter::class, 'eZ\Publish\Core\Pagination\Pagerfanta\ContentSearchHitAdapter'); diff --git a/src/lib/Pagination/Pagerfanta/FixedSearchResultHitAdapter.php b/src/lib/Pagination/Pagerfanta/FixedSearchResultHitAdapter.php index 5a19b0aa14..343f463b11 100644 --- a/src/lib/Pagination/Pagerfanta/FixedSearchResultHitAdapter.php +++ b/src/lib/Pagination/Pagerfanta/FixedSearchResultHitAdapter.php @@ -51,5 +51,3 @@ public function getMaxScore(): ?float return $this->searchResult->maxScore; } } - -class_alias(FixedSearchResultHitAdapter::class, 'eZ\Publish\Core\Pagination\Pagerfanta\FixedSearchResultHitAdapter'); diff --git a/src/lib/Pagination/Pagerfanta/LocationFilteringAdapter.php b/src/lib/Pagination/Pagerfanta/LocationFilteringAdapter.php index 92bd4e6316..ef4a0cea3e 100644 --- a/src/lib/Pagination/Pagerfanta/LocationFilteringAdapter.php +++ b/src/lib/Pagination/Pagerfanta/LocationFilteringAdapter.php @@ -58,5 +58,3 @@ public function getSlice($offset, $length): iterable return $results; } } - -class_alias(LocationFilteringAdapter::class, 'eZ\Publish\Core\Pagination\Pagerfanta\LocationFilteringAdapter'); diff --git a/src/lib/Pagination/Pagerfanta/LocationSearchAdapter.php b/src/lib/Pagination/Pagerfanta/LocationSearchAdapter.php index 5ccb9cd5de..1b35248a74 100644 --- a/src/lib/Pagination/Pagerfanta/LocationSearchAdapter.php +++ b/src/lib/Pagination/Pagerfanta/LocationSearchAdapter.php @@ -31,5 +31,3 @@ public function getSlice($offset, $length) return $list; } } - -class_alias(LocationSearchAdapter::class, 'eZ\Publish\Core\Pagination\Pagerfanta\LocationSearchAdapter'); diff --git a/src/lib/Pagination/Pagerfanta/LocationSearchHitAdapter.php b/src/lib/Pagination/Pagerfanta/LocationSearchHitAdapter.php index 4602bb4006..636a1f402c 100644 --- a/src/lib/Pagination/Pagerfanta/LocationSearchHitAdapter.php +++ b/src/lib/Pagination/Pagerfanta/LocationSearchHitAdapter.php @@ -31,5 +31,3 @@ protected function executeQuery(SearchService $searchService, Query $query, arra return $searchService->findLocations($query, $languageFilter); } } - -class_alias(LocationSearchHitAdapter::class, 'eZ\Publish\Core\Pagination\Pagerfanta\LocationSearchHitAdapter'); diff --git a/src/lib/Pagination/Pagerfanta/Pagerfanta.php b/src/lib/Pagination/Pagerfanta/Pagerfanta.php index 0e3344f128..e3b5b9a5f2 100644 --- a/src/lib/Pagination/Pagerfanta/Pagerfanta.php +++ b/src/lib/Pagination/Pagerfanta/Pagerfanta.php @@ -38,5 +38,3 @@ public function getMaxScore(): ?float return $this->getAdapter()->getMaxScore(); } } - -class_alias(Pagerfanta::class, 'eZ\Publish\Core\Pagination\Pagerfanta\Pagerfanta'); diff --git a/src/lib/Pagination/Pagerfanta/SearchResultAdapter.php b/src/lib/Pagination/Pagerfanta/SearchResultAdapter.php index ea0b989932..5b0acd0acf 100644 --- a/src/lib/Pagination/Pagerfanta/SearchResultAdapter.php +++ b/src/lib/Pagination/Pagerfanta/SearchResultAdapter.php @@ -46,5 +46,3 @@ public function getTimedOut(): ?bool; */ public function getMaxScore(): ?float; } - -class_alias(SearchResultAdapter::class, 'eZ\Publish\Core\Pagination\Pagerfanta\SearchResultAdapter'); diff --git a/src/lib/Persistence/Cache/AbstractHandler.php b/src/lib/Persistence/Cache/AbstractHandler.php index d9d86cd243..b90f7c3e4f 100644 --- a/src/lib/Persistence/Cache/AbstractHandler.php +++ b/src/lib/Persistence/Cache/AbstractHandler.php @@ -138,5 +138,3 @@ final protected function getMultipleCacheItems( return $list; } } - -class_alias(AbstractHandler::class, 'eZ\Publish\Core\Persistence\Cache\AbstractHandler'); diff --git a/src/lib/Persistence/Cache/AbstractInMemoryHandler.php b/src/lib/Persistence/Cache/AbstractInMemoryHandler.php index 5a3f5d35d3..604d3c7f07 100644 --- a/src/lib/Persistence/Cache/AbstractInMemoryHandler.php +++ b/src/lib/Persistence/Cache/AbstractInMemoryHandler.php @@ -277,5 +277,3 @@ final protected function getMultipleCacheValues( return $list; } } - -class_alias(AbstractInMemoryHandler::class, 'eZ\Publish\Core\Persistence\Cache\AbstractInMemoryHandler'); diff --git a/src/lib/Persistence/Cache/AbstractInMemoryPersistenceHandler.php b/src/lib/Persistence/Cache/AbstractInMemoryPersistenceHandler.php index 5da20fac52..a412a518ff 100644 --- a/src/lib/Persistence/Cache/AbstractInMemoryPersistenceHandler.php +++ b/src/lib/Persistence/Cache/AbstractInMemoryPersistenceHandler.php @@ -60,5 +60,3 @@ protected function init(): void // overload to add init logic if needed in handler } } - -class_alias(AbstractInMemoryPersistenceHandler::class, 'eZ\Publish\Core\Persistence\Cache\AbstractInMemoryPersistenceHandler'); diff --git a/src/lib/Persistence/Cache/Adapter/TransactionAwareAdapterInterface.php b/src/lib/Persistence/Cache/Adapter/TransactionAwareAdapterInterface.php index bb4c17f388..06e280f94d 100644 --- a/src/lib/Persistence/Cache/Adapter/TransactionAwareAdapterInterface.php +++ b/src/lib/Persistence/Cache/Adapter/TransactionAwareAdapterInterface.php @@ -37,5 +37,3 @@ public function commitTransaction(): void; */ public function rollbackTransaction(): void; } - -class_alias(TransactionAwareAdapterInterface::class, 'eZ\Publish\Core\Persistence\Cache\Adapter\TransactionAwareAdapterInterface'); diff --git a/src/lib/Persistence/Cache/Adapter/TransactionalInMemoryCacheAdapter.php b/src/lib/Persistence/Cache/Adapter/TransactionalInMemoryCacheAdapter.php index 7f473511a6..6ac7994ce1 100644 --- a/src/lib/Persistence/Cache/Adapter/TransactionalInMemoryCacheAdapter.php +++ b/src/lib/Persistence/Cache/Adapter/TransactionalInMemoryCacheAdapter.php @@ -306,5 +306,3 @@ private function clearInMemoryPools(): void } } } - -class_alias(TransactionalInMemoryCacheAdapter::class, 'eZ\Publish\Core\Persistence\Cache\Adapter\TransactionalInMemoryCacheAdapter'); diff --git a/src/lib/Persistence/Cache/BookmarkHandler.php b/src/lib/Persistence/Cache/BookmarkHandler.php index bf29f9454d..46e8ee9988 100644 --- a/src/lib/Persistence/Cache/BookmarkHandler.php +++ b/src/lib/Persistence/Cache/BookmarkHandler.php @@ -131,5 +131,3 @@ public function loadUserIdsByLocation(Location $location): array return $this->persistenceHandler->bookmarkHandler()->loadUserIdsByLocation($location); } } - -class_alias(BookmarkHandler::class, 'eZ\Publish\Core\Persistence\Cache\BookmarkHandler'); diff --git a/src/lib/Persistence/Cache/ContentHandler.php b/src/lib/Persistence/Cache/ContentHandler.php index 30794a01b0..5389e20668 100644 --- a/src/lib/Persistence/Cache/ContentHandler.php +++ b/src/lib/Persistence/Cache/ContentHandler.php @@ -783,5 +783,3 @@ function (VersionInfo $versionInfo) { ); } } - -class_alias(ContentHandler::class, 'eZ\Publish\Core\Persistence\Cache\ContentHandler'); diff --git a/src/lib/Persistence/Cache/ContentLanguageHandler.php b/src/lib/Persistence/Cache/ContentLanguageHandler.php index e5e02875ee..94f90c2fa5 100644 --- a/src/lib/Persistence/Cache/ContentLanguageHandler.php +++ b/src/lib/Persistence/Cache/ContentLanguageHandler.php @@ -174,5 +174,3 @@ public function delete($id) return $return; } } - -class_alias(ContentLanguageHandler::class, 'eZ\Publish\Core\Persistence\Cache\ContentLanguageHandler'); diff --git a/src/lib/Persistence/Cache/ContentTypeHandler.php b/src/lib/Persistence/Cache/ContentTypeHandler.php index a8e4dda0dd..123a0ac74f 100644 --- a/src/lib/Persistence/Cache/ContentTypeHandler.php +++ b/src/lib/Persistence/Cache/ContentTypeHandler.php @@ -635,5 +635,3 @@ public function deleteByUserAndStatus(int $userId, int $status): void } } } - -class_alias(ContentTypeHandler::class, 'eZ\Publish\Core\Persistence\Cache\ContentTypeHandler'); diff --git a/src/lib/Persistence/Cache/Handler.php b/src/lib/Persistence/Cache/Handler.php index 08d4cd17f6..51bbc3e73b 100644 --- a/src/lib/Persistence/Cache/Handler.php +++ b/src/lib/Persistence/Cache/Handler.php @@ -275,5 +275,3 @@ public function rollback() $this->transactionHandler->rollback(); } } - -class_alias(Handler::class, 'eZ\Publish\Core\Persistence\Cache\Handler'); diff --git a/src/lib/Persistence/Cache/InMemory/InMemoryCache.php b/src/lib/Persistence/Cache/InMemory/InMemoryCache.php index 49c69805fd..f9fb3bbe4f 100644 --- a/src/lib/Persistence/Cache/InMemory/InMemoryCache.php +++ b/src/lib/Persistence/Cache/InMemory/InMemoryCache.php @@ -218,5 +218,3 @@ private function vacuum(): void } } } - -class_alias(InMemoryCache::class, 'eZ\Publish\Core\Persistence\Cache\InMemory\InMemoryCache'); diff --git a/src/lib/Persistence/Cache/LocationHandler.php b/src/lib/Persistence/Cache/LocationHandler.php index 1d681883a6..aaf4ba161e 100644 --- a/src/lib/Persistence/Cache/LocationHandler.php +++ b/src/lib/Persistence/Cache/LocationHandler.php @@ -508,5 +508,3 @@ public function countLocationsByContent(int $contentId): int return $this->persistenceHandler->locationHandler()->countLocationsByContent($contentId); } } - -class_alias(LocationHandler::class, 'eZ\Publish\Core\Persistence\Cache\LocationHandler'); diff --git a/src/lib/Persistence/Cache/NotificationHandler.php b/src/lib/Persistence/Cache/NotificationHandler.php index 572687d4cc..771e84b615 100644 --- a/src/lib/Persistence/Cache/NotificationHandler.php +++ b/src/lib/Persistence/Cache/NotificationHandler.php @@ -164,5 +164,3 @@ public function loadUserNotifications(int $userId, int $offset, int $limit): arr return $this->persistenceHandler->notificationHandler()->loadUserNotifications($userId, $offset, $limit); } } - -class_alias(NotificationHandler::class, 'eZ\Publish\Core\Persistence\Cache\NotificationHandler'); diff --git a/src/lib/Persistence/Cache/ObjectStateHandler.php b/src/lib/Persistence/Cache/ObjectStateHandler.php index 16b3d219fc..e66806e21e 100644 --- a/src/lib/Persistence/Cache/ObjectStateHandler.php +++ b/src/lib/Persistence/Cache/ObjectStateHandler.php @@ -369,5 +369,3 @@ public function getContentCount($stateId) return $this->persistenceHandler->objectStateHandler()->getContentCount($stateId); } } - -class_alias(ObjectStateHandler::class, 'eZ\Publish\Core\Persistence\Cache\ObjectStateHandler'); diff --git a/src/lib/Persistence/Cache/PersistenceLogger.php b/src/lib/Persistence/Cache/PersistenceLogger.php index 53da8fbb47..f4392b4e44 100644 --- a/src/lib/Persistence/Cache/PersistenceLogger.php +++ b/src/lib/Persistence/Cache/PersistenceLogger.php @@ -250,5 +250,3 @@ public function getLoadedUnCachedHandlers(): array return $this->unCachedHandlers; } } - -class_alias(PersistenceLogger::class, 'eZ\Publish\Core\Persistence\Cache\PersistenceLogger'); diff --git a/src/lib/Persistence/Cache/SectionHandler.php b/src/lib/Persistence/Cache/SectionHandler.php index 39c9d6c836..9a3af0664b 100644 --- a/src/lib/Persistence/Cache/SectionHandler.php +++ b/src/lib/Persistence/Cache/SectionHandler.php @@ -166,5 +166,3 @@ public function countRoleAssignmentsUsingSection($sectionId) return $this->persistenceHandler->sectionHandler()->countRoleAssignmentsUsingSection($sectionId); } } - -class_alias(SectionHandler::class, 'eZ\Publish\Core\Persistence\Cache\SectionHandler'); diff --git a/src/lib/Persistence/Cache/SettingHandler.php b/src/lib/Persistence/Cache/SettingHandler.php index a409ad60f6..426460f240 100644 --- a/src/lib/Persistence/Cache/SettingHandler.php +++ b/src/lib/Persistence/Cache/SettingHandler.php @@ -78,5 +78,3 @@ private function getSettingTag(string $group, string $identifier): string ); } } - -class_alias(SettingHandler::class, 'eZ\Publish\Core\Persistence\Cache\SettingHandler'); diff --git a/src/lib/Persistence/Cache/TransactionHandler.php b/src/lib/Persistence/Cache/TransactionHandler.php index 8801adc533..5c730f08f1 100644 --- a/src/lib/Persistence/Cache/TransactionHandler.php +++ b/src/lib/Persistence/Cache/TransactionHandler.php @@ -47,5 +47,3 @@ public function rollback() $this->cache->rollbackTransaction(); } } - -class_alias(TransactionHandler::class, 'eZ\Publish\Core\Persistence\Cache\TransactionHandler'); diff --git a/src/lib/Persistence/Cache/TrashHandler.php b/src/lib/Persistence/Cache/TrashHandler.php index b3f0ef6729..1c1213b5ea 100644 --- a/src/lib/Persistence/Cache/TrashHandler.php +++ b/src/lib/Persistence/Cache/TrashHandler.php @@ -169,5 +169,3 @@ public function deleteTrashItem($trashedId) return $return; } } - -class_alias(TrashHandler::class, 'eZ\Publish\Core\Persistence\Cache\TrashHandler'); diff --git a/src/lib/Persistence/Cache/URLHandler.php b/src/lib/Persistence/Cache/URLHandler.php index 53947d7e5d..b06b007be8 100644 --- a/src/lib/Persistence/Cache/URLHandler.php +++ b/src/lib/Persistence/Cache/URLHandler.php @@ -99,5 +99,3 @@ public function findUsages($id) return $this->persistenceHandler->urlHandler()->findUsages($id); } } - -class_alias(URLHandler::class, 'eZ\Publish\Core\Persistence\Cache\URLHandler'); diff --git a/src/lib/Persistence/Cache/UrlAliasHandler.php b/src/lib/Persistence/Cache/UrlAliasHandler.php index 98fd819cf1..cc04b866fa 100644 --- a/src/lib/Persistence/Cache/UrlAliasHandler.php +++ b/src/lib/Persistence/Cache/UrlAliasHandler.php @@ -507,5 +507,3 @@ public function repairBrokenUrlAliasesForLocation(int $locationId) ); } } - -class_alias(UrlAliasHandler::class, 'eZ\Publish\Core\Persistence\Cache\UrlAliasHandler'); diff --git a/src/lib/Persistence/Cache/UrlWildcardHandler.php b/src/lib/Persistence/Cache/UrlWildcardHandler.php index e51ab896ca..6eeb976552 100644 --- a/src/lib/Persistence/Cache/UrlWildcardHandler.php +++ b/src/lib/Persistence/Cache/UrlWildcardHandler.php @@ -187,5 +187,3 @@ public function countAll(): int return $this->persistenceHandler->urlWildcardHandler()->countAll(); } } - -class_alias(UrlWildcardHandler::class, 'eZ\Publish\Core\Persistence\Cache\UrlWildcardHandler'); diff --git a/src/lib/Persistence/Cache/UserHandler.php b/src/lib/Persistence/Cache/UserHandler.php index eaf8574f5d..12fcd4d50d 100644 --- a/src/lib/Persistence/Cache/UserHandler.php +++ b/src/lib/Persistence/Cache/UserHandler.php @@ -765,5 +765,3 @@ public function removeRoleAssignment($roleAssignmentId): void ]); } } - -class_alias(UserHandler::class, 'eZ\Publish\Core\Persistence\Cache\UserHandler'); diff --git a/src/lib/Persistence/Cache/UserPreferenceHandler.php b/src/lib/Persistence/Cache/UserPreferenceHandler.php index 2164563c75..d1ad67fb07 100644 --- a/src/lib/Persistence/Cache/UserPreferenceHandler.php +++ b/src/lib/Persistence/Cache/UserPreferenceHandler.php @@ -112,5 +112,3 @@ public function loadUserPreferences(int $userId, int $offset, int $limit): array return $this->persistenceHandler->userPreferenceHandler()->loadUserPreferences($userId, $offset, $limit); } } - -class_alias(UserPreferenceHandler::class, 'eZ\Publish\Core\Persistence\Cache\UserPreferenceHandler'); diff --git a/src/lib/Persistence/FieldType.php b/src/lib/Persistence/FieldType.php index 93909c06b1..f7f0f45913 100644 --- a/src/lib/Persistence/FieldType.php +++ b/src/lib/Persistence/FieldType.php @@ -54,5 +54,3 @@ public function isEmptyValue(FieldValue $fieldValue): bool ); } } - -class_alias(FieldType::class, 'eZ\Publish\Core\Persistence\FieldType'); diff --git a/src/lib/Persistence/FieldTypeRegistry.php b/src/lib/Persistence/FieldTypeRegistry.php index 1408b16fc5..718a6a3e36 100644 --- a/src/lib/Persistence/FieldTypeRegistry.php +++ b/src/lib/Persistence/FieldTypeRegistry.php @@ -80,5 +80,3 @@ protected function getCoreFieldType(string $identifier): SPIFieldType return $this->coreFieldTypes[$identifier]; } } - -class_alias(FieldTypeRegistry::class, 'eZ\Publish\Core\Persistence\FieldTypeRegistry'); diff --git a/src/lib/Persistence/Legacy/Bookmark/Gateway.php b/src/lib/Persistence/Legacy/Bookmark/Gateway.php index 3128e2022e..c8f1b30763 100644 --- a/src/lib/Persistence/Legacy/Bookmark/Gateway.php +++ b/src/lib/Persistence/Legacy/Bookmark/Gateway.php @@ -77,5 +77,3 @@ abstract public function countUserBookmarks(int $userId): int; */ abstract public function locationSwapped(int $location1Id, int $location2Id): void; } - -class_alias(Gateway::class, 'eZ\Publish\Core\Persistence\Legacy\Bookmark\Gateway'); diff --git a/src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php index e30578885c..14455a7547 100644 --- a/src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php @@ -190,5 +190,3 @@ private function getColumns(): array ]; } } - -class_alias(DoctrineDatabase::class, 'eZ\Publish\Core\Persistence\Legacy\Bookmark\Gateway\DoctrineDatabase'); diff --git a/src/lib/Persistence/Legacy/Bookmark/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Bookmark/Gateway/ExceptionConversion.php index 72bd954999..1abc88bbb7 100644 --- a/src/lib/Persistence/Legacy/Bookmark/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Bookmark/Gateway/ExceptionConversion.php @@ -93,5 +93,3 @@ public function loadUserIdsByLocation(Location $location): array } } } - -class_alias(ExceptionConversion::class, 'eZ\Publish\Core\Persistence\Legacy\Bookmark\Gateway\ExceptionConversion'); diff --git a/src/lib/Persistence/Legacy/Bookmark/Handler.php b/src/lib/Persistence/Legacy/Bookmark/Handler.php index 71d075fbae..577de5ea55 100644 --- a/src/lib/Persistence/Legacy/Bookmark/Handler.php +++ b/src/lib/Persistence/Legacy/Bookmark/Handler.php @@ -108,5 +108,3 @@ public function loadUserIdsByLocation(Location $location): array ); } } - -class_alias(Handler::class, 'eZ\Publish\Core\Persistence\Legacy\Bookmark\Handler'); diff --git a/src/lib/Persistence/Legacy/Bookmark/Mapper.php b/src/lib/Persistence/Legacy/Bookmark/Mapper.php index 774a11e088..11f547b1d8 100644 --- a/src/lib/Persistence/Legacy/Bookmark/Mapper.php +++ b/src/lib/Persistence/Legacy/Bookmark/Mapper.php @@ -68,5 +68,3 @@ private function extractBookmarkFromRow(array $row): Bookmark return $bookmark; } } - -class_alias(Mapper::class, 'eZ\Publish\Core\Persistence\Legacy\Bookmark\Mapper'); diff --git a/src/lib/Persistence/Legacy/Content/FieldHandler.php b/src/lib/Persistence/Legacy/Content/FieldHandler.php index 231a586cee..62e68c3139 100644 --- a/src/lib/Persistence/Legacy/Content/FieldHandler.php +++ b/src/lib/Persistence/Legacy/Content/FieldHandler.php @@ -502,5 +502,3 @@ public function deleteTranslationFromVersionFields(VersionInfo $versionInfo, $la ); } } - -class_alias(FieldHandler::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldHandler'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter.php index 3862a6f690..4ea18a61ed 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter.php @@ -66,5 +66,3 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin */ public function getIndexColumn(); } - -class_alias(Converter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php index 89c2bee915..77c89d3b07 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php @@ -156,5 +156,3 @@ private function restoreValueFromXmlString($xmlString) return $authors; } } - -class_alias(AuthorConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\AuthorConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/BinaryFileConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/BinaryFileConverter.php index 0de9160e3e..7d18915a5b 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/BinaryFileConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/BinaryFileConverter.php @@ -99,5 +99,3 @@ public function getIndexColumn() return 'sort_key_string'; } } - -class_alias(BinaryFileConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\BinaryFileConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxConverter.php index 8265604427..f736f267f6 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxConverter.php @@ -89,5 +89,3 @@ public function getIndexColumn() return 'sort_key_int'; } } - -class_alias(CheckboxConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\CheckboxConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryConverter.php index c6f68b1b76..eadc9795db 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryConverter.php @@ -107,5 +107,3 @@ public function getIndexColumn() return 'sort_key_string'; } } - -class_alias(CountryConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\CountryConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php index 3145a47307..0bf27e9c43 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php @@ -226,5 +226,3 @@ protected function getDateIntervalFromXML($xmlText) return DateInterval::createFromDateString(implode(', ', $aIntervalString)); } } - -class_alias(DateAndTimeConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\DateAndTimeConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php index 83e6cf2072..a3192134f1 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php @@ -120,5 +120,3 @@ public function getIndexColumn() return 'sort_key_int'; } } - -class_alias(DateConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\DateConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php index 40f9806e25..bd8ed08e4a 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php @@ -94,5 +94,3 @@ public function getIndexColumn() return 'sort_key_string'; } } - -class_alias(EmailAddressConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\EmailAddressConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/Exception/NotFound.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/Exception/NotFound.php index fc4ee6e851..f2f0a14643 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/Exception/NotFound.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/Exception/NotFound.php @@ -27,5 +27,3 @@ public function __construct($typeName) ); } } - -class_alias(NotFound::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\Exception\NotFound'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php index 619738e431..fd9ce297e2 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php @@ -142,5 +142,3 @@ private function getStorageDefValidatorState($minValue, $maxValue) return $state; } } - -class_alias(FloatConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\FloatConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNConverter.php index 822e81e241..621db48b5d 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNConverter.php @@ -103,5 +103,3 @@ public function getIndexColumn() return 'sort_key_string'; } } - -class_alias(ISBNConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\ISBNConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageAssetConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageAssetConverter.php index c7ef6bb3a4..3f524f1b5f 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageAssetConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageAssetConverter.php @@ -82,5 +82,3 @@ public function getIndexColumn() return 'sort_key_string'; } } - -class_alias(ImageAssetConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\ImageAssetConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php index a4d6eb4d82..2f16e78123 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php @@ -285,5 +285,3 @@ protected function parseLegacyXml($xml) return $extractedData; } } - -class_alias(ImageConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\ImageConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/IntegerConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/IntegerConverter.php index 3cb51ae5a1..f08ef8760c 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/IntegerConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/IntegerConverter.php @@ -148,5 +148,3 @@ private function getStorageDefValidatorState($minValue, $maxValue) return $state; } } - -class_alias(IntegerConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\IntegerConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordConverter.php index 7d4145ee69..0a96f28b87 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordConverter.php @@ -86,5 +86,3 @@ public function getIndexColumn() return 'sort_key_string'; } } - -class_alias(KeywordConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\KeywordConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MapLocationConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MapLocationConverter.php index f349147d77..94879798aa 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MapLocationConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MapLocationConverter.php @@ -86,5 +86,3 @@ public function getIndexColumn() return 'sort_key_string'; } } - -class_alias(MapLocationConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\MapLocationConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaConverter.php index 014b2dbe95..8644e3fb14 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaConverter.php @@ -73,5 +73,3 @@ public function getIndexColumn() return false; } } - -class_alias(MediaConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\MediaConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php index 37dbededc0..fc59ebe90a 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php @@ -94,5 +94,3 @@ public function getIndexColumn() return false; } } - -class_alias(NullConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\NullConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php index 370bba3f7e..9b03b0f1bb 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php @@ -197,5 +197,3 @@ public function getIndexColumn() return 'sort_key_int'; } } - -class_alias(RelationConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\RelationConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php index 38e0651e2a..d4ddb2c437 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php @@ -409,5 +409,3 @@ static function (array $row) use ($id): bool { return $groupedData; } } - -class_alias(RelationListConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\RelationListConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionConverter.php index f10b01e1f9..bd05c2e6e0 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionConverter.php @@ -181,5 +181,3 @@ private function buildOptionsXml(array $selectionOptions): DOMDocument return $xml; } } - -class_alias(SelectionConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\SelectionConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverter.php index cd79d6824d..47770ed868 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverter.php @@ -73,5 +73,3 @@ public function getIndexColumn(): string return 'sort_key_string'; } } - -class_alias(SerializableConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\SerializableConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php index 95f977a1ce..df3723773d 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php @@ -98,5 +98,3 @@ public function getIndexColumn() return 'sort_key_string'; } } - -class_alias(TextBlockConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\TextBlockConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php index 49c46bc11d..d92b8f7432 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php @@ -120,5 +120,3 @@ public function getIndexColumn() return 'sort_key_string'; } } - -class_alias(TextLineConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\TextLineConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php index 456165a0f1..142adb2037 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php @@ -121,5 +121,3 @@ public function getIndexColumn() return 'sort_key_int'; } } - -class_alias(TimeConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\TimeConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php index e690bb07a4..67b135f59c 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php @@ -97,5 +97,3 @@ public function getIndexColumn() return false; } } - -class_alias(UrlConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\UrlConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/UserConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/UserConverter.php index d619e6d890..a14865aed1 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/UserConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/UserConverter.php @@ -126,5 +126,3 @@ public function getIndexColumn(): bool return false; } } - -class_alias(UserConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\UserConverter'); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/ConverterRegistry.php b/src/lib/Persistence/Legacy/Content/FieldValue/ConverterRegistry.php index 8c2dc91e7b..4fee74e9ce 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/ConverterRegistry.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/ConverterRegistry.php @@ -80,5 +80,3 @@ public function getConverter($typeName) return $this->converterMap[$typeName]; } } - -class_alias(ConverterRegistry::class, 'eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry'); diff --git a/src/lib/Persistence/Legacy/Content/Gateway.php b/src/lib/Persistence/Legacy/Content/Gateway.php index 181007e7bd..1020f0988c 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/Gateway.php @@ -498,5 +498,3 @@ abstract public function deleteTranslationFromVersion( */ abstract public function loadVersionInfoList(array $contentIds): array; } - -class_alias(Gateway::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Gateway'); diff --git a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php index d450b36698..6e9285cac9 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php @@ -2079,5 +2079,3 @@ public function loadVersionInfoList(array $contentIds): array return $queryBuilder->execute()->fetchAllAssociative(); } } - -class_alias(DoctrineDatabase::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase'); diff --git a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase/QueryBuilder.php b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase/QueryBuilder.php index 0b71efd067..5897c27b4f 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase/QueryBuilder.php +++ b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase/QueryBuilder.php @@ -186,5 +186,3 @@ public function createVersionInfoFindQueryBuilder(): DoctrineQueryBuilder return $query; } } - -class_alias(QueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase\QueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php index 6ba5f755b3..997394fc74 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php @@ -568,5 +568,3 @@ public function loadVersionInfoList(array $contentIds): array } } } - -class_alias(ExceptionConversion::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Gateway\ExceptionConversion'); diff --git a/src/lib/Persistence/Legacy/Content/Handler.php b/src/lib/Persistence/Legacy/Content/Handler.php index d59ee5185d..cb8b3afc6e 100644 --- a/src/lib/Persistence/Legacy/Content/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Handler.php @@ -986,5 +986,3 @@ static function (array $row): array { return $versionInfoListById; } } - -class_alias(Handler::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Handler'); diff --git a/src/lib/Persistence/Legacy/Content/Language/CachingHandler.php b/src/lib/Persistence/Legacy/Content/Language/CachingHandler.php index 807d2416ad..86bc1c47d6 100644 --- a/src/lib/Persistence/Legacy/Content/Language/CachingHandler.php +++ b/src/lib/Persistence/Legacy/Content/Language/CachingHandler.php @@ -253,5 +253,3 @@ static function (Language $language) use ($generator) { ); } } - -class_alias(CachingHandler::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Language\CachingHandler'); diff --git a/src/lib/Persistence/Legacy/Content/Language/Gateway.php b/src/lib/Persistence/Legacy/Content/Language/Gateway.php index 1efd27ff30..c27500bc39 100644 --- a/src/lib/Persistence/Legacy/Content/Language/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/Language/Gateway.php @@ -86,5 +86,3 @@ abstract public function deleteLanguage(int $id): void; */ abstract public function canDeleteLanguage(int $id): bool; } - -class_alias(Gateway::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Language\Gateway'); diff --git a/src/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabase.php index a16d32c69f..ed0409c56c 100644 --- a/src/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabase.php @@ -224,5 +224,3 @@ private function countTableData( return (int)$query->execute()->fetchColumn(); } } - -class_alias(DoctrineDatabase::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Language\Gateway\DoctrineDatabase'); diff --git a/src/lib/Persistence/Legacy/Content/Language/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Language/Gateway/ExceptionConversion.php index 81f3c8fc8b..4c44de5a76 100644 --- a/src/lib/Persistence/Legacy/Content/Language/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Language/Gateway/ExceptionConversion.php @@ -97,5 +97,3 @@ public function canDeleteLanguage(int $id): bool } } } - -class_alias(ExceptionConversion::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Language\Gateway\ExceptionConversion'); diff --git a/src/lib/Persistence/Legacy/Content/Language/Handler.php b/src/lib/Persistence/Legacy/Content/Language/Handler.php index 5cf0c0d43e..1f172a5968 100644 --- a/src/lib/Persistence/Legacy/Content/Language/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Language/Handler.php @@ -164,5 +164,3 @@ public function delete($id) $this->languageGateway->deleteLanguage($id); } } - -class_alias(Handler::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler'); diff --git a/src/lib/Persistence/Legacy/Content/Language/Mapper.php b/src/lib/Persistence/Legacy/Content/Language/Mapper.php index b085cdee83..f70facc0b4 100644 --- a/src/lib/Persistence/Legacy/Content/Language/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/Language/Mapper.php @@ -59,5 +59,3 @@ public function extractLanguagesFromRows(array $rows, string $key = 'locale'): a return $languages; } } - -class_alias(Mapper::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Language\Mapper'); diff --git a/src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php b/src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php index fbcec7fbc5..feca1e2081 100644 --- a/src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php +++ b/src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php @@ -256,5 +256,3 @@ public function generateLanguageMaskForFields( ); } } - -class_alias(MaskGenerator::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator'); diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway.php b/src/lib/Persistence/Legacy/Content/Location/Gateway.php index 009b137c89..75da7c235d 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway.php @@ -369,5 +369,3 @@ abstract public function countAllLocations(): int; */ abstract public function loadAllLocationsData(int $offset, int $limit): array; } - -class_alias(Gateway::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway'); diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php index 968343fa3e..1387db0560 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php @@ -1617,5 +1617,3 @@ private function addSort(?array $sort, QueryBuilder $query, array $languageSetti $this->trashSortClauseConverter->applyOrderBy($query); } } - -class_alias(DoctrineDatabase::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\DoctrineDatabase'); diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php index 52f78048d9..267fd9e9f5 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php @@ -422,5 +422,3 @@ public function loadAllLocationsData(int $offset, int $limit): array } } } - -class_alias(ExceptionConversion::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\ExceptionConversion'); diff --git a/src/lib/Persistence/Legacy/Content/Location/Handler.php b/src/lib/Persistence/Legacy/Content/Location/Handler.php index 94809a6f48..f0ba2d7332 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Location/Handler.php @@ -601,5 +601,3 @@ public function countLocationsByContent(int $contentId): int return $this->locationGateway->countLocationsByContentId($contentId); } } - -class_alias(Handler::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Location\Handler'); diff --git a/src/lib/Persistence/Legacy/Content/Location/Mapper.php b/src/lib/Persistence/Legacy/Content/Location/Mapper.php index 6bbf29c5fa..2ebb8fe834 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/Location/Mapper.php @@ -101,5 +101,3 @@ public function getLocationCreateStruct(array $data) return $struct; } } - -class_alias(Mapper::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Location\Mapper'); diff --git a/src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php b/src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php index 1ef1ba9168..ea5750ed1b 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php @@ -250,5 +250,3 @@ protected function delete(Trashed $trashItem) return $result; } } - -class_alias(Handler::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Location\Trash\Handler'); diff --git a/src/lib/Persistence/Legacy/Content/Mapper.php b/src/lib/Persistence/Legacy/Content/Mapper.php index 720fda16a9..b0932d8ca1 100644 --- a/src/lib/Persistence/Legacy/Content/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/Mapper.php @@ -715,5 +715,3 @@ public function createRelationFromCreateStruct(RelationCreateStruct $struct) return $relation; } } - -class_alias(Mapper::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Mapper'); diff --git a/src/lib/Persistence/Legacy/Content/MultilingualStorageFieldDefinition.php b/src/lib/Persistence/Legacy/Content/MultilingualStorageFieldDefinition.php index e2b8e89a6c..67f43d6be9 100644 --- a/src/lib/Persistence/Legacy/Content/MultilingualStorageFieldDefinition.php +++ b/src/lib/Persistence/Legacy/Content/MultilingualStorageFieldDefinition.php @@ -27,5 +27,3 @@ class MultilingualStorageFieldDefinition extends ValueObject /** @var int */ public $languageId; } - -class_alias(MultilingualStorageFieldDefinition::class, 'eZ\Publish\Core\Persistence\Legacy\Content\MultilingualStorageFieldDefinition'); diff --git a/src/lib/Persistence/Legacy/Content/ObjectState/Gateway.php b/src/lib/Persistence/Legacy/Content/ObjectState/Gateway.php index 165bbfc04f..469385ce4e 100644 --- a/src/lib/Persistence/Legacy/Content/ObjectState/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/ObjectState/Gateway.php @@ -131,5 +131,3 @@ abstract public function getContentCount(int $stateId): int; */ abstract public function updateObjectStatePriority(int $stateId, int $priority): void; } - -class_alias(Gateway::class, 'eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Gateway'); diff --git a/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php index 622559136a..4afaab2d80 100644 --- a/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php @@ -767,5 +767,3 @@ private function insertContentStateAssignment(int $contentId, int $stateId): voi $query->execute(); } } - -class_alias(DoctrineDatabase::class, 'eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Gateway\DoctrineDatabase'); diff --git a/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php index f205861ec5..b018f7bbca 100644 --- a/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php @@ -199,5 +199,3 @@ public function updateObjectStatePriority(int $stateId, int $priority): void } } } - -class_alias(ExceptionConversion::class, 'eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Gateway\ExceptionConversion'); diff --git a/src/lib/Persistence/Legacy/Content/ObjectState/Handler.php b/src/lib/Persistence/Legacy/Content/ObjectState/Handler.php index a34f6bb9f7..5b78c171e3 100644 --- a/src/lib/Persistence/Legacy/Content/ObjectState/Handler.php +++ b/src/lib/Persistence/Legacy/Content/ObjectState/Handler.php @@ -351,5 +351,3 @@ public function getContentCount($stateId) return $this->objectStateGateway->getContentCount($stateId); } } - -class_alias(Handler::class, 'eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Handler'); diff --git a/src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php b/src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php index 872b2b3388..2da692301b 100644 --- a/src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php @@ -192,5 +192,3 @@ public function createObjectStateFromInputStruct(InputStruct $input) return $objectState; } } - -class_alias(Mapper::class, 'eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Mapper'); diff --git a/src/lib/Persistence/Legacy/Content/Section/Gateway.php b/src/lib/Persistence/Legacy/Content/Section/Gateway.php index cb79ce1e52..e520ea1fea 100644 --- a/src/lib/Persistence/Legacy/Content/Section/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/Section/Gateway.php @@ -70,5 +70,3 @@ abstract public function deleteSection(int $id): void; */ abstract public function assignSectionToContent(int $sectionId, int $contentId): void; } - -class_alias(Gateway::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway'); diff --git a/src/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php index 84ecb95237..b6f74d3771 100644 --- a/src/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php @@ -232,5 +232,3 @@ public function assignSectionToContent(int $sectionId, int $contentId): void $query->execute(); } } - -class_alias(DoctrineDatabase::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway\DoctrineDatabase'); diff --git a/src/lib/Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php index 0df7abe090..e4a216b131 100644 --- a/src/lib/Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php @@ -125,5 +125,3 @@ public function assignSectionToContent(int $sectionId, int $contentId): void } } } - -class_alias(ExceptionConversion::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway\ExceptionConversion'); diff --git a/src/lib/Persistence/Legacy/Content/Section/Handler.php b/src/lib/Persistence/Legacy/Content/Section/Handler.php index 9813126701..aab48c4148 100644 --- a/src/lib/Persistence/Legacy/Content/Section/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Section/Handler.php @@ -230,5 +230,3 @@ public function countRoleAssignmentsUsingSection($sectionId) return $this->sectionGateway->countRoleAssignmentsUsingSection($sectionId); } } - -class_alias(Handler::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Section\Handler'); diff --git a/src/lib/Persistence/Legacy/Content/StorageFieldDefinition.php b/src/lib/Persistence/Legacy/Content/StorageFieldDefinition.php index d657ad7c5d..868b4dad31 100644 --- a/src/lib/Persistence/Legacy/Content/StorageFieldDefinition.php +++ b/src/lib/Persistence/Legacy/Content/StorageFieldDefinition.php @@ -116,5 +116,3 @@ class StorageFieldDefinition extends ValueObject */ public $multilingualData = []; } - -class_alias(StorageFieldDefinition::class, 'eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition'); diff --git a/src/lib/Persistence/Legacy/Content/StorageFieldValue.php b/src/lib/Persistence/Legacy/Content/StorageFieldValue.php index a4ee9a8c69..910d16f869 100644 --- a/src/lib/Persistence/Legacy/Content/StorageFieldValue.php +++ b/src/lib/Persistence/Legacy/Content/StorageFieldValue.php @@ -46,5 +46,3 @@ class StorageFieldValue extends ValueObject */ public $sortKeyString = ''; } - -class_alias(StorageFieldValue::class, 'eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue'); diff --git a/src/lib/Persistence/Legacy/Content/StorageHandler.php b/src/lib/Persistence/Legacy/Content/StorageHandler.php index b37f4ca39e..5ef0253265 100644 --- a/src/lib/Persistence/Legacy/Content/StorageHandler.php +++ b/src/lib/Persistence/Legacy/Content/StorageHandler.php @@ -98,5 +98,3 @@ public function deleteFieldData($fieldType, VersionInfo $versionInfo, array $ids ->deleteFieldData($versionInfo, $ids, $this->context); } } - -class_alias(StorageHandler::class, 'eZ\Publish\Core\Persistence\Legacy\Content\StorageHandler'); diff --git a/src/lib/Persistence/Legacy/Content/StorageRegistry.php b/src/lib/Persistence/Legacy/Content/StorageRegistry.php index 5869f546aa..872294c544 100644 --- a/src/lib/Persistence/Legacy/Content/StorageRegistry.php +++ b/src/lib/Persistence/Legacy/Content/StorageRegistry.php @@ -41,5 +41,3 @@ public function getStorage(string $typeName): FieldStorage return $this->storageMap[$typeName]; } } - -class_alias(StorageRegistry::class, 'eZ\Publish\Core\Persistence\Legacy\Content\StorageRegistry'); diff --git a/src/lib/Persistence/Legacy/Content/TreeHandler.php b/src/lib/Persistence/Legacy/Content/TreeHandler.php index cc6391b113..e48f433fe6 100644 --- a/src/lib/Persistence/Legacy/Content/TreeHandler.php +++ b/src/lib/Persistence/Legacy/Content/TreeHandler.php @@ -269,5 +269,3 @@ public function changeMainLocation($contentId, $locationId) } } } - -class_alias(TreeHandler::class, 'eZ\Publish\Core\Persistence\Legacy\Content\TreeHandler'); diff --git a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater.php b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater.php index 1c04fee47f..d8256ec274 100644 --- a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater.php +++ b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater.php @@ -151,5 +151,3 @@ protected function getContentIdsByContentTypeId($contentTypeId) return $this->contentGateway->getContentIdsByContentTypeId($contentTypeId); } } - -class_alias(ContentUpdater::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater'); diff --git a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action.php b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action.php index f011e2c313..732fb22caa 100644 --- a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action.php +++ b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action.php @@ -38,5 +38,3 @@ public function __construct(ContentGateway $contentGateway) */ abstract public function apply($contentId); } - -class_alias(Action::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action'); diff --git a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddField.php b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddField.php index a62df29175..4cda931523 100644 --- a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddField.php +++ b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddField.php @@ -203,5 +203,3 @@ protected function createField($id, $versionNo, $languageCode) return $field; } } - -class_alias(AddField::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action\AddField'); diff --git a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveField.php b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveField.php index 1299a73b12..47e7390d03 100644 --- a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveField.php +++ b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveField.php @@ -104,5 +104,3 @@ static function ($versionNo) use ($contentId) { } } } - -class_alias(RemoveField::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action\RemoveField'); diff --git a/src/lib/Persistence/Legacy/Content/Type/Gateway.php b/src/lib/Persistence/Legacy/Content/Type/Gateway.php index f5e9b28a13..ebfa1754c5 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/Type/Gateway.php @@ -172,5 +172,3 @@ abstract public function removeFieldDefinitionTranslation( */ abstract public function removeByUserAndVersion(int $userId, int $version): void; } - -class_alias(Gateway::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway'); diff --git a/src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php index 83b40160f6..36021566ba 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php @@ -1480,5 +1480,3 @@ private function cleanupClassNameTable(): void $this->connection->executeUpdate($sql); } } - -class_alias(DoctrineDatabase::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway\DoctrineDatabase'); diff --git a/src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php index fd6229651d..e84dadec24 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php @@ -342,5 +342,3 @@ public function removeByUserAndVersion(int $userId, int $version): void } } } - -class_alias(ExceptionConversion::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway\ExceptionConversion'); diff --git a/src/lib/Persistence/Legacy/Content/Type/Handler.php b/src/lib/Persistence/Legacy/Content/Type/Handler.php index 6c59d935b7..a695f1119a 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Type/Handler.php @@ -709,5 +709,3 @@ public function deleteByUserAndStatus(int $userId, int $status): void $this->contentTypeGateway->removeByUserAndVersion($userId, $status); } } - -class_alias(Handler::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Type\Handler'); diff --git a/src/lib/Persistence/Legacy/Content/Type/Mapper.php b/src/lib/Persistence/Legacy/Content/Type/Mapper.php index 80f08556eb..6c625659a0 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/Type/Mapper.php @@ -530,5 +530,3 @@ public function extractMultilingualDataFromRows(array $mlFieldDefinitionsRows): return $mlFieldDefinitionData; } } - -class_alias(Mapper::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Type\Mapper'); diff --git a/src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php b/src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php index 2355b67682..1d758e7c64 100644 --- a/src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php +++ b/src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php @@ -481,5 +481,3 @@ public function deleteByUserAndStatus(int $userId, int $status): void $this->innerHandler->deleteByUserAndStatus($userId, $status); } } - -class_alias(MemoryCachingHandler::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Type\MemoryCachingHandler'); diff --git a/src/lib/Persistence/Legacy/Content/Type/Update/Handler.php b/src/lib/Persistence/Legacy/Content/Type/Update/Handler.php index 82b5a1053e..a3595b3e07 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Update/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Type/Update/Handler.php @@ -32,5 +32,3 @@ abstract public function deleteOldType(Type $fromType): void; */ abstract public function publishNewType(Type $toType, int $newStatus): void; } - -class_alias(Handler::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Type\Update\Handler'); diff --git a/src/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabase.php index d27416712d..be47884bb5 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabase.php @@ -46,5 +46,3 @@ public function publishNewType(Type $toType, int $newStatus): void ); } } - -class_alias(DoctrineDatabase::class, 'eZ\Publish\Core\Persistence\Legacy\Content\Type\Update\Handler\DoctrineDatabase'); diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/DTO/SwappedLocationProperties.php b/src/lib/Persistence/Legacy/Content/UrlAlias/DTO/SwappedLocationProperties.php index 75a8d241bc..ec69e28185 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/DTO/SwappedLocationProperties.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/DTO/SwappedLocationProperties.php @@ -43,5 +43,3 @@ public function __construct($id, $parentId) */ public $entries; } - -class_alias(SwappedLocationProperties::class, 'eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\DTO\SwappedLocationProperties'); diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/DTO/UrlAliasForSwappedLocation.php b/src/lib/Persistence/Legacy/Content/UrlAlias/DTO/UrlAliasForSwappedLocation.php index bee42796e7..b0a141f55d 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/DTO/UrlAliasForSwappedLocation.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/DTO/UrlAliasForSwappedLocation.php @@ -46,5 +46,3 @@ public function __construct( /** @var int */ public $newId; } - -class_alias(UrlAliasForSwappedLocation::class, 'eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\DTO\UrlAliasForSwappedLocation'); diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php index 7b1e612898..ed9503de28 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php @@ -244,5 +244,3 @@ abstract public function getAllChildrenAliases(int $parentId): array; */ abstract public function repairBrokenUrlAliasesForLocation(int $locationId): void; } - -class_alias(Gateway::class, 'eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway'); diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php index 88fa221b2f..9f5b4399e3 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php @@ -1448,5 +1448,3 @@ private function deleteRow(int $parentId, string $textMD5): int return $queryBuilder->execute(); } } - -class_alias(DoctrineDatabase::class, 'eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\DoctrineDatabase'); diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php index 025be553d7..bb9a446dfe 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php @@ -310,5 +310,3 @@ public function getAllChildrenAliases(int $parentId): array } } } - -class_alias(ExceptionConversion::class, 'eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion'); diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php index a518739f7d..c4c5882449 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php @@ -1200,5 +1200,3 @@ private function internalPublishCustomUrlAliasForLocation(SwappedLocationPropert } } } - -class_alias(Handler::class, 'eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler'); diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php index 443fe50f87..91cc9cf67e 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php @@ -175,5 +175,3 @@ protected function normalizePathDataRow(array &$pathElementData, array $row) } } } - -class_alias(Mapper::class, 'eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Mapper'); diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/SlugConverter.php b/src/lib/Persistence/Legacy/Content/UrlAlias/SlugConverter.php index 7eec2456c6..3b46ec8157 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/SlugConverter.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/SlugConverter.php @@ -381,5 +381,3 @@ protected function getWordSeparator() return '-'; } } - -class_alias(SlugConverter::class, 'eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter'); diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway.php index 303e01611c..f7a055ffb7 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway.php @@ -77,5 +77,3 @@ abstract public function loadUrlWildcardBySourceUrl(string $sourceUrl): array; abstract public function countAll(): int; } - -class_alias(Gateway::class, 'eZ\Publish\Core\Persistence\Legacy\Content\UrlWildcard\Gateway'); diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php index 38153cce26..71b107a646 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php @@ -282,5 +282,3 @@ private function trimUrl(string $url): string return trim($url, '/'); } } - -class_alias(DoctrineDatabase::class, 'eZ\Publish\Core\Persistence\Legacy\Content\UrlWildcard\Gateway\DoctrineDatabase'); diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php index 7c9a85fc78..614c10609f 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php @@ -123,5 +123,3 @@ public function countAll(): int } } } - -class_alias(ExceptionConversion::class, 'eZ\Publish\Core\Persistence\Legacy\Content\UrlWildcard\Gateway\ExceptionConversion'); diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php index ec92b97058..2a4d9dbc7a 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php @@ -273,5 +273,3 @@ private function substitute(string $destinationUrl, array $values): string return $destinationUrl; } } - -class_alias(Handler::class, 'eZ\Publish\Core\Persistence\Legacy\Content\UrlWildcard\Handler'); diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Mapper.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Mapper.php index b074b98e28..dd2a808119 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Mapper.php @@ -86,5 +86,3 @@ public function extractUrlWildcardsFromRows(array $rows) return $urlWildcards; } } - -class_alias(Mapper::class, 'eZ\Publish\Core\Persistence\Legacy\Content\UrlWildcard\Mapper'); diff --git a/src/lib/Persistence/Legacy/Exception/GroupNotEmpty.php b/src/lib/Persistence/Legacy/Exception/GroupNotEmpty.php index b3ec5faf80..ac7d91eacf 100644 --- a/src/lib/Persistence/Legacy/Exception/GroupNotEmpty.php +++ b/src/lib/Persistence/Legacy/Exception/GroupNotEmpty.php @@ -28,5 +28,3 @@ public function __construct($groupId) ); } } - -class_alias(GroupNotEmpty::class, 'eZ\Publish\Core\Persistence\Legacy\Exception\GroupNotEmpty'); diff --git a/src/lib/Persistence/Legacy/Exception/RemoveLastGroupFromType.php b/src/lib/Persistence/Legacy/Exception/RemoveLastGroupFromType.php index 8930fbcfe2..4abee61e7d 100644 --- a/src/lib/Persistence/Legacy/Exception/RemoveLastGroupFromType.php +++ b/src/lib/Persistence/Legacy/Exception/RemoveLastGroupFromType.php @@ -32,5 +32,3 @@ public function __construct($typeId, $status) ); } } - -class_alias(RemoveLastGroupFromType::class, 'eZ\Publish\Core\Persistence\Legacy\Exception\RemoveLastGroupFromType'); diff --git a/src/lib/Persistence/Legacy/Exception/RoleNotFound.php b/src/lib/Persistence/Legacy/Exception/RoleNotFound.php index 31720b33c2..377c479fd8 100644 --- a/src/lib/Persistence/Legacy/Exception/RoleNotFound.php +++ b/src/lib/Persistence/Legacy/Exception/RoleNotFound.php @@ -28,5 +28,3 @@ public function __construct($roleId, $status) ); } } - -class_alias(RoleNotFound::class, 'eZ\Publish\Core\Persistence\Legacy\Exception\RoleNotFound'); diff --git a/src/lib/Persistence/Legacy/Exception/StorageNotFound.php b/src/lib/Persistence/Legacy/Exception/StorageNotFound.php index cf00d0faf1..0c86a54ca6 100644 --- a/src/lib/Persistence/Legacy/Exception/StorageNotFound.php +++ b/src/lib/Persistence/Legacy/Exception/StorageNotFound.php @@ -26,5 +26,3 @@ public function __construct($typeName) ); } } - -class_alias(StorageNotFound::class, 'eZ\Publish\Core\Persistence\Legacy\Exception\StorageNotFound'); diff --git a/src/lib/Persistence/Legacy/Exception/TypeGroupNotFound.php b/src/lib/Persistence/Legacy/Exception/TypeGroupNotFound.php index afdf91e275..a4ed81ed42 100644 --- a/src/lib/Persistence/Legacy/Exception/TypeGroupNotFound.php +++ b/src/lib/Persistence/Legacy/Exception/TypeGroupNotFound.php @@ -28,5 +28,3 @@ public function __construct($typeGroupId) ); } } - -class_alias(TypeGroupNotFound::class, 'eZ\Publish\Core\Persistence\Legacy\Exception\TypeGroupNotFound'); diff --git a/src/lib/Persistence/Legacy/Exception/TypeNotFound.php b/src/lib/Persistence/Legacy/Exception/TypeNotFound.php index 7bf36f3f41..70261eaab7 100644 --- a/src/lib/Persistence/Legacy/Exception/TypeNotFound.php +++ b/src/lib/Persistence/Legacy/Exception/TypeNotFound.php @@ -28,5 +28,3 @@ public function __construct($typeId, $status) ); } } - -class_alias(TypeNotFound::class, 'eZ\Publish\Core\Persistence\Legacy\Exception\TypeNotFound'); diff --git a/src/lib/Persistence/Legacy/Exception/TypeStillHasContent.php b/src/lib/Persistence/Legacy/Exception/TypeStillHasContent.php index 23b44ac2e1..86789f521b 100644 --- a/src/lib/Persistence/Legacy/Exception/TypeStillHasContent.php +++ b/src/lib/Persistence/Legacy/Exception/TypeStillHasContent.php @@ -32,5 +32,3 @@ public function __construct($typeId, $status) ); } } - -class_alias(TypeStillHasContent::class, 'eZ\Publish\Core\Persistence\Legacy\Exception\TypeStillHasContent'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ContentIdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ContentIdQueryBuilder.php index bd419cf50b..2184808974 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ContentIdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ContentIdQueryBuilder.php @@ -38,5 +38,3 @@ public function buildQueryConstraint( ); } } - -class_alias(ContentIdQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content\ContentIdQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/DateMetadataQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/DateMetadataQueryBuilder.php index b381b42801..ede1cfb16c 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/DateMetadataQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/DateMetadataQueryBuilder.php @@ -43,5 +43,3 @@ public function buildQueryConstraint( ); } } - -class_alias(DateMetadataQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content\DateMetadataQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/LanguageCodeQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/LanguageCodeQueryBuilder.php index 11cb4dbb0f..9ac518978c 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/LanguageCodeQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/LanguageCodeQueryBuilder.php @@ -59,5 +59,3 @@ public function buildQueryConstraint( return $expr; } } - -class_alias(LanguageCodeQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content\LanguageCodeQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ObjectStateIdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ObjectStateIdQueryBuilder.php index 6470af88bd..ec7a8e6c0a 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ObjectStateIdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ObjectStateIdQueryBuilder.php @@ -48,5 +48,3 @@ public function buildQueryConstraint( ); } } - -class_alias(ObjectStateIdQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content\ObjectStateIdQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ObjectStateIdentifierQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ObjectStateIdentifierQueryBuilder.php index 3354012191..0b1dc7851e 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ObjectStateIdentifierQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ObjectStateIdentifierQueryBuilder.php @@ -58,5 +58,3 @@ public function buildQueryConstraint( ); } } - -class_alias(ObjectStateIdentifierQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content\ObjectStateIdentifierQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/RemoteIdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/RemoteIdQueryBuilder.php index 65411fb086..ce20ba6f65 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/RemoteIdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/RemoteIdQueryBuilder.php @@ -38,5 +38,3 @@ public function buildQueryConstraint( ); } } - -class_alias(RemoteIdQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content\RemoteIdQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdQueryBuilder.php index f8d4ab4a2c..210c1f75bd 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdQueryBuilder.php @@ -40,5 +40,3 @@ public function buildQueryConstraint( ); } } - -class_alias(IdQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content\Section\IdQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdentifierQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdentifierQueryBuilder.php index 4200aae6da..1ae70dd46e 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdentifierQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdentifierQueryBuilder.php @@ -49,5 +49,3 @@ public function buildQueryConstraint( ); } } - -class_alias(IdentifierQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content\Section\IdentifierQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/SiblingQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/SiblingQueryBuilder.php index 96add0ae2d..ca5272e165 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/SiblingQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/SiblingQueryBuilder.php @@ -46,5 +46,3 @@ public function buildQueryConstraint( return $this->logicalAndQueryBuilder->buildQueryConstraint($queryBuilder, $_criterion); } } - -class_alias(SiblingQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content\SiblingQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/BaseQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/BaseQueryBuilder.php index 0caa05a034..ddc5aafae3 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/BaseQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/BaseQueryBuilder.php @@ -36,5 +36,3 @@ public function buildQueryConstraint( return null; } } - -class_alias(BaseQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content\Type\BaseQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/GroupIdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/GroupIdQueryBuilder.php index e447563a1b..4755f10b9c 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/GroupIdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/GroupIdQueryBuilder.php @@ -58,5 +58,3 @@ public function buildQueryConstraint( ); } } - -class_alias(GroupIdQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content\Type\GroupIdQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdQueryBuilder.php index c90fcb0082..dc8fed4afc 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdQueryBuilder.php @@ -43,5 +43,3 @@ public function buildQueryConstraint( ); } } - -class_alias(IdQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content\Type\IdQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdentifierQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdentifierQueryBuilder.php index 3f5349e4b8..25213792ce 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdentifierQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdentifierQueryBuilder.php @@ -43,5 +43,3 @@ public function buildQueryConstraint( ); } } - -class_alias(IdentifierQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content\Type\IdentifierQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilder.php index cf8d4ae2c6..aee1a1e65e 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilder.php @@ -58,5 +58,3 @@ static function (string $pathString) { ); } } - -class_alias(AncestorQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Location\AncestorQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/BaseLocationCriterionQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/BaseLocationCriterionQueryBuilder.php index b5189a4792..579b6e4cc3 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/BaseLocationCriterionQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/BaseLocationCriterionQueryBuilder.php @@ -26,5 +26,3 @@ public function buildQueryConstraint( return null; } } - -class_alias(BaseLocationCriterionQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Location\BaseLocationCriterionQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/DepthQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/DepthQueryBuilder.php index d02e78ad7b..96cb3db583 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/DepthQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/DepthQueryBuilder.php @@ -39,5 +39,3 @@ public function buildQueryConstraint( ); } } - -class_alias(DepthQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Location\DepthQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IdQueryBuilder.php index 1a92f6c249..4ce7c1a1e5 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IdQueryBuilder.php @@ -39,5 +39,3 @@ public function buildQueryConstraint( ); } } - -class_alias(IdQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Location\IdQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IsMainLocationQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IsMainLocationQueryBuilder.php index 99515d840a..03b1b50ac6 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IsMainLocationQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IsMainLocationQueryBuilder.php @@ -34,5 +34,3 @@ public function buildQueryConstraint( : 'location.node_id <> location.main_node_id'; } } - -class_alias(IsMainLocationQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Location\IsMainLocationQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/ParentLocationIdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/ParentLocationIdQueryBuilder.php index aae12b33a4..8dd7c2f380 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/ParentLocationIdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/ParentLocationIdQueryBuilder.php @@ -39,5 +39,3 @@ public function buildQueryConstraint( ); } } - -class_alias(ParentLocationIdQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Location\ParentLocationIdQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/PriorityQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/PriorityQueryBuilder.php index d36d310cc3..2dfc731972 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/PriorityQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/PriorityQueryBuilder.php @@ -39,5 +39,3 @@ public function buildQueryConstraint( ); } } - -class_alias(PriorityQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Location\PriorityQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/RemoteIdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/RemoteIdQueryBuilder.php index a84bf4a6fb..e85cbc125c 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/RemoteIdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/RemoteIdQueryBuilder.php @@ -39,5 +39,3 @@ public function buildQueryConstraint( ); } } - -class_alias(RemoteIdQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Location\RemoteIdQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/SubtreeQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/SubtreeQueryBuilder.php index 7c51fbeb87..c28381b850 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/SubtreeQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/SubtreeQueryBuilder.php @@ -45,5 +45,3 @@ static function (string $pathString) use ($queryBuilder, $expressionBuilder): st return (string)$expressionBuilder->orX(...$statements); } } - -class_alias(SubtreeQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Location\SubtreeQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/VisibilityQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/VisibilityQueryBuilder.php index ccbad37acc..28fab968e1 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/VisibilityQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/VisibilityQueryBuilder.php @@ -60,5 +60,3 @@ private function getVisibilityColumnsExpressions( ]; } } - -class_alias(VisibilityQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Location\VisibilityQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalAndQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalAndQueryBuilder.php index d463e37fae..4dee157b01 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalAndQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalAndQueryBuilder.php @@ -53,5 +53,3 @@ public function buildQueryConstraint( return (string)$queryBuilder->expr()->andX(...$constraints); } } - -class_alias(LogicalAndQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\LogicalAndQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalNotQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalNotQueryBuilder.php index 84a3e5e828..9e50ec24f4 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalNotQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalNotQueryBuilder.php @@ -59,5 +59,3 @@ public function buildQueryConstraint( return null !== $constraint ? sprintf('NOT (%s)', $constraint) : null; } } - -class_alias(LogicalNotQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\LogicalNotQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOrQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOrQueryBuilder.php index a3cad98a2f..716e6f6cd1 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOrQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOrQueryBuilder.php @@ -53,5 +53,3 @@ public function buildQueryConstraint( return (string)$queryBuilder->expr()->orX(...$constraints); } } - -class_alias(LogicalOrQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\LogicalOrQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/MatchAllQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/MatchAllQueryBuilder.php index 96619c9b25..813a308ba7 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/MatchAllQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/MatchAllQueryBuilder.php @@ -30,5 +30,3 @@ public function buildQueryConstraint( return '1=1'; } } - -class_alias(MatchAllQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\MatchAllQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/MatchNoneQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/MatchNoneQueryBuilder.php index 598234a7eb..ea3beba54d 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/MatchNoneQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/MatchNoneQueryBuilder.php @@ -30,5 +30,3 @@ public function buildQueryConstraint( return '1=0'; } } - -class_alias(MatchNoneQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\MatchNoneQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/BaseUserCriterionQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/BaseUserCriterionQueryBuilder.php index b9a17d9ee6..476ba50a0b 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/BaseUserCriterionQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/BaseUserCriterionQueryBuilder.php @@ -57,5 +57,3 @@ protected function transformCriterionValueForLikeExpression(string $value): stri ); } } - -class_alias(BaseUserCriterionQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\User\BaseUserCriterionQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserBasedQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserBasedQueryBuilder.php index 4b97ef5281..86a834ca40 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserBasedQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserBasedQueryBuilder.php @@ -47,5 +47,3 @@ public function buildQueryConstraint( : $databasePlatform->getIsNullExpression('user_storage.contentobject_id'); } } - -class_alias(IsUserBasedQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\User\IsUserBasedQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserEnabledQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserEnabledQueryBuilder.php index a5028cdf44..06ad2ab34e 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserEnabledQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserEnabledQueryBuilder.php @@ -47,5 +47,3 @@ public function buildQueryConstraint( ); } } - -class_alias(IsUserEnabledQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\User\IsUserEnabledQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/GroupQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/GroupQueryBuilder.php index 85031e4c40..3f052bc022 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/GroupQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/GroupQueryBuilder.php @@ -52,5 +52,3 @@ public function buildQueryConstraint( ); } } - -class_alias(GroupQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\User\Metadata\GroupQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/ModifierQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/ModifierQueryBuilder.php index df895163a3..190ff511ba 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/ModifierQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/ModifierQueryBuilder.php @@ -37,5 +37,3 @@ public function buildQueryConstraint( ); } } - -class_alias(ModifierQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\User\Metadata\ModifierQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/OwnerQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/OwnerQueryBuilder.php index 5783d27ce1..abace92909 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/OwnerQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/OwnerQueryBuilder.php @@ -37,5 +37,3 @@ public function buildQueryConstraint( ); } } - -class_alias(OwnerQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\User\Metadata\OwnerQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserEmailQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserEmailQueryBuilder.php index fa482912df..dd61d1d1fc 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserEmailQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserEmailQueryBuilder.php @@ -49,5 +49,3 @@ public function buildQueryConstraint( return $expression; } } - -class_alias(UserEmailQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\User\UserEmailQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserIdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserIdQueryBuilder.php index 13e6724633..ade6a78e23 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserIdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserIdQueryBuilder.php @@ -38,5 +38,3 @@ public function buildQueryConstraint( ); } } - -class_alias(UserIdQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\User\UserIdQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserLoginQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserLoginQueryBuilder.php index c6dae4e71d..f8fda2ef74 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserLoginQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserLoginQueryBuilder.php @@ -49,5 +49,3 @@ public function buildQueryConstraint( ); } } - -class_alias(UserLoginQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\User\UserLoginQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionVisitor.php b/src/lib/Persistence/Legacy/Filter/CriterionVisitor.php index 61cfd8d638..58cb5a5600 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionVisitor.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionVisitor.php @@ -56,5 +56,3 @@ public function visitCriteria( ); } } - -class_alias(CriterionVisitor::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\CriterionVisitor'); diff --git a/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php b/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php index 18a2424afc..6d9006bf1b 100644 --- a/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php +++ b/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php @@ -290,5 +290,3 @@ private function wrapMainQuery(FilteringQueryBuilder $query): QueryBuilder return $wrappedQuery; } } - -class_alias(DoctrineGateway::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\Gateway\Content\Doctrine\DoctrineGateway'); diff --git a/src/lib/Persistence/Legacy/Filter/Gateway/Content/GatewayDataMapper.php b/src/lib/Persistence/Legacy/Filter/Gateway/Content/GatewayDataMapper.php index f65196e3cf..acd8a36478 100644 --- a/src/lib/Persistence/Legacy/Filter/Gateway/Content/GatewayDataMapper.php +++ b/src/lib/Persistence/Legacy/Filter/Gateway/Content/GatewayDataMapper.php @@ -23,5 +23,3 @@ public function mapRawDataToPersistenceContentItem(array $row): Content\ContentI public function mapContentMetadataToPersistenceContentInfo(array $row): ContentInfo; } - -class_alias(GatewayDataMapper::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\Gateway\Content\GatewayDataMapper'); diff --git a/src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php b/src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php index ad73d42004..e035a7069f 100644 --- a/src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php +++ b/src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php @@ -203,5 +203,3 @@ public function mapContentMetadataToPersistenceContentInfo(array $row): ContentI return $contentInfo; } } - -class_alias(DoctrineGatewayDataMapper::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\Gateway\Content\Mapper\DoctrineGatewayDataMapper'); diff --git a/src/lib/Persistence/Legacy/Filter/Gateway/Gateway.php b/src/lib/Persistence/Legacy/Filter/Gateway/Gateway.php index 993b015f8a..c76a604349 100644 --- a/src/lib/Persistence/Legacy/Filter/Gateway/Gateway.php +++ b/src/lib/Persistence/Legacy/Filter/Gateway/Gateway.php @@ -35,5 +35,3 @@ public function find( int $offset ): iterable; } - -class_alias(Gateway::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\Gateway\Gateway'); diff --git a/src/lib/Persistence/Legacy/Filter/Gateway/Location/Doctrine/DoctrineGateway.php b/src/lib/Persistence/Legacy/Filter/Gateway/Location/Doctrine/DoctrineGateway.php index 6f0b9d74d6..2a60871cf7 100644 --- a/src/lib/Persistence/Legacy/Filter/Gateway/Location/Doctrine/DoctrineGateway.php +++ b/src/lib/Persistence/Legacy/Filter/Gateway/Location/Doctrine/DoctrineGateway.php @@ -140,5 +140,3 @@ private function buildQuery(FilteringCriterion $criterion): FilteringQueryBuilde return $queryBuilder; } } - -class_alias(DoctrineGateway::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\Gateway\Location\Doctrine\DoctrineGateway'); diff --git a/src/lib/Persistence/Legacy/Filter/Handler/ContentFilteringHandler.php b/src/lib/Persistence/Legacy/Filter/Handler/ContentFilteringHandler.php index 7676b18a1c..be975019d2 100644 --- a/src/lib/Persistence/Legacy/Filter/Handler/ContentFilteringHandler.php +++ b/src/lib/Persistence/Legacy/Filter/Handler/ContentFilteringHandler.php @@ -78,5 +78,3 @@ public function count(Filter $filter): int return $this->gateway->count($filter->getCriterion()); } } - -class_alias(ContentFilteringHandler::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\Handler\ContentFilteringHandler'); diff --git a/src/lib/Persistence/Legacy/Filter/Handler/LocationFilteringHandler.php b/src/lib/Persistence/Legacy/Filter/Handler/LocationFilteringHandler.php index a5bdacb382..da28228501 100644 --- a/src/lib/Persistence/Legacy/Filter/Handler/LocationFilteringHandler.php +++ b/src/lib/Persistence/Legacy/Filter/Handler/LocationFilteringHandler.php @@ -74,5 +74,3 @@ public function count(Filter $filter): int return $this->gateway->count($filter->getCriterion()); } } - -class_alias(LocationFilteringHandler::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\Handler\LocationFilteringHandler'); diff --git a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/DateModifiedSortClauseQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/DateModifiedSortClauseQueryBuilder.php index 0ebd294116..dd6bab3fdb 100644 --- a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/DateModifiedSortClauseQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/DateModifiedSortClauseQueryBuilder.php @@ -28,5 +28,3 @@ public function buildQuery( $queryBuilder->addOrderBy('content.modified', $sortClause->direction); } } - -class_alias(DateModifiedSortClauseQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\SortClauseQueryBuilder\Content\DateModifiedSortClauseQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/DatePublishedSortClauseQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/DatePublishedSortClauseQueryBuilder.php index e6ae81cea4..ceab0b730e 100644 --- a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/DatePublishedSortClauseQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/DatePublishedSortClauseQueryBuilder.php @@ -28,5 +28,3 @@ public function buildQuery( $queryBuilder->addOrderBy('content.published', $sortClause->direction); } } - -class_alias(DatePublishedSortClauseQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\SortClauseQueryBuilder\Content\DatePublishedSortClauseQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/IdSortClauseQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/IdSortClauseQueryBuilder.php index 2beae9b636..51440e4dc9 100644 --- a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/IdSortClauseQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/IdSortClauseQueryBuilder.php @@ -28,5 +28,3 @@ public function buildQuery( $queryBuilder->addOrderBy('content.id', $sortClause->direction); } } - -class_alias(IdSortClauseQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\SortClauseQueryBuilder\Content\IdSortClauseQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/NameSortClauseQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/NameSortClauseQueryBuilder.php index 51946da0bc..40899fc8f4 100644 --- a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/NameSortClauseQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/NameSortClauseQueryBuilder.php @@ -28,5 +28,3 @@ public function buildQuery( $queryBuilder->addOrderBy('content.name', $sortClause->direction); } } - -class_alias(NameSortClauseQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\SortClauseQueryBuilder\Content\NameSortClauseQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/SectionIdentifierSortClauseQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/SectionIdentifierSortClauseQueryBuilder.php index c9bfd8a6ab..d540953a84 100644 --- a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/SectionIdentifierSortClauseQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/SectionIdentifierSortClauseQueryBuilder.php @@ -38,5 +38,3 @@ public function buildQuery( $queryBuilder->addOrderBy('section.identifier', $sortClause->direction); } } - -class_alias(SectionIdentifierSortClauseQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\SortClauseQueryBuilder\Content\SectionIdentifierSortClauseQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/SectionNameSortClauseQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/SectionNameSortClauseQueryBuilder.php index a2c95562d8..3372abd19b 100644 --- a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/SectionNameSortClauseQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/SectionNameSortClauseQueryBuilder.php @@ -38,5 +38,3 @@ public function buildQuery( $queryBuilder->addOrderBy('section.name', $sortClause->direction); } } - -class_alias(SectionNameSortClauseQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\SortClauseQueryBuilder\Content\SectionNameSortClauseQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/BaseLocationSortClauseQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/BaseLocationSortClauseQueryBuilder.php index 25f09c0596..1dff11c7eb 100644 --- a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/BaseLocationSortClauseQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/BaseLocationSortClauseQueryBuilder.php @@ -32,5 +32,3 @@ public function buildQuery( abstract protected function getSortingExpression(): string; } - -class_alias(BaseLocationSortClauseQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\SortClauseQueryBuilder\Location\BaseLocationSortClauseQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/DepthQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/DepthQueryBuilder.php index 2f862abc37..406940be54 100644 --- a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/DepthQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/DepthQueryBuilder.php @@ -26,5 +26,3 @@ protected function getSortingExpression(): string return 'location.depth'; } } - -class_alias(DepthQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\SortClauseQueryBuilder\Location\DepthQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/IdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/IdQueryBuilder.php index a9651bddb5..2aa9ddab66 100644 --- a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/IdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/IdQueryBuilder.php @@ -26,5 +26,3 @@ protected function getSortingExpression(): string return 'location.node_id'; } } - -class_alias(IdQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\SortClauseQueryBuilder\Location\IdQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/PathQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/PathQueryBuilder.php index 039951e0c0..cc0cd20748 100644 --- a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/PathQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/PathQueryBuilder.php @@ -23,5 +23,3 @@ protected function getSortingExpression(): string return 'location.path_string'; } } - -class_alias(PathQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\SortClauseQueryBuilder\Location\PathQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/PriorityQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/PriorityQueryBuilder.php index 543f64d816..b40b54927b 100644 --- a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/PriorityQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/PriorityQueryBuilder.php @@ -23,5 +23,3 @@ protected function getSortingExpression(): string return 'location.priority'; } } - -class_alias(PriorityQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\SortClauseQueryBuilder\Location\PriorityQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/VisibilityQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/VisibilityQueryBuilder.php index 3877761668..84463562dd 100644 --- a/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/VisibilityQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/VisibilityQueryBuilder.php @@ -23,5 +23,3 @@ protected function getSortingExpression(): string return 'location.is_invisible'; } } - -class_alias(VisibilityQueryBuilder::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\SortClauseQueryBuilder\Location\VisibilityQueryBuilder'); diff --git a/src/lib/Persistence/Legacy/Filter/SortClauseVisitor.php b/src/lib/Persistence/Legacy/Filter/SortClauseVisitor.php index fa3df472cb..4c729acf82 100644 --- a/src/lib/Persistence/Legacy/Filter/SortClauseVisitor.php +++ b/src/lib/Persistence/Legacy/Filter/SortClauseVisitor.php @@ -71,5 +71,3 @@ private function getQueryBuilderForSortClause( return self::$queryBuildersForSortClauses[$sortClauseFQCN]; } } - -class_alias(SortClauseVisitor::class, 'eZ\Publish\Core\Persistence\Legacy\Filter\SortClauseVisitor'); diff --git a/src/lib/Persistence/Legacy/Handler.php b/src/lib/Persistence/Legacy/Handler.php index 4cccaefb4f..c9e38b3961 100644 --- a/src/lib/Persistence/Legacy/Handler.php +++ b/src/lib/Persistence/Legacy/Handler.php @@ -242,5 +242,3 @@ public function rollback() $this->transactionHandler->rollback(); } } - -class_alias(Handler::class, 'eZ\Publish\Core\Persistence\Legacy\Handler'); diff --git a/src/lib/Persistence/Legacy/Notification/Gateway.php b/src/lib/Persistence/Legacy/Notification/Gateway.php index be47b14407..a84594cdce 100644 --- a/src/lib/Persistence/Legacy/Notification/Gateway.php +++ b/src/lib/Persistence/Legacy/Notification/Gateway.php @@ -71,5 +71,3 @@ abstract public function loadUserNotifications(int $userId, int $offset = 0, int */ abstract public function delete(int $notificationId): void; } - -class_alias(Gateway::class, 'eZ\Publish\Core\Persistence\Legacy\Notification\Gateway'); diff --git a/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php index d862209c8d..70cdd05e05 100644 --- a/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php @@ -183,5 +183,3 @@ private function getColumns(): array ]; } } - -class_alias(DoctrineDatabase::class, 'eZ\Publish\Core\Persistence\Legacy\Notification\Gateway\DoctrineDatabase'); diff --git a/src/lib/Persistence/Legacy/Notification/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Notification/Gateway/ExceptionConversion.php index 562cd536a2..f91b9962da 100644 --- a/src/lib/Persistence/Legacy/Notification/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Notification/Gateway/ExceptionConversion.php @@ -97,5 +97,3 @@ public function delete(int $notificationId): void } } } - -class_alias(ExceptionConversion::class, 'eZ\Publish\Core\Persistence\Legacy\Notification\Gateway\ExceptionConversion'); diff --git a/src/lib/Persistence/Legacy/Notification/Handler.php b/src/lib/Persistence/Legacy/Notification/Handler.php index 9dd97545f2..9ddf7a36a4 100644 --- a/src/lib/Persistence/Legacy/Notification/Handler.php +++ b/src/lib/Persistence/Legacy/Notification/Handler.php @@ -115,5 +115,3 @@ public function delete(APINotification $notification): void $this->gateway->delete($notification->id); } } - -class_alias(Handler::class, 'eZ\Publish\Core\Persistence\Legacy\Notification\Handler'); diff --git a/src/lib/Persistence/Legacy/Notification/Mapper.php b/src/lib/Persistence/Legacy/Notification/Mapper.php index 830b9db322..06a962ae2b 100644 --- a/src/lib/Persistence/Legacy/Notification/Mapper.php +++ b/src/lib/Persistence/Legacy/Notification/Mapper.php @@ -69,5 +69,3 @@ private function extractNotificationFromRow(array $row): Notification return $notification; } } - -class_alias(Mapper::class, 'eZ\Publish\Core\Persistence\Legacy\Notification\Mapper'); diff --git a/src/lib/Persistence/Legacy/Setting/Gateway.php b/src/lib/Persistence/Legacy/Setting/Gateway.php index f963d96639..9a1f043958 100644 --- a/src/lib/Persistence/Legacy/Setting/Gateway.php +++ b/src/lib/Persistence/Legacy/Setting/Gateway.php @@ -57,5 +57,3 @@ abstract public function deleteSetting( string $identifier ): void; } - -class_alias(Gateway::class, 'eZ\Publish\Core\Persistence\Legacy\Setting\Gateway'); diff --git a/src/lib/Persistence/Legacy/Setting/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Setting/Gateway/DoctrineDatabase.php index c64e557e0d..8c96f3fa82 100644 --- a/src/lib/Persistence/Legacy/Setting/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Setting/Gateway/DoctrineDatabase.php @@ -142,5 +142,3 @@ public function deleteSetting(string $group, string $identifier): void $query->execute(); } } - -class_alias(DoctrineDatabase::class, 'eZ\Publish\Core\Persistence\Legacy\Setting\Gateway\DoctrineDatabase'); diff --git a/src/lib/Persistence/Legacy/Setting/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Setting/Gateway/ExceptionConversion.php index 700066078d..c2c48f7b8d 100644 --- a/src/lib/Persistence/Legacy/Setting/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Setting/Gateway/ExceptionConversion.php @@ -86,5 +86,3 @@ public function deleteSetting(string $group, string $identifier): void } } } - -class_alias(ExceptionConversion::class, 'eZ\Publish\Core\Persistence\Legacy\Setting\Gateway\ExceptionConversion'); diff --git a/src/lib/Persistence/Legacy/Setting/Handler.php b/src/lib/Persistence/Legacy/Setting/Handler.php index c4329cfb70..28c2809fa7 100644 --- a/src/lib/Persistence/Legacy/Setting/Handler.php +++ b/src/lib/Persistence/Legacy/Setting/Handler.php @@ -97,5 +97,3 @@ private function createNotFoundException(string $group, string $identifier): Not ]); } } - -class_alias(Handler::class, 'eZ\Publish\Core\Persistence\Legacy\Setting\Handler'); diff --git a/src/lib/Persistence/Legacy/SharedGateway/DatabasePlatform/FallbackGateway.php b/src/lib/Persistence/Legacy/SharedGateway/DatabasePlatform/FallbackGateway.php index 7a7a483c54..8c43f2f653 100644 --- a/src/lib/Persistence/Legacy/SharedGateway/DatabasePlatform/FallbackGateway.php +++ b/src/lib/Persistence/Legacy/SharedGateway/DatabasePlatform/FallbackGateway.php @@ -34,5 +34,3 @@ public function getLastInsertedId(string $sequenceName): int return (int)$this->connection->lastInsertId($sequenceName); } } - -class_alias(FallbackGateway::class, 'eZ\Publish\Core\Persistence\Legacy\SharedGateway\DatabasePlatform\FallbackGateway'); diff --git a/src/lib/Persistence/Legacy/SharedGateway/DatabasePlatform/SqliteGateway.php b/src/lib/Persistence/Legacy/SharedGateway/DatabasePlatform/SqliteGateway.php index b92fa7ea03..44d0e781db 100644 --- a/src/lib/Persistence/Legacy/SharedGateway/DatabasePlatform/SqliteGateway.php +++ b/src/lib/Persistence/Legacy/SharedGateway/DatabasePlatform/SqliteGateway.php @@ -50,5 +50,3 @@ public function getLastInsertedId(string $sequenceName): int return $this->lastInsertedIds[$sequenceName]; } } - -class_alias(SqliteGateway::class, 'eZ\Publish\Core\Persistence\Legacy\SharedGateway\DatabasePlatform\SqliteGateway'); diff --git a/src/lib/Persistence/Legacy/SharedGateway/Gateway.php b/src/lib/Persistence/Legacy/SharedGateway/Gateway.php index 9b947b146c..0b327f29dc 100644 --- a/src/lib/Persistence/Legacy/SharedGateway/Gateway.php +++ b/src/lib/Persistence/Legacy/SharedGateway/Gateway.php @@ -42,5 +42,3 @@ public function getColumnNextIntegerValue( */ public function getLastInsertedId(string $sequenceName): int; } - -class_alias(Gateway::class, 'eZ\Publish\Core\Persistence\Legacy\SharedGateway\Gateway'); diff --git a/src/lib/Persistence/Legacy/SharedGateway/GatewayFactory.php b/src/lib/Persistence/Legacy/SharedGateway/GatewayFactory.php index 6ebfdca31e..911089fef5 100644 --- a/src/lib/Persistence/Legacy/SharedGateway/GatewayFactory.php +++ b/src/lib/Persistence/Legacy/SharedGateway/GatewayFactory.php @@ -48,5 +48,3 @@ private function getGatewayForDatabasePlatform(string $currentDatabasePlatformNa return $this->fallbackGateway; } } - -class_alias(GatewayFactory::class, 'eZ\Publish\Core\Persistence\Legacy\SharedGateway\GatewayFactory'); diff --git a/src/lib/Persistence/Legacy/TransactionHandler.php b/src/lib/Persistence/Legacy/TransactionHandler.php index 45d29a6dff..8615a57ca1 100644 --- a/src/lib/Persistence/Legacy/TransactionHandler.php +++ b/src/lib/Persistence/Legacy/TransactionHandler.php @@ -89,5 +89,3 @@ public function rollback() } } } - -class_alias(TransactionHandler::class, 'eZ\Publish\Core\Persistence\Legacy\TransactionHandler'); diff --git a/src/lib/Persistence/Legacy/URL/Gateway.php b/src/lib/Persistence/Legacy/URL/Gateway.php index ee00264e77..7cfd585413 100644 --- a/src/lib/Persistence/Legacy/URL/Gateway.php +++ b/src/lib/Persistence/Legacy/URL/Gateway.php @@ -65,5 +65,3 @@ abstract public function loadUrlData($id); */ abstract public function loadUrlDataByUrl($url); } - -class_alias(Gateway::class, 'eZ\Publish\Core\Persistence\Legacy\URL\Gateway'); diff --git a/src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php index 9895c3dd6d..20f3247cc6 100644 --- a/src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php @@ -269,5 +269,3 @@ private function getQuerySortingDirection(string $direction): string return self::SORT_DIRECTION_MAP[$direction]; } } - -class_alias(DoctrineDatabase::class, 'eZ\Publish\Core\Persistence\Legacy\URL\Gateway\DoctrineDatabase'); diff --git a/src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php index 9958240c78..1142fcb0f9 100644 --- a/src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php @@ -78,5 +78,3 @@ public function loadUrlDataByUrl($url) } } } - -class_alias(ExceptionConversion::class, 'eZ\Publish\Core\Persistence\Legacy\URL\Gateway\ExceptionConversion'); diff --git a/src/lib/Persistence/Legacy/URL/Handler.php b/src/lib/Persistence/Legacy/URL/Handler.php index 6dc8d4f9ef..8bc3d27ae6 100644 --- a/src/lib/Persistence/Legacy/URL/Handler.php +++ b/src/lib/Persistence/Legacy/URL/Handler.php @@ -111,5 +111,3 @@ public function findUsages($id) return $ids; } } - -class_alias(Handler::class, 'eZ\Publish\Core\Persistence\Legacy\URL\Handler'); diff --git a/src/lib/Persistence/Legacy/URL/Mapper.php b/src/lib/Persistence/Legacy/URL/Mapper.php index 4221d83fb2..9a5da221ef 100644 --- a/src/lib/Persistence/Legacy/URL/Mapper.php +++ b/src/lib/Persistence/Legacy/URL/Mapper.php @@ -61,5 +61,3 @@ public function extractURLsFromRows(array $rows) return $urls; } } - -class_alias(Mapper::class, 'eZ\Publish\Core\Persistence\Legacy\URL\Mapper'); diff --git a/src/lib/Persistence/Legacy/URL/Query/CriteriaConverter.php b/src/lib/Persistence/Legacy/URL/Query/CriteriaConverter.php index 981e042f2f..bba52f757f 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriteriaConverter.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriteriaConverter.php @@ -60,5 +60,3 @@ public function convertCriteria(QueryBuilder $queryBuilder, Criterion $criterion ); } } - -class_alias(CriteriaConverter::class, 'eZ\Publish\Core\Persistence\Legacy\URL\Query\CriteriaConverter'); diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler.php index 7ac19679ed..cc1434dad3 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler.php @@ -34,5 +34,3 @@ public function handle( Criterion $criterion ); } - -class_alias(CriterionHandler::class, 'eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler'); diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Base.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Base.php index 76b5c08a68..ea27a3b9db 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Base.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Base.php @@ -78,5 +78,3 @@ protected function hasJoinedTable(QueryBuilder $queryBuilder, string $tableName) return false; } } - -class_alias(Base::class, 'eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler\Base'); diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAnd.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAnd.php index 617caba36a..a1f2116147 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAnd.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAnd.php @@ -37,5 +37,3 @@ public function handle(CriteriaConverter $converter, QueryBuilder $queryBuilder, return $queryBuilder->expr()->andX(...$subexpressions); } } - -class_alias(LogicalAnd::class, 'eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler\LogicalAnd'); diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNot.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNot.php index 7c96a36278..8a9b00fcb3 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNot.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNot.php @@ -38,5 +38,3 @@ public function handle( ); } } - -class_alias(LogicalNot::class, 'eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler\LogicalNot'); diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOr.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOr.php index fea8b4ccf3..df8e069d0b 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOr.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOr.php @@ -40,5 +40,3 @@ public function handle( return $queryBuilder->expr()->orX(...$subexpressions); } } - -class_alias(LogicalOr::class, 'eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler\LogicalOr'); diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAll.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAll.php index e67cf64ee8..aa505fd3ac 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAll.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAll.php @@ -33,5 +33,3 @@ public function handle( return '1 = 1'; } } - -class_alias(MatchAll::class, 'eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler\MatchAll'); diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNone.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNone.php index b12b32d4b1..bd2d5ceecd 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNone.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNone.php @@ -33,5 +33,3 @@ public function handle( return '1 = 0'; } } - -class_alias(MatchNone::class, 'eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler\MatchNone'); diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Pattern.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Pattern.php index 672baea7e3..dc187cb0bf 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Pattern.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Pattern.php @@ -42,5 +42,3 @@ public function handle( ); } } - -class_alias(Pattern::class, 'eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler\Pattern'); diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/SectionId.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/SectionId.php index 8718f3d120..310c982ba0 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/SectionId.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/SectionId.php @@ -45,5 +45,3 @@ public function handle( ); } } - -class_alias(SectionId::class, 'eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler\SectionId'); diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/SectionIdentifier.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/SectionIdentifier.php index 678f067108..3e172ac1ee 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/SectionIdentifier.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/SectionIdentifier.php @@ -53,5 +53,3 @@ public function handle( ); } } - -class_alias(SectionIdentifier::class, 'eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler\SectionIdentifier'); diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Validity.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Validity.php index 5854c45471..e53adbf0d0 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Validity.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Validity.php @@ -42,5 +42,3 @@ public function handle( ); } } - -class_alias(Validity::class, 'eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler\Validity'); diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnly.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnly.php index d471911b6a..f2fe945515 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnly.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnly.php @@ -50,5 +50,3 @@ public function handle( ); } } - -class_alias(VisibleOnly::class, 'eZ\Publish\Core\Persistence\Legacy\URL\Query\CriterionHandler\VisibleOnly'); diff --git a/src/lib/Persistence/Legacy/User/Gateway.php b/src/lib/Persistence/Legacy/User/Gateway.php index bfd6e3a47c..ebe8b40224 100644 --- a/src/lib/Persistence/Legacy/User/Gateway.php +++ b/src/lib/Persistence/Legacy/User/Gateway.php @@ -76,5 +76,3 @@ abstract public function removeRole(int $contentId, int $roleId): void; */ abstract public function removeRoleAssignmentById(int $roleAssignmentId): void; } - -class_alias(Gateway::class, 'eZ\Publish\Core\Persistence\Legacy\User\Gateway'); diff --git a/src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php index b1b7ddbab4..6813a53cd5 100644 --- a/src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php @@ -306,5 +306,3 @@ private function userHasToken(int $userId): bool return !empty($query->execute()->fetch(FetchMode::ASSOCIATIVE)); } } - -class_alias(DoctrineDatabase::class, 'eZ\Publish\Core\Persistence\Legacy\User\Gateway\DoctrineDatabase'); diff --git a/src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php index e4d6fbbc7b..0a3fc39fe3 100644 --- a/src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php @@ -127,5 +127,3 @@ public function removeRoleAssignmentById(int $roleAssignmentId): void } } } - -class_alias(ExceptionConversion::class, 'eZ\Publish\Core\Persistence\Legacy\User\Gateway\ExceptionConversion'); diff --git a/src/lib/Persistence/Legacy/User/Handler.php b/src/lib/Persistence/Legacy/User/Handler.php index c3a5294b04..59913f2437 100644 --- a/src/lib/Persistence/Legacy/User/Handler.php +++ b/src/lib/Persistence/Legacy/User/Handler.php @@ -692,5 +692,3 @@ public function loadRoleAssignmentsByGroupId($groupId, $inherit = false) return $this->mapper->mapRoleAssignments($data); } } - -class_alias(Handler::class, 'eZ\Publish\Core\Persistence\Legacy\User\Handler'); diff --git a/src/lib/Persistence/Legacy/User/Mapper.php b/src/lib/Persistence/Legacy/User/Mapper.php index aff71f3dd9..80bf198616 100644 --- a/src/lib/Persistence/Legacy/User/Mapper.php +++ b/src/lib/Persistence/Legacy/User/Mapper.php @@ -252,5 +252,3 @@ public function createRoleFromCopyStruct(User\RoleCopyStruct $copyStruct): Role return $role; } } - -class_alias(Mapper::class, 'eZ\Publish\Core\Persistence\Legacy\User\Mapper'); diff --git a/src/lib/Persistence/Legacy/User/Role/Gateway.php b/src/lib/Persistence/Legacy/User/Role/Gateway.php index f3d33d6722..dd80c82c0b 100644 --- a/src/lib/Persistence/Legacy/User/Role/Gateway.php +++ b/src/lib/Persistence/Legacy/User/Role/Gateway.php @@ -167,5 +167,3 @@ abstract public function removePolicy(int $policyId): void; */ abstract public function removePolicyLimitations(int $policyId): void; } - -class_alias(Gateway::class, 'eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway'); diff --git a/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php index a6d535e3f3..7ffcd7bf3e 100644 --- a/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php @@ -807,5 +807,3 @@ private function publishRolePolicies(int $roleDraftId, ?int $originalRoleId): vo $policyQuery->execute(); } } - -class_alias(DoctrineDatabase::class, 'eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\DoctrineDatabase'); diff --git a/src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php index c7429bcc98..d0bb7eb64e 100644 --- a/src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php @@ -222,5 +222,3 @@ public function removePolicyLimitations(int $policyId): void } } } - -class_alias(ExceptionConversion::class, 'eZ\Publish\Core\Persistence\Legacy\User\Role\Gateway\ExceptionConversion'); diff --git a/src/lib/Persistence/Legacy/User/Role/LimitationConverter.php b/src/lib/Persistence/Legacy/User/Role/LimitationConverter.php index 0e906200b5..e1d485b966 100644 --- a/src/lib/Persistence/Legacy/User/Role/LimitationConverter.php +++ b/src/lib/Persistence/Legacy/User/Role/LimitationConverter.php @@ -59,5 +59,3 @@ public function toSPI(Policy $policy) } } } - -class_alias(LimitationConverter::class, 'eZ\Publish\Core\Persistence\Legacy\User\Role\LimitationConverter'); diff --git a/src/lib/Persistence/Legacy/User/Role/LimitationHandler.php b/src/lib/Persistence/Legacy/User/Role/LimitationHandler.php index 94273b722e..f3f8af0fa2 100644 --- a/src/lib/Persistence/Legacy/User/Role/LimitationHandler.php +++ b/src/lib/Persistence/Legacy/User/Role/LimitationHandler.php @@ -26,5 +26,3 @@ abstract public function toLegacy(Policy $policy): void; abstract public function toSPI(Policy $policy): void; } - -class_alias(LimitationHandler::class, 'eZ\Publish\Core\Persistence\Legacy\User\Role\LimitationHandler'); diff --git a/src/lib/Persistence/Legacy/User/Role/LimitationHandler/ObjectStateHandler.php b/src/lib/Persistence/Legacy/User/Role/LimitationHandler/ObjectStateHandler.php index 6ca4ac046d..b6dee68148 100644 --- a/src/lib/Persistence/Legacy/User/Role/LimitationHandler/ObjectStateHandler.php +++ b/src/lib/Persistence/Legacy/User/Role/LimitationHandler/ObjectStateHandler.php @@ -133,5 +133,3 @@ protected function getGroupMap(array $limitIds = null): array return $map; } } - -class_alias(ObjectStateHandler::class, 'eZ\Publish\Core\Persistence\Legacy\User\Role\LimitationHandler\ObjectStateHandler'); diff --git a/src/lib/Persistence/Legacy/UserPreference/Gateway.php b/src/lib/Persistence/Legacy/UserPreference/Gateway.php index 78b5347d18..edab39b992 100644 --- a/src/lib/Persistence/Legacy/UserPreference/Gateway.php +++ b/src/lib/Persistence/Legacy/UserPreference/Gateway.php @@ -47,5 +47,3 @@ abstract public function countUserPreferences(int $userId): int; */ abstract public function loadUserPreferences(int $userId, int $offset = 0, int $limit = -1): array; } - -class_alias(Gateway::class, 'eZ\Publish\Core\Persistence\Legacy\UserPreference\Gateway'); diff --git a/src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php index 1c808e8cbf..2c004bedec 100644 --- a/src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php @@ -136,5 +136,3 @@ private function getColumns(): array ]; } } - -class_alias(DoctrineDatabase::class, 'eZ\Publish\Core\Persistence\Legacy\UserPreference\Gateway\DoctrineDatabase'); diff --git a/src/lib/Persistence/Legacy/UserPreference/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/UserPreference/Gateway/ExceptionConversion.php index 0c3f6b9d1c..e9eb328208 100644 --- a/src/lib/Persistence/Legacy/UserPreference/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/UserPreference/Gateway/ExceptionConversion.php @@ -81,5 +81,3 @@ public function setUserPreference(UserPreferenceSetStruct $setStruct): int } } } - -class_alias(ExceptionConversion::class, 'eZ\Publish\Core\Persistence\Legacy\UserPreference\Gateway\ExceptionConversion'); diff --git a/src/lib/Persistence/Legacy/UserPreference/Handler.php b/src/lib/Persistence/Legacy/UserPreference/Handler.php index 5346631719..1385c968bd 100644 --- a/src/lib/Persistence/Legacy/UserPreference/Handler.php +++ b/src/lib/Persistence/Legacy/UserPreference/Handler.php @@ -79,5 +79,3 @@ public function loadUserPreferences(int $userId, int $offset, int $limit): array ); } } - -class_alias(Handler::class, 'eZ\Publish\Core\Persistence\Legacy\UserPreference\Handler'); diff --git a/src/lib/Persistence/Legacy/UserPreference/Mapper.php b/src/lib/Persistence/Legacy/UserPreference/Mapper.php index ea8d97be61..739e31954a 100644 --- a/src/lib/Persistence/Legacy/UserPreference/Mapper.php +++ b/src/lib/Persistence/Legacy/UserPreference/Mapper.php @@ -47,5 +47,3 @@ private function extractUserPreferenceFromRow(array $row): UserPreference return $userPreference; } } - -class_alias(Mapper::class, 'eZ\Publish\Core\Persistence\Legacy\UserPreference\Mapper'); diff --git a/src/lib/Persistence/TransformationProcessor.php b/src/lib/Persistence/TransformationProcessor.php index de21cd6c82..3b3b98f5f7 100644 --- a/src/lib/Persistence/TransformationProcessor.php +++ b/src/lib/Persistence/TransformationProcessor.php @@ -130,5 +130,3 @@ public function transformByGroup($string, $ruleGroup) return $string; } } - -class_alias(TransformationProcessor::class, 'eZ\Publish\Core\Persistence\TransformationProcessor'); diff --git a/src/lib/Persistence/TransformationProcessor/DefinitionBased.php b/src/lib/Persistence/TransformationProcessor/DefinitionBased.php index 9343f3da59..ad6ab55bce 100644 --- a/src/lib/Persistence/TransformationProcessor/DefinitionBased.php +++ b/src/lib/Persistence/TransformationProcessor/DefinitionBased.php @@ -62,5 +62,3 @@ protected function getRules() return $this->compiledRules; } } - -class_alias(DefinitionBased::class, 'eZ\Publish\Core\Persistence\TransformationProcessor\DefinitionBased'); diff --git a/src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php b/src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php index cb4993a49b..218b1e4da2 100644 --- a/src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php +++ b/src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php @@ -181,5 +181,3 @@ protected function filterValues(array $data) return $data; } } - -class_alias(Parser::class, 'eZ\Publish\Core\Persistence\TransformationProcessor\DefinitionBased\Parser'); diff --git a/src/lib/Persistence/TransformationProcessor/PcreCompiler.php b/src/lib/Persistence/TransformationProcessor/PcreCompiler.php index c87c420c2a..32ad9a1af7 100644 --- a/src/lib/Persistence/TransformationProcessor/PcreCompiler.php +++ b/src/lib/Persistence/TransformationProcessor/PcreCompiler.php @@ -287,5 +287,3 @@ private function hexdec(?string $value): int return hexdec(preg_replace('/[^[:xdigit:]]/', '', (string)$value)); } } - -class_alias(PcreCompiler::class, 'eZ\Publish\Core\Persistence\TransformationProcessor\PcreCompiler'); diff --git a/src/lib/Persistence/TransformationProcessor/PreprocessedBased.php b/src/lib/Persistence/TransformationProcessor/PreprocessedBased.php index 75cc29bbc7..6c47eab15b 100644 --- a/src/lib/Persistence/TransformationProcessor/PreprocessedBased.php +++ b/src/lib/Persistence/TransformationProcessor/PreprocessedBased.php @@ -46,5 +46,3 @@ protected function getRules() return $this->compiledRules; } } - -class_alias(PreprocessedBased::class, 'eZ\Publish\Core\Persistence\TransformationProcessor\PreprocessedBased'); diff --git a/src/lib/Persistence/Utf8Converter.php b/src/lib/Persistence/Utf8Converter.php index 9e53609a9a..a9b6501a98 100644 --- a/src/lib/Persistence/Utf8Converter.php +++ b/src/lib/Persistence/Utf8Converter.php @@ -179,5 +179,3 @@ public static function toUnicodeCodepoint($char) return $charCode; } } - -class_alias(Utf8Converter::class, 'eZ\Publish\Core\Persistence\Utf8Converter'); diff --git a/src/lib/Query/QueryFactory.php b/src/lib/Query/QueryFactory.php index 00b50a3a08..991cd76ecc 100644 --- a/src/lib/Query/QueryFactory.php +++ b/src/lib/Query/QueryFactory.php @@ -26,5 +26,3 @@ public function create(string $type, array $parameters = []): Query return $this->queryTypeRegistry->getQueryType($type)->getQuery($parameters); } } - -class_alias(QueryFactory::class, 'eZ\Publish\Core\Query\QueryFactory'); diff --git a/src/lib/Query/QueryFactoryInterface.php b/src/lib/Query/QueryFactoryInterface.php index 4d9cc08d1d..468c7a8013 100644 --- a/src/lib/Query/QueryFactoryInterface.php +++ b/src/lib/Query/QueryFactoryInterface.php @@ -13,5 +13,3 @@ interface QueryFactoryInterface { public function create(string $type, array $parameters = []): Query; } - -class_alias(QueryFactoryInterface::class, 'eZ\Publish\Core\Query\QueryFactoryInterface'); diff --git a/src/lib/QueryType/ArrayQueryTypeRegistry.php b/src/lib/QueryType/ArrayQueryTypeRegistry.php index 147e942bff..f0086bd6c0 100644 --- a/src/lib/QueryType/ArrayQueryTypeRegistry.php +++ b/src/lib/QueryType/ArrayQueryTypeRegistry.php @@ -36,5 +36,3 @@ public function getQueryType($name) return $this->registry[$name]; } } - -class_alias(ArrayQueryTypeRegistry::class, 'eZ\Publish\Core\QueryType\ArrayQueryTypeRegistry'); diff --git a/src/lib/QueryType/BuiltIn/AbstractLocationQueryType.php b/src/lib/QueryType/BuiltIn/AbstractLocationQueryType.php index 52e4b23d1c..aa2d133b66 100644 --- a/src/lib/QueryType/BuiltIn/AbstractLocationQueryType.php +++ b/src/lib/QueryType/BuiltIn/AbstractLocationQueryType.php @@ -76,5 +76,3 @@ protected function createQuery(): Query return new LocationQuery(); } } - -class_alias(AbstractLocationQueryType::class, 'eZ\Publish\Core\QueryType\BuiltIn\AbstractLocationQueryType'); diff --git a/src/lib/QueryType/BuiltIn/AbstractQueryType.php b/src/lib/QueryType/BuiltIn/AbstractQueryType.php index 2ae696bea4..ed0a9bb27e 100644 --- a/src/lib/QueryType/BuiltIn/AbstractQueryType.php +++ b/src/lib/QueryType/BuiltIn/AbstractQueryType.php @@ -133,5 +133,3 @@ private function getRootLocationPathString(): string return $rootLocation->pathString; } } - -class_alias(AbstractQueryType::class, 'eZ\Publish\Core\QueryType\BuiltIn\AbstractQueryType'); diff --git a/src/lib/QueryType/BuiltIn/AncestorsQueryType.php b/src/lib/QueryType/BuiltIn/AncestorsQueryType.php index 54b402c1f6..6c4e8e96fa 100644 --- a/src/lib/QueryType/BuiltIn/AncestorsQueryType.php +++ b/src/lib/QueryType/BuiltIn/AncestorsQueryType.php @@ -38,5 +38,3 @@ protected function getQueryFilter(array $parameters): Criterion ]); } } - -class_alias(AncestorsQueryType::class, 'eZ\Publish\Core\QueryType\BuiltIn\AncestorsQueryType'); diff --git a/src/lib/QueryType/BuiltIn/ChildrenQueryType.php b/src/lib/QueryType/BuiltIn/ChildrenQueryType.php index c0aded8238..ecf66c3650 100644 --- a/src/lib/QueryType/BuiltIn/ChildrenQueryType.php +++ b/src/lib/QueryType/BuiltIn/ChildrenQueryType.php @@ -30,5 +30,3 @@ protected function getQueryFilter(array $parameters): Criterion return new ParentLocationId($location->id); } } - -class_alias(ChildrenQueryType::class, 'eZ\Publish\Core\QueryType\BuiltIn\ChildrenQueryType'); diff --git a/src/lib/QueryType/BuiltIn/GeoLocationQueryType.php b/src/lib/QueryType/BuiltIn/GeoLocationQueryType.php index 5713598cde..c415f05d90 100644 --- a/src/lib/QueryType/BuiltIn/GeoLocationQueryType.php +++ b/src/lib/QueryType/BuiltIn/GeoLocationQueryType.php @@ -69,5 +69,3 @@ protected function getQueryFilter(array $parameters): Criterion ); } } - -class_alias(GeoLocationQueryType::class, 'eZ\Publish\Core\QueryType\BuiltIn\GeoLocationQueryType'); diff --git a/src/lib/QueryType/BuiltIn/RelatedToContentQueryType.php b/src/lib/QueryType/BuiltIn/RelatedToContentQueryType.php index 4b02d4949e..bb1033d57e 100644 --- a/src/lib/QueryType/BuiltIn/RelatedToContentQueryType.php +++ b/src/lib/QueryType/BuiltIn/RelatedToContentQueryType.php @@ -57,5 +57,3 @@ protected function getQueryFilter(array $parameters): Criterion ); } } - -class_alias(RelatedToContentQueryType::class, 'eZ\Publish\Core\QueryType\BuiltIn\RelatedToContentQueryType'); diff --git a/src/lib/QueryType/BuiltIn/SiblingsQueryType.php b/src/lib/QueryType/BuiltIn/SiblingsQueryType.php index 6176fdad3f..a0655922c8 100644 --- a/src/lib/QueryType/BuiltIn/SiblingsQueryType.php +++ b/src/lib/QueryType/BuiltIn/SiblingsQueryType.php @@ -29,5 +29,3 @@ protected function getQueryFilter(array $parameters): Criterion return Criterion\Sibling::fromLocation($location); } } - -class_alias(SiblingsQueryType::class, 'eZ\Publish\Core\QueryType\BuiltIn\SiblingsQueryType'); diff --git a/src/lib/QueryType/BuiltIn/SortClausesFactory.php b/src/lib/QueryType/BuiltIn/SortClausesFactory.php index 553e5abe01..79da7508bb 100644 --- a/src/lib/QueryType/BuiltIn/SortClausesFactory.php +++ b/src/lib/QueryType/BuiltIn/SortClausesFactory.php @@ -40,5 +40,3 @@ public function createFromSpecification(string $specification): array return $parser->parseSortClausesList(); } } - -class_alias(SortClausesFactory::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortClausesFactory'); diff --git a/src/lib/QueryType/BuiltIn/SortClausesFactoryInterface.php b/src/lib/QueryType/BuiltIn/SortClausesFactoryInterface.php index a4a7c9f1ca..942a1bd2d9 100644 --- a/src/lib/QueryType/BuiltIn/SortClausesFactoryInterface.php +++ b/src/lib/QueryType/BuiltIn/SortClausesFactoryInterface.php @@ -20,5 +20,3 @@ interface SortClausesFactoryInterface */ public function createFromSpecification(string $specification): array; } - -class_alias(SortClausesFactoryInterface::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortClausesFactoryInterface'); diff --git a/src/lib/QueryType/BuiltIn/SortSpec/Exception/SyntaxErrorException.php b/src/lib/QueryType/BuiltIn/SortSpec/Exception/SyntaxErrorException.php index cecc0a2762..5120ffd857 100644 --- a/src/lib/QueryType/BuiltIn/SortSpec/Exception/SyntaxErrorException.php +++ b/src/lib/QueryType/BuiltIn/SortSpec/Exception/SyntaxErrorException.php @@ -27,5 +27,3 @@ public static function fromUnexpectedToken(string $input, Token $token, array $e return new self($message); } } - -class_alias(SyntaxErrorException::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\Exception\SyntaxErrorException'); diff --git a/src/lib/QueryType/BuiltIn/SortSpec/Exception/UnsupportedSortClauseException.php b/src/lib/QueryType/BuiltIn/SortSpec/Exception/UnsupportedSortClauseException.php index 0720ae27b4..d03d2c2a51 100644 --- a/src/lib/QueryType/BuiltIn/SortSpec/Exception/UnsupportedSortClauseException.php +++ b/src/lib/QueryType/BuiltIn/SortSpec/Exception/UnsupportedSortClauseException.php @@ -25,5 +25,3 @@ public function __construct(string $name, $code = 0, Throwable $previous = null) parent::__construct($message, $code, $previous); } } - -class_alias(UnsupportedSortClauseException::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\Exception\UnsupportedSortClauseException'); diff --git a/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/CustomFieldSortClauseParser.php b/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/CustomFieldSortClauseParser.php index 2866c33135..bf5ec23f30 100644 --- a/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/CustomFieldSortClauseParser.php +++ b/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/CustomFieldSortClauseParser.php @@ -40,5 +40,3 @@ public function supports(string $name): bool return $name === self::SUPPORTED_CLAUSE_NAME; } } - -class_alias(CustomFieldSortClauseParser::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\SortClauseParser\CustomFieldSortClauseParser'); diff --git a/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParser.php b/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParser.php index 1862b99563..481208c67c 100644 --- a/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParser.php +++ b/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParser.php @@ -42,5 +42,3 @@ public function supports(string $name): bool return isset($this->valueObjectClassMap[$name]); } } - -class_alias(DefaultSortClauseParser::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\SortClauseParser\DefaultSortClauseParser'); diff --git a/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/FieldSortClauseParser.php b/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/FieldSortClauseParser.php index 6d1eeaef02..134deb9f53 100644 --- a/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/FieldSortClauseParser.php +++ b/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/FieldSortClauseParser.php @@ -41,5 +41,3 @@ public function supports(string $name): bool return $name === self::SUPPORTED_CLAUSE_NAME; } } - -class_alias(FieldSortClauseParser::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\SortClauseParser\FieldSortClauseParser'); diff --git a/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/MapDistanceSortClauseParser.php b/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/MapDistanceSortClauseParser.php index bff9afc51d..9f72caadf8 100644 --- a/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/MapDistanceSortClauseParser.php +++ b/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/MapDistanceSortClauseParser.php @@ -44,5 +44,3 @@ public function supports(string $name): bool return $name === self::SUPPORTED_CLAUSE_NAME; } } - -class_alias(MapDistanceSortClauseParser::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\SortClauseParser\MapDistanceSortClauseParser'); diff --git a/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/RandomSortClauseParser.php b/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/RandomSortClauseParser.php index 5a452bb3b8..e176ae7fb9 100644 --- a/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/RandomSortClauseParser.php +++ b/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/RandomSortClauseParser.php @@ -43,5 +43,3 @@ public function supports(string $name): bool return $name === self::SUPPORTED_CLAUSE_NAME; } } - -class_alias(RandomSortClauseParser::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\SortClauseParser\RandomSortClauseParser'); diff --git a/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParserDispatcher.php b/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParserDispatcher.php index 8b27706613..a843a9bb7d 100644 --- a/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParserDispatcher.php +++ b/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParserDispatcher.php @@ -47,5 +47,3 @@ private function findParser(string $name): ?SortClauseParserInterface return null; } } - -class_alias(SortClauseParserDispatcher::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\SortClauseParserDispatcher'); diff --git a/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParserInterface.php b/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParserInterface.php index 4a934fe568..cc281df6ea 100644 --- a/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParserInterface.php +++ b/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParserInterface.php @@ -19,5 +19,3 @@ public function parse(SortSpecParserInterface $parser, string $name): SortClause public function supports(string $name): bool; } - -class_alias(SortClauseParserInterface::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\SortClauseParserInterface'); diff --git a/src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexer.php b/src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexer.php index 13720c9024..26f5ca6d24 100644 --- a/src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexer.php +++ b/src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexer.php @@ -152,5 +152,3 @@ private function isID(string $value): bool return preg_match('/^' . self::ID_PATTERN . '$/', $value) === 1; } } - -class_alias(SortSpecLexer::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\SortSpecLexer'); diff --git a/src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerInterface.php b/src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerInterface.php index 86951bf7b8..960441db96 100644 --- a/src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerInterface.php +++ b/src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerInterface.php @@ -35,5 +35,3 @@ public function peek(): ?Token; */ public function isEOF(): bool; } - -class_alias(SortSpecLexerInterface::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\SortSpecLexerInterface'); diff --git a/src/lib/QueryType/BuiltIn/SortSpec/SortSpecParser.php b/src/lib/QueryType/BuiltIn/SortSpec/SortSpecParser.php index 7df2136acd..19824ff228 100644 --- a/src/lib/QueryType/BuiltIn/SortSpec/SortSpecParser.php +++ b/src/lib/QueryType/BuiltIn/SortSpec/SortSpecParser.php @@ -120,5 +120,3 @@ public function matchAnyOf(string ...$types): Token ); } } - -class_alias(SortSpecParser::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\SortSpecParser'); diff --git a/src/lib/QueryType/BuiltIn/SortSpec/SortSpecParserInterface.php b/src/lib/QueryType/BuiltIn/SortSpec/SortSpecParserInterface.php index 5dbc59fda0..e813414cdd 100644 --- a/src/lib/QueryType/BuiltIn/SortSpec/SortSpecParserInterface.php +++ b/src/lib/QueryType/BuiltIn/SortSpec/SortSpecParserInterface.php @@ -24,5 +24,3 @@ public function match(string $type): Token; public function matchAnyOf(string ...$types): Token; } - -class_alias(SortSpecParserInterface::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\SortSpecParserInterface'); diff --git a/src/lib/QueryType/BuiltIn/SortSpec/Token.php b/src/lib/QueryType/BuiltIn/SortSpec/Token.php index 5decc515c1..3e2376dc16 100644 --- a/src/lib/QueryType/BuiltIn/SortSpec/Token.php +++ b/src/lib/QueryType/BuiltIn/SortSpec/Token.php @@ -75,5 +75,3 @@ public function __toString(): string return "{$this->type}"; } } - -class_alias(Token::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\Token'); diff --git a/src/lib/QueryType/BuiltIn/SubtreeQueryType.php b/src/lib/QueryType/BuiltIn/SubtreeQueryType.php index 55a52fd387..dc742112e8 100644 --- a/src/lib/QueryType/BuiltIn/SubtreeQueryType.php +++ b/src/lib/QueryType/BuiltIn/SubtreeQueryType.php @@ -53,5 +53,3 @@ protected function getQueryFilter(array $parameters): Criterion return new Subtree($location->pathString); } } - -class_alias(SubtreeQueryType::class, 'eZ\Publish\Core\QueryType\BuiltIn\SubtreeQueryType'); diff --git a/src/lib/QueryType/ContentViewQueryTypeMapper.php b/src/lib/QueryType/ContentViewQueryTypeMapper.php index db3d3d907f..c9a37b39c5 100644 --- a/src/lib/QueryType/ContentViewQueryTypeMapper.php +++ b/src/lib/QueryType/ContentViewQueryTypeMapper.php @@ -21,5 +21,3 @@ interface ContentViewQueryTypeMapper */ public function map(ContentView $contentView); } - -class_alias(ContentViewQueryTypeMapper::class, 'eZ\Publish\Core\QueryType\ContentViewQueryTypeMapper'); diff --git a/src/lib/QueryType/OptionsResolverBasedQueryType.php b/src/lib/QueryType/OptionsResolverBasedQueryType.php index 26abc7b494..d0a0b1ee7f 100644 --- a/src/lib/QueryType/OptionsResolverBasedQueryType.php +++ b/src/lib/QueryType/OptionsResolverBasedQueryType.php @@ -79,5 +79,3 @@ private function getResolver() return $this->resolver; } } - -class_alias(OptionsResolverBasedQueryType::class, 'eZ\Publish\Core\QueryType\OptionsResolverBasedQueryType'); diff --git a/src/lib/QueryType/QueryParameterContentViewQueryTypeMapper.php b/src/lib/QueryType/QueryParameterContentViewQueryTypeMapper.php index f52f05442c..9023d58770 100644 --- a/src/lib/QueryType/QueryParameterContentViewQueryTypeMapper.php +++ b/src/lib/QueryType/QueryParameterContentViewQueryTypeMapper.php @@ -103,5 +103,3 @@ private function evaluateExpression(ContentView $contentView, $queryParameterVal return $queryParameterValue; } } - -class_alias(QueryParameterContentViewQueryTypeMapper::class, 'eZ\Publish\Core\QueryType\QueryParameterContentViewQueryTypeMapper'); diff --git a/src/lib/QueryType/QueryType.php b/src/lib/QueryType/QueryType.php index c94ed9c9a0..5823dac407 100644 --- a/src/lib/QueryType/QueryType.php +++ b/src/lib/QueryType/QueryType.php @@ -37,5 +37,3 @@ public function getSupportedParameters(); */ public static function getName(); } - -class_alias(QueryType::class, 'eZ\Publish\Core\QueryType\QueryType'); diff --git a/src/lib/QueryType/QueryTypeRegistry.php b/src/lib/QueryType/QueryTypeRegistry.php index 5748c8b268..a58e920ea2 100644 --- a/src/lib/QueryType/QueryTypeRegistry.php +++ b/src/lib/QueryType/QueryTypeRegistry.php @@ -36,5 +36,3 @@ public function addQueryTypes(array $queryTypes); */ public function getQueryType($name); } - -class_alias(QueryTypeRegistry::class, 'eZ\Publish\Core\QueryType\QueryTypeRegistry'); diff --git a/src/lib/Repository/BookmarkService.php b/src/lib/Repository/BookmarkService.php index a74c79d5cb..acf178cb10 100644 --- a/src/lib/Repository/BookmarkService.php +++ b/src/lib/Repository/BookmarkService.php @@ -131,5 +131,3 @@ private function getCurrentUserId(): int ->getUserId(); } } - -class_alias(BookmarkService::class, 'eZ\Publish\Core\Repository\BookmarkService'); diff --git a/src/lib/Repository/ContentService.php b/src/lib/Repository/ContentService.php index 3820c58445..2f1c48b250 100644 --- a/src/lib/Repository/ContentService.php +++ b/src/lib/Repository/ContentService.php @@ -2714,5 +2714,3 @@ public function count(Filter $filter, ?array $languages = null): int return $this->contentFilteringHandler->count($filter); } } - -class_alias(ContentService::class, 'eZ\Publish\Core\Repository\ContentService'); diff --git a/src/lib/Repository/ContentTypeService.php b/src/lib/Repository/ContentTypeService.php index 8476c6f021..972f20aa7e 100644 --- a/src/lib/Repository/ContentTypeService.php +++ b/src/lib/Repository/ContentTypeService.php @@ -1658,5 +1658,3 @@ public function deleteUserDrafts(int $userId): void $this->contentTypeHandler->deleteByUserAndStatus($userId, ContentType::STATUS_DRAFT); } } - -class_alias(ContentTypeService::class, 'eZ\Publish\Core\Repository\ContentTypeService'); diff --git a/src/lib/Repository/EventSubscriber/DeleteUserSubscriber.php b/src/lib/Repository/EventSubscriber/DeleteUserSubscriber.php index c92643c9b3..6592f88207 100644 --- a/src/lib/Repository/EventSubscriber/DeleteUserSubscriber.php +++ b/src/lib/Repository/EventSubscriber/DeleteUserSubscriber.php @@ -34,5 +34,3 @@ public function onDeleteUser(DeleteUserEvent $event): void $this->contentTypeService->deleteUserDrafts($event->getUser()->id); } } - -class_alias(DeleteUserSubscriber::class, 'eZ\Publish\Core\Repository\EventSubscriber\DeleteUserSubscriber'); diff --git a/src/lib/Repository/FieldTypeService.php b/src/lib/Repository/FieldTypeService.php index 68e83470fa..2bd95d4de2 100644 --- a/src/lib/Repository/FieldTypeService.php +++ b/src/lib/Repository/FieldTypeService.php @@ -88,5 +88,3 @@ public function hasFieldType(string $identifier): bool return $this->fieldTypeRegistry->hasFieldType($identifier); } } - -class_alias(FieldTypeService::class, 'eZ\Publish\Core\Repository\FieldTypeService'); diff --git a/src/lib/Repository/Helper/NameSchemaService.php b/src/lib/Repository/Helper/NameSchemaService.php index 25e2ae564b..28f6fb0d19 100644 --- a/src/lib/Repository/Helper/NameSchemaService.php +++ b/src/lib/Repository/Helper/NameSchemaService.php @@ -189,5 +189,3 @@ protected function getFieldTitles(array $schemaIdentifiers, $contentType, array return $fieldTitles; } } - -class_alias(NameSchemaService::class, 'eZ\Publish\Core\Repository\Helper\NameSchemaService'); diff --git a/src/lib/Repository/Helper/RelationProcessor.php b/src/lib/Repository/Helper/RelationProcessor.php index 761e75179f..5ec1f8c1ff 100644 --- a/src/lib/Repository/Helper/RelationProcessor.php +++ b/src/lib/Repository/Helper/RelationProcessor.php @@ -210,5 +210,3 @@ public function processFieldRelations( } } } - -class_alias(RelationProcessor::class, 'eZ\Publish\Core\Repository\Helper\RelationProcessor'); diff --git a/src/lib/Repository/Helper/RoleDomainMapper.php b/src/lib/Repository/Helper/RoleDomainMapper.php index 1789f5fd9b..ab38758b66 100644 --- a/src/lib/Repository/Helper/RoleDomainMapper.php +++ b/src/lib/Repository/Helper/RoleDomainMapper.php @@ -19,5 +19,3 @@ class RoleDomainMapper extends BaseRoleDomainMapper { } - -class_alias(RoleDomainMapper::class, 'eZ\Publish\Core\Repository\Helper\RoleDomainMapper'); diff --git a/src/lib/Repository/LanguageService.php b/src/lib/Repository/LanguageService.php index 6ca9970a11..539e25ba40 100644 --- a/src/lib/Repository/LanguageService.php +++ b/src/lib/Repository/LanguageService.php @@ -406,5 +406,3 @@ protected function buildDomainObject(SPILanguage $spiLanguage) ); } } - -class_alias(LanguageService::class, 'eZ\Publish\Core\Repository\LanguageService'); diff --git a/src/lib/Repository/LocationResolver/LocationResolver.php b/src/lib/Repository/LocationResolver/LocationResolver.php index 2f3da0a99c..4f8735d7fd 100644 --- a/src/lib/Repository/LocationResolver/LocationResolver.php +++ b/src/lib/Repository/LocationResolver/LocationResolver.php @@ -23,5 +23,3 @@ interface LocationResolver */ public function resolveLocation(ContentInfo $contentInfo): Location; } - -class_alias(LocationResolver::class, 'eZ\Publish\Core\Repository\LocationResolver\LocationResolver'); diff --git a/src/lib/Repository/LocationResolver/PermissionAwareLocationResolver.php b/src/lib/Repository/LocationResolver/PermissionAwareLocationResolver.php index c20cc7b19b..221e43b83b 100644 --- a/src/lib/Repository/LocationResolver/PermissionAwareLocationResolver.php +++ b/src/lib/Repository/LocationResolver/PermissionAwareLocationResolver.php @@ -57,5 +57,3 @@ public function resolveLocation(ContentInfo $contentInfo): Location return $location; } } - -class_alias(PermissionAwareLocationResolver::class, 'eZ\Publish\Core\Repository\LocationResolver\PermissionAwareLocationResolver'); diff --git a/src/lib/Repository/LocationService.php b/src/lib/Repository/LocationService.php index 6c71114051..faae54586d 100644 --- a/src/lib/Repository/LocationService.php +++ b/src/lib/Repository/LocationService.php @@ -1021,5 +1021,3 @@ private function checkCreatePermissionOnSubtreeTarget( } } } - -class_alias(LocationService::class, 'eZ\Publish\Core\Repository\LocationService'); diff --git a/src/lib/Repository/Mapper/ContentDomainMapper.php b/src/lib/Repository/Mapper/ContentDomainMapper.php index eb6b00e2e2..eacc212226 100644 --- a/src/lib/Repository/Mapper/ContentDomainMapper.php +++ b/src/lib/Repository/Mapper/ContentDomainMapper.php @@ -930,5 +930,3 @@ private function mapPersistenceContentTypeToApi( ); } } - -class_alias(ContentDomainMapper::class, 'eZ\Publish\Core\Repository\Mapper\ContentDomainMapper'); diff --git a/src/lib/Repository/Mapper/ContentMapper.php b/src/lib/Repository/Mapper/ContentMapper.php index 6ca673191d..cedce66219 100644 --- a/src/lib/Repository/Mapper/ContentMapper.php +++ b/src/lib/Repository/Mapper/ContentMapper.php @@ -354,5 +354,3 @@ public function getFieldsForCreate(array $createdFields, ContentType $contentTyp return $fields; } } - -class_alias(ContentMapper::class, 'eZ\Publish\Core\Repository\Mapper\ContentMapper'); diff --git a/src/lib/Repository/Mapper/ContentTypeDomainMapper.php b/src/lib/Repository/Mapper/ContentTypeDomainMapper.php index 9b8aff1b15..c352b17e99 100644 --- a/src/lib/Repository/Mapper/ContentTypeDomainMapper.php +++ b/src/lib/Repository/Mapper/ContentTypeDomainMapper.php @@ -561,5 +561,3 @@ protected function getDateTime(int $timestamp): DateTime return $dateTime; } } - -class_alias(ContentTypeDomainMapper::class, 'eZ\Publish\Core\Repository\Mapper\ContentTypeDomainMapper'); diff --git a/src/lib/Repository/Mapper/ProxyAwareDomainMapper.php b/src/lib/Repository/Mapper/ProxyAwareDomainMapper.php index 13060ae286..30936d739c 100644 --- a/src/lib/Repository/Mapper/ProxyAwareDomainMapper.php +++ b/src/lib/Repository/Mapper/ProxyAwareDomainMapper.php @@ -35,5 +35,3 @@ final public function setProxyFactory(ProxyDomainMapperInterface $proxyFactory): $this->proxyFactory = $proxyFactory; } } - -class_alias(ProxyAwareDomainMapper::class, 'eZ\Publish\Core\Repository\Mapper\ProxyAwareDomainMapper'); diff --git a/src/lib/Repository/Mapper/RoleDomainMapper.php b/src/lib/Repository/Mapper/RoleDomainMapper.php index 6e0db859e2..43d4a25819 100644 --- a/src/lib/Repository/Mapper/RoleDomainMapper.php +++ b/src/lib/Repository/Mapper/RoleDomainMapper.php @@ -250,5 +250,3 @@ public function buildPersistencePolicyObject($module, $function, array $limitati ); } } - -class_alias(RoleDomainMapper::class, 'eZ\Publish\Core\Repository\Mapper\RoleDomainMapper'); diff --git a/src/lib/Repository/NotificationService.php b/src/lib/Repository/NotificationService.php index 6fc56e1d1b..81708f7e1f 100644 --- a/src/lib/Repository/NotificationService.php +++ b/src/lib/Repository/NotificationService.php @@ -179,5 +179,3 @@ private function getCurrentUserId(): int ->getUserId(); } } - -class_alias(NotificationService::class, 'eZ\Publish\Core\Repository\NotificationService'); diff --git a/src/lib/Repository/ObjectStateService.php b/src/lib/Repository/ObjectStateService.php index 50d66b14bb..054cb51741 100644 --- a/src/lib/Repository/ObjectStateService.php +++ b/src/lib/Repository/ObjectStateService.php @@ -834,5 +834,3 @@ protected function buildObjectStateGroupUpdateInputStruct( return $inputStruct; } } - -class_alias(ObjectStateService::class, 'eZ\Publish\Core\Repository\ObjectStateService'); diff --git a/src/lib/Repository/Permission/CachedPermissionService.php b/src/lib/Repository/Permission/CachedPermissionService.php index 2bdbdc37b7..1526653a45 100644 --- a/src/lib/Repository/Permission/CachedPermissionService.php +++ b/src/lib/Repository/Permission/CachedPermissionService.php @@ -157,5 +157,3 @@ public function getQueryPermissionsCriterion(): Criterion return $this->permissionCriterionResolver->getQueryPermissionsCriterion(); } } - -class_alias(CachedPermissionService::class, 'eZ\Publish\Core\Repository\Permission\CachedPermissionService'); diff --git a/src/lib/Repository/Permission/LimitationService.php b/src/lib/Repository/Permission/LimitationService.php index 8c3d1dcb37..aec9ae9776 100644 --- a/src/lib/Repository/Permission/LimitationService.php +++ b/src/lib/Repository/Permission/LimitationService.php @@ -98,5 +98,3 @@ public function validateLimitation(Limitation $limitation): array return $type->validate($limitation); } } - -class_alias(LimitationService::class, 'eZ\Publish\Core\Repository\Permission\LimitationService'); diff --git a/src/lib/Repository/Permission/PermissionCriterionResolver.php b/src/lib/Repository/Permission/PermissionCriterionResolver.php index 5f7605eb7c..815c1881d9 100644 --- a/src/lib/Repository/Permission/PermissionCriterionResolver.php +++ b/src/lib/Repository/Permission/PermissionCriterionResolver.php @@ -172,5 +172,3 @@ public function getQueryPermissionsCriterion(): Criterion return $permissionCriterion; } } - -class_alias(PermissionCriterionResolver::class, 'eZ\Publish\Core\Repository\Permission\PermissionCriterionResolver'); diff --git a/src/lib/Repository/Permission/PermissionResolver.php b/src/lib/Repository/Permission/PermissionResolver.php index 30b75f5dfe..54e579e3ba 100644 --- a/src/lib/Repository/Permission/PermissionResolver.php +++ b/src/lib/Repository/Permission/PermissionResolver.php @@ -463,5 +463,3 @@ static function ($target) use ($isTargetAware) { return $targets; } } - -class_alias(PermissionResolver::class, 'eZ\Publish\Core\Repository\Permission\PermissionResolver'); diff --git a/src/lib/Repository/PermissionsCriterionHandler.php b/src/lib/Repository/PermissionsCriterionHandler.php index a9edb9d220..819917cf66 100644 --- a/src/lib/Repository/PermissionsCriterionHandler.php +++ b/src/lib/Repository/PermissionsCriterionHandler.php @@ -47,5 +47,3 @@ public function addPermissionsCriterion(Criterion &$criterion) return true; } } - -class_alias(PermissionsCriterionHandler::class, 'eZ\Publish\Core\Repository\PermissionsCriterionHandler'); diff --git a/src/lib/Repository/ProxyFactory/ProxyDomainMapper.php b/src/lib/Repository/ProxyFactory/ProxyDomainMapper.php index 0fe7a5e15c..07f0a81cc4 100644 --- a/src/lib/Repository/ProxyFactory/ProxyDomainMapper.php +++ b/src/lib/Repository/ProxyFactory/ProxyDomainMapper.php @@ -228,5 +228,3 @@ public function createUserProxy(int $userId, array $prioritizedLanguages = Langu return $this->proxyGenerator->createProxy(User::class, $initializer); } } - -class_alias(ProxyDomainMapper::class, 'eZ\Publish\Core\Repository\ProxyFactory\ProxyDomainMapper'); diff --git a/src/lib/Repository/ProxyFactory/ProxyDomainMapperFactory.php b/src/lib/Repository/ProxyFactory/ProxyDomainMapperFactory.php index 1e1e794628..f1c4998ad1 100644 --- a/src/lib/Repository/ProxyFactory/ProxyDomainMapperFactory.php +++ b/src/lib/Repository/ProxyFactory/ProxyDomainMapperFactory.php @@ -28,5 +28,3 @@ public function create(Repository $repository): ProxyDomainMapperInterface return new ProxyDomainMapper($repository, $this->proxyGenerator); } } - -class_alias(ProxyDomainMapperFactory::class, 'eZ\Publish\Core\Repository\ProxyFactory\ProxyDomainMapperFactory'); diff --git a/src/lib/Repository/ProxyFactory/ProxyDomainMapperFactoryInterface.php b/src/lib/Repository/ProxyFactory/ProxyDomainMapperFactoryInterface.php index bf07dc66f9..8b164a8e2d 100644 --- a/src/lib/Repository/ProxyFactory/ProxyDomainMapperFactoryInterface.php +++ b/src/lib/Repository/ProxyFactory/ProxyDomainMapperFactoryInterface.php @@ -16,5 +16,3 @@ interface ProxyDomainMapperFactoryInterface { public function create(Repository $repository): ProxyDomainMapperInterface; } - -class_alias(ProxyDomainMapperFactoryInterface::class, 'eZ\Publish\Core\Repository\ProxyFactory\ProxyDomainMapperFactoryInterface'); diff --git a/src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php b/src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php index f7e641476d..50b707e8d9 100644 --- a/src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php +++ b/src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php @@ -47,5 +47,3 @@ public function createSectionProxy(int $sectionId): Section; public function createUserProxy(int $userId, array $prioritizedLanguages = Language::ALL): User; } - -class_alias(ProxyDomainMapperInterface::class, 'eZ\Publish\Core\Repository\ProxyFactory\ProxyDomainMapperInterface'); diff --git a/src/lib/Repository/ProxyFactory/ProxyGenerator.php b/src/lib/Repository/ProxyFactory/ProxyGenerator.php index 714218507e..06f6911f00 100644 --- a/src/lib/Repository/ProxyFactory/ProxyGenerator.php +++ b/src/lib/Repository/ProxyFactory/ProxyGenerator.php @@ -83,5 +83,3 @@ private function createLazyLoadingValueHolderFactory(): LazyLoadingValueHolderFa return new LazyLoadingValueHolderFactory($config); } } - -class_alias(ProxyGenerator::class, 'eZ\Publish\Core\Repository\ProxyFactory\ProxyGenerator'); diff --git a/src/lib/Repository/ProxyFactory/ProxyGeneratorInterface.php b/src/lib/Repository/ProxyFactory/ProxyGeneratorInterface.php index 668dd1a3a5..6de615ce96 100644 --- a/src/lib/Repository/ProxyFactory/ProxyGeneratorInterface.php +++ b/src/lib/Repository/ProxyFactory/ProxyGeneratorInterface.php @@ -29,5 +29,3 @@ public function createProxy(string $className, Closure $initializer, array $prox public function warmUp(iterable $classes): void; } - -class_alias(ProxyGeneratorInterface::class, 'eZ\Publish\Core\Repository\ProxyFactory\ProxyGeneratorInterface'); diff --git a/src/lib/Repository/Repository.php b/src/lib/Repository/Repository.php index aa9dae0b55..44723db8b6 100644 --- a/src/lib/Repository/Repository.php +++ b/src/lib/Repository/Repository.php @@ -822,5 +822,3 @@ public function rollback(): void } } } - -class_alias(Repository::class, 'eZ\Publish\Core\Repository\Repository'); diff --git a/src/lib/Repository/RoleService.php b/src/lib/Repository/RoleService.php index d6b7cc4373..ba40d09dc3 100644 --- a/src/lib/Repository/RoleService.php +++ b/src/lib/Repository/RoleService.php @@ -1296,5 +1296,3 @@ protected function internalDeletePolicy(APIPolicy $policy): void } } } - -class_alias(RoleService::class, 'eZ\Publish\Core\Repository\RoleService'); diff --git a/src/lib/Repository/SearchService.php b/src/lib/Repository/SearchService.php index a296a7710a..448ce6320c 100644 --- a/src/lib/Repository/SearchService.php +++ b/src/lib/Repository/SearchService.php @@ -351,5 +351,3 @@ public function supports(int $capabilityFlag): bool return false; } } - -class_alias(SearchService::class, 'eZ\Publish\Core\Repository\SearchService'); diff --git a/src/lib/Repository/SectionService.php b/src/lib/Repository/SectionService.php index 287b8b80d9..5f4fd3d475 100644 --- a/src/lib/Repository/SectionService.php +++ b/src/lib/Repository/SectionService.php @@ -456,5 +456,3 @@ protected function buildDomainSectionObject(SPISection $spiSection) ); } } - -class_alias(SectionService::class, 'eZ\Publish\Core\Repository\SectionService'); diff --git a/src/lib/Repository/SettingService.php b/src/lib/Repository/SettingService.php index 79b8514b00..d1a8c477b7 100644 --- a/src/lib/Repository/SettingService.php +++ b/src/lib/Repository/SettingService.php @@ -114,5 +114,3 @@ private function buildSettingDomainObject(SPISetting $setting): Setting ]); } } - -class_alias(SettingService::class, 'eZ\Publish\Core\Repository\SettingService'); diff --git a/src/lib/Repository/SiteAccessAware/Config/IOConfigResolver.php b/src/lib/Repository/SiteAccessAware/Config/IOConfigResolver.php index b71e0fc188..d3e15fe2d7 100644 --- a/src/lib/Repository/SiteAccessAware/Config/IOConfigResolver.php +++ b/src/lib/Repository/SiteAccessAware/Config/IOConfigResolver.php @@ -49,5 +49,3 @@ public function getUrlPrefix(): string return $this->urlPrefix; } } - -class_alias(IOConfigResolver::class, 'eZ\Publish\Core\Repository\SiteAccessAware\Config\IOConfigResolver'); diff --git a/src/lib/Repository/SiteAccessAware/ContentService.php b/src/lib/Repository/SiteAccessAware/ContentService.php index f931f59b1f..07fc7893a3 100644 --- a/src/lib/Repository/SiteAccessAware/ContentService.php +++ b/src/lib/Repository/SiteAccessAware/ContentService.php @@ -305,5 +305,3 @@ public function count(Filter $filter, ?array $languages = null): int ); } } - -class_alias(ContentService::class, 'eZ\Publish\Core\Repository\SiteAccessAware\ContentService'); diff --git a/src/lib/Repository/SiteAccessAware/ContentTypeService.php b/src/lib/Repository/SiteAccessAware/ContentTypeService.php index e13caad382..c173f2c8ee 100644 --- a/src/lib/Repository/SiteAccessAware/ContentTypeService.php +++ b/src/lib/Repository/SiteAccessAware/ContentTypeService.php @@ -222,5 +222,3 @@ public function deleteUserDrafts(int $userId): void $this->service->deleteUserDrafts($userId); } } - -class_alias(ContentTypeService::class, 'eZ\Publish\Core\Repository\SiteAccessAware\ContentTypeService'); diff --git a/src/lib/Repository/SiteAccessAware/Language/AbstractLanguageResolver.php b/src/lib/Repository/SiteAccessAware/Language/AbstractLanguageResolver.php index 196e28894d..27ac737c61 100644 --- a/src/lib/Repository/SiteAccessAware/Language/AbstractLanguageResolver.php +++ b/src/lib/Repository/SiteAccessAware/Language/AbstractLanguageResolver.php @@ -162,5 +162,3 @@ final public function getShowAllTranslations(?bool $forcedShowAllTranslations = return $this->defaultShowAllTranslations; } } - -class_alias(AbstractLanguageResolver::class, 'eZ\Publish\Core\Repository\SiteAccessAware\Language\AbstractLanguageResolver'); diff --git a/src/lib/Repository/SiteAccessAware/Language/LanguageResolver.php b/src/lib/Repository/SiteAccessAware/Language/LanguageResolver.php index d7209632f1..449abd0f71 100644 --- a/src/lib/Repository/SiteAccessAware/Language/LanguageResolver.php +++ b/src/lib/Repository/SiteAccessAware/Language/LanguageResolver.php @@ -33,5 +33,3 @@ protected function getConfiguredLanguages(): array return $this->configLanguages; } } - -class_alias(LanguageResolver::class, 'eZ\Publish\Core\Repository\SiteAccessAware\Language\LanguageResolver'); diff --git a/src/lib/Repository/SiteAccessAware/LanguageService.php b/src/lib/Repository/SiteAccessAware/LanguageService.php index 430479c1d0..d55891f819 100644 --- a/src/lib/Repository/SiteAccessAware/LanguageService.php +++ b/src/lib/Repository/SiteAccessAware/LanguageService.php @@ -92,5 +92,3 @@ public function newLanguageCreateStruct(): LanguageCreateStruct return $this->service->newLanguageCreateStruct(); } } - -class_alias(LanguageService::class, 'eZ\Publish\Core\Repository\SiteAccessAware\LanguageService'); diff --git a/src/lib/Repository/SiteAccessAware/LocationService.php b/src/lib/Repository/SiteAccessAware/LocationService.php index 43e6feb7c9..3dc1d8ddae 100644 --- a/src/lib/Repository/SiteAccessAware/LocationService.php +++ b/src/lib/Repository/SiteAccessAware/LocationService.php @@ -200,5 +200,3 @@ public function count(Filter $filter, ?array $languages = null): int ); } } - -class_alias(LocationService::class, 'eZ\Publish\Core\Repository\SiteAccessAware\LocationService'); diff --git a/src/lib/Repository/SiteAccessAware/NotificationService.php b/src/lib/Repository/SiteAccessAware/NotificationService.php index 203e8d7c9a..031b81b03b 100644 --- a/src/lib/Repository/SiteAccessAware/NotificationService.php +++ b/src/lib/Repository/SiteAccessAware/NotificationService.php @@ -100,5 +100,3 @@ public function createNotification(CreateStruct $createStruct): Notification return $this->service->createNotification($createStruct); } } - -class_alias(NotificationService::class, 'eZ\Publish\Core\Repository\SiteAccessAware\NotificationService'); diff --git a/src/lib/Repository/SiteAccessAware/ObjectStateService.php b/src/lib/Repository/SiteAccessAware/ObjectStateService.php index 710692d4bd..e71c748a45 100644 --- a/src/lib/Repository/SiteAccessAware/ObjectStateService.php +++ b/src/lib/Repository/SiteAccessAware/ObjectStateService.php @@ -163,5 +163,3 @@ public function newObjectStateUpdateStruct(): ObjectStateUpdateStruct return $this->service->newObjectStateUpdateStruct(); } } - -class_alias(ObjectStateService::class, 'eZ\Publish\Core\Repository\SiteAccessAware\ObjectStateService'); diff --git a/src/lib/Repository/SiteAccessAware/Repository.php b/src/lib/Repository/SiteAccessAware/Repository.php index 750ce2adcc..13a2d72a89 100644 --- a/src/lib/Repository/SiteAccessAware/Repository.php +++ b/src/lib/Repository/SiteAccessAware/Repository.php @@ -210,5 +210,3 @@ public function rollback(): void $this->repository->rollback(); } } - -class_alias(Repository::class, 'eZ\Publish\Core\Repository\SiteAccessAware\Repository'); diff --git a/src/lib/Repository/SiteAccessAware/SearchService.php b/src/lib/Repository/SiteAccessAware/SearchService.php index 64b2177377..d19abeaa49 100644 --- a/src/lib/Repository/SiteAccessAware/SearchService.php +++ b/src/lib/Repository/SiteAccessAware/SearchService.php @@ -103,5 +103,3 @@ public function supports(int $capabilityFlag): bool return $this->service->supports($capabilityFlag); } } - -class_alias(SearchService::class, 'eZ\Publish\Core\Repository\SiteAccessAware\SearchService'); diff --git a/src/lib/Repository/SiteAccessAware/SectionService.php b/src/lib/Repository/SiteAccessAware/SectionService.php index 8522a7b58d..47b7fc161a 100644 --- a/src/lib/Repository/SiteAccessAware/SectionService.php +++ b/src/lib/Repository/SiteAccessAware/SectionService.php @@ -96,5 +96,3 @@ public function newSectionUpdateStruct(): SectionUpdateStruct return $this->service->newSectionUpdateStruct(); } } - -class_alias(SectionService::class, 'eZ\Publish\Core\Repository\SiteAccessAware\SectionService'); diff --git a/src/lib/Repository/SiteAccessAware/SettingService.php b/src/lib/Repository/SiteAccessAware/SettingService.php index b8e9dac0b3..91d8932612 100644 --- a/src/lib/Repository/SiteAccessAware/SettingService.php +++ b/src/lib/Repository/SiteAccessAware/SettingService.php @@ -13,5 +13,3 @@ class SettingService extends SettingServiceDecorator { } - -class_alias(SettingService::class, 'eZ\Publish\Core\Repository\SiteAccessAware\SettingService'); diff --git a/src/lib/Repository/SiteAccessAware/TrashService.php b/src/lib/Repository/SiteAccessAware/TrashService.php index 1214e48a77..bce91bb63b 100644 --- a/src/lib/Repository/SiteAccessAware/TrashService.php +++ b/src/lib/Repository/SiteAccessAware/TrashService.php @@ -67,5 +67,3 @@ public function findTrashItems(Query $query): SearchResult return $this->service->findTrashItems($query); } } - -class_alias(TrashService::class, 'eZ\Publish\Core\Repository\SiteAccessAware\TrashService'); diff --git a/src/lib/Repository/SiteAccessAware/URLAliasService.php b/src/lib/Repository/SiteAccessAware/URLAliasService.php index 897490a9ec..d1be047c3c 100644 --- a/src/lib/Repository/SiteAccessAware/URLAliasService.php +++ b/src/lib/Repository/SiteAccessAware/URLAliasService.php @@ -118,5 +118,3 @@ public function deleteCorruptedUrlAliases(): int return $this->service->deleteCorruptedUrlAliases(); } } - -class_alias(URLAliasService::class, 'eZ\Publish\Core\Repository\SiteAccessAware\URLAliasService'); diff --git a/src/lib/Repository/SiteAccessAware/UserService.php b/src/lib/Repository/SiteAccessAware/UserService.php index b9b18efca6..5b04d386e4 100644 --- a/src/lib/Repository/SiteAccessAware/UserService.php +++ b/src/lib/Repository/SiteAccessAware/UserService.php @@ -228,5 +228,3 @@ public function getPasswordInfo(User $user): PasswordInfo return $this->service->getPasswordInfo($user); } } - -class_alias(UserService::class, 'eZ\Publish\Core\Repository\SiteAccessAware\UserService'); diff --git a/src/lib/Repository/Strategy/ContentThumbnail/Field/ContentFieldStrategy.php b/src/lib/Repository/Strategy/ContentThumbnail/Field/ContentFieldStrategy.php index 271074bc5d..a740210302 100644 --- a/src/lib/Repository/Strategy/ContentThumbnail/Field/ContentFieldStrategy.php +++ b/src/lib/Repository/Strategy/ContentThumbnail/Field/ContentFieldStrategy.php @@ -78,5 +78,3 @@ public function setStrategies(array $thumbnailStrategies): void } } } - -class_alias(ContentFieldStrategy::class, 'eZ\Publish\Core\Repository\Strategy\ContentThumbnail\Field\ContentFieldStrategy'); diff --git a/src/lib/Repository/Strategy/ContentThumbnail/FirstMatchingFieldStrategy.php b/src/lib/Repository/Strategy/ContentThumbnail/FirstMatchingFieldStrategy.php index 07acac5abe..a2e30f0786 100644 --- a/src/lib/Repository/Strategy/ContentThumbnail/FirstMatchingFieldStrategy.php +++ b/src/lib/Repository/Strategy/ContentThumbnail/FirstMatchingFieldStrategy.php @@ -69,5 +69,3 @@ private function getFieldByIdentifier(string $identifier, array $fields): ?Field return null; } } - -class_alias(FirstMatchingFieldStrategy::class, 'eZ\Publish\Core\Repository\Strategy\ContentThumbnail\FirstMatchingFieldStrategy'); diff --git a/src/lib/Repository/Strategy/ContentThumbnail/StaticStrategy.php b/src/lib/Repository/Strategy/ContentThumbnail/StaticStrategy.php index 309952a438..baa837726c 100644 --- a/src/lib/Repository/Strategy/ContentThumbnail/StaticStrategy.php +++ b/src/lib/Repository/Strategy/ContentThumbnail/StaticStrategy.php @@ -30,5 +30,3 @@ public function getThumbnail(ContentType $contentType, array $fields, ?VersionIn ]); } } - -class_alias(StaticStrategy::class, 'eZ\Publish\Core\Repository\Strategy\ContentThumbnail\StaticStrategy'); diff --git a/src/lib/Repository/Strategy/ContentThumbnail/ThumbnailChainStrategy.php b/src/lib/Repository/Strategy/ContentThumbnail/ThumbnailChainStrategy.php index 71a36ab186..4c19a6323f 100644 --- a/src/lib/Repository/Strategy/ContentThumbnail/ThumbnailChainStrategy.php +++ b/src/lib/Repository/Strategy/ContentThumbnail/ThumbnailChainStrategy.php @@ -39,5 +39,3 @@ public function getThumbnail(ContentType $contentType, array $fields, ?VersionIn return null; } } - -class_alias(ThumbnailChainStrategy::class, 'eZ\Publish\Core\Repository\Strategy\ContentThumbnail\ThumbnailChainStrategy'); diff --git a/src/lib/Repository/Strategy/ContentValidator/ContentValidatorStrategy.php b/src/lib/Repository/Strategy/ContentValidator/ContentValidatorStrategy.php index 9b654ce827..4281c7b6c6 100644 --- a/src/lib/Repository/Strategy/ContentValidator/ContentValidatorStrategy.php +++ b/src/lib/Repository/Strategy/ContentValidator/ContentValidatorStrategy.php @@ -81,5 +81,3 @@ private function mergeErrors( return $fieldErrors; } } - -class_alias(ContentValidatorStrategy::class, 'eZ\Publish\Core\Repository\Strategy\ContentValidator\ContentValidatorStrategy'); diff --git a/src/lib/Repository/TrashService.php b/src/lib/Repository/TrashService.php index e32a0cea27..528eac9cad 100644 --- a/src/lib/Repository/TrashService.php +++ b/src/lib/Repository/TrashService.php @@ -437,5 +437,3 @@ private function userHasPermissionsToRemove(ContentInfo $contentInfo, Location $ return $result->totalCount == 0; } } - -class_alias(TrashService::class, 'eZ\Publish\Core\Repository\TrashService'); diff --git a/src/lib/Repository/URLAliasService.php b/src/lib/Repository/URLAliasService.php index fb342f58cf..350af54bb3 100644 --- a/src/lib/Repository/URLAliasService.php +++ b/src/lib/Repository/URLAliasService.php @@ -837,5 +837,3 @@ protected function buildUrlAliasDomainObject(SPIURLAlias $spiUrlAlias, string $p ); } } - -class_alias(URLAliasService::class, 'eZ\Publish\Core\Repository\URLAliasService'); diff --git a/src/lib/Repository/URLService.php b/src/lib/Repository/URLService.php index 4ad6f0d350..b3c060d9f8 100644 --- a/src/lib/Repository/URLService.php +++ b/src/lib/Repository/URLService.php @@ -264,5 +264,3 @@ private function createDateTime(?int $timestamp): ?DateTimeInterface return null; } } - -class_alias(URLService::class, 'eZ\Publish\Core\Repository\URLService'); diff --git a/src/lib/Repository/URLWildcardService.php b/src/lib/Repository/URLWildcardService.php index f3c258d75d..ba998af10f 100644 --- a/src/lib/Repository/URLWildcardService.php +++ b/src/lib/Repository/URLWildcardService.php @@ -329,5 +329,3 @@ private function validateUrls(string $sourceUrl, string $destinationUrl): void } } } - -class_alias(URLWildcardService::class, 'eZ\Publish\Core\Repository\URLWildcardService'); diff --git a/src/lib/Repository/User/Exception/UnsupportedPasswordHashType.php b/src/lib/Repository/User/Exception/UnsupportedPasswordHashType.php index 3dc3603397..104a3cf7ce 100644 --- a/src/lib/Repository/User/Exception/UnsupportedPasswordHashType.php +++ b/src/lib/Repository/User/Exception/UnsupportedPasswordHashType.php @@ -17,5 +17,3 @@ public function __construct(int $hashType) parent::__construct('hashType', "Password hash type '$hashType' is not recognized"); } } - -class_alias(UnsupportedPasswordHashType::class, 'eZ\Publish\Core\Repository\User\Exception\UnsupportedPasswordHashType'); diff --git a/src/lib/Repository/User/PasswordHashService.php b/src/lib/Repository/User/PasswordHashService.php index 7e9be884dc..f0bebb85dd 100644 --- a/src/lib/Repository/User/PasswordHashService.php +++ b/src/lib/Repository/User/PasswordHashService.php @@ -76,5 +76,3 @@ public function isValidPassword( return $passwordHash === $this->createPasswordHash($plainPassword, $hashType); } } - -class_alias(PasswordHashService::class, 'eZ\Publish\Core\Repository\User\PasswordHashService'); diff --git a/src/lib/Repository/User/PasswordHashServiceInterface.php b/src/lib/Repository/User/PasswordHashServiceInterface.php index 3579da390e..9d23de7744 100644 --- a/src/lib/Repository/User/PasswordHashServiceInterface.php +++ b/src/lib/Repository/User/PasswordHashServiceInterface.php @@ -17,5 +17,3 @@ interface PasswordHashServiceInterface extends PasswordHashService { } - -class_alias(PasswordHashServiceInterface::class, 'eZ\Publish\Core\Repository\User\PasswordHashServiceInterface'); diff --git a/src/lib/Repository/User/PasswordValidator.php b/src/lib/Repository/User/PasswordValidator.php index 6556c38ff0..c5d496f1d2 100644 --- a/src/lib/Repository/User/PasswordValidator.php +++ b/src/lib/Repository/User/PasswordValidator.php @@ -115,5 +115,3 @@ private function userPasswordIsTheSame(string $password, APIUser $user): bool ); } } - -class_alias(PasswordValidator::class, 'eZ\Publish\Core\Repository\User\PasswordValidator'); diff --git a/src/lib/Repository/User/PasswordValidatorInterface.php b/src/lib/Repository/User/PasswordValidatorInterface.php index 0ed961f324..15a57078fa 100644 --- a/src/lib/Repository/User/PasswordValidatorInterface.php +++ b/src/lib/Repository/User/PasswordValidatorInterface.php @@ -28,5 +28,3 @@ public function validatePassword( public function getPasswordInfo(User $user, FieldDefinition $fieldDefinition): PasswordInfo; } - -class_alias(PasswordValidatorInterface::class, 'eZ\Publish\Core\Repository\User\PasswordValidatorInterface'); diff --git a/src/lib/Repository/UserPreferenceService.php b/src/lib/Repository/UserPreferenceService.php index 4e4fec9ee4..e7af68563f 100644 --- a/src/lib/Repository/UserPreferenceService.php +++ b/src/lib/Repository/UserPreferenceService.php @@ -146,5 +146,3 @@ private function getCurrentUserId(): int ->getUserId(); } } - -class_alias(UserPreferenceService::class, 'eZ\Publish\Core\Repository\UserPreferenceService'); diff --git a/src/lib/Repository/UserService.php b/src/lib/Repository/UserService.php index b97730535d..1903d15215 100644 --- a/src/lib/Repository/UserService.php +++ b/src/lib/Repository/UserService.php @@ -1413,5 +1413,3 @@ private function getUserContentTypeIdentifiers(): array return $this->configResolver->getParameter('user_content_type_identifier'); } } - -class_alias(UserService::class, 'eZ\Publish\Core\Repository\UserService'); diff --git a/src/lib/Repository/Validator/ContentCreateStructValidator.php b/src/lib/Repository/Validator/ContentCreateStructValidator.php index 7714c5ff21..2f69e7d5de 100644 --- a/src/lib/Repository/Validator/ContentCreateStructValidator.php +++ b/src/lib/Repository/Validator/ContentCreateStructValidator.php @@ -99,5 +99,3 @@ public function validate( return $allFieldErrors; } } - -class_alias(ContentCreateStructValidator::class, 'eZ\Publish\Core\Repository\Validator\ContentCreateStructValidator'); diff --git a/src/lib/Repository/Validator/ContentUpdateStructValidator.php b/src/lib/Repository/Validator/ContentUpdateStructValidator.php index b0bf1630de..4c49c84c31 100644 --- a/src/lib/Repository/Validator/ContentUpdateStructValidator.php +++ b/src/lib/Repository/Validator/ContentUpdateStructValidator.php @@ -136,5 +136,3 @@ public function validate( return $allFieldErrors; } } - -class_alias(ContentUpdateStructValidator::class, 'eZ\Publish\Core\Repository\Validator\ContentUpdateStructValidator'); diff --git a/src/lib/Repository/Validator/UserPasswordValidator.php b/src/lib/Repository/Validator/UserPasswordValidator.php index c1aa1cc67c..a802df09ef 100644 --- a/src/lib/Repository/Validator/UserPasswordValidator.php +++ b/src/lib/Repository/Validator/UserPasswordValidator.php @@ -201,5 +201,3 @@ private function createValidationError(string $message, array $values = []): Val return new ValidationError($message, null, $values, 'password'); } } - -class_alias(UserPasswordValidator::class, 'eZ\Publish\Core\Repository\Validator\UserPasswordValidator'); diff --git a/src/lib/Repository/Validator/VersionValidator.php b/src/lib/Repository/Validator/VersionValidator.php index 7057780bc1..231addad70 100644 --- a/src/lib/Repository/Validator/VersionValidator.php +++ b/src/lib/Repository/Validator/VersionValidator.php @@ -101,5 +101,3 @@ public function validate( return $allFieldErrors; } } - -class_alias(VersionValidator::class, 'eZ\Publish\Core\Repository\Validator\VersionValidator'); diff --git a/src/lib/Repository/Values/Content/Content.php b/src/lib/Repository/Values/Content/Content.php index 361ac6bb3c..0cc1e2d534 100644 --- a/src/lib/Repository/Values/Content/Content.php +++ b/src/lib/Repository/Values/Content/Content.php @@ -212,5 +212,3 @@ public function __isset($property) return parent::__isset($property); } } - -class_alias(Content::class, 'eZ\Publish\Core\Repository\Values\Content\Content'); diff --git a/src/lib/Repository/Values/Content/ContentCreateStruct.php b/src/lib/Repository/Values/Content/ContentCreateStruct.php index 2acd312d1f..60342522d0 100644 --- a/src/lib/Repository/Values/Content/ContentCreateStruct.php +++ b/src/lib/Repository/Values/Content/ContentCreateStruct.php @@ -54,5 +54,3 @@ public function setField(string $fieldDefIdentifier, $value, ?string $language = ); } } - -class_alias(ContentCreateStruct::class, 'eZ\Publish\Core\Repository\Values\Content\ContentCreateStruct'); diff --git a/src/lib/Repository/Values/Content/ContentUpdateStruct.php b/src/lib/Repository/Values/Content/ContentUpdateStruct.php index aed90dd745..3d007834e3 100644 --- a/src/lib/Repository/Values/Content/ContentUpdateStruct.php +++ b/src/lib/Repository/Values/Content/ContentUpdateStruct.php @@ -48,5 +48,3 @@ public function setField(string $fieldDefIdentifier, $value, ?string $language = ); } } - -class_alias(ContentUpdateStruct::class, 'eZ\Publish\Core\Repository\Values\Content\ContentUpdateStruct'); diff --git a/src/lib/Repository/Values/Content/Location.php b/src/lib/Repository/Values/Content/Location.php index 4b5caf6b1f..73e6e513e6 100644 --- a/src/lib/Repository/Values/Content/Location.php +++ b/src/lib/Repository/Values/Content/Location.php @@ -91,5 +91,3 @@ public function __isset($property) return parent::__isset($property); } } - -class_alias(Location::class, 'eZ\Publish\Core\Repository\Values\Content\Location'); diff --git a/src/lib/Repository/Values/Content/Query/Criterion/PermissionSubtree.php b/src/lib/Repository/Values/Content/Query/Criterion/PermissionSubtree.php index cb8108fb55..3a1506aa29 100644 --- a/src/lib/Repository/Values/Content/Query/Criterion/PermissionSubtree.php +++ b/src/lib/Repository/Values/Content/Query/Criterion/PermissionSubtree.php @@ -33,5 +33,3 @@ public static function createFromQueryBuilder($target, $operator, $value) return new self($value); } } - -class_alias(PermissionSubtree::class, 'eZ\Publish\Core\Repository\Values\Content\Query\Criterion\PermissionSubtree'); diff --git a/src/lib/Repository/Values/Content/Relation.php b/src/lib/Repository/Values/Content/Relation.php index 853c2eab6c..87c159d9d6 100644 --- a/src/lib/Repository/Values/Content/Relation.php +++ b/src/lib/Repository/Values/Content/Relation.php @@ -58,5 +58,3 @@ public function getDestinationContentInfo(): APIContentInfo return $this->destinationContentInfo; } } - -class_alias(Relation::class, 'eZ\Publish\Core\Repository\Values\Content\Relation'); diff --git a/src/lib/Repository/Values/Content/TrashItem.php b/src/lib/Repository/Values/Content/TrashItem.php index 0c0bc1e30e..cd3f158fc9 100644 --- a/src/lib/Repository/Values/Content/TrashItem.php +++ b/src/lib/Repository/Values/Content/TrashItem.php @@ -103,5 +103,3 @@ public function __isset($property) return parent::__isset($property); } } - -class_alias(TrashItem::class, 'eZ\Publish\Core\Repository\Values\Content\TrashItem'); diff --git a/src/lib/Repository/Values/Content/VersionInfo.php b/src/lib/Repository/Values/Content/VersionInfo.php index 0cf535d6d0..f7dabeb29a 100644 --- a/src/lib/Repository/Values/Content/VersionInfo.php +++ b/src/lib/Repository/Values/Content/VersionInfo.php @@ -117,5 +117,3 @@ public function getName($languageCode = null) return $this->names[$this->initialLanguageCode]; } } - -class_alias(VersionInfo::class, 'eZ\Publish\Core\Repository\Values\Content\VersionInfo'); diff --git a/src/lib/Repository/Values/ContentType/ContentType.php b/src/lib/Repository/Values/ContentType/ContentType.php index e4dfca7a65..b9c8f02e97 100644 --- a/src/lib/Repository/Values/ContentType/ContentType.php +++ b/src/lib/Repository/Values/ContentType/ContentType.php @@ -83,5 +83,3 @@ public function getFieldDefinitions(): APIFieldDefinitionCollection return $this->fieldDefinitions; } } - -class_alias(ContentType::class, 'eZ\Publish\Core\Repository\Values\ContentType\ContentType'); diff --git a/src/lib/Repository/Values/ContentType/ContentTypeCreateStruct.php b/src/lib/Repository/Values/ContentType/ContentTypeCreateStruct.php index 0bff232008..5d89fc9c28 100644 --- a/src/lib/Repository/Values/ContentType/ContentTypeCreateStruct.php +++ b/src/lib/Repository/Values/ContentType/ContentTypeCreateStruct.php @@ -36,5 +36,3 @@ public function addFieldDefinition(FieldDefinitionCreateStruct $fieldDef): void $this->fieldDefinitions[] = $fieldDef; } } - -class_alias(ContentTypeCreateStruct::class, 'eZ\Publish\Core\Repository\Values\ContentType\ContentTypeCreateStruct'); diff --git a/src/lib/Repository/Values/ContentType/ContentTypeDraft.php b/src/lib/Repository/Values/ContentType/ContentTypeDraft.php index e59bdd8b9c..59aaa4d332 100644 --- a/src/lib/Repository/Values/ContentType/ContentTypeDraft.php +++ b/src/lib/Repository/Values/ContentType/ContentTypeDraft.php @@ -150,5 +150,3 @@ public function hasFieldDefinition(string $fieldDefinitionIdentifier): bool return $this->innerContentType->hasFieldDefinition($fieldDefinitionIdentifier); } } - -class_alias(ContentTypeDraft::class, 'eZ\Publish\Core\Repository\Values\ContentType\ContentTypeDraft'); diff --git a/src/lib/Repository/Values/ContentType/ContentTypeGroup.php b/src/lib/Repository/Values/ContentType/ContentTypeGroup.php index d35cb0c18e..6958a224b6 100644 --- a/src/lib/Repository/Values/ContentType/ContentTypeGroup.php +++ b/src/lib/Repository/Values/ContentType/ContentTypeGroup.php @@ -33,5 +33,3 @@ class ContentTypeGroup extends APIContentTypeGroup use MultiLanguageNameTrait; use MultiLanguageDescriptionTrait; } - -class_alias(ContentTypeGroup::class, 'eZ\Publish\Core\Repository\Values\ContentType\ContentTypeGroup'); diff --git a/src/lib/Repository/Values/ContentType/FieldDefinition.php b/src/lib/Repository/Values/ContentType/FieldDefinition.php index 147edec376..4d478d9037 100644 --- a/src/lib/Repository/Values/ContentType/FieldDefinition.php +++ b/src/lib/Repository/Values/ContentType/FieldDefinition.php @@ -73,5 +73,3 @@ public function getFieldSettings(): array return $this->fieldSettings; } } - -class_alias(FieldDefinition::class, 'eZ\Publish\Core\Repository\Values\ContentType\FieldDefinition'); diff --git a/src/lib/Repository/Values/ContentType/FieldDefinitionCollection.php b/src/lib/Repository/Values/ContentType/FieldDefinitionCollection.php index 31a6b7035f..f2bbdecd96 100644 --- a/src/lib/Repository/Values/ContentType/FieldDefinitionCollection.php +++ b/src/lib/Repository/Values/ContentType/FieldDefinitionCollection.php @@ -193,5 +193,3 @@ public function offsetUnset($offset): void throw new BadMethodCallException(self::class . ' is read-only!'); } } - -class_alias(FieldDefinitionCollection::class, 'eZ\Publish\Core\Repository\Values\ContentType\FieldDefinitionCollection'); diff --git a/src/lib/Repository/Values/ContentType/FieldType.php b/src/lib/Repository/Values/ContentType/FieldType.php index 2d29dd6085..73892d38c4 100644 --- a/src/lib/Repository/Values/ContentType/FieldType.php +++ b/src/lib/Repository/Values/ContentType/FieldType.php @@ -297,5 +297,3 @@ public function validateValue(APIFieldDefinition $fieldDef, Value $value): itera return $this->internalFieldType->validate($fieldDef, $value); } } - -class_alias(FieldType::class, 'eZ\Publish\Core\Repository\Values\ContentType\FieldType'); diff --git a/src/lib/Repository/Values/MultiLanguageDescriptionTrait.php b/src/lib/Repository/Values/MultiLanguageDescriptionTrait.php index d311382304..ab54a9e2d6 100644 --- a/src/lib/Repository/Values/MultiLanguageDescriptionTrait.php +++ b/src/lib/Repository/Values/MultiLanguageDescriptionTrait.php @@ -47,5 +47,3 @@ public function getDescription($languageCode = null) : reset($this->descriptions); } } - -class_alias(MultiLanguageDescriptionTrait::class, 'eZ\Publish\Core\Repository\Values\MultiLanguageDescriptionTrait'); diff --git a/src/lib/Repository/Values/MultiLanguageNameTrait.php b/src/lib/Repository/Values/MultiLanguageNameTrait.php index c9f83abd89..087d4b6f21 100644 --- a/src/lib/Repository/Values/MultiLanguageNameTrait.php +++ b/src/lib/Repository/Values/MultiLanguageNameTrait.php @@ -47,5 +47,3 @@ public function getName($languageCode = null) : reset($this->names); } } - -class_alias(MultiLanguageNameTrait::class, 'eZ\Publish\Core\Repository\Values\MultiLanguageNameTrait'); diff --git a/src/lib/Repository/Values/MultiLanguageTrait.php b/src/lib/Repository/Values/MultiLanguageTrait.php index 0cbe5990d1..0ac9726a82 100644 --- a/src/lib/Repository/Values/MultiLanguageTrait.php +++ b/src/lib/Repository/Values/MultiLanguageTrait.php @@ -26,5 +26,3 @@ trait MultiLanguageTrait */ protected $prioritizedLanguages = []; } - -class_alias(MultiLanguageTrait::class, 'eZ\Publish\Core\Repository\Values\MultiLanguageTrait'); diff --git a/src/lib/Repository/Values/ObjectState/ObjectState.php b/src/lib/Repository/Values/ObjectState/ObjectState.php index b9b8941135..dd9c1708dd 100644 --- a/src/lib/Repository/Values/ObjectState/ObjectState.php +++ b/src/lib/Repository/Values/ObjectState/ObjectState.php @@ -87,5 +87,3 @@ public function __isset($property) return parent::__isset($property); } } - -class_alias(ObjectState::class, 'eZ\Publish\Core\Repository\Values\ObjectState\ObjectState'); diff --git a/src/lib/Repository/Values/ObjectState/ObjectStateGroup.php b/src/lib/Repository/Values/ObjectState/ObjectStateGroup.php index 1c5c28451d..c98d77dd38 100644 --- a/src/lib/Repository/Values/ObjectState/ObjectStateGroup.php +++ b/src/lib/Repository/Values/ObjectState/ObjectStateGroup.php @@ -65,5 +65,3 @@ public function __isset($property) return parent::__isset($property); } } - -class_alias(ObjectStateGroup::class, 'eZ\Publish\Core\Repository\Values\ObjectState\ObjectStateGroup'); diff --git a/src/lib/Repository/Values/User/Policy.php b/src/lib/Repository/Values/User/Policy.php index 5011b41c9d..66f39aeb7d 100644 --- a/src/lib/Repository/Values/User/Policy.php +++ b/src/lib/Repository/Values/User/Policy.php @@ -34,5 +34,3 @@ public function getLimitations(): iterable return $this->limitations; } } - -class_alias(Policy::class, 'eZ\Publish\Core\Repository\Values\User\Policy'); diff --git a/src/lib/Repository/Values/User/PolicyCreateStruct.php b/src/lib/Repository/Values/User/PolicyCreateStruct.php index 98dc802905..b2174c3396 100644 --- a/src/lib/Repository/Values/User/PolicyCreateStruct.php +++ b/src/lib/Repository/Values/User/PolicyCreateStruct.php @@ -46,5 +46,3 @@ public function addLimitation(Limitation $limitation): void $this->limitations[$limitationIdentifier] = $limitation; } } - -class_alias(PolicyCreateStruct::class, 'eZ\Publish\Core\Repository\Values\User\PolicyCreateStruct'); diff --git a/src/lib/Repository/Values/User/PolicyDraft.php b/src/lib/Repository/Values/User/PolicyDraft.php index 66b8d97889..7bf74b2049 100644 --- a/src/lib/Repository/Values/User/PolicyDraft.php +++ b/src/lib/Repository/Values/User/PolicyDraft.php @@ -62,5 +62,3 @@ public function getLimitations(): iterable return $this->innerPolicy->getLimitations(); } } - -class_alias(PolicyDraft::class, 'eZ\Publish\Core\Repository\Values\User\PolicyDraft'); diff --git a/src/lib/Repository/Values/User/PolicyUpdateStruct.php b/src/lib/Repository/Values/User/PolicyUpdateStruct.php index 45d50b85dd..a0cb5395ea 100644 --- a/src/lib/Repository/Values/User/PolicyUpdateStruct.php +++ b/src/lib/Repository/Values/User/PolicyUpdateStruct.php @@ -47,5 +47,3 @@ public function addLimitation(Limitation $limitation): void $this->limitations[$limitationIdentifier] = $limitation; } } - -class_alias(PolicyUpdateStruct::class, 'eZ\Publish\Core\Repository\Values\User\PolicyUpdateStruct'); diff --git a/src/lib/Repository/Values/User/Role.php b/src/lib/Repository/Values/User/Role.php index 4f56f7fbfb..3e1aef2db9 100644 --- a/src/lib/Repository/Values/User/Role.php +++ b/src/lib/Repository/Values/User/Role.php @@ -35,5 +35,3 @@ public function getPolicies(): iterable return $this->policies; } } - -class_alias(Role::class, 'eZ\Publish\Core\Repository\Values\User\Role'); diff --git a/src/lib/Repository/Values/User/RoleCopyStruct.php b/src/lib/Repository/Values/User/RoleCopyStruct.php index cc4812590e..42f26683fd 100644 --- a/src/lib/Repository/Values/User/RoleCopyStruct.php +++ b/src/lib/Repository/Values/User/RoleCopyStruct.php @@ -45,5 +45,3 @@ public function addPolicy(APIPolicyCreateStruct $policyCreateStruct): void $this->policies[] = $policyCreateStruct; } } - -class_alias(RoleCopyStruct::class, 'eZ\Publish\Core\Repository\Values\User\RoleCopyStruct'); diff --git a/src/lib/Repository/Values/User/RoleCreateStruct.php b/src/lib/Repository/Values/User/RoleCreateStruct.php index da5c69ef9b..477b7c1c0f 100644 --- a/src/lib/Repository/Values/User/RoleCreateStruct.php +++ b/src/lib/Repository/Values/User/RoleCreateStruct.php @@ -45,5 +45,3 @@ public function addPolicy(APIPolicyCreateStruct $policyCreateStruct): void $this->policies[] = $policyCreateStruct; } } - -class_alias(RoleCreateStruct::class, 'eZ\Publish\Core\Repository\Values\User\RoleCreateStruct'); diff --git a/src/lib/Repository/Values/User/RoleDraft.php b/src/lib/Repository/Values/User/RoleDraft.php index e064fbf04f..a3adebb96b 100644 --- a/src/lib/Repository/Values/User/RoleDraft.php +++ b/src/lib/Repository/Values/User/RoleDraft.php @@ -71,5 +71,3 @@ public function getPolicies(): iterable return $this->innerRole->getPolicies(); } } - -class_alias(RoleDraft::class, 'eZ\Publish\Core\Repository\Values\User\RoleDraft'); diff --git a/src/lib/Repository/Values/User/User.php b/src/lib/Repository/Values/User/User.php index 8f757e0cb7..93385b1e15 100644 --- a/src/lib/Repository/Values/User/User.php +++ b/src/lib/Repository/Values/User/User.php @@ -194,5 +194,3 @@ public function getDefaultLanguageCode(): string return $this->content->getDefaultLanguageCode(); } } - -class_alias(User::class, 'eZ\Publish\Core\Repository\Values\User\User'); diff --git a/src/lib/Repository/Values/User/UserCreateStruct.php b/src/lib/Repository/Values/User/UserCreateStruct.php index e2426f53ef..a6bd53fbe6 100644 --- a/src/lib/Repository/Values/User/UserCreateStruct.php +++ b/src/lib/Repository/Values/User/UserCreateStruct.php @@ -52,5 +52,3 @@ public function setField(string $fieldDefIdentifier, $value, ?string $language = ); } } - -class_alias(UserCreateStruct::class, 'eZ\Publish\Core\Repository\Values\User\UserCreateStruct'); diff --git a/src/lib/Repository/Values/User/UserGroup.php b/src/lib/Repository/Values/User/UserGroup.php index 44e75313da..6463d846c7 100644 --- a/src/lib/Repository/Values/User/UserGroup.php +++ b/src/lib/Repository/Values/User/UserGroup.php @@ -194,5 +194,3 @@ public function getDefaultLanguageCode(): string return $this->content->getDefaultLanguageCode(); } } - -class_alias(UserGroup::class, 'eZ\Publish\Core\Repository\Values\User\UserGroup'); diff --git a/src/lib/Repository/Values/User/UserGroupCreateStruct.php b/src/lib/Repository/Values/User/UserGroupCreateStruct.php index 60fd8a186a..f0508b3191 100644 --- a/src/lib/Repository/Values/User/UserGroupCreateStruct.php +++ b/src/lib/Repository/Values/User/UserGroupCreateStruct.php @@ -52,5 +52,3 @@ public function setField(string $fieldDefIdentifier, $value, ?string $language = ); } } - -class_alias(UserGroupCreateStruct::class, 'eZ\Publish\Core\Repository\Values\User\UserGroupCreateStruct'); diff --git a/src/lib/Repository/Values/User/UserGroupRoleAssignment.php b/src/lib/Repository/Values/User/UserGroupRoleAssignment.php index c4ee510ef3..95a23ad255 100644 --- a/src/lib/Repository/Values/User/UserGroupRoleAssignment.php +++ b/src/lib/Repository/Values/User/UserGroupRoleAssignment.php @@ -71,5 +71,3 @@ public function getUserGroup(): APIUserGroup return $this->userGroup; } } - -class_alias(UserGroupRoleAssignment::class, 'eZ\Publish\Core\Repository\Values\User\UserGroupRoleAssignment'); diff --git a/src/lib/Repository/Values/User/UserReference.php b/src/lib/Repository/Values/User/UserReference.php index b32061efa7..0a0aba4027 100644 --- a/src/lib/Repository/Values/User/UserReference.php +++ b/src/lib/Repository/Values/User/UserReference.php @@ -35,5 +35,3 @@ public function getUserId(): int return $this->userId; } } - -class_alias(UserReference::class, 'eZ\Publish\Core\Repository\Values\User\UserReference'); diff --git a/src/lib/Repository/Values/User/UserRoleAssignment.php b/src/lib/Repository/Values/User/UserRoleAssignment.php index c0fad74654..f573e43bb8 100644 --- a/src/lib/Repository/Values/User/UserRoleAssignment.php +++ b/src/lib/Repository/Values/User/UserRoleAssignment.php @@ -71,5 +71,3 @@ public function getUser(): APIUser return $this->user; } } - -class_alias(UserRoleAssignment::class, 'eZ\Publish\Core\Repository\Values\User\UserRoleAssignment'); diff --git a/src/lib/Search/Common/BackgroundIndexer.php b/src/lib/Search/Common/BackgroundIndexer.php index 9f6b6c37c7..9cb3af239a 100644 --- a/src/lib/Search/Common/BackgroundIndexer.php +++ b/src/lib/Search/Common/BackgroundIndexer.php @@ -46,5 +46,3 @@ public function registerContent(ContentInfo $contentInfo); */ public function registerLocation(Location $location); } - -class_alias(BackgroundIndexer::class, 'eZ\Publish\Core\Search\Common\BackgroundIndexer'); diff --git a/src/lib/Search/Common/BackgroundIndexer/NullIndexer.php b/src/lib/Search/Common/BackgroundIndexer/NullIndexer.php index 00dad284f4..4792df9b5d 100644 --- a/src/lib/Search/Common/BackgroundIndexer/NullIndexer.php +++ b/src/lib/Search/Common/BackgroundIndexer/NullIndexer.php @@ -24,5 +24,3 @@ public function registerLocation(Location $location) { } } - -class_alias(NullIndexer::class, 'eZ\Publish\Core\Search\Common\BackgroundIndexer\NullIndexer'); diff --git a/src/lib/Search/Common/EventSubscriber/AbstractSearchEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/AbstractSearchEventSubscriber.php index deeabedd6f..78ae7a695a 100644 --- a/src/lib/Search/Common/EventSubscriber/AbstractSearchEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/AbstractSearchEventSubscriber.php @@ -60,5 +60,3 @@ public function indexSubtree(int $locationId): void } } } - -class_alias(AbstractSearchEventSubscriber::class, 'eZ\Publish\Core\Search\Common\EventSubscriber\AbstractSearchEventSubscriber'); diff --git a/src/lib/Search/Common/EventSubscriber/ContentEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/ContentEventSubscriber.php index 032179b589..b8d940d241 100644 --- a/src/lib/Search/Common/EventSubscriber/ContentEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/ContentEventSubscriber.php @@ -132,5 +132,3 @@ public function onUpdateContentMetadata(UpdateContentMetadataEvent $event) $this->searchHandler->indexLocation($this->persistenceHandler->locationHandler()->load($contentInfo->mainLocationId)); } } - -class_alias(ContentEventSubscriber::class, 'eZ\Publish\Core\Search\Common\EventSubscriber\ContentEventSubscriber'); diff --git a/src/lib/Search/Common/EventSubscriber/LocationEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/LocationEventSubscriber.php index 62fabd52c8..37ba9c7e45 100644 --- a/src/lib/Search/Common/EventSubscriber/LocationEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/LocationEventSubscriber.php @@ -132,5 +132,3 @@ public function onAssignSectionToSubtree(AssignSectionToSubtreeEvent $event): vo $this->indexSubtree($event->getLocation()->id); } } - -class_alias(LocationEventSubscriber::class, 'eZ\Publish\Core\Search\Common\EventSubscriber\LocationEventSubscriber'); diff --git a/src/lib/Search/Common/EventSubscriber/ObjectStateEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/ObjectStateEventSubscriber.php index 46b6e5b593..b679eeb487 100644 --- a/src/lib/Search/Common/EventSubscriber/ObjectStateEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/ObjectStateEventSubscriber.php @@ -36,5 +36,3 @@ public function onSetContentState(SetContentStateEvent $event) } } } - -class_alias(ObjectStateEventSubscriber::class, 'eZ\Publish\Core\Search\Common\EventSubscriber\ObjectStateEventSubscriber'); diff --git a/src/lib/Search/Common/EventSubscriber/SectionEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/SectionEventSubscriber.php index 67b2800dc5..22ea6630b7 100644 --- a/src/lib/Search/Common/EventSubscriber/SectionEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/SectionEventSubscriber.php @@ -27,5 +27,3 @@ public function onAssignSection(AssignSectionEvent $event) ); } } - -class_alias(SectionEventSubscriber::class, 'eZ\Publish\Core\Search\Common\EventSubscriber\SectionEventSubscriber'); diff --git a/src/lib/Search/Common/EventSubscriber/TrashEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/TrashEventSubscriber.php index ef2b64a9f1..dfc798bbc6 100644 --- a/src/lib/Search/Common/EventSubscriber/TrashEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/TrashEventSubscriber.php @@ -74,5 +74,3 @@ public function onEmptyTrashEvent(EmptyTrashEvent $event): void } } } - -class_alias(TrashEventSubscriber::class, 'eZ\Publish\Core\Search\Common\EventSubscriber\TrashEventSubscriber'); diff --git a/src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php index 959da4c0b9..2a1c880622 100644 --- a/src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php @@ -200,5 +200,3 @@ private function indexUserContentWithLocation(AfterEvent $event): void } } } - -class_alias(UserEventSubscriber::class, 'eZ\Publish\Core\Search\Common\EventSubscriber\UserEventSubscriber'); diff --git a/src/lib/Search/Common/FieldNameGenerator.php b/src/lib/Search/Common/FieldNameGenerator.php index 45e7010450..7c343ff9b5 100644 --- a/src/lib/Search/Common/FieldNameGenerator.php +++ b/src/lib/Search/Common/FieldNameGenerator.php @@ -81,5 +81,3 @@ public function getTypedName(string $name, FieldType $type): string return $name . '_' . $typeName; } } - -class_alias(FieldNameGenerator::class, 'eZ\Publish\Core\Search\Common\FieldNameGenerator'); diff --git a/src/lib/Search/Common/FieldNameResolver.php b/src/lib/Search/Common/FieldNameResolver.php index b4476d74d8..890df87213 100644 --- a/src/lib/Search/Common/FieldNameResolver.php +++ b/src/lib/Search/Common/FieldNameResolver.php @@ -314,5 +314,3 @@ public function getAggregationFieldName( return reset($fieldName); } } - -class_alias(FieldNameResolver::class, 'eZ\Publish\Core\Search\Common\FieldNameResolver'); diff --git a/src/lib/Search/Common/FieldRegistry.php b/src/lib/Search/Common/FieldRegistry.php index 45e8c412b7..3caa0b1fcc 100644 --- a/src/lib/Search/Common/FieldRegistry.php +++ b/src/lib/Search/Common/FieldRegistry.php @@ -50,5 +50,3 @@ public function getType(string $name): Indexable return $this->types[$name]; } } - -class_alias(FieldRegistry::class, 'eZ\Publish\Core\Search\Common\FieldRegistry'); diff --git a/src/lib/Search/Common/FieldValueMapper.php b/src/lib/Search/Common/FieldValueMapper.php index a01dfa75c6..0120314da2 100644 --- a/src/lib/Search/Common/FieldValueMapper.php +++ b/src/lib/Search/Common/FieldValueMapper.php @@ -38,5 +38,3 @@ abstract public function canMap(Field $field); */ abstract public function map(Field $field); } - -class_alias(FieldValueMapper::class, 'eZ\Publish\Core\Search\Common\FieldValueMapper'); diff --git a/src/lib/Search/Common/FieldValueMapper/Aggregate.php b/src/lib/Search/Common/FieldValueMapper/Aggregate.php index 9540d6fc49..39d81c94cc 100644 --- a/src/lib/Search/Common/FieldValueMapper/Aggregate.php +++ b/src/lib/Search/Common/FieldValueMapper/Aggregate.php @@ -92,5 +92,3 @@ private function findMapper(Field $field): FieldValueMapper ); } } - -class_alias(Aggregate::class, 'eZ\Publish\Core\Search\Common\FieldValueMapper\Aggregate'); diff --git a/src/lib/Search/Common/FieldValueMapper/BooleanMapper.php b/src/lib/Search/Common/FieldValueMapper/BooleanMapper.php index 839d75c8ae..9fb8c0f9db 100644 --- a/src/lib/Search/Common/FieldValueMapper/BooleanMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/BooleanMapper.php @@ -26,5 +26,3 @@ public function map(Field $field) return (bool)$field->getValue(); } } - -class_alias(BooleanMapper::class, 'eZ\Publish\Core\Search\Common\FieldValueMapper\BooleanMapper'); diff --git a/src/lib/Search/Common/FieldValueMapper/DateMapper.php b/src/lib/Search/Common/FieldValueMapper/DateMapper.php index 6e81625b11..ca8aa1288c 100644 --- a/src/lib/Search/Common/FieldValueMapper/DateMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/DateMapper.php @@ -40,5 +40,3 @@ public function map(Field $field) return $date->format('Y-m-d\\TH:i:s\\Z'); } } - -class_alias(DateMapper::class, 'eZ\Publish\Core\Search\Common\FieldValueMapper\DateMapper'); diff --git a/src/lib/Search/Common/FieldValueMapper/DocumentMapper.php b/src/lib/Search/Common/FieldValueMapper/DocumentMapper.php index c8e926d161..612d34a77b 100644 --- a/src/lib/Search/Common/FieldValueMapper/DocumentMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/DocumentMapper.php @@ -26,5 +26,3 @@ public function map(Field $field) return $field->getValue(); } } - -class_alias(DocumentMapper::class, 'eZ\Publish\Core\Search\Common\FieldValueMapper\DocumentMapper'); diff --git a/src/lib/Search/Common/FieldValueMapper/FloatMapper.php b/src/lib/Search/Common/FieldValueMapper/FloatMapper.php index 58ca654251..7662d5f307 100644 --- a/src/lib/Search/Common/FieldValueMapper/FloatMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/FloatMapper.php @@ -26,5 +26,3 @@ public function map(Field $field) return sprintf('%F', (float)$field->getValue()); } } - -class_alias(FloatMapper::class, 'eZ\Publish\Core\Search\Common\FieldValueMapper\FloatMapper'); diff --git a/src/lib/Search/Common/FieldValueMapper/GeoLocationMapper.php b/src/lib/Search/Common/FieldValueMapper/GeoLocationMapper.php index 53dddb41cd..df7c97c5d0 100644 --- a/src/lib/Search/Common/FieldValueMapper/GeoLocationMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/GeoLocationMapper.php @@ -31,5 +31,3 @@ public function map(Field $field) return sprintf('%F,%F', $value['latitude'], $value['longitude']); } } - -class_alias(GeoLocationMapper::class, 'eZ\Publish\Core\Search\Common\FieldValueMapper\GeoLocationMapper'); diff --git a/src/lib/Search/Common/FieldValueMapper/IdentifierMapper.php b/src/lib/Search/Common/FieldValueMapper/IdentifierMapper.php index 7ed08164ba..7acaf4116f 100644 --- a/src/lib/Search/Common/FieldValueMapper/IdentifierMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/IdentifierMapper.php @@ -48,5 +48,3 @@ protected function convert($value): string return preg_replace('([^A-Za-z0-9/]+)', '', $value); } } - -class_alias(IdentifierMapper::class, 'eZ\Publish\Core\Search\Common\FieldValueMapper\IdentifierMapper'); diff --git a/src/lib/Search/Common/FieldValueMapper/IntegerMapper.php b/src/lib/Search/Common/FieldValueMapper/IntegerMapper.php index aeea5893fb..c1e2aa3d9b 100644 --- a/src/lib/Search/Common/FieldValueMapper/IntegerMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/IntegerMapper.php @@ -36,5 +36,3 @@ protected function convert($value): int return (int)$value; } } - -class_alias(IntegerMapper::class, 'eZ\Publish\Core\Search\Common\FieldValueMapper\IntegerMapper'); diff --git a/src/lib/Search/Common/FieldValueMapper/MultipleBooleanMapper.php b/src/lib/Search/Common/FieldValueMapper/MultipleBooleanMapper.php index 1cc9a75821..11b9e7a1f9 100644 --- a/src/lib/Search/Common/FieldValueMapper/MultipleBooleanMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/MultipleBooleanMapper.php @@ -32,5 +32,3 @@ public function map(Field $field) return $values; } } - -class_alias(MultipleBooleanMapper::class, 'eZ\Publish\Core\Search\Common\FieldValueMapper\MultipleBooleanMapper'); diff --git a/src/lib/Search/Common/FieldValueMapper/MultipleIdentifierMapper.php b/src/lib/Search/Common/FieldValueMapper/MultipleIdentifierMapper.php index 6dcced5e5c..7260c96b7e 100644 --- a/src/lib/Search/Common/FieldValueMapper/MultipleIdentifierMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/MultipleIdentifierMapper.php @@ -43,5 +43,3 @@ public function map(Field $field) return $values; } } - -class_alias(MultipleIdentifierMapper::class, 'eZ\Publish\Core\Search\Common\FieldValueMapper\MultipleIdentifierMapper'); diff --git a/src/lib/Search/Common/FieldValueMapper/MultipleIntegerMapper.php b/src/lib/Search/Common/FieldValueMapper/MultipleIntegerMapper.php index 6952f5649a..60dad1d0af 100644 --- a/src/lib/Search/Common/FieldValueMapper/MultipleIntegerMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/MultipleIntegerMapper.php @@ -31,5 +31,3 @@ public function map(Field $field) return $values; } } - -class_alias(MultipleIntegerMapper::class, 'eZ\Publish\Core\Search\Common\FieldValueMapper\MultipleIntegerMapper'); diff --git a/src/lib/Search/Common/FieldValueMapper/MultipleRemoteIdentifierMapper.php b/src/lib/Search/Common/FieldValueMapper/MultipleRemoteIdentifierMapper.php index 972410350b..e0001b7480 100644 --- a/src/lib/Search/Common/FieldValueMapper/MultipleRemoteIdentifierMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/MultipleRemoteIdentifierMapper.php @@ -31,5 +31,3 @@ public function map(Field $field) return $values; } } - -class_alias(MultipleRemoteIdentifierMapper::class, 'eZ\Publish\Core\Search\Common\FieldValueMapper\MultipleRemoteIdentifierMapper'); diff --git a/src/lib/Search/Common/FieldValueMapper/MultipleStringMapper.php b/src/lib/Search/Common/FieldValueMapper/MultipleStringMapper.php index 6046f1dc03..0d2d6bcfb1 100644 --- a/src/lib/Search/Common/FieldValueMapper/MultipleStringMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/MultipleStringMapper.php @@ -43,5 +43,3 @@ public function map(Field $field) return $values; } } - -class_alias(MultipleStringMapper::class, 'eZ\Publish\Core\Search\Common\FieldValueMapper\MultipleStringMapper'); diff --git a/src/lib/Search/Common/FieldValueMapper/PriceMapper.php b/src/lib/Search/Common/FieldValueMapper/PriceMapper.php index 8052801b0b..f8329a02c1 100644 --- a/src/lib/Search/Common/FieldValueMapper/PriceMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/PriceMapper.php @@ -33,5 +33,3 @@ public function map(Field $field) return (float)$field->getValue(); } } - -class_alias(PriceMapper::class, 'eZ\Publish\Core\Search\Common\FieldValueMapper\PriceMapper'); diff --git a/src/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapper.php b/src/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapper.php index 0e05d61e68..c4f7125371 100644 --- a/src/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapper.php @@ -24,5 +24,3 @@ public function canMap(Field $field): bool return $field->getType() instanceof RemoteIdentifierField; } } - -class_alias(RemoteIdentifierMapper::class, 'eZ\Publish\Core\Search\Common\FieldValueMapper\RemoteIdentifierMapper'); diff --git a/src/lib/Search/Common/FieldValueMapper/StringMapper.php b/src/lib/Search/Common/FieldValueMapper/StringMapper.php index f410ce4b20..137d1f0e55 100644 --- a/src/lib/Search/Common/FieldValueMapper/StringMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/StringMapper.php @@ -51,5 +51,3 @@ protected function convert($value): string ); } } - -class_alias(StringMapper::class, 'eZ\Publish\Core\Search\Common\FieldValueMapper\StringMapper'); diff --git a/src/lib/Search/Common/IncrementalIndexer.php b/src/lib/Search/Common/IncrementalIndexer.php index 3ade0a214e..0dff198bfc 100644 --- a/src/lib/Search/Common/IncrementalIndexer.php +++ b/src/lib/Search/Common/IncrementalIndexer.php @@ -89,5 +89,3 @@ abstract public function purge(); */ abstract public function getName(); } - -class_alias(IncrementalIndexer::class, 'eZ\Publish\Core\Search\Common\IncrementalIndexer'); diff --git a/src/lib/Search/Common/Indexer.php b/src/lib/Search/Common/Indexer.php index a70b0a0969..d734d0d233 100644 --- a/src/lib/Search/Common/Indexer.php +++ b/src/lib/Search/Common/Indexer.php @@ -71,5 +71,3 @@ protected function getContentDbFieldsStmt(array $fields): Statement return $query->execute(); } } - -class_alias(Indexer::class, 'eZ\Publish\Core\Search\Common\Indexer'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriteriaConverter.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriteriaConverter.php index 1918480c7d..19df4910dd 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriteriaConverter.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriteriaConverter.php @@ -68,5 +68,3 @@ public function convertCriteria( ); } } - -class_alias(CriteriaConverter::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriteriaConverter'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php index 3896e85e1b..d1f0fa520f 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php @@ -87,5 +87,3 @@ protected function hasJoinedTableAs(QueryBuilder $queryBuilder, string $tableAli return false; } } - -class_alias(CriterionHandler::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/CompositeCriterion.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/CompositeCriterion.php index 48d1a03f44..6547678b7d 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/CompositeCriterion.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/CompositeCriterion.php @@ -29,5 +29,3 @@ public function handle( return $converter->convertCriteria($queryBuilder, $criterion->criteria, $languageSettings); } } - -class_alias(CompositeCriterion::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\CompositeCriterion'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentId.php index a3c4cbebc0..65b252d5cb 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentId.php @@ -44,5 +44,3 @@ public function handle( ); } } - -class_alias(ContentId::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\ContentId'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeGroupId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeGroupId.php index 3c1ffa3c59..996f6f9c47 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeGroupId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeGroupId.php @@ -55,5 +55,3 @@ public function handle( ); } } - -class_alias(ContentTypeGroupId::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\ContentTypeGroupId'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeId.php index cc88af30e6..33efd29d9f 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeId.php @@ -42,5 +42,3 @@ public function handle( ); } } - -class_alias(ContentTypeId::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\ContentTypeId'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php index b7816db167..0051611645 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php @@ -94,5 +94,3 @@ public function handle( ); } } - -class_alias(ContentTypeIdentifier::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\ContentTypeIdentifier'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/DateMetadata.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/DateMetadata.php index 101ace0fb4..6e7c93dfe7 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/DateMetadata.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/DateMetadata.php @@ -88,5 +88,3 @@ private function getColumnName(Criterion $criterion): string } } } - -class_alias(DateMetadata::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\DateMetadata'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php index 47ee09368c..05c915f855 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php @@ -175,5 +175,3 @@ public function handle( ); } } - -class_alias(Field::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\Field'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php index 7fb4a4e34a..7ab13f6662 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php @@ -181,5 +181,3 @@ protected function getInExpressionWithFieldConditions( ); } } - -class_alias(FieldBase::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldBase'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php index 9a1d8499c3..a71974bd22 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php @@ -140,5 +140,3 @@ public function handle( ); } } - -class_alias(FieldEmpty::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldEmpty'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php index 339518b23b..404cc9653d 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php @@ -199,5 +199,3 @@ protected function buildQueryForInOperator( return $subSelect; } } - -class_alias(FieldRelation::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldRelation'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Converter.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Converter.php index 77fc2badad..2bed57d87c 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Converter.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Converter.php @@ -77,5 +77,3 @@ public function convertCriteria( return $this->defaultHandler->handle($outerQuery, $subQuery, $criterion, $column); } } - -class_alias(Converter::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Converter'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php index b846e0407a..1142398ea2 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php @@ -227,5 +227,3 @@ private function getParamArrayType(array $values): int return $arrayValueTypes[0] ?? Connection::PARAM_STR_ARRAY; } } - -class_alias(Handler::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Handler'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php index 182c93316a..590737cac0 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php @@ -96,5 +96,3 @@ public function handle( return $filter; } } - -class_alias(Collection::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Handler\Collection'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Composite.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Composite.php index 0d7b021b57..4886f72def 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Composite.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Composite.php @@ -18,5 +18,3 @@ class Composite extends Handler { } - -class_alias(Composite::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Handler\Composite'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Keyword.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Keyword.php index 5b60c90b1d..7ba9aa3c87 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Keyword.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Keyword.php @@ -38,5 +38,3 @@ public function handle( return parent::handle($outerQuery, $subQuery, $criterion, 'keyword'); } } - -class_alias(Keyword::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Handler\Keyword'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Simple.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Simple.php index c5df88347e..8f175b42a5 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Simple.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Simple.php @@ -43,5 +43,3 @@ public function handle( return $filter; } } - -class_alias(Simple::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Handler\Simple'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/HandlerRegistry.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/HandlerRegistry.php index fccf853101..e471b5d211 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/HandlerRegistry.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/HandlerRegistry.php @@ -76,5 +76,3 @@ public function has($fieldTypeIdentifier) return isset($this->map[$fieldTypeIdentifier]); } } - -class_alias(HandlerRegistry::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\HandlerRegistry'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php index 965a52a7b3..4926b0cc98 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php @@ -280,5 +280,3 @@ protected function getStopWordThresholdValue(): int return $this->stopWordThresholdValue = (int)($count * $this->configuration['stopWordThresholdFactor']); } } - -class_alias(FullText::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FullText'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserBased.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserBased.php index 9ac812bca2..08c3502515 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserBased.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserBased.php @@ -46,5 +46,3 @@ public function handle( : "NOT({$queryExpression})"; } } - -class_alias(IsUserBased::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\IsUserBased'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserEnabled.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserEnabled.php index 8ed579f052..dd237ff154 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserEnabled.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserEnabled.php @@ -50,5 +50,3 @@ public function handle( ); } } - -class_alias(IsUserEnabled::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\IsUserEnabled'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php index 856223af58..b9e258d8cd 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php @@ -60,5 +60,3 @@ public function handle( ); } } - -class_alias(LanguageCode::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\LanguageCode'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php index 9a95601752..4ae0cce95e 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php @@ -47,5 +47,3 @@ public function handle( return $queryBuilder->expr()->andX(...$subexpressions); } } - -class_alias(LogicalAnd::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\LogicalAnd'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalNot.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalNot.php index ee2bc9f817..1d2d8fdb5c 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalNot.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalNot.php @@ -41,5 +41,3 @@ public function handle( ); } } - -class_alias(LogicalNot::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\LogicalNot'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php index af85ededbb..f6843d763a 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php @@ -47,5 +47,3 @@ public function handle( return $queryBuilder->expr()->orX(...$subexpressions); } } - -class_alias(LogicalOr::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\LogicalOr'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php index 4ad49df2e7..878ba9529a 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php @@ -285,5 +285,3 @@ protected function getBoundingCoordinates(MapLocationValue $location, $distance) return $boundingCoordinates; } } - -class_alias(MapLocationDistance::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\MapLocationDistance'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchAll.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchAll.php index 440f60c6fa..4a34903931 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchAll.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchAll.php @@ -38,5 +38,3 @@ public function handle( return '1 = 1'; } } - -class_alias(MatchAll::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\MatchAll'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchNone.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchNone.php index ab3df627e9..398724a21e 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchNone.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchNone.php @@ -38,5 +38,3 @@ public function handle( return '1 = 0'; } } - -class_alias(MatchNone::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\MatchNone'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateId.php index 180a35067d..b4b179bb04 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateId.php @@ -56,5 +56,3 @@ public function handle( ); } } - -class_alias(ObjectStateId::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\ObjectStateId'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateIdentifier.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateIdentifier.php index a67ef2830c..8a7c03c15d 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateIdentifier.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateIdentifier.php @@ -73,5 +73,3 @@ public function handle( ); } } - -class_alias(ObjectStateIdentifier::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\ObjectStateIdentifier'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/RemoteId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/RemoteId.php index eed4fd3ba9..9adb3e879f 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/RemoteId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/RemoteId.php @@ -44,5 +44,3 @@ public function handle( ); } } - -class_alias(RemoteId::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\RemoteId'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionId.php index 495ce4cd06..3478fa7867 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionId.php @@ -44,5 +44,3 @@ public function handle( ); } } - -class_alias(SectionId::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\SectionId'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionIdentifier.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionIdentifier.php index f33b424060..83355eae49 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionIdentifier.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionIdentifier.php @@ -51,5 +51,3 @@ public function handle( ); } } - -class_alias(SectionIdentifier::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\SectionIdentifier'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserEmail.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserEmail.php index 3142b34d7e..94cb9b66b9 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserEmail.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserEmail.php @@ -77,5 +77,3 @@ public function handle( ); } } - -class_alias(UserEmail::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\UserEmail'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserId.php index c7c4e52e9c..ce8f2e068b 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserId.php @@ -46,5 +46,3 @@ public function handle( ); } } - -class_alias(UserId::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\UserId'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserLogin.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserLogin.php index be2dffa25c..2a310c912a 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserLogin.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserLogin.php @@ -78,5 +78,3 @@ public function handle( ); } } - -class_alias(UserLogin::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\UserLogin'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserMetadata.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserMetadata.php index 555f30d89f..70c1390471 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserMetadata.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserMetadata.php @@ -90,5 +90,3 @@ public function handle( throw new RuntimeException("Invalid target Criterion: '" . $criterion->target . "'"); } } - -class_alias(UserMetadata::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\UserMetadata'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseConverter.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseConverter.php index fb59f50477..053eb7eb10 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseConverter.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseConverter.php @@ -122,5 +122,3 @@ public function applyOrderBy(QueryBuilder $query): void $this->sortColumns = []; } } - -class_alias(SortClauseConverter::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseConverter'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php index 6d15fc3cd6..7d9c68cce2 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php @@ -92,5 +92,3 @@ protected function getSortTableName($number, $externalTableName = null) return 'sort_table_' . ($externalTableName !== null ? $externalTableName . '_' : '') . $number; } } - -class_alias(SortClauseHandler::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/AbstractRandom.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/AbstractRandom.php index 96bcaf0bbf..67957c885a 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/AbstractRandom.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/AbstractRandom.php @@ -49,5 +49,3 @@ abstract public function getRandomFunctionName(?int $seed): string; abstract public function getDriverName(): string; } - -class_alias(AbstractRandom::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\AbstractRandom'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentId.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentId.php index 908dbffe73..67710f2c2e 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentId.php @@ -44,5 +44,3 @@ public function applySelect( return [$column]; } } - -class_alias(ContentId::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\ContentId'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentName.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentName.php index f50114404e..538c4b3747 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentName.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentName.php @@ -44,5 +44,3 @@ public function applySelect( return (array)$column; } } - -class_alias(ContentName::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\ContentName'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DateModified.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DateModified.php index d9b97653ac..6242b440e9 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DateModified.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DateModified.php @@ -44,5 +44,3 @@ public function applySelect( return [$column]; } } - -class_alias(DateModified::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\DateModified'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DatePublished.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DatePublished.php index 0c5b0b53ba..ad3c11de0b 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DatePublished.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DatePublished.php @@ -44,5 +44,3 @@ public function applySelect( return [$column]; } } - -class_alias(DatePublished::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\DatePublished'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Factory/RandomSortClauseHandlerFactory.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Factory/RandomSortClauseHandlerFactory.php index b893654830..9a03bf68b3 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Factory/RandomSortClauseHandlerFactory.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Factory/RandomSortClauseHandlerFactory.php @@ -43,5 +43,3 @@ public function getGateway(): AbstractRandom throw new InvalidArgumentException('$this->randomSortClauseGateways', 'No RandomSortClauseHandler found for driver ' . $driverName); } } - -class_alias(RandomSortClauseHandlerFactory::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\Factory\RandomSortClauseHandlerFactory'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php index f7146b5ed1..367120fdef 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php @@ -238,5 +238,3 @@ protected function getFieldCondition( ); } } - -class_alias(Field::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\Field'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php index 908d9ec7c7..5c333ed05b 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php @@ -122,5 +122,3 @@ public function applyJoin( ); } } - -class_alias(MapLocationDistance::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\MapLocationDistance'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Random/MySqlRandom.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Random/MySqlRandom.php index bb05687696..70f298c917 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Random/MySqlRandom.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Random/MySqlRandom.php @@ -22,5 +22,3 @@ public function getRandomFunctionName(?int $seed): string return 'RAND(' . $seed . ')'; } } - -class_alias(MySqlRandom::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\Random\MySqlRandom'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Random/PgSqlRandom.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Random/PgSqlRandom.php index 0b5ff4234f..93a11ddaac 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Random/PgSqlRandom.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Random/PgSqlRandom.php @@ -22,5 +22,3 @@ public function getRandomFunctionName(?int $seed): string return 'random()'; } } - -class_alias(PgSqlRandom::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\Random\PgSqlRandom'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Random/SqlLiteRandom.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Random/SqlLiteRandom.php index 5895739019..6237db6c18 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Random/SqlLiteRandom.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Random/SqlLiteRandom.php @@ -22,5 +22,3 @@ public function getRandomFunctionName(?int $seed): string return 'random()'; } } - -class_alias(SqlLiteRandom::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\Random\SqlLiteRandom'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionIdentifier.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionIdentifier.php index f29d541728..497a7715ba 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionIdentifier.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionIdentifier.php @@ -44,5 +44,3 @@ public function applySelect( return [$column]; } } - -class_alias(SectionIdentifier::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\SectionIdentifier'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php index 8011c3de60..5f0ccdcd07 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php @@ -61,5 +61,3 @@ public function applyJoin( ); } } - -class_alias(SectionName::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\SectionName'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/ContentTypeName.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/ContentTypeName.php index 9fb6c5375d..420843ac68 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/ContentTypeName.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/ContentTypeName.php @@ -58,5 +58,3 @@ public function applyJoin( ); } } - -class_alias(ContentTypeName::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\Trash\ContentTypeName'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/DateTrashed.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/DateTrashed.php index fb94564971..e17bec2927 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/DateTrashed.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/DateTrashed.php @@ -38,5 +38,3 @@ public function applySelect( return (array)$column; } } - -class_alias(DateTrashed::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\Trash\DateTrashed'); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/UserLogin.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/UserLogin.php index 7612dace79..7d7e938648 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/UserLogin.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/UserLogin.php @@ -53,5 +53,3 @@ public function applyJoin( ); } } - -class_alias(UserLogin::class, 'eZ\Publish\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\Trash\UserLogin'); diff --git a/src/lib/Search/Legacy/Content/FullTextData.php b/src/lib/Search/Legacy/Content/FullTextData.php index e33b2e326a..027095865e 100644 --- a/src/lib/Search/Legacy/Content/FullTextData.php +++ b/src/lib/Search/Legacy/Content/FullTextData.php @@ -49,5 +49,3 @@ class FullTextData extends ValueObject */ public $values; } - -class_alias(FullTextData::class, 'eZ\Publish\Core\Search\Legacy\Content\FullTextData'); diff --git a/src/lib/Search/Legacy/Content/FullTextValue.php b/src/lib/Search/Legacy/Content/FullTextValue.php index fe67650847..bab40ddfa8 100644 --- a/src/lib/Search/Legacy/Content/FullTextValue.php +++ b/src/lib/Search/Legacy/Content/FullTextValue.php @@ -66,5 +66,3 @@ class FullTextValue extends ValueObject */ public $splitFlag; } - -class_alias(FullTextValue::class, 'eZ\Publish\Core\Search\Legacy\Content\FullTextValue'); diff --git a/src/lib/Search/Legacy/Content/Gateway.php b/src/lib/Search/Legacy/Content/Gateway.php index 6deae61d2f..86d82f71e6 100644 --- a/src/lib/Search/Legacy/Content/Gateway.php +++ b/src/lib/Search/Legacy/Content/Gateway.php @@ -39,5 +39,3 @@ abstract public function find( $doCount = true ): array; } - -class_alias(Gateway::class, 'eZ\Publish\Core\Search\Legacy\Content\Gateway'); diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php index d40e537ebb..e108d9242e 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php @@ -59,5 +59,3 @@ public function handle( ); } } - -class_alias(Ancestor::class, 'eZ\Publish\Core\Search\Legacy\Content\Gateway\CriterionHandler\Ancestor'); diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationId.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationId.php index 3ac44137dd..7ec9f70a6c 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationId.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationId.php @@ -56,5 +56,3 @@ public function handle( ); } } - -class_alias(LocationId::class, 'eZ\Publish\Core\Search\Legacy\Content\Gateway\CriterionHandler\LocationId'); diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationRemoteId.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationRemoteId.php index fec44b5d36..26234bace3 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationRemoteId.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationRemoteId.php @@ -57,5 +57,3 @@ public function handle( ); } } - -class_alias(LocationRemoteId::class, 'eZ\Publish\Core\Search\Legacy\Content\Gateway\CriterionHandler\LocationRemoteId'); diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/ParentLocationId.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/ParentLocationId.php index cbc4c6e5ec..09d97032a1 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/ParentLocationId.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/ParentLocationId.php @@ -59,5 +59,3 @@ public function handle( ); } } - -class_alias(ParentLocationId::class, 'eZ\Publish\Core\Search\Legacy\Content\Gateway\CriterionHandler\ParentLocationId'); diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php index 9049d943c1..0c38ba0e9c 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php @@ -64,5 +64,3 @@ public function handle( return $queryBuilder->expr()->orX(...$statements); } } - -class_alias(PermissionSubtree::class, 'eZ\Publish\Core\Search\Legacy\Content\Gateway\CriterionHandler\PermissionSubtree'); diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php index 011c4abfd0..c3e0ff1b88 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php @@ -56,5 +56,3 @@ public function handle( ); } } - -class_alias(Subtree::class, 'eZ\Publish\Core\Search\Legacy\Content\Gateway\CriterionHandler\Subtree'); diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php index 2bf4ba1694..c5b00c9a80 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php @@ -73,5 +73,3 @@ public function handle( ); } } - -class_alias(Visibility::class, 'eZ\Publish\Core\Search\Legacy\Content\Gateway\CriterionHandler\Visibility'); diff --git a/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php b/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php index fcb230659a..06c69651c4 100644 --- a/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php +++ b/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php @@ -263,5 +263,3 @@ private function getContentInfoList( return $statement->fetchAll(FetchMode::ASSOCIATIVE); } } - -class_alias(DoctrineDatabase::class, 'eZ\Publish\Core\Search\Legacy\Content\Gateway\DoctrineDatabase'); diff --git a/src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php b/src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php index 909cf60949..a0f3e2c66c 100644 --- a/src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php +++ b/src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php @@ -44,5 +44,3 @@ public function find( } } } - -class_alias(ExceptionConversion::class, 'eZ\Publish\Core\Search\Legacy\Content\Gateway\ExceptionConversion'); diff --git a/src/lib/Search/Legacy/Content/Handler.php b/src/lib/Search/Legacy/Content/Handler.php index a6c106aba3..ceea66df95 100644 --- a/src/lib/Search/Legacy/Content/Handler.php +++ b/src/lib/Search/Legacy/Content/Handler.php @@ -393,5 +393,3 @@ public function supports(int $capabilityFlag): bool return false; } } - -class_alias(Handler::class, 'eZ\Publish\Core\Search\Legacy\Content\Handler'); diff --git a/src/lib/Search/Legacy/Content/Indexer.php b/src/lib/Search/Legacy/Content/Indexer.php index 82bcabdb67..42c47bd203 100644 --- a/src/lib/Search/Legacy/Content/Indexer.php +++ b/src/lib/Search/Legacy/Content/Indexer.php @@ -62,5 +62,3 @@ public function purge() $this->searchHandler->purgeIndex(); } } - -class_alias(Indexer::class, 'eZ\Publish\Core\Search\Legacy\Content\Indexer'); diff --git a/src/lib/Search/Legacy/Content/IndexerGateway.php b/src/lib/Search/Legacy/Content/IndexerGateway.php index 18f82330e7..db4a5e4403 100644 --- a/src/lib/Search/Legacy/Content/IndexerGateway.php +++ b/src/lib/Search/Legacy/Content/IndexerGateway.php @@ -145,5 +145,3 @@ private function fetchIteration(ResultStatement $statement, int $iterationCount) } while (!empty($contentId)); } } - -class_alias(IndexerGateway::class, 'eZ\Publish\Core\Search\Legacy\Content\IndexerGateway'); diff --git a/src/lib/Search/Legacy/Content/Location/Gateway.php b/src/lib/Search/Legacy/Content/Location/Gateway.php index 1ebf2700d5..9223e72f49 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway.php @@ -38,5 +38,3 @@ abstract public function find( $doCount = true ): array; } - -class_alias(Gateway::class, 'eZ\Publish\Core\Search\Legacy\Content\Location\Gateway'); diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php index e135fa8deb..048ae7152a 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php @@ -49,5 +49,3 @@ public function handle( ); } } - -class_alias(Ancestor::class, 'eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler\Ancestor'); diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php index f792119cff..b1736066f2 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php @@ -72,5 +72,3 @@ public function handle( } } } - -class_alias(Depth::class, 'eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler\Location\Depth'); diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsMainLocation.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsMainLocation.php index 1425e78aef..1bc1d14497 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsMainLocation.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsMainLocation.php @@ -59,5 +59,3 @@ public function handle( } } } - -class_alias(IsMainLocation::class, 'eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler\Location\IsMainLocation'); diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php index 6777a9351c..1e6727cbd6 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php @@ -65,5 +65,3 @@ public function handle( } } } - -class_alias(Priority::class, 'eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler\Location\Priority'); diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationId.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationId.php index d2fa983c9e..f42581094b 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationId.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationId.php @@ -44,5 +44,3 @@ public function handle( ); } } - -class_alias(LocationId::class, 'eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler\LocationId'); diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationRemoteId.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationRemoteId.php index b777f1a4e6..580b403d07 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationRemoteId.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationRemoteId.php @@ -44,5 +44,3 @@ public function handle( ); } } - -class_alias(LocationRemoteId::class, 'eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler\LocationRemoteId'); diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/ParentLocationId.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/ParentLocationId.php index dda6dac23f..49afc170d7 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/ParentLocationId.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/ParentLocationId.php @@ -44,5 +44,3 @@ public function handle( ); } } - -class_alias(ParentLocationId::class, 'eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler\ParentLocationId'); diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php index c8f3199348..74c444e5d3 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php @@ -47,5 +47,3 @@ public function accept(Criterion $criterion) return $criterion instanceof Criterion\Subtree; } } - -class_alias(Subtree::class, 'eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler\Subtree'); diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Visibility.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Visibility.php index 8af91230ea..d5fa065a09 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Visibility.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Visibility.php @@ -59,5 +59,3 @@ public function handle( } } } - -class_alias(Visibility::class, 'eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler\Visibility'); diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php b/src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php index 19bc27e67f..db6a08f7b2 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php @@ -259,5 +259,3 @@ private function getLanguageMask(array $languageFilter): int return $mask; } } - -class_alias(DoctrineDatabase::class, 'eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\DoctrineDatabase'); diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php b/src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php index 58349ab052..1153016660 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php @@ -50,5 +50,3 @@ public function find( } } } - -class_alias(ExceptionConversion::class, 'eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\ExceptionConversion'); diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Depth.php b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Depth.php index 0ef5767581..f6b743dd54 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Depth.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Depth.php @@ -41,5 +41,3 @@ public function applySelect( return [$column]; } } - -class_alias(Depth::class, 'eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\SortClauseHandler\Location\Depth'); diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Id.php b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Id.php index 62180704b0..e663e12ae4 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Id.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Id.php @@ -44,5 +44,3 @@ public function applySelect( return [$column]; } } - -class_alias(Id::class, 'eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\SortClauseHandler\Location\Id'); diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/IsMainLocation.php b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/IsMainLocation.php index 402f0a1044..a62299fdb4 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/IsMainLocation.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/IsMainLocation.php @@ -48,5 +48,3 @@ public function applySelect( return [$column]; } } - -class_alias(IsMainLocation::class, 'eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\SortClauseHandler\Location\IsMainLocation'); diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Path.php b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Path.php index c8e2d4c454..9f9dab3ed2 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Path.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Path.php @@ -44,5 +44,3 @@ public function applySelect( return [$column]; } } - -class_alias(Path::class, 'eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\SortClauseHandler\Location\Path'); diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Priority.php b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Priority.php index 1c4e1bd462..5e12144add 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Priority.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Priority.php @@ -44,5 +44,3 @@ public function applySelect( return [$column]; } } - -class_alias(Priority::class, 'eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\SortClauseHandler\Location\Priority'); diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Visibility.php b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Visibility.php index d555c6f65b..720d7c56c4 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Visibility.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Visibility.php @@ -44,5 +44,3 @@ public function applySelect( return [$column]; } } - -class_alias(Visibility::class, 'eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\SortClauseHandler\Location\Visibility'); diff --git a/src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php b/src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php index 3aad26be50..4a1e93ef6a 100644 --- a/src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php +++ b/src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php @@ -133,5 +133,3 @@ static function ($indexField) { return !empty($fullTextFields) ? array_values($fullTextFields)[0] : null; } } - -class_alias(FullTextMapper::class, 'eZ\Publish\Core\Search\Legacy\Content\Mapper\FullTextMapper'); diff --git a/src/lib/Search/Legacy/Content/WordIndexer/Gateway.php b/src/lib/Search/Legacy/Content/WordIndexer/Gateway.php index d5debee115..b041ef63e2 100644 --- a/src/lib/Search/Legacy/Content/WordIndexer/Gateway.php +++ b/src/lib/Search/Legacy/Content/WordIndexer/Gateway.php @@ -42,5 +42,3 @@ abstract public function bulkIndex(array $fullTextBulkData); */ abstract public function purgeIndex(); } - -class_alias(Gateway::class, 'eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway'); diff --git a/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php b/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php index 7c84160c9d..348572fc21 100644 --- a/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php +++ b/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php @@ -342,5 +342,3 @@ private function buildWordIDArray(array $indexArrayOnlyWords) return $wordArray; } } - -class_alias(DoctrineDatabase::class, 'eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase'); diff --git a/src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php b/src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php index 2e02d5fa2b..f1dc58039a 100644 --- a/src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php +++ b/src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php @@ -265,5 +265,3 @@ private function getWordUpdateQuery(array $wordIds): QueryBuilder return $query; } } - -class_alias(SearchIndex::class, 'eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Repository\SearchIndex'); diff --git a/tests/bundle/Core/ApiLoader/CacheFactoryTest.php b/tests/bundle/Core/ApiLoader/CacheFactoryTest.php index 43c46a3e07..195dec054a 100644 --- a/tests/bundle/Core/ApiLoader/CacheFactoryTest.php +++ b/tests/bundle/Core/ApiLoader/CacheFactoryTest.php @@ -64,5 +64,3 @@ public function testGetService($name, $expected) self::assertInstanceOf(TagAwareAdapter::class, $factory->getCachePool($this->configResolver)); } } - -class_alias(CacheFactoryTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\ApiLoader\CacheFactoryTest'); diff --git a/tests/bundle/Core/ApiLoader/RepositoryConfigurationProviderTest.php b/tests/bundle/Core/ApiLoader/RepositoryConfigurationProviderTest.php index 8556532b5a..4df30aabd6 100644 --- a/tests/bundle/Core/ApiLoader/RepositoryConfigurationProviderTest.php +++ b/tests/bundle/Core/ApiLoader/RepositoryConfigurationProviderTest.php @@ -139,5 +139,3 @@ protected function getConfigResolverMock() return $this->createMock(ConfigResolverInterface::class); } } - -class_alias(RepositoryConfigurationProviderTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\ApiLoader\RepositoryConfigurationProviderTest'); diff --git a/tests/bundle/Core/ApiLoader/StorageConnectionFactoryTest.php b/tests/bundle/Core/ApiLoader/StorageConnectionFactoryTest.php index 206d073f9a..3fb7cc5de1 100644 --- a/tests/bundle/Core/ApiLoader/StorageConnectionFactoryTest.php +++ b/tests/bundle/Core/ApiLoader/StorageConnectionFactoryTest.php @@ -137,5 +137,3 @@ protected function getContainerMock() return $this->createMock(ContainerInterface::class); } } - -class_alias(StorageConnectionFactoryTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\ApiLoader\StorageConnectionFactoryTest'); diff --git a/tests/bundle/Core/ApiLoader/StorageEngineFactoryTest.php b/tests/bundle/Core/ApiLoader/StorageEngineFactoryTest.php index 88fd24b007..77dff32931 100644 --- a/tests/bundle/Core/ApiLoader/StorageEngineFactoryTest.php +++ b/tests/bundle/Core/ApiLoader/StorageEngineFactoryTest.php @@ -125,5 +125,3 @@ protected function getPersistenceHandlerMock() return $this->createMock(Handler::class); } } - -class_alias(StorageEngineFactoryTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\ApiLoader\StorageEngineFactoryTest'); diff --git a/tests/bundle/Core/Cache/Warmer/ProxyCacheWarmerTest.php b/tests/bundle/Core/Cache/Warmer/ProxyCacheWarmerTest.php index 472b77021d..606beeff6b 100644 --- a/tests/bundle/Core/Cache/Warmer/ProxyCacheWarmerTest.php +++ b/tests/bundle/Core/Cache/Warmer/ProxyCacheWarmerTest.php @@ -41,5 +41,3 @@ public function testWarmUp(): void $this->proxyCacheWarmer->warmUp('/cache/dir'); } } - -class_alias(ProxyCacheWarmerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Cache\Warmer\ProxyCacheWarmerTest'); diff --git a/tests/bundle/Core/ChainConfigResolverTest.php b/tests/bundle/Core/ChainConfigResolverTest.php index 80bf182a76..0c46cedae0 100644 --- a/tests/bundle/Core/ChainConfigResolverTest.php +++ b/tests/bundle/Core/ChainConfigResolverTest.php @@ -260,5 +260,3 @@ private function buildMock($class, array $methods = []) ->getMock(); } } - -class_alias(ChainConfigResolverTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\ChainConfigResolverTest'); diff --git a/tests/bundle/Core/ConfigResolverTest.php b/tests/bundle/Core/ConfigResolverTest.php index 6f39287ff6..b5ba8ee677 100644 --- a/tests/bundle/Core/ConfigResolverTest.php +++ b/tests/bundle/Core/ConfigResolverTest.php @@ -295,5 +295,3 @@ public function testGetSetDefaultScope() self::assertSame($newDefaultScope, $configResolver->getDefaultScope()); } } - -class_alias(ConfigResolverTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\ConfigResolverTest'); diff --git a/tests/bundle/Core/Converter/AbstractParamConverterTest.php b/tests/bundle/Core/Converter/AbstractParamConverterTest.php index 0336492210..bd4bc6ce6a 100644 --- a/tests/bundle/Core/Converter/AbstractParamConverterTest.php +++ b/tests/bundle/Core/Converter/AbstractParamConverterTest.php @@ -34,5 +34,3 @@ public function createConfiguration($class = null, $name = null) return $config; } } - -class_alias(AbstractParamConverterTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Converter\AbstractParamConverterTest'); diff --git a/tests/bundle/Core/Converter/ContentParamConverterTest.php b/tests/bundle/Core/Converter/ContentParamConverterTest.php index 63478df3ea..5a018b4793 100644 --- a/tests/bundle/Core/Converter/ContentParamConverterTest.php +++ b/tests/bundle/Core/Converter/ContentParamConverterTest.php @@ -73,5 +73,3 @@ public function testApplyContentOptionalWithEmptyAttribute() self::assertNull($request->attributes->get('content')); } } - -class_alias(ContentParamConverterTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Converter\ContentParamConverterTest'); diff --git a/tests/bundle/Core/Converter/LocationParamConverterTest.php b/tests/bundle/Core/Converter/LocationParamConverterTest.php index d91ede800d..6bd287fb98 100644 --- a/tests/bundle/Core/Converter/LocationParamConverterTest.php +++ b/tests/bundle/Core/Converter/LocationParamConverterTest.php @@ -76,5 +76,3 @@ public function testApplyLocationOptionalWithEmptyAttribute() self::assertNull($request->attributes->get('location')); } } - -class_alias(LocationParamConverterTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Converter\LocationParamConverterTest'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPassTest.php index fbfd87248d..5d79973cdd 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPassTest.php @@ -79,5 +79,3 @@ public function addResolverProvider() ]; } } - -class_alias(ChainConfigResolverPassTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\ChainConfigResolverPassTest'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/ChainRoutingPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/ChainRoutingPassTest.php index e032b3b910..a97122ffd3 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/ChainRoutingPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/ChainRoutingPassTest.php @@ -140,5 +140,3 @@ public function addRouterProvider() ]; } } - -class_alias(ChainRoutingPassTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\ChainRoutingPassTest'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/ConsoleCommandPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/ConsoleCommandPassTest.php index 35346f0fd8..94cf317e79 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/ConsoleCommandPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/ConsoleCommandPassTest.php @@ -42,5 +42,3 @@ public function testAddSiteaccessOption(): void ); } } - -class_alias(ConsoleCommandPassTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\ConsoleCommandPassTest'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/EntityManagerFactoryServiceLocatorPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/EntityManagerFactoryServiceLocatorPassTest.php index de9d06b5a4..171796b2fd 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/EntityManagerFactoryServiceLocatorPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/EntityManagerFactoryServiceLocatorPassTest.php @@ -66,5 +66,3 @@ public function testAddServiceLocatorArgument(): void ); } } - -class_alias(EntityManagerFactoryServiceLocatorPassTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\EntityManagerFactoryServiceLocatorPassTest'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPassTest.php index 4c457f430d..9e19239e81 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPassTest.php @@ -84,5 +84,3 @@ public function tagsProvider(): array ]; } } - -class_alias(FieldTypeParameterProviderRegistryPassTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\FieldTypeParameterProviderRegistryPassTest'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/FragmentPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/FragmentPassTest.php index 232ecd16bb..a7c79924a9 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/FragmentPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/FragmentPassTest.php @@ -88,5 +88,3 @@ public function testProcess() ); } } - -class_alias(FragmentPassTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\FragmentPassTest'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/InjectEntityManagerMappingPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/InjectEntityManagerMappingPassTest.php index 4834b0f9a7..43495a9f71 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/InjectEntityManagerMappingPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/InjectEntityManagerMappingPassTest.php @@ -100,5 +100,3 @@ public function testInjectEntityMapping(): void } } } - -class_alias(InjectEntityManagerMappingPassTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\InjectEntityManagerMappingPassTest'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/LazyDoctrineRepositoriesPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/LazyDoctrineRepositoriesPassTest.php index 1bca013572..aded2a924d 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/LazyDoctrineRepositoriesPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/LazyDoctrineRepositoriesPassTest.php @@ -53,5 +53,3 @@ public function testNonLazyServices(): void $this->compile(); } } - -class_alias(LazyDoctrineRepositoriesPassTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\LazyDoctrineRepositoriesPassTest'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/NotificationRendererPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/NotificationRendererPassTest.php index 91a780db15..eb87e94e90 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/NotificationRendererPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/NotificationRendererPassTest.php @@ -59,5 +59,3 @@ public function testAddRendererWithoutAliasThrowsLogicException() $this->compile(); } } - -class_alias(NotificationRendererPassTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\NotificationRendererPassTest'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPassTest.php index 73c2d2ad3b..9c174c56bd 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPassTest.php @@ -56,5 +56,3 @@ public function testAddProviderWithoutType() $this->compile(); } } - -class_alias(PlaceholderProviderPassTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\PlaceholderProviderPassTest'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/QueryTypePassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/QueryTypePassTest.php index 223d1dec18..3fede95012 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/QueryTypePassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/QueryTypePassTest.php @@ -114,5 +114,3 @@ public function tagsProvider(): iterable ]; } } - -class_alias(QueryTypePassTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\QueryTypePassTest'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/RegisterSearchEngineIndexerPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/RegisterSearchEngineIndexerPassTest.php index e7cfd926cc..400f175656 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/RegisterSearchEngineIndexerPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/RegisterSearchEngineIndexerPassTest.php @@ -77,5 +77,3 @@ public function tagsProvider(): iterable ]; } } - -class_alias(RegisterSearchEngineIndexerPassTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\RegisterSearchEngineIndexerPassTest'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/RegisterSearchEnginePassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/RegisterSearchEnginePassTest.php index 198fde59a1..1b6a2a3692 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/RegisterSearchEnginePassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/RegisterSearchEnginePassTest.php @@ -77,5 +77,3 @@ public function tagsProvider(): iterable ]; } } - -class_alias(RegisterSearchEnginePassTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\RegisterSearchEnginePassTest'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePassTest.php index d88ab98feb..2b298c9b24 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePassTest.php @@ -89,5 +89,3 @@ public function testRegisterStorageEngineNoAlias() ); } } - -class_alias(RegisterStorageEnginePassTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\RegisterStorageEnginePassTest'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php index e76f5988b4..858ab220dc 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php @@ -83,5 +83,3 @@ public function testAlteredDaoAuthenticationProvider() ); } } - -class_alias(SecurityPassTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\SecurityPassTest'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/SiteAccessMatcherRegistryPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/SiteAccessMatcherRegistryPassTest.php index eff2f58d4b..13b84cda74 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/SiteAccessMatcherRegistryPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/SiteAccessMatcherRegistryPassTest.php @@ -48,5 +48,3 @@ public function testSetMatcher(): void ); } } - -class_alias(SiteAccessMatcherRegistryPassTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\SiteAccessMatcherRegistryPassTest'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php index d398d4599b..b679a7aa2c 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php @@ -110,5 +110,3 @@ public function configurationProvider() ]; } } - -class_alias(SlugConverterConfigurationPassTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\SlugConverterConfigurationPassTest'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPassTest.php index 27195f21d8..53c50adf4d 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPassTest.php @@ -61,5 +61,3 @@ public function translationCollectorProvider(): iterable ]; } } - -class_alias(TranslationCollectorPassTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\TranslationCollectorPassTest'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/URLHandlerPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/URLHandlerPassTest.php index c960b87871..50a459809a 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/URLHandlerPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/URLHandlerPassTest.php @@ -63,5 +63,3 @@ public function testRegisterURLHandlerNoScheme() ); } } - -class_alias(URLHandlerPassTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\URLHandlerPassTest'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/ViewProvidersPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/ViewProvidersPassTest.php index 9ea5e735fa..8cfa5c4418 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/ViewProvidersPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/ViewProvidersPassTest.php @@ -74,5 +74,3 @@ public function addViewProviderProvider() ]; } } - -class_alias(ViewProvidersPassTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\ViewProvidersPassTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php index 465cf2bdc1..a2c60061cf 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php @@ -79,5 +79,3 @@ public function provideSettings() ]; } } - -class_alias(ComplexSettingParserTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\ComplexSettings\ComplexSettingParserTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolverTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolverTest.php index adda2b1be4..4afa862ff5 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolverTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolverTest.php @@ -27,5 +27,3 @@ public function testGetArgumentValue() ); } } - -class_alias(ComplexSettingValueResolverTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\ComplexSettings\ComplexSettingValueResolverTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ConfigParserTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ConfigParserTest.php index 54aa5cd459..ea0d2ec768 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ConfigParserTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ConfigParserTest.php @@ -136,5 +136,3 @@ protected function getConfigurationParserMock() return $this->createMock(ParserInterface::class); } } - -class_alias(ConfigParserTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\ConfigParserTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php index d0df89631b..a496421ddd 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php @@ -338,5 +338,3 @@ private function getParameter( return sprintf('%s.%s.%s', $namespace, $scope, $paramName); } } - -class_alias(ChainConfigResolverTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\ConfigResolver\ChainConfigResolverTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ConfigResolverTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ConfigResolverTest.php index e0e7e590a2..304979e394 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ConfigResolverTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ConfigResolverTest.php @@ -114,5 +114,3 @@ public function testGetSetDefaultNamespace(): void self::assertSame($newDefaultNamespace, $configResolver->getDefaultNamespace()); } } - -class_alias(ConfigResolverTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\ConfigResolver\ConfigResolverTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/DefaultScopeConfigResolverTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/DefaultScopeConfigResolverTest.php index 711ca8390c..7e13155c1d 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/DefaultScopeConfigResolverTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/DefaultScopeConfigResolverTest.php @@ -28,5 +28,3 @@ protected function getScope(): string return 'default'; } } - -class_alias(DefaultScopeConfigResolverTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\ConfigResolver\DefaultScopeConfigResolverTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/GlobalScopeConfigResolverTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/GlobalScopeConfigResolverTest.php index 59433b5036..57ade08ddd 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/GlobalScopeConfigResolverTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/GlobalScopeConfigResolverTest.php @@ -28,5 +28,3 @@ protected function getScope(): string return 'global'; } } - -class_alias(GlobalScopeConfigResolverTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\ConfigResolver\GlobalScopeConfigResolverTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessGroupConfigResolverTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessGroupConfigResolverTest.php index 0d0618d288..301af0203a 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessGroupConfigResolverTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessGroupConfigResolverTest.php @@ -43,5 +43,3 @@ protected function getScope(): string return self::SA_GROUP; } } - -class_alias(SiteAccessGroupConfigResolverTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\ConfigResolver\SiteAccessGroupConfigResolverTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/StaticSiteAccessConfigResolverTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/StaticSiteAccessConfigResolverTest.php index 4dc96b72a8..3dc50c2dce 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/StaticSiteAccessConfigResolverTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/StaticSiteAccessConfigResolverTest.php @@ -42,5 +42,3 @@ protected function getScope(): string return self::EXISTING_SA_NAME; } } - -class_alias(StaticSiteAccessConfigResolverTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\ConfigResolver\StaticSiteAccessConfigResolverTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/AbstractParserTestCase.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/AbstractParserTestCase.php index 107007e59c..6182f5e281 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/AbstractParserTestCase.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/AbstractParserTestCase.php @@ -111,5 +111,3 @@ protected function getSiteAccess(string $name, string $provider, array $groupNam return $siteAccess; } } - -class_alias(AbstractParserTestCase::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\Parser\AbstractParserTestCase'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php index 5b5ccb4fbf..bad30add74 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php @@ -303,5 +303,3 @@ public function sessionSettingsProvider() ]; } } - -class_alias(CommonTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\Parser\CommonTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php index bba6f79c7f..c38e81bf37 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php @@ -128,5 +128,3 @@ public function contentSettingsProvider() ]; } } - -class_alias(ContentTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\Parser\ContentTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAssetTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAssetTest.php index 8707c18001..7925544598 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAssetTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAssetTest.php @@ -84,5 +84,3 @@ public function imageAssetSettingsProvider(): array ]; } } - -class_alias(ImageAssetTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\Parser\FieldType\ImageAssetTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php index 08ef6e55c9..2b2ea2a995 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php @@ -63,5 +63,3 @@ public function testHandlersConfig() $this->assertConfigResolverParameterValue('io.binarydata_handler', 'group_cluster', self::EMPTY_SA_GROUP); } } - -class_alias(IOTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\Parser\IOTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php index fccf7d2c6d..22bf92734c 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php @@ -90,5 +90,3 @@ public function testPrePostParameters() ); } } - -class_alias(ImageTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\Parser\ImageTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php index b610cd1b5f..6a4508862e 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php @@ -119,5 +119,3 @@ public function testTranslationSiteAccessesWithGroup() $this->assertConfigResolverParameterValue('translation_siteaccesses', [], self::EMPTY_SA_GROUP); } } - -class_alias(LanguagesTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\Parser\LanguagesTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php index 093f0d3bb2..2907e3398b 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php @@ -160,5 +160,3 @@ private function getExpectedConfigFieldDefinitionSettingsTemplates(array $config return $config; } } - -class_alias(TemplatesTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\Parser\TemplatesTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/ViewTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/ViewTest.php index 464754cfe4..be7546142f 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/ViewTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/ViewTest.php @@ -67,5 +67,3 @@ public function testContentView() $this->assertConfigResolverParameterValue('content_view', [], 'ibexa_demo_site_admin', false); } } - -class_alias(ViewTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\Parser\ViewTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php b/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php index 18ad1074c2..16470bc09b 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php @@ -293,5 +293,3 @@ protected function getContextualizerMock() return $this->createMock(ContextualizerInterface::class); } } - -class_alias(ConfigurationProcessorTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\SiteAccessAware\ConfigurationProcessorTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php b/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php index bf41b0ba60..fbf3613d1a 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php @@ -1415,5 +1415,3 @@ public function fullMapConfigArrayProvider() return $cases; } } - -class_alias(ContextualizerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\SiteAccessAware\ContextualizerTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php b/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php index 78792782bc..ebd5991120 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php @@ -95,5 +95,3 @@ public function parseDynamicSettingProvider() ]; } } - -class_alias(DynamicSettingParserTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\SiteAccessAware\DynamicSettingParserTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorTest.php index b2ea4423a8..abfdf4e7a8 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorTest.php @@ -25,5 +25,3 @@ public function testAddHasGetSuggestions() self::assertSame($suggestions, $collector->getSuggestions()); } } - -class_alias(SuggestionCollectorTest::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Suggestion\Tests\Collector\SuggestionCollectorTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestionTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestionTest.php index 6e774529f6..b16db5268a 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestionTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestionTest.php @@ -42,5 +42,3 @@ public function testConfigSuggestion() self::assertTrue($suggestion->isMandatory()); } } - -class_alias(ConfigSuggestionTest::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Suggestion\Tests\ConfigSuggestionTest'); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatterTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatterTest.php index 2666ca40ba..c818e73bda 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatterTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatterTest.php @@ -95,5 +95,3 @@ public function testFormatNoSuggestion() self::assertSame($message, $formatter->format($suggestion)); } } - -class_alias(YamlSuggestionFormatterTest::class, 'eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\Suggestion\Tests\Formatter\YamlSuggestionFormatterTest'); diff --git a/tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php b/tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php index bcfa39caba..3ca1386b0b 100644 --- a/tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php +++ b/tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php @@ -959,5 +959,3 @@ protected function getCoreExtension(): IbexaCoreExtension return $this->extension; } } - -class_alias(IbexaCoreExtensionTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\EzPublishCoreExtensionTest'); diff --git a/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php b/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php index 2091945493..4914843b4c 100644 --- a/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php +++ b/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php @@ -69,5 +69,3 @@ public function testAddResource() self::assertSame([$resource1, $resource2], $containerBuilder->getResources()); } } - -class_alias(PoliciesConfigBuilderTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Security\PolicyProvider\PoliciesConfigBuilderTest'); diff --git a/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProviderTest.php b/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProviderTest.php index 06167b7f5d..74285ddb49 100644 --- a/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProviderTest.php +++ b/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProviderTest.php @@ -82,5 +82,3 @@ public function testMultipleYaml() $provider->addPolicies($configBuilder); } } - -class_alias(YamlPolicyProviderTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Security\PolicyProvider\YamlPolicyProviderTest'); diff --git a/tests/bundle/Core/DependencyInjection/Stub/AnnotationEntityBundle/AnnotationEntityBundle.php b/tests/bundle/Core/DependencyInjection/Stub/AnnotationEntityBundle/AnnotationEntityBundle.php index 04b1212db3..b559a9e28d 100644 --- a/tests/bundle/Core/DependencyInjection/Stub/AnnotationEntityBundle/AnnotationEntityBundle.php +++ b/tests/bundle/Core/DependencyInjection/Stub/AnnotationEntityBundle/AnnotationEntityBundle.php @@ -13,5 +13,3 @@ class AnnotationEntityBundle extends Bundle { } - -class_alias(AnnotationEntityBundle::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Stub\AnnotationEntityBundle\AnnotationEntityBundle'); diff --git a/tests/bundle/Core/DependencyInjection/Stub/Filter/CustomCriterionQueryBuilder.php b/tests/bundle/Core/DependencyInjection/Stub/Filter/CustomCriterionQueryBuilder.php index 8fcab1d11c..477e36904d 100644 --- a/tests/bundle/Core/DependencyInjection/Stub/Filter/CustomCriterionQueryBuilder.php +++ b/tests/bundle/Core/DependencyInjection/Stub/Filter/CustomCriterionQueryBuilder.php @@ -29,5 +29,3 @@ public function buildQueryConstraint( return null; } } - -class_alias(CustomCriterionQueryBuilder::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Stub\Filter\CustomCriterionQueryBuilder'); diff --git a/tests/bundle/Core/DependencyInjection/Stub/Filter/CustomSortClauseQueryBuilder.php b/tests/bundle/Core/DependencyInjection/Stub/Filter/CustomSortClauseQueryBuilder.php index 1ea9ff2bfc..08c9bc140a 100644 --- a/tests/bundle/Core/DependencyInjection/Stub/Filter/CustomSortClauseQueryBuilder.php +++ b/tests/bundle/Core/DependencyInjection/Stub/Filter/CustomSortClauseQueryBuilder.php @@ -29,5 +29,3 @@ public function buildQuery( // Do nothing } } - -class_alias(CustomSortClauseQueryBuilder::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Stub\Filter\CustomSortClauseQueryBuilder'); diff --git a/tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryType/TestQueryType.php b/tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryType/TestQueryType.php index f1bfd78440..04df38a82d 100644 --- a/tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryType/TestQueryType.php +++ b/tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryType/TestQueryType.php @@ -24,5 +24,3 @@ public static function getName() return 'Test:Test'; } } - -class_alias(TestQueryType::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Stub\QueryTypeBundle\QueryType\TestQueryType'); diff --git a/tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryTypeBundle.php b/tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryTypeBundle.php index 3f926a0df8..379e1081bc 100644 --- a/tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryTypeBundle.php +++ b/tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryTypeBundle.php @@ -12,5 +12,3 @@ class QueryTypeBundle extends Bundle { } - -class_alias(QueryTypeBundle::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Stub\QueryTypeBundle\QueryTypeBundle'); diff --git a/tests/bundle/Core/DependencyInjection/Stub/StubPolicyProvider.php b/tests/bundle/Core/DependencyInjection/Stub/StubPolicyProvider.php index 411f7d0369..7e0d2c1433 100644 --- a/tests/bundle/Core/DependencyInjection/Stub/StubPolicyProvider.php +++ b/tests/bundle/Core/DependencyInjection/Stub/StubPolicyProvider.php @@ -29,5 +29,3 @@ public function addPolicies(ConfigBuilderInterface $configBuilder) $configBuilder->addConfig($this->policies); } } - -class_alias(StubPolicyProvider::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Stub\StubPolicyProvider'); diff --git a/tests/bundle/Core/DependencyInjection/Stub/StubYamlPolicyProvider.php b/tests/bundle/Core/DependencyInjection/Stub/StubYamlPolicyProvider.php index 7bc6e421e0..c3c77190ef 100644 --- a/tests/bundle/Core/DependencyInjection/Stub/StubYamlPolicyProvider.php +++ b/tests/bundle/Core/DependencyInjection/Stub/StubYamlPolicyProvider.php @@ -24,5 +24,3 @@ protected function getFiles() return $this->files; } } - -class_alias(StubYamlPolicyProvider::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Stub\StubYamlPolicyProvider'); diff --git a/tests/bundle/Core/DependencyInjection/Stub/XmlEntityBundle/XmlEntityBundle.php b/tests/bundle/Core/DependencyInjection/Stub/XmlEntityBundle/XmlEntityBundle.php index 89e6341b91..d65d52d557 100644 --- a/tests/bundle/Core/DependencyInjection/Stub/XmlEntityBundle/XmlEntityBundle.php +++ b/tests/bundle/Core/DependencyInjection/Stub/XmlEntityBundle/XmlEntityBundle.php @@ -13,5 +13,3 @@ class XmlEntityBundle extends Bundle { } - -class_alias(XmlEntityBundle::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Stub\XmlEntityBundle\XmlEntityBundle'); diff --git a/tests/bundle/Core/Entity/EntityManagerFactoryTest.php b/tests/bundle/Core/Entity/EntityManagerFactoryTest.php index 3ad420b731..c98e0952b4 100644 --- a/tests/bundle/Core/Entity/EntityManagerFactoryTest.php +++ b/tests/bundle/Core/Entity/EntityManagerFactoryTest.php @@ -156,5 +156,3 @@ protected function getEntityManager(): EntityManagerInterface return $this->createMock(EntityManagerInterface::class); } } - -class_alias(EntityManagerFactoryTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Entity\EntityManagerFactoryTest'); diff --git a/tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php b/tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php index a7f2cb09bf..0da64ce74d 100644 --- a/tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php +++ b/tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php @@ -223,5 +223,3 @@ public function testIndexDelete($value, $infoReturn, $contentReturn = null) $this->listener->reindex(); } } - -class_alias(BackgroundIndexingTerminateListenerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\BackgroundIndexingTerminateListenerTest'); diff --git a/tests/bundle/Core/EventListener/ConfigScopeListenerTest.php b/tests/bundle/Core/EventListener/ConfigScopeListenerTest.php index f1ab814569..868d52185a 100644 --- a/tests/bundle/Core/EventListener/ConfigScopeListenerTest.php +++ b/tests/bundle/Core/EventListener/ConfigScopeListenerTest.php @@ -75,5 +75,3 @@ public function testOnConfigScopeChange() self::assertSame($siteAccess, $event->getSiteAccess()); } } - -class_alias(ConfigScopeListenerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\ConfigScopeListenerTest'); diff --git a/tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php b/tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php index 32a4636527..511a6547db 100644 --- a/tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php +++ b/tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php @@ -126,5 +126,3 @@ private function getSiteAccessProviderMock(): SiteAccess\SiteAccessProviderInter return $siteAccessProviderMock; } } - -class_alias(ConsoleCommandListenerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\ConsoleCommandListenerTest'); diff --git a/tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php b/tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php index 0d5411352f..d33fa227d8 100644 --- a/tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php +++ b/tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php @@ -162,5 +162,3 @@ protected function getListener() return new ContentDownloadRouteReferenceListener($this->translationHelperMock); } } - -class_alias(ContentDownloadRouteReferenceListenerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\ContentDownloadRouteReferenceListenerTest'); diff --git a/tests/bundle/Core/EventListener/ExceptionListenerTest.php b/tests/bundle/Core/EventListener/ExceptionListenerTest.php index 2e4a3a0a04..d0edc08889 100644 --- a/tests/bundle/Core/EventListener/ExceptionListenerTest.php +++ b/tests/bundle/Core/EventListener/ExceptionListenerTest.php @@ -212,5 +212,3 @@ public function testUntouchedException() self::assertSame($exception, $event->getThrowable()); } } - -class_alias(ExceptionListenerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\ExceptionListenerTest'); diff --git a/tests/bundle/Core/EventListener/IndexRequestListenerTest.php b/tests/bundle/Core/EventListener/IndexRequestListenerTest.php index 1bf3e56cbd..191710276a 100644 --- a/tests/bundle/Core/EventListener/IndexRequestListenerTest.php +++ b/tests/bundle/Core/EventListener/IndexRequestListenerTest.php @@ -101,5 +101,3 @@ public function testOnKernelRequestIndexNotOnIndexPage() self::assertFalse($this->request->attributes->has('needsRedirect')); } } - -class_alias(IndexRequestListenerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\IndexRequestListenerTest'); diff --git a/tests/bundle/Core/EventListener/LocaleListenerTest.php b/tests/bundle/Core/EventListener/LocaleListenerTest.php index d361a5323a..15a685c36b 100644 --- a/tests/bundle/Core/EventListener/LocaleListenerTest.php +++ b/tests/bundle/Core/EventListener/LocaleListenerTest.php @@ -123,5 +123,3 @@ public function onKernelRequestProvider(): array ]; } } - -class_alias(LocaleListenerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\LocaleListenerTest'); diff --git a/tests/bundle/Core/EventListener/OriginalRequestListenerTest.php b/tests/bundle/Core/EventListener/OriginalRequestListenerTest.php index 392fc4c4e3..808c9f37cb 100644 --- a/tests/bundle/Core/EventListener/OriginalRequestListenerTest.php +++ b/tests/bundle/Core/EventListener/OriginalRequestListenerTest.php @@ -85,5 +85,3 @@ public function testOnKernelRequestWithOriginalRequest() ClockMock::withClockMock(false); } } - -class_alias(OriginalRequestListenerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\OriginalRequestListenerTest'); diff --git a/tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php b/tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php index d527fee9a2..394da78c70 100644 --- a/tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php +++ b/tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php @@ -283,5 +283,3 @@ public function prohibitedRequestDataProvider(): array ]; } } - -class_alias(RejectExplicitFrontControllerRequestsListenerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\RejectExplicitFrontControllerRequestsListenerTest'); diff --git a/tests/bundle/Core/EventListener/RequestEventListenerTest.php b/tests/bundle/Core/EventListener/RequestEventListenerTest.php index 47b798c0e5..4ea0c55102 100644 --- a/tests/bundle/Core/EventListener/RequestEventListenerTest.php +++ b/tests/bundle/Core/EventListener/RequestEventListenerTest.php @@ -204,5 +204,3 @@ public function testOnKernelRequestRedirectPrependSiteaccess() self::assertTrue($event->isPropagationStopped()); } } - -class_alias(RequestEventListenerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\RequestEventListenerTest'); diff --git a/tests/bundle/Core/EventListener/RoutingListenerTest.php b/tests/bundle/Core/EventListener/RoutingListenerTest.php index 062022db67..1da1ca1e28 100644 --- a/tests/bundle/Core/EventListener/RoutingListenerTest.php +++ b/tests/bundle/Core/EventListener/RoutingListenerTest.php @@ -82,5 +82,3 @@ public function testOnSiteAccessMatch() $listener->onSiteAccessMatch($event); } } - -class_alias(RoutingListenerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\RoutingListenerTest'); diff --git a/tests/bundle/Core/EventListener/SessionInitByPostListenerTest.php b/tests/bundle/Core/EventListener/SessionInitByPostListenerTest.php index c47cc1f2d4..9173ab69d1 100644 --- a/tests/bundle/Core/EventListener/SessionInitByPostListenerTest.php +++ b/tests/bundle/Core/EventListener/SessionInitByPostListenerTest.php @@ -127,5 +127,3 @@ public function testOnSiteAccessMatchNoSession(): void $this->listener->onSiteAccessMatch($event); } } - -class_alias(SessionInitByPostListenerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\SessionInitByPostListenerTest'); diff --git a/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php b/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php index 9e99dddb69..8c2bb1650d 100644 --- a/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php +++ b/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php @@ -164,5 +164,3 @@ public function testOnSiteAccessMatchNoConfiguredSessionName() $listener->onSiteAccessMatch(new PostSiteAccessMatchEvent(new SiteAccess('test'), $request, HttpKernelInterface::MAIN_REQUEST)); } } - -class_alias(SessionSetDynamicNameListenerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\SessionSetDynamicNameListenerTest'); diff --git a/tests/bundle/Core/EventListener/SiteAccessListenerTest.php b/tests/bundle/Core/EventListener/SiteAccessListenerTest.php index 6f11eae33e..3f8aa0ef9f 100644 --- a/tests/bundle/Core/EventListener/SiteAccessListenerTest.php +++ b/tests/bundle/Core/EventListener/SiteAccessListenerTest.php @@ -120,5 +120,3 @@ public function testOnSiteAccessMatchSubRequest($uri, $semanticPathinfo, $vpStri self::assertSame($this->defaultSiteaccess->groups, $siteAccess->groups); } } - -class_alias(SiteAccessListenerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\SiteAccessListenerTest'); diff --git a/tests/bundle/Core/EventListener/Stubs/FooServiceInterface.php b/tests/bundle/Core/EventListener/Stubs/FooServiceInterface.php index 25fe0825eb..6a031024cd 100644 --- a/tests/bundle/Core/EventListener/Stubs/FooServiceInterface.php +++ b/tests/bundle/Core/EventListener/Stubs/FooServiceInterface.php @@ -11,5 +11,3 @@ interface FooServiceInterface { public function someMethod($arg); } - -class_alias(FooServiceInterface::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\Stubs\FooServiceInterface'); diff --git a/tests/bundle/Core/EventListener/Stubs/TestOutput.php b/tests/bundle/Core/EventListener/Stubs/TestOutput.php index f8c58522d2..3243bac942 100644 --- a/tests/bundle/Core/EventListener/Stubs/TestOutput.php +++ b/tests/bundle/Core/EventListener/Stubs/TestOutput.php @@ -26,5 +26,3 @@ protected function doWrite($message, $newline) $this->output .= $message . ($newline ? "\n" : ''); } } - -class_alias(TestOutput::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\Stubs\TestOutput'); diff --git a/tests/bundle/Core/EventListener/Stubs/ViewManager.php b/tests/bundle/Core/EventListener/Stubs/ViewManager.php index 3e64a90b80..ddf2da16a0 100644 --- a/tests/bundle/Core/EventListener/Stubs/ViewManager.php +++ b/tests/bundle/Core/EventListener/Stubs/ViewManager.php @@ -41,5 +41,3 @@ public function renderContentView(View $view, array $defaultParams = []) { } } - -class_alias(ViewManager::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\Stubs\ViewManager'); diff --git a/tests/bundle/Core/EventListener/Stubs/ViewProvider.php b/tests/bundle/Core/EventListener/Stubs/ViewProvider.php index 43911d0643..6f11be6f03 100644 --- a/tests/bundle/Core/EventListener/Stubs/ViewProvider.php +++ b/tests/bundle/Core/EventListener/Stubs/ViewProvider.php @@ -28,5 +28,3 @@ public function getView(View $view) { } } - -class_alias(ViewProvider::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\Stubs\ViewProvider'); diff --git a/tests/bundle/Core/EventListener/ViewControllerListenerTest.php b/tests/bundle/Core/EventListener/ViewControllerListenerTest.php index eca0f8c9f1..cc29ec416c 100644 --- a/tests/bundle/Core/EventListener/ViewControllerListenerTest.php +++ b/tests/bundle/Core/EventListener/ViewControllerListenerTest.php @@ -202,5 +202,3 @@ static function () {}, ); } } - -class_alias(ViewControllerListenerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\EventListener\ViewControllerListenerTest'); diff --git a/tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php b/tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php index 66e3bc5c14..e986c9200c 100644 --- a/tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php +++ b/tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php @@ -50,5 +50,3 @@ public function testSetRequestsProvider() ]; } } - -class_alias(CrowdinRequestLocaleSubscriberTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\EventSubscriber\CrowdinRequestLocaleSubscriberTest'); diff --git a/tests/bundle/Core/Fragment/DecoratedFragmentRendererTest.php b/tests/bundle/Core/Fragment/DecoratedFragmentRendererTest.php index f3cc7c9d48..4b51a57ef9 100644 --- a/tests/bundle/Core/Fragment/DecoratedFragmentRendererTest.php +++ b/tests/bundle/Core/Fragment/DecoratedFragmentRendererTest.php @@ -135,5 +135,3 @@ public function getRenderer(): FragmentRendererInterface return new DecoratedFragmentRenderer($this->innerRenderer); } } - -class_alias(DecoratedFragmentRendererTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Fragment\DecoratedFragmentRendererTest'); diff --git a/tests/bundle/Core/Fragment/DirectFragmentRendererTest.php b/tests/bundle/Core/Fragment/DirectFragmentRendererTest.php index 821570169d..3c90267760 100644 --- a/tests/bundle/Core/Fragment/DirectFragmentRendererTest.php +++ b/tests/bundle/Core/Fragment/DirectFragmentRendererTest.php @@ -181,5 +181,3 @@ private function getDirectFragmentRenderer( ); } } - -class_alias(DirectFragmentRendererTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Fragment\DirectFragmentRendererTest'); diff --git a/tests/bundle/Core/Fragment/FragmentListenerFactoryTest.php b/tests/bundle/Core/Fragment/FragmentListenerFactoryTest.php index c5bd583a58..e34dcfeb2f 100644 --- a/tests/bundle/Core/Fragment/FragmentListenerFactoryTest.php +++ b/tests/bundle/Core/Fragment/FragmentListenerFactoryTest.php @@ -70,5 +70,3 @@ public function testBuildFragmentListenerNoRequest() self::assertNull($listener); } } - -class_alias(FragmentListenerFactoryTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Fragment\FragmentListenerFactoryTest'); diff --git a/tests/bundle/Core/Fragment/FragmentRendererBaseTest.php b/tests/bundle/Core/Fragment/FragmentRendererBaseTest.php index 7687cdc7ec..37fb61a6f0 100644 --- a/tests/bundle/Core/Fragment/FragmentRendererBaseTest.php +++ b/tests/bundle/Core/Fragment/FragmentRendererBaseTest.php @@ -76,5 +76,3 @@ abstract public function getRequest(SiteAccess $siteAccess): Request; abstract public function getRenderer(): FragmentRendererInterface; } - -class_alias(FragmentRendererBaseTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Fragment\FragmentRendererBaseTest'); diff --git a/tests/bundle/Core/Fragment/InlineFragmentRendererTest.php b/tests/bundle/Core/Fragment/InlineFragmentRendererTest.php index 9f06e83014..dc6ad81547 100644 --- a/tests/bundle/Core/Fragment/InlineFragmentRendererTest.php +++ b/tests/bundle/Core/Fragment/InlineFragmentRendererTest.php @@ -84,5 +84,3 @@ public function getRenderer(): FragmentRendererInterface return new InlineFragmentRenderer($this->innerRenderer); } } - -class_alias(InlineFragmentRendererTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Fragment\InlineFragmentRendererTest'); diff --git a/tests/bundle/Core/Imagine/AliasCleanerTest.php b/tests/bundle/Core/Imagine/AliasCleanerTest.php index cb1b3b4224..596e2381f2 100644 --- a/tests/bundle/Core/Imagine/AliasCleanerTest.php +++ b/tests/bundle/Core/Imagine/AliasCleanerTest.php @@ -37,5 +37,3 @@ public function testRemoveAliases() $this->aliasCleaner->removeAliases($originalPath); } } - -class_alias(AliasCleanerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\AliasCleanerTest'); diff --git a/tests/bundle/Core/Imagine/AliasGeneratorTest.php b/tests/bundle/Core/Imagine/AliasGeneratorTest.php index 6ec452ff9e..379871d7e2 100644 --- a/tests/bundle/Core/Imagine/AliasGeneratorTest.php +++ b/tests/bundle/Core/Imagine/AliasGeneratorTest.php @@ -496,5 +496,3 @@ protected function assertImageVariationIsCorrect( ); } } - -class_alias(AliasGeneratorTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\AliasGeneratorTest'); diff --git a/tests/bundle/Core/Imagine/BinaryLoaderTest.php b/tests/bundle/Core/Imagine/BinaryLoaderTest.php index d3e0dcaffe..feddb12766 100644 --- a/tests/bundle/Core/Imagine/BinaryLoaderTest.php +++ b/tests/bundle/Core/Imagine/BinaryLoaderTest.php @@ -105,5 +105,3 @@ public function testFind(): void self::assertEquals($expected, $this->binaryLoader->find($path)); } } - -class_alias(BinaryLoaderTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\BinaryLoaderTest'); diff --git a/tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php b/tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php index 51789640ed..0f53eea8d3 100644 --- a/tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php +++ b/tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php @@ -84,5 +84,3 @@ public function testResolveAndRemovePortUsingProxyHostWithTrailingSlash() self::assertEquals($expected, $proxyResolver->resolve($this->path, $this->filter)); } } - -class_alias(ProxyResolverTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\Cache\Resolver\ProxyResolverTest'); diff --git a/tests/bundle/Core/Imagine/Cache/Resolver/RelativeResolverTest.php b/tests/bundle/Core/Imagine/Cache/Resolver/RelativeResolverTest.php index 076a558350..1d41a4f323 100644 --- a/tests/bundle/Core/Imagine/Cache/Resolver/RelativeResolverTest.php +++ b/tests/bundle/Core/Imagine/Cache/Resolver/RelativeResolverTest.php @@ -41,5 +41,3 @@ public function testResolve() self::assertSame($expected, $resolver->resolve($path, $filter)); } } - -class_alias(RelativeResolverTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\Cache\Resolver\RelativeResolverTest'); diff --git a/tests/bundle/Core/Imagine/Cache/ResolverFactoryTest.php b/tests/bundle/Core/Imagine/Cache/ResolverFactoryTest.php index 477e881673..32c17cf66c 100644 --- a/tests/bundle/Core/Imagine/Cache/ResolverFactoryTest.php +++ b/tests/bundle/Core/Imagine/Cache/ResolverFactoryTest.php @@ -80,5 +80,3 @@ public function testCreateRelativeCacheResolver() self::assertEquals($expected, $this->factory->createCacheResolver()); } } - -class_alias(ResolverFactoryTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\Cache\ResolverFactoryTest'); diff --git a/tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php b/tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php index 5773c6490f..4f4ef7ca3f 100644 --- a/tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php +++ b/tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php @@ -82,5 +82,3 @@ public function getSetOptionWithDefaulValueProvider() ]; } } - -class_alias(AbstractFilterTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\Filter\AbstractFilterTest'); diff --git a/tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php b/tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php index d3e5383afd..fe9cf8af97 100644 --- a/tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php +++ b/tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php @@ -238,5 +238,3 @@ public function testAll() ); } } - -class_alias(FilterConfigurationTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\Filter\FilterConfigurationTest'); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php index 9f24739e42..3dc1640763 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php @@ -138,5 +138,3 @@ public function loadProvider() ]; } } - -class_alias(BorderFilterLoaderTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\Filter\Loader\BorderFilterLoaderTest'); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php index 20c51c9d99..e937182c95 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php @@ -67,5 +67,3 @@ public function testLoad() self::assertSame($image, $this->loader->load($image, [$width, $height, $offsetX, $offsetY])); } } - -class_alias(CropFilterLoaderTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\Filter\Loader\CropFilterLoaderTest'); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoaderTest.php index 3130af9172..eaa18287ba 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoaderTest.php @@ -31,5 +31,3 @@ public function testLoad() self::assertSame($image, $loader->load($image)); } } - -class_alias(GrayscaleFilterLoaderTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\Filter\Loader\GrayscaleFilterLoaderTest'); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoaderTest.php index 12bb24086a..b4a6eb2942 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoaderTest.php @@ -35,5 +35,3 @@ public function testLoadInvalidDriver() $this->loader->load($this->createMock(ImageInterface::class)); } } - -class_alias(ReduceNoiseFilterLoaderTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\Filter\Loader\ReduceNoiseFilterLoaderTest'); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php index b673faae5d..c120b142ab 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php @@ -61,5 +61,3 @@ public function testLoad() self::assertSame($image, $this->loader->load($image, $options)); } } - -class_alias(ScaleDownOnlyFilterLoaderTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\Filter\Loader\ScaleDownOnlyFilterLoaderTest'); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php index 18fb21d62f..273b6dd972 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php @@ -61,5 +61,3 @@ public function testLoad() self::assertSame($image, $this->loader->load($image, $options)); } } - -class_alias(ScaleExactFilterLoaderTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\Filter\Loader\ScaleExactFilterLoaderTest'); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php index 4694a13611..873eb0d0fc 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php @@ -95,5 +95,3 @@ public function testLoadWiden() self::assertSame($image, $this->loader->load($image, [$width, $height])); } } - -class_alias(ScaleFilterLoaderTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\Filter\Loader\ScaleFilterLoaderTest'); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoaderTest.php index 66eb355e5f..840cca4006 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoaderTest.php @@ -49,5 +49,3 @@ public function testLoad() self::assertSame($image, $this->loader->load($image, [$height])); } } - -class_alias(ScaleHeightDownOnlyFilterLoaderTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\Filter\Loader\ScaleHeightDownOnlyFilterLoaderTest'); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoaderTest.php index 01ee8ee52f..9b36149c03 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoaderTest.php @@ -49,5 +49,3 @@ public function testLoad() self::assertSame($image, $this->loader->load($image, [$height])); } } - -class_alias(ScaleHeightFilterLoaderTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\Filter\Loader\ScaleHeightFilterLoaderTest'); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php index 8f864ed075..762ec807e8 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php @@ -74,5 +74,3 @@ public function testLoad() self::assertSame($image, $this->loader->load($image, [$widthPercent, $heightPercent])); } } - -class_alias(ScalePercentFilterLoaderTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\Filter\Loader\ScalePercentFilterLoaderTest'); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoaderTest.php index d9b8cb51a4..4ad49d493d 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoaderTest.php @@ -49,5 +49,3 @@ public function testLoad() self::assertSame($image, $this->loader->load($image, [$width])); } } - -class_alias(ScaleWidthDownOnlyFilterLoaderTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\Filter\Loader\ScaleWidthDownOnlyFilterLoaderTest'); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoaderTest.php index e253d70dd7..78fb82b9e0 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoaderTest.php @@ -49,5 +49,3 @@ public function testLoad() self::assertSame($image, $this->loader->load($image, [$width])); } } - -class_alias(ScaleWidthFilterLoaderTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\Filter\Loader\ScaleWidthFilterLoaderTest'); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php index 22c75881cf..4af693b48b 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php @@ -73,5 +73,3 @@ public function loadWithOptionProvider() ]; } } - -class_alias(SwirlFilterLoaderTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\Filter\Loader\SwirlFilterLoaderTest'); diff --git a/tests/bundle/Core/Imagine/Filter/UnsupportedFilterTest.php b/tests/bundle/Core/Imagine/Filter/UnsupportedFilterTest.php index f98a59d847..6076a2a83b 100644 --- a/tests/bundle/Core/Imagine/Filter/UnsupportedFilterTest.php +++ b/tests/bundle/Core/Imagine/Filter/UnsupportedFilterTest.php @@ -21,5 +21,3 @@ public function testLoad() $filter->apply($this->createMock(ImageInterface::class)); } } - -class_alias(UnsupportedFilterTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\Filter\UnsupportedFilterTest'); diff --git a/tests/bundle/Core/Imagine/IORepositoryResolverTest.php b/tests/bundle/Core/Imagine/IORepositoryResolverTest.php index 5ca63f16e4..804150e77b 100644 --- a/tests/bundle/Core/Imagine/IORepositoryResolverTest.php +++ b/tests/bundle/Core/Imagine/IORepositoryResolverTest.php @@ -362,5 +362,3 @@ public function testRemoveWithFilters() $this->imageResolver->remove([$originalPath], $filters); } } - -class_alias(IORepositoryResolverTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\IORepositoryResolverTest'); diff --git a/tests/bundle/Core/Imagine/ImageAsset/AliasGeneratorTest.php b/tests/bundle/Core/Imagine/ImageAsset/AliasGeneratorTest.php index 516b901a50..dac3ff147d 100644 --- a/tests/bundle/Core/Imagine/ImageAsset/AliasGeneratorTest.php +++ b/tests/bundle/Core/Imagine/ImageAsset/AliasGeneratorTest.php @@ -140,5 +140,3 @@ public function testSupport() self::assertFalse($this->aliasGenerator->supportsValue(new Image\Value())); } } - -class_alias(AliasGeneratorTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\ImageAsset\AliasGeneratorTest'); diff --git a/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorConfiguratorTest.php b/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorConfiguratorTest.php index eab3f721da..d1e84f2a66 100644 --- a/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorConfiguratorTest.php +++ b/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorConfiguratorTest.php @@ -63,5 +63,3 @@ public function testConfigure() $configurator->configure($generator); } } - -class_alias(PlaceholderAliasGeneratorConfiguratorTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\PlaceholderAliasGeneratorConfiguratorTest'); diff --git a/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php b/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php index cc4719c933..0feac2fa72 100644 --- a/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php +++ b/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php @@ -299,5 +299,3 @@ public function getVariationProvider(): array ]; } } - -class_alias(PlaceholderAliasGeneratorTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\PlaceholderAliasGeneratorTest'); diff --git a/tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php b/tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php index 3954c82f7b..def720c8ad 100644 --- a/tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php +++ b/tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php @@ -102,5 +102,3 @@ private function assertColorEquals($expected, ColorInterface $actual) self::assertEquals(strtolower($expected), strtolower((string)$actual)); } } - -class_alias(GenericProviderTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\PlaceholderProvider\GenericProviderTest'); diff --git a/tests/bundle/Core/Imagine/PlaceholderProviderRegistryTest.php b/tests/bundle/Core/Imagine/PlaceholderProviderRegistryTest.php index 961f088dfe..c5b421f6a3 100644 --- a/tests/bundle/Core/Imagine/PlaceholderProviderRegistryTest.php +++ b/tests/bundle/Core/Imagine/PlaceholderProviderRegistryTest.php @@ -85,5 +85,3 @@ private function getPlaceholderProviderMock(): PlaceholderProvider return $this->createMock(PlaceholderProvider::class); } } - -class_alias(PlaceholderProviderRegistryTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\PlaceholderProviderRegistryTest'); diff --git a/tests/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGeneratorTest.php b/tests/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGeneratorTest.php index 93d25717de..fa6ecbec97 100644 --- a/tests/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGeneratorTest.php +++ b/tests/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGeneratorTest.php @@ -22,5 +22,3 @@ public function testGetVariationPath() ); } } - -class_alias(AliasDirectoryVariationPathGeneratorTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\VariationPathGenerator\AliasDirectoryVariationPathGeneratorTest'); diff --git a/tests/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGeneratorTest.php b/tests/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGeneratorTest.php index bfa3ddbf0b..88edae38c2 100644 --- a/tests/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGeneratorTest.php +++ b/tests/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGeneratorTest.php @@ -21,5 +21,3 @@ public function testGetVariationPath() ); } } - -class_alias(OriginalDirectoryVariationPathGeneratorTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\VariationPathGenerator\OriginalDirectoryVariationPathGeneratorTest'); diff --git a/tests/bundle/Core/Imagine/VariationPurger/IOVariationPurgerTest.php b/tests/bundle/Core/Imagine/VariationPurger/IOVariationPurgerTest.php index 46123cfb62..d38331268f 100644 --- a/tests/bundle/Core/Imagine/VariationPurger/IOVariationPurgerTest.php +++ b/tests/bundle/Core/Imagine/VariationPurger/IOVariationPurgerTest.php @@ -60,5 +60,3 @@ public function testPurgesAliasList(): void $purger->purge(['medium', 'large']); } } - -class_alias(IOVariationPurgerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\VariationPurger\IOVariationPurgerTest'); diff --git a/tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php b/tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php index b4e8d77490..66111770e4 100644 --- a/tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php +++ b/tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php @@ -114,5 +114,3 @@ private function createPurger(array $fileList) return new ImageFileVariationPurger(new ArrayIterator($fileList), $this->ioServiceMock, $this->pathGeneratorMock); } } - -class_alias(ImageFileVariationPurgerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\VariationPurger\ImageFileVariationPurgerTest'); diff --git a/tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php b/tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php index 854d565624..73b77a6638 100644 --- a/tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php +++ b/tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php @@ -80,5 +80,3 @@ private function configureRowReaderMock(array $fileList) $this->rowReaderMock->expects(self::any())->method('getCount')->willReturn(count($fileList)); } } - -class_alias(LegacyStorageImageFileListTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Imagine\VariationPurger\LegacyStorageImageFileListTest'); diff --git a/tests/bundle/Core/Matcher/ViewMatcherRegistryTest.php b/tests/bundle/Core/Matcher/ViewMatcherRegistryTest.php index 5ff4fb7b81..b9e8e58fe3 100644 --- a/tests/bundle/Core/Matcher/ViewMatcherRegistryTest.php +++ b/tests/bundle/Core/Matcher/ViewMatcherRegistryTest.php @@ -70,5 +70,3 @@ protected function getMatcherMock(): ViewMatcherInterface return $this->createMock(ViewMatcherInterface::class); } } - -class_alias(ViewMatcherRegistryTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Matcher\ViewMatcherRegistryTest'); diff --git a/tests/bundle/Core/Routing/DefaultRouterTest.php b/tests/bundle/Core/Routing/DefaultRouterTest.php index 5f14dbb6e4..e81a4ddfc6 100644 --- a/tests/bundle/Core/Routing/DefaultRouterTest.php +++ b/tests/bundle/Core/Routing/DefaultRouterTest.php @@ -348,5 +348,3 @@ private function getExpectedRequestContext($uri) return $requestContext; } } - -class_alias(DefaultRouterTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Routing\DefaultRouterTest'); diff --git a/tests/bundle/Core/Routing/JsRouting/ExposedRoutesExtractorTest.php b/tests/bundle/Core/Routing/JsRouting/ExposedRoutesExtractorTest.php index 910f9db726..4ab16993e8 100644 --- a/tests/bundle/Core/Routing/JsRouting/ExposedRoutesExtractorTest.php +++ b/tests/bundle/Core/Routing/JsRouting/ExposedRoutesExtractorTest.php @@ -74,5 +74,3 @@ public function testGetBaseUrl(?Request $masterRequest, string $expectedBaseUrl) self::assertSame($expectedBaseUrl, $extractor->getBaseUrl()); } } - -class_alias(ExposedRoutesExtractorTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Routing\JsRouting\ExposedRoutesExtractorTest'); diff --git a/tests/bundle/Core/Routing/UrlAliasRouterTest.php b/tests/bundle/Core/Routing/UrlAliasRouterTest.php index 39f8c8c626..e3eb1d401e 100644 --- a/tests/bundle/Core/Routing/UrlAliasRouterTest.php +++ b/tests/bundle/Core/Routing/UrlAliasRouterTest.php @@ -400,5 +400,3 @@ public function testMatchRequestWithRootLocationAndExclusion() self::assertEquals($expected, $this->router->matchRequest($request)); } } - -class_alias(UrlAliasRouterTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Routing\UrlAliasRouterTest'); diff --git a/tests/bundle/Core/SiteAccess/Config/IOConfigResolverTest.php b/tests/bundle/Core/SiteAccess/Config/IOConfigResolverTest.php index 3d79a05889..cf6b8a1586 100644 --- a/tests/bundle/Core/SiteAccess/Config/IOConfigResolverTest.php +++ b/tests/bundle/Core/SiteAccess/Config/IOConfigResolverTest.php @@ -125,5 +125,3 @@ public function testGetRootDir(): void self::assertEquals('/path/to/ibexa/web/var/demo_site/legacy_storage', $ioConfigResolver->getRootDir()); } } - -class_alias(IOConfigResolverTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\SiteAccess\Config\IOConfigResolverTest'); diff --git a/tests/bundle/Core/SiteAccess/MatcherBuilderTest.php b/tests/bundle/Core/SiteAccess/MatcherBuilderTest.php index 302ab0cf0d..66bc2bebab 100644 --- a/tests/bundle/Core/SiteAccess/MatcherBuilderTest.php +++ b/tests/bundle/Core/SiteAccess/MatcherBuilderTest.php @@ -78,5 +78,3 @@ public function testBuildMatcherService() $matcherBuilder->buildMatcher("@$serviceId", $matchingConfig, $request); } } - -class_alias(MatcherBuilderTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\SiteAccess\MatcherBuilderTest'); diff --git a/tests/bundle/Core/SiteAccess/SiteAccessMatcherRegistryTest.php b/tests/bundle/Core/SiteAccess/SiteAccessMatcherRegistryTest.php index 3fb7f56d7e..59b56098f3 100644 --- a/tests/bundle/Core/SiteAccess/SiteAccessMatcherRegistryTest.php +++ b/tests/bundle/Core/SiteAccess/SiteAccessMatcherRegistryTest.php @@ -59,5 +59,3 @@ protected function getMatcherMock(): Matcher return $this->createMock(Matcher::class); } } - -class_alias(SiteAccessMatcherRegistryTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\SiteAccess\SiteAccessMatcherRegistryTest'); diff --git a/tests/bundle/Core/Translation/GlobCollectorTest.php b/tests/bundle/Core/Translation/GlobCollectorTest.php index 7ea44df31c..7776b43cc2 100644 --- a/tests/bundle/Core/Translation/GlobCollectorTest.php +++ b/tests/bundle/Core/Translation/GlobCollectorTest.php @@ -25,5 +25,3 @@ public function testCollect(): void } } } - -class_alias(GlobCollectorTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\Translation\GlobCollectorTest'); diff --git a/tests/bundle/Core/URLChecker/URLCheckerTest.php b/tests/bundle/Core/URLChecker/URLCheckerTest.php index 34fedb03cf..51e4074e67 100644 --- a/tests/bundle/Core/URLChecker/URLCheckerTest.php +++ b/tests/bundle/Core/URLChecker/URLCheckerTest.php @@ -167,5 +167,3 @@ private function createUrlChecker() return $urlChecker; } } - -class_alias(URLCheckerTest::class, 'eZ\Bundle\EzPublishCoreBundle\Tests\URLChecker\URLCheckerTest'); diff --git a/tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php b/tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php index 854e8f185e..01cda5dd7e 100644 --- a/tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php +++ b/tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php @@ -167,5 +167,3 @@ protected function getDataCollectorMock() return $this->createMock(DataCollectorInterface::class); } } - -class_alias(IbexaCoreCollectorTest::class, 'eZ\Bundle\EzPublishDebugBundle\Tests\Collector\EzPublishCoreCollectorTest'); diff --git a/tests/bundle/Debug/DependencyInjection/Compiler/DataCollectorPassTest.php b/tests/bundle/Debug/DependencyInjection/Compiler/DataCollectorPassTest.php index 1e0d69cc99..0969549e98 100644 --- a/tests/bundle/Debug/DependencyInjection/Compiler/DataCollectorPassTest.php +++ b/tests/bundle/Debug/DependencyInjection/Compiler/DataCollectorPassTest.php @@ -48,5 +48,3 @@ public function testAddCollector() ); } } - -class_alias(DataCollectorPassTest::class, 'eZ\Bundle\EzPublishDebugBundle\Tests\DependencyInjection\Compiler\DataCollectorPassTest'); diff --git a/tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php b/tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php index 61842ffb75..28855e616b 100644 --- a/tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php +++ b/tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php @@ -138,5 +138,3 @@ public function testUnknownBinarydataHandler() $this->compile(); } } - -class_alias(IOConfigurationPassTest::class, 'eZ\Bundle\EzPublishIOBundle\Tests\DependencyInjection\Compiler\IOConfigurationPassTest'); diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTest.php index ede0f45304..2544b5d773 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTest.php @@ -52,5 +52,3 @@ public function validateConfiguredContainer() ); } } - -class_alias(BaseFlysystemTest::class, 'eZ\Bundle\EzPublishIOBundle\Tests\DependencyInjection\ConfigurationFactory\BaseFlysystemTest'); diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/FlysystemTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/FlysystemTest.php index 9653f1ff76..7ce7f96664 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/FlysystemTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/FlysystemTest.php @@ -25,5 +25,3 @@ public function provideExpectedParentServiceId() return 'ibexa.core.io.binarydata_handler.flysystem'; } } - -class_alias(FlysystemTest::class, 'eZ\Bundle\EzPublishIOBundle\Tests\DependencyInjection\ConfigurationFactory\BinarydataHandler\FlysystemTest'); diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/FlysystemTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/FlysystemTest.php index ea78f2e86a..51565ab1bf 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/FlysystemTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/FlysystemTest.php @@ -29,5 +29,3 @@ public function provideExpectedParentServiceId() return 'ibexa.core.io.metadata_handler.flysystem'; } } - -class_alias(FlysystemTest::class, 'eZ\Bundle\EzPublishIOBundle\Tests\DependencyInjection\ConfigurationFactory\MetadataHandler\FlysystemTest'); diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php index 8a64a14d1a..c6658cc34f 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php @@ -54,5 +54,3 @@ public function validateConfiguredHandler($handlerServiceId) ); } } - -class_alias(LegacyDFSClusterTest::class, 'eZ\Bundle\EzPublishIOBundle\Tests\DependencyInjection\ConfigurationFactory\MetadataHandler\LegacyDFSClusterTest'); diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php index 68b751123e..265c7f72cb 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php @@ -127,5 +127,3 @@ public function validateConfiguredContainer() { } } - -class_alias(ConfigurationFactoryTest::class, 'eZ\Bundle\EzPublishIOBundle\Tests\DependencyInjection\ConfigurationFactoryTest'); diff --git a/tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php b/tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php index 2e8e905679..ea3f5356b2 100644 --- a/tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php +++ b/tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php @@ -108,5 +108,3 @@ private function buildMinimalContainerForUrlPrefixTest(): void $this->container->compile(); } } - -class_alias(IbexaIOExtensionTest::class, 'eZ\Bundle\EzPublishIOBundle\Tests\DependencyInjection\EzPublishIOExtensionTest'); diff --git a/tests/bundle/IO/EventListener/StreamFileListenerTest.php b/tests/bundle/IO/EventListener/StreamFileListenerTest.php index dba3fdf215..44965df76e 100644 --- a/tests/bundle/IO/EventListener/StreamFileListenerTest.php +++ b/tests/bundle/IO/EventListener/StreamFileListenerTest.php @@ -164,5 +164,3 @@ protected function createEvent($request) return $event; } } - -class_alias(StreamFileListenerTest::class, 'eZ\Bundle\EzPublishIOBundle\Tests\EventListener\StreamFileListenerTest'); diff --git a/tests/bundle/RepositoryInstaller/DependencyInjection/Compiler/InstallerTagPassTest.php b/tests/bundle/RepositoryInstaller/DependencyInjection/Compiler/InstallerTagPassTest.php index 0582363709..0dd8d5003b 100644 --- a/tests/bundle/RepositoryInstaller/DependencyInjection/Compiler/InstallerTagPassTest.php +++ b/tests/bundle/RepositoryInstaller/DependencyInjection/Compiler/InstallerTagPassTest.php @@ -54,5 +54,3 @@ protected function registerCompilerPass(ContainerBuilder $container): void $container->addCompilerPass(new InstallerTagPass()); } } - -class_alias(InstallerTagPassTest::class, 'EzSystems\PlatformInstallerBundleTests\DependencyInjection\Compiler\InstallerTagPassTest'); diff --git a/tests/bundle/RepositoryInstaller/DependencyInjection/IbexaInstallerExtensionTest.php b/tests/bundle/RepositoryInstaller/DependencyInjection/IbexaInstallerExtensionTest.php index 56b4533d56..e4a48f7812 100644 --- a/tests/bundle/RepositoryInstaller/DependencyInjection/IbexaInstallerExtensionTest.php +++ b/tests/bundle/RepositoryInstaller/DependencyInjection/IbexaInstallerExtensionTest.php @@ -56,5 +56,3 @@ protected function getContainerExtensions(): array ]; } } - -class_alias(IbexaInstallerExtensionTest::class, 'EzSystems\PlatformInstallerBundleTests\DependencyInjection\EzSystemsPlatformInstallerExtensionTest'); diff --git a/tests/bundle/RepositoryInstaller/IbexaRepositoryInstallerBundleTest.php b/tests/bundle/RepositoryInstaller/IbexaRepositoryInstallerBundleTest.php index 323370c693..aab4504a96 100644 --- a/tests/bundle/RepositoryInstaller/IbexaRepositoryInstallerBundleTest.php +++ b/tests/bundle/RepositoryInstaller/IbexaRepositoryInstallerBundleTest.php @@ -58,5 +58,3 @@ public function testBuildFailsWithoutDoctrineSchemaBundle(): void $this->bundle->build($container); } } - -class_alias(IbexaRepositoryInstallerBundleTest::class, 'EzSystems\PlatformInstallerBundleTests\EzSystemsPlatformInstallerBundleTest'); diff --git a/tests/integration/Core/BaseCoreFieldTypeIntegrationTest.php b/tests/integration/Core/BaseCoreFieldTypeIntegrationTest.php index 27323e8659..9b21026ebd 100644 --- a/tests/integration/Core/BaseCoreFieldTypeIntegrationTest.php +++ b/tests/integration/Core/BaseCoreFieldTypeIntegrationTest.php @@ -52,5 +52,3 @@ protected function getDatabaseConnection(): Connection } } } - -class_alias(BaseCoreFieldTypeIntegrationTest::class, 'eZ\Publish\Core\FieldType\Tests\Integration\BaseCoreFieldTypeIntegrationTest'); diff --git a/tests/integration/Core/BaseGatewayTest.php b/tests/integration/Core/BaseGatewayTest.php index 22ab21975a..610e492bed 100644 --- a/tests/integration/Core/BaseGatewayTest.php +++ b/tests/integration/Core/BaseGatewayTest.php @@ -21,5 +21,3 @@ protected function setUp(): void $this->repository = (new Legacy())->getRepository(true); } } - -class_alias(BaseGatewayTest::class, 'eZ\Publish\SPI\Tests\BaseGatewayTest'); diff --git a/tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageGatewayTest.php b/tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageGatewayTest.php index d4e8f0a2f3..4b9e9e3f5d 100644 --- a/tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageGatewayTest.php +++ b/tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageGatewayTest.php @@ -91,5 +91,3 @@ public function testStoreFileReference(): void self::assertEquals($expected, $data); } } - -class_alias(BinaryBaseStorageGatewayTest::class, 'eZ\Publish\Core\FieldType\Tests\Integration\BinaryBase\BinaryBaseStorage\BinaryBaseStorageGatewayTest'); diff --git a/tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php b/tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php index df7e0aa385..7caeab4292 100644 --- a/tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php +++ b/tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php @@ -169,5 +169,3 @@ protected function getStorageGateway(): Gateway return new DoctrineStorage($this->getDatabaseConnection()); } } - -class_alias(BinaryBaseStorageTest::class, 'eZ\Publish\Core\FieldType\Tests\Integration\BinaryBase\BinaryBaseStorage\BinaryBaseStorageTest'); diff --git a/tests/integration/Core/Limitation/PermissionResolver/LanguageLimitationIntegrationTest.php b/tests/integration/Core/Limitation/PermissionResolver/LanguageLimitationIntegrationTest.php index 17d77462f2..edca3de52b 100644 --- a/tests/integration/Core/Limitation/PermissionResolver/LanguageLimitationIntegrationTest.php +++ b/tests/integration/Core/Limitation/PermissionResolver/LanguageLimitationIntegrationTest.php @@ -276,5 +276,3 @@ public function testCanUserDeleteContentTranslation(array $limitations, string $ $this->assertCanUser($expectedResult, 'content', 'remove', $limitations, $content, [$target]); } } - -class_alias(LanguageLimitationIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\Limitation\PermissionResolver\LanguageLimitationIntegrationTest'); diff --git a/tests/integration/Core/Persistence/Filter/Doctrine/FilteringQueryBuilderTest.php b/tests/integration/Core/Persistence/Filter/Doctrine/FilteringQueryBuilderTest.php index af2c9c5c88..ba52bbb698 100644 --- a/tests/integration/Core/Persistence/Filter/Doctrine/FilteringQueryBuilderTest.php +++ b/tests/integration/Core/Persistence/Filter/Doctrine/FilteringQueryBuilderTest.php @@ -65,5 +65,3 @@ public function testJoinOnceThrowsDatabaseError(): void $this->queryBuilder->joinOnce('f', 'bar', 'b', 'f.bar_id = b.id'); } } - -class_alias(FilteringQueryBuilderTest::class, 'eZ\Publish\SPI\Tests\Persistence\Filter\Doctrine\FilteringQueryBuilderTest'); diff --git a/tests/integration/Core/Persistence/Search/Content/IndexerGatewayTest.php b/tests/integration/Core/Persistence/Search/Content/IndexerGatewayTest.php index 06b29fd87f..7e5741aaa8 100644 --- a/tests/integration/Core/Persistence/Search/Content/IndexerGatewayTest.php +++ b/tests/integration/Core/Persistence/Search/Content/IndexerGatewayTest.php @@ -133,5 +133,3 @@ public function testGetAllContent(): void self::assertSame(18, $this->gateway->countAllContent()); } } - -class_alias(IndexerGatewayTest::class, 'eZ\Publish\SPI\Tests\Search\Content\IndexerGatewayTest'); diff --git a/tests/integration/Core/Persistence/Variation/InMemoryVariationHandler.php b/tests/integration/Core/Persistence/Variation/InMemoryVariationHandler.php index 638084f9c8..748e137b73 100644 --- a/tests/integration/Core/Persistence/Variation/InMemoryVariationHandler.php +++ b/tests/integration/Core/Persistence/Variation/InMemoryVariationHandler.php @@ -26,5 +26,3 @@ public function getVariation( ]); } } - -class_alias(InMemoryVariationHandler::class, 'eZ\Publish\SPI\Tests\Variation\InMemoryVariationHandler'); diff --git a/tests/integration/Core/Repository/BaseContentServiceTest.php b/tests/integration/Core/Repository/BaseContentServiceTest.php index d8e0c29954..284d805c8c 100644 --- a/tests/integration/Core/Repository/BaseContentServiceTest.php +++ b/tests/integration/Core/Repository/BaseContentServiceTest.php @@ -432,5 +432,3 @@ protected function createContentDraft( return $contentDraft; } } - -class_alias(BaseContentServiceTest::class, 'eZ\Publish\API\Repository\Tests\BaseContentServiceTest'); diff --git a/tests/integration/Core/Repository/BaseContentTypeServiceTest.php b/tests/integration/Core/Repository/BaseContentTypeServiceTest.php index c7089d440d..f60767dec0 100644 --- a/tests/integration/Core/Repository/BaseContentTypeServiceTest.php +++ b/tests/integration/Core/Repository/BaseContentTypeServiceTest.php @@ -165,5 +165,3 @@ protected function createContentDraft() return $draft; } } - -class_alias(BaseContentTypeServiceTest::class, 'eZ\Publish\API\Repository\Tests\BaseContentTypeServiceTest'); diff --git a/tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php b/tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php index 87a0b41252..f5c4b9a9fa 100644 --- a/tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php +++ b/tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php @@ -200,5 +200,3 @@ protected function updateTestContent($initialLanguageCode, array $fieldValues) return $contentService->loadContent($content->id, null, $content->versionInfo->versionNo); } } - -class_alias(BaseNonRedundantFieldSetTest::class, 'eZ\Publish\API\Repository\Tests\BaseNonRedundantFieldSetTest'); diff --git a/tests/integration/Core/Repository/BaseTest.php b/tests/integration/Core/Repository/BaseTest.php index 834fc0c696..f746b8d511 100644 --- a/tests/integration/Core/Repository/BaseTest.php +++ b/tests/integration/Core/Repository/BaseTest.php @@ -886,5 +886,3 @@ protected function loginAsUser(UserReference $user): void $this->getRepository(false)->getPermissionResolver()->setCurrentUserReference($user); } } - -class_alias(BaseTest::class, 'eZ\Publish\API\Repository\Tests\BaseTest'); diff --git a/tests/integration/Core/Repository/BaseTrashServiceTest.php b/tests/integration/Core/Repository/BaseTrashServiceTest.php index 78ad78a3f7..5e68e4a76a 100644 --- a/tests/integration/Core/Repository/BaseTrashServiceTest.php +++ b/tests/integration/Core/Repository/BaseTrashServiceTest.php @@ -59,5 +59,3 @@ protected function updateTrashedDate(int $locationId, int $newTimestamp): void $query->execute(); } } - -class_alias(BaseTrashServiceTest::class, 'eZ\Publish\API\Repository\Tests\BaseTrashServiceTest'); diff --git a/tests/integration/Core/Repository/BaseURLServiceTest.php b/tests/integration/Core/Repository/BaseURLServiceTest.php index dd4ce0443e..fcf5906e66 100644 --- a/tests/integration/Core/Repository/BaseURLServiceTest.php +++ b/tests/integration/Core/Repository/BaseURLServiceTest.php @@ -180,5 +180,3 @@ private function createUrlFieldDefinitionCreateStruct(ContentTypeService $conten return $urlFieldCreate; } } - -class_alias(BaseURLServiceTest::class, 'eZ\Publish\API\Repository\Tests\BaseURLServiceTest'); diff --git a/tests/integration/Core/Repository/BookmarkServiceTest.php b/tests/integration/Core/Repository/BookmarkServiceTest.php index 1464a5f3a9..0009ab2b74 100644 --- a/tests/integration/Core/Repository/BookmarkServiceTest.php +++ b/tests/integration/Core/Repository/BookmarkServiceTest.php @@ -153,5 +153,3 @@ public function testLoadBookmarks() }, $bookmarks->items)); } } - -class_alias(BookmarkServiceTest::class, 'eZ\Publish\API\Repository\Tests\BookmarkServiceTest'); diff --git a/tests/integration/Core/Repository/Common/SlugConverter.php b/tests/integration/Core/Repository/Common/SlugConverter.php index e0b3c1d890..a8d72a44d7 100644 --- a/tests/integration/Core/Repository/Common/SlugConverter.php +++ b/tests/integration/Core/Repository/Common/SlugConverter.php @@ -25,5 +25,3 @@ public function setConfigurationValue($key, $value) $this->configuration[$key] = $value; } } - -class_alias(SlugConverter::class, 'eZ\Publish\API\Repository\Tests\Common\SlugConverter'); diff --git a/tests/integration/Core/Repository/Container/Compiler/SetAllServicesPublicPass.php b/tests/integration/Core/Repository/Container/Compiler/SetAllServicesPublicPass.php index 898f5423f4..d022178472 100644 --- a/tests/integration/Core/Repository/Container/Compiler/SetAllServicesPublicPass.php +++ b/tests/integration/Core/Repository/Container/Compiler/SetAllServicesPublicPass.php @@ -55,5 +55,3 @@ public function process(ContainerBuilder $containerBuilder): void } } } - -class_alias(SetAllServicesPublicPass::class, 'eZ\Publish\API\Repository\Tests\Container\Compiler\SetAllServicesPublicPass'); diff --git a/tests/integration/Core/Repository/ContentService/VersionValidatorTest.php b/tests/integration/Core/Repository/ContentService/VersionValidatorTest.php index 97e2e13383..718a0c3a49 100644 --- a/tests/integration/Core/Repository/ContentService/VersionValidatorTest.php +++ b/tests/integration/Core/Repository/ContentService/VersionValidatorTest.php @@ -126,5 +126,3 @@ private function updateContentTranslation(Content $content): void $this->contentService->publishVersion($contentDraft->versionInfo); } } - -class_alias(VersionValidatorTest::class, 'eZ\Publish\API\Repository\Tests\ContentService\VersionValidatorTest'); diff --git a/tests/integration/Core/Repository/ContentServiceAuthorizationTest.php b/tests/integration/Core/Repository/ContentServiceAuthorizationTest.php index 2c97cba252..162b32d134 100644 --- a/tests/integration/Core/Repository/ContentServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/ContentServiceAuthorizationTest.php @@ -1344,5 +1344,3 @@ private function setRestrictedEditorUser(): void $this->permissionResolver->setCurrentUserReference($this->createAnonymousWithEditorRole()); } } - -class_alias(ContentServiceAuthorizationTest::class, 'eZ\Publish\API\Repository\Tests\ContentServiceAuthorizationTest'); diff --git a/tests/integration/Core/Repository/ContentServiceTest.php b/tests/integration/Core/Repository/ContentServiceTest.php index a13cd9368a..cbe2cc5c4a 100644 --- a/tests/integration/Core/Repository/ContentServiceTest.php +++ b/tests/integration/Core/Repository/ContentServiceTest.php @@ -6898,5 +6898,3 @@ private function createContentWithRelations(): Content return $draft; } } - -class_alias(ContentServiceTest::class, 'eZ\Publish\API\Repository\Tests\ContentServiceTest'); diff --git a/tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php b/tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php index bccc5ad49e..feb041b512 100644 --- a/tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php @@ -617,5 +617,3 @@ public function testUnassignContentTypeGroupThrowsUnauthorizedException() /* END: Use Case */ } } - -class_alias(ContentTypeServiceAuthorizationTest::class, 'eZ\Publish\API\Repository\Tests\ContentTypeServiceAuthorizationTest'); diff --git a/tests/integration/Core/Repository/ContentTypeServiceTest.php b/tests/integration/Core/Repository/ContentTypeServiceTest.php index d5b47f6b9a..34ab8e0793 100644 --- a/tests/integration/Core/Repository/ContentTypeServiceTest.php +++ b/tests/integration/Core/Repository/ContentTypeServiceTest.php @@ -4546,5 +4546,3 @@ public function testDeleteUserDrafts() $contentTypeDraft = $contentTypeService->loadContentTypeDraft($draft->id); } } - -class_alias(ContentTypeServiceTest::class, 'eZ\Publish\API\Repository\Tests\ContentTypeServiceTest'); diff --git a/tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php b/tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php index 5d89c6f9f3..edcb4759ae 100644 --- a/tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php @@ -533,5 +533,3 @@ protected function getFullTextIndexedFieldData() ]; } } - -class_alias(AuthorIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\AuthorIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php b/tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php index 0323e176c9..db760b6274 100644 --- a/tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php @@ -1222,5 +1222,3 @@ public function testDeleteTranslation() } } } - -class_alias(BaseIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\BaseIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php b/tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php index 9ab6935591..63362afc50 100644 --- a/tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php @@ -445,5 +445,3 @@ protected function getAdditionallyIndexedFieldData() ]; } } - -class_alias(BinaryFileIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\BinaryFileIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php b/tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php index 96cf46f389..5e89b06d14 100644 --- a/tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php @@ -425,5 +425,3 @@ private function createContentTypeWithCheckboxField(Repository $repository): Con return $contentTypeService->loadContentType($contentTypeDraft->id); } } - -class_alias(CheckboxIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\CheckboxIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php b/tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php index b1720e3e97..624e3dc6e1 100644 --- a/tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php @@ -478,5 +478,3 @@ protected function createTestContentType() return $contentType; } } - -class_alias(CountryIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\CountryIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php b/tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php index 00ef1ac6d1..b73865824d 100644 --- a/tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php @@ -359,5 +359,3 @@ protected function getSearchTargetValueTwo() return parent::getSearchTargetValueTwo(); } } - -class_alias(DateAndTimeIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\DateAndTimeIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/DateIntegrationTest.php b/tests/integration/Core/Repository/FieldType/DateIntegrationTest.php index 32bfc438e8..d80ff979d8 100644 --- a/tests/integration/Core/Repository/FieldType/DateIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/DateIntegrationTest.php @@ -347,5 +347,3 @@ protected function getSearchTargetValueTwo() return '1970-01-03T00:00:00Z'; } } - -class_alias(DateIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\DateIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php b/tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php index 346146322f..9305134166 100644 --- a/tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php @@ -330,5 +330,3 @@ protected function getFullTextIndexedFieldData() ]; } } - -class_alias(EmailAddressIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\EmailAddressIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php b/tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php index 9b00ad50d1..d2c0dcc2d5 100644 --- a/tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php @@ -221,5 +221,3 @@ public function testUpdateWithRemove() $this->testIsEmptyValue($updatedContent->getFieldValue('data')); } } - -class_alias(FileSearchBaseIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\FileSearchBaseIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php b/tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php index 45acf25fed..b9aa74d719 100644 --- a/tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php @@ -314,5 +314,3 @@ public function checkFullTextSupport(): bool return false; } } - -class_alias(FloatIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\FloatIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php b/tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php index f7d661e9dd..372fd1da89 100644 --- a/tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php @@ -327,5 +327,3 @@ protected function getFullTextIndexedFieldData() ]; } } - -class_alias(ISBNIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\ISBNIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php b/tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php index 8f3c5e7687..5019f52ad4 100644 --- a/tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php @@ -989,5 +989,3 @@ private function assertImageExists(bool $expectExists, IOServiceInterface $ioSer self::assertSame($expectExists, $ioService->exists($imageFieldValue->id)); } } - -class_alias(ImageIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\ImageIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php b/tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php index 443ad6d7e7..c46c4705bc 100644 --- a/tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php @@ -318,5 +318,3 @@ protected function getFullTextIndexedFieldData() ]; } } - -class_alias(IntegerIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\IntegerIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php b/tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php index 5059b4079e..da9e18cd3e 100644 --- a/tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php @@ -592,5 +592,3 @@ public function testFindContentFieldCriterion() self::assertEquals(1, $searchResult->totalCount); } } - -class_alias(KeywordIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\KeywordIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php b/tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php index 10e165f900..2bba30b21a 100644 --- a/tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php @@ -328,5 +328,3 @@ public function providerForTestIsNotEmptyValue() ]; } } - -class_alias(MapLocationIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\MapLocationIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php b/tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php index 6fd07dff31..75534b2652 100644 --- a/tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php @@ -449,5 +449,3 @@ protected function getAdditionallyIndexedFieldData() ]; } } - -class_alias(MediaIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\MediaIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php b/tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php index d51cef9ee4..f7ca3c9568 100644 --- a/tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php @@ -377,5 +377,3 @@ protected function getValidSearchValueTwo() return 4; } } - -class_alias(RelationIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\RelationIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php b/tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php index 17c0969357..cfcce0d3bd 100644 --- a/tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php @@ -412,5 +412,3 @@ protected function getValidMultivaluedSearchValuesTwo() return [13, 14]; } } - -class_alias(RelationListIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\RelationListIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/RelationSearchBaseIntegrationTestTrait.php b/tests/integration/Core/Repository/FieldType/RelationSearchBaseIntegrationTestTrait.php index 8e451ecdbc..f699b6f595 100644 --- a/tests/integration/Core/Repository/FieldType/RelationSearchBaseIntegrationTestTrait.php +++ b/tests/integration/Core/Repository/FieldType/RelationSearchBaseIntegrationTestTrait.php @@ -167,5 +167,3 @@ public function testSubtreeCopyContentCopiesFieldRelations() ); } } - -class_alias(RelationSearchBaseIntegrationTestTrait::class, 'eZ\Publish\API\Repository\Tests\FieldType\RelationSearchBaseIntegrationTestTrait'); diff --git a/tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php b/tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php index f966ee45c2..3bd9445f90 100644 --- a/tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php @@ -1595,5 +1595,3 @@ protected function assertSortResult( self::assertEquals($contentTwoId, $contentIdList[$indexTwo]); } } - -class_alias(SearchBaseIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\SearchBaseIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php b/tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php index c82f0d95ce..705afec4c0 100644 --- a/tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php @@ -807,5 +807,3 @@ public function testFindMultivaluedNotBetweenTwoOne($valuesOne, $valuesTwo, $fil } } } - -class_alias(SearchMultivaluedBaseIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\SearchMultivaluedBaseIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php b/tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php index dc98f3ece9..3a3e014c35 100644 --- a/tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php @@ -390,5 +390,3 @@ protected function getFullTextIndexedFieldData() ]; } } - -class_alias(SelectionIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\SelectionIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php b/tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php index f239a192bb..f96272f3a3 100644 --- a/tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php @@ -124,5 +124,3 @@ protected function getFullTextIndexedFieldData() ]; } } - -class_alias(SelectionMultilingualIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\SelectionMultilingualIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php b/tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php index 11f45da53d..2331884b5e 100644 --- a/tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php @@ -315,5 +315,3 @@ protected function getFullTextIndexedFieldData() ]; } } - -class_alias(TextBlockIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\TextBlockIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php b/tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php index e25db83a85..9380755b46 100644 --- a/tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php @@ -333,5 +333,3 @@ protected function getFullTextIndexedFieldData() ]; } } - -class_alias(TextLineIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\TextLineIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php b/tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php index 05992bdeba..246bea5fa6 100644 --- a/tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php @@ -337,5 +337,3 @@ protected function getSearchTargetValueTwo() return 14400; } } - -class_alias(TimeIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\TimeIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php b/tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php index 7243d0fbd7..5d0b1aecbd 100644 --- a/tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php @@ -338,5 +338,3 @@ protected function getFullTextIndexedFieldData() ]; } } - -class_alias(UrlIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\UrlIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldType/UserIntegrationTest.php b/tests/integration/Core/Repository/FieldType/UserIntegrationTest.php index 473d3c905d..5c798c2f24 100644 --- a/tests/integration/Core/Repository/FieldType/UserIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/UserIntegrationTest.php @@ -529,5 +529,3 @@ private function getUserFieldDefinition(ContentType $contentType): FieldDefiniti return $fieldDefinition; } } - -class_alias(UserIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\FieldType\UserIntegrationTest'); diff --git a/tests/integration/Core/Repository/FieldTypeServiceTest.php b/tests/integration/Core/Repository/FieldTypeServiceTest.php index 22f0648a3b..b296579223 100644 --- a/tests/integration/Core/Repository/FieldTypeServiceTest.php +++ b/tests/integration/Core/Repository/FieldTypeServiceTest.php @@ -130,5 +130,3 @@ public function testHasFieldTypeReturnsFalse() self::assertFalse($typeExists); } } - -class_alias(FieldTypeServiceTest::class, 'eZ\Publish\API\Repository\Tests\FieldTypeServiceTest'); diff --git a/tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php b/tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php index 6118035a9a..1a270e9de9 100644 --- a/tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php +++ b/tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php @@ -423,5 +423,3 @@ protected function buildFilter(callable $filterFactory, Content $parentFolder): return $filterFactory($parentFolder); } } - -class_alias(BaseRepositoryFilteringTestCase::class, 'eZ\Publish\API\Repository\Tests\Filtering\BaseRepositoryFilteringTestCase'); diff --git a/tests/integration/Core/Repository/Filtering/ContentFilteringTest.php b/tests/integration/Core/Repository/Filtering/ContentFilteringTest.php index 5a26a80163..28e915d537 100644 --- a/tests/integration/Core/Repository/Filtering/ContentFilteringTest.php +++ b/tests/integration/Core/Repository/Filtering/ContentFilteringTest.php @@ -448,5 +448,3 @@ private function buildSearchQueryFromFilter(Filter $filter): Query ); } } - -class_alias(ContentFilteringTest::class, 'eZ\Publish\API\Repository\Tests\Filtering\ContentFilteringTest'); diff --git a/tests/integration/Core/Repository/Filtering/LocationFilteringTest.php b/tests/integration/Core/Repository/Filtering/LocationFilteringTest.php index f5d165f34d..07dee53c6f 100644 --- a/tests/integration/Core/Repository/Filtering/LocationFilteringTest.php +++ b/tests/integration/Core/Repository/Filtering/LocationFilteringTest.php @@ -117,5 +117,3 @@ private function buildSearchQueryFromFilter(Filter $filter): LocationQuery ); } } - -class_alias(LocationFilteringTest::class, 'eZ\Publish\API\Repository\Tests\Filtering\LocationFilteringTest'); diff --git a/tests/integration/Core/Repository/IdManager.php b/tests/integration/Core/Repository/IdManager.php index 7ad67ae022..6e74c3c2fd 100644 --- a/tests/integration/Core/Repository/IdManager.php +++ b/tests/integration/Core/Repository/IdManager.php @@ -38,5 +38,3 @@ abstract public function generateId($type, $rawId); */ abstract public function parseId($type, $id); } - -class_alias(IdManager::class, 'eZ\Publish\API\Repository\Tests\IdManager'); diff --git a/tests/integration/Core/Repository/LanguageServiceAuthorizationTest.php b/tests/integration/Core/Repository/LanguageServiceAuthorizationTest.php index 6756ee5acb..dd4eb9fc89 100644 --- a/tests/integration/Core/Repository/LanguageServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/LanguageServiceAuthorizationTest.php @@ -201,5 +201,3 @@ public function testDeleteLanguageThrowsUnauthorizedException() /* END: Use Case */ } } - -class_alias(LanguageServiceAuthorizationTest::class, 'eZ\Publish\API\Repository\Tests\LanguageServiceAuthorizationTest'); diff --git a/tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php b/tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php index 418e2360fe..31e8a0b759 100644 --- a/tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php +++ b/tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php @@ -92,5 +92,3 @@ public function testCreateMaximumLanguageLimit() $this->languageService->createLanguage($languageCreate); } } - -class_alias(LanguageServiceMaximumSupportedLanguagesTest::class, 'eZ\Publish\API\Repository\Tests\LanguageServiceMaximumSupportedLanguagesTest'); diff --git a/tests/integration/Core/Repository/LanguageServiceTest.php b/tests/integration/Core/Repository/LanguageServiceTest.php index 38d22dd396..ed3074ca1d 100644 --- a/tests/integration/Core/Repository/LanguageServiceTest.php +++ b/tests/integration/Core/Repository/LanguageServiceTest.php @@ -765,5 +765,3 @@ public function testUpdateLanguageNameInTransactionWithCommit() self::assertEquals('My English', $updatedLanguage->name); } } - -class_alias(LanguageServiceTest::class, 'eZ\Publish\API\Repository\Tests\LanguageServiceTest'); diff --git a/tests/integration/Core/Repository/Limitation/PermissionResolver/BaseLimitationIntegrationTest.php b/tests/integration/Core/Repository/Limitation/PermissionResolver/BaseLimitationIntegrationTest.php index 2b88fa6d15..701be01963 100644 --- a/tests/integration/Core/Repository/Limitation/PermissionResolver/BaseLimitationIntegrationTest.php +++ b/tests/integration/Core/Repository/Limitation/PermissionResolver/BaseLimitationIntegrationTest.php @@ -100,5 +100,3 @@ protected function assertCanUser( ); } } - -class_alias(BaseLimitationIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\Limitation\PermissionResolver\BaseLimitationIntegrationTest'); diff --git a/tests/integration/Core/Repository/Limitation/PermissionResolver/ContentLimitationsMixIntegrationTest.php b/tests/integration/Core/Repository/Limitation/PermissionResolver/ContentLimitationsMixIntegrationTest.php index 33606bbfc7..127a9ac61a 100644 --- a/tests/integration/Core/Repository/Limitation/PermissionResolver/ContentLimitationsMixIntegrationTest.php +++ b/tests/integration/Core/Repository/Limitation/PermissionResolver/ContentLimitationsMixIntegrationTest.php @@ -116,5 +116,3 @@ private function getCommonLimitations(): array ]; } } - -class_alias(ContentLimitationsMixIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\Limitation\PermissionResolver\ContentLimitationsMixIntegrationTest'); diff --git a/tests/integration/Core/Repository/Limitation/PermissionResolver/LocationLimitationIntegrationTest.php b/tests/integration/Core/Repository/Limitation/PermissionResolver/LocationLimitationIntegrationTest.php index f1eceeb6fe..474cb3a77b 100644 --- a/tests/integration/Core/Repository/Limitation/PermissionResolver/LocationLimitationIntegrationTest.php +++ b/tests/integration/Core/Repository/Limitation/PermissionResolver/LocationLimitationIntegrationTest.php @@ -95,5 +95,3 @@ static function (Repository $repository) use ($location) { ); } } - -class_alias(LocationLimitationIntegrationTest::class, 'eZ\Publish\API\Repository\Tests\Limitation\PermissionResolver\LocationLimitationIntegrationTest'); diff --git a/tests/integration/Core/Repository/LocationServiceAuthorizationTest.php b/tests/integration/Core/Repository/LocationServiceAuthorizationTest.php index b00d9dbc3d..0209c446a0 100644 --- a/tests/integration/Core/Repository/LocationServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/LocationServiceAuthorizationTest.php @@ -639,5 +639,3 @@ public function testMoveSubtreeThrowsUnauthorizedException() /* END: Use Case */ } } - -class_alias(LocationServiceAuthorizationTest::class, 'eZ\Publish\API\Repository\Tests\LocationServiceAuthorizationTest'); diff --git a/tests/integration/Core/Repository/LocationServiceTest.php b/tests/integration/Core/Repository/LocationServiceTest.php index 4f14bcadd0..794b43676c 100644 --- a/tests/integration/Core/Repository/LocationServiceTest.php +++ b/tests/integration/Core/Repository/LocationServiceTest.php @@ -3757,5 +3757,3 @@ static function (URLAlias $alias) use ($expectedAliasPath) { ); } } - -class_alias(LocationServiceTest::class, 'eZ\Publish\API\Repository\Tests\LocationServiceTest'); diff --git a/tests/integration/Core/Repository/NonRedundantFieldSetTest.php b/tests/integration/Core/Repository/NonRedundantFieldSetTest.php index 502e088a39..2ad7c523e1 100644 --- a/tests/integration/Core/Repository/NonRedundantFieldSetTest.php +++ b/tests/integration/Core/Repository/NonRedundantFieldSetTest.php @@ -814,5 +814,3 @@ protected function mapFields(array $fields) return $mappedFields; } } - -class_alias(NonRedundantFieldSetTest::class, 'eZ\Publish\API\Repository\Tests\NonRedundantFieldSetTest'); diff --git a/tests/integration/Core/Repository/NotificationServiceTest.php b/tests/integration/Core/Repository/NotificationServiceTest.php index ecdb333b49..eb6186093d 100644 --- a/tests/integration/Core/Repository/NotificationServiceTest.php +++ b/tests/integration/Core/Repository/NotificationServiceTest.php @@ -202,5 +202,3 @@ public function testCreateNotificationThrowsInvalidArgumentExceptionOnMissingTyp /* END: Use Case */ } } - -class_alias(NotificationServiceTest::class, 'eZ\Publish\API\Repository\Tests\NotificationServiceTest'); diff --git a/tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php b/tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php index 66811e9b9f..db3ad3e695 100644 --- a/tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php @@ -376,5 +376,3 @@ public function testSetContentStateThrowsUnauthorizedException() /* END: Use Case */ } } - -class_alias(ObjectStateServiceAuthorizationTest::class, 'eZ\Publish\API\Repository\Tests\ObjectStateServiceAuthorizationTest'); diff --git a/tests/integration/Core/Repository/ObjectStateServiceTest.php b/tests/integration/Core/Repository/ObjectStateServiceTest.php index e283dfd97f..bf3a553cb4 100644 --- a/tests/integration/Core/Repository/ObjectStateServiceTest.php +++ b/tests/integration/Core/Repository/ObjectStateServiceTest.php @@ -1920,5 +1920,3 @@ private function createObjectState( ); } } - -class_alias(ObjectStateServiceTest::class, 'eZ\Publish\API\Repository\Tests\ObjectStateServiceTest'); diff --git a/tests/integration/Core/Repository/Parallel/BaseParallelTestCase.php b/tests/integration/Core/Repository/Parallel/BaseParallelTestCase.php index 6f95602cc5..b7c794a9f0 100644 --- a/tests/integration/Core/Repository/Parallel/BaseParallelTestCase.php +++ b/tests/integration/Core/Repository/Parallel/BaseParallelTestCase.php @@ -56,5 +56,3 @@ protected function runParallelProcesses(ParallelProcessList $list): void $connection->connect(); } } - -class_alias(BaseParallelTestCase::class, 'eZ\Publish\API\Repository\Tests\Parallel\BaseParallelTestCase'); diff --git a/tests/integration/Core/Repository/Parallel/ContentServiceTest.php b/tests/integration/Core/Repository/Parallel/ContentServiceTest.php index 71a2dc0822..0adfb8a436 100644 --- a/tests/integration/Core/Repository/Parallel/ContentServiceTest.php +++ b/tests/integration/Core/Repository/Parallel/ContentServiceTest.php @@ -54,5 +54,3 @@ public function testPublishMultipleVersions(): void ); } } - -class_alias(ContentServiceTest::class, 'eZ\Publish\API\Repository\Tests\Parallel\ContentServiceTest'); diff --git a/tests/integration/Core/Repository/PermissionResolverTest.php b/tests/integration/Core/Repository/PermissionResolverTest.php index 90e1f3f8c1..982e898f8f 100644 --- a/tests/integration/Core/Repository/PermissionResolverTest.php +++ b/tests/integration/Core/Repository/PermissionResolverTest.php @@ -1382,5 +1382,3 @@ private function getContentCreateStruct( return $contentCreateStruct; } } - -class_alias(PermissionResolverTest::class, 'eZ\Publish\API\Repository\Tests\PermissionResolverTest'); diff --git a/tests/integration/Core/Repository/Regression/EZP20018LanguageTest.php b/tests/integration/Core/Repository/Regression/EZP20018LanguageTest.php index 9f5fef50d0..21c9d61d26 100644 --- a/tests/integration/Core/Repository/Regression/EZP20018LanguageTest.php +++ b/tests/integration/Core/Repository/Regression/EZP20018LanguageTest.php @@ -115,5 +115,3 @@ public function testSearchOnNotUsedInstalledLanguageGivesNoResult() self::assertEquals($results->totalCount, count($results->searchHits)); } } - -class_alias(EZP20018LanguageTest::class, 'eZ\Publish\API\Repository\Tests\Regression\EZP20018LanguageTest'); diff --git a/tests/integration/Core/Repository/Regression/EZP20018ObjectStateTest.php b/tests/integration/Core/Repository/Regression/EZP20018ObjectStateTest.php index edab5ef2b1..91c5484303 100644 --- a/tests/integration/Core/Repository/Regression/EZP20018ObjectStateTest.php +++ b/tests/integration/Core/Repository/Regression/EZP20018ObjectStateTest.php @@ -77,5 +77,3 @@ public function testSearchForUsedObjectState() self::assertCount($results2->totalCount, $results2->searchHits); } } - -class_alias(EZP20018ObjectStateTest::class, 'eZ\Publish\API\Repository\Tests\Regression\EZP20018ObjectStateTest'); diff --git a/tests/integration/Core/Repository/Regression/EZP20018VisibilityTest.php b/tests/integration/Core/Repository/Regression/EZP20018VisibilityTest.php index b805ad65fa..3ecc0e0c5a 100644 --- a/tests/integration/Core/Repository/Regression/EZP20018VisibilityTest.php +++ b/tests/integration/Core/Repository/Regression/EZP20018VisibilityTest.php @@ -69,5 +69,3 @@ public function testSearchForVisibleContent() self::assertEquals($results2->totalCount, count($results2->searchHits)); } } - -class_alias(EZP20018VisibilityTest::class, 'eZ\Publish\API\Repository\Tests\Regression\EZP20018VisibilityTest'); diff --git a/tests/integration/Core/Repository/Regression/EZP21069Test.php b/tests/integration/Core/Repository/Regression/EZP21069Test.php index 8d2ceba13d..cafd165695 100644 --- a/tests/integration/Core/Repository/Regression/EZP21069Test.php +++ b/tests/integration/Core/Repository/Regression/EZP21069Test.php @@ -114,5 +114,3 @@ public function testSearchOnDraftAttributeContentGivesNoResult() self::assertEmpty($results->searchHits); } } - -class_alias(EZP21069Test::class, 'eZ\Publish\API\Repository\Tests\Regression\EZP21069Test'); diff --git a/tests/integration/Core/Repository/Regression/EZP21089Test.php b/tests/integration/Core/Repository/Regression/EZP21089Test.php index e41559e0e3..79249e3176 100644 --- a/tests/integration/Core/Repository/Regression/EZP21089Test.php +++ b/tests/integration/Core/Repository/Regression/EZP21089Test.php @@ -124,5 +124,3 @@ public function testCreateContent() ); } } - -class_alias(EZP21089Test::class, 'eZ\Publish\API\Repository\Tests\Regression\EZP21089Test'); diff --git a/tests/integration/Core/Repository/Regression/EZP21109EzIntegerTest.php b/tests/integration/Core/Repository/Regression/EZP21109EzIntegerTest.php index 33d02b7e95..eb1ca7deea 100644 --- a/tests/integration/Core/Repository/Regression/EZP21109EzIntegerTest.php +++ b/tests/integration/Core/Repository/Regression/EZP21109EzIntegerTest.php @@ -142,5 +142,3 @@ protected function deleteTestContentType() } } } - -class_alias(EZP21109EzIntegerTest::class, 'eZ\Publish\API\Repository\Tests\Regression\EZP21109EzIntegerTest'); diff --git a/tests/integration/Core/Repository/Regression/EZP21771EzStringTest.php b/tests/integration/Core/Repository/Regression/EZP21771EzStringTest.php index ae38b987b6..610a4902f7 100644 --- a/tests/integration/Core/Repository/Regression/EZP21771EzStringTest.php +++ b/tests/integration/Core/Repository/Regression/EZP21771EzStringTest.php @@ -55,5 +55,3 @@ public function test11NumbersOnEzString() ); } } - -class_alias(EZP21771EzStringTest::class, 'eZ\Publish\API\Repository\Tests\Regression\EZP21771EzStringTest'); diff --git a/tests/integration/Core/Repository/Regression/EZP21798Test.php b/tests/integration/Core/Repository/Regression/EZP21798Test.php index ea7221b4f2..590a4f3a6a 100644 --- a/tests/integration/Core/Repository/Regression/EZP21798Test.php +++ b/tests/integration/Core/Repository/Regression/EZP21798Test.php @@ -112,5 +112,3 @@ public function testRoleChanges() $contentService->loadContent($contentInfoarticle->id); } } - -class_alias(EZP21798Test::class, 'eZ\Publish\API\Repository\Tests\Regression\EZP21798Test'); diff --git a/tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php b/tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php index 23f7dd0e6d..0a78fad519 100644 --- a/tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php +++ b/tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php @@ -221,5 +221,3 @@ public function searchContentQueryProvider() ]; } } - -class_alias(EZP21906SearchOneContentMultipleLocationsTest::class, 'eZ\Publish\API\Repository\Tests\Regression\EZP21906SearchOneContentMultipleLocationsTest'); diff --git a/tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php b/tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php index ad04aefdde..c272748e9d 100644 --- a/tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php +++ b/tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php @@ -181,5 +181,3 @@ private function getLocationCreateStruct() return $this->getRepository()->getLocationService()->newLocationCreateStruct(2); } } - -class_alias(EZP22408DeleteRelatedObjectTest::class, 'eZ\Publish\API\Repository\Tests\Regression\EZP22408DeleteRelatedObjectTest'); diff --git a/tests/integration/Core/Repository/Regression/EZP22409RelationListTypeStateTest.php b/tests/integration/Core/Repository/Regression/EZP22409RelationListTypeStateTest.php index 2c8933e351..fba7847e34 100644 --- a/tests/integration/Core/Repository/Regression/EZP22409RelationListTypeStateTest.php +++ b/tests/integration/Core/Repository/Regression/EZP22409RelationListTypeStateTest.php @@ -156,5 +156,3 @@ private function createContentWithRelationList() $content2 = $contentService->publishVersion($draft2->versionInfo); } } - -class_alias(EZP22409RelationListTypeStateTest::class, 'eZ\Publish\API\Repository\Tests\Regression\EZP22409RelationListTypeStateTest'); diff --git a/tests/integration/Core/Repository/Regression/EZP22612URLAliasTranslations.php b/tests/integration/Core/Repository/Regression/EZP22612URLAliasTranslations.php index 8623383b92..80a7e74879 100644 --- a/tests/integration/Core/Repository/Regression/EZP22612URLAliasTranslations.php +++ b/tests/integration/Core/Repository/Regression/EZP22612URLAliasTranslations.php @@ -61,5 +61,3 @@ public function testURLAliasLoadedInRightLanguage() ); } } - -class_alias(EZP22612URLAliasTranslations::class, 'eZ\Publish\API\Repository\Tests\Regression\EZP22612URLAliasTranslations'); diff --git a/tests/integration/Core/Repository/Regression/EZP22840RoleLimitations.php b/tests/integration/Core/Repository/Regression/EZP22840RoleLimitations.php index 6e9f64e5a2..4629a1e11f 100644 --- a/tests/integration/Core/Repository/Regression/EZP22840RoleLimitations.php +++ b/tests/integration/Core/Repository/Regression/EZP22840RoleLimitations.php @@ -88,5 +88,3 @@ public function testSectionRoleAssignLimitation() ); } } - -class_alias(EZP22840RoleLimitations::class, 'eZ\Publish\API\Repository\Tests\Regression\EZP22840RoleLimitations'); diff --git a/tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php b/tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php index 96e5343265..ff8da3162f 100644 --- a/tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php +++ b/tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php @@ -85,5 +85,3 @@ public function searchContentQueryWithInvalidDataProvider() ]; } } - -class_alias(EZP22958SearchSubtreePathstringFormatTest::class, 'eZ\Publish\API\Repository\Tests\Regression\EZP22958SearchSubtreePathstringFormatTest'); diff --git a/tests/integration/Core/Repository/Regression/EZP26327UrlAliasHistorizationTest.php b/tests/integration/Core/Repository/Regression/EZP26327UrlAliasHistorizationTest.php index 6fddc007a8..0e65134c73 100644 --- a/tests/integration/Core/Repository/Regression/EZP26327UrlAliasHistorizationTest.php +++ b/tests/integration/Core/Repository/Regression/EZP26327UrlAliasHistorizationTest.php @@ -53,5 +53,3 @@ public function testHistorization() self::assertTrue($historyAlias->isHistory); } } - -class_alias(EZP26327UrlAliasHistorizationTest::class, 'eZ\Publish\API\Repository\Tests\Regression\EZP26327UrlAliasHistorizationTest'); diff --git a/tests/integration/Core/Repository/Regression/EZP26367UrlAliasHistoryRedirectLoopTest.php b/tests/integration/Core/Repository/Regression/EZP26367UrlAliasHistoryRedirectLoopTest.php index 860906fc6d..79a7b9cf0c 100644 --- a/tests/integration/Core/Repository/Regression/EZP26367UrlAliasHistoryRedirectLoopTest.php +++ b/tests/integration/Core/Repository/Regression/EZP26367UrlAliasHistoryRedirectLoopTest.php @@ -161,5 +161,3 @@ public function testLookupHistoryUrlReturnsActiveAlias() self::assertTrue($urlAliasHistorized->isHistory); } } - -class_alias(EZP26367UrlAliasHistoryRedirectLoopTest::class, 'eZ\Publish\API\Repository\Tests\Regression\EZP26367UrlAliasHistoryRedirectLoopTest'); diff --git a/tests/integration/Core/Repository/Regression/EZP26551DeleteContentTypeDraftTest.php b/tests/integration/Core/Repository/Regression/EZP26551DeleteContentTypeDraftTest.php index 65ad643479..275380d794 100644 --- a/tests/integration/Core/Repository/Regression/EZP26551DeleteContentTypeDraftTest.php +++ b/tests/integration/Core/Repository/Regression/EZP26551DeleteContentTypeDraftTest.php @@ -51,5 +51,3 @@ public function testDeleteContentTypeGroup() } } } - -class_alias(EZP26551DeleteContentTypeDraftTest::class, 'eZ\Publish\API\Repository\Tests\Regression\EZP26551DeleteContentTypeDraftTest'); diff --git a/tests/integration/Core/Repository/Regression/EZP28799SubtreeSearchTest.php b/tests/integration/Core/Repository/Regression/EZP28799SubtreeSearchTest.php index ae0f128a92..7f46a1c5c2 100644 --- a/tests/integration/Core/Repository/Regression/EZP28799SubtreeSearchTest.php +++ b/tests/integration/Core/Repository/Regression/EZP28799SubtreeSearchTest.php @@ -104,5 +104,3 @@ public function testNegativeSubtree() self::assertSame(0, $result->totalCount); } } - -class_alias(EZP28799SubtreeSearchTest::class, 'eZ\Publish\API\Repository\Tests\Regression\EZP28799SubtreeSearchTest'); diff --git a/tests/integration/Core/Repository/Regression/EnvTest.php b/tests/integration/Core/Repository/Regression/EnvTest.php index 88ef62da4c..9296c9eed8 100644 --- a/tests/integration/Core/Repository/Regression/EnvTest.php +++ b/tests/integration/Core/Repository/Regression/EnvTest.php @@ -44,5 +44,3 @@ public function testVerifyCacheDriver() } } } - -class_alias(EnvTest::class, 'eZ\Publish\API\Repository\Tests\Regression\EnvTest'); diff --git a/tests/integration/Core/Repository/Regression/PureNegativeQueryTest.php b/tests/integration/Core/Repository/Regression/PureNegativeQueryTest.php index 783866aefe..b5002bb318 100644 --- a/tests/integration/Core/Repository/Regression/PureNegativeQueryTest.php +++ b/tests/integration/Core/Repository/Regression/PureNegativeQueryTest.php @@ -289,5 +289,3 @@ public function testMatchAllLocationFilter($criterion, $totalCount) self::assertEquals($totalCount, $result->totalCount); } } - -class_alias(PureNegativeQueryTest::class, 'eZ\Publish\API\Repository\Tests\Regression\PureNegativeQueryTest'); diff --git a/tests/integration/Core/Repository/RepositoryTest.php b/tests/integration/Core/Repository/RepositoryTest.php index 5e0e2a3dc6..8784b2fdea 100644 --- a/tests/integration/Core/Repository/RepositoryTest.php +++ b/tests/integration/Core/Repository/RepositoryTest.php @@ -308,5 +308,3 @@ public function testRollbackThrowsRuntimeException() $repository->rollback(); } } - -class_alias(RepositoryTest::class, 'eZ\Publish\API\Repository\Tests\RepositoryTest'); diff --git a/tests/integration/Core/Repository/RoleServiceAuthorizationTest.php b/tests/integration/Core/Repository/RoleServiceAuthorizationTest.php index 8a36532a93..11a30eeaae 100644 --- a/tests/integration/Core/Repository/RoleServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/RoleServiceAuthorizationTest.php @@ -693,5 +693,3 @@ private function createRole() return $role; } } - -class_alias(RoleServiceAuthorizationTest::class, 'eZ\Publish\API\Repository\Tests\RoleServiceAuthorizationTest'); diff --git a/tests/integration/Core/Repository/RoleServiceTest.php b/tests/integration/Core/Repository/RoleServiceTest.php index 4e2d424375..2f7b6ee588 100644 --- a/tests/integration/Core/Repository/RoleServiceTest.php +++ b/tests/integration/Core/Repository/RoleServiceTest.php @@ -3136,5 +3136,3 @@ static function (RoleAssignment $roleAssignment) use ($newUser): bool { return $userRoleAssignment; } } - -class_alias(RoleServiceTest::class, 'eZ\Publish\API\Repository\Tests\RoleServiceTest'); diff --git a/tests/integration/Core/Repository/SearchEngineIndexingTest.php b/tests/integration/Core/Repository/SearchEngineIndexingTest.php index a75cafe039..7cdaf1e370 100644 --- a/tests/integration/Core/Repository/SearchEngineIndexingTest.php +++ b/tests/integration/Core/Repository/SearchEngineIndexingTest.php @@ -1378,5 +1378,3 @@ protected function createNewTestLocation() return $locationService->createLocation($membersContentInfo, $locationCreateStruct); } } - -class_alias(SearchEngineIndexingTest::class, 'eZ\Publish\API\Repository\Tests\SearchEngineIndexingTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/AbstractAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/AbstractAggregationTest.php index b6ece8bbbf..b456cd294b 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/AbstractAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/AbstractAggregationTest.php @@ -107,5 +107,3 @@ protected function createLocationQuery(Aggregation $aggregation): LocationQuery return $query; } } - -class_alias(AbstractAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\AbstractAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/ContentTypeGroupTermAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/ContentTypeGroupTermAggregationTest.php index bafd5b803e..651f31dd91 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/ContentTypeGroupTermAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/ContentTypeGroupTermAggregationTest.php @@ -32,5 +32,3 @@ public function dataProviderForTestFindContentWithAggregation(): iterable yield $builder->build(); } } - -class_alias(ContentTypeGroupTermAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\ContentTypeGroupTermAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/ContentTypeTermAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/ContentTypeTermAggregationTest.php index c295300141..44549720a8 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/ContentTypeTermAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/ContentTypeTermAggregationTest.php @@ -36,5 +36,3 @@ public function dataProviderForTestFindContentWithAggregation(): iterable yield $builder->build(); } } - -class_alias(ContentTypeTermAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\ContentTypeTermAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/DataSetBuilder/TermAggregationDataSetBuilder.php b/tests/integration/Core/Repository/SearchService/Aggregation/DataSetBuilder/TermAggregationDataSetBuilder.php index 35ae0ffb04..b2a87eecfe 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/DataSetBuilder/TermAggregationDataSetBuilder.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/DataSetBuilder/TermAggregationDataSetBuilder.php @@ -69,5 +69,3 @@ private function buildExpectedTermAggregationResult(): TermAggregationResult return TermAggregationResult::createForAggregation($this->aggregation, $entries); } } - -class_alias(TermAggregationDataSetBuilder::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\DataSetBuilder\TermAggregationDataSetBuilder'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/DateMetadataRangeAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/DateMetadataRangeAggregationTest.php index 14d2470b97..9e6657111a 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/DateMetadataRangeAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/DateMetadataRangeAggregationTest.php @@ -116,5 +116,3 @@ public function dataProviderForTestFindContentWithAggregation(): iterable ]; } } - -class_alias(DateMetadataRangeAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\DateMetadataRangeAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/Field/AuthorTermAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/Field/AuthorTermAggregationTest.php index 74a5b5df99..b8378aa137 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/Field/AuthorTermAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/Field/AuthorTermAggregationTest.php @@ -111,5 +111,3 @@ protected function createFixturesForAggregation(Aggregation $aggregation): void $this->refreshSearch($this->getRepository()); } } - -class_alias(AuthorTermAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\Field\AuthorTermAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/Field/CheckboxTermAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/Field/CheckboxTermAggregationTest.php index f2700bbd3b..bb4d4435fe 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/Field/CheckboxTermAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/Field/CheckboxTermAggregationTest.php @@ -51,5 +51,3 @@ protected function createFixturesForAggregation(Aggregation $aggregation): void $this->refreshSearch($this->getRepository()); } } - -class_alias(CheckboxTermAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\Field\CheckboxTermAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/Field/CountryTermAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/Field/CountryTermAggregationTest.php index d195c49f41..9ab0b860ce 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/Field/CountryTermAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/Field/CountryTermAggregationTest.php @@ -124,5 +124,3 @@ static function (FieldDefinitionCreateStruct $createStruct): void { $this->refreshSearch($this->getRepository()); } } - -class_alias(CountryTermAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\Field\CountryTermAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/Field/DateRangeAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/Field/DateRangeAggregationTest.php index 159fd377c5..b890a12f28 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/Field/DateRangeAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/Field/DateRangeAggregationTest.php @@ -98,5 +98,3 @@ protected function createFixturesForAggregation(Aggregation $aggregation): void $this->refreshSearch($this->getRepository()); } } - -class_alias(DateRangeAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\Field\DateRangeAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/Field/DateTimeRangeAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/Field/DateTimeRangeAggregationTest.php index 366d48cad9..359b7753a1 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/Field/DateTimeRangeAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/Field/DateTimeRangeAggregationTest.php @@ -99,5 +99,3 @@ protected function createFixturesForAggregation(Aggregation $aggregation): void $this->refreshSearch($this->getRepository()); } } - -class_alias(DateTimeRangeAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\Field\DateTimeRangeAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/Field/FloatRangeAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/Field/FloatRangeAggregationTest.php index 41916ffe11..66f8d93ef5 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/Field/FloatRangeAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/Field/FloatRangeAggregationTest.php @@ -52,5 +52,3 @@ protected function createFixturesForAggregation(Aggregation $aggregation): void $this->refreshSearch($this->getRepository()); } } - -class_alias(FloatRangeAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\Field\FloatRangeAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/Field/FloatStatsAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/Field/FloatStatsAggregationTest.php index 300f6e8909..3fd73277fe 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/Field/FloatStatsAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/Field/FloatStatsAggregationTest.php @@ -44,5 +44,3 @@ protected function createFixturesForAggregation(Aggregation $aggregation): void $this->refreshSearch($this->getRepository()); } } - -class_alias(FloatStatsAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\Field\FloatStatsAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/Field/IntegerRangeAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/Field/IntegerRangeAggregationTest.php index 53cdcef485..57ab2eb24b 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/Field/IntegerRangeAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/Field/IntegerRangeAggregationTest.php @@ -52,5 +52,3 @@ protected function createFixturesForAggregation(Aggregation $aggregation): void $this->refreshSearch($this->getRepository()); } } - -class_alias(IntegerRangeAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\Field\IntegerRangeAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/Field/IntegerStatsAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/Field/IntegerStatsAggregationTest.php index 833f82d2ce..ab8912cf2b 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/Field/IntegerStatsAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/Field/IntegerStatsAggregationTest.php @@ -43,5 +43,3 @@ protected function createFixturesForAggregation(Aggregation $aggregation): void $this->refreshSearch($this->getRepository()); } } - -class_alias(IntegerStatsAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\Field\IntegerStatsAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/Field/KeywordTermAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/Field/KeywordTermAggregationTest.php index 51210e328f..ecc99dc798 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/Field/KeywordTermAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/Field/KeywordTermAggregationTest.php @@ -53,5 +53,3 @@ protected function createFixturesForAggregation(Aggregation $aggregation): void $this->refreshSearch($this->getRepository()); } } - -class_alias(KeywordTermAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\Field\KeywordTermAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/Field/SelectionTermAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/Field/SelectionTermAggregationTest.php index 8ccb1f7045..d95cb78a6f 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/Field/SelectionTermAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/Field/SelectionTermAggregationTest.php @@ -67,5 +67,3 @@ static function (FieldDefinitionCreateStruct $createStruct): void { $this->refreshSearch($this->getRepository()); } } - -class_alias(SelectionTermAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\Field\SelectionTermAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/Field/TimeRangeAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/Field/TimeRangeAggregationTest.php index 161b6bb46d..44d9ece66a 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/Field/TimeRangeAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/Field/TimeRangeAggregationTest.php @@ -79,5 +79,3 @@ protected function createFixturesForAggregation(Aggregation $aggregation): void $this->refreshSearch($this->getRepository()); } } - -class_alias(TimeRangeAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\Field\TimeRangeAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php b/tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php index 2fb9af61af..326aeef304 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php @@ -174,5 +174,3 @@ private function createFieldDefinitionCreateStruct( return $fieldDefinitionCreateStruct; } } - -class_alias(FieldAggregationFixtureGenerator::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\FixtureGenerator\FieldAggregationFixtureGenerator'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/LanguageTermAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/LanguageTermAggregationTest.php index e688b01219..d5b43c00cc 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/LanguageTermAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/LanguageTermAggregationTest.php @@ -31,5 +31,3 @@ public function dataProviderForTestFindContentWithAggregation(): iterable yield $builder->build(); } } - -class_alias(LanguageTermAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\LanguageTermAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/LocationChildrenTermAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/LocationChildrenTermAggregationTest.php index b5b79155c7..cd49de8810 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/LocationChildrenTermAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/LocationChildrenTermAggregationTest.php @@ -49,5 +49,3 @@ public function dataProviderForTestFindContentWithAggregation(): iterable yield $builder->build(); } } - -class_alias(LocationChildrenTermAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\LocationChildrenTermAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/ObjectStateTermAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/ObjectStateTermAggregationTest.php index f4ff71b3ba..71e685db51 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/ObjectStateTermAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/ObjectStateTermAggregationTest.php @@ -40,5 +40,3 @@ function (string $identifier): ObjectState { yield $builder->build(); } } - -class_alias(ObjectStateTermAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\ObjectStateTermAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/RawRangeAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/RawRangeAggregationTest.php index fe6d134313..1d8171b8c9 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/RawRangeAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/RawRangeAggregationTest.php @@ -38,5 +38,3 @@ public function dataProviderForTestFindContentWithAggregation(): iterable ]; } } - -class_alias(RawRangeAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\RawRangeAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/RawStatsAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/RawStatsAggregationTest.php index 93ab243fc4..f321d8b835 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/RawStatsAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/RawStatsAggregationTest.php @@ -31,5 +31,3 @@ public function dataProviderForTestFindContentWithAggregation(): iterable ]; } } - -class_alias(RawStatsAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\RawStatsAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/RawTermAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/RawTermAggregationTest.php index 3c1c65c744..3ae28a2ab8 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/RawTermAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/RawTermAggregationTest.php @@ -31,5 +31,3 @@ public function dataProviderForTestFindContentWithAggregation(): iterable ]; } } - -class_alias(RawTermAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\RawTermAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/SectionTermAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/SectionTermAggregationTest.php index 18042b3028..254279263d 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/SectionTermAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/SectionTermAggregationTest.php @@ -34,5 +34,3 @@ public function dataProviderForTestFindContentWithAggregation(): iterable yield $builder->build(); } } - -class_alias(SectionTermAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\SectionTermAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/SubtreeTermAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/SubtreeTermAggregationTest.php index ee577d2445..0ac211c151 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/SubtreeTermAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/SubtreeTermAggregationTest.php @@ -32,5 +32,3 @@ public function dataProviderForTestFindContentWithAggregation(): iterable yield $builder->build(); } } - -class_alias(SubtreeTermAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\SubtreeTermAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/UserMetadataTermAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/UserMetadataTermAggregationTest.php index 559ec7636a..8f5e6169aa 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/UserMetadataTermAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/UserMetadataTermAggregationTest.php @@ -62,5 +62,3 @@ private function createModifierTermAggregationDataSet(): array return $builder->build(); } } - -class_alias(UserMetadataTermAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\UserMetadataTermAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/VisibilityTermAggregationTest.php b/tests/integration/Core/Repository/SearchService/Aggregation/VisibilityTermAggregationTest.php index 818e1c4b32..58c74c6406 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/VisibilityTermAggregationTest.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/VisibilityTermAggregationTest.php @@ -25,5 +25,3 @@ public function dataProviderForTestFindContentWithAggregation(): iterable yield $builder->build(); } } - -class_alias(VisibilityTermAggregationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\Aggregation\VisibilityTermAggregationTest'); diff --git a/tests/integration/Core/Repository/SearchService/DeleteTranslationTest.php b/tests/integration/Core/Repository/SearchService/DeleteTranslationTest.php index 2a6fb1d88a..a23dfa2a1a 100644 --- a/tests/integration/Core/Repository/SearchService/DeleteTranslationTest.php +++ b/tests/integration/Core/Repository/SearchService/DeleteTranslationTest.php @@ -181,5 +181,3 @@ public function provideUserWithContentRemovePolicies(): User ); } } - -class_alias(DeleteTranslationTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\DeleteTranslationTest'); diff --git a/tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php b/tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php index 0d5338be04..a8d8099af3 100644 --- a/tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php +++ b/tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php @@ -130,5 +130,3 @@ private function createTestFolder(string $remoteId): int return $folder->id; } } - -class_alias(RemoteIdIndexingTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\RemoteIdIndexingTest'); diff --git a/tests/integration/Core/Repository/SearchService/SortClause/AbstractSortClauseTest.php b/tests/integration/Core/Repository/SearchService/SortClause/AbstractSortClauseTest.php index 8f5e84f3d4..472ae82afd 100644 --- a/tests/integration/Core/Repository/SearchService/SortClause/AbstractSortClauseTest.php +++ b/tests/integration/Core/Repository/SearchService/SortClause/AbstractSortClauseTest.php @@ -33,5 +33,3 @@ static function (SearchHit $searchHit): string { self::assertEquals($expectedOrderedIds, $actualIds); } } - -class_alias(AbstractSortClauseTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\SortClause\AbstractSortClauseTest'); diff --git a/tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php b/tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php index fa9ea9d50a..de75da8380 100644 --- a/tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php +++ b/tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php @@ -229,5 +229,3 @@ private function createContentForContentTranslatedNameTesting(iterable $values): $this->refreshSearch($repository); } } - -class_alias(ContentTranslatedNameTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\SortClause\ContentTranslatedNameTest'); diff --git a/tests/integration/Core/Repository/SearchService/SortClause/ScoreTest.php b/tests/integration/Core/Repository/SearchService/SortClause/ScoreTest.php index cb6c4cca35..1aac67fb9c 100644 --- a/tests/integration/Core/Repository/SearchService/SortClause/ScoreTest.php +++ b/tests/integration/Core/Repository/SearchService/SortClause/ScoreTest.php @@ -153,5 +153,3 @@ private function createContentForScoreSortTesting(iterable $values): void $this->refreshSearch($repository); } } - -class_alias(ScoreTest::class, 'eZ\Publish\API\Repository\Tests\SearchService\SortClause\ScoreTest'); diff --git a/tests/integration/Core/Repository/SearchServiceAuthorizationTest.php b/tests/integration/Core/Repository/SearchServiceAuthorizationTest.php index c34d3713c9..052e8358a4 100644 --- a/tests/integration/Core/Repository/SearchServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/SearchServiceAuthorizationTest.php @@ -223,5 +223,3 @@ public function testFindSingleThrowsNotFoundExceptionWithUserPermissionFilter() /* END: Use Case */ } } - -class_alias(SearchServiceAuthorizationTest::class, 'eZ\Publish\API\Repository\Tests\SearchServiceAuthorizationTest'); diff --git a/tests/integration/Core/Repository/SearchServiceFulltextTest.php b/tests/integration/Core/Repository/SearchServiceFulltextTest.php index 6f9be645af..cf5f7ee188 100644 --- a/tests/integration/Core/Repository/SearchServiceFulltextTest.php +++ b/tests/integration/Core/Repository/SearchServiceFulltextTest.php @@ -353,5 +353,3 @@ private function isSolrMajorVersionInRange(string $minVersion, string $maxVersio return false; } } - -class_alias(SearchServiceFulltextTest::class, 'eZ\Publish\API\Repository\Tests\SearchServiceFulltextTest'); diff --git a/tests/integration/Core/Repository/SearchServiceLocationTest.php b/tests/integration/Core/Repository/SearchServiceLocationTest.php index 44290ec70a..889e53b88a 100644 --- a/tests/integration/Core/Repository/SearchServiceLocationTest.php +++ b/tests/integration/Core/Repository/SearchServiceLocationTest.php @@ -1490,5 +1490,3 @@ protected function getFixtureDir() return __DIR__ . '/_fixtures/' . getenv('fixtureDir') . '/'; } } - -class_alias(SearchServiceLocationTest::class, 'eZ\Publish\API\Repository\Tests\SearchServiceLocationTest'); diff --git a/tests/integration/Core/Repository/SearchServiceTest.php b/tests/integration/Core/Repository/SearchServiceTest.php index be8f186870..08c4968cbd 100644 --- a/tests/integration/Core/Repository/SearchServiceTest.php +++ b/tests/integration/Core/Repository/SearchServiceTest.php @@ -5333,5 +5333,3 @@ private function isRunningOnLegacySetup(): bool return get_class($this->getSetupFactory()) === Legacy::class; } } - -class_alias(SearchServiceTest::class, 'eZ\Publish\API\Repository\Tests\SearchServiceTest'); diff --git a/tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php b/tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php index 16b5bdb2fd..8e15ed4e0c 100644 --- a/tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php +++ b/tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php @@ -1918,5 +1918,3 @@ private function getIndexesToMatchData( return $indexesToMatchData; } } - -class_alias(SearchServiceTranslationLanguageFallbackTest::class, 'eZ\Publish\API\Repository\Tests\SearchServiceTranslationLanguageFallbackTest'); diff --git a/tests/integration/Core/Repository/SectionServiceAuthorizationTest.php b/tests/integration/Core/Repository/SectionServiceAuthorizationTest.php index 26f1ca8531..7acdc8cea0 100644 --- a/tests/integration/Core/Repository/SectionServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/SectionServiceAuthorizationTest.php @@ -306,5 +306,3 @@ public function testDeleteSectionThrowsUnauthorizedException() /* END: Use Case */ } } - -class_alias(SectionServiceAuthorizationTest::class, 'eZ\Publish\API\Repository\Tests\SectionServiceAuthorizationTest'); diff --git a/tests/integration/Core/Repository/SectionServiceTest.php b/tests/integration/Core/Repository/SectionServiceTest.php index 65013edb14..61d11265cf 100644 --- a/tests/integration/Core/Repository/SectionServiceTest.php +++ b/tests/integration/Core/Repository/SectionServiceTest.php @@ -1092,5 +1092,3 @@ public function testUpdateSectionInTransactionWithCommit() self::assertEquals('My Standard', $updatedStandard->name); } } - -class_alias(SectionServiceTest::class, 'eZ\Publish\API\Repository\Tests\SectionServiceTest'); diff --git a/tests/integration/Core/Repository/SettingServiceTest.php b/tests/integration/Core/Repository/SettingServiceTest.php index 612cf8e72f..30bd6c6ed8 100644 --- a/tests/integration/Core/Repository/SettingServiceTest.php +++ b/tests/integration/Core/Repository/SettingServiceTest.php @@ -227,5 +227,3 @@ public function testDeleteSettingThrowsNotFoundException(): void $settingService->deleteSetting($setting); } } - -class_alias(SettingServiceTest::class, 'eZ\Publish\API\Repository\Tests\SettingServiceTest'); diff --git a/tests/integration/Core/Repository/TrashServiceAuthorizationTest.php b/tests/integration/Core/Repository/TrashServiceAuthorizationTest.php index a2eaf0850d..7767645d89 100644 --- a/tests/integration/Core/Repository/TrashServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/TrashServiceAuthorizationTest.php @@ -320,5 +320,3 @@ public function testTrashRequiresPremissionsToRemoveAllSubitems() $trashService->trash($parentLocation); } } - -class_alias(TrashServiceAuthorizationTest::class, 'eZ\Publish\API\Repository\Tests\TrashServiceAuthorizationTest'); diff --git a/tests/integration/Core/Repository/TrashServiceTest.php b/tests/integration/Core/Repository/TrashServiceTest.php index a080bc3b45..11e0f2e2dc 100644 --- a/tests/integration/Core/Repository/TrashServiceTest.php +++ b/tests/integration/Core/Repository/TrashServiceTest.php @@ -1340,5 +1340,3 @@ private function trashDifferentContentItems(): void } } } - -class_alias(TrashServiceTest::class, 'eZ\Publish\API\Repository\Tests\TrashServiceTest'); diff --git a/tests/integration/Core/Repository/URLAliasService/CustomUrlAliasForMultilingualContentTest.php b/tests/integration/Core/Repository/URLAliasService/CustomUrlAliasForMultilingualContentTest.php index b81f8fa9b4..e53ecddf8e 100644 --- a/tests/integration/Core/Repository/URLAliasService/CustomUrlAliasForMultilingualContentTest.php +++ b/tests/integration/Core/Repository/URLAliasService/CustomUrlAliasForMultilingualContentTest.php @@ -57,5 +57,3 @@ public function testCreateCustomUrlAliasWithTheSamePathThrowsException(): void ); } } - -class_alias(CustomUrlAliasForMultilingualContentTest::class, 'eZ\Publish\API\Repository\Tests\URLAliasService\CustomUrlAliasForMultilingualContentTest'); diff --git a/tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php b/tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php index 08a0ba678a..6c565dacd1 100644 --- a/tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php @@ -109,5 +109,3 @@ public function testRemoveAliasesThrowsUnauthorizedException() /* END: Use Case */ } } - -class_alias(URLAliasServiceAuthorizationTest::class, 'eZ\Publish\API\Repository\Tests\URLAliasServiceAuthorizationTest'); diff --git a/tests/integration/Core/Repository/URLAliasServiceTest.php b/tests/integration/Core/Repository/URLAliasServiceTest.php index 595796090c..499b2425d8 100644 --- a/tests/integration/Core/Repository/URLAliasServiceTest.php +++ b/tests/integration/Core/Repository/URLAliasServiceTest.php @@ -1817,5 +1817,3 @@ private function insertBrokenUrlAliasTableFixtures(Connection $connection) return count($rows); } } - -class_alias(URLAliasServiceTest::class, 'eZ\Publish\API\Repository\Tests\URLAliasServiceTest'); diff --git a/tests/integration/Core/Repository/URLServiceAuthorizationTest.php b/tests/integration/Core/Repository/URLServiceAuthorizationTest.php index c5a73c928b..f7deed7e25 100644 --- a/tests/integration/Core/Repository/URLServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/URLServiceAuthorizationTest.php @@ -128,5 +128,3 @@ public function testLoadByUrlThrowsUnauthorizedException() /* END: Use Case */ } } - -class_alias(URLServiceAuthorizationTest::class, 'eZ\Publish\API\Repository\Tests\URLServiceAuthorizationTest'); diff --git a/tests/integration/Core/Repository/URLServiceTest.php b/tests/integration/Core/Repository/URLServiceTest.php index 09a9d55065..6318771c65 100644 --- a/tests/integration/Core/Repository/URLServiceTest.php +++ b/tests/integration/Core/Repository/URLServiceTest.php @@ -965,5 +965,3 @@ public function testFindUsagesReturnsEmptySearchResults() ], $usagesSearchResults); } } - -class_alias(URLServiceTest::class, 'eZ\Publish\API\Repository\Tests\URLServiceTest'); diff --git a/tests/integration/Core/Repository/URLWildcardServiceAuthorizationTest.php b/tests/integration/Core/Repository/URLWildcardServiceAuthorizationTest.php index ed098462bc..946a04ea81 100644 --- a/tests/integration/Core/Repository/URLWildcardServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/URLWildcardServiceAuthorizationTest.php @@ -78,5 +78,3 @@ public function testRemoveThrowsUnauthorizedException() /* END: Use Case */ } } - -class_alias(URLWildcardServiceAuthorizationTest::class, 'eZ\Publish\API\Repository\Tests\URLWildcardServiceAuthorizationTest'); diff --git a/tests/integration/Core/Repository/URLWildcardServiceTest.php b/tests/integration/Core/Repository/URLWildcardServiceTest.php index 4526cccfd1..68bb9dc187 100644 --- a/tests/integration/Core/Repository/URLWildcardServiceTest.php +++ b/tests/integration/Core/Repository/URLWildcardServiceTest.php @@ -578,5 +578,3 @@ public function testCountAll(): void self::assertSame(1, $urlWildcardService->countAll()); } } - -class_alias(URLWildcardServiceTest::class, 'eZ\Publish\API\Repository\Tests\URLWildcardServiceTest'); diff --git a/tests/integration/Core/Repository/UserPreferenceServiceTest.php b/tests/integration/Core/Repository/UserPreferenceServiceTest.php index 6ad5bb6876..9abe039bbb 100644 --- a/tests/integration/Core/Repository/UserPreferenceServiceTest.php +++ b/tests/integration/Core/Repository/UserPreferenceServiceTest.php @@ -146,5 +146,3 @@ public function testGetUserPreferenceCount() self::assertEquals(5, $userPreferenceCount); } } - -class_alias(UserPreferenceServiceTest::class, 'eZ\Publish\API\Repository\Tests\UserPreferenceServiceTest'); diff --git a/tests/integration/Core/Repository/UserServiceAuthorizationTest.php b/tests/integration/Core/Repository/UserServiceAuthorizationTest.php index 7a45131194..d8350793de 100644 --- a/tests/integration/Core/Repository/UserServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/UserServiceAuthorizationTest.php @@ -522,5 +522,3 @@ private function createUserGroupVersion1() return $userGroup; } } - -class_alias(UserServiceAuthorizationTest::class, 'eZ\Publish\API\Repository\Tests\UserServiceAuthorizationTest'); diff --git a/tests/integration/Core/Repository/UserServiceTest.php b/tests/integration/Core/Repository/UserServiceTest.php index f89b0b74ca..ae26610519 100644 --- a/tests/integration/Core/Repository/UserServiceTest.php +++ b/tests/integration/Core/Repository/UserServiceTest.php @@ -3504,5 +3504,3 @@ private function assertIsSameUser(User $expectedUser, User $actualUser): void self::assertSame($expectedUser->email, $actualUser->email); } } - -class_alias(UserServiceTest::class, 'eZ\Publish\API\Repository\Tests\UserServiceTest'); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/BaseLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/BaseLimitationTest.php index cefdd9cddb..78680e22f8 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/BaseLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/BaseLimitationTest.php @@ -132,5 +132,3 @@ protected function addPolicyToRole(string $roleIdentifier, PolicyCreateStruct $p return $roleService->loadRoleByIdentifier($roleIdentifier); } } - -class_alias(BaseLimitationTest::class, 'eZ\Publish\API\Repository\Tests\Values\User\Limitation\BaseLimitationTest'); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php index 8230b83db7..3a51f70c1e 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php @@ -216,5 +216,3 @@ public function testContentTypeLimitationForbidVariant() /* END: Use Case */ } } - -class_alias(ContentTypeLimitationTest::class, 'eZ\Publish\API\Repository\Tests\Values\User\Limitation\ContentTypeLimitationTest'); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php index 22c4609ade..fe10ae855a 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php @@ -885,5 +885,3 @@ private function createMultilingualFolderDraft(ContentService $contentService): return $contentService->createContentDraft($publishedContent->contentInfo); } } - -class_alias(LanguageLimitationTest::class, 'eZ\Publish\API\Repository\Tests\Values\User\Limitation\LanguageLimitationTest'); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/LocationLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/LocationLimitationTest.php index f6fdbe96e7..fbd07994aa 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/LocationLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/LocationLimitationTest.php @@ -90,5 +90,3 @@ public function testLocationLimitationForbid() /* END: Use Case */ } } - -class_alias(LocationLimitationTest::class, 'eZ\Publish\API\Repository\Tests\Values\User\Limitation\LocationLimitationTest'); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/NewObjectStateLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/NewObjectStateLimitationTest.php index 46df7d0a86..415b8b89ac 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/NewObjectStateLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/NewObjectStateLimitationTest.php @@ -105,5 +105,3 @@ public function testNewObjectStateLimitationForbid() /* END: Use Case */ } } - -class_alias(NewObjectStateLimitationTest::class, 'eZ\Publish\API\Repository\Tests\Values\User\Limitation\NewObjectStateLimitationTest'); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/NewSectionLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/NewSectionLimitationTest.php index fce555f8a5..eade460f7d 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/NewSectionLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/NewSectionLimitationTest.php @@ -118,5 +118,3 @@ public function testNewSectionLimitationForbid() /* END: Use Case */ } } - -class_alias(NewSectionLimitationTest::class, 'eZ\Publish\API\Repository\Tests\Values\User\Limitation\NewSectionLimitationTest'); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/ObjectStateLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/ObjectStateLimitationTest.php index ff4bcacbfb..1fd9bb01db 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/ObjectStateLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/ObjectStateLimitationTest.php @@ -307,5 +307,3 @@ private function assertContentHasState( ); } } - -class_alias(ObjectStateLimitationTest::class, 'eZ\Publish\API\Repository\Tests\Values\User\Limitation\ObjectStateLimitationTest'); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/OwnerLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/OwnerLimitationTest.php index b37e378818..4bc4c30e5e 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/OwnerLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/OwnerLimitationTest.php @@ -145,5 +145,3 @@ public function testOwnerLimitationForbid() /* END: Use Case */ } } - -class_alias(OwnerLimitationTest::class, 'eZ\Publish\API\Repository\Tests\Values\User\Limitation\OwnerLimitationTest'); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/ParentContentTypeLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/ParentContentTypeLimitationTest.php index 724edc6bbb..2358e08bc6 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/ParentContentTypeLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/ParentContentTypeLimitationTest.php @@ -109,5 +109,3 @@ public function testParentContentTypeLimitationForbid() /* END: Use Case */ } } - -class_alias(ParentContentTypeLimitationTest::class, 'eZ\Publish\API\Repository\Tests\Values\User\Limitation\ParentContentTypeLimitationTest'); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/ParentDepthLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/ParentDepthLimitationTest.php index 5a1a85ae28..f89a7b3f8b 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/ParentDepthLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/ParentDepthLimitationTest.php @@ -148,5 +148,3 @@ public function testParentDepthLimitationAllowPublish() /* END: Use Case */ } } - -class_alias(ParentDepthLimitationTest::class, 'eZ\Publish\API\Repository\Tests\Values\User\Limitation\ParentDepthLimitationTest'); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/ParentOwnerLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/ParentOwnerLimitationTest.php index a5752f61a7..2e70479ef0 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/ParentOwnerLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/ParentOwnerLimitationTest.php @@ -97,5 +97,3 @@ public function testParentOwnerLimitationForbid() /* END: Use Case */ } } - -class_alias(ParentOwnerLimitationTest::class, 'eZ\Publish\API\Repository\Tests\Values\User\Limitation\ParentOwnerLimitationTest'); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/ParentUserGroupLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/ParentUserGroupLimitationTest.php index fede641c40..ed6df96440 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/ParentUserGroupLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/ParentUserGroupLimitationTest.php @@ -136,5 +136,3 @@ public function testParentUserGroupLimitationForbid() /* END: Use Case */ } } - -class_alias(ParentUserGroupLimitationTest::class, 'eZ\Publish\API\Repository\Tests\Values\User\Limitation\ParentUserGroupLimitationTest'); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/RolePolicyLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/RolePolicyLimitationTest.php index c6c84e2022..436ad323b2 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/RolePolicyLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/RolePolicyLimitationTest.php @@ -182,5 +182,3 @@ protected function createGroup($groupName, $mainLanguageCode, $parentGroupId) return $userService->createUserGroup($userGroupCreateStruct, $usersGroup); } } - -class_alias(RolePolicyLimitationTest::class, 'eZ\Publish\API\Repository\Tests\Values\User\Limitation\RolePolicyLimitationTest'); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/SectionLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/SectionLimitationTest.php index b8c9ab94c0..b1266799f4 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/SectionLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/SectionLimitationTest.php @@ -132,5 +132,3 @@ public function testSectionLimitationForbid() /* END: Use Case */ } } - -class_alias(SectionLimitationTest::class, 'eZ\Publish\API\Repository\Tests\Values\User\Limitation\SectionLimitationTest'); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/StatusLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/StatusLimitationTest.php index e947bc50d0..ac7ff751f9 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/StatusLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/StatusLimitationTest.php @@ -146,5 +146,3 @@ public function testStatusLimitationForbid() /* END: Use Case */ } } - -class_alias(StatusLimitationTest::class, 'eZ\Publish\API\Repository\Tests\Values\User\Limitation\StatusLimitationTest'); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php index 6f78d4a62c..fddc5e47f7 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php @@ -171,5 +171,3 @@ protected function prepareLimitation($subtree) /* END: Inline */ } } - -class_alias(SubtreeLimitationTest::class, 'eZ\Publish\API\Repository\Tests\Values\User\Limitation\SubtreeLimitationTest'); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/UserGroupLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/UserGroupLimitationTest.php index 842b3d4a66..34c176d004 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/UserGroupLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/UserGroupLimitationTest.php @@ -160,5 +160,3 @@ protected function prepareLimitationAndContent(User $user, UserGroup $userGroup) return $draft; } } - -class_alias(UserGroupLimitationTest::class, 'eZ\Publish\API\Repository\Tests\Values\User\Limitation\UserGroupLimitationTest'); diff --git a/tests/integration/Core/User/UserStorage/UserStorageGatewayTest.php b/tests/integration/Core/User/UserStorage/UserStorageGatewayTest.php index 0236ac340d..19e2bd320e 100644 --- a/tests/integration/Core/User/UserStorage/UserStorageGatewayTest.php +++ b/tests/integration/Core/User/UserStorage/UserStorageGatewayTest.php @@ -93,5 +93,3 @@ public function getDataForTestCountUsersWithUnsupportedHashType(): iterable ]; } } - -class_alias(UserStorageGatewayTest::class, 'eZ\Publish\Core\FieldType\Tests\Integration\User\UserStorage\UserStorageGatewayTest'); diff --git a/tests/lib/Base/Container/Compiler/FieldTypeRegistryPassTest.php b/tests/lib/Base/Container/Compiler/FieldTypeRegistryPassTest.php index fe7b747785..7d30cdcbf2 100644 --- a/tests/lib/Base/Container/Compiler/FieldTypeRegistryPassTest.php +++ b/tests/lib/Base/Container/Compiler/FieldTypeRegistryPassTest.php @@ -84,5 +84,3 @@ public function tagsProvider(): array ]; } } - -class_alias(FieldTypeRegistryPassTest::class, 'eZ\Publish\Core\Base\Tests\Container\Compiler\FieldTypeRegistryPassTest'); diff --git a/tests/lib/Base/Container/Compiler/GenericFieldTypeConverterPassTest.php b/tests/lib/Base/Container/Compiler/GenericFieldTypeConverterPassTest.php index 4c49e18864..c3206a425b 100644 --- a/tests/lib/Base/Container/Compiler/GenericFieldTypeConverterPassTest.php +++ b/tests/lib/Base/Container/Compiler/GenericFieldTypeConverterPassTest.php @@ -140,5 +140,3 @@ private function assertContainerBuilderHasNoServiceDefinitionWithMethodCall( ); } } - -class_alias(GenericFieldTypeConverterPassTest::class, 'eZ\Publish\Core\Base\Tests\Container\Compiler\GenericFieldTypeConverterPassTest'); diff --git a/tests/lib/Base/Container/Compiler/Search/FieldTypeRegistryPassTest.php b/tests/lib/Base/Container/Compiler/Search/FieldTypeRegistryPassTest.php index a0f410457b..1efb7e677c 100644 --- a/tests/lib/Base/Container/Compiler/Search/FieldTypeRegistryPassTest.php +++ b/tests/lib/Base/Container/Compiler/Search/FieldTypeRegistryPassTest.php @@ -69,5 +69,3 @@ public function testRegisterFieldTypeNoAlias() ); } } - -class_alias(FieldTypeRegistryPassTest::class, 'eZ\Publish\Core\Base\Tests\Container\Compiler\Search\FieldTypeRegistryPassTest'); diff --git a/tests/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPassTest.php b/tests/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPassTest.php index 2681e2efaa..a1f9e60491 100644 --- a/tests/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPassTest.php +++ b/tests/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPassTest.php @@ -132,5 +132,3 @@ public function testAddMultipleHandlers(): void ); } } - -class_alias(CriteriaConverterPassTest::class, 'eZ\Publish\Core\Base\Tests\Container\Compiler\Search\Legacy\CriteriaConverterPassTest'); diff --git a/tests/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPassTest.php b/tests/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPassTest.php index e9151158c9..7cb1b9e5f8 100644 --- a/tests/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPassTest.php +++ b/tests/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPassTest.php @@ -75,5 +75,3 @@ public function testRegisterValueHandlerNoAlias() ); } } - -class_alias(CriterionFieldValueHandlerRegistryPassTest::class, 'eZ\Publish\Core\Base\Tests\Container\Compiler\Search\Legacy\CriterionFieldValueHandlerRegistryPassTest'); diff --git a/tests/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPassTest.php b/tests/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPassTest.php index 3e4f5e3c51..1fa7eb7372 100644 --- a/tests/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPassTest.php +++ b/tests/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPassTest.php @@ -100,5 +100,3 @@ public function testAddLocationAndContentHandlers() ); } } - -class_alias(SortClauseConverterPassTest::class, 'eZ\Publish\Core\Base\Tests\Container\Compiler\Search\Legacy\SortClauseConverterPassTest'); diff --git a/tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php b/tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php index 2a69585ed3..f26747bd7d 100644 --- a/tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php +++ b/tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php @@ -209,5 +209,3 @@ public function externalStorageHandlerGatewayTagsProvider(): array ]; } } - -class_alias(ExternalStorageRegistryPassTest::class, 'eZ\Publish\Core\Base\Tests\Container\Compiler\Storage\ExternalStorageRegistryPassTest'); diff --git a/tests/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPassTest.php b/tests/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPassTest.php index 30e890a5d0..9764a3adbd 100644 --- a/tests/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPassTest.php +++ b/tests/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPassTest.php @@ -56,5 +56,3 @@ public function testRegisterConverterNoLazy() ); } } - -class_alias(FieldValueConverterRegistryPassTest::class, 'eZ\Publish\Core\Base\Tests\Container\Compiler\Storage\Legacy\FieldValueConverterRegistryPassTest'); diff --git a/tests/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPassTest.php b/tests/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPassTest.php index 8d5ec2d4a6..cb71ba5b9c 100644 --- a/tests/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPassTest.php +++ b/tests/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPassTest.php @@ -52,5 +52,3 @@ public function testRegisterRoleLimitationConverter() ); } } - -class_alias(RoleLimitationConverterPassTest::class, 'eZ\Publish\Core\Base\Tests\Container\Compiler\Storage\Legacy\RoleLimitationConverterPassTest'); diff --git a/tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php b/tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php index e20ddf153f..ab32f39c34 100644 --- a/tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php +++ b/tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php @@ -36,5 +36,3 @@ public function getIndexData(VersionInfo $versionInfo, Field $field, array $cont { } } - -class_alias(GatewayBasedStorageHandler::class, 'eZ\Publish\Core\Base\Tests\Container\Compiler\Stubs\GatewayBasedStorageHandler'); diff --git a/tests/lib/Base/Container/Compiler/Stubs/GenericFieldType.php b/tests/lib/Base/Container/Compiler/Stubs/GenericFieldType.php index e5cdf48ecd..6fda8524bd 100644 --- a/tests/lib/Base/Container/Compiler/Stubs/GenericFieldType.php +++ b/tests/lib/Base/Container/Compiler/Stubs/GenericFieldType.php @@ -17,5 +17,3 @@ public function getFieldTypeIdentifier(): string return 'field_type_identifier'; } } - -class_alias(GenericFieldType::class, 'eZ\Publish\Core\Base\Tests\Container\Compiler\Stubs\GenericFieldType'); diff --git a/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIteratorTest.php b/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIteratorTest.php index effbe631c2..b80516d505 100644 --- a/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIteratorTest.php +++ b/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIteratorTest.php @@ -101,5 +101,3 @@ private function assertDeprecationError(string $expectedMessage): void )); } } - -class_alias(BackwardCompatibleIteratorTest::class, 'eZ\Publish\Core\Base\Tests\Container\Compiler\TaggedServiceIdsIterator\BackwardCompatibleIteratorTest'); diff --git a/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/DeprecationErrorCollector.php b/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/DeprecationErrorCollector.php index ce53558d98..143e244563 100644 --- a/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/DeprecationErrorCollector.php +++ b/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/DeprecationErrorCollector.php @@ -48,5 +48,3 @@ public function __invoke(int $code, string $message, string $file, int $line): b return true; } } - -class_alias(DeprecationErrorCollector::class, 'eZ\Publish\Core\Base\Tests\Container\Compiler\TaggedServiceIdsIterator\DeprecationErrorCollector'); diff --git a/tests/lib/Event/AbstractServiceTest.php b/tests/lib/Event/AbstractServiceTest.php index 28781248ea..d9c567610e 100644 --- a/tests/lib/Event/AbstractServiceTest.php +++ b/tests/lib/Event/AbstractServiceTest.php @@ -39,5 +39,3 @@ public function getListenersStack(array $listeners): array return $stack; } } - -class_alias(AbstractServiceTest::class, 'eZ\Publish\Core\Event\Tests\AbstractServiceTest'); diff --git a/tests/lib/Event/BookmarkServiceTest.php b/tests/lib/Event/BookmarkServiceTest.php index c87848a866..4e79186353 100644 --- a/tests/lib/Event/BookmarkServiceTest.php +++ b/tests/lib/Event/BookmarkServiceTest.php @@ -131,5 +131,3 @@ public function testDeleteBookmarkStopPropagationInBeforeEvents() ]); } } - -class_alias(BookmarkServiceTest::class, 'eZ\Publish\Core\Event\Tests\BookmarkServiceTest'); diff --git a/tests/lib/Event/ContentServiceTest.php b/tests/lib/Event/ContentServiceTest.php index c58032f77f..fe98d7c941 100644 --- a/tests/lib/Event/ContentServiceTest.php +++ b/tests/lib/Event/ContentServiceTest.php @@ -1155,5 +1155,3 @@ public function testRevealContentStopPropagationInBeforeEvents() ]); } } - -class_alias(ContentServiceTest::class, 'eZ\Publish\Core\Event\Tests\ContentServiceTest'); diff --git a/tests/lib/Event/ContentTypeServiceTest.php b/tests/lib/Event/ContentTypeServiceTest.php index 0679fcdba0..3b916b65bc 100644 --- a/tests/lib/Event/ContentTypeServiceTest.php +++ b/tests/lib/Event/ContentTypeServiceTest.php @@ -1143,5 +1143,3 @@ public function testCopyContentTypeStopPropagationInBeforeEvents() ]); } } - -class_alias(ContentTypeServiceTest::class, 'eZ\Publish\Core\Event\Tests\ContentTypeServiceTest'); diff --git a/tests/lib/Event/LanguageServiceTest.php b/tests/lib/Event/LanguageServiceTest.php index ae40b2ca40..c474a8d459 100644 --- a/tests/lib/Event/LanguageServiceTest.php +++ b/tests/lib/Event/LanguageServiceTest.php @@ -480,5 +480,3 @@ public function testEnableLanguageStopPropagationInBeforeEvents() ]); } } - -class_alias(LanguageServiceTest::class, 'eZ\Publish\Core\Event\Tests\LanguageServiceTest'); diff --git a/tests/lib/Event/LocationServiceTest.php b/tests/lib/Event/LocationServiceTest.php index 81bb2f752b..eeeaeec6d5 100644 --- a/tests/lib/Event/LocationServiceTest.php +++ b/tests/lib/Event/LocationServiceTest.php @@ -711,5 +711,3 @@ public function testCreateLocationStopPropagationInBeforeEvents() ]); } } - -class_alias(LocationServiceTest::class, 'eZ\Publish\Core\Event\Tests\LocationServiceTest'); diff --git a/tests/lib/Event/NotificationServiceTest.php b/tests/lib/Event/NotificationServiceTest.php index 4d136553eb..c42369c8e6 100644 --- a/tests/lib/Event/NotificationServiceTest.php +++ b/tests/lib/Event/NotificationServiceTest.php @@ -233,5 +233,3 @@ public function testMarkNotificationAsReadStopPropagationInBeforeEvents() ]); } } - -class_alias(NotificationServiceTest::class, 'eZ\Publish\Core\Event\Tests\NotificationServiceTest'); diff --git a/tests/lib/Event/ObjectStateServiceTest.php b/tests/lib/Event/ObjectStateServiceTest.php index 4f9a3b0d03..2252edd57e 100644 --- a/tests/lib/Event/ObjectStateServiceTest.php +++ b/tests/lib/Event/ObjectStateServiceTest.php @@ -674,5 +674,3 @@ public function testDeleteObjectStateStopPropagationInBeforeEvents() ]); } } - -class_alias(ObjectStateServiceTest::class, 'eZ\Publish\Core\Event\Tests\ObjectStateServiceTest'); diff --git a/tests/lib/Event/RoleServiceTest.php b/tests/lib/Event/RoleServiceTest.php index d2c5f88ad0..59168bb8d9 100644 --- a/tests/lib/Event/RoleServiceTest.php +++ b/tests/lib/Event/RoleServiceTest.php @@ -1006,5 +1006,3 @@ public function testCreateRoleDraftStopPropagationInBeforeEvents() ]); } } - -class_alias(RoleServiceTest::class, 'eZ\Publish\Core\Event\Tests\RoleServiceTest'); diff --git a/tests/lib/Event/SectionServiceTest.php b/tests/lib/Event/SectionServiceTest.php index 56c0f02622..5b84b2910d 100644 --- a/tests/lib/Event/SectionServiceTest.php +++ b/tests/lib/Event/SectionServiceTest.php @@ -403,5 +403,3 @@ public function testCreateSectionStopPropagationInBeforeEvents() ]); } } - -class_alias(SectionServiceTest::class, 'eZ\Publish\Core\Event\Tests\SectionServiceTest'); diff --git a/tests/lib/Event/SettingServiceTest.php b/tests/lib/Event/SettingServiceTest.php index 709117966f..567dd22b7a 100644 --- a/tests/lib/Event/SettingServiceTest.php +++ b/tests/lib/Event/SettingServiceTest.php @@ -331,5 +331,3 @@ private function updateSetting( return $service->updateSetting(...$parameters); } } - -class_alias(SettingServiceTest::class, 'eZ\Publish\Core\Event\Tests\SettingServiceTest'); diff --git a/tests/lib/Event/TrashServiceTest.php b/tests/lib/Event/TrashServiceTest.php index 3329daef28..5934c7174f 100644 --- a/tests/lib/Event/TrashServiceTest.php +++ b/tests/lib/Event/TrashServiceTest.php @@ -455,5 +455,3 @@ public function testDeleteTrashItemStopPropagationInBeforeEvents() ]); } } - -class_alias(TrashServiceTest::class, 'eZ\Publish\Core\Event\Tests\TrashServiceTest'); diff --git a/tests/lib/Event/URLAliasServiceTest.php b/tests/lib/Event/URLAliasServiceTest.php index ce85f42a9c..b529912e0d 100644 --- a/tests/lib/Event/URLAliasServiceTest.php +++ b/tests/lib/Event/URLAliasServiceTest.php @@ -358,5 +358,3 @@ public function testRemoveAliasesStopPropagationInBeforeEvents() ]); } } - -class_alias(URLAliasServiceTest::class, 'eZ\Publish\Core\Event\Tests\URLAliasServiceTest'); diff --git a/tests/lib/Event/URLServiceTest.php b/tests/lib/Event/URLServiceTest.php index 9ffba6ac2b..35c96695fe 100644 --- a/tests/lib/Event/URLServiceTest.php +++ b/tests/lib/Event/URLServiceTest.php @@ -118,5 +118,3 @@ public function testUpdateUrlStopPropagationInBeforeEvents() ]); } } - -class_alias(URLServiceTest::class, 'eZ\Publish\Core\Event\Tests\URLServiceTest'); diff --git a/tests/lib/Event/URLWildcardServiceTest.php b/tests/lib/Event/URLWildcardServiceTest.php index be0cb55405..effd399760 100644 --- a/tests/lib/Event/URLWildcardServiceTest.php +++ b/tests/lib/Event/URLWildcardServiceTest.php @@ -363,5 +363,3 @@ public function testTranslateStopPropagationInBeforeEvents() ]); } } - -class_alias(URLWildcardServiceTest::class, 'eZ\Publish\Core\Event\Tests\URLWildcardServiceTest'); diff --git a/tests/lib/Event/UserPreferenceServiceTest.php b/tests/lib/Event/UserPreferenceServiceTest.php index f91c97bbb8..6922b9eea3 100644 --- a/tests/lib/Event/UserPreferenceServiceTest.php +++ b/tests/lib/Event/UserPreferenceServiceTest.php @@ -71,5 +71,3 @@ public function testSetUserPreferenceStopPropagationInBeforeEvents() ]); } } - -class_alias(UserPreferenceServiceTest::class, 'eZ\Publish\Core\Event\Tests\UserPreferenceServiceTest'); diff --git a/tests/lib/Event/UserServiceTest.php b/tests/lib/Event/UserServiceTest.php index 84fb778489..6b122d5823 100644 --- a/tests/lib/Event/UserServiceTest.php +++ b/tests/lib/Event/UserServiceTest.php @@ -924,5 +924,3 @@ public function testUpdateUserTokenStopPropagationInBeforeEvents() ]); } } - -class_alias(UserServiceTest::class, 'eZ\Publish\Core\Event\Tests\UserServiceTest'); diff --git a/tests/lib/FieldType/APIFieldTypeTest.php b/tests/lib/FieldType/APIFieldTypeTest.php index 97817e0c54..8f5fbd89cf 100644 --- a/tests/lib/FieldType/APIFieldTypeTest.php +++ b/tests/lib/FieldType/APIFieldTypeTest.php @@ -121,5 +121,3 @@ public function testValidateValue() self::assertSame($validationErrors, $this->fieldType->validateValue($fieldDefinition, $value)); } } - -class_alias(APIFieldTypeTest::class, 'eZ\Publish\Core\FieldType\Tests\APIFieldTypeTest'); diff --git a/tests/lib/FieldType/AuthorTest.php b/tests/lib/FieldType/AuthorTest.php index d7ea36f48f..0ade378c4d 100644 --- a/tests/lib/FieldType/AuthorTest.php +++ b/tests/lib/FieldType/AuthorTest.php @@ -544,5 +544,3 @@ public function provideDataForGetName(): array ]; } } - -class_alias(AuthorTest::class, 'eZ\Publish\Core\FieldType\Tests\AuthorTest'); diff --git a/tests/lib/FieldType/BaseFieldTypeTest.php b/tests/lib/FieldType/BaseFieldTypeTest.php index d13a8844e3..f1688903b9 100644 --- a/tests/lib/FieldType/BaseFieldTypeTest.php +++ b/tests/lib/FieldType/BaseFieldTypeTest.php @@ -954,5 +954,3 @@ protected function getFieldDefinitionMock(array $fieldSettings) // @todo: More test methods … } - -class_alias(BaseFieldTypeTest::class, 'eZ\Publish\SPI\FieldType\Tests\FieldTypeTest'); diff --git a/tests/lib/FieldType/BinaryBaseTest.php b/tests/lib/FieldType/BinaryBaseTest.php index b43a34f420..7a9fa0c8a4 100644 --- a/tests/lib/FieldType/BinaryBaseTest.php +++ b/tests/lib/FieldType/BinaryBaseTest.php @@ -202,5 +202,3 @@ public function provideInvalidValidatorConfiguration() ]; } } - -class_alias(BinaryBaseTest::class, 'eZ\Publish\Core\FieldType\Tests\BinaryBaseTest'); diff --git a/tests/lib/FieldType/BinaryFileTest.php b/tests/lib/FieldType/BinaryFileTest.php index f1b6b729ed..ccfe1d0dac 100644 --- a/tests/lib/FieldType/BinaryFileTest.php +++ b/tests/lib/FieldType/BinaryFileTest.php @@ -649,5 +649,3 @@ private function getRouteAwarePathGenerator(): RouteAwarePathGenerator return $mock; } } - -class_alias(BinaryFileTest::class, 'eZ\Publish\Core\FieldType\Tests\BinaryFileTest'); diff --git a/tests/lib/FieldType/CheckboxTest.php b/tests/lib/FieldType/CheckboxTest.php index 67b4686e00..35e0056c40 100644 --- a/tests/lib/FieldType/CheckboxTest.php +++ b/tests/lib/FieldType/CheckboxTest.php @@ -302,5 +302,3 @@ public function testEmptyValueIsEmpty(): void self::markTestSkipped('Value of Checkbox fieldtype is never considered empty'); } } - -class_alias(CheckboxTest::class, 'eZ\Publish\Core\FieldType\Tests\CheckboxTest'); diff --git a/tests/lib/FieldType/CountryTest.php b/tests/lib/FieldType/CountryTest.php index ec06220972..b4d8ae5653 100644 --- a/tests/lib/FieldType/CountryTest.php +++ b/tests/lib/FieldType/CountryTest.php @@ -619,5 +619,3 @@ public function provideInvalidDataForValidate() ]; } } - -class_alias(CountryTest::class, 'eZ\Publish\Core\FieldType\Tests\CountryTest'); diff --git a/tests/lib/FieldType/DateAndTimeTest.php b/tests/lib/FieldType/DateAndTimeTest.php index 2caa49a075..5a03693385 100644 --- a/tests/lib/FieldType/DateAndTimeTest.php +++ b/tests/lib/FieldType/DateAndTimeTest.php @@ -439,5 +439,3 @@ public function provideDataForGetName(): array ]; } } - -class_alias(DateAndTimeTest::class, 'eZ\Publish\Core\FieldType\Tests\DateAndTimeTest'); diff --git a/tests/lib/FieldType/DateTest.php b/tests/lib/FieldType/DateTest.php index 41e531703c..3766383aaa 100644 --- a/tests/lib/FieldType/DateTest.php +++ b/tests/lib/FieldType/DateTest.php @@ -350,5 +350,3 @@ public function provideDataForGetName(): array ]; } } - -class_alias(DateTest::class, 'eZ\Publish\Core\FieldType\Tests\DateTest'); diff --git a/tests/lib/FieldType/EmailAddressTest.php b/tests/lib/FieldType/EmailAddressTest.php index c2619769e9..157f5a3ed2 100644 --- a/tests/lib/FieldType/EmailAddressTest.php +++ b/tests/lib/FieldType/EmailAddressTest.php @@ -515,5 +515,3 @@ public function provideInvalidDataForValidate() ]; } } - -class_alias(EmailAddressTest::class, 'eZ\Publish\Core\FieldType\Tests\EmailAddressTest'); diff --git a/tests/lib/FieldType/EmailAddressValidatorTest.php b/tests/lib/FieldType/EmailAddressValidatorTest.php index 8e3aa98cac..88f7e31326 100644 --- a/tests/lib/FieldType/EmailAddressValidatorTest.php +++ b/tests/lib/FieldType/EmailAddressValidatorTest.php @@ -108,5 +108,3 @@ public function testValidateWrongEmailAddresses() } } } - -class_alias(EmailAddressValidatorTest::class, 'eZ\Publish\Core\FieldType\Tests\EmailAddressValidatorTest'); diff --git a/tests/lib/FieldType/FieldTypeMockTest.php b/tests/lib/FieldType/FieldTypeMockTest.php index 80a50dc574..64eb687d93 100644 --- a/tests/lib/FieldType/FieldTypeMockTest.php +++ b/tests/lib/FieldType/FieldTypeMockTest.php @@ -281,5 +281,3 @@ public function providerForTestApplyDefaultValidatorConfiguration() ]; } } - -class_alias(FieldTypeMockTest::class, 'eZ\Publish\Core\FieldType\Tests\FieldTypeMockTest'); diff --git a/tests/lib/FieldType/FieldTypeTest.php b/tests/lib/FieldType/FieldTypeTest.php index f2d0c7dff9..567fee071d 100644 --- a/tests/lib/FieldType/FieldTypeTest.php +++ b/tests/lib/FieldType/FieldTypeTest.php @@ -51,5 +51,3 @@ public function testValuesEqual($inputValue1Hash, SPIValue $inputValue2): void ); } } - -class_alias(FieldTypeTest::class, 'eZ\Publish\Core\FieldType\Tests\FieldTypeTest'); diff --git a/tests/lib/FieldType/FileSizeValidatorTest.php b/tests/lib/FieldType/FileSizeValidatorTest.php index bfaa295927..3a06e12bd0 100644 --- a/tests/lib/FieldType/FileSizeValidatorTest.php +++ b/tests/lib/FieldType/FileSizeValidatorTest.php @@ -312,5 +312,3 @@ public function providerForValidateConstraintsKO() ]; } } - -class_alias(FileSizeValidatorTest::class, 'eZ\Publish\Core\FieldType\Tests\FileSizeValidatorTest'); diff --git a/tests/lib/FieldType/FloatTest.php b/tests/lib/FieldType/FloatTest.php index ef791701d7..d76b7d60c3 100644 --- a/tests/lib/FieldType/FloatTest.php +++ b/tests/lib/FieldType/FloatTest.php @@ -616,5 +616,3 @@ public function provideInvalidDataForValidate() ]; } } - -class_alias(FloatTest::class, 'eZ\Publish\Core\FieldType\Tests\FloatTest'); diff --git a/tests/lib/FieldType/FloatValueValidatorTest.php b/tests/lib/FieldType/FloatValueValidatorTest.php index cb4e984b45..4daa6123fe 100644 --- a/tests/lib/FieldType/FloatValueValidatorTest.php +++ b/tests/lib/FieldType/FloatValueValidatorTest.php @@ -385,5 +385,3 @@ public function providerForValidateConstraintsKO() ]; } } - -class_alias(FloatValueValidatorTest::class, 'eZ\Publish\Core\FieldType\Tests\FloatValueValidatorTest'); diff --git a/tests/lib/FieldType/Generic/GenericTest.php b/tests/lib/FieldType/Generic/GenericTest.php index 54be845462..4a8ca0ac9a 100644 --- a/tests/lib/FieldType/Generic/GenericTest.php +++ b/tests/lib/FieldType/Generic/GenericTest.php @@ -182,5 +182,3 @@ private function createSerializerMock(): ValueSerializerInterface return $serializer; } } - -class_alias(GenericTest::class, 'eZ\Publish\SPI\FieldType\Generic\Tests\GenericTest'); diff --git a/tests/lib/FieldType/Generic/Stubs/Type.php b/tests/lib/FieldType/Generic/Stubs/Type.php index 81200550f8..e6158d7f12 100644 --- a/tests/lib/FieldType/Generic/Stubs/Type.php +++ b/tests/lib/FieldType/Generic/Stubs/Type.php @@ -17,5 +17,3 @@ public function getFieldTypeIdentifier(): string return 'generic'; } } - -class_alias(Type::class, 'eZ\Publish\SPI\FieldType\Generic\Tests\Stubs\Type'); diff --git a/tests/lib/FieldType/Generic/Stubs/Value.php b/tests/lib/FieldType/Generic/Stubs/Value.php index 808ce812ed..cda857ccb0 100644 --- a/tests/lib/FieldType/Generic/Stubs/Value.php +++ b/tests/lib/FieldType/Generic/Stubs/Value.php @@ -29,5 +29,3 @@ public function __toString() return (string)$this->value; } } - -class_alias(Value::class, 'eZ\Publish\SPI\FieldType\Generic\Tests\Stubs\Value'); diff --git a/tests/lib/FieldType/Generic/ValueSerializer/SymfonySerializerAdapterTest.php b/tests/lib/FieldType/Generic/ValueSerializer/SymfonySerializerAdapterTest.php index 606453bdb9..f564441e91 100644 --- a/tests/lib/FieldType/Generic/ValueSerializer/SymfonySerializerAdapterTest.php +++ b/tests/lib/FieldType/Generic/ValueSerializer/SymfonySerializerAdapterTest.php @@ -108,5 +108,3 @@ public function testDecode(): void self::assertEquals($data, $this->adapter->decode($json, self::TEST_CONTEXT)); } } - -class_alias(SymfonySerializerAdapterTest::class, 'eZ\Publish\Core\FieldType\Tests\Generic\ValueSerializer\SymfonySerializerAdapterTest'); diff --git a/tests/lib/FieldType/ISBNTest.php b/tests/lib/FieldType/ISBNTest.php index 70850c2b7d..e4ab6ee633 100644 --- a/tests/lib/FieldType/ISBNTest.php +++ b/tests/lib/FieldType/ISBNTest.php @@ -307,5 +307,3 @@ public function provideInvalidDataForValidate() ]; } } - -class_alias(ISBNTest::class, 'eZ\Publish\Core\FieldType\Tests\ISBNTest'); diff --git a/tests/lib/FieldType/Image/IO/LegacyTest.php b/tests/lib/FieldType/Image/IO/LegacyTest.php index 8f042e9a71..4315db0030 100644 --- a/tests/lib/FieldType/Image/IO/LegacyTest.php +++ b/tests/lib/FieldType/Image/IO/LegacyTest.php @@ -476,5 +476,3 @@ protected function createConfigResolverMock(): ConfigResolverInterface return $mock; } } - -class_alias(LegacyTest::class, 'eZ\Publish\Core\FieldType\Tests\Image\IO\LegacyTest'); diff --git a/tests/lib/FieldType/Image/PathGenerator/LegacyPathGeneratorTest.php b/tests/lib/FieldType/Image/PathGenerator/LegacyPathGeneratorTest.php index 63218a1094..a9ecee1dd0 100644 --- a/tests/lib/FieldType/Image/PathGenerator/LegacyPathGeneratorTest.php +++ b/tests/lib/FieldType/Image/PathGenerator/LegacyPathGeneratorTest.php @@ -66,5 +66,3 @@ public function provideStoragePathForFieldData() ]; } } - -class_alias(LegacyPathGeneratorTest::class, 'eZ\Publish\Core\FieldType\Tests\Image\PathGenerator\LegacyPathGeneratorTest'); diff --git a/tests/lib/FieldType/ImageAsset/AssetMapperTest.php b/tests/lib/FieldType/ImageAsset/AssetMapperTest.php index 5166e9867b..60c17983ed 100644 --- a/tests/lib/FieldType/ImageAsset/AssetMapperTest.php +++ b/tests/lib/FieldType/ImageAsset/AssetMapperTest.php @@ -338,5 +338,3 @@ private function mockConfigResolver(): ConfigResolverInterface return $mock; } } - -class_alias(AssetMapperTest::class, 'eZ\Publish\Core\FieldType\Tests\ImageAsset\AssetMapperTest'); diff --git a/tests/lib/FieldType/ImageAssetTest.php b/tests/lib/FieldType/ImageAssetTest.php index 44de353936..a85e2cbb94 100644 --- a/tests/lib/FieldType/ImageAssetTest.php +++ b/tests/lib/FieldType/ImageAssetTest.php @@ -433,5 +433,3 @@ public function testGetRelations() ); } } - -class_alias(ImageAssetTest::class, 'eZ\Publish\Core\FieldType\Tests\ImageAssetTest'); diff --git a/tests/lib/FieldType/ImageTest.php b/tests/lib/FieldType/ImageTest.php index bac1f1c0b4..f1639aeef7 100644 --- a/tests/lib/FieldType/ImageTest.php +++ b/tests/lib/FieldType/ImageTest.php @@ -939,5 +939,3 @@ public function provideInputForValuesEqual(): array ]; } } - -class_alias(ImageTest::class, 'eZ\Publish\Core\FieldType\Tests\ImageTest'); diff --git a/tests/lib/FieldType/IntegerTest.php b/tests/lib/FieldType/IntegerTest.php index 1a13da68ca..1e1bd9dc0f 100644 --- a/tests/lib/FieldType/IntegerTest.php +++ b/tests/lib/FieldType/IntegerTest.php @@ -606,5 +606,3 @@ public function provideInvalidDataForValidate() ]; } } - -class_alias(IntegerTest::class, 'eZ\Publish\Core\FieldType\Tests\IntegerTest'); diff --git a/tests/lib/FieldType/IntegerValueValidatorTest.php b/tests/lib/FieldType/IntegerValueValidatorTest.php index 2ffc7eb2d3..a567420109 100644 --- a/tests/lib/FieldType/IntegerValueValidatorTest.php +++ b/tests/lib/FieldType/IntegerValueValidatorTest.php @@ -387,5 +387,3 @@ public function providerForValidateConstraintsKO() ]; } } - -class_alias(IntegerValueValidatorTest::class, 'eZ\Publish\Core\FieldType\Tests\IntegerValueValidatorTest'); diff --git a/tests/lib/FieldType/KeywordTest.php b/tests/lib/FieldType/KeywordTest.php index 7f65e10cb9..e850072e97 100644 --- a/tests/lib/FieldType/KeywordTest.php +++ b/tests/lib/FieldType/KeywordTest.php @@ -240,5 +240,3 @@ public function provideDataForGetName(): array ]; } } - -class_alias(KeywordTest::class, 'eZ\Publish\Core\FieldType\Tests\KeywordTest'); diff --git a/tests/lib/FieldType/MapLocationTest.php b/tests/lib/FieldType/MapLocationTest.php index c326b0955a..345b4362ec 100644 --- a/tests/lib/FieldType/MapLocationTest.php +++ b/tests/lib/FieldType/MapLocationTest.php @@ -320,5 +320,3 @@ public function provideDataForGetName(): array ]; } } - -class_alias(MapLocationTest::class, 'eZ\Publish\Core\FieldType\Tests\MapLocationTest'); diff --git a/tests/lib/FieldType/MediaTest.php b/tests/lib/FieldType/MediaTest.php index 129b52d733..4286db0f15 100644 --- a/tests/lib/FieldType/MediaTest.php +++ b/tests/lib/FieldType/MediaTest.php @@ -772,5 +772,3 @@ public function provideInvalidDataForValidate() ]; } } - -class_alias(MediaTest::class, 'eZ\Publish\Core\FieldType\Tests\MediaTest'); diff --git a/tests/lib/FieldType/RelationListTest.php b/tests/lib/FieldType/RelationListTest.php index 9f6622c61a..86b36448ae 100644 --- a/tests/lib/FieldType/RelationListTest.php +++ b/tests/lib/FieldType/RelationListTest.php @@ -880,5 +880,3 @@ public function provideDataForGetName(): array ]; } } - -class_alias(RelationListTest::class, 'eZ\Publish\Core\FieldType\Tests\RelationListTest'); diff --git a/tests/lib/FieldType/RelationTest.php b/tests/lib/FieldType/RelationTest.php index c99124c735..9fd4197903 100644 --- a/tests/lib/FieldType/RelationTest.php +++ b/tests/lib/FieldType/RelationTest.php @@ -503,5 +503,3 @@ public function provideInvalidDataForValidate(): array ]; } } - -class_alias(RelationTest::class, 'eZ\Publish\Core\FieldType\Tests\RelationTest'); diff --git a/tests/lib/FieldType/SelectionTest.php b/tests/lib/FieldType/SelectionTest.php index 995761b532..76bd9f71cc 100644 --- a/tests/lib/FieldType/SelectionTest.php +++ b/tests/lib/FieldType/SelectionTest.php @@ -620,5 +620,3 @@ public function provideInvalidDataForValidate() ]; } } - -class_alias(SelectionTest::class, 'eZ\Publish\Core\FieldType\Tests\SelectionTest'); diff --git a/tests/lib/FieldType/StringLengthValidatorTest.php b/tests/lib/FieldType/StringLengthValidatorTest.php index c0518e7beb..64469531b4 100644 --- a/tests/lib/FieldType/StringLengthValidatorTest.php +++ b/tests/lib/FieldType/StringLengthValidatorTest.php @@ -409,5 +409,3 @@ public function providerForValidateConstraintsKO() ]; } } - -class_alias(StringLengthValidatorTest::class, 'eZ\Publish\Core\FieldType\Tests\StringLengthValidatorTest'); diff --git a/tests/lib/FieldType/TextBlockTest.php b/tests/lib/FieldType/TextBlockTest.php index 7881c12199..e0d59be39b 100644 --- a/tests/lib/FieldType/TextBlockTest.php +++ b/tests/lib/FieldType/TextBlockTest.php @@ -331,5 +331,3 @@ public function provideDataForGetName(): array ]; } } - -class_alias(TextBlockTest::class, 'eZ\Publish\Core\FieldType\Tests\TextBlockTest'); diff --git a/tests/lib/FieldType/TextLineTest.php b/tests/lib/FieldType/TextLineTest.php index 29c74be735..0fbf19b26d 100644 --- a/tests/lib/FieldType/TextLineTest.php +++ b/tests/lib/FieldType/TextLineTest.php @@ -696,5 +696,3 @@ public function provideInvalidDataForValidate() ]; } } - -class_alias(TextLineTest::class, 'eZ\Publish\Core\FieldType\Tests\TextLineTest'); diff --git a/tests/lib/FieldType/TimeTest.php b/tests/lib/FieldType/TimeTest.php index 3848387317..ca3ec0f93d 100644 --- a/tests/lib/FieldType/TimeTest.php +++ b/tests/lib/FieldType/TimeTest.php @@ -359,5 +359,3 @@ public function provideDataForGetName(): array ]; } } - -class_alias(TimeTest::class, 'eZ\Publish\Core\FieldType\Tests\TimeTest'); diff --git a/tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php b/tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php index 7eb8835c53..d5a1db5a68 100644 --- a/tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php +++ b/tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php @@ -202,5 +202,3 @@ protected function getStorageGateway(): Gateway return $this->storageGateway ??= new DoctrineStorage($this->getDatabaseConnection()); } } - -class_alias(DoctrineStorageTest::class, 'eZ\Publish\Core\FieldType\Tests\Url\Gateway\DoctrineStorageTest'); diff --git a/tests/lib/FieldType/Url/UrlStorageTest.php b/tests/lib/FieldType/Url/UrlStorageTest.php index ece7509cf8..f5514790f6 100644 --- a/tests/lib/FieldType/Url/UrlStorageTest.php +++ b/tests/lib/FieldType/Url/UrlStorageTest.php @@ -269,5 +269,3 @@ protected function getGatewayMock() return $this->gatewayMock; } } - -class_alias(UrlStorageTest::class, 'eZ\Publish\Core\FieldType\Tests\Url\UrlStorageTest'); diff --git a/tests/lib/FieldType/UrlTest.php b/tests/lib/FieldType/UrlTest.php index e17e365926..98f6d7de64 100644 --- a/tests/lib/FieldType/UrlTest.php +++ b/tests/lib/FieldType/UrlTest.php @@ -256,5 +256,3 @@ public function provideDataForGetName(): array ]; } } - -class_alias(UrlTest::class, 'eZ\Publish\Core\FieldType\Tests\UrlTest'); diff --git a/tests/lib/FieldType/UserTest.php b/tests/lib/FieldType/UserTest.php index 38555de353..eb00e99d34 100644 --- a/tests/lib/FieldType/UserTest.php +++ b/tests/lib/FieldType/UserTest.php @@ -848,5 +848,3 @@ public function provideDataForGetName(): array ]; } } - -class_alias(UserTest::class, 'eZ\Publish\Core\FieldType\Tests\UserTest'); diff --git a/tests/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoaderTest.php b/tests/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoaderTest.php index b434f052ac..e7d07f3481 100644 --- a/tests/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoaderTest.php +++ b/tests/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoaderTest.php @@ -169,5 +169,3 @@ private function getPermissionResolverMock() ->getMock(); } } - -class_alias(SudoMainLocationLoaderTest::class, 'eZ\Publish\Core\Helper\Tests\ContentInfoLocationLoader\SudoMainLocationLoaderTest'); diff --git a/tests/lib/Helper/ContentPreviewHelperTest.php b/tests/lib/Helper/ContentPreviewHelperTest.php index 680acd9598..59afe15726 100644 --- a/tests/lib/Helper/ContentPreviewHelperTest.php +++ b/tests/lib/Helper/ContentPreviewHelperTest.php @@ -107,5 +107,3 @@ public function testPreviewedLocation() self::assertSame($location, $this->previewHelper->getPreviewedLocation()); } } - -class_alias(ContentPreviewHelperTest::class, 'eZ\Publish\Core\Helper\Tests\ContentPreviewHelperTest'); diff --git a/tests/lib/Helper/FieldHelperTest.php b/tests/lib/Helper/FieldHelperTest.php index 6383b30914..9e7adbc324 100644 --- a/tests/lib/Helper/FieldHelperTest.php +++ b/tests/lib/Helper/FieldHelperTest.php @@ -136,5 +136,3 @@ public function testIsFieldNotEmpty() self::assertFalse($this->fieldHelper->isFieldEmpty($content, $fieldDefIdentifier)); } } - -class_alias(FieldHelperTest::class, 'eZ\Publish\Core\Helper\Tests\FieldHelperTest'); diff --git a/tests/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsListTest.php b/tests/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsListTest.php index ced017d8da..ad5e3f82db 100644 --- a/tests/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsListTest.php +++ b/tests/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsListTest.php @@ -144,5 +144,3 @@ private function getFieldDefinitionMock(array $constructorArgs = []): MockObject ->getMockForAbstractClass(); } } - -class_alias(ArrayTranslatorFieldsGroupsListTest::class, 'eZ\Publish\Core\Helper\Tests\FieldsGroups\ArrayTranslatorFieldsGroupsListTest'); diff --git a/tests/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactoryTest.php b/tests/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactoryTest.php index 259270903e..2d6928f36e 100644 --- a/tests/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactoryTest.php +++ b/tests/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactoryTest.php @@ -61,5 +61,3 @@ protected function getTranslatorMock() return $this->translatorMock; } } - -class_alias(RepositoryConfigFieldsGroupsListFactoryTest::class, 'eZ\Publish\Core\Helper\Tests\FieldsGroups\RepositoryConfigFieldsGroupsListFactoryTest'); diff --git a/tests/lib/Helper/PreviewLocationProviderTest.php b/tests/lib/Helper/PreviewLocationProviderTest.php index 25fb173d1c..e3cd8898bb 100644 --- a/tests/lib/Helper/PreviewLocationProviderTest.php +++ b/tests/lib/Helper/PreviewLocationProviderTest.php @@ -144,5 +144,3 @@ private function getContentMock(int $contentId, ?int $mainLocationId = null, boo return $content; } } - -class_alias(PreviewLocationProviderTest::class, 'eZ\Publish\Core\Helper\Tests\PreviewLocationProviderTest'); diff --git a/tests/lib/Helper/TranslationHelperTest.php b/tests/lib/Helper/TranslationHelperTest.php index 92a32ae3a5..54bbf4f1a6 100644 --- a/tests/lib/Helper/TranslationHelperTest.php +++ b/tests/lib/Helper/TranslationHelperTest.php @@ -336,5 +336,3 @@ public function testGetAvailableLanguagesWithoutTranslationSiteAccesses() self::assertSame($expectedLanguages, $this->translationHelper->getAvailableLanguages()); } } - -class_alias(TranslationHelperTest::class, 'eZ\Publish\Core\Helper\Tests\TranslationHelperTest'); diff --git a/tests/lib/IO/ConfigScopeChangeAwareIOServiceTest.php b/tests/lib/IO/ConfigScopeChangeAwareIOServiceTest.php index 1b1bb23b3a..1a50e61440 100644 --- a/tests/lib/IO/ConfigScopeChangeAwareIOServiceTest.php +++ b/tests/lib/IO/ConfigScopeChangeAwareIOServiceTest.php @@ -318,5 +318,3 @@ public function testOnConfigScopeChange(): void $this->ioService->onConfigScopeChange($event); } } - -class_alias(ConfigScopeChangeAwareIOServiceTest::class, 'eZ\Publish\Core\IO\Tests\ConfigScopeChangeAwareIOServiceTest'); diff --git a/tests/lib/IO/IOBinarydataHandler/FlysystemTest.php b/tests/lib/IO/IOBinarydataHandler/FlysystemTest.php index c15be33f15..e09f9f9bbe 100644 --- a/tests/lib/IO/IOBinarydataHandler/FlysystemTest.php +++ b/tests/lib/IO/IOBinarydataHandler/FlysystemTest.php @@ -170,5 +170,3 @@ public function testDeleteDirectory(): void $this->handler->deleteDirectory('some/path'); } } - -class_alias(FlysystemTest::class, 'eZ\Publish\Core\IO\Tests\IOBinarydataHandler\FlysystemTest'); diff --git a/tests/lib/IO/IOMetadataHandler/FlysystemTest.php b/tests/lib/IO/IOMetadataHandler/FlysystemTest.php index 658f01be74..88ae2c8324 100644 --- a/tests/lib/IO/IOMetadataHandler/FlysystemTest.php +++ b/tests/lib/IO/IOMetadataHandler/FlysystemTest.php @@ -156,5 +156,3 @@ public function testDeleteDirectory(): void $this->handler->deleteDirectory('some/path'); } } - -class_alias(FlysystemTest::class, 'eZ\Publish\Core\IO\Tests\IOMetadataHandler\FlysystemTest'); diff --git a/tests/lib/IO/IOServiceTest.php b/tests/lib/IO/IOServiceTest.php index 26862fa070..80e8f2049b 100644 --- a/tests/lib/IO/IOServiceTest.php +++ b/tests/lib/IO/IOServiceTest.php @@ -466,5 +466,3 @@ protected function loadBinaryFileByUriNotFound() return $this->getIOService()->loadBinaryFileByUri($spiId); } } - -class_alias(IOServiceTest::class, 'eZ\Publish\Core\IO\Tests\IOServiceTest'); diff --git a/tests/lib/IO/MetadataHandler/ImageSizeTest.php b/tests/lib/IO/MetadataHandler/ImageSizeTest.php index 5996935050..943d431264 100644 --- a/tests/lib/IO/MetadataHandler/ImageSizeTest.php +++ b/tests/lib/IO/MetadataHandler/ImageSizeTest.php @@ -26,5 +26,3 @@ public function testExtract() ); } } - -class_alias(ImageSizeTest::class, 'eZ\Publish\Core\IO\Tests\MetadataHandler\ImageSizeTest'); diff --git a/tests/lib/IO/MimeTypeDetector/FileInfoTest.php b/tests/lib/IO/MimeTypeDetector/FileInfoTest.php index 6a0da3d0c4..3b89c720d1 100644 --- a/tests/lib/IO/MimeTypeDetector/FileInfoTest.php +++ b/tests/lib/IO/MimeTypeDetector/FileInfoTest.php @@ -45,5 +45,3 @@ public function testGetFromBuffer() ); } } - -class_alias(FileInfoTest::class, 'eZ\Publish\Core\IO\Tests\MimeTypeDetector\FileInfoTest'); diff --git a/tests/lib/IO/TolerantIOServiceTest.php b/tests/lib/IO/TolerantIOServiceTest.php index cf3323dd0a..dd6107cad8 100644 --- a/tests/lib/IO/TolerantIOServiceTest.php +++ b/tests/lib/IO/TolerantIOServiceTest.php @@ -71,5 +71,3 @@ public function testLoadBinaryFileByUriNotFound() ); } } - -class_alias(TolerantIOServiceTest::class, 'eZ\Publish\Core\IO\Tests\TolerantIOServiceTest'); diff --git a/tests/lib/IO/UrlDecorator/AbsolutePrefixTest.php b/tests/lib/IO/UrlDecorator/AbsolutePrefixTest.php index 0581fb6dfc..0372d84f82 100644 --- a/tests/lib/IO/UrlDecorator/AbsolutePrefixTest.php +++ b/tests/lib/IO/UrlDecorator/AbsolutePrefixTest.php @@ -63,5 +63,3 @@ public function provideData(): array ]; } } - -class_alias(AbsolutePrefixTest::class, 'eZ\Publish\Core\IO\Tests\UrlDecorator\AbsolutePrefixTest'); diff --git a/tests/lib/IO/UrlDecorator/PrefixTest.php b/tests/lib/IO/UrlDecorator/PrefixTest.php index 0aaa633615..90b32f4561 100644 --- a/tests/lib/IO/UrlDecorator/PrefixTest.php +++ b/tests/lib/IO/UrlDecorator/PrefixTest.php @@ -72,5 +72,3 @@ public function provideData() ]; } } - -class_alias(PrefixTest::class, 'eZ\Publish\Core\IO\Tests\UrlDecorator\PrefixTest'); diff --git a/tests/lib/IO/UrlRedecoratorTest.php b/tests/lib/IO/UrlRedecoratorTest.php index 81fd3d9545..45ede2b84b 100644 --- a/tests/lib/IO/UrlRedecoratorTest.php +++ b/tests/lib/IO/UrlRedecoratorTest.php @@ -70,5 +70,3 @@ public function testRedecorateFromTarget() ); } } - -class_alias(UrlRedecoratorTest::class, 'eZ\Publish\Core\IO\Tests\UrlRedecoratorTest'); diff --git a/tests/lib/Limitation/Base.php b/tests/lib/Limitation/Base.php index f48406ec47..be8b5d3153 100644 --- a/tests/lib/Limitation/Base.php +++ b/tests/lib/Limitation/Base.php @@ -66,5 +66,3 @@ protected function tearDown(): void parent::tearDown(); } } - -class_alias(Base::class, 'eZ\Publish\Core\Limitation\Tests\Base'); diff --git a/tests/lib/Limitation/BlockingLimitationTypeTest.php b/tests/lib/Limitation/BlockingLimitationTypeTest.php index 83537108db..fedcabed5b 100644 --- a/tests/lib/Limitation/BlockingLimitationTypeTest.php +++ b/tests/lib/Limitation/BlockingLimitationTypeTest.php @@ -301,5 +301,3 @@ public function testValueSchema(BlockingLimitationType $limitationType) ); } } - -class_alias(BlockingLimitationTypeTest::class, 'eZ\Publish\Core\Limitation\Tests\BlockingLimitationTypeTest'); diff --git a/tests/lib/Limitation/ContentTypeLimitationTypeTest.php b/tests/lib/Limitation/ContentTypeLimitationTypeTest.php index 1719dbcc30..6fb780eff5 100644 --- a/tests/lib/Limitation/ContentTypeLimitationTypeTest.php +++ b/tests/lib/Limitation/ContentTypeLimitationTypeTest.php @@ -458,5 +458,3 @@ public function testValueSchema(ContentTypeLimitationType $limitationType) ); } } - -class_alias(ContentTypeLimitationTypeTest::class, 'eZ\Publish\Core\Limitation\Tests\ContentTypeLimitationTypeTest'); diff --git a/tests/lib/Limitation/LanguageLimitation/ContentDeleteEvaluatorTest.php b/tests/lib/Limitation/LanguageLimitation/ContentDeleteEvaluatorTest.php index 4738d0dd8c..9722535f8c 100644 --- a/tests/lib/Limitation/LanguageLimitation/ContentDeleteEvaluatorTest.php +++ b/tests/lib/Limitation/LanguageLimitation/ContentDeleteEvaluatorTest.php @@ -92,5 +92,3 @@ private function getLanguageLimitation(array $languageCodes): Limitation\Languag return new Limitation\LanguageLimitation(['limitationValues' => $languageCodes]); } } - -class_alias(ContentDeleteEvaluatorTest::class, 'eZ\Publish\Core\Limitation\Tests\LanguageLimitation\ContentDeleteEvaluatorTest'); diff --git a/tests/lib/Limitation/LocationLimitationTypeTest.php b/tests/lib/Limitation/LocationLimitationTypeTest.php index 670c3cb4c9..82186c4dfd 100644 --- a/tests/lib/Limitation/LocationLimitationTypeTest.php +++ b/tests/lib/Limitation/LocationLimitationTypeTest.php @@ -519,5 +519,3 @@ public function testValueSchema(LocationLimitationType $limitationType) ); } } - -class_alias(LocationLimitationTypeTest::class, 'eZ\Publish\Core\Limitation\Tests\LocationLimitationTypeTest'); diff --git a/tests/lib/Limitation/NewObjectStateLimitationTypeTest.php b/tests/lib/Limitation/NewObjectStateLimitationTypeTest.php index c6e3907c88..73fb5aabf1 100644 --- a/tests/lib/Limitation/NewObjectStateLimitationTypeTest.php +++ b/tests/lib/Limitation/NewObjectStateLimitationTypeTest.php @@ -381,5 +381,3 @@ public function testValueSchema(NewObjectStateLimitationType $limitationType) ); } } - -class_alias(NewObjectStateLimitationTypeTest::class, 'eZ\Publish\Core\Limitation\Tests\NewObjectStateLimitationTypeTest'); diff --git a/tests/lib/Limitation/ObjectStateLimitationTypeTest.php b/tests/lib/Limitation/ObjectStateLimitationTypeTest.php index e4c41c2844..98a7207bf5 100644 --- a/tests/lib/Limitation/ObjectStateLimitationTypeTest.php +++ b/tests/lib/Limitation/ObjectStateLimitationTypeTest.php @@ -306,5 +306,3 @@ public function testGetCriterionMultipleValuesFromMultipleGroups() self::assertEquals([3], $criterion->criteria[1]->value); } } - -class_alias(ObjectStateLimitationTypeTest::class, 'eZ\Publish\Core\Limitation\Tests\ObjectStateLimitationTypeTest'); diff --git a/tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php b/tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php index d51bf65168..28393bdd5f 100644 --- a/tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php +++ b/tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php @@ -659,5 +659,3 @@ public function testValueSchema(ParentContentTypeLimitationType $limitationType) self::markTestIncomplete('Method is not implemented yet: ' . __METHOD__); } } - -class_alias(ParentContentTypeLimitationTypeTest::class, 'eZ\Publish\Core\Limitation\Tests\ParentContentTypeLimitationTypeTest'); diff --git a/tests/lib/Limitation/ParentDepthLimitationTypeTest.php b/tests/lib/Limitation/ParentDepthLimitationTypeTest.php index 0f4aa0bb00..6015d56b0e 100644 --- a/tests/lib/Limitation/ParentDepthLimitationTypeTest.php +++ b/tests/lib/Limitation/ParentDepthLimitationTypeTest.php @@ -413,5 +413,3 @@ public function testEvaluateInvalidArgument( var_dump($v); // intentional, debug in case no exception above } } - -class_alias(ParentDepthLimitationTypeTest::class, 'eZ\Publish\Core\Limitation\Tests\ParentDepthLimitationTypeTest'); diff --git a/tests/lib/Limitation/SectionLimitationTypeTest.php b/tests/lib/Limitation/SectionLimitationTypeTest.php index 8151ab3cf9..fdb938866d 100644 --- a/tests/lib/Limitation/SectionLimitationTypeTest.php +++ b/tests/lib/Limitation/SectionLimitationTypeTest.php @@ -491,5 +491,3 @@ public function testValueSchema(SectionLimitationType $limitationType) $limitationType->valueSchema(); } } - -class_alias(SectionLimitationTypeTest::class, 'eZ\Publish\Core\Limitation\Tests\SectionLimitationTypeTest'); diff --git a/tests/lib/Limitation/SiteAccessLimitationTypeTest.php b/tests/lib/Limitation/SiteAccessLimitationTypeTest.php index e62d4bbb96..2996a4f4a5 100644 --- a/tests/lib/Limitation/SiteAccessLimitationTypeTest.php +++ b/tests/lib/Limitation/SiteAccessLimitationTypeTest.php @@ -316,5 +316,3 @@ public function testGenerateSiteAccessValue(SiteAccessLimitationType $limitation self::assertSame('1817462202', $limitationType->generateSiteAccessValue('behat_site')); } } - -class_alias(SiteAccessLimitationTypeTest::class, 'eZ\Publish\Core\Limitation\Tests\SiteAccessLimitationTypeTest'); diff --git a/tests/lib/Limitation/StatusLimitationTypeTest.php b/tests/lib/Limitation/StatusLimitationTypeTest.php index 983611d0d9..5960d445b3 100644 --- a/tests/lib/Limitation/StatusLimitationTypeTest.php +++ b/tests/lib/Limitation/StatusLimitationTypeTest.php @@ -356,5 +356,3 @@ public function testValueSchema(StatusLimitationType $limitationType) self::markTestSkipped('Method valueSchema() is not implemented'); } } - -class_alias(StatusLimitationTypeTest::class, 'eZ\Publish\Core\Limitation\Tests\StatusLimitationTypeTest'); diff --git a/tests/lib/Limitation/SubtreeLimitationTypeTest.php b/tests/lib/Limitation/SubtreeLimitationTypeTest.php index eaeed389f6..eb7464c8f8 100644 --- a/tests/lib/Limitation/SubtreeLimitationTypeTest.php +++ b/tests/lib/Limitation/SubtreeLimitationTypeTest.php @@ -579,5 +579,3 @@ public function testValueSchema(SubtreeLimitationType $limitationType) ); } } - -class_alias(SubtreeLimitationTypeTest::class, 'eZ\Publish\Core\Limitation\Tests\SubtreeLimitationTypeTest'); diff --git a/tests/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizerTest.php index a24608e804..9388725b48 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizerTest.php @@ -70,5 +70,3 @@ public function testSupportsDenormalization(): void self::assertFalse($normalizer->supportsDenormalization($data, Matcher::class, 'json')); } } - -class_alias(CompoundMatcherNormalizerTest::class, 'eZ\Publish\Core\MVC\Symfony\Component\Tests\Serializer\CompoundMatcherNormalizerTest'); diff --git a/tests/lib/MVC/Symfony/Component/Serializer/HostElementNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/HostElementNormalizerTest.php index 0776b76a4c..6821ad5e24 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/HostElementNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/HostElementNormalizerTest.php @@ -47,5 +47,3 @@ public function testSupportsNormalization(): void self::assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); } } - -class_alias(HostElementNormalizerTest::class, 'eZ\Publish\Core\MVC\Symfony\Component\Tests\Serializer\HostElementNormalizerTest'); diff --git a/tests/lib/MVC/Symfony/Component/Serializer/HostTextNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/HostTextNormalizerTest.php index 14efcbde0a..6f34cf217f 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/HostTextNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/HostTextNormalizerTest.php @@ -45,5 +45,3 @@ public function testSupportsNormalization(): void self::assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); } } - -class_alias(HostTextNormalizerTest::class, 'eZ\Publish\Core\MVC\Symfony\Component\Tests\Serializer\HostTextNormalizerTest'); diff --git a/tests/lib/MVC/Symfony/Component/Serializer/MapNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/MapNormalizerTest.php index 5fde547816..e507124a21 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/MapNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/MapNormalizerTest.php @@ -40,5 +40,3 @@ public function testSupportsNormalization(): void self::assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); } } - -class_alias(MapNormalizerTest::class, 'eZ\Publish\Core\MVC\Symfony\Component\Tests\Serializer\MapNormalizerTest'); diff --git a/tests/lib/MVC/Symfony/Component/Serializer/RegexHostNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/RegexHostNormalizerTest.php index d92bc14f35..978c74d60b 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/RegexHostNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/RegexHostNormalizerTest.php @@ -45,5 +45,3 @@ public function testSupportsNormalization(): void self::assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); } } - -class_alias(RegexHostNormalizerTest::class, 'eZ\Publish\Core\MVC\Symfony\Component\Tests\Serializer\RegexHostNormalizerTest'); diff --git a/tests/lib/MVC/Symfony/Component/Serializer/RegexNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/RegexNormalizerTest.php index 86f219ab02..7ddcf91f29 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/RegexNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/RegexNormalizerTest.php @@ -39,5 +39,3 @@ public function testSupportsNormalization(): void self::assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); } } - -class_alias(RegexNormalizerTest::class, 'eZ\Publish\Core\MVC\Symfony\Component\Tests\Serializer\RegexNormalizerTest'); diff --git a/tests/lib/MVC/Symfony/Component/Serializer/RegexURINormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/RegexURINormalizerTest.php index 5009dd65f3..acdef30d8f 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/RegexURINormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/RegexURINormalizerTest.php @@ -45,5 +45,3 @@ public function testSupportsNormalization(): void self::assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); } } - -class_alias(RegexURINormalizerTest::class, 'eZ\Publish\Core\MVC\Symfony\Component\Tests\Serializer\RegexURINormalizerTest'); diff --git a/tests/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizerTest.php index 5af03990dc..da1d9a3022 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizerTest.php @@ -54,5 +54,3 @@ public function testSupportsNormalization() self::assertFalse($normalizer->supportsNormalization(new stdClass())); } } - -class_alias(SimplifiedRequestNormalizerTest::class, 'eZ\Publish\Core\MVC\Symfony\Component\Tests\Serializer\SimplifiedRequestNormalizerTest'); diff --git a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/CompoundStub.php b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/CompoundStub.php index 7799567c97..fa3e894fe0 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/CompoundStub.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/CompoundStub.php @@ -29,5 +29,3 @@ public function reverseMatch($siteAccessName) throw new NotImplementedException(__METHOD__); } } - -class_alias(CompoundStub::class, 'eZ\Publish\Core\MVC\Symfony\Component\Tests\Serializer\Stubs\CompoundStub'); diff --git a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/MatcherStub.php b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/MatcherStub.php index 50d9be135f..93df93a591 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/MatcherStub.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/MatcherStub.php @@ -42,5 +42,3 @@ public function getData() return $this->data; } } - -class_alias(MatcherStub::class, 'eZ\Publish\Core\MVC\Symfony\Component\Tests\Serializer\Stubs\MatcherStub'); diff --git a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/RegexMatcher.php b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/RegexMatcher.php index d00375db5e..5ce34687a8 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/RegexMatcher.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/RegexMatcher.php @@ -18,5 +18,3 @@ public function getName() throw new NotImplementedException(__METHOD__); } } - -class_alias(RegexMatcher::class, 'eZ\Publish\Core\MVC\Symfony\Component\Tests\Serializer\Stubs\RegexMatcher'); diff --git a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/SerializerStub.php b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/SerializerStub.php index d5eee0133a..45c5bd79c5 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/SerializerStub.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/SerializerStub.php @@ -48,5 +48,3 @@ public function supportsNormalization($data, string $format = null) return true; } } - -class_alias(SerializerStub::class, 'eZ\Publish\Core\MVC\Symfony\Component\Tests\Serializer\Stubs\SerializerStub'); diff --git a/tests/lib/MVC/Symfony/Component/Serializer/URIElementNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/URIElementNormalizerTest.php index abe0694fc4..ee02ddd759 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/URIElementNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/URIElementNormalizerTest.php @@ -44,5 +44,3 @@ public function testSupportsNormalization(): void self::assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); } } - -class_alias(URIElementNormalizerTest::class, 'eZ\Publish\Core\MVC\Symfony\Component\Tests\Serializer\URIElementNormalizerTest'); diff --git a/tests/lib/MVC/Symfony/Component/Serializer/URITextNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/URITextNormalizerTest.php index 1c778a2f1f..e9940c4c23 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/URITextNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/URITextNormalizerTest.php @@ -45,5 +45,3 @@ public function testSupportsNormalization(): void self::assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); } } - -class_alias(URITextNormalizerTest::class, 'eZ\Publish\Core\MVC\Symfony\Component\Tests\Serializer\URITextNormalizerTest'); diff --git a/tests/lib/MVC/Symfony/Controller/ControllerTest.php b/tests/lib/MVC/Symfony/Controller/ControllerTest.php index 0968b6687f..093615627c 100644 --- a/tests/lib/MVC/Symfony/Controller/ControllerTest.php +++ b/tests/lib/MVC/Symfony/Controller/ControllerTest.php @@ -73,5 +73,3 @@ public function testRenderWithResponse() self::assertSame($tplResult, $response->getContent()); } } - -class_alias(ControllerTest::class, 'eZ\Publish\Core\MVC\Symfony\Controller\Tests\ControllerTest'); diff --git a/tests/lib/MVC/Symfony/Controller/QueryRenderControllerTest.php b/tests/lib/MVC/Symfony/Controller/QueryRenderControllerTest.php index 60577376b1..1c75dd39e1 100644 --- a/tests/lib/MVC/Symfony/Controller/QueryRenderControllerTest.php +++ b/tests/lib/MVC/Symfony/Controller/QueryRenderControllerTest.php @@ -138,5 +138,3 @@ private function assertRenderQueryResult( ); } } - -class_alias(QueryRenderControllerTest::class, 'eZ\Publish\Core\MVC\Symfony\Controller\Tests\QueryRenderControllerTest'); diff --git a/tests/lib/MVC/Symfony/Event/ContentCacheClearEventTest.php b/tests/lib/MVC/Symfony/Event/ContentCacheClearEventTest.php index 0d60df20aa..48da36e4b0 100644 --- a/tests/lib/MVC/Symfony/Event/ContentCacheClearEventTest.php +++ b/tests/lib/MVC/Symfony/Event/ContentCacheClearEventTest.php @@ -46,5 +46,3 @@ public function setLocationsToClear() self::assertSame($otherLocations, $event->getLocationsToClear()); } } - -class_alias(ContentCacheClearEventTest::class, 'eZ\Publish\Core\MVC\Symfony\Event\Tests\ContentCacheClearEventTest'); diff --git a/tests/lib/MVC/Symfony/Event/InteractiveLoginEventTest.php b/tests/lib/MVC/Symfony/Event/InteractiveLoginEventTest.php index a6a3c3223f..0c29e98256 100644 --- a/tests/lib/MVC/Symfony/Event/InteractiveLoginEventTest.php +++ b/tests/lib/MVC/Symfony/Event/InteractiveLoginEventTest.php @@ -25,5 +25,3 @@ public function testGetSetAPIUser() self::assertSame($apiUser, $event->getAPIUser()); } } - -class_alias(InteractiveLoginEventTest::class, 'eZ\Publish\Core\MVC\Symfony\Event\Tests\InteractiveLoginEventTest'); diff --git a/tests/lib/MVC/Symfony/Event/RouteReferenceGenerationEventTest.php b/tests/lib/MVC/Symfony/Event/RouteReferenceGenerationEventTest.php index 649a99ea9b..09c47f2133 100644 --- a/tests/lib/MVC/Symfony/Event/RouteReferenceGenerationEventTest.php +++ b/tests/lib/MVC/Symfony/Event/RouteReferenceGenerationEventTest.php @@ -37,5 +37,3 @@ public function testGetSet() self::assertSame($newRouteReference, $event->getRouteReference()); } } - -class_alias(RouteReferenceGenerationEventTest::class, 'eZ\Publish\Core\MVC\Symfony\Event\Tests\RouteReferenceGenerationEventTest'); diff --git a/tests/lib/MVC/Symfony/Event/ScopeChangeEventTest.php b/tests/lib/MVC/Symfony/Event/ScopeChangeEventTest.php index b7a4fe5b5e..c44d0c463b 100644 --- a/tests/lib/MVC/Symfony/Event/ScopeChangeEventTest.php +++ b/tests/lib/MVC/Symfony/Event/ScopeChangeEventTest.php @@ -20,5 +20,3 @@ public function testGetSiteAccess() self::assertSame($siteAccess, $event->getSiteAccess()); } } - -class_alias(ScopeChangeEventTest::class, 'eZ\Publish\Core\MVC\Symfony\Event\Tests\ScopeChangeEventTest'); diff --git a/tests/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriberTest.php b/tests/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriberTest.php index be3ac12a27..9732352854 100644 --- a/tests/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriberTest.php +++ b/tests/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriberTest.php @@ -246,5 +246,3 @@ public function testWithProviderExpression(): void $subscriber->onPreContentView($event); } } - -class_alias(ContentViewTwigVariablesSubscriberTest::class, 'eZ\Publish\Core\MVC\Symfony\EventListener\Tests\ContentViewTwigVariablesSubscriberTest'); diff --git a/tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php b/tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php index ae4a33f737..ce13fc1191 100644 --- a/tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php +++ b/tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php @@ -83,5 +83,3 @@ public function testOnRouteReferenceGenerationNoTranslationSiteAccess() self::assertFalse($routeReference->has('siteaccess')); } } - -class_alias(LanguageSwitchListenerTest::class, 'eZ\Publish\Core\MVC\Symfony\EventListener\Tests\LanguageSwitchListenerTest'); diff --git a/tests/lib/MVC/Symfony/EventListener/SiteAccessMatchListenerTest.php b/tests/lib/MVC/Symfony/EventListener/SiteAccessMatchListenerTest.php index b4f48b5cd9..f562dd4641 100644 --- a/tests/lib/MVC/Symfony/EventListener/SiteAccessMatchListenerTest.php +++ b/tests/lib/MVC/Symfony/EventListener/SiteAccessMatchListenerTest.php @@ -267,5 +267,3 @@ public function testOnKernelRequestUserHashWithOriginalRequest() self::assertSame($siteAccess, $request->attributes->get('siteaccess')); } } - -class_alias(SiteAccessMatchListenerTest::class, 'eZ\Publish\Core\MVC\Symfony\EventListener\Tests\SiteAccessMatchListenerTest'); diff --git a/tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php b/tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php index 8d3a0cf8d8..c6af688b58 100644 --- a/tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php +++ b/tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php @@ -198,5 +198,3 @@ private function createField(int $destinationContentId): Field ]); } } - -class_alias(ParameterProviderTest::class, 'eZ\Publish\Core\MVC\Symfony\FieldType\Tests\ImageAsset\ParameterProviderTest'); diff --git a/tests/lib/MVC/Symfony/FieldType/Relation/ParameterProviderTest.php b/tests/lib/MVC/Symfony/FieldType/Relation/ParameterProviderTest.php index 007f556d6f..5000f84fc3 100644 --- a/tests/lib/MVC/Symfony/FieldType/Relation/ParameterProviderTest.php +++ b/tests/lib/MVC/Symfony/FieldType/Relation/ParameterProviderTest.php @@ -81,5 +81,3 @@ public function testUnauthorizedGetViewParameters() TestCase::assertSame($parameters, ['available' => false]); } } - -class_alias(ParameterProviderTest::class, 'eZ\Publish\Core\MVC\Symfony\FieldType\Tests\Relation\ParameterProviderTest'); diff --git a/tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php b/tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php index 18d523be74..7a5aa2df1b 100644 --- a/tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php +++ b/tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php @@ -96,5 +96,3 @@ public function testUnauthorizedGetViewParameters() TestCase::assertSame($parameters, ['available' => [$contentId => false]]); } } - -class_alias(ParameterProviderTest::class, 'eZ\Publish\Core\MVC\Symfony\FieldType\Tests\RelationList\ParameterProviderTest'); diff --git a/tests/lib/MVC/Symfony/FieldType/User/ParameterProviderTest.php b/tests/lib/MVC/Symfony/FieldType/User/ParameterProviderTest.php index 254a096c7a..4efcc292c7 100644 --- a/tests/lib/MVC/Symfony/FieldType/User/ParameterProviderTest.php +++ b/tests/lib/MVC/Symfony/FieldType/User/ParameterProviderTest.php @@ -92,5 +92,3 @@ private function createFieldMock(int $userId): Field return $field; } } - -class_alias(ParameterProviderTest::class, 'eZ\Publish\Core\MVC\Symfony\FieldType\Tests\User\ParameterProviderTest'); diff --git a/tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php b/tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php index b30381211d..3b76fdbefb 100644 --- a/tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php +++ b/tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php @@ -74,5 +74,3 @@ protected function getLocaleConverterMock() return $mock; } } - -class_alias(LocaleParameterProviderTest::class, 'eZ\Publish\Core\MVC\Symfony\FieldType\Tests\View\ParameterProvider\LocaleParameterProviderTest'); diff --git a/tests/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryTest.php b/tests/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryTest.php index 9fad4b1b77..cfe023e1e9 100644 --- a/tests/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryTest.php +++ b/tests/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryTest.php @@ -43,5 +43,3 @@ public function testGetParameterProvider() self::assertSame($provider, $registry->getParameterProvider('foo')); } } - -class_alias(ParameterProviderRegistryTest::class, 'eZ\Publish\Core\MVC\Symfony\FieldType\Tests\View\ParameterProviderRegistryTest'); diff --git a/tests/lib/MVC/Symfony/Locale/LocaleConverterTest.php b/tests/lib/MVC/Symfony/Locale/LocaleConverterTest.php index dd6a4129aa..5134d8859a 100644 --- a/tests/lib/MVC/Symfony/Locale/LocaleConverterTest.php +++ b/tests/lib/MVC/Symfony/Locale/LocaleConverterTest.php @@ -122,5 +122,3 @@ public function convertToRepositoryProvider(): array ]; } } - -class_alias(LocaleConverterTest::class, 'eZ\Publish\Core\MVC\Symfony\Locale\Tests\LocaleConverterTest'); diff --git a/tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php b/tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php index 3ef84fbbc3..8c70d0bccf 100644 --- a/tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php +++ b/tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php @@ -169,5 +169,3 @@ private function getLanguageCodesMap(): array return $config['parameters']['ibexa.locale.browser_map']; } } - -class_alias(UserLanguagePreferenceProviderTest::class, 'eZ\Publish\Core\MVC\Symfony\Locale\Tests\UserLanguagePreferenceProviderTest'); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/BaseTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/BaseTest.php index 81cdb54593..96b636cf7d 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/BaseTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/BaseTest.php @@ -116,5 +116,3 @@ protected function getPermissionResolverMock() ->getMock(); } } - -class_alias(BaseTest::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\Tests\ContentBased\BaseTest'); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php index 40e478d22f..f3e8732076 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php @@ -154,5 +154,3 @@ private function generateRepositoryMockForDepth($depth) return $repository; } } - -class_alias(DepthTest::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\Tests\ContentBased\DepthTest'); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php index 37be23d31f..2959b0219d 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php @@ -129,5 +129,3 @@ public function matchContentInfoProvider() ]; } } - -class_alias(ContentTest::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\Tests\ContentBased\Id\ContentTest'); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php index 362bdbddf2..8c6370436c 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php @@ -189,5 +189,3 @@ private function generateRepositoryMockForContentTypeGroupId($contentTypeGroupId return $repository; } } - -class_alias(ContentTypeGroupTest::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\Tests\ContentBased\Id\ContentTypeGroupTest'); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php index 3313c2435d..df7b957a80 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php @@ -151,5 +151,3 @@ public function matchContentInfoProvider() return $data; } } - -class_alias(ContentTypeTest::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\Tests\ContentBased\Id\ContentTypeTest'); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php index b6f890757b..6ad5d5464b 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php @@ -107,5 +107,3 @@ public function matchContentInfoProvider() ]; } } - -class_alias(LocationTest::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\Tests\ContentBased\Id\LocationTest'); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php index 9f88469723..28f0db3723 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php @@ -147,5 +147,3 @@ public function testMatchContentInfo($matchingConfig, Repository $repository, $e ); } } - -class_alias(ParentContentTypeTest::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\Tests\ContentBased\Id\ParentContentTypeTest'); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php index 00b8766011..08e3775115 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php @@ -145,5 +145,3 @@ private function generateRepositoryMockForParentLocationId($parentLocationId) return $repository; } } - -class_alias(ParentLocationTest::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\Tests\ContentBased\Id\ParentLocationTest'); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php index 6b8f3bb0e9..8591a28605 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php @@ -107,5 +107,3 @@ public function matchContentInfoProvider() ]; } } - -class_alias(RemoteTest::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\Tests\ContentBased\Id\RemoteTest'); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php index 6ff5a2a665..86961f1732 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php @@ -129,5 +129,3 @@ public function matchContentInfoProvider() ]; } } - -class_alias(SectionTest::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\Tests\ContentBased\Id\SectionTest'); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php index b781925924..ae5cd0c989 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php @@ -182,5 +182,3 @@ private function generateRepositoryMockForContentTypeIdentifier($contentTypeIden return $repository; } } - -class_alias(ContentTypeTest::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\Tests\ContentBased\Identifier\ContentTypeTest'); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php index 620ae026fc..299acbe3ab 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php @@ -169,5 +169,3 @@ public function testMatchContentInfo($matchingConfig, Repository $repository, $e ); } } - -class_alias(ParentContentTypeTest::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\Tests\ContentBased\Identifier\ParentContentTypeTest'); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php index 84b170ccd1..0b9e0cd348 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php @@ -142,5 +142,3 @@ public function testMatchContentInfo($matchingConfig, Repository $repository, $e ); } } - -class_alias(SectionTest::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\Tests\ContentBased\Identifier\SectionTest'); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php index 734eddeb6a..347751cfd8 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php @@ -63,5 +63,3 @@ private function getMultipleValuedMatcherMock() return $this->getMockForAbstractClass(MultipleValued::class); } } - -class_alias(MultipleValuedTest::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\Tests\ContentBased\MultipleValuedTest'); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php index 140df59248..614906d3fa 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php @@ -161,5 +161,3 @@ public function testMatchContentInfo() $this->matcher->matchContentInfo($this->getContentInfoMock()); } } - -class_alias(UrlAliasTest::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\Tests\ContentBased\UrlAliasTest'); diff --git a/tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php b/tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php index 6d8665ccd4..89e4322bd1 100644 --- a/tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php +++ b/tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php @@ -81,5 +81,3 @@ public function matchConfigProvider(): array ]; } } - -class_alias(DynamicallyConfiguredMatcherFactoryDecoratorTest::class, 'eZ\Publish\Core\MVC\Symfony\Matcher\Tests\DynamicallyConfiguredMatcherFactoryDecoratorTest'); diff --git a/tests/lib/MVC/Symfony/Routing/GeneratorTest.php b/tests/lib/MVC/Symfony/Routing/GeneratorTest.php index b5a5ffe104..51fc9a6c9e 100644 --- a/tests/lib/MVC/Symfony/Routing/GeneratorTest.php +++ b/tests/lib/MVC/Symfony/Routing/GeneratorTest.php @@ -128,5 +128,3 @@ public function testGenerateWithSiteAccessNoReverseMatch($urlResource, array $pa self::assertSame($fullUri, $this->generator->generate($urlResource, $parameters + ['siteaccess' => $siteAccessName], $referenceType)); } } - -class_alias(GeneratorTest::class, 'eZ\Publish\Core\MVC\Symfony\Routing\Tests\GeneratorTest'); diff --git a/tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php b/tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php index e999a29a14..91320c47b1 100644 --- a/tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php +++ b/tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php @@ -139,5 +139,3 @@ public function generateGenerator() ]; } } - -class_alias(RouteReferenceGeneratorTest::class, 'eZ\Publish\Core\MVC\Symfony\Routing\Tests\RouteReferenceGeneratorTest'); diff --git a/tests/lib/MVC/Symfony/Routing/RouteReferenceTest.php b/tests/lib/MVC/Symfony/Routing/RouteReferenceTest.php index f3e054a6b0..f8d4dc37ed 100644 --- a/tests/lib/MVC/Symfony/Routing/RouteReferenceTest.php +++ b/tests/lib/MVC/Symfony/Routing/RouteReferenceTest.php @@ -64,5 +64,3 @@ public function testRemoveParam() self::assertFalse($reference->has('foo')); } } - -class_alias(RouteReferenceTest::class, 'eZ\Publish\Core\MVC\Symfony\Routing\Tests\RouteReferenceTest'); diff --git a/tests/lib/MVC/Symfony/Routing/SimplifiedRequestTest.php b/tests/lib/MVC/Symfony/Routing/SimplifiedRequestTest.php index bcc841a063..4fb6356ece 100644 --- a/tests/lib/MVC/Symfony/Routing/SimplifiedRequestTest.php +++ b/tests/lib/MVC/Symfony/Routing/SimplifiedRequestTest.php @@ -86,5 +86,3 @@ public function fromUrlProvider() ]; } } - -class_alias(SimplifiedRequestTest::class, 'eZ\Publish\Core\MVC\Symfony\Routing\Tests\SimplifiedRequestTest'); diff --git a/tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php b/tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php index 6493473d2f..845f3bdcca 100644 --- a/tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php +++ b/tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php @@ -547,5 +547,3 @@ protected function getPermissionResolverMock() ->getMock(); } } - -class_alias(UrlAliasGeneratorTest::class, 'eZ\Publish\Core\MVC\Symfony\Routing\Tests\UrlAliasGeneratorTest'); diff --git a/tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php b/tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php index a467ee81e4..52ebd9be49 100644 --- a/tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php +++ b/tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php @@ -799,5 +799,3 @@ public function testGenerateWithContentIdWithMissingMainLocation() ); } } - -class_alias(UrlAliasRouterTest::class, 'eZ\Publish\Core\MVC\Symfony\Routing\Tests\UrlAliasRouterTest'); diff --git a/tests/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProviderTest.php b/tests/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProviderTest.php index c5d2a433d5..dea321bd2d 100644 --- a/tests/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProviderTest.php +++ b/tests/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProviderTest.php @@ -55,5 +55,3 @@ public function testAuthenticate() self::assertSame($anonymousToken, $authProvider->authenticate($anonymousToken)); } } - -class_alias(AnonymousAuthenticationProviderTest::class, 'eZ\Publish\Core\MVC\Symfony\Security\Tests\Authentication\AnonymousAuthenticationProviderTest'); diff --git a/tests/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandlerTest.php b/tests/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandlerTest.php index b48077592a..0f225f7849 100644 --- a/tests/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandlerTest.php +++ b/tests/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandlerTest.php @@ -63,5 +63,3 @@ public function testSetConfigResolver() self::assertSame($defaultPage, $options['default_target_path']); } } - -class_alias(DefaultAuthenticationSuccessHandlerTest::class, 'eZ\Publish\Core\MVC\Symfony\Security\Tests\Authentication\DefaultAuthenticationSuccessHandlerTest'); diff --git a/tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php b/tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php index 50a90fe430..71b035a4f8 100644 --- a/tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php +++ b/tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php @@ -118,5 +118,3 @@ public function testAuthenticate() ); } } - -class_alias(RememberMeRepositoryAuthenticationProviderTest::class, 'eZ\Publish\Core\MVC\Symfony\Security\Tests\Authentication\RememberMeRepositoryAuthenticationProviderTest'); diff --git a/tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php b/tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php index 97312b75a2..dff44088c9 100644 --- a/tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php +++ b/tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php @@ -270,5 +270,3 @@ public function testAuthenticateConstantTimeDisabled(): void $this->authProvider->authenticate($token); } } - -class_alias(RepositoryAuthenticationProviderTest::class, 'eZ\Publish\Core\MVC\Symfony\Security\Tests\Authentication\RepositoryAuthenticationProviderTest'); diff --git a/tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php b/tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php index 584d03d8c5..9b4de62073 100644 --- a/tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php +++ b/tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php @@ -413,5 +413,3 @@ public function testOnKernelRequestAccessGranted() $this->listener->onKernelRequest($event); } } - -class_alias(SecurityListenerTest::class, 'eZ\Publish\Core\MVC\Symfony\Security\Tests\EventListener\SecurityListenerTest'); diff --git a/tests/lib/MVC/Symfony/Security/HttpUtilsTest.php b/tests/lib/MVC/Symfony/Security/HttpUtilsTest.php index 955c02b728..d196b24bd0 100644 --- a/tests/lib/MVC/Symfony/Security/HttpUtilsTest.php +++ b/tests/lib/MVC/Symfony/Security/HttpUtilsTest.php @@ -139,5 +139,3 @@ public function checkRequestPathProvider() ]; } } - -class_alias(HttpUtilsTest::class, 'eZ\Publish\Core\MVC\Symfony\Security\Tests\HttpUtilsTest'); diff --git a/tests/lib/MVC/Symfony/Security/InteractiveLoginTokenTest.php b/tests/lib/MVC/Symfony/Security/InteractiveLoginTokenTest.php index ed83118f3d..9b026077b9 100644 --- a/tests/lib/MVC/Symfony/Security/InteractiveLoginTokenTest.php +++ b/tests/lib/MVC/Symfony/Security/InteractiveLoginTokenTest.php @@ -52,5 +52,3 @@ public function testSerialize() self::assertEquals($token, $unserializedToken); } } - -class_alias(InteractiveLoginTokenTest::class, 'eZ\Publish\Core\MVC\Symfony\Security\Tests\InteractiveLoginTokenTest'); diff --git a/tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php b/tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php index 3013e436e5..1579cd7a37 100644 --- a/tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php +++ b/tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php @@ -186,5 +186,3 @@ public function testLoadUserByAPIUser() self::assertSame(['ROLE_USER'], $user->getRoles()); } } - -class_alias(EmailProviderTest::class, 'eZ\Publish\Core\MVC\Symfony\Security\Tests\User\EmailProviderTest'); diff --git a/tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php b/tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php index 42e3a75346..6fe995cb08 100644 --- a/tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php +++ b/tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php @@ -186,5 +186,3 @@ public function testLoadUserByAPIUser() self::assertSame(['ROLE_USER'], $user->getRoles()); } } - -class_alias(UsernameProviderTest::class, 'eZ\Publish\Core\MVC\Symfony\Security\Tests\User\UsernameProviderTest'); diff --git a/tests/lib/MVC/Symfony/Security/UserCheckerTest.php b/tests/lib/MVC/Symfony/Security/UserCheckerTest.php index 1d3c6b6e77..8760a1b6db 100644 --- a/tests/lib/MVC/Symfony/Security/UserCheckerTest.php +++ b/tests/lib/MVC/Symfony/Security/UserCheckerTest.php @@ -162,5 +162,3 @@ public function testCheckPostAuthWithExpiredUser(): void $this->userChecker->checkPostAuth(new User($apiUser)); } } - -class_alias(UserCheckerTest::class, 'eZ\Publish\Core\MVC\Symfony\Security\Tests\UserCheckerTest'); diff --git a/tests/lib/MVC/Symfony/Security/UserTest.php b/tests/lib/MVC/Symfony/Security/UserTest.php index da74c5f5f5..67ed0055ff 100644 --- a/tests/lib/MVC/Symfony/Security/UserTest.php +++ b/tests/lib/MVC/Symfony/Security/UserTest.php @@ -129,5 +129,3 @@ public function testToString(): void self::assertSame($fullName, (string)$user); } } - -class_alias(UserTest::class, 'eZ\Publish\Core\MVC\Symfony\Security\Tests\UserTest'); diff --git a/tests/lib/MVC/Symfony/Security/UserWrappedTest.php b/tests/lib/MVC/Symfony/Security/UserWrappedTest.php index bda42601c8..3eb541a47e 100644 --- a/tests/lib/MVC/Symfony/Security/UserWrappedTest.php +++ b/tests/lib/MVC/Symfony/Security/UserWrappedTest.php @@ -118,5 +118,3 @@ public function testNotSerializeApiUser(): void interface UserEquatableInterface extends UserInterface, EquatableInterface { } - -class_alias(UserWrappedTest::class, 'eZ\Publish\Core\MVC\Symfony\Security\Tests\UserWrappedTest'); diff --git a/tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php b/tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php index 1d429d8cda..2d8261b14c 100644 --- a/tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php +++ b/tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php @@ -212,5 +212,3 @@ public function voteProvider() ]; } } - -class_alias(CoreVoterTest::class, 'eZ\Publish\Core\MVC\Symfony\Security\Tests\Voter\CoreVoterTest'); diff --git a/tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php b/tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php index 815c7db73a..971b646df8 100644 --- a/tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php +++ b/tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php @@ -196,5 +196,3 @@ public function voteProvider() ]; } } - -class_alias(ValueObjectVoterTest::class, 'eZ\Publish\Core\MVC\Symfony\Security\Tests\Voter\ValueObjectVoterTest'); diff --git a/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php b/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php index 996c581088..32a33be0a3 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php @@ -330,5 +330,3 @@ public function testSerialize() self::assertSame($serializedSA1, $serializedSA2); } } - -class_alias(CompoundAndTest::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\Compound\CompoundAndTest'); diff --git a/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php b/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php index fc0c2f08ca..5a5ced475e 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php @@ -332,5 +332,3 @@ public function testSerialize() self::assertSame($serializedSA1, $serializedSA2); } } - -class_alias(CompoundOrTest::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\Compound\CompoundOrTest'); diff --git a/tests/lib/MVC/Symfony/SiteAccess/MatcherSerializationTest.php b/tests/lib/MVC/Symfony/SiteAccess/MatcherSerializationTest.php index 1826d10501..72ad6e3a86 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/MatcherSerializationTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/MatcherSerializationTest.php @@ -172,5 +172,3 @@ private function getMapURIMatcherTestCase(): array return [$matcherBeforeSerialization, $matcherAfterDeserialization]; } } - -class_alias(MatcherSerializationTest::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\MatcherSerializationTest'); diff --git a/tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php b/tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php index 8e1c555b74..c774ec8d2b 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php @@ -172,5 +172,3 @@ static function (string $groupName) { return $undefinedSiteAccess; } } - -class_alias(ChainSiteAccessProviderTest::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\Provider\ChainSiteAccessProviderTest'); diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterBaseTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterBaseTest.php index 04cf9acb3d..79b9f905e4 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterBaseTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterBaseTest.php @@ -88,5 +88,3 @@ private function createSiteAccessProviderMock(): SiteAccess\SiteAccessProviderIn */ abstract public function getSiteAccessProviderSettings(): array; } - -class_alias(RouterBaseTest::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\RouterBaseTest'); diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php index 9196cd6be7..b5f2fcf238 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php @@ -164,5 +164,3 @@ public function getSiteAccessProviderSettings(): array ]; } } - -class_alias(RouterHostElementTest::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\RouterHostElementTest'); diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php index 01fb6cfc30..a9cba08db6 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php @@ -200,5 +200,3 @@ public function getSiteAccessProviderSettings(): array ]; } } - -class_alias(RouterHostPortURITest::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\RouterHostPortURITest'); diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterHostRegexTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterHostRegexTest.php index 746a9fe204..d7ccdc5350 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterHostRegexTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterHostRegexTest.php @@ -120,5 +120,3 @@ public function getSiteAccessProviderSettings(): array ]; } } - -class_alias(RouterHostRegexTest::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\RouterHostRegexTest'); diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php index 3643133a58..1c86354a6f 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php @@ -135,5 +135,3 @@ public function getSiteAccessProviderSettings(): array ]; } } - -class_alias(RouterHostTextTest::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\RouterHostTextTest'); diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php index 96d96ef533..13e870188c 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php @@ -111,5 +111,3 @@ public function testReverseMatch() self::assertSame('/toutouyoutou/foo', $result->getRequest()->pathinfo); } } - -class_alias(RouterMapURITest::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\RouterMapURITest'); diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterPortHostURITest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterPortHostURITest.php index 191a04c50f..4dcb716075 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterPortHostURITest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterPortHostURITest.php @@ -125,5 +125,3 @@ public function getSiteAccessProviderSettings(): array ]; } } - -class_alias(RouterPortHostURITest::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\RouterPortHostURITest'); diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterSpecialPortsTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterSpecialPortsTest.php index 5bbf311619..20b5399ca3 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterSpecialPortsTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterSpecialPortsTest.php @@ -125,5 +125,3 @@ public function getSiteAccessProviderSettings(): array ]; } } - -class_alias(RouterSpecialPortsTest::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\RouterSpecialPortsTest'); diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterTest.php index 8c75c92d36..471ac520ce 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterTest.php @@ -325,5 +325,3 @@ public function getSiteAccessProviderSettings(): array ]; } } - -class_alias(RouterTest::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\RouterTest'); diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php b/tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php index 94fe00fb30..a13cf4ac7c 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php @@ -219,5 +219,3 @@ public function getSiteAccessProviderSettings(): array ]; } } - -class_alias(RouterURIElement2Test::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\RouterURIElement2Test'); diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php index 692117719a..3f93c3ee79 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php @@ -189,5 +189,3 @@ public function getSiteAccessProviderSettings(): array ]; } } - -class_alias(RouterURIElementTest::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\RouterURIElementTest'); diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterURIRegexTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterURIRegexTest.php index e20ce44a49..e80ca50716 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterURIRegexTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterURIRegexTest.php @@ -136,5 +136,3 @@ public function getSiteAccessProviderSettings(): array ]; } } - -class_alias(RouterURIRegexTest::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\RouterURIRegexTest'); diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php index eebe52612d..4b16e9efc3 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php @@ -167,5 +167,3 @@ public function getSiteAccessProviderSettings(): array ]; } } - -class_alias(RouterURITextTest::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\RouterURITextTest'); diff --git a/tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php b/tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php index 23f9f45ceb..7ef230d7ee 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php @@ -161,5 +161,3 @@ private function getConfigResolverParameters(): array ]; } } - -class_alias(SiteAccessServiceTest::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\SiteAccessServiceTest'); diff --git a/tests/lib/MVC/Symfony/SiteAccess/SiteAccessSetting.php b/tests/lib/MVC/Symfony/SiteAccess/SiteAccessSetting.php index 7a77d2e35e..6cf21d0746 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/SiteAccessSetting.php +++ b/tests/lib/MVC/Symfony/SiteAccess/SiteAccessSetting.php @@ -34,5 +34,3 @@ public function __construct( $this->matchingType = $matchingType; } } - -class_alias(SiteAccessSetting::class, 'eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\SiteAccessSetting'); diff --git a/tests/lib/MVC/Symfony/Templating/BaseRenderStrategyTest.php b/tests/lib/MVC/Symfony/Templating/BaseRenderStrategyTest.php index 5e847d6eed..75c206b855 100644 --- a/tests/lib/MVC/Symfony/Templating/BaseRenderStrategyTest.php +++ b/tests/lib/MVC/Symfony/Templating/BaseRenderStrategyTest.php @@ -98,5 +98,3 @@ public function createContent(int $id): APIContent ]); } } - -class_alias(BaseRenderStrategyTest::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Tests\BaseRenderStrategyTest'); diff --git a/tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php b/tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php index b3166c34c4..c4ada9c45b 100644 --- a/tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php +++ b/tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php @@ -197,5 +197,3 @@ public function testGetAvailableLanguages() self::assertSame($languages, $this->helper->getAvailableLanguages()); } } - -class_alias(GlobalHelperTest::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Tests\GlobalHelperTest'); diff --git a/tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php b/tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php index 7699307291..b4f5e74957 100644 --- a/tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php +++ b/tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php @@ -150,5 +150,3 @@ public function testExpectedMethodRenderArgumentsFormat(): void )); } } - -class_alias(RenderContentStrategyTest::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Tests\RenderContentStrategyTest'); diff --git a/tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php b/tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php index 8905fdd7b6..39f64bbdd0 100644 --- a/tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php +++ b/tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php @@ -152,5 +152,3 @@ public function testExpectedMethodRenderRequestFormat(): void )); } } - -class_alias(RenderLocationStrategyTest::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Tests\RenderLocationStrategyTest'); diff --git a/tests/lib/MVC/Symfony/Templating/RenderOptionsTest.php b/tests/lib/MVC/Symfony/Templating/RenderOptionsTest.php index 544ffc560a..aa1ec184a4 100644 --- a/tests/lib/MVC/Symfony/Templating/RenderOptionsTest.php +++ b/tests/lib/MVC/Symfony/Templating/RenderOptionsTest.php @@ -80,5 +80,3 @@ public function testUnsettingOptions(): void self::assertTrue($renderOptions->has('c')); } } - -class_alias(RenderOptionsTest::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Tests\RenderOptionsTest'); diff --git a/tests/lib/MVC/Symfony/Templating/RenderStrategyTest.php b/tests/lib/MVC/Symfony/Templating/RenderStrategyTest.php index ac90936cc2..9c3189249f 100644 --- a/tests/lib/MVC/Symfony/Templating/RenderStrategyTest.php +++ b/tests/lib/MVC/Symfony/Templating/RenderStrategyTest.php @@ -115,5 +115,3 @@ public function testMultipleStrategies(): void self::assertSame('other_rendered_content', $renderStrategy->render($valueObject, new RenderOptions())); } } - -class_alias(RenderStrategyTest::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Tests\RenderStrategyTest'); diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php index 2df527967c..4630033327 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php @@ -213,5 +213,3 @@ function ($contentTypeId) { return $mock; } } - -class_alias(ContentExtensionTest::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Tests\Twig\Extension\ContentExtensionTest'); diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/DataAttributesExtensionTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/DataAttributesExtensionTest.php index 6311fdaf57..7a48b05db1 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/DataAttributesExtensionTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/DataAttributesExtensionTest.php @@ -25,5 +25,3 @@ protected function getFixturesDir(): string return __DIR__ . '/_fixtures/filters'; } } - -class_alias(DataAttributesExtensionTest::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Tests\Twig\Extension\DataAttributesExtensionTest'); diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php index a903909131..238318a116 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php @@ -205,5 +205,3 @@ private function getResourceProviderMock(): ResourceProviderInterface return $mock; } } - -class_alias(FieldRenderingExtensionIntegrationTest::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Tests\Twig\Extension\FieldRenderingExtensionIntegrationTest'); diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php index 7555d68f14..2ee4c4ef46 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php @@ -140,5 +140,3 @@ static function ($suffixes) use ($that) { return $this->translatorMock; } } - -class_alias(FileSizeExtensionTest::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Tests\Twig\Extension\FileSizeExtensionTest'); diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php index bfb7fe50d2..7be71fe133 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php @@ -133,5 +133,3 @@ protected function doIntegrationTest($file, $message, $condition, $templates, $e } } } - -class_alias(FileSystemTwigIntegrationTestCase::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Tests\Twig\Extension\FileSystemTwigIntegrationTestCase'); diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/QueryRenderingExtensionTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/QueryRenderingExtensionTest.php index 4d09fef55b..e1222921de 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/QueryRenderingExtensionTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/QueryRenderingExtensionTest.php @@ -32,5 +32,3 @@ protected function getFixturesDir(): string return __DIR__ . '/_fixtures/query_rendering_functions/'; } } - -class_alias(QueryRenderingExtensionTest::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Tests\Twig\Extension\QueryRenderingExtensionTest'); diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtensionTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtensionTest.php index a5b6324f71..970e5a09e7 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtensionTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtensionTest.php @@ -115,5 +115,3 @@ private function getUrlGenerator(): UrlGeneratorInterface return $generator; } } - -class_alias(RoutingExtensionTest::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Tests\Twig\Extension\RoutingExtensionTest'); diff --git a/tests/lib/MVC/Symfony/Templating/Twig/ResourceProviderTest.php b/tests/lib/MVC/Symfony/Templating/Twig/ResourceProviderTest.php index dd9b9f3ecb..6604ca06e8 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/ResourceProviderTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/ResourceProviderTest.php @@ -183,5 +183,3 @@ protected function getConfigResolverMock(): ConfigResolverInterface return $mock; } } - -class_alias(ResourceProviderTest::class, 'eZ\Publish\Core\MVC\Symfony\Templating\Tests\Twig\ResourceProviderTest'); diff --git a/tests/lib/MVC/Symfony/View/AbstractViewTest.php b/tests/lib/MVC/Symfony/View/AbstractViewTest.php index bf97210d12..43ceba3a19 100644 --- a/tests/lib/MVC/Symfony/View/AbstractViewTest.php +++ b/tests/lib/MVC/Symfony/View/AbstractViewTest.php @@ -132,5 +132,3 @@ public function badTemplateIdentifierProvider(): array ]; } } - -class_alias(AbstractViewTest::class, 'eZ\Publish\Core\MVC\Symfony\View\Tests\AbstractViewTest'); diff --git a/tests/lib/MVC/Symfony/View/Builder/ContentViewBuilderTest.php b/tests/lib/MVC/Symfony/View/Builder/ContentViewBuilderTest.php index b87ebe2f06..13bcece2bd 100644 --- a/tests/lib/MVC/Symfony/View/Builder/ContentViewBuilderTest.php +++ b/tests/lib/MVC/Symfony/View/Builder/ContentViewBuilderTest.php @@ -479,5 +479,3 @@ public function testBuildViewInsertsDoNotGenerateEmbedUrlParameter(): void ); } } - -class_alias(ContentViewBuilderTest::class, 'eZ\Publish\Core\MVC\Symfony\View\Tests\Builder\ContentViewBuilderTest'); diff --git a/tests/lib/MVC/Symfony/View/ContentViewTest.php b/tests/lib/MVC/Symfony/View/ContentViewTest.php index ee039dd1a2..34cfe01d98 100644 --- a/tests/lib/MVC/Symfony/View/ContentViewTest.php +++ b/tests/lib/MVC/Symfony/View/ContentViewTest.php @@ -86,5 +86,3 @@ protected function getAlwaysAvailableParams(): array return $this->valueParams; } } - -class_alias(ContentViewTest::class, 'eZ\Publish\Core\MVC\Symfony\View\Tests\ContentViewTest'); diff --git a/tests/lib/MVC/Symfony/View/LoginFormViewTest.php b/tests/lib/MVC/Symfony/View/LoginFormViewTest.php index 5ea750bcf9..8807043809 100644 --- a/tests/lib/MVC/Symfony/View/LoginFormViewTest.php +++ b/tests/lib/MVC/Symfony/View/LoginFormViewTest.php @@ -50,5 +50,3 @@ protected function getAlwaysAvailableParams(): array ]; } } - -class_alias(LoginFormViewTest::class, 'eZ\Publish\Core\MVC\Symfony\View\Tests\LoginFormViewTest'); diff --git a/tests/lib/MVC/Symfony/View/Renderer/TemplateRendererTest.php b/tests/lib/MVC/Symfony/View/Renderer/TemplateRendererTest.php index 4ba75aac17..fec5439591 100644 --- a/tests/lib/MVC/Symfony/View/Renderer/TemplateRendererTest.php +++ b/tests/lib/MVC/Symfony/View/Renderer/TemplateRendererTest.php @@ -78,5 +78,3 @@ protected function createView() return $view; } } - -class_alias(TemplateRendererTest::class, 'eZ\Publish\Core\MVC\Symfony\View\Tests\Renderer\TemplateRendererTest'); diff --git a/tests/lib/MVC/Symfony/View/VariableProviderRegistryTest.php b/tests/lib/MVC/Symfony/View/VariableProviderRegistryTest.php index 5e28067f13..a147ea4ae4 100644 --- a/tests/lib/MVC/Symfony/View/VariableProviderRegistryTest.php +++ b/tests/lib/MVC/Symfony/View/VariableProviderRegistryTest.php @@ -103,5 +103,3 @@ public function testParameterProviderChecker(): void self::assertFalse($registry->hasTwigVariableProvider('provider_c')); } } - -class_alias(VariableProviderRegistryTest::class, 'eZ\Publish\Core\MVC\Symfony\View\Tests\VariableProviderRegistryTest'); diff --git a/tests/lib/MVC/Symfony/View/ViewManagerTest.php b/tests/lib/MVC/Symfony/View/ViewManagerTest.php index 2162ffd56e..7eec2b1e53 100644 --- a/tests/lib/MVC/Symfony/View/ViewManagerTest.php +++ b/tests/lib/MVC/Symfony/View/ViewManagerTest.php @@ -344,5 +344,3 @@ private function createLocationViewProviderMocks() ]; } } - -class_alias(ViewManagerTest::class, 'eZ\Publish\Core\MVC\Symfony\View\Tests\ViewManagerTest'); diff --git a/tests/lib/Pagination/AdapterFactory/SearchHitAdapterFactoryTest.php b/tests/lib/Pagination/AdapterFactory/SearchHitAdapterFactoryTest.php index bab86a7ac3..a0e2be28d9 100644 --- a/tests/lib/Pagination/AdapterFactory/SearchHitAdapterFactoryTest.php +++ b/tests/lib/Pagination/AdapterFactory/SearchHitAdapterFactoryTest.php @@ -106,5 +106,3 @@ public function dataProviderForCreateFixedAdapter(): iterable ]; } } - -class_alias(SearchHitAdapterFactoryTest::class, 'eZ\Publish\Core\Pagination\Tests\AdapterFactory\SearchHitAdapterFactoryTest'); diff --git a/tests/lib/Pagination/ContentFilteringAdapterTest.php b/tests/lib/Pagination/ContentFilteringAdapterTest.php index 8874ec45a3..d788e69013 100644 --- a/tests/lib/Pagination/ContentFilteringAdapterTest.php +++ b/tests/lib/Pagination/ContentFilteringAdapterTest.php @@ -96,5 +96,3 @@ private function createExpectedContentList(int $numberOfItems): ContentList return new ContentList($numberOfItems, $items); } } - -class_alias(ContentFilteringAdapterTest::class, 'eZ\Publish\Core\Pagination\Tests\ContentFilteringAdapterTest'); diff --git a/tests/lib/Pagination/ContentSearchAdapterTest.php b/tests/lib/Pagination/ContentSearchAdapterTest.php index 7fcf32cd32..ecd6475fb3 100644 --- a/tests/lib/Pagination/ContentSearchAdapterTest.php +++ b/tests/lib/Pagination/ContentSearchAdapterTest.php @@ -44,5 +44,3 @@ protected function getExpectedFinalResultFromHits($hits) return $expectedResult; } } - -class_alias(ContentSearchAdapterTest::class, 'eZ\Publish\Core\Pagination\Tests\ContentSearchAdapterTest'); diff --git a/tests/lib/Pagination/ContentSearchHitAdapterTest.php b/tests/lib/Pagination/ContentSearchHitAdapterTest.php index 683117142a..9abb45c145 100644 --- a/tests/lib/Pagination/ContentSearchHitAdapterTest.php +++ b/tests/lib/Pagination/ContentSearchHitAdapterTest.php @@ -185,5 +185,3 @@ private function createTestQuery(int $limit = 25, int $offset = 0): Query return $query; } } - -class_alias(ContentSearchHitAdapterTest::class, 'eZ\Publish\Core\Pagination\Tests\ContentSearchHitAdapterTest'); diff --git a/tests/lib/Pagination/FixedSearchResultHitAdapterTest.php b/tests/lib/Pagination/FixedSearchResultHitAdapterTest.php index 24ef97db56..685a4596f7 100644 --- a/tests/lib/Pagination/FixedSearchResultHitAdapterTest.php +++ b/tests/lib/Pagination/FixedSearchResultHitAdapterTest.php @@ -45,5 +45,3 @@ private function createExampleSearchResult(): SearchResult return $searchResult; } } - -class_alias(FixedSearchResultHitAdapterTest::class, 'eZ\Publish\Core\Pagination\Tests\FixedSearchResultHitAdapterTest'); diff --git a/tests/lib/Pagination/LocationFilteringAdapterTest.php b/tests/lib/Pagination/LocationFilteringAdapterTest.php index 36ce5f31a7..794623e229 100644 --- a/tests/lib/Pagination/LocationFilteringAdapterTest.php +++ b/tests/lib/Pagination/LocationFilteringAdapterTest.php @@ -99,5 +99,3 @@ private function createExpectedLocationList(int $numberOfItems): LocationList ]); } } - -class_alias(LocationFilteringAdapterTest::class, 'eZ\Publish\Core\Pagination\Tests\LocationFilteringAdapterTest'); diff --git a/tests/lib/Pagination/LocationSearchAdapterTest.php b/tests/lib/Pagination/LocationSearchAdapterTest.php index 4f62777f46..eea38eb32c 100644 --- a/tests/lib/Pagination/LocationSearchAdapterTest.php +++ b/tests/lib/Pagination/LocationSearchAdapterTest.php @@ -43,5 +43,3 @@ protected function getExpectedFinalResultFromHits($hits) return $expectedResult; } } - -class_alias(LocationSearchAdapterTest::class, 'eZ\Publish\Core\Pagination\Tests\LocationSearchAdapterTest'); diff --git a/tests/lib/Pagination/LocationSearchHitAdapterTest.php b/tests/lib/Pagination/LocationSearchHitAdapterTest.php index a9889abbe9..6298ec5b44 100644 --- a/tests/lib/Pagination/LocationSearchHitAdapterTest.php +++ b/tests/lib/Pagination/LocationSearchHitAdapterTest.php @@ -189,5 +189,3 @@ private function createTestQuery(int $limit = 25, int $offset = 0): LocationQuer return $query; } } - -class_alias(LocationSearchHitAdapterTest::class, 'eZ\Publish\Core\Pagination\Tests\LocationSearchHitAdapterTest'); diff --git a/tests/lib/Pagination/PagerfantaTest.php b/tests/lib/Pagination/PagerfantaTest.php index 8c77e8ad29..5611a851a8 100644 --- a/tests/lib/Pagination/PagerfantaTest.php +++ b/tests/lib/Pagination/PagerfantaTest.php @@ -71,5 +71,3 @@ public function testGetMaxScore(): void ); } } - -class_alias(PagerfantaTest::class, 'eZ\Publish\Core\Pagination\Tests\PagerfantaTest'); diff --git a/tests/lib/Persistence/Cache/AbstractBaseHandlerTest.php b/tests/lib/Persistence/Cache/AbstractBaseHandlerTest.php index 4495f26423..a13c39df08 100644 --- a/tests/lib/Persistence/Cache/AbstractBaseHandlerTest.php +++ b/tests/lib/Persistence/Cache/AbstractBaseHandlerTest.php @@ -187,5 +187,3 @@ private function provideInMemoryCacheHandlerArguments(): array ]; } } - -class_alias(AbstractBaseHandlerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\AbstractBaseHandlerTest'); diff --git a/tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php b/tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php index 4bdd590fb6..4027da9ca8 100644 --- a/tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php +++ b/tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php @@ -293,5 +293,3 @@ final public function testLoadMethodsCacheMiss( //$this->assertAttributeEquals([], 'tags', $cacheItem); } } - -class_alias(AbstractCacheHandlerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\AbstractCacheHandlerTest'); diff --git a/tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php b/tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php index 96055ac11c..b7ed47a072 100644 --- a/tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php +++ b/tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php @@ -294,5 +294,3 @@ final public function testLoadMethodsCacheMiss( //$this->assertAttributeEquals([], 'tags', $cacheItem); } } - -class_alias(AbstractInMemoryCacheHandlerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\AbstractInMemoryCacheHandlerTest'); diff --git a/tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php b/tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php index 7340251524..a27674cb6d 100644 --- a/tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php +++ b/tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php @@ -237,5 +237,3 @@ private function arrayAsGenerator(array $array) } } } - -class_alias(InMemoryClearingProxyAdapterTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\Adapter\InMemoryClearingProxyAdapterTest'); diff --git a/tests/lib/Persistence/Cache/BookmarkHandlerTest.php b/tests/lib/Persistence/Cache/BookmarkHandlerTest.php index 1a195ca41f..baf635f39a 100644 --- a/tests/lib/Persistence/Cache/BookmarkHandlerTest.php +++ b/tests/lib/Persistence/Cache/BookmarkHandlerTest.php @@ -103,5 +103,3 @@ public function providerForCachedLoadMethodsMiss(): array ]; } } - -class_alias(BookmarkHandlerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\BookmarkHandlerTest'); diff --git a/tests/lib/Persistence/Cache/ContentHandlerTest.php b/tests/lib/Persistence/Cache/ContentHandlerTest.php index 9a354a8a9c..0d90874a44 100644 --- a/tests/lib/Persistence/Cache/ContentHandlerTest.php +++ b/tests/lib/Persistence/Cache/ContentHandlerTest.php @@ -471,5 +471,3 @@ public function testDeleteContent() $handler->deleteContent(2); } } - -class_alias(ContentHandlerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\ContentHandlerTest'); diff --git a/tests/lib/Persistence/Cache/ContentLanguageHandlerTest.php b/tests/lib/Persistence/Cache/ContentLanguageHandlerTest.php index cc1c124562..01084a7666 100644 --- a/tests/lib/Persistence/Cache/ContentLanguageHandlerTest.php +++ b/tests/lib/Persistence/Cache/ContentLanguageHandlerTest.php @@ -162,5 +162,3 @@ public function providerForCachedLoadMethodsMiss(): array ]; } } - -class_alias(ContentLanguageHandlerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\ContentLanguageHandlerTest'); diff --git a/tests/lib/Persistence/Cache/ContentTypeHandlerTest.php b/tests/lib/Persistence/Cache/ContentTypeHandlerTest.php index 139da18a06..4798e79d7d 100644 --- a/tests/lib/Persistence/Cache/ContentTypeHandlerTest.php +++ b/tests/lib/Persistence/Cache/ContentTypeHandlerTest.php @@ -475,5 +475,3 @@ public function testPublish() call_user_func_array([$handler, $method], $arguments); } } - -class_alias(ContentTypeHandlerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\ContentTypeHandlerTest'); diff --git a/tests/lib/Persistence/Cache/InMemory/InMemoryCacheTest.php b/tests/lib/Persistence/Cache/InMemory/InMemoryCacheTest.php index 60a88d0481..4ae79bdc3d 100644 --- a/tests/lib/Persistence/Cache/InMemory/InMemoryCacheTest.php +++ b/tests/lib/Persistence/Cache/InMemory/InMemoryCacheTest.php @@ -193,7 +193,6 @@ public function testAccessCountsWhenReachingTotalLimit(): void self::assertSame($obj, $this->cache->get('eight')); } } -class_alias(InMemoryCacheTest::class, 'eZ\Publish\Core\Persistence\Cache\InMemory\InMemoryCacheTest'); namespace Ibexa\Core\Persistence\Cache\InMemory; diff --git a/tests/lib/Persistence/Cache/LocationHandlerTest.php b/tests/lib/Persistence/Cache/LocationHandlerTest.php index d9d4e0a0e8..918a49166a 100644 --- a/tests/lib/Persistence/Cache/LocationHandlerTest.php +++ b/tests/lib/Persistence/Cache/LocationHandlerTest.php @@ -320,5 +320,3 @@ public function providerForCachedLoadMethodsMiss(): array ]; } } - -class_alias(LocationHandlerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\LocationHandlerTest'); diff --git a/tests/lib/Persistence/Cache/NotificationHandlerTest.php b/tests/lib/Persistence/Cache/NotificationHandlerTest.php index 60e514d8bc..bce80e052b 100644 --- a/tests/lib/Persistence/Cache/NotificationHandlerTest.php +++ b/tests/lib/Persistence/Cache/NotificationHandlerTest.php @@ -207,5 +207,3 @@ public function providerForCachedLoadMethodsMiss(): array ]; } } - -class_alias(NotificationHandlerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\NotificationHandlerTest'); diff --git a/tests/lib/Persistence/Cache/ObjectStateHandlerTest.php b/tests/lib/Persistence/Cache/ObjectStateHandlerTest.php index 145e873c82..f21f35da45 100644 --- a/tests/lib/Persistence/Cache/ObjectStateHandlerTest.php +++ b/tests/lib/Persistence/Cache/ObjectStateHandlerTest.php @@ -213,5 +213,3 @@ public function providerForCachedLoadMethodsMiss(): array ]; } } - -class_alias(ObjectStateHandlerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\ObjectStateHandlerTest'); diff --git a/tests/lib/Persistence/Cache/PersistenceHandlerTest.php b/tests/lib/Persistence/Cache/PersistenceHandlerTest.php index 1a32f68695..b25070b469 100644 --- a/tests/lib/Persistence/Cache/PersistenceHandlerTest.php +++ b/tests/lib/Persistence/Cache/PersistenceHandlerTest.php @@ -111,5 +111,3 @@ public function testTransactionHandler() self::assertInstanceOf(Cache\TransactionHandler::class, $handler); } } - -class_alias(PersistenceHandlerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\PersistenceHandlerTest'); diff --git a/tests/lib/Persistence/Cache/PersistenceLoggerTest.php b/tests/lib/Persistence/Cache/PersistenceLoggerTest.php index b1e5a77371..fedd7615b9 100644 --- a/tests/lib/Persistence/Cache/PersistenceLoggerTest.php +++ b/tests/lib/Persistence/Cache/PersistenceLoggerTest.php @@ -97,5 +97,3 @@ public function testGetCallValues($logger) self::assertEquals(['uncached' => 1, 'miss' => 0, 'hit' => 0, 'memory' => 0], $calls[1]['stats']); } } - -class_alias(PersistenceLoggerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\PersistenceLoggerTest'); diff --git a/tests/lib/Persistence/Cache/SectionHandlerTest.php b/tests/lib/Persistence/Cache/SectionHandlerTest.php index 502f9365ff..bb2e308716 100644 --- a/tests/lib/Persistence/Cache/SectionHandlerTest.php +++ b/tests/lib/Persistence/Cache/SectionHandlerTest.php @@ -88,5 +88,3 @@ public function providerForCachedLoadMethodsMiss(): array ]; } } - -class_alias(SectionHandlerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\SectionHandlerTest'); diff --git a/tests/lib/Persistence/Cache/SettingHandlerTest.php b/tests/lib/Persistence/Cache/SettingHandlerTest.php index 057093566c..0dde64375a 100644 --- a/tests/lib/Persistence/Cache/SettingHandlerTest.php +++ b/tests/lib/Persistence/Cache/SettingHandlerTest.php @@ -98,5 +98,3 @@ public function providerForCachedLoadMethodsMiss(): array ]; } } - -class_alias(SettingHandlerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\SettingHandlerTest'); diff --git a/tests/lib/Persistence/Cache/TransactionHandlerTest.php b/tests/lib/Persistence/Cache/TransactionHandlerTest.php index 3c0b18e842..702043ec60 100644 --- a/tests/lib/Persistence/Cache/TransactionHandlerTest.php +++ b/tests/lib/Persistence/Cache/TransactionHandlerTest.php @@ -123,5 +123,3 @@ public function testBeginTransactionStartsCacheTransaction() $handler->beginTransaction(); } } - -class_alias(TransactionHandlerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\TransactionHandlerTest'); diff --git a/tests/lib/Persistence/Cache/TrashHandlerTest.php b/tests/lib/Persistence/Cache/TrashHandlerTest.php index 22b5aa5be9..05251183eb 100644 --- a/tests/lib/Persistence/Cache/TrashHandlerTest.php +++ b/tests/lib/Persistence/Cache/TrashHandlerTest.php @@ -307,5 +307,3 @@ public function testEmptyTrash() $handler->emptyTrash(); } } - -class_alias(TrashHandlerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\TrashHandlerTest'); diff --git a/tests/lib/Persistence/Cache/URLHandlerTest.php b/tests/lib/Persistence/Cache/URLHandlerTest.php index ad367e67bc..9188a2138c 100644 --- a/tests/lib/Persistence/Cache/URLHandlerTest.php +++ b/tests/lib/Persistence/Cache/URLHandlerTest.php @@ -155,5 +155,3 @@ public function testUpdateUrlStatusIsUpdated() $handler->updateUrl($urlId, $updateStruct); } } - -class_alias(URLHandlerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\URLHandlerTest'); diff --git a/tests/lib/Persistence/Cache/UrlAliasHandlerTest.php b/tests/lib/Persistence/Cache/UrlAliasHandlerTest.php index b3f011a197..c9c815db88 100644 --- a/tests/lib/Persistence/Cache/UrlAliasHandlerTest.php +++ b/tests/lib/Persistence/Cache/UrlAliasHandlerTest.php @@ -221,5 +221,3 @@ public function providerForCachedLoadMethodsMiss(): array ]; } } - -class_alias(UrlAliasHandlerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\UrlAliasHandlerTest'); diff --git a/tests/lib/Persistence/Cache/UrlWildcardHandlerTest.php b/tests/lib/Persistence/Cache/UrlWildcardHandlerTest.php index b5606ba88c..900a3ad2e7 100644 --- a/tests/lib/Persistence/Cache/UrlWildcardHandlerTest.php +++ b/tests/lib/Persistence/Cache/UrlWildcardHandlerTest.php @@ -83,5 +83,3 @@ public function providerForCachedLoadMethodsMiss(): array ]; } } - -class_alias(UrlWildcardHandlerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\UrlWildcardHandlerTest'); diff --git a/tests/lib/Persistence/Cache/UserHandlerTest.php b/tests/lib/Persistence/Cache/UserHandlerTest.php index 044c449ae6..ffac1503ba 100644 --- a/tests/lib/Persistence/Cache/UserHandlerTest.php +++ b/tests/lib/Persistence/Cache/UserHandlerTest.php @@ -637,5 +637,3 @@ public function testRemoveRoleAssignment(): void $handler->removeRoleAssignment($roleAssignmentId); } } - -class_alias(UserHandlerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\UserHandlerTest'); diff --git a/tests/lib/Persistence/Cache/UserPreferenceHandlerTest.php b/tests/lib/Persistence/Cache/UserPreferenceHandlerTest.php index 853e29d2e2..2225cd674e 100644 --- a/tests/lib/Persistence/Cache/UserPreferenceHandlerTest.php +++ b/tests/lib/Persistence/Cache/UserPreferenceHandlerTest.php @@ -128,5 +128,3 @@ public function providerForCachedLoadMethodsMiss(): array ]; } } - -class_alias(UserPreferenceHandlerTest::class, 'eZ\Publish\Core\Persistence\Cache\Tests\UserPreferenceHandlerTest'); diff --git a/tests/lib/Persistence/DatabaseConnectionFactory.php b/tests/lib/Persistence/DatabaseConnectionFactory.php index dfedf5b930..4dda3c350b 100644 --- a/tests/lib/Persistence/DatabaseConnectionFactory.php +++ b/tests/lib/Persistence/DatabaseConnectionFactory.php @@ -85,5 +85,3 @@ public function createConnection(string $databaseURL): Connection return self::$connectionPool[$databaseURL]; } } - -class_alias(DatabaseConnectionFactory::class, 'eZ\Publish\Core\Persistence\Tests\DatabaseConnectionFactory'); diff --git a/tests/lib/Persistence/FieldTypeRegistryTest.php b/tests/lib/Persistence/FieldTypeRegistryTest.php index da394a66bc..f8b7aff505 100644 --- a/tests/lib/Persistence/FieldTypeRegistryTest.php +++ b/tests/lib/Persistence/FieldTypeRegistryTest.php @@ -93,5 +93,3 @@ protected function getFieldTypeMock() return $this->createMock(SPIFieldType::class); } } - -class_alias(FieldTypeRegistryTest::class, 'eZ\Publish\Core\Persistence\Tests\FieldTypeRegistryTest'); diff --git a/tests/lib/Persistence/FieldValue/Converter/ImageConverterTest.php b/tests/lib/Persistence/FieldValue/Converter/ImageConverterTest.php index e31971fb53..c3c70e7678 100644 --- a/tests/lib/Persistence/FieldValue/Converter/ImageConverterTest.php +++ b/tests/lib/Persistence/FieldValue/Converter/ImageConverterTest.php @@ -215,5 +215,3 @@ public function dataProviderForTestToFieldDefinition(): iterable ]; } } - -class_alias(ImageConverterTest::class, 'eZ\Publish\Core\Persistence\Tests\FieldValue\Converter\ImageConverterTest'); diff --git a/tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php index 52fd8076c3..e96a820e97 100644 --- a/tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php @@ -157,5 +157,3 @@ private function loadBookmark(int $id): array return is_array($data) ? $data : []; } } - -class_alias(DoctrineDatabaseTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Bookmark\Gateway\DoctrineDatabaseTest'); diff --git a/tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php b/tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php index 08ee473599..6b0508685c 100644 --- a/tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php +++ b/tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php @@ -194,5 +194,3 @@ public function testLocationSwapped() $this->handler->locationSwapped($location1Id, $location2Id); } } - -class_alias(HandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Bookmark\HandlerTest'); diff --git a/tests/lib/Persistence/Legacy/Bookmark/MapperTest.php b/tests/lib/Persistence/Legacy/Bookmark/MapperTest.php index 474dc64192..f3b4dcaa86 100644 --- a/tests/lib/Persistence/Legacy/Bookmark/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Bookmark/MapperTest.php @@ -76,5 +76,3 @@ public function testExtractBookmarksFromRows() self::assertEquals($objects, $this->mapper->extractBookmarksFromRows($rows)); } } - -class_alias(MapperTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Bookmark\MapperTest'); diff --git a/tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php b/tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php index bde1f77c6e..308dcce533 100644 --- a/tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php @@ -1701,5 +1701,3 @@ protected function getUrlAliasGatewayMock() return $this->urlAliasGatewayMock; } } - -class_alias(ContentHandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\ContentHandlerTest'); diff --git a/tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php b/tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php index 94baf5fdb2..4325bff99a 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php @@ -1018,5 +1018,3 @@ protected function getFieldTypeMock() return $this->fieldTypeMock; } } - -class_alias(FieldHandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldHandlerTest'); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php index 0171769c2c..9d606ac506 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php @@ -161,5 +161,3 @@ public function testToStorageFieldDefinitionDefaultEmpty() ); } } - -class_alias(AuthorTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\AuthorTest'); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxTest.php index 78c30d6e1c..331ec59c0b 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxTest.php @@ -104,5 +104,3 @@ public function testToFieldDefinition() self::assertNull($fieldDef->fieldTypeConstraints->fieldSettings); } } - -class_alias(CheckboxTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\CheckboxTest'); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php index 5b6394960d..7d2f97f0bc 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php @@ -200,5 +200,3 @@ public function testToFieldDefinitionSingle() ); } } - -class_alias(CountryTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\CountryTest'); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php index b369d82a9f..f34addff09 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php @@ -382,5 +382,3 @@ public function testGenerateDateIntervalXML() ); } } - -class_alias(DateAndTimeTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\DateAndTimeTest'); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateTest.php index 0eb70ab5f4..32b6760b8d 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateTest.php @@ -150,5 +150,3 @@ public function testToFieldDefinitionDefaultCurrentDate() self::assertSame('now', $fieldDef->defaultValue->data['timestring']); } } - -class_alias(DateTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\DateTest'); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNTest.php index bb7260d001..a526c25ae2 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNTest.php @@ -51,5 +51,3 @@ public function providerForTestToFieldDefinition() ]; } } - -class_alias(ISBNTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\ISBNTest'); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordTest.php index 47f35372f5..efd77df1df 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordTest.php @@ -79,5 +79,3 @@ public function testToFieldDefinition() $this->converter->toFieldDefinition(new StorageFieldDefinition(), new PersistenceFieldDefinition()); } } - -class_alias(KeywordTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\KeywordTest'); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaTest.php index 3b4b79aacf..544b257158 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaTest.php @@ -93,5 +93,3 @@ public function testToFieldDefinition() ); } } - -class_alias(MediaTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\MediaTest'); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php index 1a4681dfc5..0370b60aea 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php @@ -292,5 +292,3 @@ public function testToFieldDefinitionMultiple() ); } } - -class_alias(RelationListTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\RelationListTest'); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationTest.php index aeb653170c..878fda37a5 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationTest.php @@ -69,5 +69,3 @@ public function testToStorageFieldDefinition() ); } } - -class_alias(RelationTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\RelationTest'); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionTest.php index e741d20a18..f05a8f6418 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionTest.php @@ -327,5 +327,3 @@ public function testToFieldDefinitionSingleEmpty() self::assertEquals($expectedFieldDefinition, $actualFieldDefinition); } } - -class_alias(SelectionTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\SelectionTest'); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverterTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverterTest.php index 28744c243d..b05cd2b2ae 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverterTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverterTest.php @@ -180,5 +180,3 @@ public function testEmptyToFieldDefinition(): void self::assertNull($fieldDefinition->fieldTypeConstraints->fieldSettings); } } - -class_alias(SerializableConverterTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\SerializableConverterTest'); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockTest.php index 0551272a58..5fab303af7 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockTest.php @@ -125,5 +125,3 @@ public function testToFieldDefinition() ); } } - -class_alias(TextBlockTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\TextBlockTest'); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineTest.php index 50516d69ad..4c4c0c984c 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineTest.php @@ -156,5 +156,3 @@ public function testToFieldDefinition() self::assertSame($defaultText, $fieldDef->defaultValue->sortKey); } } - -class_alias(TextLineTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\TextLineTest'); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeTest.php index 0c9d7cd8f9..17259a0f4d 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeTest.php @@ -156,5 +156,3 @@ public function testToFieldDefinitionDefaultCurrentTime() ); } } - -class_alias(TimeTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\TimeTest'); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlTest.php index ea858a37ab..0f3a167f4b 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlTest.php @@ -85,5 +85,3 @@ public function testToFieldDefinition() $this->converter->toFieldDefinition(new StorageFieldDefinition(), new PersistenceFieldDefinition()); } } - -class_alias(UrlTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValue\Converter\UrlTest'); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValueConverterRegistryTest.php b/tests/lib/Persistence/Legacy/Content/FieldValueConverterRegistryTest.php index d4a48a6b5b..fa711c96a2 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValueConverterRegistryTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValueConverterRegistryTest.php @@ -56,5 +56,3 @@ protected function getFieldValueConverterMock() return $this->createMock(Converter::class); } } - -class_alias(FieldValueConverterRegistryTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldValueConverterRegistryTest'); diff --git a/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php index f226431428..0d11c7bde9 100644 --- a/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php @@ -1991,5 +1991,3 @@ private function assertContentVersionAttributesLanguages( ); } } - -class_alias(DoctrineDatabaseTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Gateway\DoctrineDatabaseTest'); diff --git a/tests/lib/Persistence/Legacy/Content/Gateway/RandomSortClauseHandlerFactoryTest.php b/tests/lib/Persistence/Legacy/Content/Gateway/RandomSortClauseHandlerFactoryTest.php index bd36c4e4da..7381cfecc8 100644 --- a/tests/lib/Persistence/Legacy/Content/Gateway/RandomSortClauseHandlerFactoryTest.php +++ b/tests/lib/Persistence/Legacy/Content/Gateway/RandomSortClauseHandlerFactoryTest.php @@ -98,5 +98,3 @@ public function getGateways(): array ]; } } - -class_alias(RandomSortClauseHandlerFactoryTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Gateway\RandomSortClauseHandlerFactoryTest'); diff --git a/tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php b/tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php index 0f8a458344..5a743d93b4 100644 --- a/tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php @@ -357,5 +357,3 @@ protected function getLanguagesFixture() return [$langUs, $langGb]; } } - -class_alias(CachingLanguageHandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Language\CachingLanguageHandlerTest'); diff --git a/tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php index 18a0745318..f0d60fc94a 100644 --- a/tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php @@ -188,5 +188,3 @@ protected function getDatabaseGateway(): DoctrineDatabase return $this->databaseGateway; } } - -class_alias(DoctrineDatabaseTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Language\Gateway\DoctrineDatabaseTest'); diff --git a/tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php b/tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php index e2a268bf32..7cbde56b28 100644 --- a/tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php @@ -301,5 +301,3 @@ protected function getGatewayMock() return $this->gatewayMock; } } - -class_alias(LanguageHandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Language\LanguageHandlerTest'); diff --git a/tests/lib/Persistence/Legacy/Content/Language/MapperTest.php b/tests/lib/Persistence/Legacy/Content/Language/MapperTest.php index 6f235492d8..55e19d5dfe 100644 --- a/tests/lib/Persistence/Legacy/Content/Language/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/Language/MapperTest.php @@ -113,5 +113,3 @@ protected function getLanguageFixture() return $struct; } } - -class_alias(MapperTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Language\MapperTest'); diff --git a/tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php b/tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php index b6c78d1404..bd83a4dad0 100644 --- a/tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php +++ b/tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php @@ -315,5 +315,3 @@ static function ($languageCodes) { return $this->languageHandler; } } - -class_alias(MaskGeneratorTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Language\MaskGeneratorTest'); diff --git a/tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php b/tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php index 5c40b767b8..95d26329b8 100644 --- a/tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php +++ b/tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php @@ -154,5 +154,3 @@ protected function getFullTextSearchConfiguration() ]; } } - -class_alias(LanguageAwareTestCase::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\LanguageAwareTestCase'); diff --git a/tests/lib/Persistence/Legacy/Content/LanguageHandlerMock.php b/tests/lib/Persistence/Legacy/Content/LanguageHandlerMock.php index dd876c8c49..642c5cf161 100644 --- a/tests/lib/Persistence/Legacy/Content/LanguageHandlerMock.php +++ b/tests/lib/Persistence/Legacy/Content/LanguageHandlerMock.php @@ -157,5 +157,3 @@ public function loadListByLanguageCodes(array $languageCodes): iterable return $languages; } } - -class_alias(LanguageHandlerMock::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\LanguageHandlerMock'); diff --git a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php index 6f88ba8adc..3dc7d9edb5 100644 --- a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php @@ -1484,5 +1484,3 @@ public function testUpdatePathIdentificationString( ); } } - -class_alias(DoctrineDatabaseTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Location\Gateway\DoctrineDatabaseTest'); diff --git a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php index 2bfa74636f..f8f6c4b221 100644 --- a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php +++ b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php @@ -439,5 +439,3 @@ public function testCountLocationsByContentId() self::assertSame(2, $handler->countLocationsByContentId(67)); } } - -class_alias(DoctrineDatabaseTrashTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Location\Gateway\DoctrineDatabaseTrashTest'); diff --git a/tests/lib/Persistence/Legacy/Content/Location/MapperTest.php b/tests/lib/Persistence/Legacy/Content/Location/MapperTest.php index 8327cab05a..da42e450cc 100644 --- a/tests/lib/Persistence/Legacy/Content/Location/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/Location/MapperTest.php @@ -164,5 +164,3 @@ public function testGetLocationCreateStruct() ); } } - -class_alias(MapperTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Location\MapperTest'); diff --git a/tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php b/tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php index a50140801d..bd77914e22 100644 --- a/tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php @@ -577,5 +577,3 @@ public function testFindTrashItemsWithLimits() self::assertCount(1, $trashResult); } } - -class_alias(TrashHandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Location\TrashHandlerTest'); diff --git a/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php b/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php index acadd29f66..860ea9fcf6 100644 --- a/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php @@ -709,5 +709,3 @@ protected function getPartlyMockedHandler(array $methods) ->getMock(); } } - -class_alias(LocationHandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\LocationHandlerTest'); diff --git a/tests/lib/Persistence/Legacy/Content/MapperTest.php b/tests/lib/Persistence/Legacy/Content/MapperTest.php index 1caaac1715..fcc6ecd11c 100644 --- a/tests/lib/Persistence/Legacy/Content/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/MapperTest.php @@ -788,5 +788,3 @@ protected function getContentTypeFromRows(array $rows): Content\Type return $contentType; } } - -class_alias(MapperTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\MapperTest'); diff --git a/tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php index bb54908de3..743d885dd9 100644 --- a/tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php @@ -519,5 +519,3 @@ protected function getDatabaseGateway(): DoctrineDatabase return $this->databaseGateway; } } - -class_alias(DoctrineDatabaseTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\ObjectState\Gateway\DoctrineDatabaseTest'); diff --git a/tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php b/tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php index 1426d2ac4b..8c72159c9a 100644 --- a/tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php @@ -231,5 +231,3 @@ protected function getObjectStateGroupInputStructFixture() return $inputStruct; } } - -class_alias(MapperTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\ObjectState\MapperTest'); diff --git a/tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php b/tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php index 7839ed657b..2eccd484af 100644 --- a/tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php @@ -656,5 +656,3 @@ protected function getGatewayMock() return $this->gatewayMock; } } - -class_alias(ObjectStateHandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\ObjectState\ObjectStateHandlerTest'); diff --git a/tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php index a3e324e74f..ec9cf92c25 100644 --- a/tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php @@ -269,5 +269,3 @@ protected function getDatabaseGateway(): Gateway return $this->databaseGateway; } } - -class_alias(DoctrineDatabaseTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Section\Gateway\DoctrineDatabaseTest'); diff --git a/tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php b/tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php index ab2d71839d..21b5808771 100644 --- a/tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php @@ -318,5 +318,3 @@ protected function getGatewayMock() return $this->gatewayMock; } } - -class_alias(SectionHandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Section\SectionHandlerTest'); diff --git a/tests/lib/Persistence/Legacy/Content/StorageHandlerTest.php b/tests/lib/Persistence/Legacy/Content/StorageHandlerTest.php index 843420361c..09ff6c4359 100644 --- a/tests/lib/Persistence/Legacy/Content/StorageHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/StorageHandlerTest.php @@ -224,5 +224,3 @@ protected function getVersionInfoMock(): VersionInfo return $this->versionInfoMock; } } - -class_alias(StorageHandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\StorageHandlerTest'); diff --git a/tests/lib/Persistence/Legacy/Content/StorageRegistryTest.php b/tests/lib/Persistence/Legacy/Content/StorageRegistryTest.php index f4ab1cc54d..1b3b31a113 100644 --- a/tests/lib/Persistence/Legacy/Content/StorageRegistryTest.php +++ b/tests/lib/Persistence/Legacy/Content/StorageRegistryTest.php @@ -59,5 +59,3 @@ protected function getStorageMock() return $this->createMock(FieldStorage::class); } } - -class_alias(StorageRegistryTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\StorageRegistryTest'); diff --git a/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php b/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php index 78a219941b..5e5adc6b9e 100644 --- a/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php @@ -521,5 +521,3 @@ protected function getTreeHandler() ); } } - -class_alias(TreeHandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\TreeHandlerTest'); diff --git a/tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php b/tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php index 23bf963870..79b064e95f 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php @@ -1239,5 +1239,3 @@ public function testRemoveContentTypeTranslation() ); } } - -class_alias(ContentTypeHandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Type\ContentTypeHandlerTest'); diff --git a/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php b/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php index 850af03874..291d81c397 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php @@ -638,5 +638,3 @@ protected function getMockedAction($methods = []) ->getMock(); } } - -class_alias(AddFieldTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Type\ContentUpdater\Action\AddFieldTest'); diff --git a/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php b/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php index 034b5143d6..b15af30134 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php @@ -352,5 +352,3 @@ protected function getRemoveFieldAction() return $this->removeFieldAction; } } - -class_alias(RemoveFieldTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Type\ContentUpdater\Action\RemoveFieldTest'); diff --git a/tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php b/tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php index 6758f41d14..8fad3490ab 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php @@ -260,5 +260,3 @@ protected function getContentUpdater() return $this->contentUpdater; } } - -class_alias(ContentUpdaterTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Type\ContentUpdaterTest'); diff --git a/tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php index ec51ee80d5..a505662e16 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php @@ -1161,5 +1161,3 @@ protected function getGateway(): DoctrineDatabase return $this->gateway; } } - -class_alias(DoctrineDatabaseTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Type\Gateway\DoctrineDatabaseTest'); diff --git a/tests/lib/Persistence/Legacy/Content/Type/MapperTest.php b/tests/lib/Persistence/Legacy/Content/Type/MapperTest.php index 424fc60e2d..6615a94aee 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/MapperTest.php @@ -513,5 +513,3 @@ private function getStorageDispatcherMock(): StorageDispatcherInterface return $this->createMock(StorageDispatcherInterface::class); } } - -class_alias(MapperTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Type\MapperTest'); diff --git a/tests/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabaseTest.php index dd2a5dd2f6..365061726f 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabaseTest.php @@ -140,5 +140,3 @@ protected function getContentUpdaterMock() return $this->contentUpdaterMock; } } - -class_alias(DoctrineDatabaseTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Type\Update\Handler\DoctrineDatabaseTest'); diff --git a/tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php index 33dcae560c..33f2f7c0d0 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php @@ -513,5 +513,3 @@ protected function getGateway(): DoctrineDatabase return $this->gateway; } } - -class_alias(DoctrineDatabaseTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\UrlAlias\Gateway\DoctrineDatabaseTest'); diff --git a/tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php b/tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php index d7b0ebee88..2056c6a360 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php @@ -321,5 +321,3 @@ public static function suite() return new TestSuite(__CLASS__); } } - -class_alias(SlugConverterTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\UrlAlias\SlugConverterTest'); diff --git a/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php b/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php index 748f7d2b75..0455d10b2f 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php @@ -5551,5 +5551,3 @@ public function testArchiveUrlAliasesForDeletedTranslations( } } } - -class_alias(UrlAliasHandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\UrlAlias\UrlAliasHandlerTest'); diff --git a/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php b/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php index 90cc7a82c6..1831d801aa 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php @@ -291,5 +291,3 @@ protected function getMapper() return new Mapper($languageMaskGenerator); } } - -class_alias(UrlAliasMapperTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\UrlAlias\UrlAliasMapperTest'); diff --git a/tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php index 45a2bc20c4..6484c31584 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php @@ -177,5 +177,3 @@ protected function getGateway(): DoctrineDatabase return $this->gateway; } } - -class_alias(DoctrineDatabaseTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\UrlWildcard\Gateway\DoctrineDatabaseTest'); diff --git a/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php b/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php index d4fb4f436a..790c4aceee 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php @@ -246,5 +246,3 @@ protected function getHandler(): UrlWildcard\Handler return $this->urlWildcardHandler; } } - -class_alias(UrlWildcardHandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\UrlWildcard\UrlWildcardHandlerTest'); diff --git a/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardMapperTest.php b/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardMapperTest.php index 26b65e60c1..3f334bed5b 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardMapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardMapperTest.php @@ -124,5 +124,3 @@ protected function getMapper() return new Mapper(); } } - -class_alias(UrlWildcardMapperTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\UrlWildcard\UrlWildcardMapperTest'); diff --git a/tests/lib/Persistence/Legacy/FieldValue/Converter/ImageConverterTest.php b/tests/lib/Persistence/Legacy/FieldValue/Converter/ImageConverterTest.php index 589724b461..7d25304b03 100644 --- a/tests/lib/Persistence/Legacy/FieldValue/Converter/ImageConverterTest.php +++ b/tests/lib/Persistence/Legacy/FieldValue/Converter/ImageConverterTest.php @@ -226,5 +226,3 @@ public function xmlToFieldValueProvider(): array ]; } } - -class_alias(ImageConverterTest::class, 'eZ\Publish\Core\Persistence\Tests\Legacy\FieldValue\Converter\ImageConverterTest'); diff --git a/tests/lib/Persistence/Legacy/Filter/BaseCriterionVisitorQueryBuilderTestCase.php b/tests/lib/Persistence/Legacy/Filter/BaseCriterionVisitorQueryBuilderTestCase.php index 67b8fcbcd0..0372364174 100644 --- a/tests/lib/Persistence/Legacy/Filter/BaseCriterionVisitorQueryBuilderTestCase.php +++ b/tests/lib/Persistence/Legacy/Filter/BaseCriterionVisitorQueryBuilderTestCase.php @@ -103,5 +103,3 @@ private function getBaseCriterionQueryBuilders(CriterionVisitor $criterionVisito ]; } } - -class_alias(BaseCriterionVisitorQueryBuilderTestCase::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Filter\BaseCriterionVisitorQueryBuilderTestCase'); diff --git a/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/LanguageCodeQueryBuilderQueryBuilderTest.php b/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/LanguageCodeQueryBuilderQueryBuilderTest.php index 6f32ce7d22..70f3f71754 100644 --- a/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/LanguageCodeQueryBuilderQueryBuilderTest.php +++ b/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/LanguageCodeQueryBuilderQueryBuilderTest.php @@ -37,5 +37,3 @@ protected function getCriterionQueryBuilders(): iterable return [new LanguageCodeQueryBuilder()]; } } - -class_alias(LanguageCodeQueryBuilderQueryBuilderTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Filter\CriterionQueryBuilder\Content\LanguageCodeQueryBuilderQueryBuilderTest'); diff --git a/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilderTest.php b/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilderTest.php index 2b29f587fd..c344364c4a 100644 --- a/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilderTest.php +++ b/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilderTest.php @@ -34,5 +34,3 @@ public function getFilteringCriteriaQueryData(): iterable ]; } } - -class_alias(AncestorQueryBuilderTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Filter\CriterionQueryBuilder\Location\AncestorQueryBuilderTest'); diff --git a/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/LocationIdQueryBuilderTest.php b/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/LocationIdQueryBuilderTest.php index 44e5b42a45..f305e7a407 100644 --- a/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/LocationIdQueryBuilderTest.php +++ b/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/LocationIdQueryBuilderTest.php @@ -42,5 +42,3 @@ protected function getCriterionQueryBuilders(): iterable return [new IdQueryBuilder()]; } } - -class_alias(LocationIdQueryBuilderTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Filter\CriterionQueryBuilder\Location\LocationIdQueryBuilderTest'); diff --git a/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/ParentLocationQueryBuilderTest.php b/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/ParentLocationQueryBuilderTest.php index e5f615cb9e..d1b74ad548 100644 --- a/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/ParentLocationQueryBuilderTest.php +++ b/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/ParentLocationQueryBuilderTest.php @@ -42,5 +42,3 @@ protected function getCriterionQueryBuilders(): iterable return [new ParentLocationIdQueryBuilder()]; } } - -class_alias(ParentLocationQueryBuilderTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Filter\CriterionQueryBuilder\Location\ParentLocationQueryBuilderTest'); diff --git a/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOperatorQueryBuilderQueryBuilderTest.php b/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOperatorQueryBuilderQueryBuilderTest.php index f1de4942f4..8c46ee4156 100644 --- a/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOperatorQueryBuilderQueryBuilderTest.php +++ b/tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOperatorQueryBuilderQueryBuilderTest.php @@ -73,5 +73,3 @@ protected function getCriterionQueryBuilders(): iterable ]; } } - -class_alias(LogicalOperatorQueryBuilderQueryBuilderTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Filter\CriterionQueryBuilder\LogicalOperatorQueryBuilderQueryBuilderTest'); diff --git a/tests/lib/Persistence/Legacy/HandlerTest.php b/tests/lib/Persistence/Legacy/HandlerTest.php index 5a1a9a44cd..c13aba4c7e 100644 --- a/tests/lib/Persistence/Legacy/HandlerTest.php +++ b/tests/lib/Persistence/Legacy/HandlerTest.php @@ -272,5 +272,3 @@ protected function getContainer(): Container return self::$container; } } - -class_alias(HandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\HandlerTest'); diff --git a/tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php index ff7ff7245e..da80077eea 100644 --- a/tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php @@ -173,5 +173,3 @@ private function loadNotification(int $id): array return is_array($data) ? $data : []; } } - -class_alias(DoctrineDatabaseTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Notification\Gateway\DoctrineDatabaseTest'); diff --git a/tests/lib/Persistence/Legacy/Notification/HandlerTest.php b/tests/lib/Persistence/Legacy/Notification/HandlerTest.php index 3cb27052c3..2fa49af860 100644 --- a/tests/lib/Persistence/Legacy/Notification/HandlerTest.php +++ b/tests/lib/Persistence/Legacy/Notification/HandlerTest.php @@ -209,5 +209,3 @@ public function testDelete() $this->handler->delete($notification); } } - -class_alias(HandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Notification\HandlerTest'); diff --git a/tests/lib/Persistence/Legacy/Notification/MapperTest.php b/tests/lib/Persistence/Legacy/Notification/MapperTest.php index 3111707694..9925250d1b 100644 --- a/tests/lib/Persistence/Legacy/Notification/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Notification/MapperTest.php @@ -106,5 +106,3 @@ public function testCreateNotificationFromUpdateStruct() ]), $this->mapper->createNotificationFromUpdateStruct($updateStruct)); } } - -class_alias(MapperTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Notification\MapperTest'); diff --git a/tests/lib/Persistence/Legacy/Setting/SettingHandlerTest.php b/tests/lib/Persistence/Legacy/Setting/SettingHandlerTest.php index 4d7f78ed81..32feb226b5 100644 --- a/tests/lib/Persistence/Legacy/Setting/SettingHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Setting/SettingHandlerTest.php @@ -292,5 +292,3 @@ protected function getGatewayMock(): MockObject return $this->gatewayMock; } } - -class_alias(SettingHandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Setting\SettingHandlerTest'); diff --git a/tests/lib/Persistence/Legacy/SharedGateway/GatewayFactoryTest.php b/tests/lib/Persistence/Legacy/SharedGateway/GatewayFactoryTest.php index a84b83ca66..766edbb07a 100644 --- a/tests/lib/Persistence/Legacy/SharedGateway/GatewayFactoryTest.php +++ b/tests/lib/Persistence/Legacy/SharedGateway/GatewayFactoryTest.php @@ -86,5 +86,3 @@ public function getTestBuildSharedGatewayData(): Traversable } } } - -class_alias(GatewayFactoryTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\SharedGateway\GatewayFactoryTest'); diff --git a/tests/lib/Persistence/Legacy/TestCase.php b/tests/lib/Persistence/Legacy/TestCase.php index cc00dc7497..f93541c59d 100644 --- a/tests/lib/Persistence/Legacy/TestCase.php +++ b/tests/lib/Persistence/Legacy/TestCase.php @@ -347,5 +347,3 @@ protected function getTrashSortClauseConverterDependency(): SortClauseConverter ); } } - -class_alias(TestCase::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\TestCase'); diff --git a/tests/lib/Persistence/Legacy/TransactionHandlerTest.php b/tests/lib/Persistence/Legacy/TransactionHandlerTest.php index 31b093539f..98ae8e3372 100644 --- a/tests/lib/Persistence/Legacy/TransactionHandlerTest.php +++ b/tests/lib/Persistence/Legacy/TransactionHandlerTest.php @@ -181,5 +181,3 @@ protected function getLanguageHandlerMock() return $this->languageHandlerMock; } } - -class_alias(TransactionHandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\TransactionHandlerTest'); diff --git a/tests/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabaseTest.php index e1f7e46e91..39a8a89e67 100644 --- a/tests/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabaseTest.php @@ -100,5 +100,3 @@ protected function initGateway(): DoctrineDatabase return $this->gateway; } } - -class_alias(DoctrineDatabaseTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\URL\Gateway\DoctrineDatabaseTest'); diff --git a/tests/lib/Persistence/Legacy/URL/HandlerTest.php b/tests/lib/Persistence/Legacy/URL/HandlerTest.php index 6684177386..bcf3201ffc 100644 --- a/tests/lib/Persistence/Legacy/URL/HandlerTest.php +++ b/tests/lib/Persistence/Legacy/URL/HandlerTest.php @@ -201,5 +201,3 @@ private function getUrl($id = 1, $urlAddr = 'http://ibexa.co') return $url; } } - -class_alias(HandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\URL\HandlerTest'); diff --git a/tests/lib/Persistence/Legacy/URL/MapperTest.php b/tests/lib/Persistence/Legacy/URL/MapperTest.php index ff65bf282c..c60cd23725 100644 --- a/tests/lib/Persistence/Legacy/URL/MapperTest.php +++ b/tests/lib/Persistence/Legacy/URL/MapperTest.php @@ -86,5 +86,3 @@ public function testExtractURLsFromRows() self::assertEquals([$urlEzNo, $urlEzplatformCom], $this->mapper->extractURLsFromRows($rows)); } } - -class_alias(MapperTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\URL\MapperTest'); diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriteriaConverterTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriteriaConverterTest.php index 9b549f5688..14f4d05609 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriteriaConverterTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriteriaConverterTest.php @@ -82,5 +82,3 @@ public function testConvertCriteriaFailure(): void ); } } - -class_alias(CriteriaConverterTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\URL\Query\CriteriaConverterTest'); diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php index 5f21aee5ef..790ac83442 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php @@ -88,5 +88,3 @@ protected function mockConverterForLogicalOperator( return $converter; } } - -class_alias(CriterionHandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\URL\Query\CriterionHandler\CriterionHandlerTest'); diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAndTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAndTest.php index d8a1749a25..618d5c98ae 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAndTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAndTest.php @@ -62,5 +62,3 @@ public function testHandle(): void self::assertEquals($expected, $actual); } } - -class_alias(LogicalAndTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\URL\Query\CriterionHandler\LogicalAndTest'); diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNotTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNotTest.php index f93986c862..526cf4194e 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNotTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNotTest.php @@ -56,5 +56,3 @@ public function testHandle(): void self::assertEquals($expected, $actual); } } - -class_alias(LogicalNotTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\URL\Query\CriterionHandler\LogicalNotTest'); diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOrTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOrTest.php index 813e397547..dfcfec0b65 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOrTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOrTest.php @@ -62,5 +62,3 @@ public function testHandle(): void self::assertEquals($expected, $actual); } } - -class_alias(LogicalOrTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\URL\Query\CriterionHandler\LogicalOrTest'); diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAllTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAllTest.php index ab66a46b2d..c6f19e1e45 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAllTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAllTest.php @@ -43,5 +43,3 @@ public function testHandle() self::assertEquals($expected, $actual); } } - -class_alias(MatchAllTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\URL\Query\CriterionHandler\MatchAllTest'); diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNoneTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNoneTest.php index d879099b92..a770d82cbd 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNoneTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNoneTest.php @@ -43,5 +43,3 @@ public function testHandle() self::assertEquals($expected, $actual); } } - -class_alias(MatchNoneTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\URL\Query\CriterionHandler\MatchNoneTest'); diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/PatternTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/PatternTest.php index ed89b4a6f1..9d561f2cc1 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/PatternTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/PatternTest.php @@ -60,5 +60,3 @@ public function testHandle() self::assertEquals($expected, $actual); } } - -class_alias(PatternTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\URL\Query\CriterionHandler\PatternTest'); diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/ValidityTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/ValidityTest.php index f9dce0c7a4..ef925377df 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/ValidityTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/ValidityTest.php @@ -62,5 +62,3 @@ public function testHandle() self::assertEquals($expected, $actual); } } - -class_alias(ValidityTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\URL\Query\CriterionHandler\ValidityTest'); diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnlyTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnlyTest.php index 3a3358962c..a408b3a9a5 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnlyTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnlyTest.php @@ -69,5 +69,3 @@ private function createDoctrineQueryBuilder(): QueryBuilder return new QueryBuilder($connection); } } - -class_alias(VisibleOnlyTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\URL\Query\CriterionHandler\VisibleOnlyTest'); diff --git a/tests/lib/Persistence/Legacy/User/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/User/Gateway/DoctrineDatabaseTest.php index 7ea199de33..50f57fe477 100644 --- a/tests/lib/Persistence/Legacy/User/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/User/Gateway/DoctrineDatabaseTest.php @@ -95,5 +95,3 @@ protected function getDatabaseGateway(): DoctrineDatabase return $this->databaseGateway; } } - -class_alias(DoctrineDatabaseTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\User\Gateway\DoctrineDatabaseTest'); diff --git a/tests/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabaseTest.php index 22359d062b..4b4c1a38b8 100644 --- a/tests/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabaseTest.php @@ -210,5 +210,3 @@ protected function getDatabaseGateway(): DoctrineDatabase return $this->databaseGateway; } } - -class_alias(DoctrineDatabaseTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\User\Role\Gateway\DoctrineDatabaseTest'); diff --git a/tests/lib/Persistence/Legacy/User/Role/LimitationConverterTest.php b/tests/lib/Persistence/Legacy/User/Role/LimitationConverterTest.php index 249b349a26..bfae2fa626 100644 --- a/tests/lib/Persistence/Legacy/User/Role/LimitationConverterTest.php +++ b/tests/lib/Persistence/Legacy/User/Role/LimitationConverterTest.php @@ -149,5 +149,3 @@ public function testObjectStateToSPI() ); } } - -class_alias(LimitationConverterTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\User\Role\LimitationConverterTest'); diff --git a/tests/lib/Persistence/Legacy/User/UserHandlerTest.php b/tests/lib/Persistence/Legacy/User/UserHandlerTest.php index 8038205875..3af2a2eeeb 100644 --- a/tests/lib/Persistence/Legacy/User/UserHandlerTest.php +++ b/tests/lib/Persistence/Legacy/User/UserHandlerTest.php @@ -1211,5 +1211,3 @@ private function createTestRoleWithTestPolicy(): void $handler->addPolicy($role->id, $policy); } } - -class_alias(UserHandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\User\UserHandlerTest'); diff --git a/tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php index b61dd533ef..29ebce5b2d 100644 --- a/tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php @@ -138,5 +138,3 @@ private function loadUserPreference(int $id): array return reset($result); } } - -class_alias(DoctrineDatabaseTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\UserPreference\Gateway\DoctrineDatabaseTest'); diff --git a/tests/lib/Persistence/Legacy/UserPreference/HandlerTest.php b/tests/lib/Persistence/Legacy/UserPreference/HandlerTest.php index 08a952527c..5a4f89fb28 100644 --- a/tests/lib/Persistence/Legacy/UserPreference/HandlerTest.php +++ b/tests/lib/Persistence/Legacy/UserPreference/HandlerTest.php @@ -111,5 +111,3 @@ public function testLoadUserPreferences() self::assertEquals($objects, $this->handler->loadUserPreferences($ownerId, $offset, $limit)); } } - -class_alias(HandlerTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\UserPreference\HandlerTest'); diff --git a/tests/lib/Persistence/Legacy/UserPreference/MapperTest.php b/tests/lib/Persistence/Legacy/UserPreference/MapperTest.php index c8d2ee3942..d0a6c322e1 100644 --- a/tests/lib/Persistence/Legacy/UserPreference/MapperTest.php +++ b/tests/lib/Persistence/Legacy/UserPreference/MapperTest.php @@ -60,5 +60,3 @@ public function testExtractUserPreferencesFromRows() self::assertEquals($objects, $this->mapper->extractUserPreferencesFromRows($rows)); } } - -class_alias(MapperTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\UserPreference\MapperTest'); diff --git a/tests/lib/Persistence/Limitation/Target/Builder/VersionBuilderTest.php b/tests/lib/Persistence/Limitation/Target/Builder/VersionBuilderTest.php index 563bc20596..d0c1506c8c 100644 --- a/tests/lib/Persistence/Limitation/Target/Builder/VersionBuilderTest.php +++ b/tests/lib/Persistence/Limitation/Target/Builder/VersionBuilderTest.php @@ -134,5 +134,3 @@ public function testBuild( self::assertEquals($expectedTargetVersion, $versionBuilder->build()); } } - -class_alias(VersionBuilderTest::class, 'eZ\Publish\SPI\Tests\Limitation\Target\Builder\VersionBuilderTest'); diff --git a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedParserTest.php b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedParserTest.php index 70824df383..c8d8dc9d83 100644 --- a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedParserTest.php +++ b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedParserTest.php @@ -39,5 +39,3 @@ public function testParse($file) ); } } - -class_alias(TransformationProcessorDefinitionBasedParserTest::class, 'eZ\Publish\Core\Persistence\Tests\TransformationProcessor\TransformationProcessorDefinitionBasedParserTest'); diff --git a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedTest.php b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedTest.php index 5915bc0ecd..35aff7f339 100644 --- a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedTest.php +++ b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedTest.php @@ -70,5 +70,3 @@ public function testAllNormalizations() ); } } - -class_alias(TransformationProcessorDefinitionBasedTest::class, 'eZ\Publish\Core\Persistence\Tests\TransformationProcessor\TransformationProcessorDefinitionBasedTest'); diff --git a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php index d23f4dddda..bda7c272a3 100644 --- a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php +++ b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php @@ -214,5 +214,3 @@ public function testCompileModuloTranspose() ); } } - -class_alias(TransformationProcessorPcreCompilerTest::class, 'eZ\Publish\Core\Persistence\Tests\TransformationProcessor\TransformationProcessorPcreCompilerTest'); diff --git a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPreprocessedBasedTest.php b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPreprocessedBasedTest.php index cbf1db4cf5..64402965da 100644 --- a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPreprocessedBasedTest.php +++ b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPreprocessedBasedTest.php @@ -59,5 +59,3 @@ public function testAllNormalizations() ); } } - -class_alias(TransformationProcessorPreprocessedBasedTest::class, 'eZ\Publish\Core\Persistence\Tests\TransformationProcessor\TransformationProcessorPreprocessedBasedTest'); diff --git a/tests/lib/Query/QueryFactoryTest.php b/tests/lib/Query/QueryFactoryTest.php index ce4961f737..bd5b015cd2 100644 --- a/tests/lib/Query/QueryFactoryTest.php +++ b/tests/lib/Query/QueryFactoryTest.php @@ -60,5 +60,3 @@ public function testCreate(): void self::assertEquals($expectedQuery, $actualQuery); } } - -class_alias(QueryFactoryTest::class, 'eZ\Publish\Core\Query\Tests\QueryFactoryTest'); diff --git a/tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php b/tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php index 996033ec89..cfd3a21155 100644 --- a/tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php +++ b/tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php @@ -101,5 +101,3 @@ abstract protected function getExpectedName(): string; abstract protected function getExpectedSupportedParameters(): array; } - -class_alias(AbstractQueryTypeTest::class, 'eZ\Publish\Core\QueryType\BuiltIn\Tests\AbstractQueryTypeTest'); diff --git a/tests/lib/QueryType/BuiltIn/AncestorsQueryTypeTest.php b/tests/lib/QueryType/BuiltIn/AncestorsQueryTypeTest.php index f4df2fbae5..8b75b4b2b1 100644 --- a/tests/lib/QueryType/BuiltIn/AncestorsQueryTypeTest.php +++ b/tests/lib/QueryType/BuiltIn/AncestorsQueryTypeTest.php @@ -188,5 +188,3 @@ protected function getExpectedSupportedParameters(): array return ['filter', 'offset', 'limit', 'sort', 'location', 'content']; } } - -class_alias(AncestorsQueryTypeTest::class, 'eZ\Publish\Core\QueryType\BuiltIn\Tests\AncestorsQueryTypeTest'); diff --git a/tests/lib/QueryType/BuiltIn/ChildrenQueryTypeTest.php b/tests/lib/QueryType/BuiltIn/ChildrenQueryTypeTest.php index a4d84bd0af..bb6cbf617c 100644 --- a/tests/lib/QueryType/BuiltIn/ChildrenQueryTypeTest.php +++ b/tests/lib/QueryType/BuiltIn/ChildrenQueryTypeTest.php @@ -154,5 +154,3 @@ protected function getExpectedSupportedParameters(): array return ['filter', 'offset', 'limit', 'sort', 'location', 'content']; } } - -class_alias(ChildrenQueryTypeTest::class, 'eZ\Publish\Core\QueryType\BuiltIn\Tests\ChildrenQueryTypeTest'); diff --git a/tests/lib/QueryType/BuiltIn/GeoLocationQueryTypeTest.php b/tests/lib/QueryType/BuiltIn/GeoLocationQueryTypeTest.php index 0f9045c0f8..bb4dbcb46d 100644 --- a/tests/lib/QueryType/BuiltIn/GeoLocationQueryTypeTest.php +++ b/tests/lib/QueryType/BuiltIn/GeoLocationQueryTypeTest.php @@ -160,5 +160,3 @@ protected function getExpectedSupportedParameters(): array return ['filter', 'offset', 'limit', 'sort', 'field', 'distance', 'latitude', 'longitude', 'operator']; } } - -class_alias(GeoLocationQueryTypeTest::class, 'eZ\Publish\Core\QueryType\BuiltIn\Tests\GeoLocationQueryTypeTest'); diff --git a/tests/lib/QueryType/BuiltIn/RelatedToContentQueryTypeTest.php b/tests/lib/QueryType/BuiltIn/RelatedToContentQueryTypeTest.php index 03dec16712..6ab3e74856 100644 --- a/tests/lib/QueryType/BuiltIn/RelatedToContentQueryTypeTest.php +++ b/tests/lib/QueryType/BuiltIn/RelatedToContentQueryTypeTest.php @@ -156,5 +156,3 @@ protected function getExpectedSupportedParameters(): array return ['filter', 'offset', 'limit', 'sort', 'content', 'field']; } } - -class_alias(RelatedToContentQueryTypeTest::class, 'eZ\Publish\Core\QueryType\BuiltIn\Tests\RelatedToContentQueryTypeTest'); diff --git a/tests/lib/QueryType/BuiltIn/SiblingsQueryTypeTest.php b/tests/lib/QueryType/BuiltIn/SiblingsQueryTypeTest.php index 117726f23f..d2fdfc7182 100644 --- a/tests/lib/QueryType/BuiltIn/SiblingsQueryTypeTest.php +++ b/tests/lib/QueryType/BuiltIn/SiblingsQueryTypeTest.php @@ -155,5 +155,3 @@ protected function getExpectedSupportedParameters(): array return ['filter', 'offset', 'limit', 'sort', 'location', 'content']; } } - -class_alias(SiblingsQueryTypeTest::class, 'eZ\Publish\Core\QueryType\BuiltIn\Tests\SiblingsQueryTypeTest'); diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/CustomFieldSortClauseParserTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/CustomFieldSortClauseParserTest.php index 3de9451bdb..05d1ba39da 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/CustomFieldSortClauseParserTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/CustomFieldSortClauseParserTest.php @@ -56,5 +56,3 @@ public function testSupports(): void self::assertTrue($this->parser->supports('custom_field')); } } - -class_alias(CustomFieldSortClauseParserTest::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\Tests\SortClauseParser\CustomFieldSortClauseParserTest'); diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParserTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParserTest.php index 73ba7925fb..a59ee3c171 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParserTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParserTest.php @@ -69,5 +69,3 @@ public function testSupports(): void self::assertFalse($this->defaultSortClauseParser->supports('unsupported')); } } - -class_alias(DefaultSortClauseParserTest::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\Tests\SortClauseParser\DefaultSortClauseParserTest'); diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/FieldSortClauseParserTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/FieldSortClauseParserTest.php index 613135f003..82be846943 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/FieldSortClauseParserTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/FieldSortClauseParserTest.php @@ -57,5 +57,3 @@ public function testSupports(): void self::assertTrue($this->fieldSortClauseParser->supports('field')); } } - -class_alias(FieldSortClauseParserTest::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\Tests\SortClauseParser\FieldSortClauseParserTest'); diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/MapDistanceSortClauseParserTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/MapDistanceSortClauseParserTest.php index 80fd905831..d7bcdc903e 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/MapDistanceSortClauseParserTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/MapDistanceSortClauseParserTest.php @@ -69,5 +69,3 @@ public function testSupports(): void self::assertTrue($this->mapDistanceSortClauseParser->supports('map_distance')); } } - -class_alias(MapDistanceSortClauseParserTest::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\Tests\SortClauseParser\MapDistanceSortClauseParserTest'); diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/RandomSortClauseParserTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/RandomSortClauseParserTest.php index a29839618c..80bb57f29a 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/RandomSortClauseParserTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/RandomSortClauseParserTest.php @@ -53,5 +53,3 @@ public function testSupports(): void self::assertTrue($this->randomSortClauseParser->supports('random')); } } - -class_alias(RandomSortClauseParserTest::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\Tests\SortClauseParser\RandomSortClauseParserTest'); diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParserDispatcherTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParserDispatcherTest.php index 257fba4008..409c4e75d0 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParserDispatcherTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParserDispatcherTest.php @@ -62,5 +62,3 @@ public function testSupports(): void self::assertTrue($dispatcher->supports(self::EXAMPLE_SORT_CLAUSE)); } } - -class_alias(SortClauseParserDispatcherTest::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\Tests\SortClauseParserDispatcherTest'); diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerStub.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerStub.php index 7d40172e25..373bfe0954 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerStub.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerStub.php @@ -58,5 +58,3 @@ public function peek(): ?Token return $this->tokens[$this->position + 1] ?? null; } } - -class_alias(SortSpecLexerStub::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\Tests\SortSpecLexerStub'); diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerTest.php index 4fa3ee4698..bb7d8c41fa 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerTest.php @@ -185,5 +185,3 @@ public function testConsume(): void ], $output); } } - -class_alias(SortSpecLexerTest::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\Tests\SortSpecLexerTest'); diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecParserTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecParserTest.php index 19483b357f..848f179469 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecParserTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecParserTest.php @@ -135,5 +135,3 @@ public function testMatchAny(): void self::assertEquals($token, $parser->matchAnyOf(Token::TYPE_ASC, Token::TYPE_DESC)); } } - -class_alias(SortSpecParserTest::class, 'eZ\Publish\Core\QueryType\BuiltIn\SortSpec\Tests\SortSpecParserTest'); diff --git a/tests/lib/QueryType/BuiltIn/SubtreeQueryTest.php b/tests/lib/QueryType/BuiltIn/SubtreeQueryTest.php index a63f05c5f7..e709706f20 100644 --- a/tests/lib/QueryType/BuiltIn/SubtreeQueryTest.php +++ b/tests/lib/QueryType/BuiltIn/SubtreeQueryTest.php @@ -176,5 +176,3 @@ protected function getExpectedSupportedParameters(): array return ['filter', 'offset', 'limit', 'sort', 'location', 'content', 'depth']; } } - -class_alias(SubtreeQueryTest::class, 'eZ\Publish\Core\QueryType\BuiltIn\Tests\SubtreeQueryTest'); diff --git a/tests/lib/Repository/Common/FacetedSearchProvider.php b/tests/lib/Repository/Common/FacetedSearchProvider.php index 440142f963..d671a4af00 100644 --- a/tests/lib/Repository/Common/FacetedSearchProvider.php +++ b/tests/lib/Repository/Common/FacetedSearchProvider.php @@ -266,5 +266,3 @@ public function getFacetedSearches() ]; } } - -class_alias(FacetedSearchProvider::class, 'eZ\Publish\API\Repository\Tests\Common\FacetedSearchProvider'); diff --git a/tests/lib/Repository/ContentThumbnail/ContentFieldStrategyTest.php b/tests/lib/Repository/ContentThumbnail/ContentFieldStrategyTest.php index b36a030310..01477368eb 100644 --- a/tests/lib/Repository/ContentThumbnail/ContentFieldStrategyTest.php +++ b/tests/lib/Repository/ContentThumbnail/ContentFieldStrategyTest.php @@ -116,5 +116,3 @@ public function testGetThumbnailNotFound(): void $contentFieldStrategy->getThumbnail($field); } } - -class_alias(ContentFieldStrategyTest::class, 'eZ\Publish\Core\Repository\Tests\ContentThumbnail\ContentFieldStrategyTest'); diff --git a/tests/lib/Repository/ContentThumbnail/StaticStrategyTest.php b/tests/lib/Repository/ContentThumbnail/StaticStrategyTest.php index ac83a2fdc3..8466f7b65e 100644 --- a/tests/lib/Repository/ContentThumbnail/StaticStrategyTest.php +++ b/tests/lib/Repository/ContentThumbnail/StaticStrategyTest.php @@ -42,5 +42,3 @@ public function testStaticStrategy() ); } } - -class_alias(StaticStrategyTest::class, 'eZ\Publish\Core\Repository\Tests\ContentThumbnail\StaticStrategyTest'); diff --git a/tests/lib/Repository/ContentThumbnail/ThumbnailChainStrategyTest.php b/tests/lib/Repository/ContentThumbnail/ThumbnailChainStrategyTest.php index 9979962144..b230a69629 100644 --- a/tests/lib/Repository/ContentThumbnail/ThumbnailChainStrategyTest.php +++ b/tests/lib/Repository/ContentThumbnail/ThumbnailChainStrategyTest.php @@ -99,5 +99,3 @@ public function testThumbnailStrategyChainBreakOnThumbnailFound(): void self::assertEquals(new Thumbnail(['resource' => 'second']), $result); } } - -class_alias(ThumbnailChainStrategyTest::class, 'eZ\Publish\Core\Repository\Tests\ContentThumbnail\ThumbnailChainStrategyTest'); diff --git a/tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest.php b/tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest.php index 00966aa8a1..72b6225415 100644 --- a/tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest.php +++ b/tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest.php @@ -115,5 +115,3 @@ public function validate( }; } } - -class_alias(ContentValidatorStrategyTest::class, 'eZ\Publish\Core\Repository\Tests\ContentValidator\ContentValidatorStrategyTest'); diff --git a/tests/lib/Repository/Decorator/BookmarkServiceDecoratorTest.php b/tests/lib/Repository/Decorator/BookmarkServiceDecoratorTest.php index d78248b3bd..f261461ddf 100644 --- a/tests/lib/Repository/Decorator/BookmarkServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/BookmarkServiceDecoratorTest.php @@ -78,5 +78,3 @@ public function testIsBookmarkedDecorator() $decoratedService->isBookmarked(...$parameters); } } - -class_alias(BookmarkServiceDecoratorTest::class, 'eZ\Publish\SPI\Repository\Tests\Decorator\BookmarkServiceDecoratorTest'); diff --git a/tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php b/tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php index 2ae5ef567e..a4a67a147a 100644 --- a/tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php @@ -495,5 +495,3 @@ public function testLoadVersionInfoListByContentInfoDecorator(): void $decoratedService->loadVersionInfoListByContentInfo($argument); } } - -class_alias(ContentServiceDecoratorTest::class, 'eZ\Publish\SPI\Repository\Tests\Decorator\ContentServiceDecoratorTest'); diff --git a/tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php b/tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php index 0d63158785..7a7b4c175b 100644 --- a/tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php @@ -464,5 +464,3 @@ public function testRemoveContentTypeTranslationDecorator() $decoratedService->removeContentTypeTranslation(...$parameters); } } - -class_alias(ContentTypeServiceDecoratorTest::class, 'eZ\Publish\SPI\Repository\Tests\Decorator\ContentTypeServiceDecoratorTest'); diff --git a/tests/lib/Repository/Decorator/FieldTypeServiceDecoratorTest.php b/tests/lib/Repository/Decorator/FieldTypeServiceDecoratorTest.php index 371e743645..d26802b682 100644 --- a/tests/lib/Repository/Decorator/FieldTypeServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/FieldTypeServiceDecoratorTest.php @@ -62,5 +62,3 @@ public function testHasFieldTypeDecorator() $decoratedService->hasFieldType(...$parameters); } } - -class_alias(FieldTypeServiceDecoratorTest::class, 'eZ\Publish\SPI\Repository\Tests\Decorator\FieldTypeServiceDecoratorTest'); diff --git a/tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php b/tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php index 68736d8053..5b7ccda1c5 100644 --- a/tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php @@ -175,5 +175,3 @@ public function testNewLanguageCreateStructDecorator() $decoratedService->newLanguageCreateStruct(...$parameters); } } - -class_alias(LanguageServiceDecoratorTest::class, 'eZ\Publish\SPI\Repository\Tests\Decorator\LanguageServiceDecoratorTest'); diff --git a/tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php b/tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php index 4aef5882a2..906c9575ac 100644 --- a/tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php @@ -305,5 +305,3 @@ public function testLoadAllLocationsDecorator() $decoratedService->loadAllLocations(...$parameters); } } - -class_alias(LocationServiceDecoratorTest::class, 'eZ\Publish\SPI\Repository\Tests\Decorator\LocationServiceDecoratorTest'); diff --git a/tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php b/tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php index 7fb308e153..e21c47e5d8 100644 --- a/tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php @@ -115,5 +115,3 @@ public function testDeleteNotificationDecorator() $decoratedService->deleteNotification(...$parameters); } } - -class_alias(NotificationServiceDecoratorTest::class, 'eZ\Publish\SPI\Repository\Tests\Decorator\NotificationServiceDecoratorTest'); diff --git a/tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php b/tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php index a9c18ab742..86a3f9abb0 100644 --- a/tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php @@ -332,5 +332,3 @@ public function testNewObjectStateUpdateStructDecorator() $decoratedService->newObjectStateUpdateStruct(...$parameters); } } - -class_alias(ObjectStateServiceDecoratorTest::class, 'eZ\Publish\SPI\Repository\Tests\Decorator\ObjectStateServiceDecoratorTest'); diff --git a/tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php b/tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php index c8ee832ba4..d25283d6ab 100644 --- a/tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php @@ -394,5 +394,3 @@ public function testGetLimitationTypesByModuleFunctionDecorator() $decoratedService->getLimitationTypesByModuleFunction(...$parameters); } } - -class_alias(RoleServiceDecoratorTest::class, 'eZ\Publish\SPI\Repository\Tests\Decorator\RoleServiceDecoratorTest'); diff --git a/tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php b/tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php index 49e0603a9b..69644d1578 100644 --- a/tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php @@ -145,5 +145,3 @@ public function getSearchEngineCapabilities(): array ]; } } - -class_alias(SearchServiceDecoratorTest::class, 'eZ\Publish\SPI\Repository\Tests\Decorator\SearchServiceDecoratorTest'); diff --git a/tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php b/tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php index 3a0ede8226..39b9df17ff 100644 --- a/tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php @@ -186,5 +186,3 @@ public function testNewSectionUpdateStructDecorator() $decoratedService->newSectionUpdateStruct(...$parameters); } } - -class_alias(SectionServiceDecoratorTest::class, 'eZ\Publish\SPI\Repository\Tests\Decorator\SectionServiceDecoratorTest'); diff --git a/tests/lib/Repository/Decorator/SettingServiceDecoratorTest.php b/tests/lib/Repository/Decorator/SettingServiceDecoratorTest.php index e0f95fcc5e..3da5a68674 100644 --- a/tests/lib/Repository/Decorator/SettingServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/SettingServiceDecoratorTest.php @@ -110,5 +110,3 @@ public function testNewSettingUpdateStructDecorator() $decoratedService->newSettingUpdateStruct(...$parameters); } } - -class_alias(SettingServiceDecoratorTest::class, 'eZ\Publish\SPI\Repository\Tests\Decorator\SettingServiceDecoratorTest'); diff --git a/tests/lib/Repository/Decorator/TranslationServiceDecoratorTest.php b/tests/lib/Repository/Decorator/TranslationServiceDecoratorTest.php index e9f79bc47c..3be4c7cc25 100644 --- a/tests/lib/Repository/Decorator/TranslationServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/TranslationServiceDecoratorTest.php @@ -57,5 +57,3 @@ public function testTranslateStringDecorator() $decoratedService->translateString(...$parameters); } } - -class_alias(TranslationServiceDecoratorTest::class, 'eZ\Publish\SPI\Repository\Tests\Decorator\TranslationServiceDecoratorTest'); diff --git a/tests/lib/Repository/Decorator/TrashServiceDecoratorTest.php b/tests/lib/Repository/Decorator/TrashServiceDecoratorTest.php index 84d248da8a..65babf43c3 100644 --- a/tests/lib/Repository/Decorator/TrashServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/TrashServiceDecoratorTest.php @@ -104,5 +104,3 @@ public function testFindTrashItemsDecorator() $decoratedService->findTrashItems(...$parameters); } } - -class_alias(TrashServiceDecoratorTest::class, 'eZ\Publish\SPI\Repository\Tests\Decorator\TrashServiceDecoratorTest'); diff --git a/tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php b/tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php index 05f09e2e9b..de9b5e2e69 100644 --- a/tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php @@ -176,5 +176,3 @@ public function testDeleteCorruptedUrlAliasesDecorator() $decoratedService->deleteCorruptedUrlAliases(...$parameters); } } - -class_alias(URLAliasServiceDecoratorTest::class, 'eZ\Publish\SPI\Repository\Tests\Decorator\URLAliasServiceDecoratorTest'); diff --git a/tests/lib/Repository/Decorator/URLServiceDecoratorTest.php b/tests/lib/Repository/Decorator/URLServiceDecoratorTest.php index aba793e84f..0214072cba 100644 --- a/tests/lib/Repository/Decorator/URLServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/URLServiceDecoratorTest.php @@ -108,5 +108,3 @@ public function testUpdateUrlDecorator() $decoratedService->updateUrl(...$parameters); } } - -class_alias(URLServiceDecoratorTest::class, 'eZ\Publish\SPI\Repository\Tests\Decorator\URLServiceDecoratorTest'); diff --git a/tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest.php b/tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest.php index df525ca428..b0c7e05c7b 100644 --- a/tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest.php @@ -94,5 +94,3 @@ public function testTranslateDecorator() $decoratedService->translate(...$parameters); } } - -class_alias(URLWildcardServiceDecoratorTest::class, 'eZ\Publish\SPI\Repository\Tests\Decorator\URLWildcardServiceDecoratorTest'); diff --git a/tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest.php b/tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest.php index 6add35ad56..52943f41a9 100644 --- a/tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest.php @@ -77,5 +77,3 @@ public function testGetUserPreferenceCountDecorator() $decoratedService->getUserPreferenceCount(...$parameters); } } - -class_alias(UserPreferenceServiceDecoratorTest::class, 'eZ\Publish\SPI\Repository\Tests\Decorator\UserPreferenceServiceDecoratorTest'); diff --git a/tests/lib/Repository/Decorator/UserServiceDecoratorTest.php b/tests/lib/Repository/Decorator/UserServiceDecoratorTest.php index 18f6852eb6..ba068a783e 100644 --- a/tests/lib/Repository/Decorator/UserServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/UserServiceDecoratorTest.php @@ -466,5 +466,3 @@ public function testValidatePasswordDecorator() $decoratedService->validatePassword(...$parameters); } } - -class_alias(UserServiceDecoratorTest::class, 'eZ\Publish\SPI\Repository\Tests\Decorator\UserServiceDecoratorTest'); diff --git a/tests/lib/Repository/Filtering/TestContentProvider.php b/tests/lib/Repository/Filtering/TestContentProvider.php index cdafd33fdd..703f272d97 100644 --- a/tests/lib/Repository/Filtering/TestContentProvider.php +++ b/tests/lib/Repository/Filtering/TestContentProvider.php @@ -196,5 +196,3 @@ private function createSection(string $sectionIdentifier): Section return $sectionService->createSection($sectionCreate); } } - -class_alias(TestContentProvider::class, 'eZ\Publish\API\Repository\Tests\Filtering\TestContentProvider'); diff --git a/tests/lib/Repository/Helper/FieldTypeRegistryTest.php b/tests/lib/Repository/Helper/FieldTypeRegistryTest.php index 7f2ae3a368..e28e538d0d 100644 --- a/tests/lib/Repository/Helper/FieldTypeRegistryTest.php +++ b/tests/lib/Repository/Helper/FieldTypeRegistryTest.php @@ -96,5 +96,3 @@ public function testGetFieldTypes() ); } } - -class_alias(FieldTypeRegistryTest::class, 'eZ\Publish\Core\Repository\Tests\Helper\FieldTypeRegistryTest'); diff --git a/tests/lib/Repository/IdManager/Php.php b/tests/lib/Repository/IdManager/Php.php index a987e1e3ee..24f43ee706 100644 --- a/tests/lib/Repository/IdManager/Php.php +++ b/tests/lib/Repository/IdManager/Php.php @@ -46,5 +46,3 @@ public function parseId($type, $id) return $id; } } - -class_alias(Php::class, 'eZ\Publish\API\Repository\Tests\IdManager\Php'); diff --git a/tests/lib/Repository/Iterator/BatchIteratorAdapter/AbstractSearchAdapterTest.php b/tests/lib/Repository/Iterator/BatchIteratorAdapter/AbstractSearchAdapterTest.php index cd307ac652..2203aa8f35 100644 --- a/tests/lib/Repository/Iterator/BatchIteratorAdapter/AbstractSearchAdapterTest.php +++ b/tests/lib/Repository/Iterator/BatchIteratorAdapter/AbstractSearchAdapterTest.php @@ -73,5 +73,3 @@ protected function newQuery(): Query return new Query(); } } - -class_alias(AbstractSearchAdapterTest::class, 'eZ\Publish\API\Repository\Tests\Iterator\BatchIteratorAdapter\AbstractSearchAdapterTest'); diff --git a/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentFilteringAdapterTest.php b/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentFilteringAdapterTest.php index c69e133aa5..214a2a2d61 100644 --- a/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentFilteringAdapterTest.php +++ b/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentFilteringAdapterTest.php @@ -70,5 +70,3 @@ public function testFetch(): void self::assertSame(0, $originalFilter->getLimit()); } } - -class_alias(ContentFilteringAdapterTest::class, 'eZ\Publish\API\Repository\Tests\Iterator\BatchIteratorAdapter\ContentFilteringAdapterTest'); diff --git a/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentInfoSearchAdapterTest.php b/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentInfoSearchAdapterTest.php index 9b6e1b0f6e..2fa8ab7ad2 100644 --- a/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentInfoSearchAdapterTest.php +++ b/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentInfoSearchAdapterTest.php @@ -34,5 +34,3 @@ protected function getExpectedFindMethod(): string return 'findContentInfo'; } } - -class_alias(ContentInfoSearchAdapterTest::class, 'eZ\Publish\API\Repository\Tests\Iterator\BatchIteratorAdapter\ContentInfoSearchAdapterTest'); diff --git a/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentSearchAdapterTest.php b/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentSearchAdapterTest.php index b3a38aa430..63691ac19b 100644 --- a/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentSearchAdapterTest.php +++ b/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentSearchAdapterTest.php @@ -34,5 +34,3 @@ protected function getExpectedFindMethod(): string return 'findContent'; } } - -class_alias(ContentSearchAdapterTest::class, 'eZ\Publish\API\Repository\Tests\Iterator\BatchIteratorAdapter\ContentSearchAdapterTest'); diff --git a/tests/lib/Repository/Iterator/BatchIteratorAdapter/LocationFilteringAdapterTest.php b/tests/lib/Repository/Iterator/BatchIteratorAdapter/LocationFilteringAdapterTest.php index 87f5b580fd..1df0c4efb1 100644 --- a/tests/lib/Repository/Iterator/BatchIteratorAdapter/LocationFilteringAdapterTest.php +++ b/tests/lib/Repository/Iterator/BatchIteratorAdapter/LocationFilteringAdapterTest.php @@ -73,5 +73,3 @@ public function testFetch(): void self::assertSame(0, $originalFilter->getLimit()); } } - -class_alias(LocationFilteringAdapterTest::class, 'eZ\Publish\API\Repository\Tests\Iterator\BatchIteratorAdapter\LocationFilteringAdapterTest'); diff --git a/tests/lib/Repository/Iterator/BatchIteratorAdapter/LocationSearchAdapterTest.php b/tests/lib/Repository/Iterator/BatchIteratorAdapter/LocationSearchAdapterTest.php index 94f63cae53..9d330f4be7 100644 --- a/tests/lib/Repository/Iterator/BatchIteratorAdapter/LocationSearchAdapterTest.php +++ b/tests/lib/Repository/Iterator/BatchIteratorAdapter/LocationSearchAdapterTest.php @@ -40,5 +40,3 @@ protected function newQuery(): Query return new LocationQuery(); } } - -class_alias(LocationSearchAdapterTest::class, 'eZ\Publish\API\Repository\Tests\Iterator\BatchIteratorAdapter\LocationSearchAdapterTest'); diff --git a/tests/lib/Repository/Iterator/BatchIteratorTest.php b/tests/lib/Repository/Iterator/BatchIteratorTest.php index e1bf910057..d9994d906b 100644 --- a/tests/lib/Repository/Iterator/BatchIteratorTest.php +++ b/tests/lib/Repository/Iterator/BatchIteratorTest.php @@ -48,5 +48,3 @@ public function testIterateOverEmptyResultSet(): void self::assertEquals(1, $adapter->getFetchCounter()); } } - -class_alias(BatchIteratorTest::class, 'eZ\Publish\API\Repository\Tests\Iterator\BatchIteratorTest'); diff --git a/tests/lib/Repository/Iterator/BatchIteratorTestAdapter.php b/tests/lib/Repository/Iterator/BatchIteratorTestAdapter.php index f3adf24287..ecaa88840f 100644 --- a/tests/lib/Repository/Iterator/BatchIteratorTestAdapter.php +++ b/tests/lib/Repository/Iterator/BatchIteratorTestAdapter.php @@ -38,5 +38,3 @@ public function getFetchCounter(): int return $this->fetchCounter; } } - -class_alias(BatchIteratorTestAdapter::class, 'eZ\Publish\API\Repository\Tests\Iterator\BatchIteratorTestAdapter'); diff --git a/tests/lib/Repository/LegacySchemaImporter.php b/tests/lib/Repository/LegacySchemaImporter.php index 2b9d52a8e3..9f298bd0dc 100644 --- a/tests/lib/Repository/LegacySchemaImporter.php +++ b/tests/lib/Repository/LegacySchemaImporter.php @@ -87,5 +87,3 @@ private function getDropSqlStatementsForExistingSchema( return $statements; } } - -class_alias(LegacySchemaImporter::class, 'eZ\Publish\API\Repository\Tests\LegacySchemaImporter'); diff --git a/tests/lib/Repository/LocationResolver/PermissionAwareLocationResolverTest.php b/tests/lib/Repository/LocationResolver/PermissionAwareLocationResolverTest.php index 31d186f1b8..1a100ef2f8 100644 --- a/tests/lib/Repository/LocationResolver/PermissionAwareLocationResolverTest.php +++ b/tests/lib/Repository/LocationResolver/PermissionAwareLocationResolverTest.php @@ -121,5 +121,3 @@ public function testExpectBadStateExceptionWhenContentNotYetPublished(): void $this->locationResolver->resolveLocation($contentInfo); } } - -class_alias(PermissionAwareLocationResolverTest::class, 'eZ\Publish\Core\Repository\Tests\LocationResolver\PermissionAwareLocationResolverTest'); diff --git a/tests/lib/Repository/PHPUnitConstraint/AllValidationErrorsOccur.php b/tests/lib/Repository/PHPUnitConstraint/AllValidationErrorsOccur.php index bfa9c8ab3c..96866bb90b 100644 --- a/tests/lib/Repository/PHPUnitConstraint/AllValidationErrorsOccur.php +++ b/tests/lib/Repository/PHPUnitConstraint/AllValidationErrorsOccur.php @@ -110,5 +110,3 @@ public function toString(): string return "contain the messages: '{$messages}'"; } } - -class_alias(AllValidationErrorsOccur::class, 'eZ\Publish\API\Repository\Tests\PHPUnitConstraint\AllValidationErrorsOccur'); diff --git a/tests/lib/Repository/PHPUnitConstraint/ContentItemEquals.php b/tests/lib/Repository/PHPUnitConstraint/ContentItemEquals.php index 557b99ac89..3a76c7c053 100644 --- a/tests/lib/Repository/PHPUnitConstraint/ContentItemEquals.php +++ b/tests/lib/Repository/PHPUnitConstraint/ContentItemEquals.php @@ -155,5 +155,3 @@ private function compareStrings( ); } } - -class_alias(ContentItemEquals::class, 'eZ\Publish\API\Repository\Tests\PHPUnitConstraint\ContentItemEquals'); diff --git a/tests/lib/Repository/PHPUnitConstraint/ValidationErrorOccurs.php b/tests/lib/Repository/PHPUnitConstraint/ValidationErrorOccurs.php index fd8433cd28..d27a1983a7 100644 --- a/tests/lib/Repository/PHPUnitConstraint/ValidationErrorOccurs.php +++ b/tests/lib/Repository/PHPUnitConstraint/ValidationErrorOccurs.php @@ -39,5 +39,3 @@ public function toString(): string return "contain the message '{$this->expectedValidationErrorMessage}'"; } } - -class_alias(ValidationErrorOccurs::class, 'eZ\Publish\API\Repository\Tests\PHPUnitConstraint\ValidationErrorOccurs'); diff --git a/tests/lib/Repository/Parallel/ParallelProcessList.php b/tests/lib/Repository/Parallel/ParallelProcessList.php index 835e4dce2d..60293d22a0 100644 --- a/tests/lib/Repository/Parallel/ParallelProcessList.php +++ b/tests/lib/Repository/Parallel/ParallelProcessList.php @@ -25,5 +25,3 @@ public function getIterator(): \Iterator return new \ArrayIterator($this->pool); } } - -class_alias(ParallelProcessList::class, 'eZ\Publish\API\Repository\Tests\Parallel\ParallelProcessList'); diff --git a/tests/lib/Repository/Permission/CachedPermissionServiceTest.php b/tests/lib/Repository/Permission/CachedPermissionServiceTest.php index 23207b92d6..81e50df53e 100644 --- a/tests/lib/Repository/Permission/CachedPermissionServiceTest.php +++ b/tests/lib/Repository/Permission/CachedPermissionServiceTest.php @@ -210,5 +210,3 @@ protected function getPermissionCriterionResolverMock($methods = []) ->getMockForAbstractClass(); } } - -class_alias(CachedPermissionServiceTest::class, 'eZ\Publish\Core\Repository\Tests\Permission\CachedPermissionServiceTest'); diff --git a/tests/lib/Repository/Permission/PermissionCriterionResolverTest.php b/tests/lib/Repository/Permission/PermissionCriterionResolverTest.php index 3103766269..693d62c45a 100644 --- a/tests/lib/Repository/Permission/PermissionCriterionResolverTest.php +++ b/tests/lib/Repository/Permission/PermissionCriterionResolverTest.php @@ -386,5 +386,3 @@ protected function getLimitationServiceMock($methods = []) ->getMock(); } } - -class_alias(PermissionCriterionResolverTest::class, 'eZ\Publish\Core\Repository\Tests\Permission\PermissionCriterionResolverTest'); diff --git a/tests/lib/Repository/Service/Mock/Base.php b/tests/lib/Repository/Service/Mock/Base.php index 72a17fa6ae..7ab15416c9 100644 --- a/tests/lib/Repository/Service/Mock/Base.php +++ b/tests/lib/Repository/Service/Mock/Base.php @@ -460,5 +460,3 @@ private function getLocationFilteringHandlerMock(): LocationFilteringHandler return $this->locationFilteringHandlerMock; } } - -class_alias(Base::class, 'eZ\Publish\Core\Repository\Tests\Service\Mock\Base'); diff --git a/tests/lib/Repository/Service/Mock/BookmarkTest.php b/tests/lib/Repository/Service/Mock/BookmarkTest.php index 597e663d1e..ec5e1c4937 100644 --- a/tests/lib/Repository/Service/Mock/BookmarkTest.php +++ b/tests/lib/Repository/Service/Mock/BookmarkTest.php @@ -370,5 +370,3 @@ private function createBookmarkService(array $methods = null) ->getMock(); } } - -class_alias(BookmarkTest::class, 'eZ\Publish\Core\Repository\Tests\Service\Mock\BookmarkTest'); diff --git a/tests/lib/Repository/Service/Mock/ContentTest.php b/tests/lib/Repository/Service/Mock/ContentTest.php index b6d49d0d9e..5bc17ff932 100644 --- a/tests/lib/Repository/Service/Mock/ContentTest.php +++ b/tests/lib/Repository/Service/Mock/ContentTest.php @@ -6311,5 +6311,3 @@ protected function getRepositoryMock(): Repository return $repositoryMock; } } - -class_alias(ContentTest::class, 'eZ\Publish\Core\Repository\Tests\Service\Mock\ContentTest'); diff --git a/tests/lib/Repository/Service/Mock/PermissionTest.php b/tests/lib/Repository/Service/Mock/PermissionTest.php index 1c6eab2c2e..4f78cd918d 100644 --- a/tests/lib/Repository/Service/Mock/PermissionTest.php +++ b/tests/lib/Repository/Service/Mock/PermissionTest.php @@ -1080,5 +1080,3 @@ protected function getRepositoryMock(): Repository return $this->repositoryMock; } } - -class_alias(PermissionTest::class, 'eZ\Publish\Core\Repository\Tests\Service\Mock\PermissionTest'); diff --git a/tests/lib/Repository/Service/Mock/PermissionsCriterionHandlerTest.php b/tests/lib/Repository/Service/Mock/PermissionsCriterionHandlerTest.php index 01792f6289..529e036ae3 100644 --- a/tests/lib/Repository/Service/Mock/PermissionsCriterionHandlerTest.php +++ b/tests/lib/Repository/Service/Mock/PermissionsCriterionHandlerTest.php @@ -397,5 +397,3 @@ protected function getPermissionResolverMock($methods = []) return $this->permissionResolverMock; } } - -class_alias(PermissionsCriterionHandlerTest::class, 'eZ\Publish\Core\Repository\Tests\Service\Mock\PermissionsCriterionHandlerTest'); diff --git a/tests/lib/Repository/Service/Mock/RelationProcessorTest.php b/tests/lib/Repository/Service/Mock/RelationProcessorTest.php index 4bb4b8a519..c5cfa2529b 100644 --- a/tests/lib/Repository/Service/Mock/RelationProcessorTest.php +++ b/tests/lib/Repository/Service/Mock/RelationProcessorTest.php @@ -688,5 +688,3 @@ protected function getFieldTypeServiceMock() return $this->createMock(FieldTypeService::class); } } - -class_alias(RelationProcessorTest::class, 'eZ\Publish\Core\Repository\Tests\Service\Mock\RelationProcessorTest'); diff --git a/tests/lib/Repository/Service/Mock/RepositoryTest.php b/tests/lib/Repository/Service/Mock/RepositoryTest.php index 179b106d73..194bc53f93 100644 --- a/tests/lib/Repository/Service/Mock/RepositoryTest.php +++ b/tests/lib/Repository/Service/Mock/RepositoryTest.php @@ -117,5 +117,3 @@ public function testRollbackThrowsRuntimeException() $mockedRepository->rollback(); } } - -class_alias(RepositoryTest::class, 'eZ\Publish\Core\Repository\Tests\Service\Mock\RepositoryTest'); diff --git a/tests/lib/Repository/Service/Mock/RoleTest.php b/tests/lib/Repository/Service/Mock/RoleTest.php index 5b5d63832e..325bdceec5 100644 --- a/tests/lib/Repository/Service/Mock/RoleTest.php +++ b/tests/lib/Repository/Service/Mock/RoleTest.php @@ -1097,5 +1097,3 @@ protected function getRepositoryMock(): Repository return $repositoryMock; } } - -class_alias(RoleTest::class, 'eZ\Publish\Core\Repository\Tests\Service\Mock\RoleTest'); diff --git a/tests/lib/Repository/Service/Mock/SearchTest.php b/tests/lib/Repository/Service/Mock/SearchTest.php index fafb892224..987cdbcda4 100644 --- a/tests/lib/Repository/Service/Mock/SearchTest.php +++ b/tests/lib/Repository/Service/Mock/SearchTest.php @@ -960,5 +960,3 @@ protected function getPermissionCriterionResolverMock() return $this->permissionsCriterionResolverMock; } } - -class_alias(SearchTest::class, 'eZ\Publish\Core\Repository\Tests\Service\Mock\SearchTest'); diff --git a/tests/lib/Repository/Service/Mock/UrlAliasTest.php b/tests/lib/Repository/Service/Mock/UrlAliasTest.php index 1a63a1960a..16f2540508 100644 --- a/tests/lib/Repository/Service/Mock/UrlAliasTest.php +++ b/tests/lib/Repository/Service/Mock/UrlAliasTest.php @@ -3414,5 +3414,3 @@ private function configureListURLAliasesForLocation(array $spiUrlAliases): void ->willReturn($spiUrlAliases); } } - -class_alias(UrlAliasTest::class, 'eZ\Publish\Core\Repository\Tests\Service\Mock\UrlAliasTest'); diff --git a/tests/lib/Repository/Service/Mock/UrlTest.php b/tests/lib/Repository/Service/Mock/UrlTest.php index b5b87cb364..65132a6346 100644 --- a/tests/lib/Repository/Service/Mock/UrlTest.php +++ b/tests/lib/Repository/Service/Mock/UrlTest.php @@ -485,5 +485,3 @@ private function getApiUrl($id = null, $url = null) return new URL(['id' => $id, 'url' => $url]); } } - -class_alias(UrlTest::class, 'eZ\Publish\Core\Repository\Tests\Service\Mock\UrlTest'); diff --git a/tests/lib/Repository/Service/Mock/UrlWildcardTest.php b/tests/lib/Repository/Service/Mock/UrlWildcardTest.php index ef46806168..1a21ebd83b 100644 --- a/tests/lib/Repository/Service/Mock/UrlWildcardTest.php +++ b/tests/lib/Repository/Service/Mock/UrlWildcardTest.php @@ -778,5 +778,3 @@ protected function getPartlyMockedURLWildcardService(array $methods = null) ->getMock(); } } - -class_alias(UrlWildcardTest::class, 'eZ\Publish\Core\Repository\Tests\Service\Mock\UrlWildcardTest'); diff --git a/tests/lib/Repository/Service/Mock/UserPasswordValidatorTest.php b/tests/lib/Repository/Service/Mock/UserPasswordValidatorTest.php index 38ae43b240..ebee11608b 100644 --- a/tests/lib/Repository/Service/Mock/UserPasswordValidatorTest.php +++ b/tests/lib/Repository/Service/Mock/UserPasswordValidatorTest.php @@ -241,5 +241,3 @@ public function dateProviderForValidate(): array ]; } } - -class_alias(UserPasswordValidatorTest::class, 'eZ\Publish\Core\Repository\Tests\Service\Mock\UserPasswordValidatorTest'); diff --git a/tests/lib/Repository/Service/Mock/UserPreferenceTest.php b/tests/lib/Repository/Service/Mock/UserPreferenceTest.php index be32a21bec..9503fbbfe0 100644 --- a/tests/lib/Repository/Service/Mock/UserPreferenceTest.php +++ b/tests/lib/Repository/Service/Mock/UserPreferenceTest.php @@ -235,5 +235,3 @@ private function createAPIUserPreference(): APIUserPreference ]); } } - -class_alias(UserPreferenceTest::class, 'eZ\Publish\Core\Repository\Tests\Service\Mock\UserPreferenceTest'); diff --git a/tests/lib/Repository/Service/Mock/UserTest.php b/tests/lib/Repository/Service/Mock/UserTest.php index 26236bd476..4788095a12 100644 --- a/tests/lib/Repository/Service/Mock/UserTest.php +++ b/tests/lib/Repository/Service/Mock/UserTest.php @@ -144,5 +144,3 @@ private function mockDeleteUserFlow( $repository->expects(self::once())->method('getContentService')->willReturn($contentService); } } - -class_alias(UserTest::class, 'eZ\Publish\Core\Repository\Tests\Service\Mock\UserTest'); diff --git a/tests/lib/Repository/Service/Mock/ValueStub.php b/tests/lib/Repository/Service/Mock/ValueStub.php index 420b38e352..c889d0c2f5 100644 --- a/tests/lib/Repository/Service/Mock/ValueStub.php +++ b/tests/lib/Repository/Service/Mock/ValueStub.php @@ -32,5 +32,3 @@ public function __toString() return (string)$this->value; } } - -class_alias(ValueStub::class, 'eZ\Publish\Core\Repository\Tests\Service\Mock\ValueStub'); diff --git a/tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php b/tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php index 2f2c901844..6a0f7160c8 100644 --- a/tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php @@ -279,5 +279,3 @@ final public function testIfThereIsMissingTest(): void } } } - -class_alias(AbstractServiceTest::class, 'eZ\Publish\Core\Repository\SiteAccessAware\Tests\AbstractServiceTest'); diff --git a/tests/lib/Repository/SiteAccessAware/ContentServiceTest.php b/tests/lib/Repository/SiteAccessAware/ContentServiceTest.php index 38e53e60ea..62446a7ab8 100644 --- a/tests/lib/Repository/SiteAccessAware/ContentServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/ContentServiceTest.php @@ -168,5 +168,3 @@ public function providerForLanguagesLookupMethods(): array ]; } } - -class_alias(ContentServiceTest::class, 'eZ\Publish\Core\Repository\SiteAccessAware\Tests\ContentServiceTest'); diff --git a/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php b/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php index f1afb259b9..a9a7042d79 100644 --- a/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php @@ -128,5 +128,3 @@ public function providerForLanguagesLookupMethods() ]; } } - -class_alias(ContentTypeServiceTest::class, 'eZ\Publish\Core\Repository\SiteAccessAware\Tests\ContentTypeServiceTest'); diff --git a/tests/lib/Repository/SiteAccessAware/Language/LanguageResolverTest.php b/tests/lib/Repository/SiteAccessAware/Language/LanguageResolverTest.php index 7d4b47ad1b..9832182548 100644 --- a/tests/lib/Repository/SiteAccessAware/Language/LanguageResolverTest.php +++ b/tests/lib/Repository/SiteAccessAware/Language/LanguageResolverTest.php @@ -77,5 +77,3 @@ public function getDataForTestGetPrioritizedLanguages(): array ]; } } - -class_alias(LanguageResolverTest::class, 'eZ\Publish\Core\Repository\SiteAccessAware\Tests\Language\LanguageResolverTest'); diff --git a/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php b/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php index 135573109a..f8848c1c2f 100644 --- a/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php @@ -61,5 +61,3 @@ public function providerForLanguagesLookupMethods() return []; } } - -class_alias(LanguageServiceTest::class, 'eZ\Publish\Core\Repository\SiteAccessAware\Tests\LanguageServiceTest'); diff --git a/tests/lib/Repository/SiteAccessAware/LocationServiceTest.php b/tests/lib/Repository/SiteAccessAware/LocationServiceTest.php index 2b807cf012..54c9dd1099 100644 --- a/tests/lib/Repository/SiteAccessAware/LocationServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/LocationServiceTest.php @@ -108,5 +108,3 @@ public function providerForLanguagesLookupMethods(): array ]; } } - -class_alias(LocationServiceTest::class, 'eZ\Publish\Core\Repository\SiteAccessAware\Tests\LocationServiceTest'); diff --git a/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php b/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php index dd2dff20dd..20a4cae470 100644 --- a/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php @@ -79,5 +79,3 @@ public function providerForLanguagesLookupMethods() ]; } } - -class_alias(ObjectStateServiceTest::class, 'eZ\Publish\Core\Repository\SiteAccessAware\Tests\ObjectStateServiceTest'); diff --git a/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php b/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php index 9ff8ce4c2d..34ea7e41bf 100644 --- a/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php @@ -90,5 +90,3 @@ protected function setLanguagesPassTroughArguments(array $arguments, $languageAr return $arguments; } } - -class_alias(SearchServiceTest::class, 'eZ\Publish\Core\Repository\SiteAccessAware\Tests\SearchServiceTest'); diff --git a/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php b/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php index af2ba0b25e..5f9980a216 100644 --- a/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php @@ -55,5 +55,3 @@ public function providerForLanguagesLookupMethods() return []; } } - -class_alias(TrashServiceTest::class, 'eZ\Publish\Core\Repository\SiteAccessAware\Tests\TrashServiceTest'); diff --git a/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php b/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php index ba172fabc0..160828947f 100644 --- a/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php @@ -75,5 +75,3 @@ protected function setLanguagesPassTroughArguments(array $arguments, $languageAr return $this->setLanguagesLookupExpectedArguments($arguments, $languageArgumentIndex, $languages); } } - -class_alias(UrlAliasServiceTest::class, 'eZ\Publish\Core\Repository\SiteAccessAware\Tests\UrlAliasServiceTest'); diff --git a/tests/lib/Repository/SiteAccessAware/UserServiceTest.php b/tests/lib/Repository/SiteAccessAware/UserServiceTest.php index d336d87ba3..a27572d3f7 100644 --- a/tests/lib/Repository/SiteAccessAware/UserServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/UserServiceTest.php @@ -104,5 +104,3 @@ public function providerForLanguagesLookupMethods() ]; } } - -class_alias(UserServiceTest::class, 'eZ\Publish\Core\Repository\SiteAccessAware\Tests\UserServiceTest'); diff --git a/tests/lib/Repository/User/PasswordHashServiceTest.php b/tests/lib/Repository/User/PasswordHashServiceTest.php index 99f9a243ee..e995cb5de7 100644 --- a/tests/lib/Repository/User/PasswordHashServiceTest.php +++ b/tests/lib/Repository/User/PasswordHashServiceTest.php @@ -78,5 +78,3 @@ public function testCreatePasswordHashExceptionHidesSensitiveParameter(): void ini_set('zend.exception_string_param_max_len', (string)$paramMax); } } - -class_alias(PasswordHashServiceTest::class, 'eZ\Publish\Core\Repository\Tests\User\PasswordHashServiceTest'); diff --git a/tests/lib/Repository/Values/Content/ContentInfoTest.php b/tests/lib/Repository/Values/Content/ContentInfoTest.php index 9f02ad8c10..bf8de1afbe 100644 --- a/tests/lib/Repository/Values/Content/ContentInfoTest.php +++ b/tests/lib/Repository/Values/Content/ContentInfoTest.php @@ -56,5 +56,3 @@ public function testCreateObject(): void self::assertTrue($contentInfo->isHidden()); } } - -class_alias(ContentInfoTest::class, 'eZ\Publish\Core\Repository\Tests\Values\Content\ContentInfoTest'); diff --git a/tests/lib/Repository/Values/Content/ContentTest.php b/tests/lib/Repository/Values/Content/ContentTest.php index 05e6700f84..f1bdd191d1 100644 --- a/tests/lib/Repository/Values/Content/ContentTest.php +++ b/tests/lib/Repository/Values/Content/ContentTest.php @@ -142,5 +142,3 @@ public function testGetName(): void self::assertEquals($name, $object->getName()); } } - -class_alias(ContentTest::class, 'eZ\Publish\Core\Repository\Tests\Values\Content\ContentTest'); diff --git a/tests/lib/Repository/Values/Content/LanguageTest.php b/tests/lib/Repository/Values/Content/LanguageTest.php index afe92a8bd9..10c32866bc 100644 --- a/tests/lib/Repository/Values/Content/LanguageTest.php +++ b/tests/lib/Repository/Values/Content/LanguageTest.php @@ -90,5 +90,3 @@ public function testUnsetProperty() self::fail('Unsetting read-only property succeeded'); } } - -class_alias(LanguageTest::class, 'eZ\Publish\API\Repository\Tests\Values\Content\LanguageTest'); diff --git a/tests/lib/Repository/Values/Content/LocationTest.php b/tests/lib/Repository/Values/Content/LocationTest.php index 082d8a796b..4f5069c638 100644 --- a/tests/lib/Repository/Values/Content/LocationTest.php +++ b/tests/lib/Repository/Values/Content/LocationTest.php @@ -166,5 +166,3 @@ public function testUnsetProperty(): void self::fail('Unsetting read-only property succeeded'); } } - -class_alias(LocationTest::class, 'eZ\Publish\Core\Repository\Tests\Values\Content\LocationTest'); diff --git a/tests/lib/Repository/Values/Content/Query/Aggregation/Location/SubtreeTermAggregationTest.php b/tests/lib/Repository/Values/Content/Query/Aggregation/Location/SubtreeTermAggregationTest.php index c5fd5da007..7aef2b0111 100644 --- a/tests/lib/Repository/Values/Content/Query/Aggregation/Location/SubtreeTermAggregationTest.php +++ b/tests/lib/Repository/Values/Content/Query/Aggregation/Location/SubtreeTermAggregationTest.php @@ -48,5 +48,3 @@ public function testFromLocation(): void self::assertEquals(self::EXAMPLE_PATH_STRING, $aggregation->getPathString()); } } - -class_alias(SubtreeTermAggregationTest::class, 'eZ\Publish\API\Repository\Tests\Values\Content\Query\Aggregation\Location\SubtreeTermAggregationTest'); diff --git a/tests/lib/Repository/Values/Content/Query/Aggregation/RangeTest.php b/tests/lib/Repository/Values/Content/Query/Aggregation/RangeTest.php index b59a82a992..7f37c1ef26 100644 --- a/tests/lib/Repository/Values/Content/Query/Aggregation/RangeTest.php +++ b/tests/lib/Repository/Values/Content/Query/Aggregation/RangeTest.php @@ -135,5 +135,3 @@ public function dataProviderForEqualsTo(): iterable ]; } } - -class_alias(RangeTest::class, 'eZ\Publish\API\Repository\Tests\Values\Content\Query\Aggregation\RangeTest'); diff --git a/tests/lib/Repository/Values/Content/SectionTest.php b/tests/lib/Repository/Values/Content/SectionTest.php index 4ac51c7498..c64f66e726 100644 --- a/tests/lib/Repository/Values/Content/SectionTest.php +++ b/tests/lib/Repository/Values/Content/SectionTest.php @@ -93,5 +93,3 @@ public function testUnsetProperty() self::fail('Unsetting read-only property succeeded'); } } - -class_alias(SectionTest::class, 'eZ\Publish\API\Repository\Tests\Values\Content\SectionTest'); diff --git a/tests/lib/Repository/Values/Content/TrashItemTest.php b/tests/lib/Repository/Values/Content/TrashItemTest.php index 37abcd1cc8..41e3ca2f9c 100644 --- a/tests/lib/Repository/Values/Content/TrashItemTest.php +++ b/tests/lib/Repository/Values/Content/TrashItemTest.php @@ -98,5 +98,3 @@ public function testUnsetProperty() self::fail('Unsetting read-only property succeeded'); } } - -class_alias(TrashItemTest::class, 'eZ\Publish\Core\Repository\Tests\Values\Content\TrashItemTest'); diff --git a/tests/lib/Repository/Values/Content/VersionInfoTest.php b/tests/lib/Repository/Values/Content/VersionInfoTest.php index e190798d15..517811353f 100644 --- a/tests/lib/Repository/Values/Content/VersionInfoTest.php +++ b/tests/lib/Repository/Values/Content/VersionInfoTest.php @@ -63,5 +63,3 @@ private function createVersionInfoWithStatus(int $status): VersionInfo ]); } } - -class_alias(VersionInfoTest::class, 'eZ\Publish\Core\Repository\Tests\Values\Content\VersionInfoTest'); diff --git a/tests/lib/Repository/Values/ContentType/ContentTypeDraftTest.php b/tests/lib/Repository/Values/ContentType/ContentTypeDraftTest.php index d3a378880f..afb8eb15b5 100644 --- a/tests/lib/Repository/Values/ContentType/ContentTypeDraftTest.php +++ b/tests/lib/Repository/Values/ContentType/ContentTypeDraftTest.php @@ -55,5 +55,3 @@ public function testObjectProperties() } } } - -class_alias(ContentTypeDraftTest::class, 'eZ\Publish\Core\Repository\Tests\Values\ContentType\ContentTypeDraftTest'); diff --git a/tests/lib/Repository/Values/ContentType/ContentTypeTest.php b/tests/lib/Repository/Values/ContentType/ContentTypeTest.php index 09d0662198..83e110f075 100644 --- a/tests/lib/Repository/Values/ContentType/ContentTypeTest.php +++ b/tests/lib/Repository/Values/ContentType/ContentTypeTest.php @@ -180,5 +180,3 @@ public function testGetFirstFieldDefinitionOfType(): void ); } } - -class_alias(ContentTypeTest::class, 'eZ\Publish\Core\Repository\Tests\Values\ContentType\ContentTypeTest'); diff --git a/tests/lib/Repository/Values/ContentType/FieldDefinitionCollectionTest.php b/tests/lib/Repository/Values/ContentType/FieldDefinitionCollectionTest.php index 6e1b7124dd..7d74115bf1 100644 --- a/tests/lib/Repository/Values/ContentType/FieldDefinitionCollectionTest.php +++ b/tests/lib/Repository/Values/ContentType/FieldDefinitionCollectionTest.php @@ -343,5 +343,3 @@ private function getContraction(): Closure }; } } - -class_alias(FieldDefinitionCollectionTest::class, 'eZ\Publish\Core\Repository\Tests\Values\ContentType\FieldDefinitionCollectionTest'); diff --git a/tests/lib/Repository/Values/Filter/FilterTest.php b/tests/lib/Repository/Values/Filter/FilterTest.php index 292fe399a4..d0ab859b4c 100644 --- a/tests/lib/Repository/Values/Filter/FilterTest.php +++ b/tests/lib/Repository/Values/Filter/FilterTest.php @@ -418,5 +418,3 @@ public function getFilters(): iterable yield 'Empty Filter' => [new Filter()]; } } - -class_alias(FilterTest::class, 'eZ\Publish\API\Repository\Tests\Values\Filter\FilterTest'); diff --git a/tests/lib/Repository/Values/MultiLanguageTestTrait.php b/tests/lib/Repository/Values/MultiLanguageTestTrait.php index b30090d90f..24495987c7 100644 --- a/tests/lib/Repository/Values/MultiLanguageTestTrait.php +++ b/tests/lib/Repository/Values/MultiLanguageTestTrait.php @@ -117,5 +117,3 @@ public function testGetMultiLanguageDefaultDescription($object) } } } - -class_alias(MultiLanguageTestTrait::class, 'eZ\Publish\Core\Repository\Tests\Values\MultiLanguageTestTrait'); diff --git a/tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php b/tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php index fc10165b1e..f9d0f70a2b 100644 --- a/tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php +++ b/tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php @@ -127,5 +127,3 @@ public function testUnsetProperty() self::fail('Unsetting read-only property succeeded'); } } - -class_alias(ObjectStateGroupTest::class, 'eZ\Publish\Core\Repository\Tests\Values\ObjectState\ObjectStateGroupTest'); diff --git a/tests/lib/Repository/Values/ObjectState/ObjectStateTest.php b/tests/lib/Repository/Values/ObjectState/ObjectStateTest.php index 88c03fc148..e5e4cbb321 100644 --- a/tests/lib/Repository/Values/ObjectState/ObjectStateTest.php +++ b/tests/lib/Repository/Values/ObjectState/ObjectStateTest.php @@ -131,5 +131,3 @@ public function testUnsetProperty() self::fail('Unsetting read-only property succeeded'); } } - -class_alias(ObjectStateTest::class, 'eZ\Publish\Core\Repository\Tests\Values\ObjectState\ObjectStateTest'); diff --git a/tests/lib/Repository/Values/User/PolicyTest.php b/tests/lib/Repository/Values/User/PolicyTest.php index 107ae7f6f6..72245b8545 100644 --- a/tests/lib/Repository/Values/User/PolicyTest.php +++ b/tests/lib/Repository/Values/User/PolicyTest.php @@ -93,5 +93,3 @@ public function testUnsetProperty() self::fail('Unsetting read-only property succeeded'); } } - -class_alias(PolicyTest::class, 'eZ\Publish\Core\Repository\Tests\Values\User\PolicyTest'); diff --git a/tests/lib/Repository/Values/User/RoleTest.php b/tests/lib/Repository/Values/User/RoleTest.php index 554131e99b..de08368001 100644 --- a/tests/lib/Repository/Values/User/RoleTest.php +++ b/tests/lib/Repository/Values/User/RoleTest.php @@ -90,5 +90,3 @@ public function testUnsetProperty() self::fail('Unsetting read-only property succeeded'); } } - -class_alias(RoleTest::class, 'eZ\Publish\Core\Repository\Tests\Values\User\RoleTest'); diff --git a/tests/lib/Repository/Values/User/UserGroupTest.php b/tests/lib/Repository/Values/User/UserGroupTest.php index 3b2e9a43f2..8ff052cc6c 100644 --- a/tests/lib/Repository/Values/User/UserGroupTest.php +++ b/tests/lib/Repository/Values/User/UserGroupTest.php @@ -128,5 +128,3 @@ public function testUnsetProperty() self::fail('Unsetting read-only property succeeded'); } } - -class_alias(UserGroupTest::class, 'eZ\Publish\Core\Repository\Tests\Values\User\UserGroupTest'); diff --git a/tests/lib/Repository/Values/User/UserTest.php b/tests/lib/Repository/Values/User/UserTest.php index 0920e9e2c3..af686d7c57 100644 --- a/tests/lib/Repository/Values/User/UserTest.php +++ b/tests/lib/Repository/Values/User/UserTest.php @@ -135,5 +135,3 @@ public function testUnsetProperty() self::fail('Unsetting read-only property succeeded'); } } - -class_alias(UserTest::class, 'eZ\Publish\Core\Repository\Tests\Values\User\UserTest'); diff --git a/tests/lib/Repository/Values/ValueObjectTestTrait.php b/tests/lib/Repository/Values/ValueObjectTestTrait.php index 1747fc6597..5334cd612a 100644 --- a/tests/lib/Repository/Values/ValueObjectTestTrait.php +++ b/tests/lib/Repository/Values/ValueObjectTestTrait.php @@ -29,5 +29,3 @@ public function assertPropertiesCorrect(array $expectedValues, ValueObject $actu } } } - -class_alias(ValueObjectTestTrait::class, 'eZ\Publish\API\Repository\Tests\Values\ValueObjectTestTrait'); diff --git a/tests/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapperTest.php b/tests/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapperTest.php index 2d09349b83..16812d8a77 100644 --- a/tests/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapperTest.php +++ b/tests/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapperTest.php @@ -140,5 +140,3 @@ public function getDataForTestMap(): iterable ]; } } - -class_alias(RemoteIdentifierMapperTest::class, 'eZ\Publish\Core\Search\Tests\Common\FieldValueMapper\RemoteIdentifierMapperTest'); diff --git a/tests/lib/Search/Common/LocationEventSubscriber/LocationEventSubscriberTest.php b/tests/lib/Search/Common/LocationEventSubscriber/LocationEventSubscriberTest.php index 4ceed30bb0..d4672d30a2 100644 --- a/tests/lib/Search/Common/LocationEventSubscriber/LocationEventSubscriberTest.php +++ b/tests/lib/Search/Common/LocationEventSubscriber/LocationEventSubscriberTest.php @@ -126,5 +126,3 @@ private function getExampleSPIContentInfo(): SPIContentInfo ]); } } - -class_alias(LocationEventSubscriberTest::class, 'eZ\Publish\Core\Search\Tests\Common\LocationEventSubscriber\LocationEventSubscriberTest'); diff --git a/tests/lib/Search/FieldNameResolverTest.php b/tests/lib/Search/FieldNameResolverTest.php index 543bdccdeb..d15a910290 100644 --- a/tests/lib/Search/FieldNameResolverTest.php +++ b/tests/lib/Search/FieldNameResolverTest.php @@ -861,5 +861,3 @@ protected function getSortClauseMock() return $this->createMock(APISortClause::class); } } - -class_alias(FieldNameResolverTest::class, 'eZ\Publish\Core\Search\Tests\FieldNameResolverTest'); diff --git a/tests/lib/Search/Legacy/Content/AbstractTestCase.php b/tests/lib/Search/Legacy/Content/AbstractTestCase.php index 5a64d8e15e..a53b70569a 100644 --- a/tests/lib/Search/Legacy/Content/AbstractTestCase.php +++ b/tests/lib/Search/Legacy/Content/AbstractTestCase.php @@ -140,5 +140,3 @@ protected function getEventDispatcher(): EventDispatcherInterface return $eventDispatcher; } } - -class_alias(AbstractTestCase::class, 'eZ\Publish\Core\Search\Legacy\Tests\Content\AbstractTestCase'); diff --git a/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php b/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php index 94d1329cf2..be4d4cce44 100644 --- a/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php @@ -472,5 +472,3 @@ static function ($hit) { ); } } - -class_alias(HandlerContentSortTest::class, 'eZ\Publish\Core\Search\Legacy\Tests\Content\HandlerContentSortTest'); diff --git a/tests/lib/Search/Legacy/Content/HandlerContentTest.php b/tests/lib/Search/Legacy/Content/HandlerContentTest.php index 9d4253e42f..ac184d25ae 100644 --- a/tests/lib/Search/Legacy/Content/HandlerContentTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerContentTest.php @@ -1448,5 +1448,3 @@ public function testGetNonExistingFieldDefinition(): void $this->getContentTypeHandler()->getFieldDefinition(0, Type::STATUS_DEFINED); } } - -class_alias(HandlerContentTest::class, 'eZ\Publish\Core\Search\Legacy\Tests\Content\HandlerContentTest'); diff --git a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php index 5f9c438efc..d5264353a4 100644 --- a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php @@ -654,5 +654,3 @@ public function testSortIsMainLocationDescending() ); } } - -class_alias(HandlerLocationSortTest::class, 'eZ\Publish\Core\Search\Legacy\Tests\Content\HandlerLocationSortTest'); diff --git a/tests/lib/Search/Legacy/Content/HandlerLocationTest.php b/tests/lib/Search/Legacy/Content/HandlerLocationTest.php index 2dd446db8c..8761d99507 100644 --- a/tests/lib/Search/Legacy/Content/HandlerLocationTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerLocationTest.php @@ -1466,5 +1466,3 @@ public function testIsNotMainLocationFilter() ); } } - -class_alias(HandlerLocationTest::class, 'eZ\Publish\Core\Search\Legacy\Tests\Content\HandlerLocationTest'); diff --git a/tests/lib/Search/TestCase.php b/tests/lib/Search/TestCase.php index 4a3e0c8bb8..ff0db2fbfa 100644 --- a/tests/lib/Search/TestCase.php +++ b/tests/lib/Search/TestCase.php @@ -15,5 +15,3 @@ abstract class TestCase extends BaseTestCase { } - -class_alias(TestCase::class, 'eZ\Publish\Core\Search\Tests\TestCase'); diff --git a/tests/lib/Specification/Content/ContentContainerSpecificationTest.php b/tests/lib/Specification/Content/ContentContainerSpecificationTest.php index b11d383ae5..0aff756d04 100644 --- a/tests/lib/Specification/Content/ContentContainerSpecificationTest.php +++ b/tests/lib/Specification/Content/ContentContainerSpecificationTest.php @@ -60,5 +60,3 @@ public function providerForIsSatisfiedBy(): array ]; } } - -class_alias(ContentContainerSpecificationTest::class, 'eZ\Publish\SPI\Specification\Tests\Content\ContentContainerSpecificationTest'); diff --git a/tests/lib/Specification/Content/ContentTypeSpecificationTest.php b/tests/lib/Specification/Content/ContentTypeSpecificationTest.php index 5f947daeb8..49b8f534d1 100644 --- a/tests/lib/Specification/Content/ContentTypeSpecificationTest.php +++ b/tests/lib/Specification/Content/ContentTypeSpecificationTest.php @@ -77,5 +77,3 @@ public function providerForIsSatisfiedBy(): array ]; } } - -class_alias(ContentTypeSpecificationTest::class, 'eZ\Publish\SPI\Specification\Tests\Content\ContentTypeSpecificationTest'); From c07ff3e7040d1b84cdbd7912f0a795a10d33a48a Mon Sep 17 00:00:00 2001 From: Konrad Oboza Date: Thu, 23 May 2024 14:45:24 +0200 Subject: [PATCH 15/53] IBX-8140: Enabled authenticator manager-based security (#368) * IBX-8140: Enabled authenticator manager-based security * adjusted tests after removing obsolete services * added proper access denied listener grouping all access issues and redirecting to the login form * [TMP][Behat] Added @javascript to failed scenarios to see screenshots * fixed phpstan * renamed AccessDeniedListener to *Subscriber and made it more loose when detecting permission issues * [TMP] Added dependencies.json * [TMP] Dropped core self-reference from dependencies.json * regenerated phpstan baseline * cr remarks * adjusted unit tests * removed unused methods due to SecurityPass changes * reverted decorating `DefaultAuthenticationSuccessHandler` * cr remarks * dropped @javascript due to performance reasons * removed dependencies.json --------- Co-authored-by: Andrew Longosz --- phpstan-baseline.neon | 222 +--------- .../Security/HttpBasicFactory.php | 23 - .../Features/Content/content_preview.feature | 2 + src/bundle/Core/IbexaCoreBundle.php | 11 +- src/bundle/Core/Resources/config/security.yml | 17 +- src/lib/.gitkeep | 0 .../AnonymousAuthenticationProvider.php | 41 -- .../DefaultAuthenticationSuccessHandler.php | 42 +- .../AccessDeniedSubscriber.php | 46 ++ .../EventListener/SecurityListener.php | 252 ----------- src/lib/MVC/Symfony/SiteAccess/Router.php | 5 +- .../Compiler/SecurityPassTest.php | 33 +- tests/lib/.gitkeep | 0 .../AnonymousAuthenticationProviderTest.php | 57 --- ...efaultAuthenticationSuccessHandlerTest.php | 65 --- ...MeRepositoryAuthenticationProviderTest.php | 23 +- .../EventListener/SecurityListenerTest.php | 415 ------------------ 17 files changed, 110 insertions(+), 1144 deletions(-) delete mode 100644 src/bundle/Core/DependencyInjection/Security/HttpBasicFactory.php delete mode 100644 src/lib/.gitkeep delete mode 100644 src/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProvider.php create mode 100644 src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/AccessDeniedSubscriber.php delete mode 100644 src/lib/MVC/Symfony/Security/EventListener/SecurityListener.php delete mode 100644 tests/lib/.gitkeep delete mode 100644 tests/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProviderTest.php delete mode 100644 tests/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandlerTest.php delete mode 100644 tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index f739aadf2e..630bd46f3e 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -620,11 +620,6 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/Compiler/RouterPass.php - - - message: "#^Method Ibexa\\\\Bundle\\\\Core\\\\DependencyInjection\\\\Compiler\\\\SecurityPass\\:\\:process\\(\\) has no return type specified\\.$#" - count: 1 - path: src/bundle/Core/DependencyInjection/Compiler/SecurityPass.php - - message: "#^Method Ibexa\\\\Bundle\\\\Core\\\\DependencyInjection\\\\Compiler\\\\SessionConfigurationPass\\:\\:process\\(\\) has no return type specified\\.$#" count: 1 @@ -3310,16 +3305,6 @@ parameters: count: 1 path: src/bundle/Core/Fragment/InlineFragmentRenderer.php - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\DependencyInjection\\\\Extension\\\\ExtensionInterface\\:\\:addSecurityListenerFactory\\(\\)\\.$#" - count: 1 - path: src/bundle/Core/IbexaCoreBundle.php - - - - message: "#^Method Ibexa\\\\Bundle\\\\Core\\\\IbexaCoreBundle\\:\\:build\\(\\) has no return type specified\\.$#" - count: 1 - path: src/bundle/Core/IbexaCoreBundle.php - - message: "#^Method Ibexa\\\\Bundle\\\\Core\\\\Imagine\\\\AliasCleaner\\:\\:removeAliases\\(\\) has no return type specified\\.$#" count: 1 @@ -12145,21 +12130,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Routing/UrlWildcardRouter.php - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\AnonymousAuthenticationProvider\\:\\:setConfigResolver\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProvider.php - - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\AnonymousAuthenticationProvider\\:\\:setPermissionResolver\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProvider.php - - - - message: "#^Parameter \\#3 \\$firewallName of class Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\DetermineTargetUrlEvent constructor expects string, string\\|null given\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandler.php - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\RememberMeRepositoryAuthenticationProvider\\:\\:setPermissionResolver\\(\\) has no return type specified\\.$#" count: 1 @@ -12245,31 +12215,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Security/Authorization/Voter/ValueObjectVoter.php - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListener\\:\\:__construct\\(\\) has parameter \\$fragmentPath with no type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/EventListener/SecurityListener.php - - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListener\\:\\:checkSiteAccessPermission\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/EventListener/SecurityListener.php - - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListener\\:\\:isMasterRequest\\(\\) has parameter \\$requestType with no type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/EventListener/SecurityListener.php - - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListener\\:\\:onInteractiveLogin\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/EventListener/SecurityListener.php - - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListener\\:\\:onKernelRequest\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/EventListener/SecurityListener.php - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Exception\\\\UnauthorizedSiteAccessException\\:\\:__construct\\(\\) has parameter \\$username with no type specified\\.$#" count: 1 @@ -12315,26 +12260,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Security/InteractiveLoginToken.php - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\:\\:__construct\\(\\) has parameter \\$roles with no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/User.php - - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\:\\:eraseCredentials\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/User.php - - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\:\\:getSalt\\(\\) should return string but returns null\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/User.php - - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\:\\:setAPIUser\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/User.php - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\EmailProvider\\:\\:loadUserByUsername\\(\\) has parameter \\$user with no type specified\\.$#" count: 1 @@ -23410,11 +23335,6 @@ parameters: count: 1 path: tests/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePassTest.php - - - message: "#^Method Ibexa\\\\Tests\\\\Bundle\\\\Core\\\\DependencyInjection\\\\Compiler\\\\SecurityPassTest\\:\\:testAlteredDaoAuthenticationProvider\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Bundle\\\\Core\\\\DependencyInjection\\\\Compiler\\\\SlugConverterConfigurationPassTest\\:\\:configurationProvider\\(\\) has no return type specified\\.$#" count: 1 @@ -46890,21 +46810,6 @@ parameters: count: 1 path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\AnonymousAuthenticationProviderTest\\:\\:testAuthenticate\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProviderTest.php - - - - message: "#^Parameter \\#1 \\$configResolver of method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\AnonymousAuthenticationProvider\\:\\:setConfigResolver\\(\\) expects Ibexa\\\\Contracts\\\\Core\\\\SiteAccess\\\\ConfigResolverInterface, PHPUnit\\\\Framework\\\\MockObject\\\\MockObject given\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\DefaultAuthenticationSuccessHandlerTest\\:\\:testSetConfigResolver\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandlerTest.php - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\TokenInterface\\:\\:getProviderKey\\(\\)\\.$#" count: 1 @@ -46931,7 +46836,7 @@ parameters: path: tests/lib/MVC/Symfony/Security/Authentication/GuardRepositoryAuthenticationProviderTest.php - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\TokenInterface\\:\\:getProviderKey\\(\\)\\.$#" + message: "#^Call to an undefined method Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\TokenInterface\\:\\:getFirewallName\\(\\)\\.$#" count: 1 path: tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php @@ -46940,26 +46845,6 @@ parameters: count: 1 path: tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\RememberMeRepositoryAuthenticationProviderTest\\:\\:testAuthenticate\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\RememberMeRepositoryAuthenticationProviderTest\\:\\:testAuthenticateUnsupportedToken\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\RememberMeRepositoryAuthenticationProviderTest\\:\\:testAuthenticateWrongProviderKey\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\RememberMeRepositoryAuthenticationProviderTest\\:\\:testAuthenticateWrongSecret\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserProviderInterface\\:\\:method\\(\\)\\.$#" count: 1 @@ -47010,111 +46895,6 @@ parameters: count: 1 path: tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListenerTest\\:\\:generateListener\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListenerTest\\:\\:testCheckSiteAccessNoSiteAccess\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListenerTest\\:\\:testCheckSiteAccessNotEzUser\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListenerTest\\:\\:testCheckSiteAccessPermissionDenied\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListenerTest\\:\\:testCheckSiteAccessPermissionGranted\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListenerTest\\:\\:testGetSubscribedEvents\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListenerTest\\:\\:testOnInteractiveLogin\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListenerTest\\:\\:testOnInteractiveLoginAlreadyEzUser\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListenerTest\\:\\:testOnInteractiveLoginNotUserObject\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListenerTest\\:\\:testOnKernelRequestAccessDenied\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListenerTest\\:\\:testOnKernelRequestAccessGranted\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListenerTest\\:\\:testOnKernelRequestLoginRoute\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListenerTest\\:\\:testOnKernelRequestNoSiteAccess\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListenerTest\\:\\:testOnKernelRequestNullToken\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListenerTest\\:\\:testOnKernelRequestSubRequest\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListenerTest\\:\\:testOnKernelRequestSubRequestFragment\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - - - message: "#^Parameter \\#3 \\$configResolver of class Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListener constructor expects Ibexa\\\\Contracts\\\\Core\\\\SiteAccess\\\\ConfigResolverInterface, PHPUnit\\\\Framework\\\\MockObject\\\\MockObject given\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - - - message: "#^Parameter \\#4 \\$eventDispatcher of class Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListener constructor expects Symfony\\\\Component\\\\EventDispatcher\\\\EventDispatcherInterface, PHPUnit\\\\Framework\\\\MockObject\\\\MockObject given\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - - - message: "#^Parameter \\#5 \\$tokenStorage of class Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListener constructor expects Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\Storage\\\\TokenStorageInterface, PHPUnit\\\\Framework\\\\MockObject\\\\MockObject&Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\AuthorizationCheckerInterface given\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - - - message: "#^Parameter \\#6 \\$authorizationChecker of class Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListener constructor expects Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\AuthorizationCheckerInterface, PHPUnit\\\\Framework\\\\MockObject\\\\MockObject given\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - - - message: "#^Property Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\EventListener\\\\SecurityListenerTest\\:\\:\\$tokenStorage \\(PHPUnit\\\\Framework\\\\MockObject\\\\MockObject&Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\AuthorizationCheckerInterface\\) does not accept PHPUnit\\\\Framework\\\\MockObject\\\\MockObject&Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\Storage\\\\TokenStorageInterface\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\HttpUtilsTest\\:\\:checkRequestPathProvider\\(\\) has no return type specified\\.$#" count: 1 diff --git a/src/bundle/Core/DependencyInjection/Security/HttpBasicFactory.php b/src/bundle/Core/DependencyInjection/Security/HttpBasicFactory.php deleted file mode 100644 index a052de46d2..0000000000 --- a/src/bundle/Core/DependencyInjection/Security/HttpBasicFactory.php +++ /dev/null @@ -1,23 +0,0 @@ -addCompilerPass(new GenericFieldTypeConverterPass(), PassConfig::TYPE_OPTIMIZE); @@ -92,15 +93,13 @@ public function build(ContainerBuilder $container) $container->addCompilerPass(new RoleLimitationConverterPass()); $container->addCompilerPass(new QueryTypePass()); - $securityExtension = $container->getExtension('security'); - $securityExtension->addSecurityListenerFactory(new HttpBasicFactory()); $container->addCompilerPass(new TranslationCollectorPass()); $container->addCompilerPass(new SlugConverterConfigurationPass()); $container->registerForAutoconfiguration(VariableProvider::class)->addTag('ezplatform.view.variable_provider'); } - public function getContainerExtension() + public function getContainerExtension(): ?ExtensionInterface { if (!isset($this->extension)) { $this->extension = new IbexaCoreExtension( diff --git a/src/bundle/Core/Resources/config/security.yml b/src/bundle/Core/Resources/config/security.yml index 3d96abf9cb..5ca47846d9 100644 --- a/src/bundle/Core/Resources/config/security.yml +++ b/src/bundle/Core/Resources/config/security.yml @@ -40,19 +40,10 @@ services: class: Ibexa\Core\MVC\Symfony\Controller\SecurityController arguments: ["@twig", '@ibexa.config.resolver', "@security.authentication_utils"] - Ibexa\Core\MVC\Symfony\Security\EventListener\SecurityListener: - class: Ibexa\Core\MVC\Symfony\Security\EventListener\SecurityListener - arguments: - - '@Ibexa\Contracts\Core\Repository\PermissionResolver' - - '@Ibexa\Contracts\Core\Repository\UserService' - - '@ibexa.config.resolver' - - "@event_dispatcher" - - "@security.token_storage" - - "@security.authorization_checker" - - "%fragment.path%" - tags: - - { name: kernel.event_subscriber } - ibexa.security.user_provider: '@Ibexa\Core\MVC\Symfony\Security\User\UsernameProvider' ibexa.security.user_provider.username: '@Ibexa\Core\MVC\Symfony\Security\User\UsernameProvider' ibexa.security.user_provider.email: '@Ibexa\Core\MVC\Symfony\Security\User\EmailProvider' + + Ibexa\Core\MVC\Symfony\Security\Authentication\EventSubscriber\AccessDeniedSubscriber: + autowire: true + autoconfigure: true diff --git a/src/lib/.gitkeep b/src/lib/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProvider.php b/src/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProvider.php deleted file mode 100644 index a57a5585dc..0000000000 --- a/src/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProvider.php +++ /dev/null @@ -1,41 +0,0 @@ -configResolver = $configResolver; - } - - public function setPermissionResolver(PermissionResolver $permissionResolver) - { - $this->permissionResolver = $permissionResolver; - } - - public function authenticate(TokenInterface $token) - { - $token = parent::authenticate($token); - $this->permissionResolver->setCurrentUserReference(new UserReference($this->configResolver->getParameter('anonymous_user_id'))); - - return $token; - } -} diff --git a/src/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandler.php b/src/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandler.php index 87552b8854..5b45e65228 100644 --- a/src/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandler.php +++ b/src/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandler.php @@ -4,23 +4,27 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Core\MVC\Symfony\Security\Authentication; +use Ibexa\Contracts\Core\Repository\PermissionResolver; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; +use Ibexa\Core\MVC\Symfony\Security\UserInterface; use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationSuccessHandler as BaseSuccessHandler; -class DefaultAuthenticationSuccessHandler extends BaseSuccessHandler +final class DefaultAuthenticationSuccessHandler extends BaseSuccessHandler { private EventDispatcherInterface $eventDispatcher; private ConfigResolverInterface $configResolver; - /** - * Injects the ConfigResolver to potentially override default_target_path for redirections after authentication success. - */ + private PermissionResolver $permissionResolver; + public function setConfigResolver(ConfigResolverInterface $configResolver): void { $this->configResolver = $configResolver; @@ -31,20 +35,42 @@ public function setEventDispatcher(EventDispatcherInterface $eventDispatcher): v $this->eventDispatcher = $eventDispatcher; } - protected function determineTargetUrl(Request $request) + public function setPermissionResolver(PermissionResolver $permissionResolver): void + { + $this->permissionResolver = $permissionResolver; + } + + public function onAuthenticationSuccess(Request $request, TokenInterface $token): ?Response + { + $user = $token->getUser(); + if ($user instanceof UserInterface && isset($this->permissionResolver)) { + $this->permissionResolver->setCurrentUserReference($user->getAPIUser()); + } + + return parent::onAuthenticationSuccess($request, $token); + } + + protected function determineTargetUrl(Request $request): string { if (isset($this->configResolver)) { $defaultPage = $this->configResolver->getParameter('default_page'); if ($defaultPage !== null) { - $this->options['default_target_path'] = $defaultPage; + $this->setOptions([ + 'default_target_path' => $defaultPage, + ]); } } if (isset($this->eventDispatcher)) { - $event = new DetermineTargetUrlEvent($request, $this->options, $this->getFirewallName()); + $event = new DetermineTargetUrlEvent( + $request, + $this->getOptions(), + $this->getFirewallName() ?? '' + ); + $this->eventDispatcher->dispatch($event); - $this->options = $event->getOptions(); + $this->setOptions($event->getOptions()); } return parent::determineTargetUrl($request); diff --git a/src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/AccessDeniedSubscriber.php b/src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/AccessDeniedSubscriber.php new file mode 100644 index 0000000000..892ce86ebc --- /dev/null +++ b/src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/AccessDeniedSubscriber.php @@ -0,0 +1,46 @@ + ['onKernelException', 2], + ]; + } + + public function onKernelException(ExceptionEvent $event): void + { + $exception = $event->getThrowable()->getPrevious(); + + if ($exception instanceof IbexaRepositoryException) { + return; + } + + $event->setResponse(new RedirectResponse( + $this->urlGenerator->generate('login') + )); + } +} diff --git a/src/lib/MVC/Symfony/Security/EventListener/SecurityListener.php b/src/lib/MVC/Symfony/Security/EventListener/SecurityListener.php deleted file mode 100644 index 0cc43aeeb7..0000000000 --- a/src/lib/MVC/Symfony/Security/EventListener/SecurityListener.php +++ /dev/null @@ -1,252 +0,0 @@ -permissionResolver = $permissionResolver; - $this->userService = $userService; - $this->configResolver = $configResolver; - $this->eventDispatcher = $eventDispatcher; - $this->tokenStorage = $tokenStorage; - $this->authorizationChecker = $authorizationChecker; - $this->fragmentPath = $fragmentPath; - } - - public static function getSubscribedEvents() - { - return [ - SecurityEvents::INTERACTIVE_LOGIN => [ - ['onInteractiveLogin', 10], - ['checkSiteAccessPermission', 9], - ], - // Priority 7, so that it occurs just after firewall (priority 8) - KernelEvents::REQUEST => ['onKernelRequest', 7], - ]; - } - - /** - * Tries to retrieve a valid Ibexa user if authenticated user doesn't come from the repository (foreign user provider). - * Will dispatch an event allowing listeners to return a valid Ibexa user for current authenticated user. - * Will by default let the repository load the anonymous user. - * - * @param \Symfony\Component\Security\Http\Event\InteractiveLoginEvent $event - */ - public function onInteractiveLogin(BaseInteractiveLoginEvent $event) - { - $token = $event->getAuthenticationToken(); - $originalUser = $token->getUser(); - if ($originalUser instanceof IbexaUser || !$originalUser instanceof UserInterface) { - return; - } - - /* - * 1. Send the event. - * 2. If no Ibexa user is returned, load Anonymous user. - * 3. Inject Ibexa user in repository. - * 4. Create the UserWrapped user object (implementing Ibexa UserInterface) with loaded Ibexa user. - * 5. Create new token with UserWrapped user - * 6. Inject the new token in security context - */ - $subLoginEvent = new InteractiveLoginEvent($event->getRequest(), $token); - $this->eventDispatcher->dispatch($subLoginEvent, MVCEvents::INTERACTIVE_LOGIN); - - if ($subLoginEvent->hasAPIUser()) { - $apiUser = $subLoginEvent->getAPIUser(); - } else { - $apiUser = $this->userService->loadUser( - $this->configResolver->getParameter('anonymous_user_id') - ); - } - - $this->permissionResolver->setCurrentUserReference($apiUser); - - $providerKey = method_exists($token, 'getProviderKey') ? $token->getProviderKey() : __CLASS__; - $interactiveToken = new InteractiveLoginToken( - $this->getUser($originalUser, $apiUser), - get_class($token), - $token->getCredentials(), - $providerKey, - $token->getRoleNames() - ); - $interactiveToken->setOriginalToken($token); - $interactiveToken->setAttributes($token->getAttributes()); - $this->tokenStorage->setToken($interactiveToken); - } - - /** - * Returns new user object based on original user and provided API user. - * One may want to override this method to use their own user class. - * - * @param \Symfony\Component\Security\Core\User\UserInterface $originalUser - * @param \Ibexa\Contracts\Core\Repository\Values\User\User $apiUser - * - * @return \Ibexa\Core\MVC\Symfony\Security\UserInterface - */ - protected function getUser(UserInterface $originalUser, APIUser $apiUser) - { - return new UserWrapped($originalUser, $apiUser); - } - - /** - * Throws an UnauthorizedSiteAccessException if current user doesn't have permission to current SiteAccess. - * - * @param \Symfony\Component\Security\Http\Event\InteractiveLoginEvent $event - * - * @throws \Ibexa\Core\MVC\Symfony\Security\Exception\UnauthorizedSiteAccessException - */ - public function checkSiteAccessPermission(BaseInteractiveLoginEvent $event) - { - $token = $event->getAuthenticationToken(); - $originalUser = $token->getUser(); - $request = $event->getRequest(); - $siteAccess = $request->attributes->get('siteaccess'); - if (!($originalUser instanceof IbexaUser && $siteAccess instanceof SiteAccess)) { - return; - } - - if (!$this->hasAccess($siteAccess)) { - throw new UnauthorizedSiteAccessException($siteAccess, $originalUser->getUsername()); - } - } - - /** - * Throws an UnauthorizedSiteAccessException if current user doesn't have access to current SiteAccess. - * - * @param \Symfony\Component\HttpKernel\Event\RequestEvent $event - * - * @throws \Ibexa\Core\MVC\Symfony\Security\Exception\UnauthorizedSiteAccessException - */ - public function onKernelRequest(RequestEvent $event) - { - $request = $event->getRequest(); - // Ignore sub-requests, including fragments. - if (!$this->isMasterRequest($request, $event->getRequestType())) { - return; - } - - $siteAccess = $request->attributes->get('siteaccess'); - if (!$siteAccess instanceof SiteAccess) { - return; - } - - $token = $this->tokenStorage->getToken(); - if ($token === null) { - return; - } - - if ( - // Leave access to login route, so that user can attempt re-authentication. - $request->attributes->get('_route') !== 'login' - && !$this->hasAccess($siteAccess) - ) { - throw new UnauthorizedSiteAccessException($siteAccess, $token->getUsername()); - } - } - - /** - * Returns true if given request is considered as a master request. - * Fragments are considered as sub-requests (i.e. ESI, Hinclude...). - * - * @param \Symfony\Component\HttpFoundation\Request $request - * @param $requestType - * - * @return bool - */ - private function isMasterRequest(Request $request, $requestType) - { - if ( - $requestType !== HttpKernelInterface::MASTER_REQUEST - || substr($request->getPathInfo(), -strlen($this->fragmentPath)) === $this->fragmentPath - ) { - return false; - } - - return true; - } - - /** - * Returns true if current user has access to given SiteAccess. - * - * @param \Ibexa\Core\MVC\Symfony\SiteAccess $siteAccess - * - * @return bool - */ - protected function hasAccess(SiteAccess $siteAccess) - { - return $this->authorizationChecker->isGranted( - new Attribute('user', 'login', ['valueObject' => $siteAccess]) - ); - } -} diff --git a/src/lib/MVC/Symfony/SiteAccess/Router.php b/src/lib/MVC/Symfony/SiteAccess/Router.php index ad2acaa9b6..7470697f15 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Router.php +++ b/src/lib/MVC/Symfony/SiteAccess/Router.php @@ -211,11 +211,10 @@ private function doMatch(SimplifiedRequest $request) * @param string $siteAccessName * * @throws \InvalidArgumentException If $siteAccessName is invalid (i.e. not present in configured list). - * - * @return \Ibexa\Core\MVC\Symfony\SiteAccess|null */ - public function matchByName($siteAccessName) + public function matchByName($siteAccessName): ?SiteAccess { + $siteAccessName = $siteAccessName instanceof SiteAccess ? $siteAccessName->name : $siteAccessName; if (!$this->siteAccessProvider->isDefined($siteAccessName)) { throw new InvalidArgumentException("Invalid SiteAccess name provided for reverse matching: $siteAccessName"); } diff --git a/tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php index 858ab220dc..d6689f86d4 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Compiler; @@ -16,15 +17,13 @@ use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; -class SecurityPassTest extends AbstractCompilerPassTestCase +final class SecurityPassTest extends AbstractCompilerPassTestCase { protected function setUp(): void { parent::setUp(); - $this->setDefinition('security.authentication.provider.dao', new Definition()); $this->setDefinition('security.authentication.provider.rememberme', new Definition()); $this->setDefinition('security.authentication.provider.guard', new Definition()); - $this->setDefinition('security.authentication.provider.anonymous', new Definition()); $this->setDefinition('security.http_utils', new Definition()); $this->setDefinition('security.authentication.success_handler', new Definition()); $this->setDefinition('ibexa.config.resolver', new Definition()); @@ -38,19 +37,10 @@ protected function registerCompilerPass(ContainerBuilder $container): void $container->addCompilerPass(new SecurityPass()); } - public function testAlteredDaoAuthenticationProvider() + public function testAlteredDaoAuthenticationProvider(): void { $this->compile(); - $this->assertContainerBuilderHasServiceDefinitionWithMethodCall( - 'security.authentication.provider.dao', - 'setPermissionResolver', - [new Reference(PermissionResolver::class)] - ); - $this->assertContainerBuilderHasServiceDefinitionWithMethodCall( - 'security.authentication.provider.dao', - 'setUserService', - [new Reference(UserService::class)] - ); + $this->assertContainerBuilderHasServiceDefinitionWithMethodCall( 'security.authentication.provider.rememberme', 'setPermissionResolver', @@ -61,25 +51,10 @@ public function testAlteredDaoAuthenticationProvider() 'setPermissionResolver', [new Reference(PermissionResolver::class)] ); - $this->assertContainerBuilderHasServiceDefinitionWithMethodCall( - 'security.authentication.provider.anonymous', - 'setPermissionResolver', - [new Reference(PermissionResolver::class)] - ); - $this->assertContainerBuilderHasServiceDefinitionWithMethodCall( - 'security.authentication.provider.anonymous', - 'setConfigResolver', - [new Reference('ibexa.config.resolver')] - ); $this->assertContainerBuilderHasServiceDefinitionWithMethodCall( 'security.http_utils', 'setSiteAccess', [new Reference(SiteAccess::class)] ); - $this->assertContainerBuilderHasServiceDefinitionWithMethodCall( - 'security.authentication.success_handler', - 'setConfigResolver', - [new Reference('ibexa.config.resolver')] - ); } } diff --git a/tests/lib/.gitkeep b/tests/lib/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProviderTest.php b/tests/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProviderTest.php deleted file mode 100644 index dea321bd2d..0000000000 --- a/tests/lib/MVC/Symfony/Security/Authentication/AnonymousAuthenticationProviderTest.php +++ /dev/null @@ -1,57 +0,0 @@ -configResolver = $this->createMock(ConfigResolverInterface::class); - $this->permissionResolver = $this->createMock(PermissionResolver::class); - } - - public function testAuthenticate() - { - $anonymousUserId = 10; - $this->configResolver - ->expects(self::once()) - ->method('getParameter') - ->with('anonymous_user_id') - ->will(self::returnValue($anonymousUserId)); - - $this->permissionResolver - ->expects(self::once()) - ->method('setCurrentUserReference') - ->with(new UserReference($anonymousUserId)); - - $key = 'some_key'; - $authProvider = new AnonymousAuthenticationProvider($key); - $authProvider->setPermissionResolver($this->permissionResolver); - $authProvider->setConfigResolver($this->configResolver); - $anonymousToken = $this - ->getMockBuilder(AnonymousToken::class) - ->setConstructorArgs([$key, $this->createMock(UserInterface::class)]) - ->getMockForAbstractClass(); - self::assertSame($anonymousToken, $authProvider->authenticate($anonymousToken)); - } -} diff --git a/tests/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandlerTest.php b/tests/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandlerTest.php deleted file mode 100644 index 0f225f7849..0000000000 --- a/tests/lib/MVC/Symfony/Security/Authentication/DefaultAuthenticationSuccessHandlerTest.php +++ /dev/null @@ -1,65 +0,0 @@ -createMock(Matcher::class) - ); - $httpUtils = new HttpUtils(); - $httpUtils->setSiteAccess($siteAccess); - $successHandler = new DefaultAuthenticationSuccessHandler($httpUtils, []); - $successHandler->setFirewallName('test_firewall'); - - $refHandler = new ReflectionObject($successHandler); - $refOptions = $refHandler->getProperty('options'); - $refOptions->setAccessible(true); - $options = $refOptions->getValue($successHandler); - self::assertSame('/', $options['default_target_path']); - - $defaultPage = '/foo/bar'; - $configResolver = $this->createMock(ConfigResolverInterface::class); - $configResolver - ->expects(self::once()) - ->method('getParameter') - ->with('default_page') - ->will(self::returnValue($defaultPage)); - $successHandler->setConfigResolver($configResolver); - $successHandler->setEventDispatcher($this->createMock(EventDispatcherInterface::class)); - - $request = $this->createMock(Request::class); - $request - ->method('getSession') - ->willReturn($this->createMock(Session::class)); - - $request - ->method('getUriForPath') - ->willReturn($defaultPage); - - $successHandler->onAuthenticationSuccess($request, $this->createMock(TokenInterface::class)); - $options = $refOptions->getValue($successHandler); - self::assertSame($defaultPage, $options['default_target_path']); - } -} diff --git a/tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php b/tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php index 71b035a4f8..a4bd8d69f1 100644 --- a/tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php +++ b/tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Tests\Core\MVC\Symfony\Security\Authentication; @@ -18,13 +19,12 @@ use Symfony\Component\Security\Core\User\UserCheckerInterface; use Symfony\Component\Security\Core\User\UserInterface; -class RememberMeRepositoryAuthenticationProviderTest extends TestCase +final class RememberMeRepositoryAuthenticationProviderTest extends TestCase { - /** @var \Ibexa\Core\MVC\Symfony\Security\Authentication\RememberMeRepositoryAuthenticationProvider */ - private $authProvider; + private RememberMeRepositoryAuthenticationProvider $authProvider; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver|\PHPUnit\Framework\MockObject\MockObject */ - private $permissionResolver; + /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver&\PHPUnit\Framework\MockObject\MockObject */ + private PermissionResolver $permissionResolver; protected function setUp(): void { @@ -39,7 +39,7 @@ protected function setUp(): void $this->authProvider->setPermissionResolver($this->permissionResolver); } - public function testAuthenticateUnsupportedToken() + public function testAuthenticateUnsupportedToken(): void { $this->expectException(AuthenticationException::class); $this->expectExceptionMessage('The token is not supported by this authentication provider.'); @@ -51,7 +51,7 @@ public function testAuthenticateUnsupportedToken() $this->authProvider->authenticate($anonymousToken); } - public function testAuthenticateWrongProviderKey() + public function testAuthenticateWrongProviderKey(): void { $this->expectException(AuthenticationException::class); $this->expectExceptionMessage('The token is not supported by this authentication provider.'); @@ -74,7 +74,7 @@ public function testAuthenticateWrongProviderKey() $this->authProvider->authenticate($rememberMeToken); } - public function testAuthenticateWrongSecret() + public function testAuthenticateWrongSecret(): void { $this->expectException(AuthenticationException::class); @@ -100,7 +100,7 @@ public function testAuthenticateWrongSecret() $this->authProvider->authenticate($rememberMeToken); } - public function testAuthenticate() + public function testAuthenticate(): void { $apiUser = $this->createMock(ApiUser::class); $apiUser @@ -112,9 +112,10 @@ public function testAuthenticate() $rememberMeToken = new RememberMeToken($tokenUser, 'my provider secret', 'my secret'); $authenticatedToken = $this->authProvider->authenticate($rememberMeToken); + self::assertEquals( - [$rememberMeToken->getProviderKey(), $rememberMeToken->getSecret(), $rememberMeToken->getUsername()], - [$authenticatedToken->getProviderKey(), $authenticatedToken->getSecret(), $authenticatedToken->getUsername()] + [$rememberMeToken->getFirewallName(), $rememberMeToken->getSecret()], + [$authenticatedToken->getFirewallName(), $authenticatedToken->getSecret()] ); } } diff --git a/tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php b/tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php deleted file mode 100644 index 9b4de62073..0000000000 --- a/tests/lib/MVC/Symfony/Security/EventListener/SecurityListenerTest.php +++ /dev/null @@ -1,415 +0,0 @@ -configResolver = $this->createMock(ConfigResolverInterface::class); - $this->eventDispatcher = $this->createMock(EventDispatcherInterface::class); - $this->tokenStorage = $this->createMock(TokenStorageInterface::class); - $this->authChecker = $this->createMock(AuthorizationCheckerInterface::class); - $this->permissionResolver = $this->createMock(PermissionResolver::class); - $this->userService = $this->createMock(UserService::class); - $this->listener = $this->generateListener(); - } - - protected function generateListener() - { - return new SecurityListener( - $this->permissionResolver, - $this->userService, - $this->configResolver, - $this->eventDispatcher, - $this->tokenStorage, - $this->authChecker - ); - } - - public function testGetSubscribedEvents() - { - self::assertSame( - [ - SecurityEvents::INTERACTIVE_LOGIN => [ - ['onInteractiveLogin', 10], - ['checkSiteAccessPermission', 9], - ], - KernelEvents::REQUEST => ['onKernelRequest', 7], - ], - SecurityListener::getSubscribedEvents() - ); - } - - public function testOnInteractiveLoginAlreadyEzUser() - { - $user = $this->createMock(UserInterface::class); - $token = $this->createMock(TokenInterface::class); - $token - ->expects(self::once()) - ->method('getUser') - ->will(self::returnValue($user)); - $event = new BaseInteractiveLoginEvent(new Request(), $token); - - $this->eventDispatcher - ->expects(self::never()) - ->method('dispatch'); - - $this->listener->onInteractiveLogin($event); - } - - public function testOnInteractiveLoginNotUserObject() - { - $user = 'foobar'; - $token = $this->createMock(TokenInterface::class); - $token - ->expects(self::once()) - ->method('getUser') - ->will(self::returnValue($user)); - $event = new BaseInteractiveLoginEvent(new Request(), $token); - - $this->eventDispatcher - ->expects(self::never()) - ->method('dispatch'); - - $this->listener->onInteractiveLogin($event); - } - - public function testOnInteractiveLogin() - { - $user = $this->createMock(SymfonyUserInterface::class); - $token = $this->createMock(TokenInterface::class); - $token - ->expects(self::once()) - ->method('getUser') - ->will(self::returnValue($user)); - $token - ->expects(self::once()) - ->method('getRoleNames') - ->will(self::returnValue(['ROLE_USER'])); - $token - ->expects(self::once()) - ->method('getAttributes') - ->will(self::returnValue(['foo' => 'bar'])); - - $event = new BaseInteractiveLoginEvent(new Request(), $token); - - $anonymousUserId = 10; - $this->configResolver - ->expects(self::once()) - ->method('getParameter') - ->with('anonymous_user_id') - ->will(self::returnValue($anonymousUserId)); - - $apiUser = $this->createMock(APIUser::class); - $this->userService - ->expects(self::once()) - ->method('loadUser') - ->with($anonymousUserId) - ->will(self::returnValue($apiUser)); - - $this->permissionResolver - ->expects(self::once()) - ->method('setCurrentUserReference') - ->with($apiUser); - - $this->tokenStorage - ->expects(self::once()) - ->method('setToken') - ->with(self::isInstanceOf(InteractiveLoginToken::class)); - - $this->listener->onInteractiveLogin($event); - } - - public function testCheckSiteAccessPermissionDenied() - { - $this->expectException(UnauthorizedSiteAccessException::class); - - $user = $this->createMock(UserInterface::class); - $token = $this->createMock(TokenInterface::class); - $token - ->expects(self::once()) - ->method('getUser') - ->will(self::returnValue($user)); - - $request = new Request(); - $siteAccess = new SiteAccess('test'); - $request->attributes->set('siteaccess', $siteAccess); - - $this->authChecker - ->expects(self::once()) - ->method('isGranted') - ->with(self::equalTo(new Attribute('user', 'login', ['valueObject' => $siteAccess]))) - ->will(self::returnValue(false)); - - $this->listener->checkSiteAccessPermission(new BaseInteractiveLoginEvent($request, $token)); - } - - public function testCheckSiteAccessPermissionGranted() - { - $user = $this->createMock(UserInterface::class); - $token = $this->createMock(TokenInterface::class); - $token - ->expects(self::once()) - ->method('getUser') - ->will(self::returnValue($user)); - - $request = new Request(); - $siteAccess = new SiteAccess('test'); - $request->attributes->set('siteaccess', $siteAccess); - - $this->authChecker - ->expects(self::once()) - ->method('isGranted') - ->with(self::equalTo(new Attribute('user', 'login', ['valueObject' => $siteAccess]))) - ->will(self::returnValue(true)); - - // Nothing should happen or should be returned. - $this->listener->checkSiteAccessPermission(new BaseInteractiveLoginEvent($request, $token)); - } - - public function testCheckSiteAccessNotEzUser() - { - $user = $this->createMock(SymfonyUserInterface::class); - $token = $this->createMock(TokenInterface::class); - $token - ->expects(self::once()) - ->method('getUser') - ->will(self::returnValue($user)); - - $request = new Request(); - $siteAccess = new SiteAccess('test'); - $request->attributes->set('siteaccess', $siteAccess); - - $this->authChecker - ->expects(self::never()) - ->method('isGranted'); - - $this->listener->checkSiteAccessPermission(new BaseInteractiveLoginEvent($request, $token)); - } - - public function testCheckSiteAccessNoSiteAccess() - { - $user = $this->createMock(UserInterface::class); - $token = $this->createMock(TokenInterface::class); - $token - ->expects(self::once()) - ->method('getUser') - ->will(self::returnValue($user)); - - $this->authChecker - ->expects(self::never()) - ->method('isGranted'); - - $this->listener->checkSiteAccessPermission(new BaseInteractiveLoginEvent(new Request(), $token)); - } - - public function testOnKernelRequestSubRequest() - { - $event = new RequestEvent( - $this->createMock(HttpKernelInterface::class), - new Request(), - HttpKernelInterface::SUB_REQUEST - ); - - $this->tokenStorage - ->expects(self::never()) - ->method('getToken'); - $this->authChecker - ->expects(self::never()) - ->method('isGranted'); - - $this->listener->onKernelRequest($event); - } - - public function testOnKernelRequestSubRequestFragment() - { - $event = new RequestEvent( - $this->createMock(HttpKernelInterface::class), - Request::create('/_fragment'), - HttpKernelInterface::MASTER_REQUEST - ); - $this->configResolver - ->expects(self::never()) - ->method('getParameter'); - - $this->tokenStorage - ->expects(self::never()) - ->method('getToken'); - $this->authChecker - ->expects(self::never()) - ->method('isGranted'); - - $this->listener->onKernelRequest($event); - } - - public function testOnKernelRequestNoSiteAccess() - { - $event = new RequestEvent( - $this->createMock(HttpKernelInterface::class), - new Request(), - HttpKernelInterface::MASTER_REQUEST - ); - - $this->tokenStorage - ->expects(self::never()) - ->method('getToken'); - $this->authChecker - ->expects(self::never()) - ->method('isGranted'); - - $this->listener->onKernelRequest($event); - } - - public function testOnKernelRequestNullToken() - { - $request = new Request(); - $request->attributes->set('siteaccess', new SiteAccess('test')); - $event = new RequestEvent( - $this->createMock(HttpKernelInterface::class), - $request, - HttpKernelInterface::MASTER_REQUEST - ); - - $this->tokenStorage - ->expects(self::once()) - ->method('getToken') - ->will(self::returnValue(null)); - $this->authChecker - ->expects(self::never()) - ->method('isGranted'); - - $this->listener->onKernelRequest($event); - } - - public function testOnKernelRequestLoginRoute() - { - $request = new Request(); - $request->attributes->set('siteaccess', new SiteAccess('test')); - $request->attributes->set('_route', 'login'); - $event = new RequestEvent( - $this->createMock(HttpKernelInterface::class), - $request, - HttpKernelInterface::MASTER_REQUEST - ); - - $this->tokenStorage - ->expects(self::once()) - ->method('getToken') - ->will(self::returnValue(null)); - $this->authChecker - ->expects(self::never()) - ->method('isGranted'); - - $this->listener->onKernelRequest($event); - } - - public function testOnKernelRequestAccessDenied() - { - $this->expectException(UnauthorizedSiteAccessException::class); - - $request = new Request(); - $request->attributes->set('siteaccess', new SiteAccess('test')); - $event = new RequestEvent( - $this->createMock(HttpKernelInterface::class), - $request, - HttpKernelInterface::MASTER_REQUEST - ); - - $token = $this->createMock(TokenInterface::class); - $token - ->expects(self::any()) - ->method('getUsername') - ->will(self::returnValue('foo')); - - $this->tokenStorage - ->expects(self::once()) - ->method('getToken') - ->will(self::returnValue($token)); - $this->authChecker - ->expects(self::once()) - ->method('isGranted') - ->will(self::returnValue(false)); - - $this->listener->onKernelRequest($event); - } - - public function testOnKernelRequestAccessGranted() - { - $request = new Request(); - $request->attributes->set('siteaccess', new SiteAccess('test')); - $event = new RequestEvent( - $this->createMock(HttpKernelInterface::class), - $request, - HttpKernelInterface::MASTER_REQUEST - ); - - $token = $this->createMock(TokenInterface::class); - $token - ->expects(self::any()) - ->method('getUsername') - ->will(self::returnValue('foo')); - - $this->tokenStorage - ->expects(self::once()) - ->method('getToken') - ->will(self::returnValue($token)); - $this->authChecker - ->expects(self::once()) - ->method('isGranted') - ->will(self::returnValue(true)); - - // Nothing should happen or should be returned. - $this->listener->onKernelRequest($event); - } -} From 47261d9f171b13ad6bf5d9a45cbfbbdc177e71ca Mon Sep 17 00:00:00 2001 From: Nattfarinn Date: Wed, 5 Jun 2024 09:27:48 +0200 Subject: [PATCH 16/53] Coding standards --- phpstan-baseline.neon | 2 +- .../Mapper/ResolveVirtualFieldSubscriberTest.php | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 630bd46f3e..92e4a19fdc 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -51826,7 +51826,7 @@ parameters: path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\Persistence\\\\Legacy\\\\Content\\\\MapperTest\\:\\:getLanguageHandler\\(\\) should return Ibexa\\\\Core\\\\Persistence\\\\Legacy\\\\Content\\\\Language\\\\Handler but returns Ibexa\\\\Contracts\\\\Core\\\\Persistence\\\\Content\\\\Language\\\\Handler\\.$#" + message: "#^Method Ibexa\\\\Tests\\\\Core\\\\Persistence\\\\Legacy\\\\Content\\\\MapperTest\\:\\:getLanguageHandler\\(\\) should return Ibexa\\\\Core\\\\Persistence\\\\Legacy\\\\Content\\\\Language\\\\Handler&PHPUnit\\\\Framework\\\\MockObject\\\\MockObject but returns Ibexa\\\\Contracts\\\\Core\\\\Persistence\\\\Content\\\\Language\\\\Handler\\.$#" count: 1 path: tests/lib/Persistence/Legacy/Content/MapperTest.php diff --git a/tests/lib/Persistence/Legacy/Content/Mapper/ResolveVirtualFieldSubscriberTest.php b/tests/lib/Persistence/Legacy/Content/Mapper/ResolveVirtualFieldSubscriberTest.php index 38beb6aaa7..90d22e8f3d 100644 --- a/tests/lib/Persistence/Legacy/Content/Mapper/ResolveVirtualFieldSubscriberTest.php +++ b/tests/lib/Persistence/Legacy/Content/Mapper/ResolveVirtualFieldSubscriberTest.php @@ -33,7 +33,7 @@ public function testResolveVirtualField(): void $converterRegistry = $this->getConverterRegistry(); $contentGateway = $this->createMock(ContentGateway::class); - $contentGateway->expects($this->never())->method('insertNewField'); + $contentGateway->expects(self::never())->method('insertNewField'); $storageRegistry = $this->createMock(StorageRegistry::class); $storageRegistry->method('getStorage')->willReturn(new NullStorage()); @@ -83,7 +83,7 @@ public function testResolveVirtualExternalStorageField(): void $converterRegistry = $this->getConverterRegistry(); $contentGateway = $this->createMock(ContentGateway::class); - $contentGateway->expects($this->never())->method('insertNewField'); + $contentGateway->expects(self::never())->method('insertNewField'); $defaultFieldStorageMock = $this->createMock(DefaultDataFieldStorage::class); $defaultFieldStorageMock @@ -144,9 +144,9 @@ public function testPersistEmptyExternalStorageField(): void $converterRegistry = $this->getConverterRegistry(); $storage = $this->createMock(FieldStorage::class); - $storage->expects($this->never())->method('storeFieldData'); + $storage->expects(self::never())->method('storeFieldData'); - $storage->expects($this->once()) + $storage->expects(self::once()) ->method('getFieldData') ->willReturnCallback(static function (VersionInfo $versionInfo, Field $field) { $field->value->externalData = [ @@ -158,7 +158,7 @@ public function testPersistEmptyExternalStorageField(): void $storageRegistry->method('getStorage')->willReturn($storage); $contentGateway = $this->createMock(ContentGateway::class); - $contentGateway->expects($this->once())->method('insertNewField') + $contentGateway->expects(self::once())->method('insertNewField') ->willReturn(567); $eventDispatcher = $this->getEventDispatcher( @@ -210,19 +210,19 @@ public function testPersistExternalStorageField(): void $converterRegistry = $this->getConverterRegistry(); $storage = $this->createMock(FieldStorage::class); - $storage->expects($this->once()) + $storage->expects(self::once()) ->method('storeFieldData') ->willReturnCallback(static function (VersionInfo $versionInfo, Field $field) { $field->value->externalData = $field->value->data; }); - $storage->expects($this->once())->method('getFieldData'); + $storage->expects(self::once())->method('getFieldData'); $storageRegistry = $this->createMock(StorageRegistry::class); $storageRegistry->method('getStorage')->willReturn($storage); $contentGateway = $this->createMock(ContentGateway::class); - $contentGateway->expects($this->once())->method('insertNewField') + $contentGateway->expects(self::once())->method('insertNewField') ->willReturn(456); $eventDispatcher = $this->getEventDispatcher( From 6384e33966b30c2dacb7fac0aef7d4ea744c2777 Mon Sep 17 00:00:00 2001 From: Slawomir Dolzycki-Uchto Date: Wed, 5 Jun 2024 12:20:49 +0200 Subject: [PATCH 17/53] Update src/lib/Persistence/Legacy/Content/Mapper/ResolveVirtualFieldSubscriber.php Co-authored-by: Konrad Oboza --- .../Legacy/Content/Mapper/ResolveVirtualFieldSubscriber.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Persistence/Legacy/Content/Mapper/ResolveVirtualFieldSubscriber.php b/src/lib/Persistence/Legacy/Content/Mapper/ResolveVirtualFieldSubscriber.php index 36903a50f3..98b2f76c00 100644 --- a/src/lib/Persistence/Legacy/Content/Mapper/ResolveVirtualFieldSubscriber.php +++ b/src/lib/Persistence/Legacy/Content/Mapper/ResolveVirtualFieldSubscriber.php @@ -211,7 +211,7 @@ private function getDefaultValue(FieldDefinition $fieldDefinition): FieldValue private function getDefaultStorageValue(): StorageFieldValue { $storageValue = new StorageFieldValue(); - $storageValue->dataFloat = 0; + $storageValue->dataFloat = 0.0; $storageValue->dataInt = 0; $storageValue->dataText = ''; $storageValue->sortKeyInt = 0; From 42df0fb569b87dad8f881c10cc5a0db61b82bc9d Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 11 Jun 2024 19:55:26 +0200 Subject: [PATCH 18/53] [PHPStan] Dropped baseline files for unsupported PHP versions (#381) * [PHPStan] Dropped baseline files for unsupported PHP versions * [PHPStan] Moved still existing issues to the main baseline file --- phpstan-baseline-lte-8.1.neon | 6 ------ phpstan-baseline-lte-8.2.neon | 21 --------------------- phpstan-baseline.neon.php | 27 --------------------------- phpstan.neon.dist | 1 - 4 files changed, 55 deletions(-) delete mode 100644 phpstan-baseline-lte-8.1.neon delete mode 100644 phpstan-baseline-lte-8.2.neon delete mode 100644 phpstan-baseline.neon.php diff --git a/phpstan-baseline-lte-8.1.neon b/phpstan-baseline-lte-8.1.neon deleted file mode 100644 index dd1038f24c..0000000000 --- a/phpstan-baseline-lte-8.1.neon +++ /dev/null @@ -1,6 +0,0 @@ -parameters: - ignoreErrors: - - - message: "#^Class SensitiveParameterValue not found\\.$#" - count: 1 - path: tests/lib/Repository/User/PasswordHashServiceTest.php diff --git a/phpstan-baseline-lte-8.2.neon b/phpstan-baseline-lte-8.2.neon deleted file mode 100644 index af2834b3c0..0000000000 --- a/phpstan-baseline-lte-8.2.neon +++ /dev/null @@ -1,21 +0,0 @@ -parameters: - ignoreErrors: - - - message: "#^Offset 'uri' does not exist on array\\{timed_out\\: bool, blocked\\: bool, eof\\: bool, unread_bytes\\: int, stream_type\\: string, wrapper_type\\: string, wrapper_data\\: mixed, mode\\: string, \\.\\.\\.\\}\\.$#" - count: 1 - path: src/bundle/Core/Command/ResizeOriginalImagesCommand.php - - - - message: "#^Offset 'uri' does not exist on array\\{timed_out\\: bool, blocked\\: bool, eof\\: bool, unread_bytes\\: int, stream_type\\: string, wrapper_type\\: string, wrapper_data\\: mixed, mode\\: string, \\.\\.\\.\\}\\.$#" - count: 1 - path: src/bundle/Core/Imagine/IORepositoryResolver.php - - - - message: "#^Offset 'uri' does not exist on array\\{timed_out\\: bool, blocked\\: bool, eof\\: bool, unread_bytes\\: int, stream_type\\: string, wrapper_type\\: string, wrapper_data\\: mixed, mode\\: string, \\.\\.\\.\\}\\.$#" - count: 1 - path: src/bundle/Core/Imagine/PlaceholderProvider/GenericProvider.php - - - - message: "#^Offset 'uri' does not exist on array\\{timed_out\\: bool, blocked\\: bool, eof\\: bool, unread_bytes\\: int, stream_type\\: string, wrapper_type\\: string, wrapper_data\\: mixed, mode\\: string, \\.\\.\\.\\}\\.$#" - count: 1 - path: src/bundle/Core/Imagine/PlaceholderProvider/RemoteProvider.php diff --git a/phpstan-baseline.neon.php b/phpstan-baseline.neon.php deleted file mode 100644 index 662ea4edc3..0000000000 --- a/phpstan-baseline.neon.php +++ /dev/null @@ -1,27 +0,0 @@ - Date: Tue, 18 Jun 2024 14:41:17 +0200 Subject: [PATCH 19/53] IBX-8399: Moved RepositoryConfigurationProvider to Repository layer (#383) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For more details see https://issues.ibexa.co/browse/IBX-8399 and https://github.com/ibexa/core/pull/383 Key changes: * Changed Core Bundle ApiLoader Exception to be Repository Exceptions * Extracted an interface from RepositoryConfigurationProvider * Refactored StorageConnectionFactory to rely on ServiceProviderInterface * Added missing readonly keyword in relevant places * Deprecated RepositoryConfigurationProvider located in Core Bundle namespace * [Tests] Aligned tests with the changes * [PHPStan] Aligned baseline with the changes * [PHPStan] Updated baseline after PHPStan release --------- Co-Authored-By: Paweł Niedzielski Co-Authored-By: Konrad Oboza --- .../Exception/InvalidRepositoryException.php | 5 +- .../Exception/InvalidSearchEngine.php | 5 +- .../Exception/InvalidSearchEngineIndexer.php | 5 +- .../Exception/InvalidStorageEngine.php | 5 +- .../RepositoryConfigurationProvider.php | 55 ++----- .../Core/ApiLoader/RepositoryFactory.php | 6 +- .../Core/ApiLoader/SearchEngineFactory.php | 10 +- .../ApiLoader/SearchEngineIndexerFactory.php | 10 +- .../ApiLoader/StorageConnectionFactory.php | 45 +++--- .../Core/ApiLoader/StorageEngineFactory.php | 25 ++-- .../Core/Command/CleanupVersionsCommand.php | 17 +-- .../Compiler/StorageConnectionFactoryPass.php | 40 +++++ .../Core/Entity/EntityManagerFactory.php | 8 +- src/bundle/Core/IbexaCoreBundle.php | 2 + src/bundle/Core/Resources/config/papi.yml | 11 +- src/bundle/Core/Resources/config/services.yml | 12 +- .../Core/Resources/config/storage_engines.yml | 24 ++- .../ApiLoader/ConnectionFactory.php | 7 +- .../Resources/config/services.yml | 5 +- .../Command/InstallPlatformCommand.php | 7 +- .../Resources/config/services.yml | 2 +- ...positoryConfigurationProviderInterface.php | 42 ++++++ .../RepositoryConfigurationProvider.php | 78 ++++++++++ ...epositoryConfigFieldsGroupsListFactory.php | 14 +- ...epositoryConfigurationProviderTestCase.php | 49 ++++++ .../RepositoryConfigurationProviderTest.php | 98 ++++++------ .../StorageConnectionFactoryTest.php | 141 ++++++++++-------- .../ApiLoader/StorageEngineFactoryTest.php | 53 +++---- ...tyManagerFactoryServiceLocatorPassTest.php | 4 +- .../StorageConnectionFactoryPassTest.php | 59 ++++++++ .../Core/Entity/EntityManagerFactoryTest.php | 13 +- ...itoryConfigFieldsGroupsListFactoryTest.php | 24 ++- 32 files changed, 543 insertions(+), 338 deletions(-) create mode 100644 src/bundle/Core/DependencyInjection/Compiler/StorageConnectionFactoryPass.php create mode 100644 src/contracts/Container/ApiLoader/RepositoryConfigurationProviderInterface.php create mode 100644 src/lib/Base/Container/ApiLoader/RepositoryConfigurationProvider.php create mode 100644 tests/bundle/Core/ApiLoader/BaseRepositoryConfigurationProviderTestCase.php create mode 100644 tests/bundle/Core/DependencyInjection/Compiler/StorageConnectionFactoryPassTest.php diff --git a/src/bundle/Core/ApiLoader/Exception/InvalidRepositoryException.php b/src/bundle/Core/ApiLoader/Exception/InvalidRepositoryException.php index 0c3fe878f6..57cd9cb36f 100644 --- a/src/bundle/Core/ApiLoader/Exception/InvalidRepositoryException.php +++ b/src/bundle/Core/ApiLoader/Exception/InvalidRepositoryException.php @@ -4,11 +4,12 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Bundle\Core\ApiLoader\Exception; -use InvalidArgumentException; +use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; -class InvalidRepositoryException extends InvalidArgumentException +final class InvalidRepositoryException extends InvalidArgumentException { } diff --git a/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngine.php b/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngine.php index 1ddb12ba6b..322af57e17 100644 --- a/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngine.php +++ b/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngine.php @@ -4,11 +4,12 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Bundle\Core\ApiLoader\Exception; -use InvalidArgumentException; +use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; -class InvalidSearchEngine extends InvalidArgumentException +final class InvalidSearchEngine extends InvalidArgumentException { } diff --git a/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngineIndexer.php b/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngineIndexer.php index beef3cd514..4b70072c2f 100644 --- a/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngineIndexer.php +++ b/src/bundle/Core/ApiLoader/Exception/InvalidSearchEngineIndexer.php @@ -4,11 +4,12 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Bundle\Core\ApiLoader\Exception; -use InvalidArgumentException; +use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; -class InvalidSearchEngineIndexer extends InvalidArgumentException +final class InvalidSearchEngineIndexer extends InvalidArgumentException { } diff --git a/src/bundle/Core/ApiLoader/Exception/InvalidStorageEngine.php b/src/bundle/Core/ApiLoader/Exception/InvalidStorageEngine.php index fde4dfddd8..2b00562c2c 100644 --- a/src/bundle/Core/ApiLoader/Exception/InvalidStorageEngine.php +++ b/src/bundle/Core/ApiLoader/Exception/InvalidStorageEngine.php @@ -4,11 +4,12 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Bundle\Core\ApiLoader\Exception; -use InvalidArgumentException; +use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; -class InvalidStorageEngine extends InvalidArgumentException +final class InvalidStorageEngine extends InvalidArgumentException { } diff --git a/src/bundle/Core/ApiLoader/RepositoryConfigurationProvider.php b/src/bundle/Core/ApiLoader/RepositoryConfigurationProvider.php index eaab7d983d..3ebc747dd7 100644 --- a/src/bundle/Core/ApiLoader/RepositoryConfigurationProvider.php +++ b/src/bundle/Core/ApiLoader/RepositoryConfigurationProvider.php @@ -4,72 +4,39 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Bundle\Core\ApiLoader; -use Ibexa\Bundle\Core\ApiLoader\Exception\InvalidRepositoryException; -use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; /** - * The repository configuration provider. + * @deprecated 5.0.0 The "\Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider" class is deprecated, will be removed in 6.0.0. + * Inject {@see \Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface} from Dependency Injection Container instead. */ -class RepositoryConfigurationProvider +final readonly class RepositoryConfigurationProvider implements RepositoryConfigurationProviderInterface { - private const REPOSITORY_STORAGE = 'storage'; - private const REPOSITORY_CONNECTION = 'connection'; - private const DEFAULT_CONNECTION_NAME = 'default'; - - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; - - /** @var array */ - private $repositories; - - public function __construct(ConfigResolverInterface $configResolver, array $repositories) + public function __construct(private RepositoryConfigurationProviderInterface $configurationProvider) { - $this->configResolver = $configResolver; - $this->repositories = $repositories; } - /** - * @return array - * - * @throws \Ibexa\Bundle\Core\ApiLoader\Exception\InvalidRepositoryException - */ - public function getRepositoryConfig() + public function getRepositoryConfig(): array { - // Takes configured repository as the reference, if it exists. - // If not, the first configured repository is considered instead. - $repositoryAlias = $this->configResolver->getParameter('repository'); - $repositoryAlias = $repositoryAlias ?: $this->getDefaultRepositoryAlias(); - - if (empty($repositoryAlias) || !isset($this->repositories[$repositoryAlias])) { - throw new InvalidRepositoryException( - "Undefined Repository '$repositoryAlias'. Check if the Repository is configured in your project's ibexa.yaml." - ); - } - - return ['alias' => $repositoryAlias] + $this->repositories[$repositoryAlias]; + return $this->configurationProvider->getRepositoryConfig(); } public function getCurrentRepositoryAlias(): string { - return $this->getRepositoryConfig()['alias']; + return $this->configurationProvider->getCurrentRepositoryAlias(); } public function getDefaultRepositoryAlias(): ?string { - $aliases = array_keys($this->repositories); - - return array_shift($aliases); + return $this->configurationProvider->getDefaultRepositoryAlias(); } public function getStorageConnectionName(): string { - $repositoryConfig = $this->getRepositoryConfig(); - - return $repositoryConfig[self::REPOSITORY_STORAGE][self::REPOSITORY_CONNECTION] - ? $repositoryConfig[self::REPOSITORY_STORAGE][self::REPOSITORY_CONNECTION] - : self::DEFAULT_CONNECTION_NAME; + return $this->configurationProvider->getStorageConnectionName(); } } diff --git a/src/bundle/Core/ApiLoader/RepositoryFactory.php b/src/bundle/Core/ApiLoader/RepositoryFactory.php index 676131f33d..c47ddcc3f7 100644 --- a/src/bundle/Core/ApiLoader/RepositoryFactory.php +++ b/src/bundle/Core/ApiLoader/RepositoryFactory.php @@ -7,6 +7,7 @@ namespace Ibexa\Bundle\Core\ApiLoader; +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use Ibexa\Contracts\Core\Persistence\Filter\Content\Handler as ContentFilteringHandler; use Ibexa\Contracts\Core\Persistence\Filter\Location\Handler as LocationFilteringHandler; use Ibexa\Contracts\Core\Persistence\Handler as PersistenceHandler; @@ -59,6 +60,7 @@ public function __construct( $repositoryClass, array $policyMap, LanguageResolver $languageResolver, + private readonly RepositoryConfigurationProviderInterface $repositoryConfigurationProvider, LoggerInterface $logger = null ) { $this->configResolver = $configResolver; @@ -94,9 +96,9 @@ public function buildRepository( LocationFilteringHandler $locationFilteringHandler, PasswordValidatorInterface $passwordValidator, ConfigResolverInterface $configResolver, - NameSchemaServiceInterface $nameSchemaService + NameSchemaServiceInterface $nameSchemaService, ): Repository { - $config = $this->container->get(RepositoryConfigurationProvider::class)->getRepositoryConfig(); + $config = $this->repositoryConfigurationProvider->getRepositoryConfig(); return new $this->repositoryClass( $persistenceHandler, diff --git a/src/bundle/Core/ApiLoader/SearchEngineFactory.php b/src/bundle/Core/ApiLoader/SearchEngineFactory.php index 2fb9b26ab9..85debbdbb1 100644 --- a/src/bundle/Core/ApiLoader/SearchEngineFactory.php +++ b/src/bundle/Core/ApiLoader/SearchEngineFactory.php @@ -8,6 +8,7 @@ namespace Ibexa\Bundle\Core\ApiLoader; use Ibexa\Bundle\Core\ApiLoader\Exception\InvalidSearchEngine; +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use Ibexa\Contracts\Core\Search\Handler as SearchHandler; /** @@ -15,9 +16,6 @@ */ class SearchEngineFactory { - /** @var \Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider */ - private $repositoryConfigurationProvider; - /** * Hash of registered search engines. * Key is the search engine identifier, value search handler itself. @@ -26,9 +24,9 @@ class SearchEngineFactory */ protected $searchEngines = []; - public function __construct(RepositoryConfigurationProvider $repositoryConfigurationProvider) - { - $this->repositoryConfigurationProvider = $repositoryConfigurationProvider; + public function __construct( + private readonly RepositoryConfigurationProviderInterface $repositoryConfigurationProvider, + ) { } /** diff --git a/src/bundle/Core/ApiLoader/SearchEngineIndexerFactory.php b/src/bundle/Core/ApiLoader/SearchEngineIndexerFactory.php index 231e4637ac..3f879135c3 100644 --- a/src/bundle/Core/ApiLoader/SearchEngineIndexerFactory.php +++ b/src/bundle/Core/ApiLoader/SearchEngineIndexerFactory.php @@ -9,6 +9,7 @@ use Ibexa\Bundle\Core\ApiLoader\Exception\InvalidSearchEngine; use Ibexa\Bundle\Core\ApiLoader\Exception\InvalidSearchEngineIndexer; +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use Ibexa\Core\Search\Common\Indexer as SearchEngineIndexer; /** @@ -16,9 +17,6 @@ */ class SearchEngineIndexerFactory { - /** @var \Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider */ - private $repositoryConfigurationProvider; - /** * Hash of registered search engine indexers. * Key is the search engine identifier, value indexer itself. @@ -27,9 +25,9 @@ class SearchEngineIndexerFactory */ protected $searchEngineIndexers = []; - public function __construct(RepositoryConfigurationProvider $repositoryConfigurationProvider) - { - $this->repositoryConfigurationProvider = $repositoryConfigurationProvider; + public function __construct( + private readonly RepositoryConfigurationProviderInterface $repositoryConfigurationProvider, + ) { } /** diff --git a/src/bundle/Core/ApiLoader/StorageConnectionFactory.php b/src/bundle/Core/ApiLoader/StorageConnectionFactory.php index ce9b0d9cc7..a7a83db22b 100644 --- a/src/bundle/Core/ApiLoader/StorageConnectionFactory.php +++ b/src/bundle/Core/ApiLoader/StorageConnectionFactory.php @@ -7,49 +7,44 @@ namespace Ibexa\Bundle\Core\ApiLoader; +use Doctrine\DBAL\Connection; +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use InvalidArgumentException; -use Symfony\Component\DependencyInjection\ContainerAwareInterface; -use Symfony\Component\DependencyInjection\ContainerAwareTrait; +use Symfony\Contracts\Service\ServiceProviderInterface; -class StorageConnectionFactory implements ContainerAwareInterface +/** + * @internal + */ +final readonly class StorageConnectionFactory { - use ContainerAwareTrait; - - /** @var \Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider */ - protected $repositoryConfigurationProvider; - - public function __construct(RepositoryConfigurationProvider $repositoryConfigurationProvider) - { - $this->repositoryConfigurationProvider = $repositoryConfigurationProvider; + public function __construct( + private RepositoryConfigurationProviderInterface $repositoryConfigurationProvider, + private ServiceProviderInterface $serviceLocator, + ) { } /** * Returns database connection used by database handler. * * @throws \InvalidArgumentException - * - * @return \Doctrine\DBAL\Connection + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Psr\Container\ContainerExceptionInterface + * @throws \Psr\Container\NotFoundExceptionInterface */ - public function getConnection() + public function getConnection(): Connection { $repositoryConfig = $this->repositoryConfigurationProvider->getRepositoryConfig(); // Taking provided connection name if any. // Otherwise, just fallback to the default connection. - if (isset($repositoryConfig['storage']['connection'])) { - $doctrineConnectionId = sprintf('doctrine.dbal.%s_connection', $repositoryConfig['storage']['connection']); - } else { - // "database_connection" is an alias to the default connection, set up by DoctrineBundle. - $doctrineConnectionId = 'database_connection'; - } - - if (!$this->container->has($doctrineConnectionId)) { + $connectionName = $repositoryConfig['storage']['connection'] ?? 'default'; + if (!$this->serviceLocator->has($connectionName)) { throw new InvalidArgumentException( - "Invalid Doctrine connection '{$repositoryConfig['storage']['connection']}' for Repository '{$repositoryConfig['alias']}'." . - 'Valid connections are: ' . implode(', ', array_keys($this->container->getParameter('doctrine.connections'))) + "Invalid Doctrine connection '$connectionName' for Repository '{$repositoryConfig['alias']}'. " . + 'Valid connections are: ' . implode(', ', array_keys($this->serviceLocator->getProvidedServices())) ); } - return $this->container->get($doctrineConnectionId); + return $this->serviceLocator->get($connectionName); } } diff --git a/src/bundle/Core/ApiLoader/StorageEngineFactory.php b/src/bundle/Core/ApiLoader/StorageEngineFactory.php index 8040dfa5ce..836f83783a 100644 --- a/src/bundle/Core/ApiLoader/StorageEngineFactory.php +++ b/src/bundle/Core/ApiLoader/StorageEngineFactory.php @@ -8,6 +8,7 @@ namespace Ibexa\Bundle\Core\ApiLoader; use Ibexa\Bundle\Core\ApiLoader\Exception\InvalidStorageEngine; +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use Ibexa\Contracts\Core\Persistence\Handler as PersistenceHandler; /** @@ -15,31 +16,25 @@ */ class StorageEngineFactory { - /** @var \Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider */ - private $repositoryConfigurationProvider; - /** * Hash of registered storage engines. * Key is the storage engine identifier, value persistence handler itself. * * @var \Ibexa\Contracts\Core\Persistence\Handler[] */ - protected $storageEngines = []; + protected array $storageEngines = []; - public function __construct(RepositoryConfigurationProvider $repositoryConfigurationProvider) - { - $this->repositoryConfigurationProvider = $repositoryConfigurationProvider; + public function __construct( + private readonly RepositoryConfigurationProviderInterface $repositoryConfigurationProvider, + ) { } /** * Registers $persistenceHandler as a valid storage engine, with identifier $storageEngineIdentifier. * * Note: It is strongly recommenced to register a lazy persistent handler. - * - * @param \Ibexa\Contracts\Core\Persistence\Handler $persistenceHandler - * @param string $storageEngineIdentifier */ - public function registerStorageEngine(PersistenceHandler $persistenceHandler, $storageEngineIdentifier) + public function registerStorageEngine(PersistenceHandler $persistenceHandler, string $storageEngineIdentifier): void { $this->storageEngines[$storageEngineIdentifier] = $persistenceHandler; } @@ -47,7 +42,7 @@ public function registerStorageEngine(PersistenceHandler $persistenceHandler, $s /** * @return \Ibexa\Contracts\Core\Persistence\Handler[] */ - public function getStorageEngines() + public function getStorageEngines(): array { return $this->storageEngines; } @@ -55,7 +50,7 @@ public function getStorageEngines() /** * Builds storage engine identified by $storageEngineIdentifier (the "alias" attribute in the service tag). * - * @throws \Ibexa\Bundle\Core\ApiLoader\Exception\InvalidStorageEngine + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function buildStorageEngine(): PersistenceHandler { @@ -73,9 +68,9 @@ public function buildStorageEngine(): PersistenceHandler if (!isset($this->storageEngines[$storageEngineAlias])) { throw new InvalidStorageEngine( - "Invalid storage engine '{$storageEngineAlias}'. " . + "Invalid storage engine '$storageEngineAlias'. " . 'Could not find any service tagged with ibexa.storage ' . - "with alias {$storageEngineAlias}." + "with alias $storageEngineAlias." ); } diff --git a/src/bundle/Core/Command/CleanupVersionsCommand.php b/src/bundle/Core/Command/CleanupVersionsCommand.php index cec0bffd7b..3168db825d 100644 --- a/src/bundle/Core/Command/CleanupVersionsCommand.php +++ b/src/bundle/Core/Command/CleanupVersionsCommand.php @@ -9,11 +9,10 @@ use Doctrine\DBAL\Connection; use Exception; -use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider; +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; -use PDO; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\ProgressBar; use Symfony\Component\Console\Input\InputInterface; @@ -44,18 +43,15 @@ class CleanupVersionsCommand extends Command implements BackwardCompatibleComman self::VERSION_PUBLISHED => VersionInfo::STATUS_PUBLISHED, ]; - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - private $repository; + private readonly Repository $repository; - /** @var \Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider */ - private $repositoryConfigurationProvider; + private readonly RepositoryConfigurationProviderInterface $repositoryConfigurationProvider; - /** @var \Doctrine\DBAL\Driver\Connection */ - private $connection; + private readonly Connection $connection; public function __construct( Repository $repository, - RepositoryConfigurationProvider $repositoryConfigurationProvider, + RepositoryConfigurationProviderInterface $repositoryConfigurationProvider, Connection $connection ) { $this->repository = $repository; @@ -275,9 +271,10 @@ protected function getObjectsIds($keep, $status, $excludedContentTypes = []) )->setParameter(':contentTypes', $excludedContentTypes, Connection::PARAM_STR_ARRAY); } + /** @var \Doctrine\DBAL\ForwardCompatibility\Result $stmt */ $stmt = $query->execute(); - return $stmt->fetchAll(PDO::FETCH_COLUMN); + return $stmt->fetchFirstColumn(); } /** diff --git a/src/bundle/Core/DependencyInjection/Compiler/StorageConnectionFactoryPass.php b/src/bundle/Core/DependencyInjection/Compiler/StorageConnectionFactoryPass.php new file mode 100644 index 0000000000..9647c2d556 --- /dev/null +++ b/src/bundle/Core/DependencyInjection/Compiler/StorageConnectionFactoryPass.php @@ -0,0 +1,40 @@ +has(StorageConnectionFactory::class) || !$container->hasParameter('doctrine.connections')) { + return; + } + + /** @var array $doctrineConnections a map of [ connection_name => connection_service_id ] */ + $doctrineConnections = $container->getParameter('doctrine.connections'); + $doctrineConnectionServices = array_map( + static fn (string $serviceId): Reference => new Reference($serviceId), + $doctrineConnections + ); + $storageConnectionFactory = $container->findDefinition(StorageConnectionFactory::class); + $storageConnectionFactory->replaceArgument( + '$serviceLocator', + ServiceLocatorTagPass::register($container, $doctrineConnectionServices) + ); + } +} diff --git a/src/bundle/Core/Entity/EntityManagerFactory.php b/src/bundle/Core/Entity/EntityManagerFactory.php index a9730fb14e..205cd9c895 100644 --- a/src/bundle/Core/Entity/EntityManagerFactory.php +++ b/src/bundle/Core/Entity/EntityManagerFactory.php @@ -9,7 +9,7 @@ namespace Ibexa\Bundle\Core\Entity; use Doctrine\ORM\EntityManagerInterface; -use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider; +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use Symfony\Component\DependencyInjection\ServiceLocator; /** @@ -17,9 +17,6 @@ */ class EntityManagerFactory { - /** @var \Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider */ - private $repositoryConfigurationProvider; - /** @var \Symfony\Component\DependencyInjection\ServiceLocator */ private $serviceLocator; @@ -30,12 +27,11 @@ class EntityManagerFactory private $entityManagers; public function __construct( - RepositoryConfigurationProvider $repositoryConfigurationProvider, + private readonly RepositoryConfigurationProviderInterface $repositoryConfigurationProvider, ServiceLocator $serviceLocator, string $defaultConnection, array $entityManagers ) { - $this->repositoryConfigurationProvider = $repositoryConfigurationProvider; $this->serviceLocator = $serviceLocator; $this->defaultConnection = $defaultConnection; $this->entityManagers = $entityManagers; diff --git a/src/bundle/Core/IbexaCoreBundle.php b/src/bundle/Core/IbexaCoreBundle.php index 505370aec6..cfe4ccd655 100644 --- a/src/bundle/Core/IbexaCoreBundle.php +++ b/src/bundle/Core/IbexaCoreBundle.php @@ -30,6 +30,7 @@ use Ibexa\Bundle\Core\DependencyInjection\Compiler\SessionConfigurationPass; use Ibexa\Bundle\Core\DependencyInjection\Compiler\SiteAccessMatcherRegistryPass; use Ibexa\Bundle\Core\DependencyInjection\Compiler\SlugConverterConfigurationPass; +use Ibexa\Bundle\Core\DependencyInjection\Compiler\StorageConnectionFactoryPass; use Ibexa\Bundle\Core\DependencyInjection\Compiler\StorageConnectionPass; use Ibexa\Bundle\Core\DependencyInjection\Compiler\TranslationCollectorPass; use Ibexa\Bundle\Core\DependencyInjection\Compiler\URLHandlerPass; @@ -88,6 +89,7 @@ public function build(ContainerBuilder $container): void // Storage passes $container->addCompilerPass(new ExternalStorageRegistryPass()); + $container->addCompilerPass(new StorageConnectionFactoryPass()); // Legacy Storage passes $container->addCompilerPass(new FieldValueConverterRegistryPass()); $container->addCompilerPass(new RoleLimitationConverterPass()); diff --git a/src/bundle/Core/Resources/config/papi.yml b/src/bundle/Core/Resources/config/papi.yml index 2669a3f1bd..efee2a8a24 100644 --- a/src/bundle/Core/Resources/config/papi.yml +++ b/src/bundle/Core/Resources/config/papi.yml @@ -16,33 +16,30 @@ services: - Ibexa\Core\Repository\Repository - '%ibexa.api.role.policy_map%' - '@Ibexa\Contracts\Core\Repository\LanguageResolver' + - '@Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface' - "@?logger" calls: - [setContainer, ["@service_container"]] Ibexa\Bundle\Core\ApiLoader\StorageEngineFactory: - class: Ibexa\Bundle\Core\ApiLoader\StorageEngineFactory arguments: - - '@Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider' + $repositoryConfigurationProvider: '@Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface' ibexa.api.persistence_handler: #To disable cache, switch alias to Ibexa\Contracts\Core\Persistence\Handler alias: Ibexa\Core\Persistence\Cache\Handler Ibexa\Contracts\Core\Persistence\Handler: - class: Ibexa\Contracts\Core\Persistence\Handler factory: ['@Ibexa\Bundle\Core\ApiLoader\StorageEngineFactory', buildStorageEngine] public: false Ibexa\Bundle\Core\ApiLoader\SearchEngineFactory: - class: Ibexa\Bundle\Core\ApiLoader\SearchEngineFactory arguments: - - '@Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider' + $repositoryConfigurationProvider: '@Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface' Ibexa\Bundle\Core\ApiLoader\SearchEngineIndexerFactory: - class: Ibexa\Bundle\Core\ApiLoader\SearchEngineIndexerFactory arguments: - - '@Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider' + $repositoryConfigurationProvider: '@Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface' ibexa.spi.search: alias: Ibexa\Contracts\Core\Search\VersatileHandler diff --git a/src/bundle/Core/Resources/config/services.yml b/src/bundle/Core/Resources/config/services.yml index 0af04b30a3..a8a954686b 100644 --- a/src/bundle/Core/Resources/config/services.yml +++ b/src/bundle/Core/Resources/config/services.yml @@ -232,9 +232,8 @@ services: - "@translator" Ibexa\Core\Helper\FieldsGroups\RepositoryConfigFieldsGroupsListFactory: - class: Ibexa\Core\Helper\FieldsGroups\RepositoryConfigFieldsGroupsListFactory arguments: - - '@Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider' + $configProvider: '@Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface' Ibexa\Core\QueryType\QueryParameterContentViewQueryTypeMapper: class: Ibexa\Core\QueryType\QueryParameterContentViewQueryTypeMapper @@ -316,11 +315,10 @@ services: - { name: console.command } Ibexa\Bundle\Core\Command\CleanupVersionsCommand: - class: Ibexa\Bundle\Core\Command\CleanupVersionsCommand arguments: - - '@Ibexa\Core\Event\Repository' - - '@Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider' - - '@ibexa.persistence.connection' + $repository: '@Ibexa\Core\Event\Repository' + $repositoryConfigurationProvider: '@Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface' + $connection: '@ibexa.persistence.connection' tags: - { name: console.command } @@ -365,7 +363,7 @@ services: ibexa.doctrine.orm.entity_manager_factory: class: Ibexa\Bundle\Core\Entity\EntityManagerFactory arguments: - $repositoryConfigurationProvider: '@Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider' + $repositoryConfigurationProvider: '@Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface' $defaultConnection: '%doctrine.default_connection%' $entityManagers: '%doctrine.entity_managers%' diff --git a/src/bundle/Core/Resources/config/storage_engines.yml b/src/bundle/Core/Resources/config/storage_engines.yml index ad6c90bd16..617386c6a7 100644 --- a/src/bundle/Core/Resources/config/storage_engines.yml +++ b/src/bundle/Core/Resources/config/storage_engines.yml @@ -1,17 +1,25 @@ services: + Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface: + alias: Ibexa\Core\Base\Container\ApiLoader\RepositoryConfigurationProvider + + Ibexa\Core\Base\Container\ApiLoader\RepositoryConfigurationProvider: + arguments: + $configResolver: '@Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface' + $repositories: '%ibexa.repositories%' + Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider: - public: true # @todo should be private - class: Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider + deprecated: + package: 'ibexa/core' + version: '5.0' + message: 'Since ibexa/core 5.0: The "%service_id%" service is deprecated and will be removed in 6.0. Use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface instead' arguments: - - '@ibexa.config.resolver' - - '%ibexa.repositories%' + $configurationProvider: '@Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface' Ibexa\Bundle\Core\ApiLoader\StorageConnectionFactory: - class: Ibexa\Bundle\Core\ApiLoader\StorageConnectionFactory + autowire: true + autoconfigure: true arguments: - - '@Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider' - calls: - - [setContainer, ["@service_container"]] + $serviceLocator: ~ ibexa.persistence.connection: public: true # @todo should be private diff --git a/src/bundle/LegacySearchEngine/ApiLoader/ConnectionFactory.php b/src/bundle/LegacySearchEngine/ApiLoader/ConnectionFactory.php index bca14ec78a..9686a8505c 100644 --- a/src/bundle/LegacySearchEngine/ApiLoader/ConnectionFactory.php +++ b/src/bundle/LegacySearchEngine/ApiLoader/ConnectionFactory.php @@ -7,7 +7,7 @@ namespace Ibexa\Bundle\LegacySearchEngine\ApiLoader; -use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider; +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use InvalidArgumentException; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerAwareTrait; @@ -16,10 +16,9 @@ class ConnectionFactory implements ContainerAwareInterface { use ContainerAwareTrait; - /** @var \Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider */ - protected $repositoryConfigurationProvider; + protected RepositoryConfigurationProviderInterface $repositoryConfigurationProvider; - public function __construct(RepositoryConfigurationProvider $repositoryConfigurationProvider) + public function __construct(RepositoryConfigurationProviderInterface $repositoryConfigurationProvider) { $this->repositoryConfigurationProvider = $repositoryConfigurationProvider; } diff --git a/src/bundle/LegacySearchEngine/Resources/config/services.yml b/src/bundle/LegacySearchEngine/Resources/config/services.yml index 84eb05d611..832acb6156 100644 --- a/src/bundle/LegacySearchEngine/Resources/config/services.yml +++ b/src/bundle/LegacySearchEngine/Resources/config/services.yml @@ -1,10 +1,9 @@ services: Ibexa\Bundle\LegacySearchEngine\ApiLoader\ConnectionFactory: - class: Ibexa\Bundle\LegacySearchEngine\ApiLoader\ConnectionFactory arguments: - - '@Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider' + $repositoryConfigurationProvider: '@Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface' calls: - - [setContainer, ["@service_container"]] + - [setContainer, ['@service_container']] ibexa.api.search_engine.legacy.connection: class: Doctrine\DBAL\Connection diff --git a/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php b/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php index f55c2ec35f..a1d6a5a98a 100644 --- a/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php +++ b/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php @@ -8,8 +8,8 @@ namespace Ibexa\Bundle\RepositoryInstaller\Command; use Doctrine\DBAL\Connection; -use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider; use Ibexa\Bundle\Core\Command\BackwardCompatibleCommand; +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use Psr\Cache\CacheItemPoolInterface; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; @@ -38,8 +38,7 @@ final class InstallPlatformCommand extends Command implements BackwardCompatible /** @var \Ibexa\Bundle\RepositoryInstaller\Installer\Installer[] */ private $installers = []; - /** @var \Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider */ - private $repositoryConfigurationProvider; + private RepositoryConfigurationProviderInterface $repositoryConfigurationProvider; public const EXIT_GENERAL_DATABASE_ERROR = 4; public const EXIT_PARAMETERS_NOT_FOUND = 5; @@ -51,7 +50,7 @@ public function __construct( array $installers, CacheItemPoolInterface $cachePool, string $environment, - RepositoryConfigurationProvider $repositoryConfigurationProvider + RepositoryConfigurationProviderInterface $repositoryConfigurationProvider ) { $this->connection = $connection; $this->installers = $installers; diff --git a/src/bundle/RepositoryInstaller/Resources/config/services.yml b/src/bundle/RepositoryInstaller/Resources/config/services.yml index 965404750b..6fad69a446 100644 --- a/src/bundle/RepositoryInstaller/Resources/config/services.yml +++ b/src/bundle/RepositoryInstaller/Resources/config/services.yml @@ -22,7 +22,7 @@ services: $installers: [] $cachePool: '@ibexa.cache_pool' $environment: "%kernel.environment%" - $repositoryConfigurationProvider: '@Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider' + $repositoryConfigurationProvider: '@Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface' tags: - { name: console.command } diff --git a/src/contracts/Container/ApiLoader/RepositoryConfigurationProviderInterface.php b/src/contracts/Container/ApiLoader/RepositoryConfigurationProviderInterface.php new file mode 100644 index 0000000000..df54301c35 --- /dev/null +++ b/src/contracts/Container/ApiLoader/RepositoryConfigurationProviderInterface.php @@ -0,0 +1,42 @@ +} + * @phpstan-type TRepositorySearchConfiguration array{engine: string, connection: string} + * @phpstan-type TRepositoryConfiguration array{ + * alias: string, + * storage: TRepositoryStorageConfiguration, + * search: TRepositorySearchConfiguration, + * fields_groups: array{default: string, list: string[]}, + * options: array + * } + */ +interface RepositoryConfigurationProviderInterface +{ + /** + * @phpstan-return TRepositoryConfiguration + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + */ + public function getRepositoryConfig(): array; + + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + */ + public function getCurrentRepositoryAlias(): string; + + public function getDefaultRepositoryAlias(): ?string; + + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + */ + public function getStorageConnectionName(): string; +} diff --git a/src/lib/Base/Container/ApiLoader/RepositoryConfigurationProvider.php b/src/lib/Base/Container/ApiLoader/RepositoryConfigurationProvider.php new file mode 100644 index 0000000000..2cf01ea22f --- /dev/null +++ b/src/lib/Base/Container/ApiLoader/RepositoryConfigurationProvider.php @@ -0,0 +1,78 @@ + + * } + * @phpstan-type TRepositoryListConfiguration array + */ +final readonly class RepositoryConfigurationProvider implements RepositoryConfigurationProviderInterface +{ + private const string REPOSITORY_STORAGE = 'storage'; + private const string REPOSITORY_CONNECTION = 'connection'; + private const string DEFAULT_CONNECTION_NAME = 'default'; + + /** + * @phpstan-param TRepositoryListConfiguration $repositories + */ + public function __construct( + private ConfigResolverInterface $configResolver, + private array $repositories, + ) { + } + + public function getRepositoryConfig(): array + { + // Takes configured repository as the reference, if it exists. + // If not, the first configured repository is considered instead. + /** @var string|null $repositoryAlias */ + $repositoryAlias = $this->configResolver->getParameter('repository'); + $repositoryAlias = $repositoryAlias ?? $this->getDefaultRepositoryAlias(); + + if (empty($repositoryAlias) || !isset($this->repositories[$repositoryAlias])) { + throw new InvalidRepositoryException( + "Undefined Repository '$repositoryAlias'. Check if the Repository is configured in your project's ibexa.yaml." + ); + } + + return ['alias' => $repositoryAlias] + $this->repositories[$repositoryAlias]; + } + + public function getCurrentRepositoryAlias(): string + { + return $this->getRepositoryConfig()['alias']; + } + + public function getDefaultRepositoryAlias(): ?string + { + $aliases = array_keys($this->repositories); + + return array_shift($aliases); + } + + public function getStorageConnectionName(): string + { + $repositoryConfig = $this->getRepositoryConfig(); + + return $repositoryConfig[self::REPOSITORY_STORAGE][self::REPOSITORY_CONNECTION] ?? self::DEFAULT_CONNECTION_NAME; + } +} diff --git a/src/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactory.php b/src/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactory.php index 9c44ca199e..4d1be2ac68 100644 --- a/src/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactory.php +++ b/src/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactory.php @@ -7,23 +7,25 @@ namespace Ibexa\Core\Helper\FieldsGroups; -use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider; +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use Symfony\Contracts\Translation\TranslatorInterface; /** * Builds a SettingsFieldGroupsList. */ -final class RepositoryConfigFieldsGroupsListFactory +final readonly class RepositoryConfigFieldsGroupsListFactory { - /** @var \Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider */ - private $configProvider; + private RepositoryConfigurationProviderInterface $configProvider; - public function __construct(RepositoryConfigurationProvider $configProvider) + public function __construct(RepositoryConfigurationProviderInterface $configProvider) { $this->configProvider = $configProvider; } - public function build(TranslatorInterface $translator) + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + */ + public function build(TranslatorInterface $translator): FieldsGroupsList { $repositoryConfig = $this->configProvider->getRepositoryConfig(); diff --git a/tests/bundle/Core/ApiLoader/BaseRepositoryConfigurationProviderTestCase.php b/tests/bundle/Core/ApiLoader/BaseRepositoryConfigurationProviderTestCase.php new file mode 100644 index 0000000000..cf23826e4f --- /dev/null +++ b/tests/bundle/Core/ApiLoader/BaseRepositoryConfigurationProviderTestCase.php @@ -0,0 +1,49 @@ + ['engine' => 'foo', 'connection' => 'some_connection'], + 'search' => ['engine' => 'foo_search', 'connection' => 'some_connection'], + 'fields_groups' => ['default' => 'meta', 'list' => ['content', 'meta']], + 'options' => [], + ]; + protected const array REPOSITORIES_CONFIG = [ + self::MAIN_REPOSITORY_ALIAS => self::MAIN_REPOSITORY_CONFIG, + 'another' => [ + 'storage' => ['engine' => 'bar', 'connection' => 'bar_connection'], + 'search' => ['engine' => 'bar_search', 'connection' => 'bar_search_connection'], + 'fields_groups' => ['default' => 'content', 'list' => ['meta', 'content']], + 'options' => [], + ], + ]; + + /** + * @phpstan-return TRepositoryListItemConfiguration + */ + protected function buildNormalizedSingleRepositoryConfig( + string $storageEngine, + string $storageConnection = 'default_connection' + ): array { + return [ + 'storage' => [ + 'engine' => $storageEngine, + 'connection' => $storageConnection, + ], + ] + self::MAIN_REPOSITORY_CONFIG; + } +} diff --git a/tests/bundle/Core/ApiLoader/RepositoryConfigurationProviderTest.php b/tests/bundle/Core/ApiLoader/RepositoryConfigurationProviderTest.php index 4df30aabd6..29377eea48 100644 --- a/tests/bundle/Core/ApiLoader/RepositoryConfigurationProviderTest.php +++ b/tests/bundle/Core/ApiLoader/RepositoryConfigurationProviderTest.php @@ -4,74 +4,68 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Tests\Bundle\Core\ApiLoader; use Ibexa\Bundle\Core\ApiLoader\Exception\InvalidRepositoryException; -use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; -use PHPUnit\Framework\TestCase; +use Ibexa\Core\Base\Container\ApiLoader\RepositoryConfigurationProvider; +use PHPUnit\Framework\MockObject\MockObject; -class RepositoryConfigurationProviderTest extends TestCase +/** + * @covers \Ibexa\Core\Base\Container\ApiLoader\RepositoryConfigurationProvider + * + * @phpstan-import-type TRepositoryListConfiguration from \Ibexa\Core\Base\Container\ApiLoader\RepositoryConfigurationProvider + */ +final class RepositoryConfigurationProviderTest extends BaseRepositoryConfigurationProviderTestCase { - public function testGetRepositoryConfigSpecifiedRepository() + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + */ + public function testGetRepositoryConfigSpecifiedRepository(): void { $configResolver = $this->getConfigResolverMock(); - $repositoryAlias = 'main'; - $repositoryConfig = [ - 'engine' => 'foo', - 'connection' => 'some_connection', - ]; - $repositories = [ - $repositoryAlias => $repositoryConfig, - 'another' => [ - 'engine' => 'bar', - ], - ]; - $provider = new RepositoryConfigurationProvider($configResolver, $repositories); + // providing normalized configuration, expected at this point + // see \Ibexa\Bundle\Core\DependencyInjection\Configuration::addRepositoriesSection for more details + $provider = new RepositoryConfigurationProvider($configResolver, self::REPOSITORIES_CONFIG); $configResolver - ->expects(self::once()) ->method('getParameter') ->with('repository') - ->will(self::returnValue($repositoryAlias)); + ->willReturn(self::MAIN_REPOSITORY_ALIAS); self::assertSame( - ['alias' => $repositoryAlias] + $repositoryConfig, + ['alias' => self::MAIN_REPOSITORY_ALIAS] + self::MAIN_REPOSITORY_CONFIG, $provider->getRepositoryConfig() ); } - public function testGetRepositoryConfigNotSpecifiedRepository() + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + */ + public function testGetRepositoryConfigNotSpecifiedRepository(): void { $configResolver = $this->getConfigResolverMock(); - $repositoryAlias = 'main'; - $repositoryConfig = [ - 'engine' => 'foo', - 'connection' => 'some_connection', - ]; - $repositories = [ - $repositoryAlias => $repositoryConfig, - 'another' => [ - 'engine' => 'bar', - ], - ]; - $provider = new RepositoryConfigurationProvider($configResolver, $repositories); + $provider = new RepositoryConfigurationProvider($configResolver, self::REPOSITORIES_CONFIG); $configResolver - ->expects(self::once()) ->method('getParameter') ->with('repository') - ->will(self::returnValue(null)); + ->willReturn(null); self::assertSame( - ['alias' => $repositoryAlias] + $repositoryConfig, + ['alias' => self::MAIN_REPOSITORY_ALIAS] + self::MAIN_REPOSITORY_CONFIG, $provider->getRepositoryConfig() ); } /** * @dataProvider providerForRepositories + * + * @phpstan-param TRepositoryListConfiguration $repositories + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function testGetRepositoryConfigUndefinedRepository(array $repositories): void { @@ -80,17 +74,20 @@ public function testGetRepositoryConfigUndefinedRepository(array $repositories): $configResolver = $this->getConfigResolverMock(); $configResolver - ->expects(self::once()) ->method('getParameter') ->with('repository') - ->will(self::returnValue('undefined_repository')); + ->willReturn('undefined_repository'); $provider = new RepositoryConfigurationProvider($configResolver, $repositories); - $provider->getRepositoryConfig(); + self::assertSame([], $provider->getRepositoryConfig()); } /** * @dataProvider providerForRepositories + * + * @phpstan-param TRepositoryListConfiguration $repositories + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function testGetDefaultRepositoryAlias(array $repositories): void { @@ -99,11 +96,13 @@ public function testGetDefaultRepositoryAlias(array $repositories): void $provider = new RepositoryConfigurationProvider($configResolver, $repositories); $provider->getRepositoryConfig(); - self::assertSame('first', $provider->getDefaultRepositoryAlias()); + self::assertSame(self::MAIN_REPOSITORY_ALIAS, $provider->getDefaultRepositoryAlias()); } /** * @dataProvider providerForRepositories + * + * @phpstan-param TRepositoryListConfiguration $repositories */ public function testGetCurrentRepositoryAlias(array $repositories): void { @@ -112,29 +111,20 @@ public function testGetCurrentRepositoryAlias(array $repositories): void $provider = new RepositoryConfigurationProvider($configResolver, $repositories); $provider->getRepositoryConfig(); - self::assertSame('first', $provider->getCurrentRepositoryAlias()); + self::assertSame(self::MAIN_REPOSITORY_ALIAS, $provider->getCurrentRepositoryAlias()); } + /** + * @phpstan-return list> $repositories + */ public function providerForRepositories(): array { return [ - [ - [ - 'first' => [ - 'engine' => 'foo', - ], - 'second' => [ - 'engine' => 'bar', - ], - ], - ], + [self::REPOSITORIES_CONFIG], ]; } - /** - * @return \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface - */ - protected function getConfigResolverMock() + protected function getConfigResolverMock(): ConfigResolverInterface & MockObject { return $this->createMock(ConfigResolverInterface::class); } diff --git a/tests/bundle/Core/ApiLoader/StorageConnectionFactoryTest.php b/tests/bundle/Core/ApiLoader/StorageConnectionFactoryTest.php index 3fb7cc5de1..b3b14a61a3 100644 --- a/tests/bundle/Core/ApiLoader/StorageConnectionFactoryTest.php +++ b/tests/bundle/Core/ApiLoader/StorageConnectionFactoryTest.php @@ -4,30 +4,29 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Tests\Bundle\Core\ApiLoader; +use Doctrine\DBAL\Connection; use Ibexa\Bundle\Core\ApiLoader\Exception\InvalidRepositoryException; -use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider; use Ibexa\Bundle\Core\ApiLoader\StorageConnectionFactory; +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; -use PHPUnit\Framework\TestCase; +use Ibexa\Core\Base\Container\ApiLoader\RepositoryConfigurationProvider; +use PHPUnit\Framework\MockObject\MockObject; use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\ServiceLocator; -class StorageConnectionFactoryTest extends TestCase +final class StorageConnectionFactoryTest extends BaseRepositoryConfigurationProviderTestCase { /** * @dataProvider getConnectionProvider */ - public function testGetConnection($repositoryAlias, $doctrineConnection) + public function testGetConnection(string $repositoryAlias, string $doctrineConnection): void { $repositories = [ - $repositoryAlias => [ - 'storage' => [ - 'engine' => 'legacy', - 'connection' => $doctrineConnection, - ], - ], + $repositoryAlias => $this->buildNormalizedSingleRepositoryConfig('legacy', $doctrineConnection), ]; $configResolver = $this->getConfigResolverMock(); @@ -35,31 +34,23 @@ public function testGetConnection($repositoryAlias, $doctrineConnection) ->expects(self::once()) ->method('getParameter') ->with('repository') - ->will(self::returnValue($repositoryAlias)); - - $container = $this->getContainerMock(); - $container - ->expects(self::once()) - ->method('has') - ->with("doctrine.dbal.{$doctrineConnection}_connection") - ->will(self::returnValue(true)); - $container - ->expects(self::once()) - ->method('get') - ->with("doctrine.dbal.{$doctrineConnection}_connection") - ->will(self::returnValue($this->getMockBuilder('Doctrine\DBAL\Connection')->disableOriginalConstructor()->getMock())); + ->willReturn($repositoryAlias) + ; $repositoryConfigurationProvider = new RepositoryConfigurationProvider($configResolver, $repositories); - $factory = new StorageConnectionFactory($repositoryConfigurationProvider); - $factory->setContainer($container); - $connection = $factory->getConnection(); - self::assertInstanceOf( - 'Doctrine\DBAL\Connection', - $connection + $factory = $this->buildStorageConnectionFactory( + $repositoryConfigurationProvider, + $doctrineConnection, + [$doctrineConnection => "doctrine.dbal.{$doctrineConnection}_connection"] ); + $connection = $factory->getConnection(); + self::assertInstanceOf(Connection::class, $connection); } - public function getConnectionProvider() + /** + * @return list + */ + public static function getConnectionProvider(): array { return [ ['my_repository', 'my_doctrine_connection'], @@ -68,17 +59,15 @@ public function getConnectionProvider() ]; } - public function testGetConnectionInvalidRepository() + /** + * @throws \Psr\Container\ContainerExceptionInterface + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Psr\Container\NotFoundExceptionInterface + */ + public function testGetConnectionInvalidRepository(): void { - $this->expectException(InvalidRepositoryException::class); - $repositories = [ - 'foo' => [ - 'storage' => [ - 'engine' => 'legacy', - 'connection' => 'my_doctrine_connection', - ], - ], + 'foo' => $this->buildNormalizedSingleRepositoryConfig('legacy', 'my_doctrine_connection'), ]; $configResolver = $this->getConfigResolverMock(); @@ -86,19 +75,19 @@ public function testGetConnectionInvalidRepository() ->expects(self::once()) ->method('getParameter') ->with('repository') - ->will(self::returnValue('inexistent_repository')); + ->willReturn('nonexistent_repository') + ; $repositoryConfigurationProvider = new RepositoryConfigurationProvider($configResolver, $repositories); - $factory = new StorageConnectionFactory($repositoryConfigurationProvider); - $factory->setContainer($this->getContainerMock()); + $factory = $this->buildStorageConnectionFactory($repositoryConfigurationProvider); + + $this->expectException(InvalidRepositoryException::class); $factory->getConnection(); } - public function testGetConnectionInvalidConnection() + public function testGetConnectionInvalidConnection(): void { - $this->expectException(\InvalidArgumentException::class); - - $repositoryConfigurationProviderMock = $this->createMock(RepositoryConfigurationProvider::class); + $repositoryConfigurationProviderMock = $this->createMock(RepositoryConfigurationProviderInterface::class); $repositoryConfig = [ 'alias' => 'foo', 'storage' => [ @@ -109,31 +98,59 @@ public function testGetConnectionInvalidConnection() $repositoryConfigurationProviderMock ->expects(self::once()) ->method('getRepositoryConfig') - ->will(self::returnValue($repositoryConfig)); + ->willReturn($repositoryConfig) + ; + + $factory = $this->buildStorageConnectionFactory( + $repositoryConfigurationProviderMock, + 'my_doctrine_connection', + [ + 'default' => 'doctrine.dbal.default_connection', + 'foo' => 'doctrine.dbal.foo_connection', + ] + ); - $container = $this->getContainerMock(); - $container - ->expects(self::once()) - ->method('has') - ->with('doctrine.dbal.my_doctrine_connection_connection') - ->will(self::returnValue(false)); - $container - ->expects(self::once()) - ->method('getParameter') - ->with('doctrine.connections') - ->will(self::returnValue([])); - $factory = new StorageConnectionFactory($repositoryConfigurationProviderMock); - $factory->setContainer($container); + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage( + 'Invalid Doctrine connection \'my_doctrine_connection\' for Repository \'foo\'. Valid connections are: default, foo' + ); $factory->getConnection(); } - protected function getConfigResolverMock() + protected function getConfigResolverMock(): ConfigResolverInterface & MockObject { return $this->createMock(ConfigResolverInterface::class); } - protected function getContainerMock() + protected function getContainerMock(): ContainerInterface & MockObject { return $this->createMock(ContainerInterface::class); } + + /** + * @param array $doctrineConnections + */ + private function buildStorageConnectionFactory( + RepositoryConfigurationProviderInterface $repositoryConfigurationProvider, + string $connectionName = 'default', + array $doctrineConnections = ['default' => 'doctrine.dbal.default_connection'] + ): StorageConnectionFactory { + $serviceLocatorMock = $this->createMock(ServiceLocator::class); + $serviceLocatorMock + ->method('has') + ->with($connectionName) + ->willReturn(isset($doctrineConnections[$connectionName])) + ; + $serviceLocatorMock->method('getProvidedServices')->willReturn($doctrineConnections); + if (isset($doctrineConnections[$connectionName])) { + $serviceLocatorMock->method('get')->with($connectionName)->willReturn($this->createMock(Connection::class)); + } else { + $serviceLocatorMock->expects(self::never())->method('get'); + } + + return new StorageConnectionFactory( + $repositoryConfigurationProvider, + $serviceLocatorMock + ); + } } diff --git a/tests/bundle/Core/ApiLoader/StorageEngineFactoryTest.php b/tests/bundle/Core/ApiLoader/StorageEngineFactoryTest.php index 77dff32931..cdc606e79a 100644 --- a/tests/bundle/Core/ApiLoader/StorageEngineFactoryTest.php +++ b/tests/bundle/Core/ApiLoader/StorageEngineFactoryTest.php @@ -8,18 +8,18 @@ namespace Ibexa\Tests\Bundle\Core\ApiLoader; use Ibexa\Bundle\Core\ApiLoader\Exception\InvalidStorageEngine; -use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider; use Ibexa\Bundle\Core\ApiLoader\StorageEngineFactory; +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use Ibexa\Contracts\Core\Persistence\Handler; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; -use PHPUnit\Framework\TestCase; +use Ibexa\Core\Base\Container\ApiLoader\RepositoryConfigurationProvider; +use PHPUnit\Framework\MockObject\MockObject; -class StorageEngineFactoryTest extends TestCase +final class StorageEngineFactoryTest extends BaseRepositoryConfigurationProviderTestCase { - public function testRegisterStorageEngine() + public function testRegisterStorageEngine(): void { - /** @var \Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider $repositoryConfigurationProvider */ - $repositoryConfigurationProvider = $this->createMock(RepositoryConfigurationProvider::class); + $repositoryConfigurationProvider = $this->createMock(RepositoryConfigurationProviderInterface::class); $factory = new StorageEngineFactory($repositoryConfigurationProvider); $storageEngines = [ @@ -35,21 +35,13 @@ public function testRegisterStorageEngine() self::assertSame($storageEngines, $factory->getStorageEngines()); } - public function testBuildStorageEngine() + public function testBuildStorageEngine(): void { $configResolver = $this->getConfigResolverMock(); $repositoryAlias = 'main'; $repositories = [ - $repositoryAlias => [ - 'storage' => [ - 'engine' => 'foo', - ], - ], - 'another' => [ - 'storage' => [ - 'engine' => 'bar', - ], - ], + $repositoryAlias => $this->buildNormalizedSingleRepositoryConfig('foo'), + 'another' => $this->buildNormalizedSingleRepositoryConfig('bar'), ]; $expectedStorageEngine = $this->getPersistenceHandlerMock(); $storageEngines = [ @@ -67,28 +59,21 @@ public function testBuildStorageEngine() ->expects(self::once()) ->method('getParameter') ->with('repository') - ->will(self::returnValue($repositoryAlias)); + ->willReturn($repositoryAlias) + ; self::assertSame($expectedStorageEngine, $factory->buildStorageEngine()); } - public function testBuildInvalidStorageEngine() + public function testBuildInvalidStorageEngine(): void { $this->expectException(InvalidStorageEngine::class); $configResolver = $this->getConfigResolverMock(); $repositoryAlias = 'main'; $repositories = [ - $repositoryAlias => [ - 'storage' => [ - 'engine' => 'undefined_storage_engine', - ], - ], - 'another' => [ - 'storage' => [ - 'engine' => 'bar', - ], - ], + $repositoryAlias => $this->buildNormalizedSingleRepositoryConfig('undefined_storage_engine'), + 'another' => $this->buildNormalizedSingleRepositoryConfig('bar'), ]; $storageEngines = [ @@ -107,20 +92,18 @@ public function testBuildInvalidStorageEngine() ->expects(self::once()) ->method('getParameter') ->with('repository') - ->will(self::returnValue($repositoryAlias)); + ->willReturn($repositoryAlias) + ; self::assertSame($this->getPersistenceHandlerMock(), $factory->buildStorageEngine()); } - /** - * @return \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface - */ - protected function getConfigResolverMock() + protected function getConfigResolverMock(): ConfigResolverInterface & MockObject { return $this->createMock(ConfigResolverInterface::class); } - protected function getPersistenceHandlerMock() + protected function getPersistenceHandlerMock(): Handler & MockObject { return $this->createMock(Handler::class); } diff --git a/tests/bundle/Core/DependencyInjection/Compiler/EntityManagerFactoryServiceLocatorPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/EntityManagerFactoryServiceLocatorPassTest.php index 171796b2fd..ed804bd17a 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/EntityManagerFactoryServiceLocatorPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/EntityManagerFactoryServiceLocatorPassTest.php @@ -8,8 +8,8 @@ namespace Ibexa\Tests\Bundle\Core\DependencyInjection\Compiler; -use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider; use Ibexa\Bundle\Core\DependencyInjection\Compiler\EntityManagerFactoryServiceLocatorPass; +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractCompilerPassTestCase; use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; use Symfony\Component\DependencyInjection\ContainerBuilder; @@ -25,7 +25,7 @@ protected function setUp(): void $this->setDefinition( 'ibexa.doctrine.orm.entity_manager_factory', new Definition(null, [ - '$repositoryConfigurationProvider' => new Reference(RepositoryConfigurationProvider::class), + '$repositoryConfigurationProvider' => new Reference(RepositoryConfigurationProviderInterface::class), '$defaultConnection' => '%doctrine.default_connection%', '$entityManagers' => '%doctrine.entity_managers%', ]) diff --git a/tests/bundle/Core/DependencyInjection/Compiler/StorageConnectionFactoryPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/StorageConnectionFactoryPassTest.php new file mode 100644 index 0000000000..1d06c290ba --- /dev/null +++ b/tests/bundle/Core/DependencyInjection/Compiler/StorageConnectionFactoryPassTest.php @@ -0,0 +1,59 @@ + 'doctrine.dbal.default_connection']; + + $this->container->setParameter('doctrine.connections', $doctrineConnections); + $this->setDefinition( + StorageConnectionFactory::class, + new Definition( + StorageConnectionFactory::class, + [ + '$doctrineConnections' => $doctrineConnections, + '$serviceLocator' => null, + ] + ) + ); + } + + protected function registerCompilerPass(ContainerBuilder $container): void + { + $container->addCompilerPass(new StorageConnectionFactoryPass()); + } + + public function testProcess(): void + { + $this->compile(); + + $this->assertContainerBuilderHasServiceDefinitionWithServiceLocatorArgument( + StorageConnectionFactory::class, + '$serviceLocator', + [ + 'default' => new Reference('doctrine.dbal.default_connection'), + ] + ); + } +} diff --git a/tests/bundle/Core/Entity/EntityManagerFactoryTest.php b/tests/bundle/Core/Entity/EntityManagerFactoryTest.php index c98e0952b4..aa0c446e74 100644 --- a/tests/bundle/Core/Entity/EntityManagerFactoryTest.php +++ b/tests/bundle/Core/Entity/EntityManagerFactoryTest.php @@ -9,9 +9,10 @@ namespace Ibexa\Tests\Bundle\Core\Entity; use Doctrine\ORM\EntityManagerInterface; -use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider; use Ibexa\Bundle\Core\Entity\EntityManagerFactory; +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use InvalidArgumentException; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\ServiceLocator; @@ -25,8 +26,7 @@ class EntityManagerFactoryTest extends TestCase 'ibexa_invalid' => self::INVALID_ENTITY_MANAGER, ]; - /** @var \Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider */ - private $repositoryConfigurationProvider; + private RepositoryConfigurationProviderInterface & MockObject $repositoryConfigurationProvider; /** @var \Doctrine\ORM\EntityManagerInterface */ private $entityManager; @@ -132,12 +132,9 @@ public function testGetEntityManagerInvalid(): void $entityManagerFactory->getEntityManager(); } - /** - * @return \Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider|\PHPUnit\Framework\MockObject\MockObject - */ - protected function getRepositoryConfigurationProvider(): RepositoryConfigurationProvider + protected function getRepositoryConfigurationProvider(): RepositoryConfigurationProviderInterface & MockObject { - return $this->createMock(RepositoryConfigurationProvider::class); + return $this->createMock(RepositoryConfigurationProviderInterface::class); } /** diff --git a/tests/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactoryTest.php b/tests/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactoryTest.php index 2d6928f36e..3c9c7e8f56 100644 --- a/tests/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactoryTest.php +++ b/tests/lib/Helper/FieldsGroups/RepositoryConfigFieldsGroupsListFactoryTest.php @@ -7,18 +7,19 @@ namespace Ibexa\Tests\Core\Helper\FieldsGroups; -use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider; +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use Ibexa\Core\Helper\FieldsGroups\RepositoryConfigFieldsGroupsListFactory; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Contracts\Translation\TranslatorInterface; class RepositoryConfigFieldsGroupsListFactoryTest extends TestCase { - private $repositoryConfigMock; + private RepositoryConfigurationProviderInterface & MockObject $repositoryConfigMock; - private $translatorMock; + private TranslatorInterface & MockObject $translatorMock; - public function testBuild() + public function testBuild(): void { $this->getRepositoryConfigMock() ->expects(self::once()) @@ -26,9 +27,8 @@ public function testBuild() ->willReturn(['fields_groups' => ['list' => ['group_a', 'group_b'], 'default' => 'group_a']]); $this->getTranslatorMock() - ->expects(self::any()) ->method('trans') - ->will(self::returnArgument(0)); + ->willReturnArgument(0); $factory = new RepositoryConfigFieldsGroupsListFactory($this->getRepositoryConfigMock()); $list = $factory->build($this->getTranslatorMock()); @@ -37,22 +37,16 @@ public function testBuild() self::assertEquals('group_a', $list->getDefaultGroup()); } - /** - * @return \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider - */ - protected function getRepositoryConfigMock() + protected function getRepositoryConfigMock(): RepositoryConfigurationProviderInterface & MockObject { if (!isset($this->repositoryConfigMock)) { - $this->repositoryConfigMock = $this->createMock(RepositoryConfigurationProvider::class); + $this->repositoryConfigMock = $this->createMock(RepositoryConfigurationProviderInterface::class); } return $this->repositoryConfigMock; } - /** - * @return \PHPUnit\Framework\MockObject\MockObject|\Symfony\Contracts\Translation\TranslatorInterface - */ - protected function getTranslatorMock() + protected function getTranslatorMock(): TranslatorInterface & MockObject { if (!isset($this->translatorMock)) { $this->translatorMock = $this->createMock(TranslatorInterface::class); From ccbbab2a7a9fce0873de7ae6c83750c004979726 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 18 Jun 2024 16:27:25 +0200 Subject: [PATCH 20/53] IBX-8400: Fixed redundancy in RepositoryFactory implementations (#384) For more details see https://issues.ibexa.co/browse/IBX-8400 and https://github.com/ibexa/core/pull/384 Key changes: * Dropped support for dynamic Core Repository class in RepositoryFactory * Made RepositoryFactory not Container-aware * Deprecated Core Bundle RepositoryFactory in favor of Repository's one * Combined Bundle and core RepositoryFactory into one * [Tests] Added needed RepositoryFactory configuration to test setup * [PHPStan] Introduced role policy map array shape as TPolicyMap * [PHPStan] Aligned baseline after the changes --- .../Core/ApiLoader/RepositoryFactory.php | 20 +++---- src/bundle/Core/Resources/config/papi.yml | 17 +++--- .../Core/Resources/config/storage_engines.yml | 8 --- src/contracts/Repository/RoleService.php | 2 + .../Container/ApiLoader/RepositoryFactory.php | 55 ++++++++++------- src/lib/Repository/RoleService.php | 12 ++-- .../settings/repository/autowire.yml | 2 + .../Resources/settings/repository/inner.yml | 59 ++++++++++--------- .../Resources/settings/integration_legacy.yml | 16 +++++ 9 files changed, 106 insertions(+), 85 deletions(-) diff --git a/src/bundle/Core/ApiLoader/RepositoryFactory.php b/src/bundle/Core/ApiLoader/RepositoryFactory.php index c47ddcc3f7..dc2abfed0a 100644 --- a/src/bundle/Core/ApiLoader/RepositoryFactory.php +++ b/src/bundle/Core/ApiLoader/RepositoryFactory.php @@ -25,23 +25,23 @@ use Ibexa\Core\Repository\Mapper; use Ibexa\Core\Repository\Permission\LimitationService; use Ibexa\Core\Repository\ProxyFactory\ProxyDomainMapperFactoryInterface; +use Ibexa\Core\Repository\Repository as CoreRepository; use Ibexa\Core\Repository\User\PasswordValidatorInterface; use Ibexa\Core\Search\Common\BackgroundIndexer; use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; -use Symfony\Component\DependencyInjection\ContainerAwareInterface; -use Symfony\Component\DependencyInjection\ContainerAwareTrait; -class RepositoryFactory implements ContainerAwareInterface +/** + * @internal + * + * @deprecated 5.0.0 The "\Ibexa\Bundle\Core\ApiLoader\RepositoryFactory" class is deprecated, will be removed in 6.0. + * Use {@see \Ibexa\Core\Base\Container\ApiLoader\RepositoryFactory instead}. + */ +class RepositoryFactory { - use ContainerAwareTrait; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ private $configResolver; - /** @var string */ - private $repositoryClass; - /** * Map of system configured policies. * @@ -57,14 +57,12 @@ class RepositoryFactory implements ContainerAwareInterface public function __construct( ConfigResolverInterface $configResolver, - $repositoryClass, array $policyMap, LanguageResolver $languageResolver, private readonly RepositoryConfigurationProviderInterface $repositoryConfigurationProvider, LoggerInterface $logger = null ) { $this->configResolver = $configResolver; - $this->repositoryClass = $repositoryClass; $this->policyMap = $policyMap; $this->languageResolver = $languageResolver; $this->logger = $logger ?? new NullLogger(); @@ -100,7 +98,7 @@ public function buildRepository( ): Repository { $config = $this->repositoryConfigurationProvider->getRepositoryConfig(); - return new $this->repositoryClass( + return new CoreRepository( $persistenceHandler, $searchHandler, $backgroundIndexer, diff --git a/src/bundle/Core/Resources/config/papi.yml b/src/bundle/Core/Resources/config/papi.yml index efee2a8a24..7e2d832d9b 100644 --- a/src/bundle/Core/Resources/config/papi.yml +++ b/src/bundle/Core/Resources/config/papi.yml @@ -11,15 +11,16 @@ parameters: services: # API Ibexa\Bundle\Core\ApiLoader\RepositoryFactory: + deprecated: + package: 'ibexa/core' + version: '5.0' + message: 'Since ibexa/core 5.0: The "%service_id%" service is deprecated and will be removed in 6.0. Use Ibexa\Core\Base\Container\ApiLoader\RepositoryFactory instead' arguments: - - '@ibexa.config.resolver' - - Ibexa\Core\Repository\Repository - - '%ibexa.api.role.policy_map%' - - '@Ibexa\Contracts\Core\Repository\LanguageResolver' - - '@Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface' - - "@?logger" - calls: - - [setContainer, ["@service_container"]] + $configResolver: '@Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface' + $policyMap: '%ibexa.api.role.policy_map%' + $languageResolver: '@Ibexa\Contracts\Core\Repository\LanguageResolver' + $repositoryConfigurationProvider: '@Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface' + $logger: "@?logger" Ibexa\Bundle\Core\ApiLoader\StorageEngineFactory: arguments: diff --git a/src/bundle/Core/Resources/config/storage_engines.yml b/src/bundle/Core/Resources/config/storage_engines.yml index 617386c6a7..27ee2e46a0 100644 --- a/src/bundle/Core/Resources/config/storage_engines.yml +++ b/src/bundle/Core/Resources/config/storage_engines.yml @@ -1,12 +1,4 @@ services: - Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface: - alias: Ibexa\Core\Base\Container\ApiLoader\RepositoryConfigurationProvider - - Ibexa\Core\Base\Container\ApiLoader\RepositoryConfigurationProvider: - arguments: - $configResolver: '@Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface' - $repositories: '%ibexa.repositories%' - Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider: deprecated: package: 'ibexa/core' diff --git a/src/contracts/Repository/RoleService.php b/src/contracts/Repository/RoleService.php index 5ced9eab15..876c6218ed 100644 --- a/src/contracts/Repository/RoleService.php +++ b/src/contracts/Repository/RoleService.php @@ -23,6 +23,8 @@ /** * This service provides methods for managing Roles and Policies. + * + * @phpstan-type TPolicyMap array>> */ interface RoleService { diff --git a/src/lib/Base/Container/ApiLoader/RepositoryFactory.php b/src/lib/Base/Container/ApiLoader/RepositoryFactory.php index a000ac22f4..f713a0b3db 100644 --- a/src/lib/Base/Container/ApiLoader/RepositoryFactory.php +++ b/src/lib/Base/Container/ApiLoader/RepositoryFactory.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\Base\Container\ApiLoader; +use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use Ibexa\Contracts\Core\Persistence\Filter\Content\Handler as ContentFilteringHandler; use Ibexa\Contracts\Core\Persistence\Filter\Location\Handler as LocationFilteringHandler; use Ibexa\Contracts\Core\Persistence\Handler as PersistenceHandler; @@ -25,36 +26,40 @@ use Ibexa\Core\Repository\Mapper; use Ibexa\Core\Repository\Permission\LimitationService; use Ibexa\Core\Repository\ProxyFactory\ProxyDomainMapperFactoryInterface; +use Ibexa\Core\Repository\Repository as CoreRepository; use Ibexa\Core\Repository\User\PasswordValidatorInterface; use Ibexa\Core\Search\Common\BackgroundIndexer; -use Symfony\Component\DependencyInjection\ContainerAwareInterface; -use Symfony\Component\DependencyInjection\ContainerAwareTrait; +use Psr\Log\LoggerAwareInterface; +use Psr\Log\LoggerAwareTrait; +use Psr\Log\NullLogger; -class RepositoryFactory implements ContainerAwareInterface +/** + * @internal + * + * @phpstan-import-type TPolicyMap from \Ibexa\Contracts\Core\Repository\RoleService + */ +final class RepositoryFactory implements LoggerAwareInterface { - use ContainerAwareTrait; + use LoggerAwareTrait; - /** @var string */ - private $repositoryClass; + /** @phpstan-var TPolicyMap */ + private array $policyMap; - /** - * Policies map. - * - * @var array - */ - protected $policyMap = []; + private LanguageResolver $languageResolver; - /** @var \Ibexa\Contracts\Core\Repository\LanguageResolver */ - private $languageResolver; + private RepositoryConfigurationProviderInterface $repositoryConfigurationProvider; + /** + * @phpstan-param TPolicyMap $policyMap + */ public function __construct( - $repositoryClass, array $policyMap, - LanguageResolver $languageResolver + LanguageResolver $languageResolver, + RepositoryConfigurationProviderInterface $repositoryConfigurationProvider ) { - $this->repositoryClass = $repositoryClass; $this->policyMap = $policyMap; $this->languageResolver = $languageResolver; + $this->repositoryConfigurationProvider = $repositoryConfigurationProvider; } /** @@ -63,7 +68,7 @@ public function __construct( * This always returns the true inner Repository, please depend on ezpublish.api.repository and not this method * directly to make sure you get an instance wrapped inside Event / Cache / * functionality. * - * @param string[] $languages + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function buildRepository( PersistenceHandler $persistenceHandler, @@ -85,10 +90,11 @@ public function buildRepository( LocationFilteringHandler $locationFilteringHandler, PasswordValidatorInterface $passwordValidator, ConfigResolverInterface $configResolver, - NameSchemaServiceInterface $nameSchemaService, - array $languages + NameSchemaServiceInterface $nameSchemaService ): Repository { - return new $this->repositoryClass( + $config = $this->repositoryConfigurationProvider->getRepositoryConfig(); + + return new CoreRepository( $persistenceHandler, $searchHandler, $backgroundIndexer, @@ -114,8 +120,13 @@ public function buildRepository( 'role' => [ 'policyMap' => $this->policyMap, ], - 'languages' => $languages, + 'languages' => $configResolver->getParameter('languages'), + 'content' => [ + 'default_version_archive_limit' => $config['options']['default_version_archive_limit'], + 'remove_archived_versions_on_publish' => $config['options']['remove_archived_versions_on_publish'], + ], ], + $this->logger ?? new NullLogger() ); } diff --git a/src/lib/Repository/RoleService.php b/src/lib/Repository/RoleService.php index ba40d09dc3..dd942f9771 100644 --- a/src/lib/Repository/RoleService.php +++ b/src/lib/Repository/RoleService.php @@ -42,6 +42,8 @@ /** * This service provides methods for managing Roles and Policies. + * + * @phpstan-import-type TPolicyMap from \Ibexa\Contracts\Core\Repository\RoleService */ class RoleService implements RoleServiceInterface { @@ -57,8 +59,8 @@ class RoleService implements RoleServiceInterface /** @var \Ibexa\Core\Repository\Mapper\RoleDomainMapper */ protected $roleDomainMapper; - /** @var array */ - protected $settings; + /** @phpstan-var array{policyMap: TPolicyMap}|array{} */ + protected array $settings; /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ private $permissionResolver; @@ -66,11 +68,7 @@ class RoleService implements RoleServiceInterface /** * Setups service with reference to repository object that created it & corresponding handler. * - * @param \Ibexa\Contracts\Core\Repository\Repository $repository - * @param \Ibexa\Contracts\Core\Persistence\User\Handler $userHandler - * @param \Ibexa\Core\Repository\Permission\LimitationService $limitationService - * @param \Ibexa\Core\Repository\Mapper\RoleDomainMapper $roleDomainMapper - * @param array $settings + * @phpstan-param array{policyMap: TPolicyMap}|array{} $settings */ public function __construct( RepositoryInterface $repository, diff --git a/src/lib/Resources/settings/repository/autowire.yml b/src/lib/Resources/settings/repository/autowire.yml index a462cd5a12..f9cc00d90b 100644 --- a/src/lib/Resources/settings/repository/autowire.yml +++ b/src/lib/Resources/settings/repository/autowire.yml @@ -1,4 +1,6 @@ services: + Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface: '@Ibexa\Core\Base\Container\ApiLoader\RepositoryConfigurationProvider' + Ibexa\Contracts\Core\Repository\Repository: '@ibexa.api.repository' Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface: '@ibexa.config.resolver' diff --git a/src/lib/Resources/settings/repository/inner.yml b/src/lib/Resources/settings/repository/inner.yml index f36d0b9a7e..d5098b4811 100644 --- a/src/lib/Resources/settings/repository/inner.yml +++ b/src/lib/Resources/settings/repository/inner.yml @@ -6,39 +6,40 @@ parameters: # intentionally defined class parameter to be used by the Repository Factory services: - Ibexa\Bundle\Core\ApiLoader\RepositoryFactory: - class: Ibexa\Core\Base\Container\ApiLoader\RepositoryFactory + Ibexa\Core\Base\Container\ApiLoader\RepositoryConfigurationProvider: arguments: - - Ibexa\Core\Repository\Repository - - '%ibexa.api.role.policy_map%' - - '@Ibexa\Contracts\Core\Repository\LanguageResolver' - calls: - - [setContainer, ["@service_container"]] + $configResolver: '@Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface' + $repositories: '%ibexa.repositories%' + + Ibexa\Core\Base\Container\ApiLoader\RepositoryFactory: + arguments: + $policyMap: '%ibexa.api.role.policy_map%' + $languageResolver: '@Ibexa\Contracts\Core\Repository\LanguageResolver' + $repositoryConfigurationProvider: '@Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface' Ibexa\Core\Repository\Repository: - factory: ['@Ibexa\Bundle\Core\ApiLoader\RepositoryFactory', buildRepository] + factory: ['@Ibexa\Core\Base\Container\ApiLoader\RepositoryFactory', buildRepository] arguments: - - '@ibexa.api.persistence_handler' - - '@ibexa.spi.search' - - '@Ibexa\Bundle\Core\EventListener\BackgroundIndexingTerminateListener' - - '@Ibexa\Core\Repository\Helper\RelationProcessor' - - '@Ibexa\Core\FieldType\FieldTypeRegistry' - - '@Ibexa\Core\Repository\User\PasswordHashService' - - '@Ibexa\Core\Repository\Strategy\ContentThumbnail\ThumbnailChainStrategy' - - '@Ibexa\Core\Repository\ProxyFactory\ProxyDomainMapperFactory' - - '@Ibexa\Core\Repository\Mapper\ContentDomainMapper' - - '@Ibexa\Core\Repository\Mapper\ContentTypeDomainMapper' - - '@Ibexa\Core\Repository\Mapper\RoleDomainMapper' - - '@Ibexa\Core\Repository\Mapper\ContentMapper' - - '@Ibexa\Contracts\Core\Repository\Validator\ContentValidator' - - '@Ibexa\Core\Repository\Permission\LimitationService' - - '@Ibexa\Contracts\Core\Repository\PermissionService' - - '@Ibexa\Contracts\Core\Persistence\Filter\Content\Handler' - - '@Ibexa\Contracts\Core\Persistence\Filter\Location\Handler' - - '@Ibexa\Core\Repository\User\PasswordValidatorInterface' - - '@ibexa.config.resolver' - - '@Ibexa\Contracts\Core\Repository\NameSchema\NameSchemaServiceInterface' - - '%languages%' + $persistenceHandler: '@ibexa.api.persistence_handler' + $searchHandler: '@ibexa.spi.search' + $backgroundIndexer: '@Ibexa\Bundle\Core\EventListener\BackgroundIndexingTerminateListener' + $relationProcessor: '@Ibexa\Core\Repository\Helper\RelationProcessor' + $fieldTypeRegistry: '@Ibexa\Core\FieldType\FieldTypeRegistry' + $passwordHashService: '@Ibexa\Core\Repository\User\PasswordHashService' + $thumbnailStrategy: '@Ibexa\Core\Repository\Strategy\ContentThumbnail\ThumbnailChainStrategy' + $proxyDomainMapperFactory: '@Ibexa\Core\Repository\ProxyFactory\ProxyDomainMapperFactory' + $contentDomainMapper: '@Ibexa\Core\Repository\Mapper\ContentDomainMapper' + $contentTypeDomainMapper: '@Ibexa\Core\Repository\Mapper\ContentTypeDomainMapper' + $roleDomainMapper: '@Ibexa\Core\Repository\Mapper\RoleDomainMapper' + $contentMapper: '@Ibexa\Core\Repository\Mapper\ContentMapper' + $contentValidator: '@Ibexa\Contracts\Core\Repository\Validator\ContentValidator' + $limitationService: '@Ibexa\Core\Repository\Permission\LimitationService' + $permissionService: '@Ibexa\Contracts\Core\Repository\PermissionService' + $contentFilteringHandler: '@Ibexa\Contracts\Core\Persistence\Filter\Content\Handler' + $locationFilteringHandler: '@Ibexa\Contracts\Core\Persistence\Filter\Location\Handler' + $passwordValidator: '@Ibexa\Core\Repository\User\PasswordValidatorInterface' + $configResolver: '@Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface' + $nameSchemaService: '@Ibexa\Contracts\Core\Repository\NameSchema\NameSchemaServiceInterface' Ibexa\Core\Repository\ContentService: class: Ibexa\Core\Repository\ContentService diff --git a/tests/integration/Core/Resources/settings/integration_legacy.yml b/tests/integration/Core/Resources/settings/integration_legacy.yml index d7caf0c52d..98b9b723d7 100644 --- a/tests/integration/Core/Resources/settings/integration_legacy.yml +++ b/tests/integration/Core/Resources/settings/integration_legacy.yml @@ -14,6 +14,22 @@ parameters: ibexa.site_access.config.default.user_content_type_identifier: ['user'] + ibexa.repositories: + default: + storage: ~ + search: + engine: '%env(SEARCH_ENGINE)%' + connection: default + fields_groups: + list: [content, metadata] + default: content + options: + default_version_archive_limit: 5 + remove_archived_versions_on_publish: true + + ibexa.site_access.config.default.repository: default + ibexa.site_access.config.default.languages: '%languages%' + services: Ibexa\Core\FieldType\ImageAsset\AssetMapper: arguments: From 52f5b841a6f4000b992192bec2867803dc4f431c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Parafi=C5=84ski?= Date: Thu, 27 Jun 2024 11:54:09 +0200 Subject: [PATCH 21/53] IBX-8224: Dropped BackwardCompatibleCommand usage (#386) For more details see https://issues.ibexa.co/browse/IBX-8224 and https://github.com/ibexa/core/pull/386 Key changes: * IBX-8224: Dropped BackwardCompatibleCommand usage --- src/bundle/Core/Command/CheckURLsCommand.php | 8 +------- src/bundle/Core/Command/CleanupVersionsCommand.php | 11 +---------- src/bundle/Core/Command/CopySubtreeCommand.php | 8 +------- .../Core/Command/DebugConfigResolverCommand.php | 9 ++------- .../Core/Command/DeleteContentTranslationCommand.php | 8 +------- .../Core/Command/RegenerateUrlAliasesCommand.php | 9 +-------- src/bundle/Core/Command/ReindexCommand.php | 8 +------- .../Core/Command/ResizeOriginalImagesCommand.php | 8 +------- .../Core/Command/UpdateTimestampsToUTCCommand.php | 8 +------- src/bundle/IO/Command/MigrateFilesCommand.php | 9 +-------- .../Command/InstallPlatformCommand.php | 10 ++-------- .../Command/ValidatePasswordHashesCommand.php | 9 +-------- 12 files changed, 14 insertions(+), 91 deletions(-) diff --git a/src/bundle/Core/Command/CheckURLsCommand.php b/src/bundle/Core/Command/CheckURLsCommand.php index b9b5b3ee26..2589dde7cb 100644 --- a/src/bundle/Core/Command/CheckURLsCommand.php +++ b/src/bundle/Core/Command/CheckURLsCommand.php @@ -22,7 +22,7 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -class CheckURLsCommand extends Command implements BackwardCompatibleCommand +class CheckURLsCommand extends Command { private const DEFAULT_ITERATION_COUNT = 50; private const DEFAULT_REPOSITORY_USER = 'admin'; @@ -55,7 +55,6 @@ public function __construct( public function configure(): void { - $this->setAliases($this->getDeprecatedAliases()); $this->setDescription('Checks validity of external URLs'); $this->addOption( 'iteration-count', @@ -118,9 +117,4 @@ private function getTotalCount(): int return $this->urlService->findUrls($query)->totalCount; } - - public function getDeprecatedAliases(): array - { - return ['ezplatform:check-urls']; - } } diff --git a/src/bundle/Core/Command/CleanupVersionsCommand.php b/src/bundle/Core/Command/CleanupVersionsCommand.php index 3168db825d..e964b237c1 100644 --- a/src/bundle/Core/Command/CleanupVersionsCommand.php +++ b/src/bundle/Core/Command/CleanupVersionsCommand.php @@ -19,11 +19,10 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -class CleanupVersionsCommand extends Command implements BackwardCompatibleCommand +class CleanupVersionsCommand extends Command { public const DEFAULT_REPOSITORY_USER = 'admin'; public const DEFAULT_EXCLUDED_CONTENT_TYPES = 'user'; - public const BEFORE_RUNNING_HINTS = <<Before you continue:
    - Make sure to back up your database. @@ -31,12 +30,10 @@ class CleanupVersionsCommand extends Command implements BackwardCompatibleComman - Run this command without memory limit. - Run this command in production environment using --env=prod EOT; - public const VERSION_DRAFT = 'draft'; public const VERSION_ARCHIVED = 'archived'; public const VERSION_PUBLISHED = 'published'; public const VERSION_ALL = 'all'; - public const VERSION_STATUS = [ self::VERSION_DRAFT => VersionInfo::STATUS_DRAFT, self::VERSION_ARCHIVED => VersionInfo::STATUS_ARCHIVED, @@ -66,7 +63,6 @@ protected function configure() $beforeRunningHints = self::BEFORE_RUNNING_HINTS; $this ->setName('ibexa:content:cleanup-versions') - ->setAliases($this->getDeprecatedAliases()) ->setDescription('Removes unwanted content versions. Keeps the published version untouched. By default, also keeps the last archived/draft version.') ->addOption( 'status', @@ -298,9 +294,4 @@ private function mapStatusToVersionInfoStatus($status) ) ); } - - public function getDeprecatedAliases(): array - { - return ['ezplatform:content:cleanup-versions']; - } } diff --git a/src/bundle/Core/Command/CopySubtreeCommand.php b/src/bundle/Core/Command/CopySubtreeCommand.php index 3e2c00c2da..c2033da4b8 100644 --- a/src/bundle/Core/Command/CopySubtreeCommand.php +++ b/src/bundle/Core/Command/CopySubtreeCommand.php @@ -26,7 +26,7 @@ /** * Console command for deep copying subtree from one location to another. */ -class CopySubtreeCommand extends Command implements BackwardCompatibleCommand +class CopySubtreeCommand extends Command { /** @var \Ibexa\Contracts\Core\Repository\LocationService */ private $locationService; @@ -69,7 +69,6 @@ protected function configure() { $this ->setName('ibexa:copy-subtree') - ->setAliases($this->getDeprecatedAliases()) ->addArgument( 'source-location-id', InputArgument::REQUIRED, @@ -183,9 +182,4 @@ protected function getAllChildrenCount(Location $location): int return $searchResults->totalCount; } - - public function getDeprecatedAliases(): array - { - return ['ezplatform:copy-subtree']; - } } diff --git a/src/bundle/Core/Command/DebugConfigResolverCommand.php b/src/bundle/Core/Command/DebugConfigResolverCommand.php index f9ba80ffcc..53fa71216f 100644 --- a/src/bundle/Core/Command/DebugConfigResolverCommand.php +++ b/src/bundle/Core/Command/DebugConfigResolverCommand.php @@ -17,7 +17,7 @@ use Symfony\Component\VarDumper\Cloner\VarCloner; use Symfony\Component\VarDumper\Dumper\CliDumper; -class DebugConfigResolverCommand extends Command implements BackwardCompatibleCommand +class DebugConfigResolverCommand extends Command { /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ private $configResolver; @@ -41,7 +41,7 @@ public function __construct( public function configure() { $this->setName('ibexa:debug:config-resolver'); - $this->setAliases(array_merge(['ibexa:debug:config'], $this->getDeprecatedAliases())); + $this->setAliases(['ibexa:debug:config']); $this->setDescription('Debugs / Retrieves a parameter from the Config Resolver'); $this->addArgument( 'parameter', @@ -113,9 +113,4 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 0; } - - public function getDeprecatedAliases(): array - { - return ['ezplatform:debug:config-resolver', 'ezplatform:debug:config']; - } } diff --git a/src/bundle/Core/Command/DeleteContentTranslationCommand.php b/src/bundle/Core/Command/DeleteContentTranslationCommand.php index fef5088ba0..fc18aca841 100644 --- a/src/bundle/Core/Command/DeleteContentTranslationCommand.php +++ b/src/bundle/Core/Command/DeleteContentTranslationCommand.php @@ -22,7 +22,7 @@ /** * Console Command which deletes a given Translation from all the Versions of a given Content Item. */ -class DeleteContentTranslationCommand extends Command implements BackwardCompatibleCommand +class DeleteContentTranslationCommand extends Command { /** @var \Ibexa\Contracts\Core\Repository\Repository */ private $repository; @@ -52,7 +52,6 @@ protected function configure() { $this ->setName('ibexa:delete-content-translation') - ->setAliases($this->getDeprecatedAliases()) ->addArgument('content-id', InputArgument::REQUIRED, 'Content Object Id') ->addArgument( 'language-code', @@ -196,9 +195,4 @@ static function ($versionLanguageCode) use ($languageCode) { $contentMetadataUpdateStruct )->contentInfo; } - - public function getDeprecatedAliases(): array - { - return ['ezplatform:delete-content-translation']; - } } diff --git a/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php b/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php index ee5f216e40..6591bfa265 100644 --- a/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php +++ b/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php @@ -24,10 +24,9 @@ * The ezplatform:urls:regenerate-aliases Symfony command implementation. * Recreates system URL aliases for all existing Locations and cleanups corrupted URL alias nodes. */ -class RegenerateUrlAliasesCommand extends Command implements BackwardCompatibleCommand +class RegenerateUrlAliasesCommand extends Command { public const DEFAULT_ITERATION_COUNT = 1000; - public const BEFORE_RUNNING_HINTS = <<Before you continue: - Make sure to back up your database. @@ -63,7 +62,6 @@ protected function configure() $beforeRunningHints = self::BEFORE_RUNNING_HINTS; $this ->setName('ibexa:urls:regenerate-aliases') - ->setAliases($this->getDeprecatedAliases()) ->setDescription( 'Regenerates Location URL aliases (autogenerated) and cleans up custom Location ' . 'and global URL aliases stored in the Legacy Storage Engine' @@ -331,9 +329,4 @@ private function regenerateSystemUrlAliases( $output->writeln(''); $output->writeln('Done.'); } - - public function getDeprecatedAliases(): array - { - return ['ezplatform:urls:regenerate-aliases']; - } } diff --git a/src/bundle/Core/Command/ReindexCommand.php b/src/bundle/Core/Command/ReindexCommand.php index e086e0083f..68f8437310 100644 --- a/src/bundle/Core/Command/ReindexCommand.php +++ b/src/bundle/Core/Command/ReindexCommand.php @@ -27,7 +27,7 @@ use Symfony\Component\Process\PhpExecutableFinder; use Symfony\Component\Process\Process; -class ReindexCommand extends Command implements BackwardCompatibleCommand +class ReindexCommand extends Command { /** @var \Ibexa\Core\Search\Common\Indexer|\Ibexa\Core\Search\Common\IncrementalIndexer */ private $searchIndexer; @@ -110,7 +110,6 @@ protected function configure() { $this ->setName('ibexa:reindex') - ->setAliases($this->getDeprecatedAliases()) ->setDescription('Recreates or refreshes the search engine index') ->addOption( 'iteration-count', @@ -474,9 +473,4 @@ private function getNumberOfCPUCores() return $cores; } - - public function getDeprecatedAliases(): array - { - return ['ezplatform:reindex']; - } } diff --git a/src/bundle/Core/Command/ResizeOriginalImagesCommand.php b/src/bundle/Core/Command/ResizeOriginalImagesCommand.php index 9970584765..c0ee18b9eb 100644 --- a/src/bundle/Core/Command/ResizeOriginalImagesCommand.php +++ b/src/bundle/Core/Command/ResizeOriginalImagesCommand.php @@ -36,7 +36,7 @@ /** * This command resizes original images stored in ezimage FieldType in given ContentType using the selected filter. */ -class ResizeOriginalImagesCommand extends Command implements BackwardCompatibleCommand +class ResizeOriginalImagesCommand extends Command { public const DEFAULT_ITERATION_COUNT = 25; public const DEFAULT_REPOSITORY_USER = 'admin'; @@ -105,7 +105,6 @@ protected function configure() { $this ->setName('ibexa:images:resize-original') - ->setAliases($this->getDeprecatedAliases()) ->addArgument( 'imageFieldIdentifier', InputArgument::REQUIRED, @@ -309,9 +308,4 @@ private function store(BinaryInterface $binary, Value $image): BinaryFile return $newBinaryFile; } - - public function getDeprecatedAliases(): array - { - return ['ezplatform:images:resize-original']; - } } diff --git a/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php b/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php index ecc69e1669..babbe4e9cd 100644 --- a/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php +++ b/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php @@ -23,7 +23,7 @@ use Symfony\Component\Process\PhpExecutableFinder; use Symfony\Component\Process\Process; -class UpdateTimestampsToUTCCommand extends Command implements BackwardCompatibleCommand +class UpdateTimestampsToUTCCommand extends Command { public const MAX_TIMESTAMP_VALUE = 2147483647; public const DEFAULT_ITERATION_COUNT = 100; @@ -67,7 +67,6 @@ protected function configure() { $this ->setName('ibexa:timestamps:to-utc') - ->setAliases($this->getDeprecatedAliases()) ->setDescription('Updates ezdate and ezdatetime timestamps to UTC') ->addArgument( 'timezone', @@ -503,9 +502,4 @@ private function dateStringToTimestamp($dateString) return $date->getTimestamp(); } - - public function getDeprecatedAliases(): array - { - return ['ezplatform:timestamps:to-utc']; - } } diff --git a/src/bundle/IO/Command/MigrateFilesCommand.php b/src/bundle/IO/Command/MigrateFilesCommand.php index 02dc895727..be56dc3656 100644 --- a/src/bundle/IO/Command/MigrateFilesCommand.php +++ b/src/bundle/IO/Command/MigrateFilesCommand.php @@ -7,7 +7,6 @@ namespace Ibexa\Bundle\IO\Command; -use Ibexa\Bundle\Core\Command\BackwardCompatibleCommand; use Ibexa\Bundle\IO\Migration\FileListerRegistry; use Ibexa\Bundle\IO\Migration\FileMigratorInterface; use Symfony\Component\Console\Command\Command; @@ -17,7 +16,7 @@ use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Question\ConfirmationQuestion; -final class MigrateFilesCommand extends Command implements BackwardCompatibleCommand +final class MigrateFilesCommand extends Command { /** @var mixed Configuration for metadata handlers */ private $configuredMetadataHandlers; @@ -63,7 +62,6 @@ protected function configure() { $this ->setName('ibexa:io:migrate-files') - ->setAliases($this->getDeprecatedAliases()) ->setDescription('Migrates files from one IO repository to another') ->addOption('from', null, InputOption::VALUE_REQUIRED, 'Migrate from ,') ->addOption('to', null, InputOption::VALUE_REQUIRED, 'Migrate to ,') @@ -319,9 +317,4 @@ protected function migrateFiles( ]); } } - - public function getDeprecatedAliases(): array - { - return ['ezplatform:io:migrate-files']; - } } diff --git a/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php b/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php index a1d6a5a98a..a754a96419 100644 --- a/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php +++ b/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php @@ -8,7 +8,6 @@ namespace Ibexa\Bundle\RepositoryInstaller\Command; use Doctrine\DBAL\Connection; -use Ibexa\Bundle\Core\Command\BackwardCompatibleCommand; use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use Psr\Cache\CacheItemPoolInterface; use Symfony\Component\Console\Command\Command; @@ -21,7 +20,7 @@ use Symfony\Component\Process\PhpExecutableFinder; use Symfony\Component\Process\Process; -final class InstallPlatformCommand extends Command implements BackwardCompatibleCommand +final class InstallPlatformCommand extends Command { /** @var \Doctrine\DBAL\Connection */ private $connection; @@ -63,7 +62,7 @@ public function __construct( protected function configure() { $this->setName('ibexa:install'); - $this->setAliases($this->getDeprecatedAliases()); + $this->addArgument( 'type', InputArgument::OPTIONAL, @@ -273,9 +272,4 @@ private function executeCommand(OutputInterface $output, $cmd, $timeout = 300) throw new \RuntimeException(sprintf('An error occurred when executing the "%s" command.', escapeshellarg($cmd))); } } - - public function getDeprecatedAliases(): array - { - return ['ezplatform:install']; - } } diff --git a/src/bundle/RepositoryInstaller/Command/ValidatePasswordHashesCommand.php b/src/bundle/RepositoryInstaller/Command/ValidatePasswordHashesCommand.php index b1aaded552..d077dbe4fc 100644 --- a/src/bundle/RepositoryInstaller/Command/ValidatePasswordHashesCommand.php +++ b/src/bundle/RepositoryInstaller/Command/ValidatePasswordHashesCommand.php @@ -7,14 +7,13 @@ namespace Ibexa\Bundle\RepositoryInstaller\Command; -use Ibexa\Bundle\Core\Command\BackwardCompatibleCommand; use Ibexa\Contracts\Core\Repository\PasswordHashService; use Ibexa\Core\FieldType\User\UserStorage; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -final class ValidatePasswordHashesCommand extends Command implements BackwardCompatibleCommand +final class ValidatePasswordHashesCommand extends Command { /** @var \Ibexa\Core\FieldType\User\UserStorage */ private $userStorage; @@ -35,7 +34,6 @@ public function __construct( protected function configure() { $this->setName('ibexa:user:validate-password-hashes'); - $this->setAliases($this->getDeprecatedAliases()); } protected function execute(InputInterface $input, OutputInterface $output): int @@ -53,9 +51,4 @@ protected function execute(InputInterface $input, OutputInterface $output): int return Command::SUCCESS; } - - public function getDeprecatedAliases(): array - { - return ['ezplatform:user:validate-password-hashes']; - } } From 4a318ee75752a9aa35af11ccb558f20f580a026c Mon Sep 17 00:00:00 2001 From: Konrad Oboza Date: Mon, 1 Jul 2024 13:05:54 +0200 Subject: [PATCH 22/53] IBX-8356: Removed `Ibexa\Core\MVC\Symfony\Security\Authentication\AuthenticatorInterface` to be replaced with Symfony-based authentication https://github.com/ibexa/core/pull/375 --- src/bundle/Core/Resources/config/security.yml | 4 + .../Authentication/AuthenticatorInterface.php | 45 ---------- .../DefaultAuthenticationSuccessHandler.php | 21 ----- ...onTokenCreatedRepositoryUserSubscriber.php | 39 +++++++++ ...kenCreatedRepositoryUserSubscriberTest.php | 85 +++++++++++++++++++ 5 files changed, 128 insertions(+), 66 deletions(-) delete mode 100644 src/lib/MVC/Symfony/Security/Authentication/AuthenticatorInterface.php create mode 100644 src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/OnAuthenticationTokenCreatedRepositoryUserSubscriber.php create mode 100644 tests/lib/MVC/Symfony/Security/Authentication/EventSubscriber/OnAuthenticationTokenCreatedRepositoryUserSubscriberTest.php diff --git a/src/bundle/Core/Resources/config/security.yml b/src/bundle/Core/Resources/config/security.yml index 5ca47846d9..fb74525faf 100644 --- a/src/bundle/Core/Resources/config/security.yml +++ b/src/bundle/Core/Resources/config/security.yml @@ -47,3 +47,7 @@ services: Ibexa\Core\MVC\Symfony\Security\Authentication\EventSubscriber\AccessDeniedSubscriber: autowire: true autoconfigure: true + + Ibexa\Core\MVC\Symfony\Security\Authentication\EventSubscriber\OnAuthenticationTokenCreatedRepositoryUserSubscriber: + autowire: true + autoconfigure: true diff --git a/src/lib/MVC/Symfony/Security/Authentication/AuthenticatorInterface.php b/src/lib/MVC/Symfony/Security/Authentication/AuthenticatorInterface.php deleted file mode 100644 index 37f4a1c20e..0000000000 --- a/src/lib/MVC/Symfony/Security/Authentication/AuthenticatorInterface.php +++ /dev/null @@ -1,45 +0,0 @@ -configResolver = $configResolver; @@ -35,21 +29,6 @@ public function setEventDispatcher(EventDispatcherInterface $eventDispatcher): v $this->eventDispatcher = $eventDispatcher; } - public function setPermissionResolver(PermissionResolver $permissionResolver): void - { - $this->permissionResolver = $permissionResolver; - } - - public function onAuthenticationSuccess(Request $request, TokenInterface $token): ?Response - { - $user = $token->getUser(); - if ($user instanceof UserInterface && isset($this->permissionResolver)) { - $this->permissionResolver->setCurrentUserReference($user->getAPIUser()); - } - - return parent::onAuthenticationSuccess($request, $token); - } - protected function determineTargetUrl(Request $request): string { if (isset($this->configResolver)) { diff --git a/src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/OnAuthenticationTokenCreatedRepositoryUserSubscriber.php b/src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/OnAuthenticationTokenCreatedRepositoryUserSubscriber.php new file mode 100644 index 0000000000..59e6b4b1b0 --- /dev/null +++ b/src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/OnAuthenticationTokenCreatedRepositoryUserSubscriber.php @@ -0,0 +1,39 @@ + ['onAuthenticationTokenCreated', 10], + ]; + } + + public function onAuthenticationTokenCreated(AuthenticationTokenCreatedEvent $event): void + { + $user = $event->getAuthenticatedToken()->getUser(); + if (!$user instanceof IbexaUser) { + return; + } + + $this->permissionResolver->setCurrentUserReference($user->getAPIUser()); + } +} diff --git a/tests/lib/MVC/Symfony/Security/Authentication/EventSubscriber/OnAuthenticationTokenCreatedRepositoryUserSubscriberTest.php b/tests/lib/MVC/Symfony/Security/Authentication/EventSubscriber/OnAuthenticationTokenCreatedRepositoryUserSubscriberTest.php new file mode 100644 index 0000000000..29c3d68685 --- /dev/null +++ b/tests/lib/MVC/Symfony/Security/Authentication/EventSubscriber/OnAuthenticationTokenCreatedRepositoryUserSubscriberTest.php @@ -0,0 +1,85 @@ +createMock(PermissionResolver::class) + ); + + self::assertEquals( + [ + AuthenticationTokenCreatedEvent::class => ['onAuthenticationTokenCreated', 10], + ], + $subscriber->getSubscribedEvents() + ); + } + + /** + * @dataProvider dataProviderForTestSettingCurrentUserReference + */ + public function testSettingCurrentUserReference( + UserInterface $user, + bool $isPermissionResolverInvoked + ): void { + $permissionResolver = $this->createMock(PermissionResolver::class); + $permissionResolver + ->expects($isPermissionResolverInvoked === true ? self::once() : self::never()) + ->method('setCurrentUserReference'); + + $subscriber = new OnAuthenticationTokenCreatedRepositoryUserSubscriber($permissionResolver); + + $subscriber->onAuthenticationTokenCreated( + $this->getAuthenticationTokenCreatedEvent($user) + ); + } + + /** + * @return iterable + */ + public function dataProviderForTestSettingCurrentUserReference(): iterable + { + yield 'authorizing Ibexa user' => [ + new User($this->createMock(ApiUser::class)), + true, + ]; + + yield 'authorizing non-Ibexa user' => [ + new InMemoryUser('foo', 'bar'), + false, + ]; + } + + private function getAuthenticationTokenCreatedEvent(UserInterface $user): AuthenticationTokenCreatedEvent + { + return new AuthenticationTokenCreatedEvent( + new UsernamePasswordToken($user, 'test_firewall'), + new Passport( + new UserBadge('foo'), + new PasswordCredentials('bar') + ) + ); + } +} From 9fa21c3528c751e9ff087277df68a4ea707e350d Mon Sep 17 00:00:00 2001 From: Konrad Oboza Date: Mon, 1 Jul 2024 16:12:12 +0200 Subject: [PATCH 23/53] IBX-8322: Fixed lack of redirections to last visited pages after successful authentication (#389) For more details see https://issues.ibexa.co/browse/IBX-8322 and https://github.com/ibexa/core/pull/389 Key changes: * Fixed lack of redirections to last visited pages after successful authentication --- src/bundle/Core/Resources/config/security.yml | 4 -- .../AccessDeniedSubscriber.php | 46 ------------------- 2 files changed, 50 deletions(-) delete mode 100644 src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/AccessDeniedSubscriber.php diff --git a/src/bundle/Core/Resources/config/security.yml b/src/bundle/Core/Resources/config/security.yml index fb74525faf..cc0f36177d 100644 --- a/src/bundle/Core/Resources/config/security.yml +++ b/src/bundle/Core/Resources/config/security.yml @@ -44,10 +44,6 @@ services: ibexa.security.user_provider.username: '@Ibexa\Core\MVC\Symfony\Security\User\UsernameProvider' ibexa.security.user_provider.email: '@Ibexa\Core\MVC\Symfony\Security\User\EmailProvider' - Ibexa\Core\MVC\Symfony\Security\Authentication\EventSubscriber\AccessDeniedSubscriber: - autowire: true - autoconfigure: true - Ibexa\Core\MVC\Symfony\Security\Authentication\EventSubscriber\OnAuthenticationTokenCreatedRepositoryUserSubscriber: autowire: true autoconfigure: true diff --git a/src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/AccessDeniedSubscriber.php b/src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/AccessDeniedSubscriber.php deleted file mode 100644 index 892ce86ebc..0000000000 --- a/src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/AccessDeniedSubscriber.php +++ /dev/null @@ -1,46 +0,0 @@ - ['onKernelException', 2], - ]; - } - - public function onKernelException(ExceptionEvent $event): void - { - $exception = $event->getThrowable()->getPrevious(); - - if ($exception instanceof IbexaRepositoryException) { - return; - } - - $event->setResponse(new RedirectResponse( - $this->urlGenerator->generate('login') - )); - } -} From e26e65ed2fa3596a9a1ae99323d6dc2fd3be8103 Mon Sep 17 00:00:00 2001 From: Konrad Oboza Date: Tue, 9 Jul 2024 11:37:31 +0200 Subject: [PATCH 24/53] IBX-8323: Reworked RepositoryAuthenticationProvider and moved its logic to a dedicated subscriber (#396) For more details see https://issues.ibexa.co/browse/IBX-8323 and https://github.com/ibexa/core/pull/396 Key changes: * Reworked RepositoryAuthenticationProvider and moved its logic to a dedicated subscriber --- phpstan-baseline.neon | 95 ------ src/bundle/Core/Resources/config/security.yml | 8 +- ...RepositoryUserAuthenticationSubscriber.php | 112 ++++++++ ...mberMeRepositoryAuthenticationProvider.php | 44 --- .../RepositoryAuthenticationProvider.php | 133 --------- .../Compiler/SecurityPassTest.php | 5 - ...sitoryUserAuthenticationSubscriberTest.php | 152 ++++++++++ ...MeRepositoryAuthenticationProviderTest.php | 121 -------- .../RepositoryAuthenticationProviderTest.php | 272 ------------------ 9 files changed, 271 insertions(+), 671 deletions(-) create mode 100644 src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/RepositoryUserAuthenticationSubscriber.php delete mode 100644 src/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProvider.php delete mode 100644 src/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php create mode 100644 tests/lib/MVC/Symfony/Security/Authentication/EventSubscriber/RepositoryUserAuthenticationSubscriberTest.php delete mode 100644 tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php delete mode 100644 tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 92e4a19fdc..e2b291852a 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -12130,41 +12130,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Routing/UrlWildcardRouter.php - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\RememberMeRepositoryAuthenticationProvider\\:\\:setPermissionResolver\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProvider.php - - - - message: "#^Dead catch \\- Ibexa\\\\Core\\\\Repository\\\\User\\\\Exception\\\\UnsupportedPasswordHashType is never thrown in the try block\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php - - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\RepositoryAuthenticationProvider\\:\\:checkAuthentication\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php - - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\RepositoryAuthenticationProvider\\:\\:setConstantAuthTime\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php - - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\RepositoryAuthenticationProvider\\:\\:setPermissionResolver\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php - - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\RepositoryAuthenticationProvider\\:\\:setUserService\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php - - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\RepositoryAuthenticationProvider\\:\\:startConstantTimer\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authorization\\\\Attribute\\:\\:__construct\\(\\) has parameter \\$function with no type specified\\.$#" count: 1 @@ -46835,66 +46800,6 @@ parameters: count: 1 path: tests/lib/MVC/Symfony/Security/Authentication/GuardRepositoryAuthenticationProviderTest.php - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\TokenInterface\\:\\:getFirewallName\\(\\)\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\TokenInterface\\:\\:getSecret\\(\\)\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserProviderInterface\\:\\:method\\(\\)\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\RepositoryAuthenticationProviderTest\\:\\:testAuthenticationNotEzUser\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\RepositoryAuthenticationProviderTest\\:\\:testCheckAuthentication\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\RepositoryAuthenticationProviderTest\\:\\:testCheckAuthenticationAlreadyLoggedIn\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\RepositoryAuthenticationProviderTest\\:\\:testCheckAuthenticationCredentialsChanged\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\RepositoryAuthenticationProviderTest\\:\\:testCheckAuthenticationFailed\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\RepositoryAuthenticationProviderTest\\:\\:testCheckAuthenticationFailedWhenPasswordInUnsupportedFormat\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php - - - - message: "#^Parameter \\#1 \\$user of class Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\UsernamePasswordToken constructor expects Symfony\\\\Component\\\\Security\\\\Core\\\\User\\\\UserInterface, string given\\.$#" - count: 6 - path: tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php - - - - message: "#^Parameter \\#3 \\$roles of class Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\UsernamePasswordToken constructor expects array\\, string given\\.$#" - count: 9 - path: tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php - - - - message: "#^Parameter \\#4 \\$hasherFactory of class Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\RepositoryAuthenticationProvider constructor expects Symfony\\\\Component\\\\PasswordHasher\\\\Hasher\\\\PasswordHasherFactoryInterface, PHPUnit\\\\Framework\\\\MockObject\\\\MockObject&Symfony\\\\Component\\\\Security\\\\Core\\\\Encoder\\\\EncoderFactoryInterface given\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\HttpUtilsTest\\:\\:checkRequestPathProvider\\(\\) has no return type specified\\.$#" count: 1 diff --git a/src/bundle/Core/Resources/config/security.yml b/src/bundle/Core/Resources/config/security.yml index cc0f36177d..b93f16db4f 100644 --- a/src/bundle/Core/Resources/config/security.yml +++ b/src/bundle/Core/Resources/config/security.yml @@ -2,7 +2,7 @@ parameters: # Constant authentication execution time in seconds (float). Blocks timing attacks. # Must be larger than expected real execution time, with a good margin. # If set to zero, constant time authentication is disabled. Do not do this on production environments. - ibexa.security.authentication.constant_auth_time: !php/const Ibexa\Bundle\Core\DependencyInjection\Compiler\SecurityPass::CONSTANT_AUTH_TIME_DEFAULT + ibexa.security.authentication.constant_auth_time: 1.0 services: Ibexa\Core\MVC\Symfony\Security\User\UsernameProvider: @@ -44,6 +44,12 @@ services: ibexa.security.user_provider.username: '@Ibexa\Core\MVC\Symfony\Security\User\UsernameProvider' ibexa.security.user_provider.email: '@Ibexa\Core\MVC\Symfony\Security\User\EmailProvider' + Ibexa\Core\MVC\Symfony\Security\Authentication\EventSubscriber\RepositoryUserAuthenticationSubscriber: + autowire: true + autoconfigure: true + arguments: + $constantAuthTime: '%ibexa.security.authentication.constant_auth_time%' + Ibexa\Core\MVC\Symfony\Security\Authentication\EventSubscriber\OnAuthenticationTokenCreatedRepositoryUserSubscriber: autowire: true autoconfigure: true diff --git a/src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/RepositoryUserAuthenticationSubscriber.php b/src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/RepositoryUserAuthenticationSubscriber.php new file mode 100644 index 0000000000..317d578841 --- /dev/null +++ b/src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/RepositoryUserAuthenticationSubscriber.php @@ -0,0 +1,112 @@ +logger = $logger ?? new NullLogger(); + } + + public static function getSubscribedEvents(): array + { + return [ + CheckPassportEvent::class => ['validateRepositoryUser'], + ]; + } + + public function validateRepositoryUser(CheckPassportEvent $event): void + { + $request = $this->requestStack->getCurrentRequest(); + if ($request === null) { + return; + } + + $badge = $event->getPassport()->getBadge(UserBadge::class); + if (!$badge instanceof UserBadge) { + return; + } + + $user = $badge->getUser(); + if (!$user instanceof IbexaUserInterface) { + return; + } + + $startTime = $this->startConstantTimer(); + try { + $this->userService->checkUserCredentials( + $user->getAPIUser(), + $user->getPassword() ?? '' + ); + + $event->getAuthenticator()->authenticate($request); + } catch (UnsupportedPasswordHashType $exception) { + $this->sleepUsingConstantTimer($startTime); + + throw new PasswordInUnsupportedFormatException($exception); + } catch (Exception $e) { + $this->sleepUsingConstantTimer($startTime); + + throw $e; + } + + $this->sleepUsingConstantTimer($startTime); + } + + private function startConstantTimer(): float + { + return microtime(true); + } + + private function sleepUsingConstantTimer(float $startTime): void + { + if ($this->constantAuthTime <= 0.0) { + return; + } + + $remainingTime = $this->constantAuthTime - (microtime(true) - $startTime); + if ($remainingTime > 0) { + $microseconds = $remainingTime * self::USLEEP_MULTIPLIER; + + usleep((int)$microseconds); + } elseif ($this->logger) { + $this->logger->warning( + sprintf( + 'Authentication took longer than the configured constant time. Consider increasing the value of %s', + self::CONSTANT_AUTH_TIME_SETTING + ), + [__CLASS__] + ); + } + } +} diff --git a/src/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProvider.php b/src/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProvider.php deleted file mode 100644 index 7e70080f49..0000000000 --- a/src/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProvider.php +++ /dev/null @@ -1,44 +0,0 @@ -permissionResolver = $permissionResolver; - } - - /** - * {@inheritdoc} - */ - public function authenticate(TokenInterface $token) - { - $authenticatedToken = parent::authenticate($token); - if (empty($authenticatedToken)) { - throw new AuthenticationException('The token is not supported by this authentication provider.'); - } - - if ($authenticatedToken->getUser() instanceof UserInterface) { - $this->permissionResolver->setCurrentUserReference( - $authenticatedToken->getUser()->getAPIUser() - ); - } - - return $authenticatedToken; - } -} diff --git a/src/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php b/src/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php deleted file mode 100644 index 2bbbec5a54..0000000000 --- a/src/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProvider.php +++ /dev/null @@ -1,133 +0,0 @@ -constantAuthTime = $constantAuthTime; - } - - public function setPermissionResolver(PermissionResolver $permissionResolver) - { - $this->permissionResolver = $permissionResolver; - } - - public function setUserService(UserService $userService) - { - $this->userService = $userService; - } - - protected function checkAuthentication(UserInterface $user, UsernamePasswordToken $token) - { - if (!$user instanceof IbexaUserInterface) { - parent::checkAuthentication($user, $token); - - return; - } - - $apiUser = $user->getAPIUser(); - - // $currentUser can either be an instance of UserInterface or just the username (e.g. during form login). - /** @var \Ibexa\Core\MVC\Symfony\Security\UserInterface|string $currentUser */ - $currentUser = $token->getUser(); - if ($currentUser instanceof UserInterface) { - if ($currentUser->getAPIUser()->passwordHash !== $apiUser->passwordHash) { - throw new BadCredentialsException('The credentials were changed in another session.'); - } - - $apiUser = $currentUser->getAPIUser(); - } else { - $credentialsValid = $this->userService->checkUserCredentials($apiUser, $token->getCredentials()); - - if (!$credentialsValid) { - throw new BadCredentialsException('Invalid credentials', 0); - } - } - - // Finally inject current user in the Repository - $this->permissionResolver->setCurrentUserReference($apiUser); - } - - /** - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\PasswordInUnsupportedFormatException - */ - public function authenticate(TokenInterface $token) - { - $startTime = $this->startConstantTimer(); - - try { - $result = parent::authenticate($token); - } catch (UnsupportedPasswordHashType $exception) { - $this->sleepUsingConstantTimer($startTime); - throw new PasswordInUnsupportedFormatException($exception); - } catch (\Exception $e) { - $this->sleepUsingConstantTimer($startTime); - throw $e; - } - - $this->sleepUsingConstantTimer($startTime); - - return $result; - } - - private function startConstantTimer() - { - return microtime(true); - } - - private function sleepUsingConstantTimer(float $startTime): void - { - if ($this->constantAuthTime <= 0.0) { - return; - } - - $remainingTime = $this->constantAuthTime - (microtime(true) - $startTime); - if ($remainingTime > 0) { - $microseconds = $remainingTime * self::USLEEP_MULTIPLIER; - - usleep((int)$microseconds); - } elseif ($this->logger) { - $this->logger->warning( - sprintf( - 'Authentication took longer than the configured constant time. Consider increasing the value of %s', - SecurityPass::CONSTANT_AUTH_TIME_SETTING - ), - [static::class] - ); - } - } -} diff --git a/tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php index d6689f86d4..1ea86e598d 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php @@ -41,11 +41,6 @@ public function testAlteredDaoAuthenticationProvider(): void { $this->compile(); - $this->assertContainerBuilderHasServiceDefinitionWithMethodCall( - 'security.authentication.provider.rememberme', - 'setPermissionResolver', - [new Reference(PermissionResolver::class)] - ); $this->assertContainerBuilderHasServiceDefinitionWithMethodCall( 'security.authentication.provider.guard', 'setPermissionResolver', diff --git a/tests/lib/MVC/Symfony/Security/Authentication/EventSubscriber/RepositoryUserAuthenticationSubscriberTest.php b/tests/lib/MVC/Symfony/Security/Authentication/EventSubscriber/RepositoryUserAuthenticationSubscriberTest.php new file mode 100644 index 0000000000..1c53d44fcf --- /dev/null +++ b/tests/lib/MVC/Symfony/Security/Authentication/EventSubscriber/RepositoryUserAuthenticationSubscriberTest.php @@ -0,0 +1,152 @@ + ['validateRepositoryUser'], + ], + $this->getSubscriber()->getSubscribedEvents() + ); + } + + public function testCheckAuthenticationFailedWhenPasswordInUnsupportedFormat(): void + { + $apiUser = new APIUser(); + $user = $this->createMock(User::class); + $user + ->expects(self::once()) + ->method('getAPIUser') + ->willReturn($apiUser); + $user + ->method('getPassword') + ->willReturn('my_password'); + + $userService = $this->createMock(UserService::class); + $userService + ->expects(self::once()) + ->method('checkUserCredentials') + ->with($apiUser, 'my_password') + ->willThrowException( + new UnsupportedPasswordHashType(self::UNSUPPORTED_USER_PASSWORD_HASH_TYPE) + ); + + $this->expectException(PasswordInUnsupportedFormatException::class); + + $this->getSubscriber($userService)->validateRepositoryUser( + $this->getCheckPassportEvent($user) + ); + } + + public function testAuthenticateInConstantTime(): void + { + $constantAuthTime = 1.0; + $stopwatch = new Stopwatch(); + $stopwatch->start('authenticate_constant_time_test'); + + try { + $this->getSubscriber(null, $constantAuthTime)->validateRepositoryUser( + $this->getCheckPassportEvent() + ); + } catch (Exception) { + self::fail(); + } + + $duration = $stopwatch->stop('authenticate_constant_time_test')->getDuration(); + + self::assertGreaterThanOrEqual($constantAuthTime * 1000, $duration); + } + + public function testAuthenticateWarningOnConstantTimeExceeded(): void + { + $logger = $this->createMock(LoggerInterface::class); + $logger + ->expects(self::once()) + ->method('warning') + ->with('Authentication took longer than the configured constant time. Consider increasing the value of ' . RepositoryUserAuthenticationSubscriber::CONSTANT_AUTH_TIME_SETTING); + + // constant auth time is much too short, but not zero, which would disable the check + $this->getSubscriber(null, 0.0000001, $logger)->validateRepositoryUser( + $this->getCheckPassportEvent() + ); + } + + public function testAuthenticateConstantTimeDisabled(): void + { + $logger = $this->createMock(LoggerInterface::class); + $logger->expects(self::never())->method('warning'); + + $this->getSubscriber(null, 0.0, $logger)->validateRepositoryUser( + $this->getCheckPassportEvent() + ); + } + + private function getSubscriber( + ?UserService $userService = null, + float $constantAuthTime = 1.0, + ?LoggerInterface $logger = null + ): RepositoryUserAuthenticationSubscriber { + $request = $this->createMock(Request::class); + $requestStack = $this->createMock(RequestStack::class); + $requestStack + ->method('getCurrentRequest') + ->willReturn($request); + + return new RepositoryUserAuthenticationSubscriber( + $requestStack, + $userService ?? $this->createMock(UserService::class), + $constantAuthTime, + $logger ?? $this->createMock(LoggerInterface::class) + ); + } + + private function getCheckPassportEvent(?UserInterface $user = null): CheckPassportEvent + { + $user = $user ?? $this->createMock(User::class); + + $userProvider = $this->createMock(User\APIUserProviderInterface::class); + $userProvider + ->expects(self::once()) + ->method('loadUserByUsername') + ->willReturn($user); + + return new CheckPassportEvent( + $this->createMock(AuthenticatorInterface::class), + new Passport( + new UserBadge($user->getUsername(), [$userProvider, 'loadUserByUsername']), + new PasswordCredentials($user->getPassword() ?? '') + ) + ); + } +} diff --git a/tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php b/tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php deleted file mode 100644 index a4bd8d69f1..0000000000 --- a/tests/lib/MVC/Symfony/Security/Authentication/RememberMeRepositoryAuthenticationProviderTest.php +++ /dev/null @@ -1,121 +0,0 @@ -permissionResolver = $this->createMock(PermissionResolver::class); - $this->authProvider = new RememberMeRepositoryAuthenticationProvider( - $this->createMock(UserCheckerInterface::class), - 'my secret', - 'my provider secret' - ); - $this->authProvider->setPermissionResolver($this->permissionResolver); - } - - public function testAuthenticateUnsupportedToken(): void - { - $this->expectException(AuthenticationException::class); - $this->expectExceptionMessage('The token is not supported by this authentication provider.'); - - $anonymousToken = $this - ->getMockBuilder(AnonymousToken::class) - ->setConstructorArgs(['secret', $this->createMock(UserInterface::class)]) - ->getMock(); - $this->authProvider->authenticate($anonymousToken); - } - - public function testAuthenticateWrongProviderKey(): void - { - $this->expectException(AuthenticationException::class); - $this->expectExceptionMessage('The token is not supported by this authentication provider.'); - - $user = $this->createMock(UserInterface::class); - $user - ->expects(self::any()) - ->method('getRoles') - ->will(self::returnValue([])); - - $rememberMeToken = $this - ->getMockBuilder(RememberMeToken::class) - ->setConstructorArgs([$user, 'wrong provider secret', 'my secret']) - ->getMock(); - $rememberMeToken - ->expects(self::any()) - ->method('getProviderKey') - ->will(self::returnValue('wrong provider secret')); - - $this->authProvider->authenticate($rememberMeToken); - } - - public function testAuthenticateWrongSecret(): void - { - $this->expectException(AuthenticationException::class); - - $user = $this->createMock(UserInterface::class); - $user - ->expects(self::any()) - ->method('getRoles') - ->will(self::returnValue([])); - - $rememberMeToken = $this - ->getMockBuilder(RememberMeToken::class) - ->setConstructorArgs([$user, 'my provider secret', 'the wrong secret']) - ->getMock(); - $rememberMeToken - ->expects(self::any()) - ->method('getProviderKey') - ->will(self::returnValue('my provider secret')); - $rememberMeToken - ->expects(self::any()) - ->method('getSecret') - ->will(self::returnValue('the wrong secret')); - - $this->authProvider->authenticate($rememberMeToken); - } - - public function testAuthenticate(): void - { - $apiUser = $this->createMock(ApiUser::class); - $apiUser - ->expects(self::any()) - ->method('getUserId') - ->will(self::returnValue(42)); - - $tokenUser = new User($apiUser); - $rememberMeToken = new RememberMeToken($tokenUser, 'my provider secret', 'my secret'); - - $authenticatedToken = $this->authProvider->authenticate($rememberMeToken); - - self::assertEquals( - [$rememberMeToken->getFirewallName(), $rememberMeToken->getSecret()], - [$authenticatedToken->getFirewallName(), $authenticatedToken->getSecret()] - ); - } -} diff --git a/tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php b/tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php deleted file mode 100644 index dff44088c9..0000000000 --- a/tests/lib/MVC/Symfony/Security/Authentication/RepositoryAuthenticationProviderTest.php +++ /dev/null @@ -1,272 +0,0 @@ -encoderFactory = $this->createMock(EncoderFactoryInterface::class); - $this->userProvider = $this->createMock(UserProviderInterface::class); - $this->authProvider = new RepositoryAuthenticationProvider( - $this->userProvider, - $this->createMock(UserCheckerInterface::class), - 'foo', - $this->encoderFactory - ); - $this->permissionResolver = $this->createMock(PermissionResolver::class); - $this->userService = $this->createMock(UserService::class); - $this->authProvider->setPermissionResolver($this->permissionResolver); - $this->authProvider->setUserService($this->userService); - - $this->logger = $this->createMock(LoggerInterface::class); - $this->authProvider->setLogger($this->logger); - } - - public function testAuthenticationNotEzUser() - { - $password = 'some_encoded_password'; - $user = $this->createMock(UserInterface::class); - $user - ->expects(self::any()) - ->method('getPassword') - ->will(self::returnValue($password)); - - $tokenUser = $this->createMock(UserInterface::class); - $tokenUser - ->expects(self::any()) - ->method('getPassword') - ->will(self::returnValue($password)); - $token = new UsernamePasswordToken($tokenUser, 'foo', 'bar'); - - $method = new \ReflectionMethod($this->authProvider, 'checkAuthentication'); - $method->setAccessible(true); - $method->invoke($this->authProvider, $user, $token); - } - - public function testCheckAuthenticationCredentialsChanged() - { - $this->expectException(BadCredentialsException::class); - - $apiUser = $this->getMockBuilder(APIUser::class) - ->setConstructorArgs([['passwordHash' => 'some_encoded_password']]) - ->setMethods(['getUserId']) - ->getMockForAbstractClass(); - $apiUser - ->expects(self::once()) - ->method('getUserId') - ->will(self::returnValue(456)); - $tokenUser = new User($apiUser); - $token = new UsernamePasswordToken($tokenUser, 'foo', 'bar'); - - $renewedApiUser = $this->getMockBuilder(APIUser::class) - ->setConstructorArgs([['passwordHash' => 'renewed_encoded_password']]) - ->getMockForAbstractClass(); - - $user = $this->createMock(User::class); - $user - ->expects(self::any()) - ->method('getAPIUser') - ->will(self::returnValue($renewedApiUser)); - - $method = new \ReflectionMethod($this->authProvider, 'checkAuthentication'); - $method->setAccessible(true); - $method->invoke($this->authProvider, $user, $token); - } - - public function testCheckAuthenticationAlreadyLoggedIn() - { - $password = 'encoded_password'; - - $apiUser = $this->getMockBuilder(APIUser::class) - ->setConstructorArgs([['passwordHash' => $password]]) - ->setMethods(['getUserId']) - ->getMockForAbstractClass(); - $tokenUser = new User($apiUser); - $token = new UsernamePasswordToken($tokenUser, 'foo', 'bar'); - - $user = $this->createMock(User::class); - $user - ->expects(self::once()) - ->method('getAPIUser') - ->will(self::returnValue($apiUser)); - - $this->permissionResolver - ->expects(self::once()) - ->method('setCurrentUserReference') - ->with($apiUser); - - $method = new \ReflectionMethod($this->authProvider, 'checkAuthentication'); - $method->setAccessible(true); - $method->invoke($this->authProvider, $user, $token); - } - - public function testCheckAuthenticationFailed() - { - $this->expectException(BadCredentialsException::class); - - $apiUser = $this->createMock(APIUser::class); - $user = $this->createMock(User::class); - $user->method('getAPIUser') - ->willReturn($apiUser); - $userName = 'my_username'; - $password = 'foo'; - $token = new UsernamePasswordToken($userName, $password, 'bar'); - - $this->userService - ->expects(self::once()) - ->method('checkUserCredentials') - ->with($apiUser, $password) - ->willReturn(false); - - $method = new \ReflectionMethod($this->authProvider, 'checkAuthentication'); - $method->setAccessible(true); - $method->invoke($this->authProvider, $user, $token); - } - - public function testCheckAuthentication() - { - $userName = 'my_username'; - $password = 'foo'; - $token = new UsernamePasswordToken($userName, $password, 'bar'); - - $apiUser = $this->createMock(APIUser::class); - $user = $this->createMock(User::class); - $user->method('getAPIUser') - ->willReturn($apiUser); - - $this->userService - ->expects(self::once()) - ->method('checkUserCredentials') - ->with($apiUser, $password) - ->willReturn(true); - - $this->permissionResolver - ->expects(self::once()) - ->method('setCurrentUserReference') - ->with($apiUser); - - $method = new \ReflectionMethod($this->authProvider, 'checkAuthentication'); - $method->setAccessible(true); - $method->invoke($this->authProvider, $user, $token); - } - - public function testCheckAuthenticationFailedWhenPasswordInUnsupportedFormat() - { - $this->expectException(PasswordInUnsupportedFormatException::class); - - $apiUser = $this->createMock(APIUser::class); - $user = $this->createMock(User::class); - $user->method('getAPIUser') - ->willReturn($apiUser); - $userName = 'my_username'; - $password = 'foo'; - $token = new UsernamePasswordToken($userName, $password, 'foo'); - $this->userProvider - ->method('loadUserByUsername') - ->willReturn($user); - - $this->userService - ->expects(self::once()) - ->method('checkUserCredentials') - ->with($apiUser, $password) - ->willThrowException(new UnsupportedPasswordHashType(self::UNSUPPORTED_USER_PASSWORD_HASH_TYPE)); - - $this->authProvider->authenticate($token); - } - - public function testAuthenticateInConstantTime(): void - { - $this->authProvider->setConstantAuthTime(SecurityPass::CONSTANT_AUTH_TIME_DEFAULT); // a reasonable value - - $token = new UsernamePasswordToken('my_username', 'my_password', 'bar'); - - $stopwatch = new Stopwatch(); - $stopwatch->start('authenticate_constant_time_test'); - - try { - $this->authProvider->authenticate($token); - } catch (\Exception $e) { - // We don't care, we just need test execution to continue - } - - $duration = $stopwatch->stop('authenticate_constant_time_test')->getDuration(); - self::assertGreaterThanOrEqual(SecurityPass::CONSTANT_AUTH_TIME_DEFAULT * 1000, $duration); - } - - public function testAuthenticateWarningOnConstantTimeExceeded(): void - { - $this->authProvider->setConstantAuthTime(0.0000001); // much too short, but not zero, which would disable the check - - $token = new UsernamePasswordToken('my_username', 'my_password', 'bar'); - - $this->logger - ->expects(self::atLeastOnce()) - ->method('warning') - ->with('Authentication took longer than the configured constant time. Consider increasing the value of ' . SecurityPass::CONSTANT_AUTH_TIME_SETTING); - - $this->expectException(AuthenticationException::class); - $this->authProvider->authenticate($token); - } - - public function testAuthenticateConstantTimeDisabled(): void - { - $this->authProvider->setConstantAuthTime(0.0); // zero disables the check - - $token = new UsernamePasswordToken('my_username', 'my_password', 'bar'); - - $this->logger - ->expects(self::never()) - ->method('warning'); - - $this->expectException(AuthenticationException::class); - $this->authProvider->authenticate($token); - } -} From 8817e7b756289aef8299e8ec48e1a3b4957cbd02 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 16 Jul 2024 09:28:06 +0200 Subject: [PATCH 25/53] [CS] Fixed outstanding CS issue in ContentTest --- tests/lib/Repository/Service/Mock/ContentTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Repository/Service/Mock/ContentTest.php b/tests/lib/Repository/Service/Mock/ContentTest.php index 5bc17ff932..638ea0df68 100644 --- a/tests/lib/Repository/Service/Mock/ContentTest.php +++ b/tests/lib/Repository/Service/Mock/ContentTest.php @@ -3471,7 +3471,7 @@ static function (SPIValue $value) use ($emptyValue) { $existingRelations = ['RELATIONS!!!']; $repositoryMock->method('sudo')->willReturn($existingRelations); - $relationProcessorMock->expects($this->any()) + $relationProcessorMock->expects(self::any()) ->method('processFieldRelations') ->with( $this->isType('array'), From 7a51f9d97cd328471a25775b2b9a2524aeb6b337 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 23 Jul 2024 09:55:04 +0200 Subject: [PATCH 26/53] IBX-8138: Refactored deprecated `loadUserByUsername` method (#400) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For more details see https://issues.ibexa.co/browse/IBX-8138 and https://github.com/ibexa/core/pull/400 Key changes: * Implemented `loadUserByIdentifier` in custom User providers * Aligned Username and Email providers with Symfony interface * [Tests] Dropped usage of deprecated `loadUserByUsername` method * [Tests] Dropped redundancy in EmailProvider and UsernameProvider tests * [PHPDoc] Added missing throw annotations to `UserService::loadUserBy*` methods * [PHPStan] Aligned baseline with the changes --------- Co-Authored-By: Paweł Niedzielski --- phpstan-baseline.neon | 120 ----------- src/contracts/Repository/UserService.php | 2 + .../Symfony/Security/User/EmailProvider.php | 25 ++- .../Security/User/UsernameProvider.php | 25 ++- .../Security/User/BaseProviderTestCase.php | 195 ++++++++++++++++++ .../Security/User/EmailProviderTest.php | 177 +--------------- .../Security/User/UsernameProviderTest.php | 177 +--------------- 7 files changed, 243 insertions(+), 478 deletions(-) create mode 100644 tests/lib/MVC/Symfony/Security/User/BaseProviderTestCase.php diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index e2b291852a..0bbb3bc90f 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -12225,16 +12225,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Security/InteractiveLoginToken.php - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\EmailProvider\\:\\:loadUserByUsername\\(\\) has parameter \\$user with no type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/User/EmailProvider.php - - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\UsernameProvider\\:\\:loadUserByUsername\\(\\) has parameter \\$user with no type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Security/User/UsernameProvider.php - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\UserInterface\\:\\:setAPIUser\\(\\) has no return type specified\\.$#" count: 1 @@ -46905,116 +46895,6 @@ parameters: count: 1 path: tests/lib/MVC/Symfony/Security/InteractiveLoginTokenTest.php - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\EmailProviderTest\\:\\:supportsClassProvider\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\EmailProviderTest\\:\\:testLoadUserByAPIUser\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\EmailProviderTest\\:\\:testLoadUserByUsername\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\EmailProviderTest\\:\\:testLoadUserByUsernameAlreadyUserObject\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\EmailProviderTest\\:\\:testLoadUserByUsernameUserNotFound\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\EmailProviderTest\\:\\:testRefreshUser\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\EmailProviderTest\\:\\:testRefreshUserNotFound\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\EmailProviderTest\\:\\:testRefreshUserNotSupported\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\EmailProviderTest\\:\\:testSupportsClass\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\EmailProviderTest\\:\\:testSupportsClass\\(\\) has parameter \\$class with no type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\EmailProviderTest\\:\\:testSupportsClass\\(\\) has parameter \\$supports with no type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\UsernameProviderTest\\:\\:supportsClassProvider\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\UsernameProviderTest\\:\\:testLoadUserByAPIUser\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\UsernameProviderTest\\:\\:testLoadUserByUsername\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\UsernameProviderTest\\:\\:testLoadUserByUsernameAlreadyUserObject\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\UsernameProviderTest\\:\\:testLoadUserByUsernameUserNotFound\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\UsernameProviderTest\\:\\:testRefreshUser\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\UsernameProviderTest\\:\\:testRefreshUserNotFound\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\UsernameProviderTest\\:\\:testRefreshUserNotSupported\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\UsernameProviderTest\\:\\:testSupportsClass\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\UsernameProviderTest\\:\\:testSupportsClass\\(\\) has parameter \\$class with no type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\User\\\\UsernameProviderTest\\:\\:testSupportsClass\\(\\) has parameter \\$supports with no type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php - - message: "#^Parameter \\#1 \\$expirationDate of class Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\PasswordInfo constructor expects DateTimeImmutable\\|null, DateTimeImmutable\\|false given\\.$#" count: 1 diff --git a/src/contracts/Repository/UserService.php b/src/contracts/Repository/UserService.php index faf485aca0..58aec8f8f8 100644 --- a/src/contracts/Repository/UserService.php +++ b/src/contracts/Repository/UserService.php @@ -165,6 +165,7 @@ public function loadUser(int $userId, array $prioritizedLanguages = []): User; * @return \Ibexa\Contracts\Core\Repository\Values\User\User * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException if a user with the given credentials was not found + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function loadUserByLogin(string $login, array $prioritizedLanguages = []): User; @@ -187,6 +188,7 @@ public function checkUserCredentials(User $user, string $credentials): bool; * @return \Ibexa\Contracts\Core\Repository\Values\User\User * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function loadUserByEmail(string $email, array $prioritizedLanguages = []): User; diff --git a/src/lib/MVC/Symfony/Security/User/EmailProvider.php b/src/lib/MVC/Symfony/Security/User/EmailProvider.php index 79aae22ed1..4976c77933 100644 --- a/src/lib/MVC/Symfony/Security/User/EmailProvider.php +++ b/src/lib/MVC/Symfony/Security/User/EmailProvider.php @@ -8,27 +8,26 @@ namespace Ibexa\Core\MVC\Symfony\Security\User; +use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; -use Ibexa\Core\MVC\Symfony\Security\UserInterface; -use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; +use Symfony\Component\Security\Core\Exception\UserNotFoundException; +use Symfony\Component\Security\Core\User\UserInterface; final class EmailProvider extends BaseProvider { - public function loadUserByUsername($user) + public function loadUserByIdentifier(string $identifier): UserInterface { try { - // SecurityContext always tries to authenticate anonymous users when checking granted access. - // In that case $user is an instance of \Ibexa\Core\MVC\Symfony\Security\User. - // We don't need to reload the user here. - if ($user instanceof UserInterface) { - return $user; - } - return $this->createSecurityUser( - $this->userService->loadUserByEmail($user) + $this->userService->loadUserByEmail($identifier) ); - } catch (NotFoundException $e) { - throw new UsernameNotFoundException($e->getMessage(), 0, $e); + } catch (NotFoundException|InvalidArgumentException $e) { + throw new UserNotFoundException($e->getMessage(), 0, $e); } } + + public function loadUserByUsername(string $username): UserInterface + { + return $this->loadUserByIdentifier($username); + } } diff --git a/src/lib/MVC/Symfony/Security/User/UsernameProvider.php b/src/lib/MVC/Symfony/Security/User/UsernameProvider.php index f9adacf79a..865777eee7 100644 --- a/src/lib/MVC/Symfony/Security/User/UsernameProvider.php +++ b/src/lib/MVC/Symfony/Security/User/UsernameProvider.php @@ -8,27 +8,26 @@ namespace Ibexa\Core\MVC\Symfony\Security\User; +use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; -use Ibexa\Core\MVC\Symfony\Security\UserInterface; -use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; +use Symfony\Component\Security\Core\Exception\UserNotFoundException; +use Symfony\Component\Security\Core\User\UserInterface; final class UsernameProvider extends BaseProvider { - public function loadUserByUsername($user) + public function loadUserByIdentifier(string $identifier): UserInterface { try { - // SecurityContext always tries to authenticate anonymous users when checking granted access. - // In that case $user is an instance of \Ibexa\Core\MVC\Symfony\Security\User. - // We don't need to reload the user here. - if ($user instanceof UserInterface) { - return $user; - } - return $this->createSecurityUser( - $this->userService->loadUserByLogin($user) + $this->userService->loadUserByLogin($identifier) ); - } catch (NotFoundException $e) { - throw new UsernameNotFoundException($e->getMessage(), 0, $e); + } catch (NotFoundException|InvalidArgumentException $e) { + throw new UserNotFoundException($e->getMessage(), 0, $e); } } + + public function loadUserByUsername(string $username): UserInterface + { + return $this->loadUserByIdentifier($username); + } } diff --git a/tests/lib/MVC/Symfony/Security/User/BaseProviderTestCase.php b/tests/lib/MVC/Symfony/Security/User/BaseProviderTestCase.php new file mode 100644 index 0000000000..3cada1549e --- /dev/null +++ b/tests/lib/MVC/Symfony/Security/User/BaseProviderTestCase.php @@ -0,0 +1,195 @@ +userService = $this->createMock(UserService::class); + $this->permissionResolver = $this->createMock(PermissionResolver::class); + $this->userProvider = $this->buildProvider(); + } + + /** + * @phpstan-return list, bool}> + */ + public function supportsClassProvider(): array + { + return [ + [SymfonyUserInterface::class, false], + [MVCUser::class, true], + [get_class($this->createMock(MVCUser::class)), true], + ]; + } + + /** + * @dataProvider supportsClassProvider + * + * @phpstan-param class-string<\Symfony\Component\Security\Core\User\UserInterface> $class + */ + public function testSupportsClass(string $class, bool $supports): void + { + self::assertSame($supports, $this->userProvider->supportsClass($class)); + } + + public function testLoadUserByAPIUser(): void + { + $apiUser = $this->createMock(APIUser::class); + + $user = $this->userProvider->loadUserByAPIUser($apiUser); + + self::assertInstanceOf(MVCUser::class, $user); + self::assertSame($apiUser, $user->getAPIUser()); + self::assertSame(['ROLE_USER'], $user->getRoles()); + } + + public function testRefreshUserNotFound(): void + { + $userId = 123; + $apiUser = $this->buildUserValueObjectStub($userId); + $user = $this->createMock(UserInterface::class); + $user + ->expects(self::once()) + ->method('getAPIUser') + ->willReturn($apiUser); + + $this->userService + ->expects(self::once()) + ->method('loadUser') + ->with($userId) + ->willThrowException(new NotFoundException('user', 'foo')); + + $this->expectException(UserNotFoundException::class); + $this->userProvider->refreshUser($user); + } + + public function testRefreshUserNotSupported(): void + { + $user = $this->createMock(SymfonyUserInterface::class); + + $this->expectException(UnsupportedUserException::class); + $this->userProvider->refreshUser($user); + } + + protected function createUserWrapperMockFromAPIUser(User $apiUser, int $userId): UserInterface & MockObject + { + $refreshedAPIUser = clone $apiUser; + $user = $this->createMock(UserInterface::class); + $user + ->expects(self::once()) + ->method('getAPIUser') + ->willReturn($apiUser) + ; + $user + ->expects(self::once()) + ->method('setAPIUser') + ->with($refreshedAPIUser) + ; + + $this->userService + ->expects(self::once()) + ->method('loadUser') + ->with($userId) + ->willReturn($refreshedAPIUser) + ; + + return $user; + } + + public function testRefreshUser(): void + { + $userId = 123; + $apiUser = $this->buildUserValueObjectStub($userId); + $user = $this->createUserWrapperMockFromAPIUser($apiUser, $userId); + + $this->permissionResolver + ->expects(self::once()) + ->method('setCurrentUserReference') + ->with(new UserReference($apiUser->getUserId())); + + self::assertSame($user, $this->userProvider->refreshUser($user)); + } + + public function testLoadUserByUsername(): void + { + $username = $this->getUserIdentifier(); + $apiUser = $this->createMock(APIUser::class); + + $this->userService + ->expects(self::once()) + ->method($this->getUserServiceMethod()) + ->with($username) + ->willReturn($apiUser); + + $user = $this->userProvider->loadUserByIdentifier($username); + self::assertInstanceOf(UserInterface::class, $user); + self::assertSame($apiUser, $user->getAPIUser()); + self::assertSame(['ROLE_USER'], $user->getRoles()); + } + + public function testLoadUserByUsernameUserNotFound(): void + { + $username = $this->getUserIdentifier(); + $this->userService + ->expects(self::once()) + ->method($this->getUserServiceMethod()) + ->with($username) + ->willThrowException(new NotFoundException('user', $username)); + + $this->expectException(UserNotFoundException::class); + $this->userProvider->loadUserByIdentifier($username); + } + + final protected function buildUserValueObjectStub(int $userId): User + { + return new User( + [ + 'content' => new Content( + [ + 'versionInfo' => new VersionInfo( + ['contentInfo' => new ContentInfo(['id' => $userId])] + ), + ] + ), + ] + ); + } +} diff --git a/tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php b/tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php index 1579cd7a37..261609b26e 100644 --- a/tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php +++ b/tests/lib/MVC/Symfony/Security/User/EmailProviderTest.php @@ -8,181 +8,26 @@ namespace Ibexa\Tests\Core\MVC\Symfony\Security\User; -use Ibexa\Contracts\Core\Repository\PermissionResolver; -use Ibexa\Contracts\Core\Repository\UserService; -use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; -use Ibexa\Contracts\Core\Repository\Values\User\User as APIUser; -use Ibexa\Core\Base\Exceptions\NotFoundException; -use Ibexa\Core\MVC\Symfony\Security\User as MVCUser; +use Ibexa\Core\MVC\Symfony\Security\User\BaseProvider; use Ibexa\Core\MVC\Symfony\Security\User\EmailProvider; -use Ibexa\Core\MVC\Symfony\Security\UserInterface; -use Ibexa\Core\Repository\Values\Content\Content; -use Ibexa\Core\Repository\Values\Content\VersionInfo; -use Ibexa\Core\Repository\Values\User\User; -use Ibexa\Core\Repository\Values\User\UserReference; -use PHPUnit\Framework\TestCase; -use Symfony\Component\Security\Core\Exception\UnsupportedUserException; -use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; -use Symfony\Component\Security\Core\User\UserInterface as SymfonyUserInterface; -class EmailProviderTest extends TestCase +/** + * @covers \Ibexa\Core\MVC\Symfony\Security\User\EmailProvider + */ +final class EmailProviderTest extends BaseProviderTestCase { - /** @var \Ibexa\Contracts\Core\Repository\UserService|\PHPUnit\Framework\MockObject\MockObject */ - private $userService; - - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver|\PHPUnit\Framework\MockObject\MockObject */ - private $permissionResolver; - - /** @var \Ibexa\Core\MVC\Symfony\Security\User\EmailProvider */ - private $userProvider; - - protected function setUp(): void - { - parent::setUp(); - $this->userService = $this->createMock(UserService::class); - $this->permissionResolver = $this->createMock(PermissionResolver::class); - $this->userProvider = new EmailProvider($this->userService, $this->permissionResolver); - } - - public function testLoadUserByUsernameAlreadyUserObject() - { - $user = $this->createMock(UserInterface::class); - self::assertSame($user, $this->userProvider->loadUserByUsername($user)); - } - - public function testLoadUserByUsernameUserNotFound() - { - $this->expectException(UsernameNotFoundException::class); - - $username = 'foobar@example.org'; - $this->userService - ->expects(self::once()) - ->method('loadUserByEmail') - ->with($username) - ->will(self::throwException(new NotFoundException('user', $username))); - $this->userProvider->loadUserByUsername($username); - } - - public function testLoadUserByUsername() - { - $username = 'foobar@example.org'; - $apiUser = $this->createMock(APIUser::class); - - $this->userService - ->expects(self::once()) - ->method('loadUserByEmail') - ->with($username) - ->will(self::returnValue($apiUser)); - - $user = $this->userProvider->loadUserByUsername($username); - self::assertInstanceOf(UserInterface::class, $user); - self::assertSame($apiUser, $user->getAPIUser()); - self::assertSame(['ROLE_USER'], $user->getRoles()); - } - - public function testRefreshUserNotSupported() + protected function buildProvider(): BaseProvider { - $this->expectException(UnsupportedUserException::class); - - $user = $this->createMock(SymfonyUserInterface::class); - $this->userProvider->refreshUser($user); + return new EmailProvider($this->userService, $this->permissionResolver); } - public function testRefreshUser() + protected function getUserIdentifier(): string { - $userId = 123; - $apiUser = new User( - [ - 'content' => new Content( - [ - 'versionInfo' => new VersionInfo( - ['contentInfo' => new ContentInfo(['id' => $userId])] - ), - ] - ), - ] - ); - $refreshedAPIUser = clone $apiUser; - $user = $this->createMock(UserInterface::class); - $user - ->expects(self::once()) - ->method('getAPIUser') - ->will(self::returnValue($apiUser)); - $user - ->expects(self::once()) - ->method('setAPIUser') - ->with($refreshedAPIUser); - - $this->userService - ->expects(self::once()) - ->method('loadUser') - ->with($userId) - ->will(self::returnValue($refreshedAPIUser)); - - $this->permissionResolver - ->expects(self::once()) - ->method('setCurrentUserReference') - ->with(new UserReference($apiUser->getUserId())); - - self::assertSame($user, $this->userProvider->refreshUser($user)); + return 'foobar@example.org'; } - public function testRefreshUserNotFound() + protected function getUserServiceMethod(): string { - $this->expectException(UsernameNotFoundException::class); - - $userId = 123; - $apiUser = new User( - [ - 'content' => new Content( - [ - 'versionInfo' => new VersionInfo( - ['contentInfo' => new ContentInfo(['id' => $userId])] - ), - ] - ), - ] - ); - $user = $this->createMock(UserInterface::class); - $user - ->expects(self::once()) - ->method('getAPIUser') - ->will(self::returnValue($apiUser)); - - $this->userService - ->expects(self::once()) - ->method('loadUser') - ->with($userId) - ->will(self::throwException(new NotFoundException('user', 'foo'))); - - $this->userProvider->refreshUser($user); - } - - /** - * @dataProvider supportsClassProvider - */ - public function testSupportsClass($class, $supports) - { - self::assertSame($supports, $this->userProvider->supportsClass($class)); - } - - public function supportsClassProvider() - { - return [ - [SymfonyUserInterface::class, false], - [MVCUser::class, true], - [get_class($this->createMock(MVCUser::class)), true], - ]; - } - - public function testLoadUserByAPIUser() - { - $apiUser = $this->createMock(APIUser::class); - - $user = $this->userProvider->loadUserByAPIUser($apiUser); - - self::assertInstanceOf(MVCUser::class, $user); - self::assertSame($apiUser, $user->getAPIUser()); - self::assertSame(['ROLE_USER'], $user->getRoles()); + return 'loadUserByEmail'; } } diff --git a/tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php b/tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php index 6fe995cb08..5886976ba4 100644 --- a/tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php +++ b/tests/lib/MVC/Symfony/Security/User/UsernameProviderTest.php @@ -8,181 +8,26 @@ namespace Ibexa\Tests\Core\MVC\Symfony\Security\User; -use Ibexa\Contracts\Core\Repository\PermissionResolver; -use Ibexa\Contracts\Core\Repository\UserService; -use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; -use Ibexa\Contracts\Core\Repository\Values\User\User as APIUser; -use Ibexa\Core\Base\Exceptions\NotFoundException; -use Ibexa\Core\MVC\Symfony\Security\User as MVCUser; +use Ibexa\Core\MVC\Symfony\Security\User\BaseProvider; use Ibexa\Core\MVC\Symfony\Security\User\UsernameProvider; -use Ibexa\Core\MVC\Symfony\Security\UserInterface; -use Ibexa\Core\Repository\Values\Content\Content; -use Ibexa\Core\Repository\Values\Content\VersionInfo; -use Ibexa\Core\Repository\Values\User\User; -use Ibexa\Core\Repository\Values\User\UserReference; -use PHPUnit\Framework\TestCase; -use Symfony\Component\Security\Core\Exception\UnsupportedUserException; -use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; -use Symfony\Component\Security\Core\User\UserInterface as SymfonyUserInterface; -class UsernameProviderTest extends TestCase +/** + * @covers \Ibexa\Core\MVC\Symfony\Security\User\UsernameProvider + */ +final class UsernameProviderTest extends BaseProviderTestCase { - /** @var \Ibexa\Contracts\Core\Repository\UserService|\PHPUnit\Framework\MockObject\MockObject */ - private $userService; - - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver|\PHPUnit\Framework\MockObject\MockObject */ - private $permissionResolver; - - /** @var \Ibexa\Core\MVC\Symfony\Security\User\UsernameProvider */ - private $userProvider; - - protected function setUp(): void - { - parent::setUp(); - $this->userService = $this->createMock(UserService::class); - $this->permissionResolver = $this->createMock(PermissionResolver::class); - $this->userProvider = new UsernameProvider($this->userService, $this->permissionResolver); - } - - public function testLoadUserByUsernameAlreadyUserObject() - { - $user = $this->createMock(UserInterface::class); - self::assertSame($user, $this->userProvider->loadUserByUsername($user)); - } - - public function testLoadUserByUsernameUserNotFound() - { - $this->expectException(UsernameNotFoundException::class); - - $username = 'foobar'; - $this->userService - ->expects(self::once()) - ->method('loadUserByLogin') - ->with($username) - ->will(self::throwException(new NotFoundException('user', $username))); - $this->userProvider->loadUserByUsername($username); - } - - public function testLoadUserByUsername() - { - $username = 'foobar'; - $apiUser = $this->createMock(APIUser::class); - - $this->userService - ->expects(self::once()) - ->method('loadUserByLogin') - ->with($username) - ->will(self::returnValue($apiUser)); - - $user = $this->userProvider->loadUserByUsername($username); - self::assertInstanceOf(UserInterface::class, $user); - self::assertSame($apiUser, $user->getAPIUser()); - self::assertSame(['ROLE_USER'], $user->getRoles()); - } - - public function testRefreshUserNotSupported() + protected function buildProvider(): BaseProvider { - $this->expectException(UnsupportedUserException::class); - - $user = $this->createMock(SymfonyUserInterface::class); - $this->userProvider->refreshUser($user); + return new UsernameProvider($this->userService, $this->permissionResolver); } - public function testRefreshUser() + protected function getUserIdentifier(): string { - $userId = 123; - $apiUser = new User( - [ - 'content' => new Content( - [ - 'versionInfo' => new VersionInfo( - ['contentInfo' => new ContentInfo(['id' => $userId])] - ), - ] - ), - ] - ); - $refreshedAPIUser = clone $apiUser; - $user = $this->createMock(UserInterface::class); - $user - ->expects(self::once()) - ->method('getAPIUser') - ->will(self::returnValue($apiUser)); - $user - ->expects(self::once()) - ->method('setAPIUser') - ->with($refreshedAPIUser); - - $this->userService - ->expects(self::once()) - ->method('loadUser') - ->with($userId) - ->will(self::returnValue($refreshedAPIUser)); - - $this->permissionResolver - ->expects(self::once()) - ->method('setCurrentUserReference') - ->with(new UserReference($apiUser->getUserId())); - - self::assertSame($user, $this->userProvider->refreshUser($user)); + return 'foobar'; } - public function testRefreshUserNotFound() + protected function getUserServiceMethod(): string { - $this->expectException(UsernameNotFoundException::class); - - $userId = 123; - $apiUser = new User( - [ - 'content' => new Content( - [ - 'versionInfo' => new VersionInfo( - ['contentInfo' => new ContentInfo(['id' => $userId])] - ), - ] - ), - ] - ); - $user = $this->createMock(UserInterface::class); - $user - ->expects(self::once()) - ->method('getAPIUser') - ->will(self::returnValue($apiUser)); - - $this->userService - ->expects(self::once()) - ->method('loadUser') - ->with($userId) - ->will(self::throwException(new NotFoundException('user', 'foo'))); - - $this->userProvider->refreshUser($user); - } - - /** - * @dataProvider supportsClassProvider - */ - public function testSupportsClass($class, $supports) - { - self::assertSame($supports, $this->userProvider->supportsClass($class)); - } - - public function supportsClassProvider() - { - return [ - [SymfonyUserInterface::class, false], - [MVCUser::class, true], - [get_class($this->createMock(MVCUser::class)), true], - ]; - } - - public function testLoadUserByAPIUser() - { - $apiUser = $this->createMock(APIUser::class); - - $user = $this->userProvider->loadUserByAPIUser($apiUser); - - self::assertInstanceOf(MVCUser::class, $user); - self::assertSame($apiUser, $user->getAPIUser()); - self::assertSame(['ROLE_USER'], $user->getRoles()); + return 'loadUserByLogin'; } } From 592184ef8938cc3d88a370355df7f055a437c095 Mon Sep 17 00:00:00 2001 From: Konrad Oboza Date: Thu, 1 Aug 2024 13:13:26 +0200 Subject: [PATCH 27/53] IBX-8558: Removed `GuardRepositoryAuthenticationProvider` due to Symfony security deprecations (#405) For more details see https://issues.ibexa.co/browse/IBX-8558 and https://github.com/ibexa/core/pull/405 Key changes: * IBX-8558: Removed `GuardRepositoryAuthenticationProvider` due to Symfony security deprecations --- phpstan-baseline.neon | 25 ----- .../GuardRepositoryAuthenticationProvider.php | 41 ------- .../Compiler/SecurityPassTest.php | 7 +- ...rdRepositoryAuthenticationProviderTest.php | 101 ------------------ 4 files changed, 1 insertion(+), 173 deletions(-) delete mode 100644 src/lib/MVC/Symfony/Security/Authentication/GuardRepositoryAuthenticationProvider.php delete mode 100644 tests/lib/MVC/Symfony/Security/Authentication/GuardRepositoryAuthenticationProviderTest.php diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 0bbb3bc90f..71cfbb2c5b 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -46765,31 +46765,6 @@ parameters: count: 1 path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\TokenInterface\\:\\:getProviderKey\\(\\)\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/GuardRepositoryAuthenticationProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\GuardRepositoryAuthenticationProviderTest\\:\\:testAuthenticate\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/GuardRepositoryAuthenticationProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\GuardRepositoryAuthenticationProviderTest\\:\\:testAuthenticateUnsupportedToken\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/GuardRepositoryAuthenticationProviderTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\GuardRepositoryAuthenticationProviderTest\\:\\:testAuthenticateWrongGuardProviderKey\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/GuardRepositoryAuthenticationProviderTest.php - - - - message: "#^Parameter \\#1 \\$token of method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\Authentication\\\\GuardRepositoryAuthenticationProvider\\:\\:authenticate\\(\\) expects Symfony\\\\Component\\\\Security\\\\Guard\\\\Token\\\\GuardTokenInterface, PHPUnit\\\\Framework\\\\MockObject\\\\MockObject&Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\AnonymousToken given\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Security/Authentication/GuardRepositoryAuthenticationProviderTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Security\\\\HttpUtilsTest\\:\\:checkRequestPathProvider\\(\\) has no return type specified\\.$#" count: 1 diff --git a/src/lib/MVC/Symfony/Security/Authentication/GuardRepositoryAuthenticationProvider.php b/src/lib/MVC/Symfony/Security/Authentication/GuardRepositoryAuthenticationProvider.php deleted file mode 100644 index bcbe7b7c3d..0000000000 --- a/src/lib/MVC/Symfony/Security/Authentication/GuardRepositoryAuthenticationProvider.php +++ /dev/null @@ -1,41 +0,0 @@ -permissionResolver = $permissionResolver; - } - - public function authenticate(TokenInterface $token): TokenInterface - { - $authenticatedToken = parent::authenticate($token); - if (empty($authenticatedToken)) { - throw new AuthenticationException('The token is not supported by this authentication provider.'); - } - - if ($authenticatedToken->getUser() instanceof UserInterface) { - $this->permissionResolver->setCurrentUserReference( - $authenticatedToken->getUser()->getAPIUser() - ); - } - - return $authenticatedToken; - } -} diff --git a/tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php index 1ea86e598d..b82cbff4da 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/SecurityPassTest.php @@ -37,15 +37,10 @@ protected function registerCompilerPass(ContainerBuilder $container): void $container->addCompilerPass(new SecurityPass()); } - public function testAlteredDaoAuthenticationProvider(): void + public function testAlteredHttpUtils(): void { $this->compile(); - $this->assertContainerBuilderHasServiceDefinitionWithMethodCall( - 'security.authentication.provider.guard', - 'setPermissionResolver', - [new Reference(PermissionResolver::class)] - ); $this->assertContainerBuilderHasServiceDefinitionWithMethodCall( 'security.http_utils', 'setSiteAccess', diff --git a/tests/lib/MVC/Symfony/Security/Authentication/GuardRepositoryAuthenticationProviderTest.php b/tests/lib/MVC/Symfony/Security/Authentication/GuardRepositoryAuthenticationProviderTest.php deleted file mode 100644 index c108fc9c0f..0000000000 --- a/tests/lib/MVC/Symfony/Security/Authentication/GuardRepositoryAuthenticationProviderTest.php +++ /dev/null @@ -1,101 +0,0 @@ -method('getUser') - ->willReturn($user); - - $guardAuthenticator - ->method('checkCredentials') - ->willReturn(true); - - $guardAuthenticator - ->method('createAuthenticatedToken') - ->willReturn(new PostAuthenticationGuardToken( - $user, - 'provider-key_authenticator', - [] - )); - - $this->authProvider = new GuardRepositoryAuthenticationProvider( - ['authenticator' => $guardAuthenticator], - self::createMock(UserProviderInterface::class), - 'provider-key', - self::createMock(UserCheckerInterface::class), - self::createMock(UserPasswordHasherInterface::class) - ); - - $this->authProvider->setPermissionResolver( - self::createMock(PermissionResolver::class) - ); - } - - public function testAuthenticateUnsupportedToken() - { - self::expectException(InvalidArgumentException::class); - self::expectExceptionMessage('GuardAuthenticationProvider only supports GuardTokenInterface.'); - - $anonymousToken = self::getMockBuilder(AnonymousToken::class) - ->setConstructorArgs(['secret', self::createMock(UserInterface::class)]) - ->getMock(); - - $this->authProvider->authenticate($anonymousToken); - } - - public function testAuthenticateWrongGuardProviderKey() - { - self::expectException(AuthenticationException::class); - self::expectExceptionMessage(sprintf( - 'Token with provider key "%s" did not originate from any of the guard authenticators of provider "%s".', - 'wrong-key_authenticator', - 'provider-key' - )); - - $guardToken = new PreAuthenticationGuardToken(['test' => 'credentials'], 'wrong-key_authenticator'); - - $this->authProvider->authenticate($guardToken); - } - - public function testAuthenticate() - { - $guardToken = new PreAuthenticationGuardToken(['test' => 'credentials'], 'provider-key_authenticator'); - - $authenticatedToken = $this->authProvider->authenticate($guardToken); - self::assertEquals( - [$guardToken->getGuardProviderKey(), []], - [$authenticatedToken->getProviderKey(), $authenticatedToken->getCredentials()] - ); - } -} From 71fcbd493b6a278830ab8561f6b041bd1512d49b Mon Sep 17 00:00:00 2001 From: Konrad Oboza Date: Wed, 14 Aug 2024 14:48:53 +0200 Subject: [PATCH 28/53] IBX-8656: Skipped credentials check for `SelfValidatingPassport` (#411) * IBX-8656: Skipped credentials check for `SelfValidatingPassport` * removed duplicated authentication --- phpstan-baseline.neon | 10 --- .../Symfony/Event/InteractiveLoginEvent.php | 70 ------------------- src/lib/MVC/Symfony/MVCEvents.php | 8 --- ...RepositoryUserAuthenticationSubscriber.php | 12 +++- .../Event/InteractiveLoginEventTest.php | 27 ------- ...sitoryUserAuthenticationSubscriberTest.php | 44 ++++++++---- 6 files changed, 41 insertions(+), 130 deletions(-) delete mode 100644 src/lib/MVC/Symfony/Event/InteractiveLoginEvent.php delete mode 100644 tests/lib/MVC/Symfony/Event/InteractiveLoginEventTest.php diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 71cfbb2c5b..a126cb12d1 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -11480,11 +11480,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Event/ContentCacheClearEvent.php - - - message: "#^Property Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Event\\\\InteractiveLoginEvent\\:\\:\\$apiUser \\(Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\User\\) in isset\\(\\) is not nullable\\.$#" - count: 1 - path: src/lib/MVC/Symfony/Event/InteractiveLoginEvent.php - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Event\\\\PostSiteAccessMatchEvent\\:\\:__construct\\(\\) has parameter \\$requestType with no type specified\\.$#" count: 1 @@ -45720,11 +45715,6 @@ parameters: count: 1 path: tests/lib/MVC/Symfony/Event/ContentCacheClearEventTest.php - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Event\\\\InteractiveLoginEventTest\\:\\:testGetSetAPIUser\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/MVC/Symfony/Event/InteractiveLoginEventTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\MVC\\\\Symfony\\\\Event\\\\RouteReferenceGenerationEventTest\\:\\:testConstruct\\(\\) has no return type specified\\.$#" count: 1 diff --git a/src/lib/MVC/Symfony/Event/InteractiveLoginEvent.php b/src/lib/MVC/Symfony/Event/InteractiveLoginEvent.php deleted file mode 100644 index 89d5f6c908..0000000000 --- a/src/lib/MVC/Symfony/Event/InteractiveLoginEvent.php +++ /dev/null @@ -1,70 +0,0 @@ -request = $request; - $this->authenticationToken = $authenticationToken; - } - - public function getRequest(): Request - { - return $this->request; - } - - public function getAuthenticationToken(): TokenInterface - { - return $this->authenticationToken; - } - - /** - * Checks if an API user has been provided. - * - * @return bool - */ - public function hasAPIUser(): bool - { - return isset($this->apiUser); - } - - /** - * Injects an API user to be injected in the repository. - * - * @param \Ibexa\Contracts\Core\Repository\Values\User\User $apiUser - */ - public function setApiUser(APIUser $apiUser): void - { - $this->apiUser = $apiUser; - } - - /** - * @return \Ibexa\Contracts\Core\Repository\Values\User\User - */ - public function getAPIUser(): APIUser - { - return $this->apiUser; - } -} diff --git a/src/lib/MVC/Symfony/MVCEvents.php b/src/lib/MVC/Symfony/MVCEvents.php index 2a40ffb334..7b92f632ae 100644 --- a/src/lib/MVC/Symfony/MVCEvents.php +++ b/src/lib/MVC/Symfony/MVCEvents.php @@ -51,14 +51,6 @@ final class MVCEvents */ public const CONFIG_SCOPE_RESTORE = 'ezpublish.config.scope_restore'; - /** - * INTERACTIVE_LOGIN event occurs when a user has been authenticated by a foreign user provider. - * Listening to this event gives a chance to retrieve a valid API user to be injected in repository. - * - * The event listener method receives a {@see \Ibexa\Core\MVC\Symfony\Event\InteractiveLoginEvent} instance. - */ - public const INTERACTIVE_LOGIN = 'ezpublish.security.interactive_login'; - /** * ROUTE_REFERENCE_GENERATION event occurs when a RouteReference is generated, and gives an opportunity to * alter the RouteReference, e.g. by adding parameters. diff --git a/src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/RepositoryUserAuthenticationSubscriber.php b/src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/RepositoryUserAuthenticationSubscriber.php index 317d578841..cbfe3a4c8e 100644 --- a/src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/RepositoryUserAuthenticationSubscriber.php +++ b/src/lib/MVC/Symfony/Security/Authentication/EventSubscriber/RepositoryUserAuthenticationSubscriber.php @@ -19,6 +19,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge; +use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPassport; use Symfony\Component\Security\Http\Event\CheckPassportEvent; final class RepositoryUserAuthenticationSubscriber implements EventSubscriberInterface @@ -52,7 +53,14 @@ public function validateRepositoryUser(CheckPassportEvent $event): void return; } - $badge = $event->getPassport()->getBadge(UserBadge::class); + $passport = $event->getPassport(); + //validating password hash is not needed when SelfValidatingPassport is in use - this implementation is generally + //used when there are no credentials to be checked (e.g. API token authentication). + if ($passport instanceof SelfValidatingPassport) { + return; + } + + $badge = $passport->getBadge(UserBadge::class); if (!$badge instanceof UserBadge) { return; } @@ -68,8 +76,6 @@ public function validateRepositoryUser(CheckPassportEvent $event): void $user->getAPIUser(), $user->getPassword() ?? '' ); - - $event->getAuthenticator()->authenticate($request); } catch (UnsupportedPasswordHashType $exception) { $this->sleepUsingConstantTimer($startTime); diff --git a/tests/lib/MVC/Symfony/Event/InteractiveLoginEventTest.php b/tests/lib/MVC/Symfony/Event/InteractiveLoginEventTest.php deleted file mode 100644 index 0c29e98256..0000000000 --- a/tests/lib/MVC/Symfony/Event/InteractiveLoginEventTest.php +++ /dev/null @@ -1,27 +0,0 @@ -createMock(TokenInterface::class)); - self::assertFalse($event->hasAPIUser()); - $apiUser = $this->createMock(User::class); - $event->setApiUser($apiUser); - self::assertTrue($event->hasAPIUser()); - self::assertSame($apiUser, $event->getAPIUser()); - } -} diff --git a/tests/lib/MVC/Symfony/Security/Authentication/EventSubscriber/RepositoryUserAuthenticationSubscriberTest.php b/tests/lib/MVC/Symfony/Security/Authentication/EventSubscriber/RepositoryUserAuthenticationSubscriberTest.php index 1c53d44fcf..cbcc38092b 100644 --- a/tests/lib/MVC/Symfony/Security/Authentication/EventSubscriber/RepositoryUserAuthenticationSubscriberTest.php +++ b/tests/lib/MVC/Symfony/Security/Authentication/EventSubscriber/RepositoryUserAuthenticationSubscriberTest.php @@ -24,6 +24,7 @@ use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge; use Symfony\Component\Security\Http\Authenticator\Passport\Credentials\PasswordCredentials; use Symfony\Component\Security\Http\Authenticator\Passport\Passport; +use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPassport; use Symfony\Component\Security\Http\Event\CheckPassportEvent; use Symfony\Component\Stopwatch\Stopwatch; @@ -112,6 +113,21 @@ public function testAuthenticateConstantTimeDisabled(): void ); } + public function testSkippingRepositoryUserValidationForSelfValidatingPassport(): void + { + $user = $this->createMock(User::class); + $user->expects(self::never())->method('getAPIUser'); + + $userService = $this->createMock(UserService::class); + $userService->expects(self::never())->method('checkUserCredentials'); + + $selfValidatingPassport = new SelfValidatingPassport(new UserBadge('foo')); + + $this->getSubscriber($userService)->validateRepositoryUser( + $this->getCheckPassportEvent($user, $selfValidatingPassport) + ); + } + private function getSubscriber( ?UserService $userService = null, float $constantAuthTime = 1.0, @@ -131,22 +147,26 @@ private function getSubscriber( ); } - private function getCheckPassportEvent(?UserInterface $user = null): CheckPassportEvent - { + private function getCheckPassportEvent( + ?UserInterface $user = null, + ?Passport $passport = null, + ): CheckPassportEvent { + $authenticator = $this->createMock(AuthenticatorInterface::class); $user = $user ?? $this->createMock(User::class); - $userProvider = $this->createMock(User\APIUserProviderInterface::class); - $userProvider - ->expects(self::once()) - ->method('loadUserByUsername') - ->willReturn($user); + if ($passport === null) { + $userProvider = $this->createMock(User\APIUserProviderInterface::class); + $userProvider + ->expects(self::once()) + ->method('loadUserByUsername') + ->willReturn($user); - return new CheckPassportEvent( - $this->createMock(AuthenticatorInterface::class), - new Passport( + $passport = new Passport( new UserBadge($user->getUsername(), [$userProvider, 'loadUserByUsername']), new PasswordCredentials($user->getPassword() ?? '') - ) - ); + ); + } + + return new CheckPassportEvent($authenticator, $passport); } } From d0b982639a434ae57c5e9a1d4ac2f1760b1bc163 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 27 Aug 2024 11:27:47 +0200 Subject: [PATCH 29/53] Extracted common base for TextBlock and TextLine field types (#406) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For more details see https://github.com/ibexa/core/pull/406 Key changes: * Extracted common base for TextBlock and TextLine field types * [Tests] Aligned tests with TextBlock and TextLine changes * [Tests] Reduced complexity of TextBlock and TextLine test classes * [PHPStan] Aligned baseline with the changes --------- Co-authored-by: Paweł Niedzielski --- src/lib/FieldType/BaseTextType.php | 86 ++++ src/lib/FieldType/TextBlock/Type.php | 130 ++---- src/lib/FieldType/TextLine/Type.php | 154 ++----- src/lib/FieldType/TextLine/Value.php | 17 +- .../Validator/StringLengthValidator.php | 41 +- .../FieldType/TextBlockIntegrationTest.php | 5 +- .../FieldType/TextLineIntegrationTest.php | 7 +- tests/lib/FieldType/TextBlockTest.php | 216 ++-------- tests/lib/FieldType/TextLineTest.php | 379 +++--------------- 9 files changed, 261 insertions(+), 774 deletions(-) create mode 100644 src/lib/FieldType/BaseTextType.php diff --git a/src/lib/FieldType/BaseTextType.php b/src/lib/FieldType/BaseTextType.php new file mode 100644 index 0000000000..aee2a53c80 --- /dev/null +++ b/src/lib/FieldType/BaseTextType.php @@ -0,0 +1,86 @@ +text; + } + + /** + * @param \Ibexa\Core\FieldType\TextLine\Value $value + */ + public function isEmptyValue(FieldTypeValueInterface $value): bool + { + return $value->text === null || trim($value->text) === ''; + } + + /** + * @param \Ibexa\Core\FieldType\TextLine\Value $value + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException If the value does not match the expected structure. + */ + protected function checkValueStructure(BaseValue $value): void + { + if (!is_string($value->text)) { + throw new InvalidArgumentType( + '$value->text', + 'string', + $value->text + ); + } + } + + protected function buildUnknownValidatorError(string $parameterName, string $validatorIdentifier): ValidationError + { + return new ValidationError( + "Validator '$parameterName' is unknown", + null, + [ + $parameterName => $validatorIdentifier, + ] + ); + } + + /** + * @param \Ibexa\Core\FieldType\TextLine\Value $value + */ + public function toHash(FieldTypeValueInterface $value): ?string + { + if ($this->isEmptyValue($value)) { + return null; + } + + return $value->text; + } +} diff --git a/src/lib/FieldType/TextBlock/Type.php b/src/lib/FieldType/TextBlock/Type.php index 4b2680646f..272826b527 100644 --- a/src/lib/FieldType/TextBlock/Type.php +++ b/src/lib/FieldType/TextBlock/Type.php @@ -7,21 +7,18 @@ namespace Ibexa\Core\FieldType\TextBlock; -use Ibexa\Contracts\Core\FieldType\Value as SPIValue; -use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; use Ibexa\Core\Base\Exceptions\InvalidArgumentType; -use Ibexa\Core\FieldType\FieldType; +use Ibexa\Core\FieldType\BaseTextType; use Ibexa\Core\FieldType\ValidationError; use Ibexa\Core\FieldType\Value as BaseValue; use JMS\TranslationBundle\Model\Message; -use JMS\TranslationBundle\Translation\TranslationContainerInterface; /** * The TextBlock field type. * * Represents a larger body of text, such as text areas. */ -class Type extends FieldType implements TranslationContainerInterface +class Type extends BaseTextType { protected $settingsSchema = [ 'textRows' => [ @@ -32,50 +29,17 @@ class Type extends FieldType implements TranslationContainerInterface protected $validatorConfigurationSchema = []; - /** - * Returns the field type identifier for this field type. - * - * @return string - */ public function getFieldTypeIdentifier() { return 'eztext'; } - /** - * @param \Ibexa\Core\FieldType\TextBlock\Value|\Ibexa\Contracts\Core\FieldType\Value $value - */ - public function getName(SPIValue $value, FieldDefinition $fieldDefinition, string $languageCode): string - { - return (string)$value->text; - } - - /** - * Returns the fallback default value of field type when no such default - * value is provided in the field definition in content types. - * - * @return \Ibexa\Core\FieldType\TextBlock\Value - */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(); } /** - * Returns if the given $value is considered empty by the field type. - * - * @param mixed $value - * - * @return bool - */ - public function isEmptyValue(SPIValue $value) - { - return $value->text === null || trim($value->text) === ''; - } - - /** - * Inspects given $inputValue and potentially converts it into a dedicated value object. - * * @param string|\Ibexa\Core\FieldType\TextBlock\Value $inputValue * * @return \Ibexa\Core\FieldType\TextBlock\Value The potentially converted and structurally plausible value. @@ -89,21 +53,10 @@ protected function createValueFromInput($inputValue) return $inputValue; } - /** - * Throws an exception if value structure is not of expected format. - * - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException If the value does not match the expected structure. - * - * @param \Ibexa\Core\FieldType\TextBlock\Value $value - */ - protected function checkValueStructure(BaseValue $value) + protected static function checkValueType(mixed $value): void { - if (!is_string($value->text)) { - throw new InvalidArgumentType( - '$value->text', - 'string', - $value->text - ); + if (!$value instanceof Value) { + throw new InvalidArgumentType('$value', Value::class, $value); } } @@ -112,24 +65,21 @@ protected function checkValueStructure(BaseValue $value) * * @param \Ibexa\Core\FieldType\TextBlock\Value $value * - * @return string + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ - protected function getSortInfo(BaseValue $value) + protected function getSortInfo(BaseValue $value): string { - return $this->transformationProcessor->transformByGroup( - mb_substr(strtok(trim($value->text), "\r\n"), 0, 255), - 'lowercase' - ); + $tokens = strtok(trim($value->text), "\r\n"); + + return $tokens !== false + ? $this->transformationProcessor->transformByGroup(mb_substr($tokens, 0, 255), 'lowercase') + : ''; } /** - * Converts an $hash to the Value defined by the field type. - * - * @param mixed $hash - * - * @return \Ibexa\Core\FieldType\TextBlock\Value $value + * @param string $hash */ - public function fromHash($hash) + public function fromHash($hash): Value { if ($hash === null) { return $this->getEmptyValue(); @@ -138,32 +88,6 @@ public function fromHash($hash) return new Value($hash); } - /** - * Converts a $Value to a hash. - * - * @param \Ibexa\Core\FieldType\TextBlock\Value $value - * - * @return mixed - */ - public function toHash(SPIValue $value) - { - if ($this->isEmptyValue($value)) { - return null; - } - - return $value->text; - } - - /** - * Returns whether the field type is searchable. - * - * @return bool - */ - public function isSearchable() - { - return true; - } - /** * Validates the fieldSettings of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct. * @@ -171,25 +95,21 @@ public function isSearchable() * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validateFieldSettings($fieldSettings) + public function validateFieldSettings($fieldSettings): array { $validationErrors = []; foreach ($fieldSettings as $name => $value) { if (isset($this->settingsSchema[$name])) { - switch ($name) { - case 'textRows': - if (!is_int($value)) { - $validationErrors[] = new ValidationError( - "Setting '%setting%' value must be of integer type", - null, - [ - '%setting%' => $name, - ], - "[$name]" - ); - } - break; + if ($name === 'textRows' && !is_int($value)) { + $validationErrors[] = new ValidationError( + "Setting '%setting%' value must be of integer type", + null, + [ + '%setting%' => $name, + ], + "[$name]" + ); } } else { $validationErrors[] = new ValidationError( diff --git a/src/lib/FieldType/TextLine/Type.php b/src/lib/FieldType/TextLine/Type.php index ee1589bbcd..cf78bd2c42 100644 --- a/src/lib/FieldType/TextLine/Type.php +++ b/src/lib/FieldType/TextLine/Type.php @@ -7,22 +7,20 @@ namespace Ibexa\Core\FieldType\TextLine; +use Ibexa\Contracts\Core\Exception\InvalidArgumentType; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; -use Ibexa\Core\Base\Exceptions\InvalidArgumentType; -use Ibexa\Core\FieldType\FieldType; -use Ibexa\Core\FieldType\ValidationError; +use Ibexa\Core\FieldType\BaseTextType; use Ibexa\Core\FieldType\Validator\StringLengthValidator; use Ibexa\Core\FieldType\Value as BaseValue; use JMS\TranslationBundle\Model\Message; -use JMS\TranslationBundle\Translation\TranslationContainerInterface; /** * The TextLine field type. * * This field type represents a simple string. */ -class Type extends FieldType implements TranslationContainerInterface +class Type extends BaseTextType { protected $validatorConfigurationSchema = [ 'StringLengthValidator' => [ @@ -40,27 +38,21 @@ class Type extends FieldType implements TranslationContainerInterface /** * Validates the validatorConfiguration of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct. * - * @param mixed $validatorConfiguration + * @param array $validatorConfiguration * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validateValidatorConfiguration($validatorConfiguration) + public function validateValidatorConfiguration($validatorConfiguration): array { $validationErrors = []; - $validator = new StringLengthValidator(); + $validators = ['StringLengthValidator' => new StringLengthValidator()]; foreach ($validatorConfiguration as $validatorIdentifier => $constraints) { - if ($validatorIdentifier !== 'StringLengthValidator') { - $validationErrors[] = new ValidationError( - "Validator '%validator%' is unknown", - null, - [ - '%validator%' => $validatorIdentifier, - ] - ); + if (!isset($validators[$validatorIdentifier])) { + $validationErrors[] = $this->buildUnknownValidatorError('%validator%', $validatorIdentifier); continue; } - $validationErrors += $validator->validateConstraints($constraints); + $validationErrors += $validators[$validatorIdentifier]->validateConstraints($constraints); } return $validationErrors; @@ -69,14 +61,14 @@ public function validateValidatorConfiguration($validatorConfiguration) /** * Validates a field based on the validators in the field definition. * - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException - * * @param \Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition $fieldDefinition The field definition of the field * @param \Ibexa\Core\FieldType\TextLine\Value $fieldValue The field value for which an action is performed * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException */ - public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue) + public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue): array { $validationErrors = []; @@ -85,85 +77,27 @@ public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue) } $validatorConfiguration = $fieldDefinition->getValidatorConfiguration(); - $constraints = isset($validatorConfiguration['StringLengthValidator']) - ? $validatorConfiguration['StringLengthValidator'] - : []; - - if (isset($constraints['maxStringLength']) && - $constraints['maxStringLength'] !== false && - $constraints['maxStringLength'] !== 0 && - mb_strlen($fieldValue->text) > $constraints['maxStringLength']) { - $validationErrors[] = new ValidationError( - 'The string can not exceed %size% character.', - 'The string can not exceed %size% characters.', - [ - '%size%' => $constraints['maxStringLength'], - ], - 'text' - ); - } - - if (isset($constraints['minStringLength']) && - $constraints['minStringLength'] !== false && - $constraints['minStringLength'] !== 0 && - mb_strlen($fieldValue->text) < $constraints['minStringLength']) { - $validationErrors[] = new ValidationError( - 'The string cannot be shorter than %size% character.', - 'The string cannot be shorter than %size% characters.', - [ - '%size%' => $constraints['minStringLength'], - ], - 'text' - ); - } + $constraints = $validatorConfiguration['StringLengthValidator'] ?? []; + $validator = new StringLengthValidator(); + $validator->initializeWithConstraints($constraints); - return $validationErrors; + return false === $validator->validate($fieldValue, $fieldDefinition) ? $validator->getMessage() : []; } - /** - * Returns the field type identifier for this field type. - * - * @return string - */ public function getFieldTypeIdentifier() { return 'ezstring'; } /** - * @param \Ibexa\Core\FieldType\TextLine\Value|\Ibexa\Contracts\Core\FieldType\Value $value - */ - public function getName(SPIValue $value, FieldDefinition $fieldDefinition, string $languageCode): string - { - return (string)$value->text; - } - - /** - * Returns the fallback default value of field type when no such default - * value is provided in the field definition in content types. - * * @return \Ibexa\Core\FieldType\TextLine\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(); } /** - * Returns if the given $value is considered empty by the field type. - * - * @param mixed $value - * - * @return bool - */ - public function isEmptyValue(SPIValue $value) - { - return $value->text === null || trim($value->text) === ''; - } - - /** - * Inspects given $inputValue and potentially converts it into a dedicated value object. - * * @param string|\Ibexa\Core\FieldType\TextLine\Value $inputValue * * @return \Ibexa\Core\FieldType\TextLine\Value The potentially converted and structurally plausible value. @@ -177,21 +111,10 @@ protected function createValueFromInput($inputValue) return $inputValue; } - /** - * Throws an exception if value structure is not of expected format. - * - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException If the value does not match the expected structure. - * - * @param \Ibexa\Core\FieldType\TextLine\Value $value - */ - protected function checkValueStructure(BaseValue $value) + protected static function checkValueType(mixed $value): void { - if (!is_string($value->text)) { - throw new InvalidArgumentType( - '$value->text', - 'string', - $value->text - ); + if (!$value instanceof Value) { + throw new InvalidArgumentType('$value', Value::class, $value); } } @@ -199,22 +122,16 @@ protected function checkValueStructure(BaseValue $value) * Returns information for FieldValue->$sortKey relevant to the field type. * * @param \Ibexa\Core\FieldType\TextLine\Value $value - * - * @return string */ - protected function getSortInfo(BaseValue $value) + protected function getSortInfo(BaseValue $value): string { return $this->transformationProcessor->transformByGroup((string)$value, 'lowercase'); } /** - * Converts an $hash to the Value defined by the field type. - * - * @param mixed $hash - * - * @return \Ibexa\Core\FieldType\TextLine\Value $value + * @param string $hash */ - public function fromHash($hash) + public function fromHash($hash): Value { if ($hash === null) { return $this->getEmptyValue(); @@ -224,31 +141,8 @@ public function fromHash($hash) } /** - * Converts a $Value to a hash. - * - * @param \Ibexa\Core\FieldType\TextLine\Value $value - * - * @return mixed - */ - public function toHash(SPIValue $value) - { - if ($this->isEmptyValue($value)) { - return null; - } - - return $value->text; - } - - /** - * Returns whether the field type is searchable. - * - * @return bool + * @return list<\JMS\TranslationBundle\Model\Message> */ - public function isSearchable() - { - return true; - } - public static function getTranslationMessages(): array { return [ diff --git a/src/lib/FieldType/TextLine/Value.php b/src/lib/FieldType/TextLine/Value.php index 82b2f12723..7e135878d5 100644 --- a/src/lib/FieldType/TextLine/Value.php +++ b/src/lib/FieldType/TextLine/Value.php @@ -16,23 +16,18 @@ class Value extends BaseValue { /** * Text content. - * - * @var string */ - public $text; + public string $text; - /** - * Construct a new Value object and initialize it $text. - * - * @param string $text - */ - public function __construct($text = '') + public function __construct(?string $text = '') { - $this->text = $text; + parent::__construct(); + + $this->text = (string)$text; } public function __toString() { - return (string)$this->text; + return $this->text; } } diff --git a/src/lib/FieldType/Validator/StringLengthValidator.php b/src/lib/FieldType/Validator/StringLengthValidator.php index 459d84981d..041d17cc61 100644 --- a/src/lib/FieldType/Validator/StringLengthValidator.php +++ b/src/lib/FieldType/Validator/StringLengthValidator.php @@ -20,6 +20,8 @@ */ class StringLengthValidator extends Validator { + private const string PARAMETER_NAME = '%parameter%'; + protected $constraints = [ 'maxStringLength' => false, 'minStringLength' => false, @@ -45,10 +47,10 @@ public function validateConstraints($constraints) case 'maxStringLength': if ($value !== false && !is_int($value) && !(null === $value)) { $validationErrors[] = new ValidationError( - "Validator parameter '%parameter%' value must be of integer type", + sprintf('Validator parameter \'%s\' value must be of integer type', self::PARAMETER_NAME), null, [ - '%parameter%' => $name, + self::PARAMETER_NAME => $name, ] ); } elseif ($value < 0) { @@ -56,7 +58,7 @@ public function validateConstraints($constraints) "Validator parameter '%parameter%' value can't be negative", null, [ - '%parameter%' => $name, + self::PARAMETER_NAME => $name, ] ); } @@ -66,7 +68,7 @@ public function validateConstraints($constraints) "Validator parameter '%parameter%' is unknown", null, [ - '%parameter%' => $name, + self::PARAMETER_NAME => $name, ] ); } @@ -92,9 +94,8 @@ public function validateConstraints($constraints) */ protected function validateConstraintsOrder($constraints) { - return !isset($constraints['minStringLength']) || - !isset($constraints['maxStringLength']) || - ($constraints['minStringLength'] <= $constraints['maxStringLength']); + return !isset($constraints['minStringLength'], $constraints['maxStringLength']) + || ($constraints['minStringLength'] <= $constraints['maxStringLength']); } /** @@ -110,27 +111,33 @@ public function validate(BaseValue $value, ?FieldDefinition $fieldDefinition = n { $isValid = true; - if ($this->constraints['maxStringLength'] !== false && - $this->constraints['maxStringLength'] !== 0 && - mb_strlen($value->text) > $this->constraints['maxStringLength']) { + // BC: these constraints can be not set, null, or false + $minStringLength = $this->constraints['minStringLength'] ?? false; + $maxStringLength = $this->constraints['maxStringLength'] ?? false; + + if ($maxStringLength !== false && + $maxStringLength !== 0 && + mb_strlen($value->text) > $maxStringLength) { $this->errors[] = new ValidationError( 'The string can not exceed %size% character.', 'The string can not exceed %size% characters.', [ - '%size%' => $this->constraints['maxStringLength'], - ] + '%size%' => $maxStringLength, + ], + 'text' ); $isValid = false; } - if ($this->constraints['minStringLength'] !== false && - $this->constraints['minStringLength'] !== 0 && - mb_strlen($value->text) < $this->constraints['minStringLength']) { + if ($minStringLength !== false && + $minStringLength !== 0 && + mb_strlen($value->text) < $minStringLength) { $this->errors[] = new ValidationError( 'The string cannot be shorter than %size% character.', 'The string cannot be shorter than %size% characters.', [ - '%size%' => $this->constraints['minStringLength'], - ] + '%size%' => $minStringLength, + ], + 'text' ); $isValid = false; } diff --git a/tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php b/tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php index 2331884b5e..c9ec559dae 100644 --- a/tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php @@ -7,8 +7,8 @@ namespace Ibexa\Tests\Integration\Core\Repository\FieldType; +use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\Values\Content\Field; -use Ibexa\Core\Base\Exceptions\InvalidArgumentType; use Ibexa\Core\FieldType\TextBlock\Value as TextBlockValue; /** @@ -149,7 +149,7 @@ public function provideInvalidCreationFieldData() return [ [ new \stdClass(), - InvalidArgumentType::class, + InvalidArgumentException::class, ], ]; } @@ -281,7 +281,6 @@ public function providerForTestIsNotEmptyValue() [ $this->getValidCreationFieldData(), ], - [new TextBlockValue(0)], [new TextBlockValue('0')], ]; } diff --git a/tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php b/tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php index 9380755b46..6e90e1043c 100644 --- a/tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php @@ -8,8 +8,8 @@ namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Exceptions\ContentFieldValidationException; +use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\Values\Content\Field; -use Ibexa\Core\Base\Exceptions\InvalidArgumentType; use Ibexa\Core\FieldType\TextLine\Value as TextLineValue; /** @@ -161,11 +161,11 @@ public function provideInvalidCreationFieldData() return [ [ new \stdClass(), - InvalidArgumentType::class, + InvalidArgumentException::class, ], [ 42, - InvalidArgumentType::class, + InvalidArgumentException::class, ], [ new TextLineValue(str_repeat('.', 64)), @@ -299,7 +299,6 @@ public function providerForTestIsNotEmptyValue() [ $this->getValidCreationFieldData(), ], - [new TextLineValue(0)], [new TextLineValue('0')], ]; } diff --git a/tests/lib/FieldType/TextBlockTest.php b/tests/lib/FieldType/TextBlockTest.php index e0d59be39b..59b5a3179b 100644 --- a/tests/lib/FieldType/TextBlockTest.php +++ b/tests/lib/FieldType/TextBlockTest.php @@ -8,27 +8,19 @@ namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; +use Ibexa\Core\FieldType\FieldType; use Ibexa\Core\FieldType\TextBlock\Type as TextBlockType; use Ibexa\Core\FieldType\TextBlock\Value as TextBlockValue; /** * @group fieldType - * @group ezselection + * @group eztext */ -class TextBlockTest extends FieldTypeTest +final class TextBlockTest extends FieldTypeTest { - /** - * Returns the field type under test. - * - * This method is used by all test cases to retrieve the field type under - * test. Just create the FieldType instance using mocks from the provided - * get*Mock() methods and/or custom get*Mock() implementations. You MUST - * NOT take care for test case wide caching of the field type, just return - * a new instance from this method! - * - * @return \Ibexa\Contracts\Core\FieldType\FieldType - */ - protected function createFieldTypeUnderTest() + private const string SAMPLE_TEXT_LINE_VALUE = ' sindelfingen '; + + protected function createFieldTypeUnderTest(): FieldType { $fieldType = new TextBlockType(); $fieldType->setTransformationProcessor($this->getTransformationProcessorMock()); @@ -37,21 +29,17 @@ protected function createFieldTypeUnderTest() } /** - * Returns the validator configuration schema expected from the field type. - * - * @return array + * @return array{} */ - protected function getValidatorConfigurationSchemaExpectation() + protected function getValidatorConfigurationSchemaExpectation(): array { return []; } /** - * Returns the settings schema expected from the field type. - * - * @return array + * @return array */ - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return [ 'textRows' => [ @@ -61,60 +49,28 @@ protected function getSettingsSchemaExpectation() ]; } - /** - * Returns the empty value expected from the field type. - * - * @return \Ibexa\Core\FieldType\TextLine\Value - */ - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): TextBlockValue { return new TextBlockValue(); } - public function provideInvalidInputForAcceptValue() + /** + * @return list + */ + public function provideInvalidInputForAcceptValue(): array { return [ [ 23, InvalidArgumentException::class, ], - [ - new TextBlockValue(23), - InvalidArgumentException::class, - ], ]; } /** - * Data provider for valid input to acceptValue(). - * - * Returns an array of data provider sets with 2 arguments: 1. The valid - * input to acceptValue(), 2. The expected return value from acceptValue(). - * For example: - * - * - * return array( - * array( - * null, - * null - * ), - * array( - * __FILE__, - * new BinaryFileValue( array( - * 'path' => __FILE__, - * 'fileName' => basename( __FILE__ ), - * 'fileSize' => filesize( __FILE__ ), - * 'downloadCount' => 0, - * 'mimeType' => 'text/plain', - * ) ) - * ), - * // ... - * ); - * - * - * @return array + * @return list */ - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ @@ -126,12 +82,12 @@ public function provideValidInputForAcceptValue() new TextBlockValue(), ], [ - 'sindelfingen', - new TextBlockValue('sindelfingen'), + self::SAMPLE_TEXT_LINE_VALUE, + new TextBlockValue(self::SAMPLE_TEXT_LINE_VALUE), ], [ - new TextBlockValue('sindelfingen'), - new TextBlockValue('sindelfingen'), + new TextBlockValue(self::SAMPLE_TEXT_LINE_VALUE), + new TextBlockValue(self::SAMPLE_TEXT_LINE_VALUE), ], [ new TextBlockValue(''), @@ -145,41 +101,9 @@ public function provideValidInputForAcceptValue() } /** - * Provide input for the toHash() method. - * - * Returns an array of data provider sets with 2 arguments: 1. The valid - * input to toHash(), 2. The expected return value from toHash(). - * For example: - * - * - * return array( - * array( - * null, - * null - * ), - * array( - * new BinaryFileValue( array( - * 'path' => 'some/file/here', - * 'fileName' => 'sindelfingen.jpg', - * 'fileSize' => 2342, - * 'downloadCount' => 0, - * 'mimeType' => 'image/jpeg', - * ) ), - * array( - * 'path' => 'some/file/here', - * 'fileName' => 'sindelfingen.jpg', - * 'fileSize' => 2342, - * 'downloadCount' => 0, - * 'mimeType' => 'image/jpeg', - * ) - * ), - * // ... - * ); - * - * - * @return array + * @return list */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ @@ -187,48 +111,16 @@ public function provideInputForToHash() null, ], [ - new TextBlockValue('sindelfingen'), - 'sindelfingen', + new TextBlockValue(self::SAMPLE_TEXT_LINE_VALUE), + self::SAMPLE_TEXT_LINE_VALUE, ], ]; } /** - * Provide input to fromHash() method. - * - * Returns an array of data provider sets with 2 arguments: 1. The valid - * input to fromHash(), 2. The expected return value from fromHash(). - * For example: - * - * - * return array( - * array( - * null, - * null - * ), - * array( - * array( - * 'path' => 'some/file/here', - * 'fileName' => 'sindelfingen.jpg', - * 'fileSize' => 2342, - * 'downloadCount' => 0, - * 'mimeType' => 'image/jpeg', - * ), - * new BinaryFileValue( array( - * 'path' => 'some/file/here', - * 'fileName' => 'sindelfingen.jpg', - * 'fileSize' => 2342, - * 'downloadCount' => 0, - * 'mimeType' => 'image/jpeg', - * ) ) - * ), - * // ... - * ); - * - * - * @return array + * @return list */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { return [ [ @@ -236,35 +128,16 @@ public function provideInputForFromHash() new TextBlockValue(), ], [ - 'sindelfingen', - new TextBlockValue('sindelfingen'), + self::SAMPLE_TEXT_LINE_VALUE, + new TextBlockValue(self::SAMPLE_TEXT_LINE_VALUE), ], ]; } /** - * Provide data sets with field settings which are considered valid by the - * {@link validateFieldSettings()} method. - * - * Returns an array of data provider sets with a single argument: A valid - * set of field settings. - * For example: - * - * - * return array( - * array( - * array(), - * ), - * array( - * array( 'rows' => 2 ) - * ), - * // ... - * ); - * - * - * @return array + * @return list>> */ - public function provideValidFieldSettings() + public function provideValidFieldSettings(): array { return [ [ @@ -279,29 +152,9 @@ public function provideValidFieldSettings() } /** - * Provide data sets with field settings which are considered invalid by the - * {@link validateFieldSettings()} method. The method must return a - * non-empty array of validation error when receiving such field settings. - * - * Returns an array of data provider sets with a single argument: A valid - * set of field settings. - * For example: - * - * - * return array( - * array( - * true, - * ), - * array( - * array( 'nonExistentKey' => 2 ) - * ), - * // ... - * ); - * - * - * @return array + * @return list>> */ - public function provideInValidFieldSettings() + public function provideInValidFieldSettings(): array { return [ [ @@ -323,6 +176,9 @@ protected function provideFieldTypeIdentifier() return 'eztext'; } + /** + * @return list, string}> + */ public function provideDataForGetName(): array { return [ diff --git a/tests/lib/FieldType/TextLineTest.php b/tests/lib/FieldType/TextLineTest.php index 0fbf19b26d..2e20e03487 100644 --- a/tests/lib/FieldType/TextLineTest.php +++ b/tests/lib/FieldType/TextLineTest.php @@ -7,7 +7,8 @@ namespace Ibexa\Tests\Core\FieldType; -use Ibexa\Core\Base\Exceptions\InvalidArgumentException; +use Ibexa\Contracts\Core\Exception\InvalidArgumentType; +use Ibexa\Core\FieldType\FieldType; use Ibexa\Core\FieldType\TextLine\Type as TextLineType; use Ibexa\Core\FieldType\TextLine\Value as TextLineValue; use Ibexa\Core\FieldType\ValidationError; @@ -16,20 +17,14 @@ * @group fieldType * @group ezstring */ -class TextLineTest extends FieldTypeTest +final class TextLineTest extends FieldTypeTest { - /** - * Returns the field type under test. - * - * This method is used by all test cases to retrieve the field type under - * test. Just create the FieldType instance using mocks from the provided - * get*Mock() methods and/or custom get*Mock() implementations. You MUST - * NOT take care for test case wide caching of the field type, just return - * a new instance from this method! - * - * @return \Ibexa\Core\FieldType\FieldType - */ - protected function createFieldTypeUnderTest() + private const string STRING_TOO_SHORT_EXPECTED_SINGULAR_MESSAGE = 'The string cannot be shorter than %size% character.'; + private const string STRING_TOO_SHORT_EXPECTED_PLURAL_MESSAGE = 'The string cannot be shorter than %size% characters.'; + private const string SIZE_PARAM_NAME = '%size%'; + private const string SAMPLE_TEXT_LINE_VALUE = ' sindelfingen '; + + protected function createFieldTypeUnderTest(): FieldType { $fieldType = new TextLineType(); $fieldType->setTransformationProcessor($this->getTransformationProcessorMock()); @@ -38,11 +33,9 @@ protected function createFieldTypeUnderTest() } /** - * Returns the validator configuration schema expected from the field type. - * - * @return array + * @return array> */ - protected function getValidatorConfigurationSchemaExpectation() + protected function getValidatorConfigurationSchemaExpectation(): array { return [ 'StringLengthValidator' => [ @@ -59,69 +52,35 @@ protected function getValidatorConfigurationSchemaExpectation() } /** - * Returns the settings schema expected from the field type. - * - * @return array + * @return array */ - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return []; } - /** - * Returns the empty value expected from the field type. - * - * @return \Ibexa\Core\FieldType\TextLine\Value - */ - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): TextLineValue { return new TextLineValue(); } - public function provideInvalidInputForAcceptValue() + /** + * @return list + */ + public function provideInvalidInputForAcceptValue(): array { return [ [ 23, - InvalidArgumentException::class, - ], - [ - new TextLineValue(23), - InvalidArgumentException::class, + InvalidArgumentType::class, ], ]; } /** - * Data provider for valid input to acceptValue(). - * - * Returns an array of data provider sets with 2 arguments: 1. The valid - * input to acceptValue(), 2. The expected return value from acceptValue(). - * For example: - * - * - * return array( - * array( - * null, - * null - * ), - * array( - * __FILE__, - * new BinaryFileValue( array( - * 'path' => __FILE__, - * 'fileName' => basename( __FILE__ ), - * 'fileSize' => filesize( __FILE__ ), - * 'downloadCount' => 0, - * 'mimeType' => 'text/plain', - * ) ) - * ), - * // ... - * ); - * - * - * @return array + * @return list */ - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ @@ -137,12 +96,12 @@ public function provideValidInputForAcceptValue() new TextLineValue(), ], [ - ' sindelfingen ', - new TextLineValue(' sindelfingen '), + self::SAMPLE_TEXT_LINE_VALUE, + new TextLineValue(self::SAMPLE_TEXT_LINE_VALUE), ], [ - new TextLineValue(' sindelfingen '), - new TextLineValue(' sindelfingen '), + new TextLineValue(self::SAMPLE_TEXT_LINE_VALUE), + new TextLineValue(self::SAMPLE_TEXT_LINE_VALUE), ], [ // 11+ numbers - EZP-21771 @@ -165,41 +124,9 @@ public function provideValidInputForAcceptValue() } /** - * Provide input for the toHash() method. - * - * Returns an array of data provider sets with 2 arguments: 1. The valid - * input to toHash(), 2. The expected return value from toHash(). - * For example: - * - * - * return array( - * array( - * null, - * null - * ), - * array( - * new BinaryFileValue( array( - * 'path' => 'some/file/here', - * 'fileName' => 'sindelfingen.jpg', - * 'fileSize' => 2342, - * 'downloadCount' => 0, - * 'mimeType' => 'image/jpeg', - * ) ), - * array( - * 'path' => 'some/file/here', - * 'fileName' => 'sindelfingen.jpg', - * 'fileSize' => 2342, - * 'downloadCount' => 0, - * 'mimeType' => 'image/jpeg', - * ) - * ), - * // ... - * ); - * - * - * @return array + * @return list */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ @@ -211,48 +138,16 @@ public function provideInputForToHash() null, ], [ - new TextLineValue('sindelfingen'), - 'sindelfingen', + new TextLineValue(self::SAMPLE_TEXT_LINE_VALUE), + self::SAMPLE_TEXT_LINE_VALUE, ], ]; } /** - * Provide input to fromHash() method. - * - * Returns an array of data provider sets with 2 arguments: 1. The valid - * input to fromHash(), 2. The expected return value from fromHash(). - * For example: - * - * - * return array( - * array( - * null, - * null - * ), - * array( - * array( - * 'path' => 'some/file/here', - * 'fileName' => 'sindelfingen.jpg', - * 'fileSize' => 2342, - * 'downloadCount' => 0, - * 'mimeType' => 'image/jpeg', - * ), - * new BinaryFileValue( array( - * 'path' => 'some/file/here', - * 'fileName' => 'sindelfingen.jpg', - * 'fileSize' => 2342, - * 'downloadCount' => 0, - * 'mimeType' => 'image/jpeg', - * ) ) - * ), - * // ... - * ); - * - * - * @return array + * @return list */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { return [ [ @@ -264,41 +159,16 @@ public function provideInputForFromHash() new TextLineValue(), ], [ - 'sindelfingen', - new TextLineValue('sindelfingen'), + self::SAMPLE_TEXT_LINE_VALUE, + new TextLineValue(self::SAMPLE_TEXT_LINE_VALUE), ], ]; } /** - * Provide data sets with validator configurations which are considered - * valid by the {@link validateValidatorConfiguration()} method. - * - * Returns an array of data provider sets with a single argument: A valid - * set of validator configurations. - * - * For example: - * - * - * return array( - * array( - * array(), - * ), - * array( - * array( - * 'StringLengthValidator' => array( - * 'minStringLength' => 0, - * 'maxStringLength' => 23, - * ) - * ) - * ), - * // ... - * ); - * - * - * @return array + * @return list}> */ - public function provideValidValidatorConfiguration() + public function provideValidValidatorConfiguration(): array { return [ [ @@ -344,48 +214,9 @@ public function provideValidValidatorConfiguration() } /** - * Provide data sets with validator configurations which are considered - * invalid by the {@link validateValidatorConfiguration()} method. The - * method must return a non-empty array of valiation errors when receiving - * one of the provided values. - * - * Returns an array of data provider sets with a single argument: A valid - * set of validator configurations. - * - * For example: - * - * - * return array( - * array( - * array( - * 'NonExistentValidator' => array(), - * ), - * ), - * array( - * array( - * // Typos - * 'InTEgervALUeVALIdator' => array( - * 'iinStringLength' => 0, - * 'maxStringLength' => 23, - * ) - * ) - * ), - * array( - * array( - * 'StringLengthValidator' => array( - * // Incorrect value types - * 'minStringLength' => true, - * 'maxStringLength' => false, - * ) - * ) - * ), - * // ... - * ); - * - * - * @return array + * @return list}> */ - public function provideInvalidValidatorConfiguration() + public function provideInvalidValidatorConfiguration(): array { return [ [ @@ -444,6 +275,9 @@ protected function provideFieldTypeIdentifier() return 'ezstring'; } + /** + * @return list, string}> + */ public function provideDataForGetName(): array { return [ @@ -453,51 +287,9 @@ public function provideDataForGetName(): array } /** - * Provides data sets with validator configuration and/or field settings and - * field value which are considered valid by the {@link validate()} method. - * - * ATTENTION: This is a default implementation, which must be overwritten if - * a FieldType supports validation! - * - * For example: - * - * - * return array( - * array( - * array( - * "validatorConfiguration" => array( - * "StringLengthValidator" => array( - * "minStringLength" => 2, - * "maxStringLength" => 10, - * ), - * ), - * ), - * new TextLineValue( "lalalala" ), - * ), - * array( - * array( - * "fieldSettings" => array( - * 'isMultiple' => true - * ), - * ), - * new CountryValue( - * array( - * "BE" => array( - * "Name" => "Belgium", - * "Alpha2" => "BE", - * "Alpha3" => "BEL", - * "IDC" => 32, - * ), - * ), - * ), - * ), - * // ... - * ); - * - * - * @return array + * @return list, \Ibexa\Core\FieldType\TextLine\Value}> */ - public function provideValidDataForValidate() + public function provideValidDataForValidate(): array { return [ [ @@ -535,70 +327,9 @@ public function provideValidDataForValidate() } /** - * Provides data sets with validator configuration and/or field settings, - * field value and corresponding validation errors returned by - * the {@link validate()} method. - * - * ATTENTION: This is a default implementation, which must be overwritten - * if a FieldType supports validation! - * - * For example: - * - * - * return array( - * array( - * array( - * "validatorConfiguration" => array( - * "IntegerValueValidator" => array( - * "minIntegerValue" => 5, - * "maxIntegerValue" => 10 - * ), - * ), - * ), - * new IntegerValue( 3 ), - * array( - * new ValidationError( - * "The value can not be lower than %size%.", - * null, - * array( - * "size" => 5 - * ), - * ), - * ), - * ), - * array( - * array( - * "fieldSettings" => array( - * "isMultiple" => false - * ), - * ), - * new CountryValue( - * "BE" => array( - * "Name" => "Belgium", - * "Alpha2" => "BE", - * "Alpha3" => "BEL", - * "IDC" => 32, - * ), - * "FR" => array( - * "Name" => "France", - * "Alpha2" => "FR", - * "Alpha3" => "FRA", - * "IDC" => 33, - * ), - * ) - * ), - * array( - * new ValidationError( - * "Field definition does not allow multiple countries to be selected." - * ), - * ), - * // ... - * ); - * - * - * @return array + * @return list, \Ibexa\Core\FieldType\TextLine\Value, list<\Ibexa\Core\FieldType\ValidationError>}> */ - public function provideInvalidDataForValidate() + public function provideInvalidDataForValidate(): array { return [ [ @@ -613,10 +344,10 @@ public function provideInvalidDataForValidate() new TextLineValue('aaa'), [ new ValidationError( - 'The string cannot be shorter than %size% character.', - 'The string cannot be shorter than %size% characters.', + self::STRING_TOO_SHORT_EXPECTED_SINGULAR_MESSAGE, + self::STRING_TOO_SHORT_EXPECTED_PLURAL_MESSAGE, [ - '%size%' => 5, + self::SIZE_PARAM_NAME => 5, ], 'text' ), @@ -637,7 +368,7 @@ public function provideInvalidDataForValidate() 'The string can not exceed %size% character.', 'The string can not exceed %size% characters.', [ - '%size%' => 10, + self::SIZE_PARAM_NAME => 10, ], 'text' ), @@ -658,15 +389,15 @@ public function provideInvalidDataForValidate() 'The string can not exceed %size% character.', 'The string can not exceed %size% characters.', [ - '%size%' => 5, + self::SIZE_PARAM_NAME => 5, ], 'text' ), new ValidationError( - 'The string cannot be shorter than %size% character.', - 'The string cannot be shorter than %size% characters.', + self::STRING_TOO_SHORT_EXPECTED_SINGULAR_MESSAGE, + self::STRING_TOO_SHORT_EXPECTED_PLURAL_MESSAGE, [ - '%size%' => 10, + self::SIZE_PARAM_NAME => 10, ], 'text' ), @@ -684,10 +415,10 @@ public function provideInvalidDataForValidate() new TextLineValue('ABC♔'), [ new ValidationError( - 'The string cannot be shorter than %size% character.', - 'The string cannot be shorter than %size% characters.', + self::STRING_TOO_SHORT_EXPECTED_SINGULAR_MESSAGE, + self::STRING_TOO_SHORT_EXPECTED_PLURAL_MESSAGE, [ - '%size%' => 5, + self::SIZE_PARAM_NAME => 5, ], 'text' ), From 61ddcc520de1f6b7d2b8dd9305c0fad78e2b5b2c Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 27 Aug 2024 11:38:55 +0200 Subject: [PATCH 30/53] Extracted common code for Binary and Media field type (#407) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For more details see https://github.com/ibexa/core/pull/407 Key changes: * Extracted redundant Binary and Media SearchField into a common base * [Tests] Extracted common base for Binary and Media ft integration tests * [Tests] Made MediaIntegrationTest::getValidFieldSettings return type more strict * [PHPStan] Aligned baseline with the changes --------- Co-authored-by: Adam Wójs Co-authored-by: Mikolaj Adamczyk --- phpstan-baseline.neon | 185 ---------- .../BinaryBase/AbstractBinarySearchField.php | 66 ++++ src/lib/FieldType/BinaryFile/SearchField.php | 65 +--- src/lib/FieldType/Media/SearchField.php | 65 +--- .../BaseBinaryFileIntegrationTestCase.php | 259 ++++++++++++++ .../FieldType/BinaryFileIntegrationTest.php | 324 ++---------------- .../FieldType/MediaIntegrationTest.php | 318 ++--------------- 7 files changed, 381 insertions(+), 901 deletions(-) create mode 100644 src/lib/FieldType/BinaryBase/AbstractBinarySearchField.php create mode 100644 tests/integration/Core/Repository/FieldType/BaseBinaryFileIntegrationTestCase.php diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index a126cb12d1..b53ddd9647 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -29310,101 +29310,6 @@ parameters: count: 1 path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\BinaryFileIntegrationTest\\:\\:assertCopiedFieldDataLoadedCorrectly\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\BinaryFileIntegrationTest\\:\\:assertFieldDataLoadedCorrect\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\BinaryFileIntegrationTest\\:\\:assertUpdatedFieldDataLoadedCorrect\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\BinaryFileIntegrationTest\\:\\:assertUpdatedFieldDataLoadedCorrect\\(\\) should return array but return statement is missing\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\BinaryFileIntegrationTest\\:\\:checkSearchEngineSupport\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\BinaryFileIntegrationTest\\:\\:getAdditionallyIndexedFieldData\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\BinaryFileIntegrationTest\\:\\:getFixtureData\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\BinaryFileIntegrationTest\\:\\:getSettingsSchema\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\BinaryFileIntegrationTest\\:\\:getStoragePrefix\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\BinaryFileIntegrationTest\\:\\:getValidUpdateFieldData\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\BinaryFileIntegrationTest\\:\\:getValidUpdateFieldData\\(\\) should return array but returns Ibexa\\\\Core\\\\FieldType\\\\BinaryFile\\\\Value\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\BinaryFileIntegrationTest\\:\\:getValidatorSchema\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\BinaryFileIntegrationTest\\:\\:provideFromHashData\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\BinaryFileIntegrationTest\\:\\:provideInvalidCreationFieldData\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\BinaryFileIntegrationTest\\:\\:provideInvalidUpdateFieldData\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\BinaryFileIntegrationTest\\:\\:provideToHashData\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\BinaryFileIntegrationTest\\:\\:providerForTestIsEmptyValue\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\BinaryFileIntegrationTest\\:\\:providerForTestIsNotEmptyValue\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php - - - - message: "#^Property Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\BinaryFileIntegrationTest\\:\\:\\$loadedBinaryFilePath has no type specified\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php - - message: "#^Cannot access property \\$value on Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Field\\|null\\.$#" count: 1 @@ -30305,96 +30210,6 @@ parameters: count: 1 path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\MediaIntegrationTest\\:\\:assertCopiedFieldDataLoadedCorrectly\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\MediaIntegrationTest\\:\\:assertFieldDataLoadedCorrect\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\MediaIntegrationTest\\:\\:assertUpdatedFieldDataLoadedCorrect\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\MediaIntegrationTest\\:\\:assertUpdatedFieldDataLoadedCorrect\\(\\) should return array but return statement is missing\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\MediaIntegrationTest\\:\\:getAdditionallyIndexedFieldData\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\MediaIntegrationTest\\:\\:getFixtureData\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\MediaIntegrationTest\\:\\:getSettingsSchema\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\MediaIntegrationTest\\:\\:getStoragePrefix\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\MediaIntegrationTest\\:\\:getValidUpdateFieldData\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\MediaIntegrationTest\\:\\:getValidUpdateFieldData\\(\\) should return array but returns Ibexa\\\\Core\\\\FieldType\\\\Media\\\\Value\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\MediaIntegrationTest\\:\\:getValidatorSchema\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\MediaIntegrationTest\\:\\:provideFromHashData\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\MediaIntegrationTest\\:\\:provideInvalidCreationFieldData\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\MediaIntegrationTest\\:\\:provideInvalidUpdateFieldData\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\MediaIntegrationTest\\:\\:provideToHashData\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\MediaIntegrationTest\\:\\:providerForTestIsEmptyValue\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\MediaIntegrationTest\\:\\:providerForTestIsNotEmptyValue\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php - - - - message: "#^Property Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\MediaIntegrationTest\\:\\:\\$loadedMediaPath has no type specified\\.$#" - count: 1 - path: tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\FieldType\\\\RelationIntegrationTest\\:\\:assertCopiedFieldDataLoadedCorrectly\\(\\) has no return type specified\\.$#" count: 1 diff --git a/src/lib/FieldType/BinaryBase/AbstractBinarySearchField.php b/src/lib/FieldType/BinaryBase/AbstractBinarySearchField.php new file mode 100644 index 0000000000..f6cdf6571c --- /dev/null +++ b/src/lib/FieldType/BinaryBase/AbstractBinarySearchField.php @@ -0,0 +1,66 @@ +value->externalData['fileName'] ?? null, + new Search\FieldType\StringField() + ), + new Search\Field( + 'file_size', + $field->value->externalData['fileSize'] ?? null, + new Search\FieldType\IntegerField() + ), + new Search\Field( + 'mime_type', + $field->value->externalData['mimeType'] ?? null, + new Search\FieldType\StringField() + ), + ]; + } + + /** + * @return array + */ + public function getIndexDefinition(): array + { + return [ + 'file_name' => new Search\FieldType\StringField(), + 'file_size' => new Search\FieldType\IntegerField(), + 'mime_type' => new Search\FieldType\StringField(), + ]; + } + + public function getDefaultMatchField(): string + { + return 'file_name'; + } + + public function getDefaultSortField(): string + { + return $this->getDefaultMatchField(); + } +} diff --git a/src/lib/FieldType/BinaryFile/SearchField.php b/src/lib/FieldType/BinaryFile/SearchField.php index 8857116de7..3a8ed5a018 100644 --- a/src/lib/FieldType/BinaryFile/SearchField.php +++ b/src/lib/FieldType/BinaryFile/SearchField.php @@ -4,74 +4,15 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Core\FieldType\BinaryFile; -use Ibexa\Contracts\Core\FieldType\Indexable; -use Ibexa\Contracts\Core\Persistence\Content\Field; -use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition; -use Ibexa\Contracts\Core\Search; +use Ibexa\Core\FieldType\BinaryBase\AbstractBinarySearchField; /** * Indexable definition for BinaryFile field type. */ -class SearchField implements Indexable +class SearchField extends AbstractBinarySearchField { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) - { - return [ - new Search\Field( - 'file_name', - $field->value->externalData['fileName'] ?? null, - new Search\FieldType\StringField() - ), - new Search\Field( - 'file_size', - $field->value->externalData['fileSize'] ?? null, - new Search\FieldType\IntegerField() - ), - new Search\Field( - 'mime_type', - $field->value->externalData['mimeType'] ?? null, - new Search\FieldType\StringField() - ), - ]; - } - - public function getIndexDefinition() - { - return [ - 'file_name' => new Search\FieldType\StringField(), - 'file_size' => new Search\FieldType\IntegerField(), - 'mime_type' => new Search\FieldType\StringField(), - ]; - } - - /** - * Get name of the default field to be used for matching. - * - * As field types can index multiple fields (see MapLocation field type's - * implementation of this interface), this method is used to define default - * field for matching. Default field is typically used by Field criterion. - * - * @return string - */ - public function getDefaultMatchField() - { - return 'file_name'; - } - - /** - * Get name of the default field to be used for sorting. - * - * As field types can index multiple fields (see MapLocation field type's - * implementation of this interface), this method is used to define default - * field for sorting. Default field is typically used by Field sort clause. - * - * @return string - */ - public function getDefaultSortField() - { - return $this->getDefaultMatchField(); - } } diff --git a/src/lib/FieldType/Media/SearchField.php b/src/lib/FieldType/Media/SearchField.php index 11d8a94cce..36c91b9bef 100644 --- a/src/lib/FieldType/Media/SearchField.php +++ b/src/lib/FieldType/Media/SearchField.php @@ -4,74 +4,15 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Core\FieldType\Media; -use Ibexa\Contracts\Core\FieldType\Indexable; -use Ibexa\Contracts\Core\Persistence\Content\Field; -use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition; -use Ibexa\Contracts\Core\Search; +use Ibexa\Core\FieldType\BinaryBase\AbstractBinarySearchField; /** * Indexable definition for Media field type. */ -class SearchField implements Indexable +class SearchField extends AbstractBinarySearchField { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) - { - return [ - new Search\Field( - 'file_name', - $field->value->externalData['fileName'] ?? null, - new Search\FieldType\StringField() - ), - new Search\Field( - 'file_size', - $field->value->externalData['fileSize'] ?? null, - new Search\FieldType\IntegerField() - ), - new Search\Field( - 'mime_type', - $field->value->externalData['mimeType'] ?? null, - new Search\FieldType\StringField() - ), - ]; - } - - public function getIndexDefinition() - { - return [ - 'file_name' => new Search\FieldType\StringField(), - 'file_size' => new Search\FieldType\IntegerField(), - 'mime_type' => new Search\FieldType\StringField(), - ]; - } - - /** - * Get name of the default field to be used for matching. - * - * As field types can index multiple fields (see MapLocation field type's - * implementation of this interface), this method is used to define default - * field for matching. Default field is typically used by Field criterion. - * - * @return string - */ - public function getDefaultMatchField() - { - return 'file_name'; - } - - /** - * Get name of the default field to be used for sorting. - * - * As field types can index multiple fields (see MapLocation field type's - * implementation of this interface), this method is used to define default - * field for sorting. Default field is typically used by Field sort clause. - * - * @return string - */ - public function getDefaultSortField() - { - return $this->getDefaultMatchField(); - } } diff --git a/tests/integration/Core/Repository/FieldType/BaseBinaryFileIntegrationTestCase.php b/tests/integration/Core/Repository/FieldType/BaseBinaryFileIntegrationTestCase.php new file mode 100644 index 0000000000..2407b54b66 --- /dev/null +++ b/tests/integration/Core/Repository/FieldType/BaseBinaryFileIntegrationTestCase.php @@ -0,0 +1,259 @@ + + */ + abstract public function provideFromHashData(): array; + + /** + * @phpstan-return list + */ + abstract public function provideToHashData(): array; + + /** + * @phpstan-param TBaseBinaryFileFieldValueHash $fileFieldValueData + */ + abstract protected function buildBinaryFileValueFromFixtureData(array $fileFieldValueData): BinaryBaseValue; + + public function assertFieldDataLoadedCorrect(Field $field): void + { + $this->asserFieldValueIsCorrectInstance($field); + + $fixtureData = $this->getFixtureData(); + $this->assertCreatedUpdatedBinaryFieldDataLoadedCorrectly($fixtureData['create'], $field); + } + + public function assertUpdatedFieldDataLoadedCorrect(Field $field): void + { + $this->asserFieldValueIsCorrectInstance($field); + + $fixtureData = $this->getFixtureData(); + $this->assertCreatedUpdatedBinaryFieldDataLoadedCorrectly($fixtureData['update'], $field); + } + + public function assertCopiedFieldDataLoadedCorrectly(Field $field): void + { + $this->assertFieldDataLoadedCorrect($field); + + self::assertEquals( + self::$loadedFilePath, + $field->value->id + ); + } + + /** + * @return array + */ + public function getInvalidFieldSettings(): array + { + return [ + 'somethingUnknown' => 0, + ]; + } + + /** + * @return array> + */ + public function getValidatorSchema(): array + { + return [ + 'FileSizeValidator' => [ + 'maxFileSize' => [ + 'type' => 'int', + 'default' => false, + ], + ], + ]; + } + + /** + * @return array> + */ + public function getValidValidatorConfiguration(): array + { + return [ + 'FileSizeValidator' => [ + 'maxFileSize' => 2 * 1024 * 1024, // 2 MB + ], + ]; + } + + /** + * @return array> + */ + public function getInvalidValidatorConfiguration(): array + { + return [ + 'StringLengthValidator' => [ + 'minStringLength' => new \stdClass(), + ], + ]; + } + + public function getFieldName(): string + { + return 'Icy-Night-Flower-Binary.jpg'; + } + + /** + * @return list + */ + public function provideInvalidCreationFieldData(): array + { + return [ + [ + [ + 'id' => self::FOO_BAR_SAMPLE_FILE_PATH, + ], + InvalidArgumentValue::class, + ], + [ + $this->buildBinaryFileValue(self::FOO_BAR_SAMPLE_FILE_PATH), + InvalidArgumentValue::class, + ], + ]; + } + + public function getValidCreationFieldData(): BinaryBaseValue + { + $fixtureData = $this->getFixtureData(); + + return $this->buildBinaryFileValueFromFixtureData($fixtureData['create']); + } + + public function getValidUpdateFieldData(): BinaryBaseValue + { + $fixtureData = $this->getFixtureData(); + + return $this->buildBinaryFileValueFromFixtureData($fixtureData['update']); + } + + /** + * @return list> + */ + public function providerForTestIsNotEmptyValue(): array + { + return [ + [ + $this->getValidCreationFieldData(), + ], + ]; + } + + /** + * @return list + */ + public function provideInvalidUpdateFieldData(): array + { + return $this->provideInvalidCreationFieldData(); + } + + protected function getStoragePrefix(): string + { + $configValue = $this->getConfigValue(self::$storagePrefixConfigKey); + if (!is_string($configValue)) { + self::fail(sprintf('"%s" config key value is not a string', self::$storagePrefixConfigKey)); + } + + return $configValue; + } + + protected function getSearchTargetValueOne(): string + { + $value = $this->getValidSearchValueOne(); + + // ensure case-insensitivity + return strtoupper($value->fileName); + } + + protected function getSearchTargetValueTwo(): string + { + $value = $this->getValidSearchValueTwo(); + + // ensure case-insensitivity + return strtoupper($value->fileName); + } + + /** + * @return list> + */ + protected function getAdditionallyIndexedFieldData(): array + { + return [ + [ + 'file_size', + $this->getValidSearchValueOne()->fileSize, + $this->getValidSearchValueTwo()->fileSize, + ], + [ + 'mime_type', + // ensure case-insensitivity + 'IMAGE/JPEG', + 'IMAGE/PNG', + ], + ]; + } + + /** + * @phpstan-param TBaseBinaryFileFieldValueHash $expectedData + */ + private function assertCreatedUpdatedBinaryFieldDataLoadedCorrectly(array $expectedData, Field $field): void + { + // Will change during storage + unset($expectedData['id']); + $expectedData['inputUri'] = null; + + self::assertNotEmpty($field->value->id); + self::assertInstanceOf(BinaryBaseValue::class, $field->value); + $this->assertPropertiesCorrect( + $expectedData, + $field->value + ); + + self::assertTrue( + $this->uriExistsOnIO($field->value->uri), + "File {$field->value->uri} doesn't exist." + ); + + self::$loadedFilePath = $field->value->id; + } +} diff --git a/tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php b/tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php index 63362afc50..0d7e51ddfc 100644 --- a/tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php @@ -4,12 +4,13 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Values\Content\Field; use Ibexa\Contracts\Core\Test\Repository\SetupFactory\Legacy; -use Ibexa\Core\Base\Exceptions\InvalidArgumentValue; +use Ibexa\Core\FieldType\BinaryBase\Value as BinaryBaseValue; use Ibexa\Core\FieldType\BinaryFile\Value as BinaryFileValue; /** @@ -18,31 +19,9 @@ * @group integration * @group field-type */ -class BinaryFileIntegrationTest extends FileSearchBaseIntegrationTest +final class BinaryFileIntegrationTest extends BaseBinaryFileIntegrationTestCase { - /** - * Stores the loaded image path for copy test. - */ - protected static $loadedBinaryFilePath; - - /** - * IOService storage prefix for the tested Type's files. - * - * @var string - */ - protected static $storagePrefixConfigKey = 'ibexa.io.binary_file.storage.prefix'; - - protected function getStoragePrefix() - { - return $this->getConfigValue(self::$storagePrefixConfigKey); - } - - /** - * Sets up fixture data. - * - * @return array - */ - protected function getFixtureData() + protected function getFixtureData(): array { return [ 'create' => [ @@ -51,7 +30,7 @@ protected function getFixtureData() 'fileName' => 'Icy-Night-Flower-Binary.jpg', 'fileSize' => filesize($path), 'mimeType' => 'image/jpeg', - // Left out'downloadCount' by intention (will be set to 0) + // Left out 'downloadCount' by intention (will be set to 0) ], 'update' => [ 'id' => null, @@ -75,249 +54,44 @@ public function getTypeName() } /** - * Get expected settings schema. - * - * @return array + * @return array{} */ - public function getSettingsSchema() + public function getSettingsSchema(): array { return []; } /** - * Get a valid $fieldSettings value. - * - * @return mixed + * @return array{} */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return []; } - /** - * Get $fieldSettings value not accepted by the field type. - * - * @return mixed - */ - public function getInvalidFieldSettings() + protected function buildBinaryFileValueFromFixtureData(array $fileFieldValueData): BinaryBaseValue { - return [ - 'somethingUnknown' => 0, - ]; + return new BinaryFileValue($fileFieldValueData); } - /** - * Get expected validator schema. - * - * @return array - */ - public function getValidatorSchema() - { - return [ - 'FileSizeValidator' => [ - 'maxFileSize' => [ - 'type' => 'int', - 'default' => false, - ], - ], - ]; - } - - /** - * Get a valid $validatorConfiguration. - * - * @return mixed - */ - public function getValidValidatorConfiguration() - { - return [ - 'FileSizeValidator' => [ - 'maxFileSize' => 2 * 1024 * 1024, // 2 MB - ], - ]; - } - - /** - * Get $validatorConfiguration not accepted by the field type. - * - * @return mixed - */ - public function getInvalidValidatorConfiguration() - { - return [ - 'StringLengthValidator' => [ - 'minStringLength' => new \stdClass(), - ], - ]; - } - - /** - * Get initial field data for valid object creation. - * - * @return mixed - */ - public function getValidCreationFieldData() - { - $fixtureData = $this->getFixtureData(); - - return new BinaryFileValue($fixtureData['create']); - } - - /** - * Get name generated by the given field type (via fieldType->getName()). - * - * @return string - */ - public function getFieldName() - { - return 'Icy-Night-Flower-Binary.jpg'; - } - - /** - * Asserts that the field data was loaded correctly. - * - * Asserts that the data provided by {@link getValidCreationFieldData()} - * was stored and loaded correctly. - * - * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field - */ - public function assertFieldDataLoadedCorrect(Field $field) + public function asserFieldValueIsCorrectInstance(Field $field): void { self::assertInstanceOf( BinaryFileValue::class, $field->value ); - - $fixtureData = $this->getFixtureData(); - $expectedData = $fixtureData['create']; - - // Will change during storage - unset($expectedData['id']); - $expectedData['inputUri'] = null; - - self::assertNotEmpty($field->value->id); - $this->assertPropertiesCorrect( - $expectedData, - $field->value - ); - - self::assertTrue( - $this->uriExistsOnIO($field->value->uri), - "File {$field->value->uri} doesn't exist" - ); - - self::$loadedBinaryFilePath = $field->value->id; } - public function provideInvalidCreationFieldData() + protected function buildBinaryFileValue(string $fileId): BinaryBaseValue { - return [ - [ - [ - 'id' => '/foo/bar/sindelfingen.pdf', - ], - InvalidArgumentValue::class, - ], + return new BinaryFileValue( [ - new BinaryFileValue( - [ - 'id' => '/foo/bar/sindelfingen.pdf', - ] - ), - InvalidArgumentValue::class, - ], - ]; - } - - /** - * Get update field externals data. - * - * @return array - */ - public function getValidUpdateFieldData() - { - $fixtureData = $this->getFixtureData(); - - return new BinaryFileValue($fixtureData['update']); - } - - /** - * Get externals updated field data values. - * - * This is a PHPUnit data provider - * - * @return array - */ - public function assertUpdatedFieldDataLoadedCorrect(Field $field) - { - self::assertInstanceOf( - BinaryFileValue::class, - $field->value - ); - - $fixtureData = $this->getFixtureData(); - $expectedData = $fixtureData['update']; - - // Will change during storage - unset($expectedData['id']); - $expectedData['inputUri'] = null; - - self::assertNotEmpty($field->value->id); - $this->assertPropertiesCorrect( - $expectedData, - $field->value - ); - - self::assertTrue( - $this->uriExistsOnIO($field->value->uri), - "File {$field->value->uri} doesn't exist." - ); - } - - public function provideInvalidUpdateFieldData() - { - return $this->provideInvalidCreationFieldData(); - } - - /** - * Asserts the the field data was loaded correctly. - * - * Asserts that the data provided by {@link getValidCreationFieldData()} - * was copied and loaded correctly. - * - * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field - */ - public function assertCopiedFieldDataLoadedCorrectly(Field $field) - { - $this->assertFieldDataLoadedCorrect($field); - - self::assertEquals( - self::$loadedBinaryFilePath, - $field->value->id + 'id' => $fileId, + ] ); } - /** - * Get data to test to hash method. - * - * This is a PHPUnit data provider - * - * The returned records must have the the original value assigned to the - * first index and the expected hash result to the second. For example: - * - * - * array( - * array( - * new MyValue( true ), - * array( 'myValue' => true ), - * ), - * // ... - * ); - * - * - * @return array - */ - public function provideToHashData() + public function provideToHashData(): array { $fixture = $this->getFixtureData(); $expected = $fixture['create']; @@ -336,14 +110,7 @@ public function provideToHashData() ]; } - /** - * Get expectations for the fromHash call on our field value. - * - * This is a PHPUnit data provider - * - * @return array - */ - public function provideFromHashData() + public function provideFromHashData(): array { $fixture = $this->getFixtureData(); $fixture['create']['downloadCount'] = 0; @@ -360,7 +127,10 @@ public function provideFromHashData() ]; } - public function providerForTestIsEmptyValue() + /** + * @return list> + */ + public function providerForTestIsEmptyValue(): array { return [ [new BinaryFileValue()], @@ -368,16 +138,7 @@ public function providerForTestIsEmptyValue() ]; } - public function providerForTestIsNotEmptyValue() - { - return [ - [ - $this->getValidCreationFieldData(), - ], - ]; - } - - protected function getValidSearchValueOne() + protected function getValidSearchValueOne(): BinaryFileValue { return new BinaryFileValue( [ @@ -391,8 +152,10 @@ protected function getValidSearchValueOne() /** * BinaryFile field type is not searchable with Field criterion * and sort clause in Legacy search engine. + * + * @throws \ErrorException */ - protected function checkSearchEngineSupport() + protected function checkSearchEngineSupport(): void { if ($this->getSetupFactory() instanceof Legacy) { self::markTestSkipped( @@ -401,7 +164,7 @@ protected function checkSearchEngineSupport() } } - protected function getValidSearchValueTwo() + protected function getValidSearchValueTwo(): BinaryFileValue { return new BinaryFileValue( [ @@ -411,37 +174,4 @@ protected function getValidSearchValueTwo() ] ); } - - protected function getSearchTargetValueOne() - { - $value = $this->getValidSearchValueOne(); - - // ensure case-insensitivity - return strtoupper($value->fileName); - } - - protected function getSearchTargetValueTwo() - { - $value = $this->getValidSearchValueTwo(); - - // ensure case-insensitivity - return strtoupper($value->fileName); - } - - protected function getAdditionallyIndexedFieldData() - { - return [ - [ - 'file_size', - $this->getValidSearchValueOne()->fileSize, - $this->getValidSearchValueTwo()->fileSize, - ], - [ - 'mime_type', - // ensure case-insensitivity - 'IMAGE/JPEG', - 'IMAGE/PNG', - ], - ]; - } } diff --git a/tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php b/tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php index 75534b2652..4ab6d1bed9 100644 --- a/tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php @@ -4,11 +4,12 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Tests\Integration\Core\Repository\FieldType; use Ibexa\Contracts\Core\Repository\Values\Content\Field; -use Ibexa\Core\Base\Exceptions\InvalidArgumentValue; +use Ibexa\Core\FieldType\BinaryBase\Value as BinaryBaseValue; use Ibexa\Core\FieldType\Media\Type as MediaType; use Ibexa\Core\FieldType\Media\Value as MediaValue; @@ -18,31 +19,9 @@ * @group integration * @group field-type */ -class MediaIntegrationTest extends FileSearchBaseIntegrationTest +final class MediaIntegrationTest extends BaseBinaryFileIntegrationTestCase { - /** - * Stores the loaded image path for copy test. - */ - protected static $loadedMediaPath; - - /** - * IOService storage prefix for the tested Type's files. - * - * @var string - */ - protected static $storagePrefixConfigKey = 'ibexa.io.binary_file.storage.prefix'; - - protected function getStoragePrefix() - { - return $this->getConfigValue(self::$storagePrefixConfigKey); - } - - /** - * Sets up fixture data. - * - * @return array - */ - protected function getFixtureData() + protected function getFixtureData(): array { return [ 'create' => [ @@ -80,11 +59,9 @@ public function getTypeName() } /** - * Get expected settings schema. - * - * @return array + * @return array */ - public function getSettingsSchema() + public function getSettingsSchema(): array { return [ 'mediaType' => [ @@ -95,241 +72,38 @@ public function getSettingsSchema() } /** - * Get a valid $fieldSettings value. - * - * @return mixed + * @return array */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return [ 'mediaType' => MediaType::TYPE_FLASH, ]; } - /** - * Get $fieldSettings value not accepted by the field type. - * - * @return mixed - */ - public function getInvalidFieldSettings() - { - return [ - 'somethingUnknown' => 0, - ]; - } - - /** - * Get expected validator schema. - * - * @return array - */ - public function getValidatorSchema() - { - return [ - 'FileSizeValidator' => [ - 'maxFileSize' => [ - 'type' => 'int', - 'default' => false, - ], - ], - ]; - } - - /** - * Get a valid $validatorConfiguration. - * - * @return mixed - */ - public function getValidValidatorConfiguration() - { - return [ - 'FileSizeValidator' => [ - 'maxFileSize' => 2 * 1024 * 1024, // 2 MB - ], - ]; - } - - /** - * Get $validatorConfiguration not accepted by the field type. - * - * @return mixed - */ - public function getInvalidValidatorConfiguration() - { - return [ - 'StringLengthValidator' => [ - 'minStringLength' => new \stdClass(), - ], - ]; - } - - /** - * Get initial field data for valid object creation. - * - * @return mixed - */ - public function getValidCreationFieldData() - { - $fixtureData = $this->getFixtureData(); - - return new MediaValue($fixtureData['create']); - } - - /** - * Get name generated by the given field type (via or fieldType->getName()). - * - * @return string - */ - public function getFieldName() + protected function buildBinaryFileValueFromFixtureData(array $fileFieldValueData): BinaryBaseValue { - return 'Icy-Night-Flower-Binary.jpg'; + return new MediaValue($fileFieldValueData); } - /** - * Asserts that the field data was loaded correctly. - * - * Asserts that the data provided by {@link getValidCreationFieldData()} - * was stored and loaded correctly. - * - * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field - */ - public function assertFieldDataLoadedCorrect(Field $field) + public function asserFieldValueIsCorrectInstance(Field $field): void { self::assertInstanceOf( MediaValue::class, $field->value ); - - $fixtureData = $this->getFixtureData(); - $expectedData = $fixtureData['create']; - - // Will change during storage - unset($expectedData['id']); - $expectedData['inputUri'] = null; - - self::assertNotEmpty($field->value->id); - $this->assertPropertiesCorrect( - $expectedData, - $field->value - ); - - self::assertTrue( - $this->uriExistsOnIO($field->value->uri), - "File {$field->value->uri} doesn't exist." - ); - - self::$loadedMediaPath = $field->value->id; } - public function provideInvalidCreationFieldData() + protected function buildBinaryFileValue(string $fileId): BinaryBaseValue { - return [ - [ - [ - 'id' => '/foo/bar/sindelfingen.pdf', - ], - InvalidArgumentValue::class, - ], + return new MediaValue( [ - new MediaValue( - [ - 'id' => '/foo/bar/sindelfingen.pdf', - ] - ), - InvalidArgumentValue::class, - ], - ]; - } - - /** - * Get update field externals data. - * - * @return array - */ - public function getValidUpdateFieldData() - { - $fixtureData = $this->getFixtureData(); - - return new MediaValue($fixtureData['update']); - } - - /** - * Get externals updated field data values. - * - * This is a PHPUnit data provider - * - * @return array - */ - public function assertUpdatedFieldDataLoadedCorrect(Field $field) - { - self::assertInstanceOf( - MediaValue::class, - $field->value - ); - - $fixtureData = $this->getFixtureData(); - $expectedData = $fixtureData['update']; - - // Will change during storage - unset($expectedData['id']); - $expectedData['inputUri'] = null; - - self::assertNotEmpty($field->value->id); - $this->assertPropertiesCorrect( - $expectedData, - $field->value - ); - - self::assertTrue( - $this->uriExistsOnIO($field->value->uri), - "File {$field->value->uri} doesn't exist." - ); - } - - public function provideInvalidUpdateFieldData() - { - return $this->provideInvalidCreationFieldData(); - } - - /** - * Asserts the the field data was loaded correctly. - * - * Asserts that the data provided by {@link getValidCreationFieldData()} - * was copied and loaded correctly. - * - * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field - */ - public function assertCopiedFieldDataLoadedCorrectly(Field $field) - { - $this->assertFieldDataLoadedCorrect($field); - - self::assertEquals( - self::$loadedMediaPath, - $field->value->id + 'id' => $fileId, + ] ); } - /** - * Get data to test to hash method. - * - * This is a PHPUnit data provider - * - * The returned records must have the the original value assigned to the - * first index and the expected hash result to the second. For example: - * - * - * array( - * array( - * new MyValue( true ), - * array( 'myValue' => true ), - * ), - * // ... - * ); - * - * - * @return array - */ - public function provideToHashData() + public function provideToHashData(): array { $fixture = $this->getFixtureData(); $expected = $fixture['create']; @@ -355,14 +129,7 @@ public function provideToHashData() ]; } - /** - * Get expectations for the fromHash call on our field value. - * - * This is a PHPUnit data provider - * - * @return array - */ - public function provideFromHashData() + public function provideFromHashData(): array { $fixture = $this->getFixtureData(); $fixture['create']['uri'] = $fixture['create']['id']; @@ -378,23 +145,17 @@ public function provideFromHashData() ]; } - public function providerForTestIsEmptyValue() + /** + * @return list> + */ + public function providerForTestIsEmptyValue(): array { return [ [new MediaValue()], ]; } - public function providerForTestIsNotEmptyValue() - { - return [ - [ - $this->getValidCreationFieldData(), - ], - ]; - } - - protected function getValidSearchValueOne() + protected function getValidSearchValueOne(): MediaValue { return new MediaValue( [ @@ -405,7 +166,7 @@ protected function getValidSearchValueOne() ); } - protected function getValidSearchValueTwo() + protected function getValidSearchValueTwo(): MediaValue { return new MediaValue( [ @@ -415,37 +176,4 @@ protected function getValidSearchValueTwo() ] ); } - - protected function getSearchTargetValueOne() - { - $value = $this->getValidSearchValueOne(); - - // ensure case-insensitivity - return strtoupper($value->fileName); - } - - protected function getSearchTargetValueTwo() - { - $value = $this->getValidSearchValueTwo(); - - // ensure case-insensitivity - return strtoupper($value->fileName); - } - - protected function getAdditionallyIndexedFieldData() - { - return [ - [ - 'file_size', - $this->getValidSearchValueOne()->fileSize, - $this->getValidSearchValueTwo()->fileSize, - ], - [ - 'mime_type', - // ensure case-insensitivity - 'IMAGE/JPEG', - 'IMAGE/PNG', - ], - ]; - } } From e472a8392cfa6030c13a617fff758087a2137088 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 27 Aug 2024 11:50:07 +0200 Subject: [PATCH 31/53] Extracted redundant TextLine and ISBN SearchField into a common base (#422) For more details see https://github.com/ibexa/core/pull/422 --- .../BaseSingleTextLineSearchField.php | 56 ++++++++++++++++++ src/lib/FieldType/ISBN/SearchField.php | 58 +------------------ src/lib/FieldType/TextLine/SearchField.php | 58 +------------------ 3 files changed, 62 insertions(+), 110 deletions(-) create mode 100644 src/lib/FieldType/BaseSingleTextLineSearchField.php diff --git a/src/lib/FieldType/BaseSingleTextLineSearchField.php b/src/lib/FieldType/BaseSingleTextLineSearchField.php new file mode 100644 index 0000000000..33f79c70c7 --- /dev/null +++ b/src/lib/FieldType/BaseSingleTextLineSearchField.php @@ -0,0 +1,56 @@ +value->data, + new Search\FieldType\StringField() + ), + new Search\Field( + 'fulltext', + $field->value->data, + new Search\FieldType\FullTextField() + ), + ]; + } + + /** + * @return array + */ + public function getIndexDefinition(): array + { + return [ + 'value' => new Search\FieldType\StringField(), + ]; + } + + public function getDefaultMatchField(): string + { + return 'value'; + } + + public function getDefaultSortField(): string + { + return $this->getDefaultMatchField(); + } +} diff --git a/src/lib/FieldType/ISBN/SearchField.php b/src/lib/FieldType/ISBN/SearchField.php index 01c4052bbc..350b5e7131 100644 --- a/src/lib/FieldType/ISBN/SearchField.php +++ b/src/lib/FieldType/ISBN/SearchField.php @@ -4,67 +4,15 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Core\FieldType\ISBN; -use Ibexa\Contracts\Core\FieldType\Indexable; -use Ibexa\Contracts\Core\Persistence\Content\Field; -use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition; -use Ibexa\Contracts\Core\Search; +use Ibexa\Core\FieldType\BaseSingleTextLineSearchField; /** * Indexable definition for ISBN field type. */ -class SearchField implements Indexable +class SearchField extends BaseSingleTextLineSearchField { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) - { - return [ - new Search\Field( - 'value', - $field->value->data, - new Search\FieldType\StringField() - ), - new Search\Field( - 'fulltext', - $field->value->data, - new Search\FieldType\FullTextField() - ), - ]; - } - - public function getIndexDefinition() - { - return [ - 'value' => new Search\FieldType\StringField(), - ]; - } - - /** - * Get name of the default field to be used for matching. - * - * As field types can index multiple fields (see MapLocation field type's - * implementation of this interface), this method is used to define default - * field for matching. Default field is typically used by Field criterion. - * - * @return string - */ - public function getDefaultMatchField() - { - return 'value'; - } - - /** - * Get name of the default field to be used for sorting. - * - * As field types can index multiple fields (see MapLocation field type's - * implementation of this interface), this method is used to define default - * field for sorting. Default field is typically used by Field sort clause. - * - * @return string - */ - public function getDefaultSortField() - { - return $this->getDefaultMatchField(); - } } diff --git a/src/lib/FieldType/TextLine/SearchField.php b/src/lib/FieldType/TextLine/SearchField.php index 5cfd1375f4..a020a0864d 100644 --- a/src/lib/FieldType/TextLine/SearchField.php +++ b/src/lib/FieldType/TextLine/SearchField.php @@ -4,67 +4,15 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Core\FieldType\TextLine; -use Ibexa\Contracts\Core\FieldType\Indexable; -use Ibexa\Contracts\Core\Persistence\Content\Field; -use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition; -use Ibexa\Contracts\Core\Search; +use Ibexa\Core\FieldType\BaseSingleTextLineSearchField; /** * Indexable definition for TextLine field type. */ -class SearchField implements Indexable +class SearchField extends BaseSingleTextLineSearchField { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) - { - return [ - new Search\Field( - 'value', - $field->value->data, - new Search\FieldType\StringField() - ), - new Search\Field( - 'fulltext', - $field->value->data, - new Search\FieldType\FullTextField() - ), - ]; - } - - public function getIndexDefinition() - { - return [ - 'value' => new Search\FieldType\StringField(), - ]; - } - - /** - * Get name of the default field to be used for matching. - * - * As field types can index multiple fields (see MapLocation field type's - * implementation of this interface), this method is used to define default - * field for matching. Default field is typically used by Field criterion. - * - * @return string - */ - public function getDefaultMatchField() - { - return 'value'; - } - - /** - * Get name of the default field to be used for sorting. - * - * As field types can index multiple fields (see MapLocation field type's - * implementation of this interface), this method is used to define default - * field for sorting. Default field is typically used by Field sort clause. - * - * @return string - */ - public function getDefaultSortField() - { - return $this->getDefaultMatchField(); - } } From e37eb10114a6cc12f024b18c04b4d54116701690 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Wed, 28 Aug 2024 14:08:04 +0200 Subject: [PATCH 32/53] Extracted abstract for redundant Host & URI text matchers (#424) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For more details see https://github.com/ibexa/core/pull/424 Key changes: * Extracted abstract `AffixBasedTextMatcher` for redundant Host & URI text matchers * [PHPStan] Aligned baseline with the changes --------- Co-authored-by: Adam Wójs Co-authored-by: Konrad Oboza --- phpstan-baseline.neon | 55 --------------- .../Matcher/AffixBasedTextMatcher.php | 38 +++++++++++ .../Symfony/SiteAccess/Matcher/HostText.php | 44 +++--------- .../Symfony/SiteAccess/Matcher/URIText.php | 67 ++++--------------- 4 files changed, 63 insertions(+), 141 deletions(-) create mode 100644 src/lib/MVC/Symfony/SiteAccess/Matcher/AffixBasedTextMatcher.php diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index b53ddd9647..1bb7256ea2 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -12355,36 +12355,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\SiteAccess\\\\Matcher\\\\HostText\\:\\:__construct\\(\\) has parameter \\$siteAccessesConfiguration with no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php - - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\SiteAccess\\\\Matcher\\\\HostText\\:\\:setRequest\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php - - - - message: "#^Property Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\SiteAccess\\\\Matcher\\\\HostText\\:\\:\\$prefix has no type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php - - - - message: "#^Property Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\SiteAccess\\\\Matcher\\\\HostText\\:\\:\\$siteAccessesConfiguration is never read, only written\\.$#" - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php - - - - message: "#^Property Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\SiteAccess\\\\Matcher\\\\HostText\\:\\:\\$siteAccessesConfiguration type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php - - - - message: "#^Property Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\SiteAccess\\\\Matcher\\\\HostText\\:\\:\\$suffix has no type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\SiteAccess\\\\Matcher\\\\Map\\:\\:__construct\\(\\) has parameter \\$map with no value type specified in iterable type array\\.$#" count: 1 @@ -12550,31 +12520,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\SiteAccess\\\\Matcher\\\\URIText\\:\\:__construct\\(\\) has parameter \\$siteAccessesConfiguration with no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php - - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\SiteAccess\\\\Matcher\\\\URIText\\:\\:analyseURI\\(\\) should return string but returns string\\|null\\.$#" - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php - - - - message: "#^Method Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\SiteAccess\\\\Matcher\\\\URIText\\:\\:setRequest\\(\\) has no return type specified\\.$#" - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php - - - - message: "#^Property Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\SiteAccess\\\\Matcher\\\\URIText\\:\\:\\$siteAccessesConfiguration is never read, only written\\.$#" - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php - - - - message: "#^Property Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\SiteAccess\\\\Matcher\\\\URIText\\:\\:\\$siteAccessesConfiguration type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php - - message: "#^Call to an undefined method object\\:\\:setRequest\\(\\)\\.$#" count: 1 diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/AffixBasedTextMatcher.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/AffixBasedTextMatcher.php new file mode 100644 index 0000000000..76dc56296e --- /dev/null +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/AffixBasedTextMatcher.php @@ -0,0 +1,38 @@ +prefix = $this->siteAccessesConfiguration['prefix'] ?? ''; + $this->suffix = $this->siteAccessesConfiguration['suffix'] ?? ''; + + parent::__construct($this->buildRegex(), $this->getMatchedItemNumber()); + } +} diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php index 7bba712087..890063c3aa 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php @@ -10,46 +10,24 @@ use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; use Ibexa\Core\MVC\Symfony\SiteAccess\VersatileMatcher; -class HostText extends Regex implements VersatileMatcher +class HostText extends AffixBasedTextMatcher { - private $prefix; - - private $suffix; - - /** - * The property needed to allow correct deserialization with Symfony serializer. - * - * @var array - */ - private $siteAccessesConfiguration; + protected function buildRegex(): string + { + return '^' . preg_quote($this->prefix, '@') . "(\w+)" . preg_quote($this->suffix, '@') . '$'; + } - /** - * Constructor. - * - * @param array $siteAccessesConfiguration SiteAccesses configuration. - */ - public function __construct(array $siteAccessesConfiguration) + protected function getMatchedItemNumber(): int { - $this->prefix = isset($siteAccessesConfiguration['prefix']) ? $siteAccessesConfiguration['prefix'] : ''; - $this->suffix = isset($siteAccessesConfiguration['suffix']) ? $siteAccessesConfiguration['suffix'] : ''; - parent::__construct( - '^' . preg_quote($this->prefix, '@') . "(\w+)" . preg_quote($this->suffix, '@') . '$', - 1 - ); - $this->siteAccessesConfiguration = $siteAccessesConfiguration; + return 1; } - public function getName() + public function getName(): string { return 'host:text'; } - /** - * Injects the request object to match against. - * - * @param \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest $request - */ - public function setRequest(SimplifiedRequest $request) + public function setRequest(SimplifiedRequest $request): void { if (!$this->element) { $this->setMatchElement($request->host); @@ -58,14 +36,14 @@ public function setRequest(SimplifiedRequest $request) parent::setRequest($request); } - public function reverseMatch($siteAccessName) + public function reverseMatch($siteAccessName): ?VersatileMatcher { $this->request->setHost($this->prefix . $siteAccessName . $this->suffix); return $this; } - public function getRequest() + public function getRequest(): SimplifiedRequest { return $this->request; } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php index 963407a921..ff2016298e 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php @@ -11,49 +11,24 @@ use Ibexa\Core\MVC\Symfony\SiteAccess\URILexer; use Ibexa\Core\MVC\Symfony\SiteAccess\VersatileMatcher; -class URIText extends Regex implements VersatileMatcher, URILexer +class URIText extends AffixBasedTextMatcher implements URILexer { - /** @var string */ - private $prefix; - - /** @var string */ - private $suffix; - - /** - * The property needed to allow correct deserialization with Symfony serializer. - * - * @var array - */ - private $siteAccessesConfiguration; - - /** - * Constructor. - * - * @param array $siteAccessesConfiguration SiteAccesses configuration. - */ - public function __construct(array $siteAccessesConfiguration) + protected function buildRegex(): string { - $this->prefix = isset($siteAccessesConfiguration['prefix']) ? $siteAccessesConfiguration['prefix'] : ''; - $this->suffix = isset($siteAccessesConfiguration['suffix']) ? $siteAccessesConfiguration['suffix'] : ''; + return '^(/' . preg_quote($this->prefix, '@') . '(\w+)' . preg_quote($this->suffix, '@') . ')'; + } - parent::__construct( - '^(/' . preg_quote($this->prefix, '@') . '(\w+)' . preg_quote($this->suffix, '@') . ')', - 2 - ); - $this->siteAccessesConfiguration = $siteAccessesConfiguration; + protected function getMatchedItemNumber(): int + { + return 2; } - public function getName() + public function getName(): string { return 'uri:text'; } - /** - * Injects the request object to match against. - * - * @param \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest $request - */ - public function setRequest(SimplifiedRequest $request) + public function setRequest(SimplifiedRequest $request): void { if (!$this->element) { $this->setMatchElement($request->pathinfo); @@ -62,28 +37,14 @@ public function setRequest(SimplifiedRequest $request) parent::setRequest($request); } - /** - * Analyses $uri and removes the siteaccess part, if needed. - * - * @param string $uri The original URI - * - * @return string The modified URI - */ - public function analyseURI($uri) + public function analyseURI($uri): string { $uri = '/' . ltrim($uri, '/'); - return preg_replace("@$this->regex@", '', $uri); + return preg_replace("@$this->regex@", '', $uri) ?? $uri; } - /** - * Analyses $linkUri when generating a link to a route, in order to have the siteaccess part back in the URI. - * - * @param string $linkUri - * - * @return string The modified link URI - */ - public function analyseLink($linkUri) + public function analyseLink($linkUri): string { $linkUri = '/' . ltrim($linkUri, '/'); $siteAccessUri = "/$this->prefix" . $this->match() . $this->suffix; @@ -91,14 +52,14 @@ public function analyseLink($linkUri) return $siteAccessUri . $linkUri; } - public function reverseMatch($siteAccessName) + public function reverseMatch($siteAccessName): ?VersatileMatcher { $this->request->setPathinfo("/{$this->prefix}{$siteAccessName}{$this->suffix}{$this->request->pathinfo}"); return $this; } - public function getRequest() + public function getRequest(): SimplifiedRequest { return $this->request; } From 92f15f91a8351edbe263bbf049b73c6dbb86ca9a Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Wed, 28 Aug 2024 15:32:17 +0200 Subject: [PATCH 33/53] Refactored Float and Integer field types to use external validators (#425) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For more details see https://github.com/ibexa/core/pull/425 Key changes: * Refactored Float and Integer field types to use external validators * [Tests] Refactored Float, Integer, and String validator tests --------- Co-authored-by: Adam Wójs Co-authored-by: Paweł Niedzielski --- src/lib/FieldType/BaseNumericType.php | 83 ++++ src/lib/FieldType/Float/Type.php | 130 +----- src/lib/FieldType/Integer/Type.php | 143 +------ src/lib/FieldType/Validator.php | 4 +- .../Validator/BaseNumericValidator.php | 39 ++ .../Validator/FloatValueValidator.php | 61 +-- .../Validator/IntegerValueValidator.php | 63 +-- .../lib/FieldType/FloatValueValidatorTest.php | 387 ----------------- .../FieldType/IntegerValueValidatorTest.php | 389 ------------------ .../BaseNumericValidatorTestCase.php | 253 ++++++++++++ .../Validator/FloatValueValidatorTest.php | 178 ++++++++ .../Validator/IntegerValueValidatorTest.php | 162 ++++++++ .../StringLengthValidatorTest.php | 280 ++++++------- 13 files changed, 887 insertions(+), 1285 deletions(-) create mode 100644 src/lib/FieldType/BaseNumericType.php create mode 100644 src/lib/FieldType/Validator/BaseNumericValidator.php delete mode 100644 tests/lib/FieldType/FloatValueValidatorTest.php delete mode 100644 tests/lib/FieldType/IntegerValueValidatorTest.php create mode 100644 tests/lib/FieldType/Validator/BaseNumericValidatorTestCase.php create mode 100644 tests/lib/FieldType/Validator/FloatValueValidatorTest.php create mode 100644 tests/lib/FieldType/Validator/IntegerValueValidatorTest.php rename tests/lib/FieldType/{ => Validator}/StringLengthValidatorTest.php (50%) diff --git a/src/lib/FieldType/BaseNumericType.php b/src/lib/FieldType/BaseNumericType.php new file mode 100644 index 0000000000..18f997eed2 --- /dev/null +++ b/src/lib/FieldType/BaseNumericType.php @@ -0,0 +1,83 @@ + + */ + abstract protected function getValidators(): array; + + public function getValidator(string $validatorIdentifier): ?Validator + { + return $this->getValidators()[$validatorIdentifier] ?? null; + } + + /** + * Validates the validatorConfiguration of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct. + * + * @param array $validatorConfiguration + * + * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] + */ + public function validateValidatorConfiguration($validatorConfiguration): array + { + $validationErrors = []; + $validatorValidationErrors = []; + foreach ($validatorConfiguration as $validatorIdentifier => $constraints) { + $validator = $this->getValidator($validatorIdentifier); + if (null === $validator) { + $validationErrors[] = new ValidationError( + "Validator '%validator%' is unknown", + null, + [ + '%validator%' => $validatorIdentifier, + ], + "[$validatorIdentifier]" + ); + + continue; + } + + $validatorValidationErrors[] = $validator->validateConstraints($constraints); + } + + return array_merge($validationErrors, ...$validatorValidationErrors); + } + + /** + * Validates a field based on the validators in the field definition. + * + * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException + */ + public function validate(FieldDefinition $fieldDefinition, SPIValue $value): array + { + if ($this->isEmptyValue($value)) { + return []; + } + + $errors = []; + $validatorConfiguration = $fieldDefinition->getValidatorConfiguration(); + foreach ($this->getValidators() as $validatorIdentifier => $validator) { + $validator->initializeWithConstraints($validatorConfiguration[$validatorIdentifier] ?? []); + if (!$validator->validate($value, $fieldDefinition)) { + $errors[] = $validator->getMessage(); + } + } + + return array_merge(...$errors); + } +} diff --git a/src/lib/FieldType/Float/Type.php b/src/lib/FieldType/Float/Type.php index 9551224c57..06e4198698 100644 --- a/src/lib/FieldType/Float/Type.php +++ b/src/lib/FieldType/Float/Type.php @@ -10,18 +10,17 @@ use Ibexa\Contracts\Core\FieldType\Value as SPIValue; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; use Ibexa\Core\Base\Exceptions\InvalidArgumentType; -use Ibexa\Core\FieldType\FieldType; -use Ibexa\Core\FieldType\ValidationError; +use Ibexa\Core\FieldType\BaseNumericType; +use Ibexa\Core\FieldType\Validator; use Ibexa\Core\FieldType\Value as BaseValue; use JMS\TranslationBundle\Model\Message; -use JMS\TranslationBundle\Translation\TranslationContainerInterface; /** * Float field types. * * Represents floats. */ -class Type extends FieldType implements TranslationContainerInterface +class Type extends BaseNumericType { protected $validatorConfigurationSchema = [ 'FloatValueValidator' => [ @@ -36,112 +35,9 @@ class Type extends FieldType implements TranslationContainerInterface ], ]; - /** - * Validates the validatorConfiguration of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct. - * - * @param mixed $validatorConfiguration - * - * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] - */ - public function validateValidatorConfiguration($validatorConfiguration) - { - $validationErrors = []; - - foreach ($validatorConfiguration as $validatorIdentifier => $constraints) { - if ($validatorIdentifier !== 'FloatValueValidator') { - $validationErrors[] = new ValidationError( - "Validator '%validator%' is unknown", - null, - [ - '%validator%' => $validatorIdentifier, - ], - "[$validatorIdentifier]" - ); - - continue; - } - - foreach ($constraints as $name => $value) { - switch ($name) { - case 'minFloatValue': - case 'maxFloatValue': - if ($value !== null && !is_numeric($value)) { - $validationErrors[] = new ValidationError( - "Validator parameter '%parameter%' value must be of numeric type", - null, - [ - '%parameter%' => $name, - ], - "[$validatorIdentifier][$name]" - ); - } - break; - default: - $validationErrors[] = new ValidationError( - "Validator parameter '%parameter%' is unknown", - null, - [ - '%parameter%' => $name, - ], - "[$validatorIdentifier][$name]" - ); - } - } - } - - return $validationErrors; - } - - /** - * Validates a field based on the validators in the field definition. - * - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException - * - * @param \Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition $fieldDefinition The field definition of the field - * @param \Ibexa\Core\FieldType\Float\Value $fieldValue The field value for which an action is performed - * - * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] - */ - public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue) + protected function getValidators(): array { - $validationErrors = []; - - if ($this->isEmptyValue($fieldValue)) { - return $validationErrors; - } - - $validatorConfiguration = $fieldDefinition->getValidatorConfiguration(); - $constraints = isset($validatorConfiguration['FloatValueValidator']) ? - $validatorConfiguration['FloatValueValidator'] : - []; - - $validationErrors = []; - - if (isset($constraints['maxFloatValue']) && - $constraints['maxFloatValue'] !== null && $fieldValue->value > $constraints['maxFloatValue']) { - $validationErrors[] = new ValidationError( - 'The value can not be higher than %size%.', - null, - [ - '%size%' => $constraints['maxFloatValue'], - ], - 'value' - ); - } - - if (isset($constraints['minFloatValue']) && - $constraints['minFloatValue'] !== null && $fieldValue->value < $constraints['minFloatValue']) { - $validationErrors[] = new ValidationError( - 'The value can not be lower than %size%.', - null, - [ - '%size%' => $constraints['minFloatValue'], - ], - 'value' - ); - } - - return $validationErrors; + return ['FloatValueValidator' => new Validator\FloatValueValidator()]; } /** @@ -165,20 +61,14 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin /** * Returns the fallback default value of field type when no such default * value is provided in the field definition in content types. - * - * @return \Ibexa\Core\FieldType\Float\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(); } /** - * Implements the core of {@see isEmptyValue()}. - * - * @param mixed $value - * - * @return bool + * @param \Ibexa\Core\FieldType\Float\Value $value */ public function isEmptyValue(SPIValue $value) { @@ -209,7 +99,7 @@ protected function createValueFromInput($inputValue) * * @param \Ibexa\Core\FieldType\Float\Value $value */ - protected function checkValueStructure(BaseValue $value) + protected function checkValueStructure(BaseValue $value): void { if (!is_float($value->value)) { throw new InvalidArgumentType( @@ -237,7 +127,7 @@ protected function getSortInfo(BaseValue $value) * * @return \Ibexa\Core\FieldType\Float\Value $value */ - public function fromHash($hash) + public function fromHash($hash): Value { if ($hash === null) { return $this->getEmptyValue(); @@ -253,7 +143,7 @@ public function fromHash($hash) * * @return mixed */ - public function toHash(SPIValue $value) + public function toHash(SPIValue $value): mixed { if ($this->isEmptyValue($value)) { return null; diff --git a/src/lib/FieldType/Integer/Type.php b/src/lib/FieldType/Integer/Type.php index 959a410c9a..735cf69db4 100644 --- a/src/lib/FieldType/Integer/Type.php +++ b/src/lib/FieldType/Integer/Type.php @@ -10,18 +10,17 @@ use Ibexa\Contracts\Core\FieldType\Value as SPIValue; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; use Ibexa\Core\Base\Exceptions\InvalidArgumentType; -use Ibexa\Core\FieldType\FieldType; -use Ibexa\Core\FieldType\ValidationError; +use Ibexa\Core\FieldType\BaseNumericType; +use Ibexa\Core\FieldType\Validator; use Ibexa\Core\FieldType\Value as BaseValue; use JMS\TranslationBundle\Model\Message; -use JMS\TranslationBundle\Translation\TranslationContainerInterface; /** * Integer field types. * * Represents integers. */ -class Type extends FieldType implements TranslationContainerInterface +class Type extends BaseNumericType { protected $validatorConfigurationSchema = [ 'IntegerValueValidator' => [ @@ -36,115 +35,9 @@ class Type extends FieldType implements TranslationContainerInterface ], ]; - /** - * Validates the validatorConfiguration of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct. - * - * @param mixed $validatorConfiguration - * - * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] - */ - public function validateValidatorConfiguration($validatorConfiguration) + protected function getValidators(): array { - $validationErrors = []; - - foreach ($validatorConfiguration as $validatorIdentifier => $constraints) { - if ($validatorIdentifier !== 'IntegerValueValidator') { - $validationErrors[] = new ValidationError( - "Validator '%validator%' is unknown", - null, - [ - '%validator%' => $validatorIdentifier, - ], - "[$validatorIdentifier]" - ); - - continue; - } - foreach ($constraints as $name => $value) { - switch ($name) { - case 'minIntegerValue': - case 'maxIntegerValue': - if ($value !== null && !is_int($value)) { - $validationErrors[] = new ValidationError( - "Validator parameter '%parameter%' value must be of integer type", - null, - [ - '%parameter%' => $name, - ], - "[$validatorIdentifier][$name]" - ); - } - break; - default: - $validationErrors[] = new ValidationError( - "Validator parameter '%parameter%' is unknown", - null, - [ - '%parameter%' => $name, - ], - "[$validatorIdentifier][$name]" - ); - } - } - } - - return $validationErrors; - } - - /** - * Validates a field based on the validators in the field definition. - * - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException - * - * @param \Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition $fieldDefinition The field definition of the field - * @param \Ibexa\Core\FieldType\Integer\Value $fieldValue The field value for which an action is performed - * - * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] - */ - public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue) - { - $validationErrors = []; - - if ($this->isEmptyValue($fieldValue)) { - return $validationErrors; - } - - $validatorConfiguration = $fieldDefinition->getValidatorConfiguration(); - $constraints = isset($validatorConfiguration['IntegerValueValidator']) ? - $validatorConfiguration['IntegerValueValidator'] : - []; - - $validationErrors = []; - - // 0 and False are unlimited value for maxIntegerValue - if (isset($constraints['maxIntegerValue']) && - $constraints['maxIntegerValue'] !== 0 && - $constraints['maxIntegerValue'] !== false && - $fieldValue->value > $constraints['maxIntegerValue'] - ) { - $validationErrors[] = new ValidationError( - 'The value can not be higher than %size%.', - null, - [ - '%size%' => $constraints['maxIntegerValue'], - ], - 'value' - ); - } - - if (isset($constraints['minIntegerValue']) && - $constraints['minIntegerValue'] !== false && $fieldValue->value < $constraints['minIntegerValue']) { - $validationErrors[] = new ValidationError( - 'The value can not be lower than %size%.', - null, - [ - '%size%' => $constraints['minIntegerValue'], - ], - 'value' - ); - } - - return $validationErrors; + return ['IntegerValueValidator' => new Validator\IntegerValueValidator()]; } /** @@ -158,7 +51,7 @@ public function getFieldTypeIdentifier() } /** - * @param \Ibexa\Core\FieldType\Integer\Value|\Ibexa\Contracts\Core\FieldType\Value $value + * @param \Ibexa\Core\FieldType\Integer\Value $value */ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, string $languageCode): string { @@ -168,10 +61,8 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin /** * Returns the fallback default value of field type when no such default * value is provided in the field definition in content types. - * - * @return \Ibexa\Core\FieldType\Integer\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(); } @@ -179,9 +70,7 @@ public function getEmptyValue() /** * Returns if the given $value is considered empty by the field type. * - * @param mixed $value - * - * @return bool + * @param \Ibexa\Core\FieldType\Integer\Value $value */ public function isEmptyValue(SPIValue $value) { @@ -211,7 +100,7 @@ protected function createValueFromInput($inputValue) * * @param \Ibexa\Core\FieldType\Integer\Value $value */ - protected function checkValueStructure(BaseValue $value) + protected function checkValueStructure(BaseValue $value): void { if (!is_int($value->value)) { throw new InvalidArgumentType( @@ -223,7 +112,7 @@ protected function checkValueStructure(BaseValue $value) } /** - * {@inheritdoc} + * @param \Ibexa\Core\FieldType\Integer\Value $value */ protected function getSortInfo(BaseValue $value) { @@ -231,29 +120,27 @@ protected function getSortInfo(BaseValue $value) } /** - * Converts an $hash to the Value defined by the field type. + * Converts a $hash to the Value defined by the field type. * - * @param mixed $hash + * @param int|string|null $hash * * @return \Ibexa\Core\FieldType\Integer\Value $value */ - public function fromHash($hash) + public function fromHash($hash): Value { if ($hash === null) { return $this->getEmptyValue(); } - return new Value($hash); + return new Value((int)$hash); } /** * Converts a $Value to a hash. * * @param \Ibexa\Core\FieldType\Integer\Value $value - * - * @return mixed */ - public function toHash(SPIValue $value) + public function toHash(SPIValue $value): ?int { if ($this->isEmptyValue($value)) { return null; diff --git a/src/lib/FieldType/Validator.php b/src/lib/FieldType/Validator.php index 9d514a9655..870e9fb8bd 100644 --- a/src/lib/FieldType/Validator.php +++ b/src/lib/FieldType/Validator.php @@ -83,7 +83,7 @@ public function getConstraintsSchema() /** * @param mixed $constraints * - * @return mixed + * @return array<\Ibexa\Contracts\Core\FieldType\ValidationError> */ abstract public function validateConstraints($constraints); @@ -96,8 +96,6 @@ abstract public function validateConstraints($constraints); * When a check against a constraint has failed, an entry will be added to the * $errors array. * - * @param \Ibexa\Core\FieldType\Value $value - * * @return bool */ abstract public function validate(Value $value, ?FieldDefinition $fieldDefinition = null); diff --git a/src/lib/FieldType/Validator/BaseNumericValidator.php b/src/lib/FieldType/Validator/BaseNumericValidator.php new file mode 100644 index 0000000000..d0741c91b3 --- /dev/null +++ b/src/lib/FieldType/Validator/BaseNumericValidator.php @@ -0,0 +1,39 @@ + $constraints + */ + public function validateConstraints($constraints): array + { + $validationErrors = []; + foreach ($constraints as $name => $value) { + $validationErrorMessage = $this->getConstraintsValidationErrorMessage($name, $value); + if (null !== $validationErrorMessage) { + $validationErrors[] = new ValidationError( + $validationErrorMessage, + null, + [ + '%parameter%' => $name, + ] + ); + } + } + + return $validationErrors; + } +} diff --git a/src/lib/FieldType/Validator/FloatValueValidator.php b/src/lib/FieldType/Validator/FloatValueValidator.php index 579d5e3e9f..69da8f811c 100644 --- a/src/lib/FieldType/Validator/FloatValueValidator.php +++ b/src/lib/FieldType/Validator/FloatValueValidator.php @@ -9,7 +9,6 @@ use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; use Ibexa\Core\FieldType\ValidationError; -use Ibexa\Core\FieldType\Validator; use Ibexa\Core\FieldType\Value as BaseValue; /** @@ -21,7 +20,7 @@ * @property float $minFloatValue Minimum value for float. * @property float $maxFloatValue Maximum value for float. */ -class FloatValueValidator extends Validator +class FloatValueValidator extends BaseNumericValidator { protected $constraints = [ 'minFloatValue' => null, @@ -39,73 +38,43 @@ class FloatValueValidator extends Validator ], ]; - public function validateConstraints($constraints) + protected function getConstraintsValidationErrorMessage(string $name, mixed $value): ?string { - $validationErrors = []; - - foreach ($constraints as $name => $value) { - switch ($name) { - case 'minFloatValue': - case 'maxFloatValue': - if ($value !== null && !is_numeric($value)) { - $validationErrors[] = new ValidationError( - "Validator parameter '%parameter%' value must be of numeric type", - null, - [ - '%parameter%' => $name, - ] - ); - } - break; - default: - $validationErrors[] = new ValidationError( - "Validator parameter '%parameter%' is unknown", - null, - [ - '%parameter%' => $name, - ] - ); - } - } - - return $validationErrors; + return match ($name) { + 'minFloatValue', 'maxFloatValue' => $value !== null && !is_numeric($value) + ? "Validator parameter '%parameter%' value must be of numeric type" + : null, + default => "Validator parameter '%parameter%' is unknown", + }; } /** - * Perform validation on $value. - * - * Will return true when all constraints are matched. If one or more - * constraints fail, the method will return false. - * - * When a check against a constant has failed, an entry will be added to the - * $errors array. - * * @param \Ibexa\Core\FieldType\Float\Value $value - * - * @return bool */ - public function validate(BaseValue $value, ?FieldDefinition $fieldDefinition = null) + public function validate(BaseValue $value, ?FieldDefinition $fieldDefinition = null): bool { $isValid = true; - if ($this->constraints['maxFloatValue'] !== null && $value->value > $this->constraints['maxFloatValue']) { + if (isset($this->constraints['maxFloatValue']) && $value->value > $this->constraints['maxFloatValue']) { $this->errors[] = new ValidationError( 'The value can not be higher than %size%.', null, [ '%size%' => $this->constraints['maxFloatValue'], - ] + ], + 'value' ); $isValid = false; } - if ($this->constraints['minFloatValue'] !== null && $value->value < $this->constraints['minFloatValue']) { + if (isset($this->constraints['minFloatValue']) && $value->value < $this->constraints['minFloatValue']) { $this->errors[] = new ValidationError( 'The value can not be lower than %size%.', null, [ '%size%' => $this->constraints['minFloatValue'], - ] + ], + 'value' ); $isValid = false; } diff --git a/src/lib/FieldType/Validator/IntegerValueValidator.php b/src/lib/FieldType/Validator/IntegerValueValidator.php index 2b4edfa944..53fdb66e08 100644 --- a/src/lib/FieldType/Validator/IntegerValueValidator.php +++ b/src/lib/FieldType/Validator/IntegerValueValidator.php @@ -9,7 +9,6 @@ use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; use Ibexa\Core\FieldType\ValidationError; -use Ibexa\Core\FieldType\Validator; use Ibexa\Core\FieldType\Value as BaseValue; /** @@ -18,7 +17,7 @@ * @property int $minIntegerValue The minimum allowed integer value. * @property int $maxIntegerValue The maximum allowed integer value. */ -class IntegerValueValidator extends Validator +class IntegerValueValidator extends BaseNumericValidator { protected $constraints = [ 'minIntegerValue' => null, @@ -36,58 +35,20 @@ class IntegerValueValidator extends Validator ], ]; - public function validateConstraints($constraints) + protected function getConstraintsValidationErrorMessage(string $name, mixed $value): ?string { - $validationErrors = []; - foreach ($constraints as $name => $value) { - switch ($name) { - case 'minIntegerValue': - case 'maxIntegerValue': - if ($value === false) { - @trigger_error( - "The IntegerValueValidator constraint value 'false' is deprecated, and will be removed in 7.0. Use 'null' instead.", - E_USER_DEPRECATED - ); - $value = null; - } - if ($value !== null && !is_int($value)) { - $validationErrors[] = new ValidationError( - "Validator parameter '%parameter%' value must be of integer type", - null, - [ - '%parameter%' => $name, - ] - ); - } - break; - default: - $validationErrors[] = new ValidationError( - "Validator parameter '%parameter%' is unknown", - null, - [ - '%parameter%' => $name, - ] - ); - } - } - - return $validationErrors; + return match ($name) { + 'minIntegerValue', 'maxIntegerValue' => $value !== null && !is_int($value) + ? "Validator parameter '%parameter%' value must be of integer type" + : null, + default => "Validator parameter '%parameter%' is unknown", + }; } /** - * Perform validation on $value. - * - * Will return true when all constraints are matched. If one or more - * constraints fail, the method will return false. - * - * When a check against a constraint has failed, an entry will be added to the - * $errors array. - * * @param \Ibexa\Core\FieldType\Integer\Value $value - * - * @return bool */ - public function validate(BaseValue $value, ?FieldDefinition $fieldDefinition = null) + public function validate(BaseValue $value, ?FieldDefinition $fieldDefinition = null): bool { $isValid = true; @@ -97,7 +58,8 @@ public function validate(BaseValue $value, ?FieldDefinition $fieldDefinition = n null, [ '%size%' => $this->constraints['maxIntegerValue'], - ] + ], + 'value' ); $isValid = false; } @@ -108,7 +70,8 @@ public function validate(BaseValue $value, ?FieldDefinition $fieldDefinition = n null, [ '%size%' => $this->constraints['minIntegerValue'], - ] + ], + 'value' ); $isValid = false; } diff --git a/tests/lib/FieldType/FloatValueValidatorTest.php b/tests/lib/FieldType/FloatValueValidatorTest.php deleted file mode 100644 index 4daa6123fe..0000000000 --- a/tests/lib/FieldType/FloatValueValidatorTest.php +++ /dev/null @@ -1,387 +0,0 @@ - 0.5, - 'maxFloatValue' => 22 / 7, - ]; - $validator = new FloatValueValidator(); - $validator->initializeWithConstraints( - $constraints - ); - self::assertSame($constraints['minFloatValue'], $validator->minFloatValue); - self::assertSame($constraints['maxFloatValue'], $validator->maxFloatValue); - } - - /** - * Test getting constraints schema. - * - * @covers \Ibexa\Core\FieldType\Validator::getConstraintsSchema - */ - public function testGetConstraintsSchema() - { - $constraintsSchema = [ - 'minFloatValue' => [ - 'type' => 'float', - 'default' => null, - ], - 'maxFloatValue' => [ - 'type' => 'float', - 'default' => null, - ], - ]; - $validator = new FloatValueValidator(); - self::assertSame($constraintsSchema, $validator->getConstraintsSchema()); - } - - /** - * Tests setting and getting constraints. - * - * @covers \Ibexa\Core\FieldType\Validator::__set - * @covers \Ibexa\Core\FieldType\Validator::__get - */ - public function testConstraintsSetGet() - { - $constraints = [ - 'minFloatValue' => 0.5, - 'maxFloatValue' => 22 / 7, - ]; - $validator = new FloatValueValidator(); - $validator->minFloatValue = $constraints['minFloatValue']; - $validator->maxFloatValue = $constraints['maxFloatValue']; - self::assertSame($constraints['minFloatValue'], $validator->minFloatValue); - self::assertSame($constraints['maxFloatValue'], $validator->maxFloatValue); - } - - /** - * Tests initializing with a wrong constraint. - * - * @covers \Ibexa\Core\FieldType\Validator::initializeWithConstraints - */ - public function testInitializeBadConstraint() - { - $this->expectException(PropertyNotFoundException::class); - - $constraints = [ - 'unexisting' => 0, - ]; - $validator = new FloatValueValidator(); - $validator->initializeWithConstraints( - $constraints - ); - } - - /** - * Tests setting a wrong constraint. - * - * @covers \Ibexa\Core\FieldType\Validator::__set - */ - public function testSetBadConstraint() - { - $this->expectException(PropertyNotFoundException::class); - - $validator = new FloatValueValidator(); - $validator->unexisting = 0; - } - - /** - * Tests getting a wrong constraint. - * - * @covers \Ibexa\Core\FieldType\Validator::__get - */ - public function testGetBadConstraint() - { - $this->expectException(PropertyNotFoundException::class); - - $validator = new FloatValueValidator(); - $null = $validator->unexisting; - } - - /** - * Tests validating a correct value. - * - * @dataProvider providerForValidateOK - * - * @covers \Ibexa\Core\FieldType\Validator\FloatValueValidator::validate - * @covers \Ibexa\Core\FieldType\Validator::getMessage - */ - public function testValidateCorrectValues($value) - { - $validator = new FloatValueValidator(); - $validator->minFloatValue = 10 / 7; - $validator->maxFloatValue = 11 / 7; - self::assertTrue($validator->validate(new FloatValue($value))); - self::assertSame([], $validator->getMessage()); - } - - public function providerForValidateOK() - { - return [ - [100 / 70], - [101 / 70], - [105 / 70], - [109 / 70], - [110 / 70], - ]; - } - - /** - * Tests validating a wrong value. - * - * @dataProvider providerForValidateKO - * - * @covers \Ibexa\Core\FieldType\Validator\FloatValueValidator::validate - */ - public function testValidateWrongValues($value, $message, $values) - { - $validator = new FloatValueValidator(); - $validator->minFloatValue = $this->getMinFloatValue(); - $validator->maxFloatValue = $this->getMaxFloatValue(); - self::assertFalse($validator->validate(new FloatValue($value))); - $messages = $validator->getMessage(); - self::assertCount(1, $messages); - self::assertInstanceOf( - ValidationError::class, - $messages[0] - ); - self::assertInstanceOf( - Message::class, - $messages[0]->getTranslatableMessage() - ); - self::assertEquals( - $message, - $messages[0]->getTranslatableMessage()->message - ); - self::assertEquals( - $values, - $messages[0]->getTranslatableMessage()->values - ); - } - - public function providerForValidateKO() - { - return [ - [-10 / 7, 'The value can not be lower than %size%.', ['%size%' => $this->getMinFloatValue()]], - [0, 'The value can not be lower than %size%.', ['%size%' => $this->getMinFloatValue()]], - [99 / 70, 'The value can not be lower than %size%.', ['%size%' => $this->getMinFloatValue()]], - [111 / 70, 'The value can not be higher than %size%.', ['%size%' => $this->getMaxFloatValue()]], - ]; - } - - /** - * Tests validation of constraints. - * - * @dataProvider providerForValidateConstraintsOK - * - * @covers \Ibexa\Core\FieldType\Validator\FileSizeValidator::validateConstraints - */ - public function testValidateConstraintsCorrectValues($constraints) - { - $validator = new FloatValueValidator(); - - self::assertEmpty( - $validator->validateConstraints($constraints) - ); - } - - public function providerForValidateConstraintsOK() - { - return [ - [ - [], - [ - 'minFloatValue' => 5, - ], - [ - 'maxFloatValue' => 2.2, - ], - [ - 'minFloatValue' => null, - 'maxFloatValue' => null, - ], - [ - 'minFloatValue' => -5, - 'maxFloatValue' => null, - ], - [ - 'minFloatValue' => null, - 'maxFloatValue' => 12.7, - ], - [ - 'minFloatValue' => 6, - 'maxFloatValue' => 8.3, - ], - ], - ]; - } - - /** - * Tests validation of constraints. - * - * @dataProvider providerForValidateConstraintsKO - * - * @covers \Ibexa\Core\FieldType\Validator\FileSizeValidator::validateConstraints - */ - public function testValidateConstraintsWrongValues($constraints, $expectedMessages, $values) - { - $validator = new FloatValueValidator(); - $messages = $validator->validateConstraints($constraints); - - foreach ($expectedMessages as $index => $expectedMessage) { - self::assertInstanceOf( - Message::class, - $messages[0]->getTranslatableMessage() - ); - self::assertEquals( - $expectedMessage, - $messages[$index]->getTranslatableMessage()->message - ); - self::assertEquals( - $values[$index], - $messages[$index]->getTranslatableMessage()->values - ); - } - } - - public function providerForValidateConstraintsKO() - { - return [ - [ - [ - 'minFloatValue' => true, - ], - ["Validator parameter '%parameter%' value must be of numeric type"], - [ - ['%parameter%' => 'minFloatValue'], - ], - ], - [ - [ - 'minFloatValue' => 'five thousand bytes', - ], - ["Validator parameter '%parameter%' value must be of numeric type"], - [ - ['%parameter%' => 'minFloatValue'], - ], - ], - [ - [ - 'minFloatValue' => 'five thousand bytes', - 'maxFloatValue' => 1234, - ], - ["Validator parameter '%parameter%' value must be of numeric type"], - [ - ['%parameter%' => 'minFloatValue'], - ], - ], - [ - [ - 'maxFloatValue' => new \DateTime(), - 'minFloatValue' => 1234, - ], - ["Validator parameter '%parameter%' value must be of numeric type"], - [ - ['%parameter%' => 'maxFloatValue'], - ], - ], - [ - [ - 'minFloatValue' => true, - 'maxFloatValue' => 1234, - ], - ["Validator parameter '%parameter%' value must be of numeric type"], - [ - ['%parameter%' => 'minFloatValue'], - ], - ], - [ - [ - 'minFloatValue' => 'five thousand bytes', - 'maxFloatValue' => 'ten billion bytes', - ], - [ - "Validator parameter '%parameter%' value must be of numeric type", - "Validator parameter '%parameter%' value must be of numeric type", - ], - [ - ['%parameter%' => 'minFloatValue'], - ['%parameter%' => 'maxFloatValue'], - ], - ], - [ - [ - 'brljix' => 12345, - ], - ["Validator parameter '%parameter%' is unknown"], - [ - ['%parameter%' => 'brljix'], - ], - ], - [ - [ - 'minFloatValue' => 12345, - 'brljix' => 12345, - ], - ["Validator parameter '%parameter%' is unknown"], - [ - ['%parameter%' => 'brljix'], - ], - ], - ]; - } -} diff --git a/tests/lib/FieldType/IntegerValueValidatorTest.php b/tests/lib/FieldType/IntegerValueValidatorTest.php deleted file mode 100644 index a567420109..0000000000 --- a/tests/lib/FieldType/IntegerValueValidatorTest.php +++ /dev/null @@ -1,389 +0,0 @@ - 0, - 'maxIntegerValue' => 100, - ]; - $validator = new IntegerValueValidator(); - $validator->initializeWithConstraints( - $constraints - ); - self::assertSame($constraints['minIntegerValue'], $validator->minIntegerValue); - self::assertSame($constraints['maxIntegerValue'], $validator->maxIntegerValue); - } - - /** - * Test getting constraints schema. - * - * @covers \Ibexa\Core\FieldType\Validator::getConstraintsSchema - */ - public function testGetConstraintsSchema() - { - $constraintsSchema = [ - 'minIntegerValue' => [ - 'type' => 'int', - 'default' => 0, - ], - 'maxIntegerValue' => [ - 'type' => 'int', - 'default' => null, - ], - ]; - $validator = new IntegerValueValidator(); - self::assertSame($constraintsSchema, $validator->getConstraintsSchema()); - } - - /** - * Tests setting and getting constraints. - * - * @covers \Ibexa\Core\FieldType\Validator::__set - * @covers \Ibexa\Core\FieldType\Validator::__get - */ - public function testConstraintsSetGet() - { - $constraints = [ - 'minIntegerValue' => 0, - 'maxIntegerValue' => 100, - ]; - $validator = new IntegerValueValidator(); - $validator->minIntegerValue = $constraints['minIntegerValue']; - $validator->maxIntegerValue = $constraints['maxIntegerValue']; - self::assertSame($constraints['minIntegerValue'], $validator->minIntegerValue); - self::assertSame($constraints['maxIntegerValue'], $validator->maxIntegerValue); - } - - /** - * Tests initializing with a wrong constraint. - * - * @covers \Ibexa\Core\FieldType\Validator::initializeWithConstraints - */ - public function testInitializeBadConstraint() - { - $this->expectException(PropertyNotFoundException::class); - - $constraints = [ - 'unexisting' => 0, - ]; - $validator = new IntegerValueValidator(); - $validator->initializeWithConstraints( - $constraints - ); - } - - /** - * Tests setting a wrong constraint. - * - * @covers \Ibexa\Core\FieldType\Validator::__set - */ - public function testSetBadConstraint() - { - $this->expectException(PropertyNotFoundException::class); - - $validator = new IntegerValueValidator(); - $validator->unexisting = 0; - } - - /** - * Tests getting a wrong constraint. - * - * @covers \Ibexa\Core\FieldType\Validator::__get - */ - public function testGetBadConstraint() - { - $this->expectException(PropertyNotFoundException::class); - - $validator = new IntegerValueValidator(); - $null = $validator->unexisting; - } - - /** - * Tests validating a correct value. - * - * @dataProvider providerForValidateOK - * - * @covers \Ibexa\Core\FieldType\Validator\IntegerValueValidator::validate - * @covers \Ibexa\Core\FieldType\Validator::getMessage - */ - public function testValidateCorrectValues($value) - { - $validator = new IntegerValueValidator(); - $validator->minIntegerValue = 10; - $validator->maxIntegerValue = 15; - self::assertTrue($validator->validate(new IntegerValue($value))); - self::assertSame([], $validator->getMessage()); - } - - public function providerForValidateOK() - { - return [ - [10], - [11], - [12], - [12.5], - [13], - [14], - [15], - ]; - } - - /** - * Tests validating a wrong value. - * - * @dataProvider providerForValidateKO - * - * @covers \Ibexa\Core\FieldType\Validator\IntegerValueValidator::validate - */ - public function testValidateWrongValues($value, $message, $values) - { - $validator = new IntegerValueValidator(); - $validator->minIntegerValue = $this->getMinIntegerValue(); - $validator->maxIntegerValue = $this->getMaxIntegerValue(); - self::assertFalse($validator->validate(new IntegerValue($value))); - $messages = $validator->getMessage(); - self::assertCount(1, $messages); - self::assertInstanceOf( - ValidationError::class, - $messages[0] - ); - self::assertInstanceOf( - Message::class, - $messages[0]->getTranslatableMessage() - ); - self::assertEquals( - $message, - $messages[0]->getTranslatableMessage()->message - ); - self::assertEquals( - $values, - $messages[0]->getTranslatableMessage()->values - ); - } - - public function providerForValidateKO() - { - return [ - [-12, 'The value can not be lower than %size%.', ['%size%' => $this->getMinIntegerValue()]], - [0, 'The value can not be lower than %size%.', ['%size%' => $this->getMinIntegerValue()]], - [9, 'The value can not be lower than %size%.', ['%size%' => $this->getMinIntegerValue()]], - [16, 'The value can not be higher than %size%.', ['%size%' => $this->getMaxIntegerValue()]], - ]; - } - - /** - * Tests validation of constraints. - * - * @dataProvider providerForValidateConstraintsOK - * - * @covers \Ibexa\Core\FieldType\Validator\FileSizeValidator::validateConstraints - */ - public function testValidateConstraintsCorrectValues($constraints) - { - $validator = new IntegerValueValidator(); - - self::assertEmpty( - $validator->validateConstraints($constraints) - ); - } - - public function providerForValidateConstraintsOK() - { - return [ - [ - [], - [ - 'minIntegerValue' => 5, - ], - [ - 'maxIntegerValue' => 2, - ], - [ - 'minIntegerValue' => null, - 'maxIntegerValue' => null, - ], - [ - 'minIntegerValue' => -5, - 'maxIntegerValue' => null, - ], - [ - 'minIntegerValue' => null, - 'maxIntegerValue' => 12, - ], - [ - 'minIntegerValue' => 6, - 'maxIntegerValue' => 8, - ], - ], - ]; - } - - /** - * Tests validation of constraints. - * - * @dataProvider providerForValidateConstraintsKO - * - * @covers \Ibexa\Core\FieldType\Validator\FileSizeValidator::validateConstraints - */ - public function testValidateConstraintsWrongValues($constraints, $expectedMessages, $values) - { - $validator = new IntegerValueValidator(); - $messages = $validator->validateConstraints($constraints); - - foreach ($expectedMessages as $index => $expectedMessage) { - self::assertInstanceOf( - Message::class, - $messages[0]->getTranslatableMessage() - ); - self::assertEquals( - $expectedMessage, - $messages[$index]->getTranslatableMessage()->message - ); - self::assertEquals( - $values[$index], - $messages[$index]->getTranslatableMessage()->values - ); - } - } - - public function providerForValidateConstraintsKO() - { - return [ - [ - [ - 'minIntegerValue' => true, - ], - ["Validator parameter '%parameter%' value must be of integer type"], - [ - ['%parameter%' => 'minIntegerValue'], - ], - ], - [ - [ - 'minIntegerValue' => 'five thousand bytes', - ], - ["Validator parameter '%parameter%' value must be of integer type"], - [ - ['%parameter%' => 'minIntegerValue'], - ], - ], - [ - [ - 'minIntegerValue' => 'five thousand bytes', - 'maxIntegerValue' => 1234, - ], - ["Validator parameter '%parameter%' value must be of integer type"], - [ - ['%parameter%' => 'minIntegerValue'], - ], - ], - [ - [ - 'maxIntegerValue' => new \DateTime(), - 'minIntegerValue' => 1234, - ], - ["Validator parameter '%parameter%' value must be of integer type"], - [ - ['%parameter%' => 'maxIntegerValue'], - ], - ], - [ - [ - 'minIntegerValue' => true, - 'maxIntegerValue' => 1234, - ], - ["Validator parameter '%parameter%' value must be of integer type"], - [ - ['%parameter%' => 'minIntegerValue'], - ], - ], - [ - [ - 'minIntegerValue' => 'five thousand bytes', - 'maxIntegerValue' => 'ten billion bytes', - ], - [ - "Validator parameter '%parameter%' value must be of integer type", - "Validator parameter '%parameter%' value must be of integer type", - ], - [ - ['%parameter%' => 'minIntegerValue'], - ['%parameter%' => 'maxIntegerValue'], - ], - ], - [ - [ - 'brljix' => 12345, - ], - ["Validator parameter '%parameter%' is unknown"], - [ - ['%parameter%' => 'brljix'], - ], - ], - [ - [ - 'minIntegerValue' => 12345, - 'brljix' => 12345, - ], - ["Validator parameter '%parameter%' is unknown"], - [ - ['%parameter%' => 'brljix'], - ], - ], - ]; - } -} diff --git a/tests/lib/FieldType/Validator/BaseNumericValidatorTestCase.php b/tests/lib/FieldType/Validator/BaseNumericValidatorTestCase.php new file mode 100644 index 0000000000..a664bfc87c --- /dev/null +++ b/tests/lib/FieldType/Validator/BaseNumericValidatorTestCase.php @@ -0,0 +1,253 @@ + + */ + abstract public function providerForValidateConstraintsOK(): iterable; + + /** + * @return iterable>> + */ + abstract public static function providerForConstraintsInitializeSetGet(): iterable; + + abstract protected function getIncorrectNumericTypeValidationMessage(string $parameterName): string; + + /** + * @return iterable, array}> + */ + final public function providerForValidateConstraintsKO(): iterable + { + $minNumericValueName = $this->getMinNumericValueName(); + $minValueNumericTypeValidationMessage = $this->getIncorrectNumericTypeValidationMessage( + $minNumericValueName + ); + $maxNumericValueName = $this->getMaxNumericValueName(); + $maxValueNumericTypeValidationMessage = $this->getIncorrectNumericTypeValidationMessage( + $maxNumericValueName + ); + + yield 'invalid min type (bool), max not set' => [ + [ + $minNumericValueName => true, + ], + [$minValueNumericTypeValidationMessage], + ]; + + yield 'invalid min type (string), max not set' => [ + [ + $minNumericValueName => self::WRONG_NUMERIC_MIN_VALUE, + ], + [$minValueNumericTypeValidationMessage], + ]; + + yield 'invalid min type (string), valid max' => [ + [ + $minNumericValueName => self::WRONG_NUMERIC_MIN_VALUE, + $maxNumericValueName => 1234, + ], + [$minValueNumericTypeValidationMessage], + ]; + + yield 'valid min, invalid max type (DateTime object)' => [ + [ + $maxNumericValueName => new \DateTime(), + $minNumericValueName => 1234, + ], + [$maxValueNumericTypeValidationMessage], + ]; + + yield 'invalid min type (bool), valid max, with a parameter' => [ + [ + $minNumericValueName => true, + $maxNumericValueName => 1234, + ], + [$minValueNumericTypeValidationMessage], + [ + ['%parameter%' => $minNumericValueName], + ], + ]; + + yield 'invalid min and max types (strings)' => [ + [ + $minNumericValueName => self::WRONG_NUMERIC_MIN_VALUE, + $maxNumericValueName => self::WRONG_NUMERIC_MAX_VALUE, + ], + [ + $minValueNumericTypeValidationMessage, + $maxValueNumericTypeValidationMessage, + ], + ]; + + yield 'unknown parameter' => [ + [ + 'brljix' => 12345, + ], + [self::UNKNOWN_PARAM_VALIDATION_MESSAGE], + ]; + + yield 'unknown parameter, valid min' => [ + [ + $minNumericValueName => 12345, + 'brljix' => 12345, + ], + [self::UNKNOWN_PARAM_VALIDATION_MESSAGE], + ]; + } + + /** + * @param array $constraints + * @param array $expectedMessages + * + * @dataProvider providerForValidateConstraintsKO + */ + final public function testValidateConstraintsWrongValues(array $constraints, array $expectedMessages): void + { + $validator = $this->getValidatorInstance(); + $messages = $validator->validateConstraints($constraints); + + foreach ($expectedMessages as $index => $expectedMessage) { + self::assertInstanceOf( + Message::class, + $messages[0]->getTranslatableMessage() + ); + self::assertEquals( + $expectedMessage, + (string)$messages[$index]->getTranslatableMessage() + ); + } + } + + final public function testSetBadConstraint(): void + { + $validator = $this->getValidatorInstance(); + + $this->expectException(PropertyNotFoundException::class); + /** @phpstan-ignore-next-line */ + $validator->unexisting = 0; + } + + final public function testGetBadConstraint(): void + { + $validator = $this->getValidatorInstance(); + + $this->expectException(PropertyNotFoundException::class); + /** @phpstan-ignore-next-line */ + $validator->unexisting; + } + + /** + * @dataProvider providerForValidateConstraintsOK + * + * @param array{min?: ?scalar, max?: ?scalar} $data + */ + public function testValidateConstraintsCorrectValues(array $data): void + { + $validator = $this->getValidatorInstance(); + + $constraints = []; + if (array_key_exists('min', $data)) { + $constraints[$this->getMinNumericValueName()] = $data['min']; + } + if (array_key_exists('max', $data)) { + $constraints[$this->getMinNumericValueName()] = $data['max']; + } + + self::assertEmpty( + $validator->validateConstraints($constraints) + ); + } + + /** + * @dataProvider providerForConstraintsInitializeSetGet + * + * @param array $constraints + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException + */ + final public function testConstraintsInitializeGet(array $constraints): void + { + $minNumericValueName = $this->getMinNumericValueName(); + $maxNumericValueName = $this->getMaxNumericValueName(); + $validator = $this->getValidatorInstance(); + $validator->initializeWithConstraints( + $constraints + ); + self::assertSame($constraints[$minNumericValueName], $validator->{$minNumericValueName}); + self::assertSame($constraints[$maxNumericValueName], $validator->{$maxNumericValueName}); + } + + /** + * @dataProvider providerForConstraintsInitializeSetGet + * + * @param array $constraints + */ + final public function testConstraintsSetGet(array $constraints): void + { + $minNumericValueName = $this->getMinNumericValueName(); + $maxNumericValueName = $this->getMaxNumericValueName(); + $validator = $this->getValidatorInstance(); + $validator->{$minNumericValueName} = $constraints[$minNumericValueName]; + $validator->{$maxNumericValueName} = $constraints[$maxNumericValueName]; + self::assertSame($constraints[$minNumericValueName], $validator->{$minNumericValueName}); + self::assertSame($constraints[$maxNumericValueName], $validator->{$maxNumericValueName}); + } + + /** + * @param \Ibexa\Contracts\Core\FieldType\ValidationError[] $actualMessages + */ + protected static function assertWrongValueValidationMessage(array $actualMessages, string $expectedMessage): void + { + self::assertCount(1, $actualMessages); + self::assertInstanceOf( + ValidationError::class, + $actualMessages[0] + ); + self::assertInstanceOf( + Message::class, + $actualMessages[0]->getTranslatableMessage() + ); + self::assertEquals( + $expectedMessage, + (string)$actualMessages[0]->getTranslatableMessage() + ); + } +} diff --git a/tests/lib/FieldType/Validator/FloatValueValidatorTest.php b/tests/lib/FieldType/Validator/FloatValueValidatorTest.php new file mode 100644 index 0000000000..92b8db737c --- /dev/null +++ b/tests/lib/FieldType/Validator/FloatValueValidatorTest.php @@ -0,0 +1,178 @@ + + * + * @group fieldType + * @group validator + */ +final class FloatValueValidatorTest extends BaseNumericValidatorTestCase +{ + private const float MIN_FLOAT_VALUE = 1.4285714285714; + private const float MAX_FLOAT_VALUE = 1.5714285714286; + + protected function getValidatorInstance(): Validator + { + return new FloatValueValidator(); + } + + protected function getMinNumericValueName(): string + { + return 'minFloatValue'; + } + + protected function getMaxNumericValueName(): string + { + return 'maxFloatValue'; + } + + protected function getMinFloatValue(): float + { + return self::MIN_FLOAT_VALUE; + } + + protected function getMaxFloatValue(): float + { + return self::MAX_FLOAT_VALUE; + } + + public static function providerForConstraintsInitializeSetGet(): iterable + { + yield [ + [ + 'minFloatValue' => 0.5, + 'maxFloatValue' => 3.1428571428571, + ], + ]; + } + + /** + * Test getting constraints schema. + */ + public function testGetConstraintsSchema(): void + { + $constraintsSchema = [ + $this->getMinNumericValueName() => [ + 'type' => 'float', + 'default' => null, + ], + $this->getMaxNumericValueName() => [ + 'type' => 'float', + 'default' => null, + ], + ]; + $validator = $this->getValidatorInstance(); + self::assertSame($constraintsSchema, $validator->getConstraintsSchema()); + } + + public function testInitializeBadConstraint(): void + { + $constraints = [ + 'unexisting' => 0, + ]; + $validator = $this->getValidatorInstance(); + + $this->expectException(PropertyNotFoundException::class); + $validator->initializeWithConstraints( + $constraints + ); + } + + /** + * @dataProvider providerForValidateOK + */ + public function testValidateCorrectValues(float $value): void + { + $validator = $this->getValidatorInstance(); + $validator->minFloatValue = self::MIN_FLOAT_VALUE; + $validator->maxFloatValue = self::MAX_FLOAT_VALUE; + self::assertTrue($validator->validate(new FloatValue($value))); + self::assertSame([], $validator->getMessage()); + } + + /** + * @return list + */ + public function providerForValidateOK(): array + { + return [ + [ + 1.4285714285714286, + ], + [ + 1.4428571428571428, + ], + [ + 1.5, + ], + [ + 1.5571428571428572, + ], + [ + 1.5714285714285714, + ], + ]; + } + + /** + * @dataProvider providerForValidateKO + */ + public function testValidateWrongValues(float $value, string $message): void + { + $validator = $this->getValidatorInstance(); + $validator->minFloatValue = $this->getMinFloatValue(); + $validator->maxFloatValue = $this->getMaxFloatValue(); + self::assertFalse($validator->validate(new FloatValue($value))); + self::assertWrongValueValidationMessage($validator->getMessage(), $message); + } + + /** + * @return list + */ + public function providerForValidateKO(): array + { + return [ + [-self::MIN_FLOAT_VALUE, strtr( + self::VALUE_TOO_LOW_VALIDATION_MESSAGE, + [self::SIZE_PARAM => $this->getMinFloatValue()] + )], + [0, strtr(self::VALUE_TOO_LOW_VALIDATION_MESSAGE, [self::SIZE_PARAM => $this->getMinFloatValue()])], + [1.4142857142857, strtr(self::VALUE_TOO_LOW_VALIDATION_MESSAGE, [self::SIZE_PARAM => $this->getMinFloatValue()])], + [1.5857142857143, strtr(self::VALUE_TOO_HIGH_VALIDATION_MESSAGE, [self::SIZE_PARAM => $this->getMaxFloatValue()])], + ]; + } + + public function providerForValidateConstraintsOK(): iterable + { + yield [[]]; + yield [[self::MAX => 3.2]]; + yield [[self::MIN => 7]]; + yield [[self::MIN => -7, self::MAX => null]]; + yield [[self::MIN => 4, self::MAX => 4.3]]; + yield [[self::MIN => null, self::MAX => 12.7]]; + yield [[self::MIN => null, self::MAX => null]]; + } + + protected function getIncorrectNumericTypeValidationMessage(string $parameterName): string + { + return sprintf( + "Validator parameter '%s' value must be of numeric type", + $parameterName + ); + } +} diff --git a/tests/lib/FieldType/Validator/IntegerValueValidatorTest.php b/tests/lib/FieldType/Validator/IntegerValueValidatorTest.php new file mode 100644 index 0000000000..0caa83823b --- /dev/null +++ b/tests/lib/FieldType/Validator/IntegerValueValidatorTest.php @@ -0,0 +1,162 @@ + + * + * @group fieldType + * @group validator + */ +final class IntegerValueValidatorTest extends BaseNumericValidatorTestCase +{ + protected function getValidatorInstance(): Validator + { + return new IntegerValueValidator(); + } + + protected function getMinNumericValueName(): string + { + return 'minIntegerValue'; + } + + protected function getMaxNumericValueName(): string + { + return 'maxIntegerValue'; + } + + protected function getMinIntegerValue(): int + { + return 10; + } + + protected function getMaxIntegerValue(): int + { + return 15; + } + + public static function providerForConstraintsInitializeSetGet(): iterable + { + yield [ + [ + 'minIntegerValue' => 0, + 'maxIntegerValue' => 100, + ], + ]; + } + + public function testGetConstraintsSchema(): void + { + $constraintsSchema = [ + $this->getMinNumericValueName() => [ + 'type' => 'int', + 'default' => 0, + ], + $this->getMaxNumericValueName() => [ + 'type' => 'int', + 'default' => null, + ], + ]; + $validator = $this->getValidatorInstance(); + self::assertSame($constraintsSchema, $validator->getConstraintsSchema()); + } + + public function testInitializeBadConstraint(): void + { + $this->expectException(PropertyNotFoundException::class); + + $constraints = [ + 'unexisting' => 0, + ]; + $validator = $this->getValidatorInstance(); + $validator->initializeWithConstraints( + $constraints + ); + } + + /** + * @dataProvider providerForValidateOK + */ + public function testValidateCorrectValues(int $value): void + { + $validator = $this->getValidatorInstance(); + $validator->minIntegerValue = 10; + $validator->maxIntegerValue = 15; + self::assertTrue($validator->validate(new IntegerValue($value))); + self::assertSame([], $validator->getMessage()); + } + + /** + * @return list + */ + public function providerForValidateOK(): array + { + return [ + [10], + [11], + [12], + [13], + [14], + [15], + ]; + } + + /** + * Tests validating a wrong value. + * + * @dataProvider providerForValidateKO + */ + public function testValidateWrongValues(int $value, string $message): void + { + $validator = $this->getValidatorInstance(); + $validator->minIntegerValue = $this->getMinIntegerValue(); + $validator->maxIntegerValue = $this->getMaxIntegerValue(); + self::assertFalse($validator->validate(new IntegerValue($value))); + self::assertWrongValueValidationMessage($validator->getMessage(), $message); + } + + /** + * @return list + */ + public function providerForValidateKO(): array + { + return [ + [-12, strtr(self::VALUE_TOO_LOW_VALIDATION_MESSAGE, [self::SIZE_PARAM => $this->getMinIntegerValue()])], + [0, strtr(self::VALUE_TOO_LOW_VALIDATION_MESSAGE, [self::SIZE_PARAM => $this->getMinIntegerValue()])], + [9, strtr(self::VALUE_TOO_LOW_VALIDATION_MESSAGE, [self::SIZE_PARAM => $this->getMinIntegerValue()])], + [16, strtr(self::VALUE_TOO_HIGH_VALIDATION_MESSAGE, [self::SIZE_PARAM => $this->getMaxIntegerValue()])], + ]; + } + + public function providerForValidateConstraintsOK(): iterable + { + yield [[]]; + yield [[self::MIN => 5]]; + yield [[self::MAX => 2]]; + yield [[self::MIN => null, self::MAX => null]]; + yield [[self::MIN => -5, self::MAX => null]]; + yield [[self::MIN => null, self::MAX => 12]]; + yield [[self::MIN => 6, self::MAX => 8]]; + } + + protected function getIncorrectNumericTypeValidationMessage(string $parameterName): string + { + return sprintf( + "Validator parameter '%s' value must be of integer type", + $parameterName + ); + } +} diff --git a/tests/lib/FieldType/StringLengthValidatorTest.php b/tests/lib/FieldType/Validator/StringLengthValidatorTest.php similarity index 50% rename from tests/lib/FieldType/StringLengthValidatorTest.php rename to tests/lib/FieldType/Validator/StringLengthValidatorTest.php index 64469531b4..e34506e7ef 100644 --- a/tests/lib/FieldType/StringLengthValidatorTest.php +++ b/tests/lib/FieldType/Validator/StringLengthValidatorTest.php @@ -4,8 +4,9 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); -namespace Ibexa\Tests\Core\FieldType; +namespace Ibexa\Tests\Core\FieldType\Validator; use Ibexa\Contracts\Core\FieldType\ValidationError; use Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException; @@ -17,31 +18,31 @@ use PHPUnit\Framework\TestCase; /** + * @covers \Ibexa\Core\FieldType\Validator\StringLengthValidator + * * @group fieldType * @group validator */ -class StringLengthValidatorTest extends TestCase +final class StringLengthValidatorTest extends TestCase { - /** - * @return int - */ - protected function getMinStringLength() + private const string STRING_TOO_SHORT_VALIDATION_MESSAGE = 'The string cannot be shorter than 5 characters.'; + private const string STRING_TOO_LONG_VALIDATION_MESSAGE = 'The string can not exceed 10 characters.'; + private const string MIN_STR_LEN_INT_TYPE_VALIDATION_MESSAGE = "Validator parameter 'minStringLength' value must be of integer type"; + private const string WRONG_MIN_STR_LEN_VALUE = 'five thousand characters'; + private const string MAX_STR_LEN_INT_TYPE_VALIDATION_MESSAGE = "Validator parameter 'maxStringLength' value must be of integer type"; + private const string WRONG_MAX_STR_LEN_VALUE = 'ten billion characters'; + + protected function getMinStringLength(): int { return 5; } - /** - * @return int - */ - protected function getMaxStringLength() + protected function getMaxStringLength(): int { return 10; } - /** - * This test ensure an StringLengthValidator can be created. - */ - public function testConstructor() + public function testConstructor(): void { self::assertInstanceOf( Validator::class, @@ -50,12 +51,9 @@ public function testConstructor() } /** - * Tests setting and getting constraints. - * - * @covers \Ibexa\Core\FieldType\Validator::initializeWithConstraints - * @covers \Ibexa\Core\FieldType\Validator::__get + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException */ - public function testConstraintsInitializeGet() + public function testConstraintsInitializeGet(): void { $constraints = [ 'minStringLength' => 5, @@ -69,12 +67,7 @@ public function testConstraintsInitializeGet() self::assertSame($constraints['maxStringLength'], $validator->maxStringLength); } - /** - * Test getting constraints schema. - * - * @covers \Ibexa\Core\FieldType\Validator::getConstraintsSchema - */ - public function testGetConstraintsSchema() + public function testGetConstraintsSchema(): void { $constraintsSchema = [ 'minStringLength' => [ @@ -90,13 +83,7 @@ public function testGetConstraintsSchema() self::assertSame($constraintsSchema, $validator->getConstraintsSchema()); } - /** - * Tests setting and getting constraints. - * - * @covers \Ibexa\Core\FieldType\Validator::__set - * @covers \Ibexa\Core\FieldType\Validator::__get - */ - public function testConstraintsSetGet() + public function testConstraintsSetGet(): void { $constraints = [ 'minStringLength' => 5, @@ -109,59 +96,41 @@ public function testConstraintsSetGet() self::assertSame($constraints['maxStringLength'], $validator->maxStringLength); } - /** - * Tests initializing with a wrong constraint. - * - * @covers \Ibexa\Core\FieldType\Validator::initializeWithConstraints - */ - public function testInitializeBadConstraint() + public function testInitializeBadConstraint(): void { - $this->expectException(PropertyNotFoundException::class); - $constraints = [ 'unexisting' => 0, ]; $validator = new StringLengthValidator(); + + $this->expectException(PropertyNotFoundException::class); $validator->initializeWithConstraints( $constraints ); } - /** - * Tests setting a wrong constraint. - * - * @covers \Ibexa\Core\FieldType\Validator::__set - */ - public function testSetBadConstraint() + public function testSetBadConstraint(): void { - $this->expectException(PropertyNotFoundException::class); - $validator = new StringLengthValidator(); + + $this->expectException(PropertyNotFoundException::class); + /** @phpstan-ignore-next-line */ $validator->unexisting = 0; } - /** - * Tests getting a wrong constraint. - * - * @covers \Ibexa\Core\FieldType\Validator::__get - */ - public function testGetBadConstraint() + public function testGetBadConstraint(): void { - $this->expectException(PropertyNotFoundException::class); - $validator = new StringLengthValidator(); - $null = $validator->unexisting; + + $this->expectException(PropertyNotFoundException::class); + /** @phpstan-ignore-next-line */ + $validator->unexisting; } /** - * Tests validating a correct value. - * * @dataProvider providerForValidateOK - * - * @covers \Ibexa\Core\FieldType\Validator\StringLengthValidator::validate - * @covers \Ibexa\Core\FieldType\Validator::getMessage */ - public function testValidateCorrectValues($value) + public function testValidateCorrectValues(string $value): void { $validator = new StringLengthValidator(); $validator->minStringLength = 5; @@ -170,7 +139,10 @@ public function testValidateCorrectValues($value) self::assertSame([], $validator->getMessage()); } - public function providerForValidateOK() + /** + * @return list + */ + public function providerForValidateOK(): array { return [ ['hello'], @@ -181,17 +153,17 @@ public function providerForValidateOK() } /** - * Tests validating a wrong value. - * * @dataProvider providerForValidateKO - * - * @covers \Ibexa\Core\FieldType\Validator\StringLengthValidator::validate */ - public function testValidateWrongValues($value, $messageSingular, $messagePlural, $values) - { + public function testValidateWrongValues( + string $value, + string $expectedMessage, + int $minStringLength, + int $maxStringLength + ): void { $validator = new StringLengthValidator(); - $validator->minStringLength = $this->getMinStringLength(); - $validator->maxStringLength = $this->getMaxStringLength(); + $validator->minStringLength = $minStringLength; + $validator->maxStringLength = $maxStringLength; self::assertFalse($validator->validate(new TextLineValue($value))); $messages = $validator->getMessage(); self::assertCount(1, $messages); @@ -204,57 +176,65 @@ public function testValidateWrongValues($value, $messageSingular, $messagePlural $messages[0]->getTranslatableMessage() ); self::assertEquals( - $messageSingular, - $messages[0]->getTranslatableMessage()->singular - ); - self::assertEquals( - $messagePlural, - $messages[0]->getTranslatableMessage()->plural - ); - self::assertEquals( - $values, - $messages[0]->getTranslatableMessage()->values + $expectedMessage, + (string)$messages[0]->getTranslatableMessage() ); } - public function providerForValidateKO() + /** + * @return iterable + */ + public function providerForValidateKO(): iterable { - return [ - [ - '', - 'The string cannot be shorter than %size% character.', - 'The string cannot be shorter than %size% characters.', - ['%size%' => $this->getMinStringLength()], - ], - [ - 'Hi!', - 'The string cannot be shorter than %size% character.', - 'The string cannot be shorter than %size% characters.', - ['%size%' => $this->getMinStringLength()], - ], - [ - '0123456789!', - 'The string can not exceed %size% character.', - 'The string can not exceed %size% characters.', - ['%size%' => $this->getMaxStringLength()], - ], - [ - 'ABC♔', - 'The string cannot be shorter than %size% character.', - 'The string cannot be shorter than %size% characters.', - ['%size%' => $this->getMinStringLength()], - ], + yield 'empty string' => [ + '', + self::STRING_TOO_SHORT_VALIDATION_MESSAGE, + $this->getMinStringLength(), + $this->getMaxStringLength(), + ]; + + yield 'too short string' => [ + 'Hi!', + self::STRING_TOO_SHORT_VALIDATION_MESSAGE, + $this->getMinStringLength(), + $this->getMaxStringLength(), + ]; + + yield 'too long string' => [ + '0123456789!', + self::STRING_TOO_LONG_VALIDATION_MESSAGE, + $this->getMinStringLength(), + $this->getMaxStringLength(), + ]; + + yield 'too short string with special characters' => [ + 'ABC♔', + self::STRING_TOO_SHORT_VALIDATION_MESSAGE, + $this->getMinStringLength(), + $this->getMaxStringLength(), + ]; + + yield 'too short string, singular form validation message' => [ + '', + 'The string cannot be shorter than 1 character.', + 1, + $this->getMaxStringLength(), + ]; + + yield 'too long string, singular form validation message' => [ + 'foo', + 'The string can not exceed 1 character.', + 1, + 1, ]; } /** - * Tests validation of constraints. + * @param array $constraints * * @dataProvider providerForValidateConstraintsOK - * - * @covers \Ibexa\Core\FieldType\Validator\FileSizeValidator::validateConstraints */ - public function testValidateConstraintsCorrectValues($constraints) + public function testValidateConstraintsCorrectValues(array $constraints): void { $validator = new StringLengthValidator(); @@ -263,7 +243,10 @@ public function testValidateConstraintsCorrectValues($constraints) ); } - public function providerForValidateConstraintsOK() + /** + * @return list>> + */ + public function providerForValidateConstraintsOK(): array { return [ [ @@ -295,13 +278,12 @@ public function providerForValidateConstraintsOK() } /** - * Tests validation of constraints. - * * @dataProvider providerForValidateConstraintsKO * - * @covers \Ibexa\Core\FieldType\Validator\FileSizeValidator::validateConstraints + * @param array $constraints + * @param string[] $expectedMessages */ - public function testValidateConstraintsWrongValues($constraints, $expectedMessages, $values) + public function testValidateConstraintsWrongValues(array $constraints, array $expectedMessages): void { $validator = new StringLengthValidator(); $messages = $validator->validateConstraints($constraints); @@ -309,102 +291,76 @@ public function testValidateConstraintsWrongValues($constraints, $expectedMessag foreach ($expectedMessages as $index => $expectedMessage) { self::assertInstanceOf( Message::class, - $messages[0]->getTranslatableMessage() + $messages[$index]->getTranslatableMessage() ); self::assertEquals( $expectedMessage, - $messages[$index]->getTranslatableMessage()->message - ); - self::assertEquals( - $values[$index], - $messages[$index]->getTranslatableMessage()->values + (string)$messages[$index]->getTranslatableMessage() ); } } - public function providerForValidateConstraintsKO() + /** + * @return list, string[]}> + */ + public function providerForValidateConstraintsKO(): array { return [ [ [ 'minStringLength' => true, ], - ["Validator parameter '%parameter%' value must be of integer type"], - [ - ['%parameter%' => 'minStringLength'], - ], + [self::MIN_STR_LEN_INT_TYPE_VALIDATION_MESSAGE], ], [ [ - 'minStringLength' => 'five thousand characters', - ], - ["Validator parameter '%parameter%' value must be of integer type"], - [ - ['%parameter%' => 'minStringLength'], + 'minStringLength' => self::WRONG_MIN_STR_LEN_VALUE, ], + [self::MIN_STR_LEN_INT_TYPE_VALIDATION_MESSAGE], ], [ [ - 'minStringLength' => 'five thousand characters', + 'minStringLength' => self::WRONG_MIN_STR_LEN_VALUE, 'maxStringLength' => 1234, ], - ["Validator parameter '%parameter%' value must be of integer type"], - [ - ['%parameter%' => 'minStringLength'], - ], + [self::MIN_STR_LEN_INT_TYPE_VALIDATION_MESSAGE], ], [ [ 'maxStringLength' => new \DateTime(), 'minStringLength' => 1234, ], - ["Validator parameter '%parameter%' value must be of integer type"], - [ - ['%parameter%' => 'maxStringLength'], - ], + [self::MAX_STR_LEN_INT_TYPE_VALIDATION_MESSAGE], ], [ [ 'minStringLength' => true, 'maxStringLength' => 1234, ], - ["Validator parameter '%parameter%' value must be of integer type"], - [ - ['%parameter%' => 'minStringLength'], - ], + [self::MIN_STR_LEN_INT_TYPE_VALIDATION_MESSAGE], ], [ [ - 'minStringLength' => 'five thousand characters', - 'maxStringLength' => 'ten billion characters', + 'minStringLength' => self::WRONG_MIN_STR_LEN_VALUE, + 'maxStringLength' => self::WRONG_MAX_STR_LEN_VALUE, ], [ - "Validator parameter '%parameter%' value must be of integer type", - "Validator parameter '%parameter%' value must be of integer type", - ], - [ - ['%parameter%' => 'minStringLength'], - ['%parameter%' => 'maxStringLength'], + self::MIN_STR_LEN_INT_TYPE_VALIDATION_MESSAGE, + self::MAX_STR_LEN_INT_TYPE_VALIDATION_MESSAGE, ], ], [ [ 'brljix' => 12345, ], - ["Validator parameter '%parameter%' is unknown"], - [ - ['%parameter%' => 'brljix'], - ], + ["Validator parameter 'brljix' is unknown"], ], [ [ 'minStringLength' => 12345, 'brljix' => 12345, ], - ["Validator parameter '%parameter%' is unknown"], - [ - ['%parameter%' => 'brljix'], - ], + ["Validator parameter 'brljix' is unknown"], ], ]; } From 9356c9212e9768d61e54ccffce7572c265361c55 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Wed, 28 Aug 2024 21:45:54 +0200 Subject: [PATCH 34/53] IBX-8138: [Rector] Applied rules from Symfony 5 Rector set lists (#385) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For more details see https://issues.ibexa.co/browse/IBX-8138 and https://github.com/ibexa/core/pull/385 Key changes: * [Rector] Applied Symfony 5.1 CommandConstantReturnCodeRector * [Rector] Applied Symfony 5.2 RenameMethodRector * [Rector] Applied Symfony 5.3 Rector sets * [Rector] Applied Symfony code quality Rector sets Applied rules: * LiteralGetToRequestClassConstantRector * ResponseStatusCodeRector * MakeCommandLazyRector * [Rector] Applied Return type rectors Applied rules: * ReturnTypeFromStrictNativeCallRector * ReturnTypeFromStrictScalarReturnExprRector * [Rector] Applied Symfony 6.0 AddReturnTypeDeclarationRector * [Rector] Added Symfony Bundle::getContainerExtension return type * Added strict types for InstallPlatformCommand consts * Made XML serialization exception more verbose in Author and DateTime converters * Implemented `\Ibexa\Core\MVC\Symfony\Security\User::getUserIdentifier` --------- Co-Authored-By: Paweł Niedzielski Co-Authored-By: Konrad Oboza --- composer.json | 1 + .../Core/Cache/Warmer/ProxyCacheWarmer.php | 4 ++- src/bundle/Core/Command/CheckURLsCommand.php | 2 +- .../Core/Command/CleanupVersionsCommand.php | 14 +++++--- .../Core/Command/CopySubtreeCommand.php | 12 ++++--- .../Command/DebugConfigResolverCommand.php | 7 ++-- .../DeleteContentTranslationCommand.php | 14 ++++---- .../Command/ExpireUserPasswordsCommand.php | 7 ++-- .../Command/NormalizeImagesPathsCommand.php | 11 +++--- .../Command/RegenerateUrlAliasesCommand.php | 17 +++++----- src/bundle/Core/Command/ReindexCommand.php | 12 ++++--- .../Command/ResizeOriginalImagesCommand.php | 13 +++---- .../SetSystemContentTypeGroupCommand.php | 3 +- .../Command/UpdateTimestampsToUTCCommand.php | 31 +++++++++-------- .../Core/Converter/ContentParamConverter.php | 4 +-- .../Core/Converter/LocationParamConverter.php | 4 +-- .../DependencyInjection/Configuration.php | 8 ++--- .../ComplexSettings/ComplexSettingParser.php | 4 +-- .../Configuration/Parser/Image.php | 2 +- .../SiteAccessAware/DynamicSettingParser.php | 2 +- .../Collector/SuggestionCollector.php | 2 +- .../IbexaCoreExtension.php | 10 +++--- .../PolicyProvider/PoliciesConfigBuilder.php | 2 +- .../BackgroundIndexingTerminateListener.php | 2 +- .../CacheViewResponseListener.php | 2 +- .../EventListener/ConfigScopeListener.php | 2 +- .../EventListener/ConsoleCommandListener.php | 2 +- .../ContentDownloadRouteReferenceListener.php | 2 +- .../Core/EventListener/ExceptionListener.php | 2 +- .../EventListener/IndexRequestListener.php | 4 +-- .../EventListener/OriginalRequestListener.php | 6 ++-- .../EventListener/PreviewRequestListener.php | 2 +- ...xplicitFrontControllerRequestsListener.php | 2 +- .../EventListener/RequestEventListener.php | 9 ++--- .../Core/EventListener/RoutingListener.php | 2 +- .../SessionInitByPostListener.php | 2 +- .../SessionSetDynamicNameListener.php | 2 +- .../EventListener/ViewControllerListener.php | 2 +- .../EventListener/ViewRendererListener.php | 2 +- .../CrowdinRequestLocaleSubscriber.php | 2 +- .../Features/Context/BasicContentContext.php | 4 +-- .../Context/ContentPreviewContext.php | 2 +- .../Features/Context/ContentTypeContext.php | 2 +- .../Core/Features/Context/UserContext.php | 4 +-- src/bundle/Core/Imagine/AliasGenerator.php | 2 +- .../Imagine/Cache/AliasGeneratorDecorator.php | 2 +- .../AliasDirectoryVariationPathGenerator.php | 2 +- ...riginalDirectoryVariationPathGenerator.php | 2 +- src/bundle/Core/Routing/DefaultRouter.php | 2 +- .../Core/URLChecker/Handler/HTTPHandler.php | 2 +- .../Core/URLChecker/URLHandlerRegistry.php | 2 +- .../Debug/Collector/IbexaCoreCollector.php | 2 +- .../Collector/PersistenceCacheCollector.php | 2 +- .../Debug/Collector/SiteAccessCollector.php | 2 +- src/bundle/IO/BinaryStreamResponse.php | 4 +-- src/bundle/IO/Command/MigrateFilesCommand.php | 20 ++++++----- .../IO/DependencyInjection/Configuration.php | 2 +- .../BinarydataHandler/Flysystem.php | 2 +- .../ConfigurationFactory/Flysystem.php | 2 +- .../MetadataHandler/Flysystem.php | 2 +- .../MetadataHandler/LegacyDFSCluster.php | 2 +- .../DependencyInjection/IbexaIOExtension.php | 5 +-- .../IO/EventListener/StreamFileListener.php | 6 ++-- src/bundle/IO/IbexaIOBundle.php | 3 +- .../Migration/FileLister/BinaryFileLister.php | 2 +- .../LegacyStorageBinaryFileRowReader.php | 2 +- .../LegacyStorageFileRowReader.php | 2 +- .../LegacyStorageMediaFileRowReader.php | 2 +- .../Migration/FileLister/ImageFileLister.php | 2 +- .../ConfigurableRegistry.php | 2 +- .../Migration/FileMigrator/FileMigrator.php | 2 +- .../IbexaLegacySearchEngineExtension.php | 2 +- .../IbexaLegacySearchEngineBundle.php | 3 +- .../Command/InstallPlatformCommand.php | 18 +++++----- .../Command/ValidatePasswordHashesCommand.php | 9 ++--- .../Filter/Doctrine/FilteringQueryBuilder.php | 2 +- .../Values/Content/Query/Criterion.php | 8 ++--- .../Persistence/Fixture/FixtureImporter.php | 2 +- .../UserPasswordValidationException.php | 2 +- src/lib/Base/TranslatableBase.php | 2 +- src/lib/FieldType/Author/SearchField.php | 4 +-- src/lib/FieldType/Author/Type.php | 14 ++++---- .../BinaryBase/BinaryBaseStorage.php | 3 +- .../PathGenerator/LegacyPathGenerator.php | 4 +-- .../Gateway/DoctrineStorage.php | 2 +- src/lib/FieldType/BinaryFile/Type.php | 2 +- src/lib/FieldType/Checkbox/SearchField.php | 2 +- src/lib/FieldType/Checkbox/Type.php | 6 ++-- src/lib/FieldType/Country/SearchField.php | 4 +-- src/lib/FieldType/Country/Type.php | 6 ++-- src/lib/FieldType/Date/SearchField.php | 2 +- src/lib/FieldType/Date/Type.php | 4 +-- src/lib/FieldType/DateAndTime/SearchField.php | 2 +- src/lib/FieldType/DateAndTime/Type.php | 4 +-- .../FieldType/EmailAddress/SearchField.php | 2 +- src/lib/FieldType/EmailAddress/Type.php | 4 +-- src/lib/FieldType/Float/SearchField.php | 2 +- src/lib/FieldType/Float/Type.php | 4 +-- src/lib/FieldType/ISBN/Type.php | 10 +++--- src/lib/FieldType/Image/IO/Legacy.php | 4 +-- src/lib/FieldType/Image/ImageStorage.php | 11 +++--- .../ImageStorage/Gateway/DoctrineStorage.php | 2 +- .../PathGenerator/LegacyPathGenerator.php | 4 +-- src/lib/FieldType/Image/SearchField.php | 2 +- src/lib/FieldType/Image/Type.php | 4 +-- src/lib/FieldType/Integer/SearchField.php | 2 +- src/lib/FieldType/Integer/Type.php | 6 ++-- src/lib/FieldType/Keyword/KeywordStorage.php | 15 +++----- .../Gateway/DoctrineStorage.php | 2 +- src/lib/FieldType/Keyword/SearchField.php | 4 +-- src/lib/FieldType/Keyword/Type.php | 6 ++-- .../MapLocation/MapLocationStorage.php | 14 +++----- .../Gateway/DoctrineStorage.php | 4 +-- src/lib/FieldType/MapLocation/SearchField.php | 2 +- src/lib/FieldType/MapLocation/Type.php | 6 ++-- .../MediaStorage/Gateway/DoctrineStorage.php | 8 ++--- src/lib/FieldType/Media/Type.php | 4 +-- src/lib/FieldType/Null/Type.php | 2 +- src/lib/FieldType/NullStorage.php | 13 +++---- src/lib/FieldType/Relation/SearchField.php | 2 +- src/lib/FieldType/Relation/Type.php | 8 ++--- .../FieldType/RelationList/SearchField.php | 4 +-- src/lib/FieldType/RelationList/Type.php | 8 ++--- src/lib/FieldType/Selection/SearchField.php | 4 +-- src/lib/FieldType/Selection/Type.php | 8 ++--- src/lib/FieldType/TextBlock/SearchField.php | 4 +-- src/lib/FieldType/TextBlock/Type.php | 2 +- src/lib/FieldType/TextLine/Type.php | 2 +- src/lib/FieldType/Time/SearchField.php | 2 +- src/lib/FieldType/Time/Type.php | 6 ++-- src/lib/FieldType/Url/SearchField.php | 2 +- src/lib/FieldType/Url/Type.php | 4 +-- src/lib/FieldType/Url/UrlStorage.php | 29 +++------------- .../UrlStorage/Gateway/DoctrineStorage.php | 4 +-- src/lib/FieldType/User/Type.php | 8 ++--- src/lib/FieldType/User/UserStorage.php | 12 ++----- .../UserStorage/Gateway/DoctrineStorage.php | 6 ++-- .../Validator/EmailAddressValidator.php | 2 +- .../FileExtensionBlackListValidator.php | 2 +- .../FieldType/Validator/FileSizeValidator.php | 2 +- .../FieldType/Validator/ImageValidator.php | 2 +- .../Validator/StringLengthValidator.php | 4 +-- src/lib/Helper/TranslationHelper.php | 2 +- .../IO/IOMetadataHandler/LegacyDFSCluster.php | 4 +-- src/lib/IO/MimeTypeDetector/FileInfo.php | 4 +-- src/lib/Limitation/BlockingLimitationType.php | 2 +- src/lib/Limitation/LocationLimitationType.php | 12 ++----- .../NewObjectStateLimitationType.php | 2 +- .../Limitation/NewSectionLimitationType.php | 2 +- .../Limitation/ObjectStateLimitationType.php | 2 +- src/lib/Limitation/OwnerLimitationType.php | 2 +- .../ParentContentTypeLimitationType.php | 2 +- .../Limitation/ParentDepthLimitationType.php | 2 +- .../Limitation/ParentOwnerLimitationType.php | 2 +- .../ParentUserGroupLimitationType.php | 2 +- .../Limitation/SiteAccessLimitationType.php | 2 +- src/lib/Limitation/StatusLimitationType.php | 2 +- src/lib/Limitation/SubtreeLimitationType.php | 12 ++----- .../Limitation/UserGroupLimitationType.php | 2 +- .../AbstractPropertyWhitelistNormalizer.php | 18 +++++++--- .../Serializer/CompoundMatcherNormalizer.php | 6 ++-- .../Serializer/HostElementNormalizer.php | 2 +- .../Serializer/HostTextNormalizer.php | 2 +- .../Component/Serializer/MapNormalizer.php | 8 +++-- .../Serializer/RegexHostNormalizer.php | 2 +- .../Component/Serializer/RegexNormalizer.php | 2 +- .../Serializer/RegexURINormalizer.php | 2 +- .../SimplifiedRequestNormalizer.php | 18 +++++++--- .../Serializer/URIElementNormalizer.php | 2 +- .../Serializer/URITextNormalizer.php | 2 +- .../Content/DownloadRedirectionController.php | 3 +- .../Event/APIContentExceptionEvent.php | 2 +- .../EventListener/LanguageSwitchListener.php | 2 +- .../EventListener/SiteAccessMatchListener.php | 2 +- .../TwigVariableProviderExtension.php | 2 +- .../ContentDownloadUrlGenerator.php | 2 +- .../View/ParameterProviderRegistry.php | 2 +- .../Symfony/Matcher/ContentBased/Depth.php | 4 +-- .../Matcher/ContentBased/Id/Content.php | 6 ++-- .../Matcher/ContentBased/Id/ContentType.php | 6 ++-- .../ContentBased/Id/ContentTypeGroup.php | 2 +- .../Matcher/ContentBased/Id/Location.php | 6 ++-- .../ContentBased/Id/LocationRemote.php | 2 +- .../ContentBased/Id/ParentContentType.php | 4 +-- .../ContentBased/Id/ParentLocation.php | 6 ++-- .../Matcher/ContentBased/Id/Remote.php | 6 ++-- .../Matcher/ContentBased/Id/Section.php | 6 ++-- .../ContentBased/Identifier/ContentType.php | 6 ++-- .../Identifier/ParentContentType.php | 2 +- .../ContentBased/Identifier/Section.php | 6 ++-- .../Symfony/Matcher/ContentBased/UrlAlias.php | 2 +- .../Routing/Generator/UrlAliasGenerator.php | 4 +-- .../MVC/Symfony/Routing/UrlAliasRouter.php | 2 +- .../Authorization/Voter/CoreVoter.php | 6 ++-- .../Authorization/Voter/ValueObjectVoter.php | 6 ++-- src/lib/MVC/Symfony/Security/HttpUtils.php | 2 +- src/lib/MVC/Symfony/Security/User.php | 5 +++ .../Symfony/Security/User/BaseProvider.php | 8 ++--- src/lib/MVC/Symfony/Security/UserWrapped.php | 2 +- .../SiteAccess/Matcher/HostElement.php | 2 +- .../Symfony/SiteAccess/Matcher/Map/Host.php | 2 +- .../Symfony/SiteAccess/Matcher/Map/Port.php | 2 +- .../Symfony/SiteAccess/Matcher/Map/URI.php | 4 +-- .../Symfony/SiteAccess/Matcher/Regex/Host.php | 2 +- .../Symfony/SiteAccess/Matcher/Regex/URI.php | 2 +- .../Symfony/SiteAccess/Matcher/URIElement.php | 4 +-- .../Twig/Extension/FileSizeExtension.php | 2 +- .../Translation/CatalogueMapperFileWriter.php | 18 +++++----- .../View/Builder/ContentViewBuilder.php | 4 +-- .../ParametersFilter/RequestAttributes.php | 2 +- .../View/CustomLocationControllerChecker.php | 2 +- .../ParametersInjector/CustomParameters.php | 2 +- .../EmbedObjectParameters.php | 2 +- .../View/ParametersInjector/NoLayout.php | 2 +- .../ParametersInjector/ValueObjectsIds.php | 2 +- .../ParametersInjector/ViewbaseLayout.php | 2 +- .../Persistence/Cache/ObjectStateHandler.php | 2 +- .../FieldValue/Converter/AuthorConverter.php | 30 +++++++++++----- .../Converter/CheckboxConverter.php | 2 +- .../FieldValue/Converter/CountryConverter.php | 2 +- .../Converter/DateAndTimeConverter.php | 24 +++++++++---- .../FieldValue/Converter/DateConverter.php | 2 +- .../Converter/EmailAddressConverter.php | 2 +- .../FieldValue/Converter/FloatConverter.php | 4 +-- .../FieldValue/Converter/ISBNConverter.php | 2 +- .../Converter/ImageAssetConverter.php | 2 +- .../FieldValue/Converter/ImageConverter.php | 2 +- .../FieldValue/Converter/IntegerConverter.php | 4 +-- .../FieldValue/Converter/KeywordConverter.php | 2 +- .../Converter/MapLocationConverter.php | 2 +- .../FieldValue/Converter/MediaConverter.php | 13 ++----- .../FieldValue/Converter/NullConverter.php | 4 +-- .../Converter/RelationConverter.php | 2 +- .../Converter/RelationListConverter.php | 2 +- .../Converter/SelectionConverter.php | 2 +- .../Converter/TextBlockConverter.php | 2 +- .../Converter/TextLineConverter.php | 2 +- .../FieldValue/Converter/TimeConverter.php | 2 +- .../FieldValue/Converter/UrlConverter.php | 2 +- .../Persistence/Legacy/Content/Handler.php | 16 +++++---- .../Legacy/Content/Language/Handler.php | 4 +-- .../Legacy/Content/Language/MaskGenerator.php | 4 +-- .../Legacy/Content/Location/Handler.php | 4 +-- .../Legacy/Content/Location/Mapper.php | 2 +- src/lib/Persistence/Legacy/Content/Mapper.php | 2 +- .../Legacy/Content/ObjectState/Handler.php | 2 +- .../Legacy/Content/Type/ContentUpdater.php | 2 +- .../Legacy/Content/Type/Handler.php | 6 ++-- .../Legacy/Content/Type/Mapper.php | 2 +- .../UrlAlias/Gateway/DoctrineDatabase.php | 6 ++-- .../Legacy/Content/UrlAlias/Handler.php | 8 ++--- .../Legacy/Content/UrlWildcard/Handler.php | 2 +- .../Legacy/Content/UrlWildcard/Mapper.php | 2 +- .../Location/AncestorQueryBuilder.php | 2 +- .../Content/Doctrine/DoctrineGateway.php | 2 +- src/lib/Persistence/Legacy/URL/Handler.php | 5 +-- .../URL/Query/CriterionHandler/LogicalAnd.php | 2 +- .../URL/Query/CriterionHandler/LogicalNot.php | 4 +-- .../URL/Query/CriterionHandler/LogicalOr.php | 2 +- .../URL/Query/CriterionHandler/MatchAll.php | 4 +-- .../URL/Query/CriterionHandler/MatchNone.php | 4 +-- .../URL/Query/CriterionHandler/Pattern.php | 2 +- .../URL/Query/CriterionHandler/Validity.php | 2 +- .../Query/CriterionHandler/VisibleOnly.php | 2 +- src/lib/Persistence/Legacy/User/Mapper.php | 2 +- .../User/Role/Gateway/DoctrineDatabase.php | 2 +- .../DefinitionBased/Parser.php | 2 +- .../TransformationProcessor/PcreCompiler.php | 4 +-- src/lib/Persistence/Utf8Converter.php | 2 +- .../Repository/Mapper/ContentDomainMapper.php | 8 ++--- .../Permission/PermissionResolver.php | 4 +-- .../PermissionsCriterionHandler.php | 2 +- src/lib/Repository/TrashService.php | 2 +- src/lib/Repository/URLAliasService.php | 4 +-- src/lib/Repository/UserService.php | 2 +- .../ContentType/FieldDefinitionCollection.php | 4 +-- src/lib/Search/Common/FieldNameGenerator.php | 2 +- src/lib/Search/Common/FieldNameResolver.php | 2 +- .../Common/FieldValueMapper/BooleanMapper.php | 2 +- .../Common/FieldValueMapper/DateMapper.php | 2 +- .../Common/FieldValueMapper/FloatMapper.php | 2 +- .../FieldValueMapper/GeoLocationMapper.php | 2 +- .../Common/FieldValueMapper/PriceMapper.php | 6 +--- .../Gateway/CriterionHandler/ContentId.php | 2 +- .../CriterionHandler/ContentTypeGroupId.php | 2 +- .../CriterionHandler/ContentTypeId.php | 2 +- .../ContentTypeIdentifier.php | 2 +- .../Gateway/CriterionHandler/DateMetadata.php | 2 +- .../Common/Gateway/CriterionHandler/Field.php | 4 +-- .../Gateway/CriterionHandler/FieldEmpty.php | 2 +- .../CriterionHandler/FieldRelation.php | 2 +- .../FieldValue/HandlerRegistry.php | 2 +- .../Gateway/CriterionHandler/FullText.php | 12 +++---- .../Gateway/CriterionHandler/LanguageCode.php | 2 +- .../Gateway/CriterionHandler/LogicalAnd.php | 2 +- .../Gateway/CriterionHandler/LogicalNot.php | 4 +-- .../Gateway/CriterionHandler/LogicalOr.php | 2 +- .../CriterionHandler/MapLocationDistance.php | 4 +-- .../Gateway/CriterionHandler/MatchAll.php | 4 +-- .../Gateway/CriterionHandler/MatchNone.php | 4 +-- .../CriterionHandler/ObjectStateId.php | 2 +- .../Gateway/CriterionHandler/RemoteId.php | 2 +- .../Gateway/CriterionHandler/SectionId.php | 2 +- .../Gateway/CriterionHandler/UserMetadata.php | 2 +- .../Gateway/SortClauseHandler/ContentId.php | 2 +- .../Gateway/SortClauseHandler/ContentName.php | 2 +- .../SortClauseHandler/DateModified.php | 2 +- .../SortClauseHandler/DatePublished.php | 2 +- .../SortClauseHandler/MapLocationDistance.php | 2 +- .../SortClauseHandler/SectionIdentifier.php | 2 +- .../Gateway/SortClauseHandler/SectionName.php | 2 +- .../Gateway/CriterionHandler/Ancestor.php | 2 +- .../Gateway/CriterionHandler/LocationId.php | 2 +- .../CriterionHandler/LocationRemoteId.php | 2 +- .../CriterionHandler/ParentLocationId.php | 2 +- .../CriterionHandler/PermissionSubtree.php | 2 +- .../Gateway/CriterionHandler/Subtree.php | 2 +- .../Gateway/CriterionHandler/Visibility.php | 2 +- .../Content/Gateway/DoctrineDatabase.php | 4 +-- src/lib/Search/Legacy/Content/Indexer.php | 2 +- .../Gateway/CriterionHandler/Ancestor.php | 2 +- .../CriterionHandler/Location/Depth.php | 2 +- .../Location/IsMainLocation.php | 2 +- .../CriterionHandler/Location/Priority.php | 2 +- .../Gateway/CriterionHandler/LocationId.php | 2 +- .../CriterionHandler/LocationRemoteId.php | 2 +- .../CriterionHandler/ParentLocationId.php | 2 +- .../Gateway/CriterionHandler/Subtree.php | 2 +- .../Gateway/CriterionHandler/Visibility.php | 2 +- .../SortClauseHandler/Location/Depth.php | 2 +- .../Gateway/SortClauseHandler/Location/Id.php | 2 +- .../Location/IsMainLocation.php | 2 +- .../SortClauseHandler/Location/Path.php | 2 +- .../SortClauseHandler/Location/Priority.php | 2 +- .../SortClauseHandler/Location/Visibility.php | 2 +- .../Legacy/Content/Mapper/FullTextMapper.php | 2 +- .../WordIndexer/Gateway/DoctrineDatabase.php | 2 +- .../Compiler/TranslationCollectorPassTest.php | 7 +--- .../IbexaCoreExtensionTest.php | 2 +- .../QueryType/TestQueryType.php | 2 +- .../EventListener/ExceptionListenerTest.php | 2 +- .../IndexRequestListenerTest.php | 2 +- .../Core/EventListener/LocaleListenerTest.php | 2 +- .../OriginalRequestListenerTest.php | 4 +-- ...citFrontControllerRequestsListenerTest.php | 34 +++++++++---------- .../RequestEventListenerTest.php | 20 +++++------ .../EventListener/RoutingListenerTest.php | 2 +- .../SessionSetDynamicNameListenerTest.php | 2 +- .../EventListener/SiteAccessListenerTest.php | 2 +- .../ViewControllerListenerTest.php | 2 +- .../CrowdinRequestLocaleSubscriberTest.php | 2 +- ...ustedHeaderClientIpEventSubscriberTest.php | 4 +-- .../Fragment/DirectFragmentRendererTest.php | 6 ++-- .../bundle/Core/Routing/DefaultRouterTest.php | 2 +- .../bundle/Core/URLChecker/URLCheckerTest.php | 2 +- .../BinarydataHandler/FlysystemTest.php | 2 +- .../MetadataHandler/FlysystemTest.php | 2 +- .../MetadataHandler/LegacyDFSClusterTest.php | 2 +- .../ConfigurationFactoryTest.php | 2 +- .../EventListener/StreamFileListenerTest.php | 2 +- .../IbexaRepositoryInstallerBundleTest.php | 2 +- .../integration/Core/Repository/BaseTest.php | 2 +- .../Core/Repository/ContentServiceTest.php | 8 ++--- .../Repository/ContentTypeServiceTest.php | 6 ++-- .../FieldType/AuthorIntegrationTest.php | 8 ++--- .../FieldType/BinaryFileIntegrationTest.php | 2 +- .../FieldType/CheckboxIntegrationTest.php | 8 ++--- .../FieldType/CountryIntegrationTest.php | 8 ++--- .../FieldType/DateAndTimeIntegrationTest.php | 10 +++--- .../FieldType/DateIntegrationTest.php | 10 +++--- .../FieldType/EmailAddressIntegrationTest.php | 12 +++---- .../FieldType/FloatIntegrationTest.php | 8 ++--- .../FieldType/ISBNIntegrationTest.php | 8 ++--- .../FieldType/IntegerIntegrationTest.php | 8 ++--- .../FieldType/KeywordIntegrationTest.php | 8 ++--- .../FieldType/MapLocationIntegrationTest.php | 4 +-- .../FieldType/MediaIntegrationTest.php | 2 +- .../FieldType/RelationIntegrationTest.php | 10 +++--- .../FieldType/RelationListIntegrationTest.php | 10 +++--- ...RelationSearchBaseIntegrationTestTrait.php | 2 +- .../SelectionMultilingualIntegrationTest.php | 2 +- .../FieldType/TextBlockIntegrationTest.php | 12 +++---- .../FieldType/TextLineIntegrationTest.php | 12 +++---- .../FieldType/TimeIntegrationTest.php | 10 +++--- .../FieldType/UrlIntegrationTest.php | 8 ++--- .../FieldType/UserIntegrationTest.php | 4 +-- .../Core/Repository/LocationServiceTest.php | 6 ++-- .../Repository/ObjectStateServiceTest.php | 2 +- .../Repository/PermissionResolverTest.php | 2 +- .../EZP22408DeleteRelatedObjectTest.php | 2 +- .../Core/Repository/RoleServiceTest.php | 4 +-- .../Repository/SearchServiceFulltextTest.php | 2 +- .../Repository/SearchServiceLocationTest.php | 6 ++-- .../Core/Repository/SearchServiceTest.php | 10 +++--- .../Core/Repository/URLAliasServiceTest.php | 2 +- .../Stubs/GatewayBasedStorageHandler.php | 3 +- tests/lib/FieldType/AuthorTest.php | 2 +- tests/lib/FieldType/BinaryFileTest.php | 2 +- tests/lib/FieldType/CheckboxTest.php | 2 +- tests/lib/FieldType/CountryTest.php | 2 +- tests/lib/FieldType/DateAndTimeTest.php | 2 +- tests/lib/FieldType/DateTest.php | 2 +- tests/lib/FieldType/EmailAddressTest.php | 4 +-- tests/lib/FieldType/FileSizeValidatorTest.php | 2 +- tests/lib/FieldType/FloatTest.php | 2 +- tests/lib/FieldType/ISBNTest.php | 2 +- tests/lib/FieldType/ImageTest.php | 4 +-- tests/lib/FieldType/IntegerTest.php | 2 +- tests/lib/FieldType/KeywordTest.php | 2 +- tests/lib/FieldType/MapLocationTest.php | 2 +- tests/lib/FieldType/MediaTest.php | 2 +- tests/lib/FieldType/RelationListTest.php | 2 +- tests/lib/FieldType/RelationTest.php | 2 +- tests/lib/FieldType/SelectionTest.php | 2 +- tests/lib/FieldType/TextBlockTest.php | 2 +- tests/lib/FieldType/TextLineTest.php | 2 +- tests/lib/FieldType/TimeTest.php | 2 +- tests/lib/FieldType/UrlTest.php | 2 +- tests/lib/FieldType/UserTest.php | 2 +- tests/lib/IO/IOServiceTest.php | 4 +-- .../lib/IO/MimeTypeDetector/FileInfoTest.php | 2 +- .../CompoundMatcherNormalizerTest.php | 30 +++++++++++----- .../Serializer/HostElementNormalizerTest.php | 15 ++++++-- .../Serializer/HostTextNormalizerTest.php | 12 +++++-- .../Serializer/RegexHostNormalizerTest.php | 12 +++++-- .../Serializer/RegexURINormalizerTest.php | 12 +++++-- .../Serializer/Stubs/SerializerStub.php | 6 ++-- .../Serializer/URIElementNormalizerTest.php | 12 +++++-- .../Serializer/URITextNormalizerTest.php | 12 +++++-- .../SiteAccessMatchListenerTest.php | 10 +++--- .../Security/InteractiveLoginTokenTest.php | 2 +- .../Templating/RenderContentStrategyTest.php | 2 +- .../Templating/RenderLocationStrategyTest.php | 2 +- ...FieldRenderingExtensionIntegrationTest.php | 2 +- .../lib/MVC/Symfony/View/AbstractViewTest.php | 2 +- .../lib/MVC/Symfony/View/ContentViewTest.php | 4 +-- .../lib/MVC/Symfony/View/ViewManagerTest.php | 4 +-- .../Bookmark/Gateway/DoctrineDatabaseTest.php | 4 +-- .../FieldValue/Converter/DateAndTimeTest.php | 2 +- tests/lib/Persistence/Legacy/TestCase.php | 4 +-- .../Legacy/User/UserHandlerTest.php | 4 +-- ...tionProcessorDefinitionBasedParserTest.php | 21 ++++++++---- .../lib/Repository/Service/Mock/RoleTest.php | 2 +- .../SiteAccessAware/ContentServiceTest.php | 4 +-- .../ContentTypeServiceTest.php | 4 +-- .../SiteAccessAware/LanguageServiceTest.php | 4 +-- .../SiteAccessAware/LocationServiceTest.php | 4 +-- .../ObjectStateServiceTest.php | 4 +-- .../SiteAccessAware/SearchServiceTest.php | 4 +-- .../SiteAccessAware/TrashServiceTest.php | 4 +-- .../SiteAccessAware/UrlAliasServiceTest.php | 4 +-- .../SiteAccessAware/UserServiceTest.php | 4 +-- .../Legacy/Content/HandlerContentSortTest.php | 2 +- .../Legacy/Content/HandlerContentTest.php | 2 +- .../Content/HandlerLocationSortTest.php | 2 +- .../Legacy/Content/HandlerLocationTest.php | 2 +- 456 files changed, 1033 insertions(+), 957 deletions(-) diff --git a/composer.json b/composer.json index 2dcea1f3b2..1176797286 100644 --- a/composer.json +++ b/composer.json @@ -12,6 +12,7 @@ "ext-fileinfo": "*", "ext-intl": "*", "ext-json": "*", + "ext-libxml": "*", "ext-mbstring": "*", "ext-PDO": "*", "ext-SPL": "*", diff --git a/src/bundle/Core/Cache/Warmer/ProxyCacheWarmer.php b/src/bundle/Core/Cache/Warmer/ProxyCacheWarmer.php index 12d74a0be4..58f4b054ea 100644 --- a/src/bundle/Core/Cache/Warmer/ProxyCacheWarmer.php +++ b/src/bundle/Core/Cache/Warmer/ProxyCacheWarmer.php @@ -47,8 +47,10 @@ public function isOptional(): bool return false; } - public function warmUp($cacheDir): void + public function warmUp($cacheDir): array { $this->proxyGenerator->warmUp(self::PROXY_CLASSES); + + return []; } } diff --git a/src/bundle/Core/Command/CheckURLsCommand.php b/src/bundle/Core/Command/CheckURLsCommand.php index 2589dde7cb..c1a4fc357d 100644 --- a/src/bundle/Core/Command/CheckURLsCommand.php +++ b/src/bundle/Core/Command/CheckURLsCommand.php @@ -106,7 +106,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int } $progress->finish(); - return 0; + return self::SUCCESS; } private function getTotalCount(): int diff --git a/src/bundle/Core/Command/CleanupVersionsCommand.php b/src/bundle/Core/Command/CleanupVersionsCommand.php index e964b237c1..67efa6bbbe 100644 --- a/src/bundle/Core/Command/CleanupVersionsCommand.php +++ b/src/bundle/Core/Command/CleanupVersionsCommand.php @@ -31,15 +31,21 @@ class CleanupVersionsCommand extends Command - Run this command in production environment using --env=prod EOT; public const VERSION_DRAFT = 'draft'; + public const VERSION_ARCHIVED = 'archived'; public const VERSION_PUBLISHED = 'published'; public const VERSION_ALL = 'all'; + public const VERSION_STATUS = [ self::VERSION_DRAFT => VersionInfo::STATUS_DRAFT, self::VERSION_ARCHIVED => VersionInfo::STATUS_ARCHIVED, self::VERSION_PUBLISHED => VersionInfo::STATUS_PUBLISHED, ]; + protected static $defaultName = 'ibexa:content:cleanup-versions'; + + protected static $defaultDescription = 'Removes unwanted content versions. Keeps the published version untouched. By default, also keeps the last archived/draft version.'; + private readonly Repository $repository; private readonly RepositoryConfigurationProviderInterface $repositoryConfigurationProvider; @@ -62,8 +68,6 @@ protected function configure() { $beforeRunningHints = self::BEFORE_RUNNING_HINTS; $this - ->setName('ibexa:content:cleanup-versions') - ->setDescription('Removes unwanted content versions. Keeps the published version untouched. By default, also keeps the last archived/draft version.') ->addOption( 'status', 't', @@ -144,7 +148,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int if ($contentIdsCount === 0) { $output->writeln('There is no content matching the given Criteria.'); - return 0; + return self::SUCCESS; } $output->writeln(sprintf( @@ -182,7 +186,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int ), OutputInterface::VERBOSITY_VERBOSE); if ($removeAll) { - $versions = array_filter($versions, static function (VersionInfo $version) { + $versions = array_filter($versions, static function (VersionInfo $version): bool { return $version->status !== VersionInfo::STATUS_PUBLISHED; }); } @@ -225,7 +229,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $contentIdsCount )); - return 0; + return self::SUCCESS; } /** diff --git a/src/bundle/Core/Command/CopySubtreeCommand.php b/src/bundle/Core/Command/CopySubtreeCommand.php index c2033da4b8..a8270b1d55 100644 --- a/src/bundle/Core/Command/CopySubtreeCommand.php +++ b/src/bundle/Core/Command/CopySubtreeCommand.php @@ -28,6 +28,10 @@ */ class CopySubtreeCommand extends Command { + protected static $defaultName = 'ibexa:copy-subtree'; + + protected static $defaultDescription = 'Copies a subtree from one Location to another'; + /** @var \Ibexa\Contracts\Core\Repository\LocationService */ private $locationService; @@ -68,7 +72,6 @@ public function __construct( protected function configure() { $this - ->setName('ibexa:copy-subtree') ->addArgument( 'source-location-id', InputArgument::REQUIRED, @@ -85,8 +88,7 @@ protected function configure() InputOption::VALUE_OPTIONAL, 'Ibexa username (with Role containing at least content policies: create, read)', 'admin' - ) - ->setDescription('Copies a subtree from one Location to another'); + ); } /** @@ -150,7 +152,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int ); if (!$input->getOption('no-interaction') && !$questionHelper->ask($input, $output, $question)) { - return 0; + return self::SUCCESS; } $this->locationService->copySubtree( @@ -162,7 +164,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int 'Finished' ); - return 0; + return self::SUCCESS; } /** diff --git a/src/bundle/Core/Command/DebugConfigResolverCommand.php b/src/bundle/Core/Command/DebugConfigResolverCommand.php index 53fa71216f..a796f9b4c6 100644 --- a/src/bundle/Core/Command/DebugConfigResolverCommand.php +++ b/src/bundle/Core/Command/DebugConfigResolverCommand.php @@ -19,6 +19,8 @@ class DebugConfigResolverCommand extends Command { + protected static $defaultName = 'ibexa:debug:config-resolver'; + /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ private $configResolver; @@ -40,7 +42,6 @@ public function __construct( */ public function configure() { - $this->setName('ibexa:debug:config-resolver'); $this->setAliases(['ibexa:debug:config']); $this->setDescription('Debugs / Retrieves a parameter from the Config Resolver'); $this->addArgument( @@ -96,7 +97,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int if ($input->getOption('json')) { $output->write(json_encode($parameterData)); - return 0; + return self::SUCCESS; } $output->writeln('SiteAccess name: ' . $this->siteAccess->name); @@ -111,6 +112,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int ) ); - return 0; + return self::SUCCESS; } } diff --git a/src/bundle/Core/Command/DeleteContentTranslationCommand.php b/src/bundle/Core/Command/DeleteContentTranslationCommand.php index fc18aca841..9514113014 100644 --- a/src/bundle/Core/Command/DeleteContentTranslationCommand.php +++ b/src/bundle/Core/Command/DeleteContentTranslationCommand.php @@ -24,6 +24,10 @@ */ class DeleteContentTranslationCommand extends Command { + protected static $defaultName = 'ibexa:delete-content-translation'; + + protected static $defaultDescription = 'Deletes a translation from all versions of a Content item'; + /** @var \Ibexa\Contracts\Core\Repository\Repository */ private $repository; @@ -51,7 +55,6 @@ public function __construct(Repository $repository) protected function configure() { $this - ->setName('ibexa:delete-content-translation') ->addArgument('content-id', InputArgument::REQUIRED, 'Content Object Id') ->addArgument( 'language-code', @@ -64,8 +67,7 @@ protected function configure() InputOption::VALUE_OPTIONAL, 'Ibexa username (with Role containing at least content Policies: read, versionread, edit, remove, versionremove)', 'admin' - ) - ->setDescription('Deletes a translation from all versions of a Content item'); + ); } protected function initialize(InputInterface $input, OutputInterface $output) @@ -125,7 +127,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $this->repository->rollback(); $this->output->writeln('Reverting and aborting.'); - return 0; + return self::SUCCESS; } // Delete Translation @@ -142,7 +144,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int throw $e; } - return 0; + return self::SUCCESS; } /** @@ -167,7 +169,7 @@ private function promptUserForMainLanguageChange( // get main Translation candidates w/o Translation being removed $mainTranslationCandidates = array_filter( $lastVersionLanguageCodes, - static function ($versionLanguageCode) use ($languageCode) { + static function ($versionLanguageCode) use ($languageCode): bool { return $versionLanguageCode !== $languageCode; } ); diff --git a/src/bundle/Core/Command/ExpireUserPasswordsCommand.php b/src/bundle/Core/Command/ExpireUserPasswordsCommand.php index b6062f6165..ca29407ea1 100644 --- a/src/bundle/Core/Command/ExpireUserPasswordsCommand.php +++ b/src/bundle/Core/Command/ExpireUserPasswordsCommand.php @@ -29,6 +29,8 @@ final class ExpireUserPasswordsCommand extends Command { protected static $defaultName = 'ibexa:user:expire-password'; + protected static $defaultDescription = 'Expire passwords for selected users.'; + public const REQUIRE_NEW_PASSWORD_VALUE = true; public const DEFAULT_BATCH_SIZE = 50; @@ -71,7 +73,6 @@ protected function configure(): void { $beforeRunningHints = self::BEFORE_RUNNING_HINTS; $this - ->setDescription('Expire passwords for selected users.') ->addOption( 'user-id', 'u', @@ -147,7 +148,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int if ($totalCount === 0) { $output->writeln('There are no users matching given criteria'); - return Command::SUCCESS; + return self::SUCCESS; } $output->writeln(sprintf( @@ -212,7 +213,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int ); } - return Command::SUCCESS; + return self::SUCCESS; } /** diff --git a/src/bundle/Core/Command/NormalizeImagesPathsCommand.php b/src/bundle/Core/Command/NormalizeImagesPathsCommand.php index 85c2704379..e5eeceed8c 100644 --- a/src/bundle/Core/Command/NormalizeImagesPathsCommand.php +++ b/src/bundle/Core/Command/NormalizeImagesPathsCommand.php @@ -39,6 +39,8 @@ final class NormalizeImagesPathsCommand extends Command protected static $defaultName = 'ibexa:images:normalize-paths'; + protected static $defaultDescription = 'Normalizes stored paths for images.'; + /** @var \Ibexa\Core\FieldType\Image\ImageStorage\Gateway */ private $imageGateway; @@ -73,7 +75,6 @@ protected function configure() $beforeRunningHints = self::BEFORE_RUNNING_HINTS; $this - ->setDescription('Normalizes stored paths for images.') ->addOption( self::SKIP_HASHING_COMMAND_PARAMETER, null, @@ -112,11 +113,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int if ($imagePathsToNormalizeCount === 0) { $io->success('No paths to normalize.'); - return 0; + return self::SUCCESS; } if (!$io->confirm('Do you want to continue?')) { - return 0; + return self::SUCCESS; } $io->writeln('Normalizing image paths. Please wait...'); @@ -135,7 +136,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $io->progressFinish(); $io->success('Done!'); - return 0; + return self::SUCCESS; } /** @@ -232,7 +233,7 @@ private function getFinalNormalizedPath( $processedPaths = array_values( array_filter( $imagePathsToNormalize, - static function (array $data) use ($filePath) { + static function (array $data) use ($filePath): bool { return $data['oldPath'] === $filePath; } ) diff --git a/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php b/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php index 6591bfa265..4a59fde16b 100644 --- a/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php +++ b/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php @@ -21,7 +21,7 @@ use Symfony\Component\Console\Question\ConfirmationQuestion; /** - * The ezplatform:urls:regenerate-aliases Symfony command implementation. + * The ibexa:urls:regenerate-aliases Symfony command implementation. * Recreates system URL aliases for all existing Locations and cleanups corrupted URL alias nodes. */ class RegenerateUrlAliasesCommand extends Command @@ -36,6 +36,8 @@ class RegenerateUrlAliasesCommand extends Command - Manually clear HTTP cache after running this command. EOT; + protected static $defaultName = 'ibexa:urls:regenerate-aliases'; + /** @var \Ibexa\Contracts\Core\Repository\Repository */ private $repository; @@ -61,7 +63,6 @@ protected function configure() { $beforeRunningHints = self::BEFORE_RUNNING_HINTS; $this - ->setName('ibexa:urls:regenerate-aliases') ->setDescription( 'Regenerates Location URL aliases (autogenerated) and cleans up custom Location ' . 'and global URL aliases stored in the Legacy Storage Engine' @@ -116,7 +117,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $locationsCount = count($locationIds); } else { $locationsCount = $this->repository->sudo( - static function (Repository $repository) { + static function (Repository $repository): int { return $repository->getLocationService()->getAllLocationsCount(); } ); @@ -125,7 +126,7 @@ static function (Repository $repository) { if ($locationsCount === 0) { $output->writeln('No location was found. Exiting.'); - return 0; + return self::SUCCESS; } if (!$input->getOption('no-interaction')) { @@ -139,24 +140,24 @@ static function (Repository $repository) { false ); if (!$helper->ask($input, $output, $question)) { - return 0; + return self::SUCCESS; } } elseif (!$input->getOption('force')) { - return 1; + return self::FAILURE; } $this->regenerateSystemUrlAliases($output, $locationsCount, $locationIds, $iterationCount); $output->writeln('Cleaning up corrupted URL aliases...'); $corruptedAliasesCount = $this->repository->sudo( - static function (Repository $repository) { + static function (Repository $repository): int { return $repository->getURLAliasService()->deleteCorruptedUrlAliases(); } ); $output->writeln("Done. Deleted {$corruptedAliasesCount} entries."); $output->writeln('Make sure to clear HTTP cache.'); - return 0; + return self::SUCCESS; } /** diff --git a/src/bundle/Core/Command/ReindexCommand.php b/src/bundle/Core/Command/ReindexCommand.php index 68f8437310..6481e83fe9 100644 --- a/src/bundle/Core/Command/ReindexCommand.php +++ b/src/bundle/Core/Command/ReindexCommand.php @@ -29,6 +29,10 @@ class ReindexCommand extends Command { + protected static $defaultName = 'ibexa:reindex'; + + protected static $defaultDescription = 'Recreates or refreshes the search engine index'; + /** @var \Ibexa\Core\Search\Common\Indexer|\Ibexa\Core\Search\Common\IncrementalIndexer */ private $searchIndexer; @@ -109,8 +113,6 @@ public function initialize(InputInterface $input, OutputInterface $output) protected function configure() { $this - ->setName('ibexa:reindex') - ->setDescription('Recreates or refreshes the search engine index') ->addOption( 'iteration-count', 'c', @@ -220,7 +222,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int EOT); if (!$io->confirm('Continue?', true)) { - return 0; + return self::SUCCESS; } } @@ -230,7 +232,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int return $this->indexIncrementally($input, $output, $iterationCount, $commit); } - return 0; + return self::SUCCESS; } /** @@ -447,7 +449,7 @@ private function getPhpPath() /** * @return int */ - private function getNumberOfCPUCores() + private function getNumberOfCPUCores(): int { $cores = 1; if (is_file('/proc/cpuinfo')) { diff --git a/src/bundle/Core/Command/ResizeOriginalImagesCommand.php b/src/bundle/Core/Command/ResizeOriginalImagesCommand.php index c0ee18b9eb..649beac29c 100644 --- a/src/bundle/Core/Command/ResizeOriginalImagesCommand.php +++ b/src/bundle/Core/Command/ResizeOriginalImagesCommand.php @@ -41,6 +41,8 @@ class ResizeOriginalImagesCommand extends Command public const DEFAULT_ITERATION_COUNT = 25; public const DEFAULT_REPOSITORY_USER = 'admin'; + protected static $defaultName = 'ibexa:images:resize-original'; + /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ private $permissionResolver; @@ -104,7 +106,6 @@ protected function initialize(InputInterface $input, OutputInterface $output) protected function configure() { $this - ->setName('ibexa:images:resize-original') ->addArgument( 'imageFieldIdentifier', InputArgument::REQUIRED, @@ -156,7 +157,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int ) ); - return 0; + return self::SUCCESS; } try { @@ -169,7 +170,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int ) ); - return 0; + return self::SUCCESS; } $query = new Query(); @@ -194,13 +195,13 @@ protected function execute(InputInterface $input, OutputInterface $output): int ) ); - return 0; + return self::SUCCESS; } $helper = $this->getHelper('question'); $question = new ConfirmationQuestion('The changes you are going to perform cannot be undone. Remember to do a proper backup before. Would you like to continue? ', false); if (!$helper->ask($input, $output, $question)) { - return 0; + return self::SUCCESS; } $progressBar = new ProgressBar($output, $totalCount); @@ -227,7 +228,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int ) ); - return 0; + return self::SUCCESS; } /** diff --git a/src/bundle/Core/Command/SetSystemContentTypeGroupCommand.php b/src/bundle/Core/Command/SetSystemContentTypeGroupCommand.php index 4e5d901898..a97c3f6554 100644 --- a/src/bundle/Core/Command/SetSystemContentTypeGroupCommand.php +++ b/src/bundle/Core/Command/SetSystemContentTypeGroupCommand.php @@ -28,6 +28,8 @@ final class SetSystemContentTypeGroupCommand extends Command protected static $defaultName = 'ibexa:content-type-group:set-system'; + protected static $defaultDescription = 'Sets information if ContentTypeGroup is a system group'; + /** @var \Ibexa\Contracts\Core\Repository\ContentTypeService */ private $contentTypeService; @@ -66,7 +68,6 @@ protected function configure() 'Ibexa username (with Role containing at least content policies: remove, read, versionread)', self::DEFAULT_REPOSITORY_USER ) - ->setDescription('Sets information if ContentTypeGroup is a system group') ->setHelp( <<%command.name% sets `is_system` flag for ContentTypeGroup which determines if ContentTypeGroup is a system group. diff --git a/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php b/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php index babbe4e9cd..d317f520f0 100644 --- a/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php +++ b/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php @@ -26,6 +26,7 @@ class UpdateTimestampsToUTCCommand extends Command { public const MAX_TIMESTAMP_VALUE = 2147483647; + public const DEFAULT_ITERATION_COUNT = 100; public const MODES = [ 'date' => ['ezdate'], @@ -33,6 +34,10 @@ class UpdateTimestampsToUTCCommand extends Command 'all' => ['ezdate', 'ezdatetime'], ]; + protected static $defaultName = 'ibexa:timestamps:to-utc'; + + protected static $defaultDescription = 'Updates ezdate and ezdatetime timestamps to UTC'; + /** @var int */ protected $done = 0; @@ -66,8 +71,6 @@ public function __construct(Connection $connection) protected function configure() { $this - ->setName('ibexa:timestamps:to-utc') - ->setDescription('Updates ezdate and ezdatetime timestamps to UTC') ->addArgument( 'timezone', InputArgument::OPTIONAL, @@ -150,17 +153,17 @@ protected function execute(InputInterface $input, OutputInterface $output): int sprintf('The selected mode is not supported. Use one of the following modes: %s', implode(', ', array_keys(self::MODES))) ); - return 0; + return self::SUCCESS; } $from = $input->getOption('from'); $to = $input->getOption('to'); if ($from && !$this->validateDateTimeString($from, $output)) { - return 0; + return self::SUCCESS; } if ($to && !$this->validateDateTimeString($to, $output)) { - return 0; + return self::SUCCESS; } if ($from) { $this->from = $this->dateStringToTimestamp($from); @@ -192,7 +195,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int if ($count == 0) { $output->writeln('Nothing to process, exiting.'); - return 0; + return self::SUCCESS; } $helper = $this->getHelper('question'); @@ -204,7 +207,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int if (!$helper->ask($input, $output, $question)) { $output->writeln(''); - return 0; + return self::SUCCESS; } $progressBar = $this->getProgressBar($count, $output); @@ -253,7 +256,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int ]); } - return 0; + return self::SUCCESS; } /** @@ -327,7 +330,7 @@ protected function getTimestampBasedFields($offset, $limit) * * @return int */ - protected function countTimestampBasedFields() + protected function countTimestampBasedFields(): int { $query = $this->connection->createQueryBuilder(); $query @@ -365,7 +368,7 @@ protected function countTimestampBasedFields() * * @return int */ - protected function convertToUtcTimestamp($timestamp) + protected function convertToUtcTimestamp($timestamp): int { $dateTimeZone = new DateTimeZone($this->timezone); $dateTimeZoneUTC = new DateTimeZone('UTC'); @@ -383,10 +386,10 @@ protected function convertToUtcTimestamp($timestamp) * * @return bool */ - protected function validateDateTimeString($dateTimeString, OutputInterface $output) + protected function validateDateTimeString($dateTimeString, OutputInterface $output): bool { try { - new \DateTime($dateTimeString); + new DateTime($dateTimeString); } catch (\Exception $exception) { $output->writeln('The --from and --to options must be a valid Date string.'); @@ -496,9 +499,9 @@ private function getPhpPath() * * @return int */ - private function dateStringToTimestamp($dateString) + private function dateStringToTimestamp($dateString): int { - $date = new \DateTime($dateString); + $date = new DateTime($dateString); return $date->getTimestamp(); } diff --git a/src/bundle/Core/Converter/ContentParamConverter.php b/src/bundle/Core/Converter/ContentParamConverter.php index 1bdcf082a9..51082caab5 100644 --- a/src/bundle/Core/Converter/ContentParamConverter.php +++ b/src/bundle/Core/Converter/ContentParamConverter.php @@ -20,12 +20,12 @@ public function __construct(ContentService $contentService) $this->contentService = $contentService; } - protected function getSupportedClass() + protected function getSupportedClass(): string { return Content::class; } - protected function getPropertyName() + protected function getPropertyName(): string { return 'contentId'; } diff --git a/src/bundle/Core/Converter/LocationParamConverter.php b/src/bundle/Core/Converter/LocationParamConverter.php index 85db939580..d2e74e0889 100644 --- a/src/bundle/Core/Converter/LocationParamConverter.php +++ b/src/bundle/Core/Converter/LocationParamConverter.php @@ -27,12 +27,12 @@ public function __construct( $this->contentPreviewHelper = $contentPreviewHelper; } - protected function getSupportedClass() + protected function getSupportedClass(): string { return Location::class; } - protected function getPropertyName() + protected function getPropertyName(): string { return 'locationId'; } diff --git a/src/bundle/Core/DependencyInjection/Configuration.php b/src/bundle/Core/DependencyInjection/Configuration.php index a577754db4..57dc11ae77 100644 --- a/src/bundle/Core/DependencyInjection/Configuration.php +++ b/src/bundle/Core/DependencyInjection/Configuration.php @@ -50,7 +50,7 @@ public function setSiteAccessConfigurationFilters(array $filters) * * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder */ - public function getConfigTreeBuilder() + public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder('ibexa'); @@ -276,7 +276,7 @@ private function addImageMagickSection(ArrayNodeDefinition $rootNode) ->info('Absolute path of ImageMagick / GraphicsMagick "convert" binary.') ->beforeNormalization() ->ifTrue( - static function ($v) { + static function ($v): bool { $basename = basename($v); // If there is a space in the basename, just drop it and everything after it. if (($wsPos = strpos($basename, ' ')) !== false) { @@ -330,14 +330,14 @@ private function addHttpCacheSection(ArrayNodeDefinition $rootNode) ->defaultValue('local') ->beforeNormalization() ->ifTrue( - static function ($v) { + static function ($v): bool { $http = ['multiple_http' => true, 'single_http' => true]; return isset($http[$v]); } ) ->then( - static function () { + static function (): string { return 'http'; } ) diff --git a/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParser.php b/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParser.php index 9183bb8f41..29f5380c6f 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParser.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParser.php @@ -35,7 +35,7 @@ public function __construct() * * {@inheritdoc} */ - public function isDynamicSetting($setting) + public function isDynamicSetting($setting): bool { if (parent::isDynamicSetting($setting) === false) { return false; @@ -44,7 +44,7 @@ public function isDynamicSetting($setting) return (bool)preg_match('/^' . $this->dynamicSettingRegex . '$/', $setting); } - public function containsDynamicSettings($string) + public function containsDynamicSettings($string): bool { return count($this->matchDynamicSettings($string)) > 0; } diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/Image.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/Image.php index 769ac4b1db..e3b62a3fb2 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/Image.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/Image.php @@ -87,7 +87,7 @@ public function addSemanticConfig(NodeBuilder $nodeBuilder) ->useAttributeAsKey('options') ->beforeNormalization() ->ifTrue( - static function ($v) { + static function ($v): bool { // Check if passed array only contains a "params" key (BC with <=5.3). return is_array($v) && count($v) === 1 && isset($v['params']); } diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParser.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParser.php index 3c4a4403db..cc8a5d3cb2 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParser.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParser.php @@ -41,7 +41,7 @@ public function parseDynamicSetting($setting) * * @return string */ - private function removeBoundaryDelimiter($setting) + private function removeBoundaryDelimiter($setting): string { return substr($setting, 1, -1); } diff --git a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollector.php b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollector.php index e03723c8e9..c6c98e949d 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollector.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollector.php @@ -37,7 +37,7 @@ public function getSuggestions() /** * @return bool */ - public function hasSuggestions() + public function hasSuggestions(): bool { return !empty($this->suggestions); } diff --git a/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php b/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php index e03d76950c..c12b9024a7 100644 --- a/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php +++ b/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php @@ -28,6 +28,7 @@ use Ibexa\Core\MVC\Symfony\Routing\ChainRouter; use Ibexa\Core\QueryType\QueryType; use InvalidArgumentException; +use Symfony\Component\Config\Definition\ConfigurationInterface; use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; @@ -85,7 +86,7 @@ public function __construct(array $siteAccessConfigParsers = [], array $reposito $this->suggestionCollector = new SuggestionCollector(); } - public function getAlias() + public function getAlias(): string { return self::EXTENSION_NAME; } @@ -168,12 +169,9 @@ public function load(array $configs, ContainerBuilder $container) } /** - * @param array $config - * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container - * - * @return \Ibexa\Bundle\Core\DependencyInjection\Configuration + * @param array $config */ - public function getConfiguration(array $config, ContainerBuilder $container) + public function getConfiguration(array $config, ContainerBuilder $container): ConfigurationInterface { $configuration = new Configuration( $this->getMainConfigParser(), diff --git a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilder.php b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilder.php index d06af61da2..3cff590d2a 100644 --- a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilder.php +++ b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilder.php @@ -53,7 +53,7 @@ public function addResource(ResourceInterface $resource) * * @return bool */ - private function policyExists(array $policyMap, $module, $function) + private function policyExists(array $policyMap, $module, $function): bool { return array_key_exists($module, $policyMap) && array_key_exists($function, $policyMap[$module]); } diff --git a/src/bundle/Core/EventListener/BackgroundIndexingTerminateListener.php b/src/bundle/Core/EventListener/BackgroundIndexingTerminateListener.php index 3751246259..515d0cad0a 100644 --- a/src/bundle/Core/EventListener/BackgroundIndexingTerminateListener.php +++ b/src/bundle/Core/EventListener/BackgroundIndexingTerminateListener.php @@ -44,7 +44,7 @@ public function __construct(PersistenceHandler $persistenceHandler, SearchHandle $this->searchHandler = $searchHandler; } - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ KernelEvents::TERMINATE => 'reindex', diff --git a/src/bundle/Core/EventListener/CacheViewResponseListener.php b/src/bundle/Core/EventListener/CacheViewResponseListener.php index ba3584f668..07104ce4a7 100644 --- a/src/bundle/Core/EventListener/CacheViewResponseListener.php +++ b/src/bundle/Core/EventListener/CacheViewResponseListener.php @@ -28,7 +28,7 @@ public function __construct(ConfigResolverInterface $configResolver) $this->configResolver = $configResolver; } - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [KernelEvents::RESPONSE => 'configureCache']; } diff --git a/src/bundle/Core/EventListener/ConfigScopeListener.php b/src/bundle/Core/EventListener/ConfigScopeListener.php index 728c96fc3a..f9c9088a47 100644 --- a/src/bundle/Core/EventListener/ConfigScopeListener.php +++ b/src/bundle/Core/EventListener/ConfigScopeListener.php @@ -34,7 +34,7 @@ public function __construct( $this->viewManager = $viewManager; } - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ MVCEvents::CONFIG_SCOPE_CHANGE => ['onConfigScopeChange', 100], diff --git a/src/bundle/Core/EventListener/ConsoleCommandListener.php b/src/bundle/Core/EventListener/ConsoleCommandListener.php index 3bb7bd5db9..a1b4cfba7b 100644 --- a/src/bundle/Core/EventListener/ConsoleCommandListener.php +++ b/src/bundle/Core/EventListener/ConsoleCommandListener.php @@ -46,7 +46,7 @@ public function __construct( $this->debug = $debug; } - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ ConsoleEvents::COMMAND => [ diff --git a/src/bundle/Core/EventListener/ContentDownloadRouteReferenceListener.php b/src/bundle/Core/EventListener/ContentDownloadRouteReferenceListener.php index 749f94d93b..16e269c4f1 100644 --- a/src/bundle/Core/EventListener/ContentDownloadRouteReferenceListener.php +++ b/src/bundle/Core/EventListener/ContentDownloadRouteReferenceListener.php @@ -37,7 +37,7 @@ public function __construct(TranslationHelper $translationHelper) $this->translationHelper = $translationHelper; } - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ MVCEvents::ROUTE_REFERENCE_GENERATION => 'onRouteReferenceGeneration', diff --git a/src/bundle/Core/EventListener/ExceptionListener.php b/src/bundle/Core/EventListener/ExceptionListener.php index 9664b5b562..9691d314c7 100644 --- a/src/bundle/Core/EventListener/ExceptionListener.php +++ b/src/bundle/Core/EventListener/ExceptionListener.php @@ -34,7 +34,7 @@ public function __construct(TranslatorInterface $translator) $this->translator = $translator; } - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ KernelEvents::EXCEPTION => ['onKernelException', 10], diff --git a/src/bundle/Core/EventListener/IndexRequestListener.php b/src/bundle/Core/EventListener/IndexRequestListener.php index c76fca8211..3b76b42207 100644 --- a/src/bundle/Core/EventListener/IndexRequestListener.php +++ b/src/bundle/Core/EventListener/IndexRequestListener.php @@ -23,7 +23,7 @@ public function __construct(ConfigResolverInterface $configResolver) $this->configResolver = $configResolver; } - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ KernelEvents::REQUEST => [ @@ -43,7 +43,7 @@ public function onKernelRequestIndex(RequestEvent $event) $request = $event->getRequest(); $semanticPathinfo = $request->attributes->get('semanticPathinfo') ?: '/'; if ( - $event->getRequestType() === HttpKernelInterface::MASTER_REQUEST + $event->getRequestType() === HttpKernelInterface::MAIN_REQUEST && $semanticPathinfo === '/' ) { $indexPage = $this->configResolver->getParameter('index_page'); diff --git a/src/bundle/Core/EventListener/OriginalRequestListener.php b/src/bundle/Core/EventListener/OriginalRequestListener.php index 9581201495..1dc2f5b5fe 100644 --- a/src/bundle/Core/EventListener/OriginalRequestListener.php +++ b/src/bundle/Core/EventListener/OriginalRequestListener.php @@ -19,7 +19,7 @@ */ class OriginalRequestListener implements EventSubscriberInterface { - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ KernelEvents::REQUEST => ['onKernelRequest', 200], @@ -28,7 +28,7 @@ public static function getSubscribedEvents() public function onKernelRequest(RequestEvent $event) { - if ($event->getRequestType() !== HttpKernelInterface::MASTER_REQUEST) { + if ($event->getRequestType() !== HttpKernelInterface::MAIN_REQUEST) { return; } @@ -39,7 +39,7 @@ public function onKernelRequest(RequestEvent $event) $originalRequest = Request::create( $request->getSchemeAndHttpHost() . $request->headers->get('x-fos-original-url'), - 'GET', + Request::METHOD_GET, [], [], [], diff --git a/src/bundle/Core/EventListener/PreviewRequestListener.php b/src/bundle/Core/EventListener/PreviewRequestListener.php index 6698c1b171..2b752f1dd8 100644 --- a/src/bundle/Core/EventListener/PreviewRequestListener.php +++ b/src/bundle/Core/EventListener/PreviewRequestListener.php @@ -36,7 +36,7 @@ public static function getSubscribedEvents(): array */ public function onKernelRequest(RequestEvent $event): void { - if ($event->getRequestType() === HttpKernelInterface::MASTER_REQUEST) { + if ($event->getRequestType() === HttpKernelInterface::MAIN_REQUEST) { return; } diff --git a/src/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListener.php b/src/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListener.php index 530d545589..e16dc3c4b1 100644 --- a/src/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListener.php +++ b/src/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListener.php @@ -31,7 +31,7 @@ public static function getSubscribedEvents(): array public function onKernelRequest(RequestEvent $event) { - if ($event->getRequestType() !== HttpKernelInterface::MASTER_REQUEST) { + if ($event->getRequestType() !== HttpKernelInterface::MAIN_REQUEST) { return; } diff --git a/src/bundle/Core/EventListener/RequestEventListener.php b/src/bundle/Core/EventListener/RequestEventListener.php index 265c5a6211..2e9b1ca58a 100644 --- a/src/bundle/Core/EventListener/RequestEventListener.php +++ b/src/bundle/Core/EventListener/RequestEventListener.php @@ -14,6 +14,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Event\RequestEvent; use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\KernelEvents; @@ -41,7 +42,7 @@ public function __construct(ConfigResolverInterface $configResolver, RouterInter $this->logger = $logger; } - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ KernelEvents::REQUEST => [ @@ -56,7 +57,7 @@ public static function getSubscribedEvents() */ public function onKernelRequestForward(RequestEvent $event) { - if ($event->getRequestType() === HttpKernelInterface::MASTER_REQUEST) { + if ($event->getRequestType() === HttpKernelInterface::MAIN_REQUEST) { $request = $event->getRequest(); if ($request->attributes->get('needsForward') && $request->attributes->has('semanticPathinfo')) { $semanticPathinfo = $request->attributes->get('semanticPathinfo'); @@ -107,7 +108,7 @@ public function onKernelRequestForward(RequestEvent $event) */ public function onKernelRequestRedirect(RequestEvent $event) { - if ($event->getRequestType() == HttpKernelInterface::MASTER_REQUEST) { + if ($event->getRequestType() == HttpKernelInterface::MAIN_REQUEST) { $request = $event->getRequest(); if ($request->attributes->get('needsRedirect') && $request->attributes->has('semanticPathinfo')) { $siteaccess = $request->attributes->get('siteaccess'); @@ -128,7 +129,7 @@ public function onKernelRequestRedirect(RequestEvent $event) $event->setResponse( new RedirectResponse( $semanticPathinfo . ($queryString ? "?$queryString" : ''), - 301, + Response::HTTP_MOVED_PERMANENTLY, $headers ) ); diff --git a/src/bundle/Core/EventListener/RoutingListener.php b/src/bundle/Core/EventListener/RoutingListener.php index 87d391ca01..4bd5f241de 100644 --- a/src/bundle/Core/EventListener/RoutingListener.php +++ b/src/bundle/Core/EventListener/RoutingListener.php @@ -35,7 +35,7 @@ public function __construct(ConfigResolverInterface $configResolver, RouterInter $this->urlAliasGenerator = $urlAliasGenerator; } - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ MVCEvents::SITEACCESS => ['onSiteAccessMatch', 200], diff --git a/src/bundle/Core/EventListener/SessionInitByPostListener.php b/src/bundle/Core/EventListener/SessionInitByPostListener.php index 080437135a..ecd7df18ce 100644 --- a/src/bundle/Core/EventListener/SessionInitByPostListener.php +++ b/src/bundle/Core/EventListener/SessionInitByPostListener.php @@ -18,7 +18,7 @@ */ class SessionInitByPostListener implements EventSubscriberInterface { - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ MVCEvents::SITEACCESS => ['onSiteAccessMatch', 249], diff --git a/src/bundle/Core/EventListener/SessionSetDynamicNameListener.php b/src/bundle/Core/EventListener/SessionSetDynamicNameListener.php index 6bc0ebf5c1..156596c995 100644 --- a/src/bundle/Core/EventListener/SessionSetDynamicNameListener.php +++ b/src/bundle/Core/EventListener/SessionSetDynamicNameListener.php @@ -44,7 +44,7 @@ public function __construct( $this->sessionStorageFactory = $sessionStorageFactory; } - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ MVCEvents::SITEACCESS => ['onSiteAccessMatch', 250], diff --git a/src/bundle/Core/EventListener/ViewControllerListener.php b/src/bundle/Core/EventListener/ViewControllerListener.php index c3437c5459..35a7d5a2a9 100644 --- a/src/bundle/Core/EventListener/ViewControllerListener.php +++ b/src/bundle/Core/EventListener/ViewControllerListener.php @@ -45,7 +45,7 @@ public function __construct( $this->logger = $logger; } - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [KernelEvents::CONTROLLER => ['getController', 10]]; } diff --git a/src/bundle/Core/EventListener/ViewRendererListener.php b/src/bundle/Core/EventListener/ViewRendererListener.php index 53b95658aa..0693f9082b 100644 --- a/src/bundle/Core/EventListener/ViewRendererListener.php +++ b/src/bundle/Core/EventListener/ViewRendererListener.php @@ -24,7 +24,7 @@ public function __construct(ViewRenderer $viewRenderer) $this->viewRenderer = $viewRenderer; } - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [KernelEvents::VIEW => 'renderView']; } diff --git a/src/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriber.php b/src/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriber.php index 5ca68d08d2..de2e7ce860 100644 --- a/src/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriber.php +++ b/src/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriber.php @@ -17,7 +17,7 @@ */ class CrowdinRequestLocaleSubscriber implements EventSubscriberInterface { - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ KernelEvents::REQUEST => [ diff --git a/src/bundle/Core/Features/Context/BasicContentContext.php b/src/bundle/Core/Features/Context/BasicContentContext.php index 7ea60ead8d..1f8af9d624 100644 --- a/src/bundle/Core/Features/Context/BasicContentContext.php +++ b/src/bundle/Core/Features/Context/BasicContentContext.php @@ -179,7 +179,7 @@ public function createArticleDraft($path) return $this->createContentDraft(2, 'article', $fields); } - private function getTitleFromPath($path) + private function getTitleFromPath($path): string { $parts = explode('/', rtrim($path, '/')); @@ -189,7 +189,7 @@ private function getTitleFromPath($path) /** * @return string */ - private function getDummyXmlText() + private function getDummyXmlText(): string { return '
    This is a paragraph.
    '; } diff --git a/src/bundle/Core/Features/Context/ContentPreviewContext.php b/src/bundle/Core/Features/Context/ContentPreviewContext.php index 398adf72ca..3cca9f2984 100644 --- a/src/bundle/Core/Features/Context/ContentPreviewContext.php +++ b/src/bundle/Core/Features/Context/ContentPreviewContext.php @@ -50,7 +50,7 @@ public function iPreviewThisDraft() /** * @return string */ - private function mapToVersionViewUri(VersionInfo $version) + private function mapToVersionViewUri(VersionInfo $version): string { return sprintf( '/content/versionview/%s/%s/%s', diff --git a/src/bundle/Core/Features/Context/ContentTypeContext.php b/src/bundle/Core/Features/Context/ContentTypeContext.php index 7d0b3328ad..7d3dda7fef 100644 --- a/src/bundle/Core/Features/Context/ContentTypeContext.php +++ b/src/bundle/Core/Features/Context/ContentTypeContext.php @@ -224,7 +224,7 @@ protected function assignContentGroupTypeToContentType($contentType, $contentTyp * * @return bool */ - protected function checkContentTypeExistenceByIdentifier($identifier, $groupIdentifier = null) + protected function checkContentTypeExistenceByIdentifier($identifier, $groupIdentifier = null): bool { $contentType = $this->loadContentTypeByIdentifier($identifier, false); if ($contentType && $groupIdentifier) { diff --git a/src/bundle/Core/Features/Context/UserContext.php b/src/bundle/Core/Features/Context/UserContext.php index 8bb1659968..3d2bc860a6 100644 --- a/src/bundle/Core/Features/Context/UserContext.php +++ b/src/bundle/Core/Features/Context/UserContext.php @@ -260,7 +260,7 @@ public function ensureUserDoesntExist($username, $parentGroupName = null) * * @return bool true if it exists, false if user or group don't exist */ - public function checkUserExistenceByUsername($username, $parentGroupName = null) + public function checkUserExistenceByUsername($username, $parentGroupName = null): bool { if ($parentGroupName) { // find parent group name @@ -286,7 +286,7 @@ public function checkUserExistenceByUsername($username, $parentGroupName = null) * * @return bool true if it exists, false if not */ - public function checkUserExistenceByEmail($email, $parentGroupName = null) + public function checkUserExistenceByEmail($email, $parentGroupName = null): bool { $existingUsers = $this->userService->loadUsersByEmail($email); if (count($existingUsers) == 0) { diff --git a/src/bundle/Core/Imagine/AliasGenerator.php b/src/bundle/Core/Imagine/AliasGenerator.php index 5f8d3c2e0e..41f51896ec 100644 --- a/src/bundle/Core/Imagine/AliasGenerator.php +++ b/src/bundle/Core/Imagine/AliasGenerator.php @@ -161,7 +161,7 @@ private function applyFilter(BinaryInterface $image, $variationName) return $this->filterManager->applyFilter($image, $variationName); } - public function supportsValue(Value $value) + public function supportsValue(Value $value): bool { return $value instanceof ImageValue; } diff --git a/src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php b/src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php index 9421529e86..f786489239 100644 --- a/src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php +++ b/src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php @@ -101,7 +101,7 @@ public function setSiteAccess(SiteAccess $siteAccess = null) * * @return string */ - private function getCacheKey(Field $field, VersionInfo $versionInfo, $variationName) + private function getCacheKey(Field $field, VersionInfo $versionInfo, $variationName): string { return sprintf( $this->cacheIdentifierGenerator->generateKey(self::IMAGE_VARIATION_IDENTIFIER, [], true) . '-%s-%s-%s-%d-%d-%d-%s-%s', diff --git a/src/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGenerator.php b/src/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGenerator.php index 9f58757065..7d2bfcc99a 100644 --- a/src/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGenerator.php +++ b/src/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGenerator.php @@ -17,7 +17,7 @@ */ class AliasDirectoryVariationPathGenerator implements VariationPathGenerator { - public function getVariationPath($originalPath, $filter) + public function getVariationPath($originalPath, $filter): string { $info = pathinfo($originalPath); diff --git a/src/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGenerator.php b/src/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGenerator.php index 702f34dff0..739ca950d1 100644 --- a/src/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGenerator.php +++ b/src/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGenerator.php @@ -17,7 +17,7 @@ */ class OriginalDirectoryVariationPathGenerator implements VariationPathGenerator { - public function getVariationPath($originalPath, $filter) + public function getVariationPath($originalPath, $filter): string { $info = pathinfo($originalPath); diff --git a/src/bundle/Core/Routing/DefaultRouter.php b/src/bundle/Core/Routing/DefaultRouter.php index 3b081ebc4c..a10f2dea5b 100644 --- a/src/bundle/Core/Routing/DefaultRouter.php +++ b/src/bundle/Core/Routing/DefaultRouter.php @@ -139,7 +139,7 @@ public function generate($name, $parameters = [], $referenceType = self::ABSOLUT * * @return bool */ - protected function isSiteAccessAwareRoute($routeName) + protected function isSiteAccessAwareRoute($routeName): bool { foreach ($this->nonSiteAccessAwareRoutes as $ignoredPrefix) { if (strpos($routeName, $ignoredPrefix) === 0) { diff --git a/src/bundle/Core/URLChecker/Handler/HTTPHandler.php b/src/bundle/Core/URLChecker/Handler/HTTPHandler.php index f8b91b1fac..34e6ddd5f2 100644 --- a/src/bundle/Core/URLChecker/Handler/HTTPHandler.php +++ b/src/bundle/Core/URLChecker/Handler/HTTPHandler.php @@ -153,7 +153,7 @@ private function doValidate(URL $url, $handler) $this->setUrlStatus($url, $this->isSuccessful(curl_getinfo($handler, CURLINFO_HTTP_CODE))); } - private function isSuccessful($statusCode) + private function isSuccessful($statusCode): bool { return $statusCode >= 200 && $statusCode < 300; } diff --git a/src/bundle/Core/URLChecker/URLHandlerRegistry.php b/src/bundle/Core/URLChecker/URLHandlerRegistry.php index 4a256eab0a..b34b6e98aa 100644 --- a/src/bundle/Core/URLChecker/URLHandlerRegistry.php +++ b/src/bundle/Core/URLChecker/URLHandlerRegistry.php @@ -33,7 +33,7 @@ public function addHandler($scheme, URLHandlerInterface $handler) /** * {@inheritdoc} */ - public function supported($scheme) + public function supported($scheme): bool { return isset($this->handlers[$scheme]); } diff --git a/src/bundle/Debug/Collector/IbexaCoreCollector.php b/src/bundle/Debug/Collector/IbexaCoreCollector.php index 842a9fe500..5500125642 100644 --- a/src/bundle/Debug/Collector/IbexaCoreCollector.php +++ b/src/bundle/Debug/Collector/IbexaCoreCollector.php @@ -28,7 +28,7 @@ public function collect(Request $request, Response $response, \Throwable $except } } - public function getName() + public function getName(): string { return 'ezpublish.debug.toolbar'; } diff --git a/src/bundle/Debug/Collector/PersistenceCacheCollector.php b/src/bundle/Debug/Collector/PersistenceCacheCollector.php index f16599035d..3ae2a39c6e 100644 --- a/src/bundle/Debug/Collector/PersistenceCacheCollector.php +++ b/src/bundle/Debug/Collector/PersistenceCacheCollector.php @@ -35,7 +35,7 @@ public function collect(Request $request, Response $response, \Throwable $except ]; } - public function getName() + public function getName(): string { return 'ezpublish.debug.persistence'; } diff --git a/src/bundle/Debug/Collector/SiteAccessCollector.php b/src/bundle/Debug/Collector/SiteAccessCollector.php index 7b061065f3..9f10a20dc3 100644 --- a/src/bundle/Debug/Collector/SiteAccessCollector.php +++ b/src/bundle/Debug/Collector/SiteAccessCollector.php @@ -24,7 +24,7 @@ public function collect(Request $request, Response $response, \Throwable $except ]; } - public function getName() + public function getName(): string { return 'ezpublish.debug.siteaccess'; } diff --git a/src/bundle/IO/BinaryStreamResponse.php b/src/bundle/IO/BinaryStreamResponse.php index 9bc3011499..cf1fc82bbe 100644 --- a/src/bundle/IO/BinaryStreamResponse.php +++ b/src/bundle/IO/BinaryStreamResponse.php @@ -171,12 +171,12 @@ public function prepare(Request $request) if ($start <= $end) { if ($start < 0 || $end > $fileSize - 1) { - $this->setStatusCode(416); // HTTP_REQUESTED_RANGE_NOT_SATISFIABLE + $this->setStatusCode(Response::HTTP_REQUESTED_RANGE_NOT_SATISFIABLE); // HTTP_REQUESTED_RANGE_NOT_SATISFIABLE } elseif ($start !== 0 || $end !== $fileSize - 1) { $this->maxlen = $end < $fileSize ? $end - $start + 1 : -1; $this->offset = $start; - $this->setStatusCode(206); // HTTP_PARTIAL_CONTENT + $this->setStatusCode(Response::HTTP_PARTIAL_CONTENT); // HTTP_PARTIAL_CONTENT $this->headers->set('Content-Range', sprintf('bytes %s-%s/%s', $start, $end, $fileSize)); $this->headers->set('Content-Length', $end - $start + 1); } diff --git a/src/bundle/IO/Command/MigrateFilesCommand.php b/src/bundle/IO/Command/MigrateFilesCommand.php index be56dc3656..438520952a 100644 --- a/src/bundle/IO/Command/MigrateFilesCommand.php +++ b/src/bundle/IO/Command/MigrateFilesCommand.php @@ -18,6 +18,10 @@ final class MigrateFilesCommand extends Command { + protected static $defaultName = 'ibexa:io:migrate-files'; + + protected static $defaultDescription = 'Migrates files from one IO repository to another'; + /** @var mixed Configuration for metadata handlers */ private $configuredMetadataHandlers; @@ -61,8 +65,6 @@ public function __construct( protected function configure() { $this - ->setName('ibexa:io:migrate-files') - ->setDescription('Migrates files from one IO repository to another') ->addOption('from', null, InputOption::VALUE_REQUIRED, 'Migrate from ,') ->addOption('to', null, InputOption::VALUE_REQUIRED, 'Migrate to ,') ->addOption('list-io-handlers', null, InputOption::VALUE_NONE, 'List available IO handlers') @@ -96,14 +98,14 @@ protected function execute(InputInterface $input, OutputInterface $output): int if ($input->getOption('list-io-handlers')) { $this->outputConfiguredHandlers($output); - return 0; + return self::SUCCESS; } $bulkCount = (int)$input->getOption('bulk-count'); if ($bulkCount < 1) { $output->writeln('The value for --bulk-count must be a positive integer.'); - return 0; + return self::SUCCESS; } $output->writeln($this->getProcessedHelp()); @@ -122,7 +124,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int } if (!$this->validateHandlerOptions($fromHandlers, $toHandlers, $output)) { - return 0; + return self::SUCCESS; } $output->writeln([ @@ -157,7 +159,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int if ($totalCount === 0) { $output->writeln('Nothing to process.'); - return 0; + return self::SUCCESS; } if (!$input->getOption('no-interaction')) { @@ -170,7 +172,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int if (!$helper->ask($input, $output, $question)) { $output->writeln('Aborting.'); - return 0; + return self::SUCCESS; } } @@ -181,7 +183,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $output ); - return 0; + return self::SUCCESS; } /** @@ -212,7 +214,7 @@ protected function validateHandlerOptions( $fromHandlers, $toHandlers, OutputInterface $output - ) { + ): bool { foreach (['From' => $fromHandlers, 'To' => $toHandlers] as $direction => $handlers) { $lowerDirection = strtolower($direction); if (count($handlers) !== 2) { diff --git a/src/bundle/IO/DependencyInjection/Configuration.php b/src/bundle/IO/DependencyInjection/Configuration.php index 6b51c4429d..d3f4e09a85 100644 --- a/src/bundle/IO/DependencyInjection/Configuration.php +++ b/src/bundle/IO/DependencyInjection/Configuration.php @@ -30,7 +30,7 @@ public function setBinarydataHandlerFactories(ArrayObject $factories) $this->binarydataHandlerFactories = $factories; } - public function getConfigTreeBuilder() + public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder(IbexaIOExtension::EXTENSION_NAME); diff --git a/src/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/Flysystem.php b/src/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/Flysystem.php index 5d6d3bd740..617de5a2de 100644 --- a/src/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/Flysystem.php +++ b/src/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/Flysystem.php @@ -11,7 +11,7 @@ class Flysystem extends BaseFactory { - public function getParentServiceId() + public function getParentServiceId(): string { return 'ibexa.core.io.binarydata_handler.flysystem'; } diff --git a/src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php b/src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php index 34bf3812fe..a44a8f4243 100644 --- a/src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php +++ b/src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php @@ -60,7 +60,7 @@ public function configureHandler(ServiceDefinition $definition, array $config) * * @return string */ - private function createFilesystem(ContainerBuilder $container, $name, $adapter) + private function createFilesystem(ContainerBuilder $container, $name, $adapter): string { $adapterId = sprintf('oneup_flysystem.%s_adapter', $adapter); // has either definition or alias diff --git a/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/Flysystem.php b/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/Flysystem.php index f0c2f999cc..3f9cfe6318 100644 --- a/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/Flysystem.php +++ b/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/Flysystem.php @@ -11,7 +11,7 @@ class Flysystem extends BaseFactory { - public function getParentServiceId() + public function getParentServiceId(): string { return 'ibexa.core.io.metadata_handler.flysystem'; } diff --git a/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php b/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php index 02b5095963..5d37b68e20 100644 --- a/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php +++ b/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php @@ -14,7 +14,7 @@ class LegacyDFSCluster implements ConfigurationFactory { - public function getParentServiceId() + public function getParentServiceId(): string { return \Ibexa\Core\IO\IOMetadataHandler\LegacyDFSCluster::class; } diff --git a/src/bundle/IO/DependencyInjection/IbexaIOExtension.php b/src/bundle/IO/DependencyInjection/IbexaIOExtension.php index 54eded7d7a..27031f8230 100644 --- a/src/bundle/IO/DependencyInjection/IbexaIOExtension.php +++ b/src/bundle/IO/DependencyInjection/IbexaIOExtension.php @@ -8,6 +8,7 @@ namespace Ibexa\Bundle\IO\DependencyInjection; use ArrayObject; +use Symfony\Component\Config\Definition\ConfigurationInterface; use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; @@ -73,7 +74,7 @@ public function getBinarydataHandlerFactories() return $this->binarydataHandlerFactories; } - public function getAlias() + public function getAlias(): string { return self::EXTENSION_NAME; } @@ -119,7 +120,7 @@ private function processHandlers(ContainerBuilder $container, $config, $key) $container->setParameter("ibexa.io.{$key}", $handlers); } - public function getConfiguration(array $config, ContainerBuilder $container) + public function getConfiguration(array $config, ContainerBuilder $container): ?ConfigurationInterface { $configuration = new Configuration(); $configuration->setMetadataHandlerFactories($this->getMetadataHandlerFactories()); diff --git a/src/bundle/IO/EventListener/StreamFileListener.php b/src/bundle/IO/EventListener/StreamFileListener.php index 0e6391f8ca..0a8a740c86 100644 --- a/src/bundle/IO/EventListener/StreamFileListener.php +++ b/src/bundle/IO/EventListener/StreamFileListener.php @@ -34,7 +34,7 @@ public function __construct(IOServiceInterface $ioService, IOConfigProvider $ioC $this->ioConfigResolver = $ioConfigResolver; } - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ KernelEvents::REQUEST => ['onKernelRequest', 42], @@ -43,7 +43,7 @@ public static function getSubscribedEvents() public function onKernelRequest(RequestEvent $event) { - if ($event->getRequestType() !== HttpKernelInterface::MASTER_REQUEST) { + if ($event->getRequestType() !== HttpKernelInterface::MAIN_REQUEST) { return; } @@ -82,7 +82,7 @@ public function onKernelRequest(RequestEvent $event) * * @return bool */ - private function isIoUri($uri, $urlPrefix) + private function isIoUri($uri, $urlPrefix): bool { return strpos(ltrim($uri, '/'), $urlPrefix) === 0; } diff --git a/src/bundle/IO/IbexaIOBundle.php b/src/bundle/IO/IbexaIOBundle.php index d0fa03daef..cba5911556 100644 --- a/src/bundle/IO/IbexaIOBundle.php +++ b/src/bundle/IO/IbexaIOBundle.php @@ -11,6 +11,7 @@ use Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory; use Ibexa\Bundle\IO\DependencyInjection\IbexaIOExtension; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\HttpKernel\Bundle\Bundle; class IbexaIOBundle extends Bundle @@ -31,7 +32,7 @@ public function build(ContainerBuilder $container) parent::build($container); } - public function getContainerExtension() + public function getContainerExtension(): ?ExtensionInterface { if (!isset($this->extension)) { $this->extension = new IbexaIOExtension(); diff --git a/src/bundle/IO/Migration/FileLister/BinaryFileLister.php b/src/bundle/IO/Migration/FileLister/BinaryFileLister.php index 5167339c1d..c040beef7d 100644 --- a/src/bundle/IO/Migration/FileLister/BinaryFileLister.php +++ b/src/bundle/IO/Migration/FileLister/BinaryFileLister.php @@ -45,7 +45,7 @@ public function __construct( parent::__construct($metadataHandlerRegistry, $binarydataHandlerRegistry, $logger); } - public function countFiles() + public function countFiles(): int { return count($this->fileList); } diff --git a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageBinaryFileRowReader.php b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageBinaryFileRowReader.php index 1ab91ed65e..2fa5934259 100644 --- a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageBinaryFileRowReader.php +++ b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageBinaryFileRowReader.php @@ -14,7 +14,7 @@ final class LegacyStorageBinaryFileRowReader extends LegacyStorageFileRowReader * * @return string */ - protected function getStorageTable() + protected function getStorageTable(): string { return 'ezbinaryfile'; } diff --git a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php index f8100f4493..c68d4bf697 100644 --- a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php +++ b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php @@ -59,7 +59,7 @@ final public function getCount() * * @return string */ - private function prependMimeToPath($path, $mimeType) + private function prependMimeToPath($path, $mimeType): string { return substr($mimeType, 0, strpos($mimeType, '/')) . '/' . $path; } diff --git a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageMediaFileRowReader.php b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageMediaFileRowReader.php index ad61ffc1fe..fec7b176cc 100644 --- a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageMediaFileRowReader.php +++ b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageMediaFileRowReader.php @@ -14,7 +14,7 @@ final class LegacyStorageMediaFileRowReader extends LegacyStorageFileRowReader * * @return string */ - protected function getStorageTable() + protected function getStorageTable(): string { return 'ezmedia'; } diff --git a/src/bundle/IO/Migration/FileLister/ImageFileLister.php b/src/bundle/IO/Migration/FileLister/ImageFileLister.php index faa463ac54..da3e9c02e8 100644 --- a/src/bundle/IO/Migration/FileLister/ImageFileLister.php +++ b/src/bundle/IO/Migration/FileLister/ImageFileLister.php @@ -59,7 +59,7 @@ public function __construct( parent::__construct($metadataHandlerRegistry, $binarydataHandlerRegistry, $logger); } - public function countFiles() + public function countFiles(): int { return count($this->imageFileList); } diff --git a/src/bundle/IO/Migration/FileListerRegistry/ConfigurableRegistry.php b/src/bundle/IO/Migration/FileListerRegistry/ConfigurableRegistry.php index c4b008e31c..f1518b998a 100644 --- a/src/bundle/IO/Migration/FileListerRegistry/ConfigurableRegistry.php +++ b/src/bundle/IO/Migration/FileListerRegistry/ConfigurableRegistry.php @@ -49,7 +49,7 @@ public function getItem($identifier) * * @return string[] Array of identifier strings. */ - public function getIdentifiers() + public function getIdentifiers(): array { return array_keys($this->registry); } diff --git a/src/bundle/IO/Migration/FileMigrator/FileMigrator.php b/src/bundle/IO/Migration/FileMigrator/FileMigrator.php index 09ebabe0cc..4440f6cf1d 100644 --- a/src/bundle/IO/Migration/FileMigrator/FileMigrator.php +++ b/src/bundle/IO/Migration/FileMigrator/FileMigrator.php @@ -15,7 +15,7 @@ final class FileMigrator extends MigrationHandler implements FileMigratorInterface { - public function migrateFile(BinaryFile $binaryFile) + public function migrateFile(BinaryFile $binaryFile): bool { if (!$this->migrateBinaryFile($binaryFile) || !$this->migrateMetadata($binaryFile)) { return false; diff --git a/src/bundle/LegacySearchEngine/DependencyInjection/IbexaLegacySearchEngineExtension.php b/src/bundle/LegacySearchEngine/DependencyInjection/IbexaLegacySearchEngineExtension.php index fdbaa0dce1..8369d672ab 100644 --- a/src/bundle/LegacySearchEngine/DependencyInjection/IbexaLegacySearchEngineExtension.php +++ b/src/bundle/LegacySearchEngine/DependencyInjection/IbexaLegacySearchEngineExtension.php @@ -14,7 +14,7 @@ class IbexaLegacySearchEngineExtension extends Extension { - public function getAlias() + public function getAlias(): string { return 'ibexa_legacy_search_engine'; } diff --git a/src/bundle/LegacySearchEngine/IbexaLegacySearchEngineBundle.php b/src/bundle/LegacySearchEngine/IbexaLegacySearchEngineBundle.php index e9ce3e7ab3..dd452de200 100644 --- a/src/bundle/LegacySearchEngine/IbexaLegacySearchEngineBundle.php +++ b/src/bundle/LegacySearchEngine/IbexaLegacySearchEngineBundle.php @@ -12,6 +12,7 @@ use Ibexa\Core\Base\Container\Compiler\Search\Legacy\CriterionFieldValueHandlerRegistryPass; use Ibexa\Core\Base\Container\Compiler\Search\Legacy\SortClauseConverterPass; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\HttpKernel\Bundle\Bundle; class IbexaLegacySearchEngineBundle extends Bundle @@ -26,7 +27,7 @@ public function build(ContainerBuilder $container) $container->addCompilerPass(new FieldRegistryPass()); } - public function getContainerExtension() + public function getContainerExtension(): ?ExtensionInterface { if (!isset($this->extension)) { $this->extension = new DependencyInjection\IbexaLegacySearchEngineExtension(); diff --git a/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php b/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php index a754a96419..2d6d606176 100644 --- a/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php +++ b/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php @@ -22,6 +22,13 @@ final class InstallPlatformCommand extends Command { + public const int EXIT_GENERAL_DATABASE_ERROR = 4; + public const int EXIT_PARAMETERS_NOT_FOUND = 5; + public const int EXIT_UNKNOWN_INSTALL_TYPE = 6; + public const int EXIT_MISSING_PERMISSIONS = 7; + + protected static $defaultName = 'ibexa:install'; + /** @var \Doctrine\DBAL\Connection */ private $connection; @@ -39,11 +46,6 @@ final class InstallPlatformCommand extends Command private RepositoryConfigurationProviderInterface $repositoryConfigurationProvider; - public const EXIT_GENERAL_DATABASE_ERROR = 4; - public const EXIT_PARAMETERS_NOT_FOUND = 5; - public const EXIT_UNKNOWN_INSTALL_TYPE = 6; - public const EXIT_MISSING_PERMISSIONS = 7; - public function __construct( Connection $connection, array $installers, @@ -61,8 +63,6 @@ public function __construct( protected function configure() { - $this->setName('ibexa:install'); - $this->addArgument( 'type', InputArgument::OPTIONAL, @@ -88,7 +88,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int if (!empty($schemaManager->listTables())) { $io = new SymfonyStyle($input, $output); if (!$io->confirm('Running this command will delete data in all Ibexa generated tables. Continue?')) { - return 0; + return self::SUCCESS; } } @@ -114,7 +114,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $this->indexData($output, $siteaccess); } - return 0; + return self::SUCCESS; } private function checkPermissions() diff --git a/src/bundle/RepositoryInstaller/Command/ValidatePasswordHashesCommand.php b/src/bundle/RepositoryInstaller/Command/ValidatePasswordHashesCommand.php index d077dbe4fc..f73a9d7443 100644 --- a/src/bundle/RepositoryInstaller/Command/ValidatePasswordHashesCommand.php +++ b/src/bundle/RepositoryInstaller/Command/ValidatePasswordHashesCommand.php @@ -15,6 +15,8 @@ final class ValidatePasswordHashesCommand extends Command { + protected static $defaultName = 'ibexa:user:validate-password-hashes'; + /** @var \Ibexa\Core\FieldType\User\UserStorage */ private $userStorage; @@ -31,11 +33,6 @@ public function __construct( parent::__construct(); } - protected function configure() - { - $this->setName('ibexa:user:validate-password-hashes'); - } - protected function execute(InputInterface $input, OutputInterface $output): int { $unsupportedHashesCounter = $this->userStorage->countUsersWithUnsupportedHashType( @@ -49,6 +46,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int $output->writeln('OK - All users have supported password hash types'); } - return Command::SUCCESS; + return self::SUCCESS; } } diff --git a/src/contracts/Persistence/Filter/Doctrine/FilteringQueryBuilder.php b/src/contracts/Persistence/Filter/Doctrine/FilteringQueryBuilder.php index c4a8551543..58ac699220 100644 --- a/src/contracts/Persistence/Filter/Doctrine/FilteringQueryBuilder.php +++ b/src/contracts/Persistence/Filter/Doctrine/FilteringQueryBuilder.php @@ -107,7 +107,7 @@ public function getExistingTableAliasJoinCondition(string $tableAlias): ?string $existingTableAliasJoins = array_values( array_filter( $joins, - static function (array $joinData) use ($tableAlias) { + static function (array $joinData) use ($tableAlias): bool { return $joinData['joinAlias'] === $tableAlias; } ) diff --git a/src/contracts/Repository/Values/Content/Query/Criterion.php b/src/contracts/Repository/Values/Content/Query/Criterion.php index 1de7f59100..1f1215cf04 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion.php @@ -154,23 +154,23 @@ abstract public function getSpecifications(): array; */ private function getValueTypeCheckCallback(int $valueTypes): callable { - $callback = static function ($value) { + $callback = static function ($value): bool { return false; }; // the callback code will return true as soon as an accepted value type is found if ($valueTypes & Specifications::TYPE_INTEGER) { - $callback = static function ($value) use ($callback) { + $callback = static function ($value) use ($callback): bool { return is_numeric($value) || $callback($value); }; } if ($valueTypes & Specifications::TYPE_STRING) { - $callback = static function ($value) use ($callback) { + $callback = static function ($value) use ($callback): bool { return is_string($value) || $callback($value); }; } if ($valueTypes & Specifications::TYPE_BOOLEAN) { - $callback = static function ($value) use ($callback) { + $callback = static function ($value) use ($callback): bool { return is_bool($value) || $callback($value); }; } diff --git a/src/contracts/Test/Persistence/Fixture/FixtureImporter.php b/src/contracts/Test/Persistence/Fixture/FixtureImporter.php index a59e65a1fe..dbe36f34e2 100644 --- a/src/contracts/Test/Persistence/Fixture/FixtureImporter.php +++ b/src/contracts/Test/Persistence/Fixture/FixtureImporter.php @@ -45,7 +45,7 @@ public function import(Fixture $fixture): void $nonEmptyTablesData = array_filter( $data, - static function ($tableData) { + static function ($tableData): bool { return !empty($tableData); } ); diff --git a/src/lib/Base/Exceptions/UserPasswordValidationException.php b/src/lib/Base/Exceptions/UserPasswordValidationException.php index a3ab00e35b..71061e252a 100644 --- a/src/lib/Base/Exceptions/UserPasswordValidationException.php +++ b/src/lib/Base/Exceptions/UserPasswordValidationException.php @@ -22,7 +22,7 @@ class UserPasswordValidationException extends InvalidArgumentException */ public function __construct(string $argumentName, array $errors, Exception $previous = null) { - $rules = array_map(static function (ValidationError $error) { + $rules = array_map(static function (ValidationError $error): string { return (string) $error->getTranslatableMessage(); }, $errors); diff --git a/src/lib/Base/TranslatableBase.php b/src/lib/Base/TranslatableBase.php index 421429060b..d77971497b 100644 --- a/src/lib/Base/TranslatableBase.php +++ b/src/lib/Base/TranslatableBase.php @@ -46,7 +46,7 @@ public function getParameters() return $this->parameters; } - public function getBaseTranslation() + public function getBaseTranslation(): string { return strtr($this->messageTemplate, $this->parameters); } diff --git a/src/lib/FieldType/Author/SearchField.php b/src/lib/FieldType/Author/SearchField.php index a9e28c4381..ea1615bd8a 100644 --- a/src/lib/FieldType/Author/SearchField.php +++ b/src/lib/FieldType/Author/SearchField.php @@ -96,7 +96,7 @@ public function getIndexDefinition() * * @return string */ - public function getDefaultMatchField() + public function getDefaultMatchField(): string { return 'name'; } @@ -110,7 +110,7 @@ public function getDefaultMatchField() * * @return string */ - public function getDefaultSortField() + public function getDefaultSortField(): string { return 'sort_value'; } diff --git a/src/lib/FieldType/Author/Type.php b/src/lib/FieldType/Author/Type.php index 87d3412456..5fa7348ecf 100644 --- a/src/lib/FieldType/Author/Type.php +++ b/src/lib/FieldType/Author/Type.php @@ -21,6 +21,8 @@ * * Field type representing a list of authors, consisting of author name, and * author email. + * + * @phpstan-type TAuthorHash list */ class Type extends FieldType implements TranslationContainerInterface { @@ -48,7 +50,7 @@ class Type extends FieldType implements TranslationContainerInterface * * @return string */ - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'ezauthor'; } @@ -123,9 +125,9 @@ protected function getSortInfo(BaseValue $value) } /** - * Converts an $hash to the Value defined by the field type. + * Converts a $hash to the Value defined by the field type. * - * @param mixed $hash + * @phpstan-param TAuthorHash $hash * * @return \Ibexa\Core\FieldType\Author\Value $value */ @@ -146,9 +148,9 @@ static function ($author) { * * @param \Ibexa\Core\FieldType\Author\Value $value * - * @return mixed + * @phpstan-return TAuthorHash */ - public function toHash(SPIValue $value) + public function toHash(SPIValue $value): array { return array_map( static function ($author) { @@ -163,7 +165,7 @@ static function ($author) { * * @return bool */ - public function isSearchable() + public function isSearchable(): bool { return true; } diff --git a/src/lib/FieldType/BinaryBase/BinaryBaseStorage.php b/src/lib/FieldType/BinaryBase/BinaryBaseStorage.php index 7fa52f9c68..e60f6b35f8 100644 --- a/src/lib/FieldType/BinaryBase/BinaryBaseStorage.php +++ b/src/lib/FieldType/BinaryBase/BinaryBaseStorage.php @@ -205,7 +205,8 @@ public function hasFieldData() return true; } - public function getIndexData(VersionInfo $versionInfo, Field $field, array $context) + public function getIndexData(VersionInfo $versionInfo, Field $field, array $context): array { + return []; } } diff --git a/src/lib/FieldType/BinaryBase/PathGenerator/LegacyPathGenerator.php b/src/lib/FieldType/BinaryBase/PathGenerator/LegacyPathGenerator.php index e8e60f0c1f..46f6d1fcae 100644 --- a/src/lib/FieldType/BinaryBase/PathGenerator/LegacyPathGenerator.php +++ b/src/lib/FieldType/BinaryBase/PathGenerator/LegacyPathGenerator.php @@ -13,7 +13,7 @@ class LegacyPathGenerator extends PathGenerator { - public function getStoragePathForField(Field $field, VersionInfo $versionInfo) + public function getStoragePathForField(Field $field, VersionInfo $versionInfo): string { $extension = pathinfo($field->value->externalData['fileName'], PATHINFO_EXTENSION); @@ -29,7 +29,7 @@ public function getStoragePathForField(Field $field, VersionInfo $versionInfo) * * @return string */ - protected function getFirstPartOfMimeType($mimeType) + protected function getFirstPartOfMimeType($mimeType): string { return substr($mimeType, 0, strpos($mimeType, '/')); } diff --git a/src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php index 82949b49d8..0ecf5af997 100644 --- a/src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php @@ -21,7 +21,7 @@ class DoctrineStorage extends BaseDoctrineStorage /** * {@inheritdoc} */ - protected function getStorageTable() + protected function getStorageTable(): string { return 'ezbinaryfile'; } diff --git a/src/lib/FieldType/BinaryFile/Type.php b/src/lib/FieldType/BinaryFile/Type.php index d2419fdb75..a5474a481e 100644 --- a/src/lib/FieldType/BinaryFile/Type.php +++ b/src/lib/FieldType/BinaryFile/Type.php @@ -26,7 +26,7 @@ class Type extends BinaryBaseType implements TranslationContainerInterface * * @return string */ - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'ezbinaryfile'; } diff --git a/src/lib/FieldType/Checkbox/SearchField.php b/src/lib/FieldType/Checkbox/SearchField.php index 70cf1f1156..842e87f6cb 100644 --- a/src/lib/FieldType/Checkbox/SearchField.php +++ b/src/lib/FieldType/Checkbox/SearchField.php @@ -44,7 +44,7 @@ public function getIndexDefinition() * * @return string */ - public function getDefaultMatchField() + public function getDefaultMatchField(): string { return 'value'; } diff --git a/src/lib/FieldType/Checkbox/Type.php b/src/lib/FieldType/Checkbox/Type.php index 797a289de5..5733bd9c8d 100644 --- a/src/lib/FieldType/Checkbox/Type.php +++ b/src/lib/FieldType/Checkbox/Type.php @@ -27,7 +27,7 @@ class Type extends FieldType implements TranslationContainerInterface * * @return string */ - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'ezboolean'; } @@ -105,7 +105,7 @@ protected function checkValueStructure(BaseValue $value) * * @return int */ - protected function getSortInfo(BaseValue $value) + protected function getSortInfo(BaseValue $value): int { return (int)$value->bool; } @@ -139,7 +139,7 @@ public function toHash(SPIValue $value) * * @return bool */ - public function isSearchable() + public function isSearchable(): bool { return true; } diff --git a/src/lib/FieldType/Country/SearchField.php b/src/lib/FieldType/Country/SearchField.php index 296a17c812..4ca6e75998 100644 --- a/src/lib/FieldType/Country/SearchField.php +++ b/src/lib/FieldType/Country/SearchField.php @@ -102,7 +102,7 @@ public function getIndexDefinition() * * @return string */ - public function getDefaultMatchField() + public function getDefaultMatchField(): string { return 'name'; } @@ -116,7 +116,7 @@ public function getDefaultMatchField() * * @return string */ - public function getDefaultSortField() + public function getDefaultSortField(): string { return 'sort_value'; } diff --git a/src/lib/FieldType/Country/Type.php b/src/lib/FieldType/Country/Type.php index 4300639f56..9f36c3c020 100644 --- a/src/lib/FieldType/Country/Type.php +++ b/src/lib/FieldType/Country/Type.php @@ -47,7 +47,7 @@ public function __construct(array $countriesInfo) * * @return string */ - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'ezcountry'; } @@ -156,7 +156,7 @@ public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue) /** * {@inheritdoc} */ - protected function getSortInfo(BaseValue $value) + protected function getSortInfo(BaseValue $value): string { $countries = []; foreach ($value->countries as $countryInfo) { @@ -220,7 +220,7 @@ public function toHash(SPIValue $value) * * @return bool */ - public function isSearchable() + public function isSearchable(): bool { return true; } diff --git a/src/lib/FieldType/Date/SearchField.php b/src/lib/FieldType/Date/SearchField.php index 1f211b2e32..11c28c61b3 100644 --- a/src/lib/FieldType/Date/SearchField.php +++ b/src/lib/FieldType/Date/SearchField.php @@ -53,7 +53,7 @@ public function getIndexDefinition() * * @return string */ - public function getDefaultMatchField() + public function getDefaultMatchField(): string { return 'value'; } diff --git a/src/lib/FieldType/Date/Type.php b/src/lib/FieldType/Date/Type.php index d3c94c8fcb..642ab8e245 100644 --- a/src/lib/FieldType/Date/Type.php +++ b/src/lib/FieldType/Date/Type.php @@ -42,7 +42,7 @@ class Type extends FieldType implements TranslationContainerInterface * * @return string */ - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'ezdate'; } @@ -186,7 +186,7 @@ public function toHash(SPIValue $value) * * @return bool */ - public function isSearchable() + public function isSearchable(): bool { return true; } diff --git a/src/lib/FieldType/DateAndTime/SearchField.php b/src/lib/FieldType/DateAndTime/SearchField.php index 0a1fb15220..60a4b14f8c 100644 --- a/src/lib/FieldType/DateAndTime/SearchField.php +++ b/src/lib/FieldType/DateAndTime/SearchField.php @@ -44,7 +44,7 @@ public function getIndexDefinition() * * @return string */ - public function getDefaultMatchField() + public function getDefaultMatchField(): string { return 'value'; } diff --git a/src/lib/FieldType/DateAndTime/Type.php b/src/lib/FieldType/DateAndTime/Type.php index cdcdfe9db6..cfdc9fb3c9 100644 --- a/src/lib/FieldType/DateAndTime/Type.php +++ b/src/lib/FieldType/DateAndTime/Type.php @@ -52,7 +52,7 @@ class Type extends FieldType implements TranslationContainerInterface * * @return string */ - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'ezdatetime'; } @@ -196,7 +196,7 @@ public function toHash(SPIValue $value) * * @return bool */ - public function isSearchable() + public function isSearchable(): bool { return true; } diff --git a/src/lib/FieldType/EmailAddress/SearchField.php b/src/lib/FieldType/EmailAddress/SearchField.php index fc9bf75f89..e61724e5ba 100644 --- a/src/lib/FieldType/EmailAddress/SearchField.php +++ b/src/lib/FieldType/EmailAddress/SearchField.php @@ -57,7 +57,7 @@ public function getIndexDefinition() * * @return string */ - public function getDefaultMatchField() + public function getDefaultMatchField(): string { return 'value'; } diff --git a/src/lib/FieldType/EmailAddress/Type.php b/src/lib/FieldType/EmailAddress/Type.php index df0a8e8a2d..ef0d55bda5 100644 --- a/src/lib/FieldType/EmailAddress/Type.php +++ b/src/lib/FieldType/EmailAddress/Type.php @@ -103,7 +103,7 @@ public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue) * * @return string */ - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'ezemail'; } @@ -204,7 +204,7 @@ public function toHash(SPIValue $value) * * @return bool */ - public function isSearchable() + public function isSearchable(): bool { return true; } diff --git a/src/lib/FieldType/Float/SearchField.php b/src/lib/FieldType/Float/SearchField.php index 102bfde92b..1aba06c7fe 100644 --- a/src/lib/FieldType/Float/SearchField.php +++ b/src/lib/FieldType/Float/SearchField.php @@ -49,7 +49,7 @@ public function getIndexDefinition() * * @return string */ - public function getDefaultMatchField() + public function getDefaultMatchField(): string { return 'value'; } diff --git a/src/lib/FieldType/Float/Type.php b/src/lib/FieldType/Float/Type.php index 06e4198698..b4335949da 100644 --- a/src/lib/FieldType/Float/Type.php +++ b/src/lib/FieldType/Float/Type.php @@ -45,7 +45,7 @@ protected function getValidators(): array * * @return string */ - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'ezfloat'; } @@ -70,7 +70,7 @@ public function getEmptyValue(): Value /** * @param \Ibexa\Core\FieldType\Float\Value $value */ - public function isEmptyValue(SPIValue $value) + public function isEmptyValue(SPIValue $value): bool { return $value->value === null; } diff --git a/src/lib/FieldType/ISBN/Type.php b/src/lib/FieldType/ISBN/Type.php index c8c86ca402..2b56fd0435 100644 --- a/src/lib/FieldType/ISBN/Type.php +++ b/src/lib/FieldType/ISBN/Type.php @@ -41,7 +41,7 @@ class Type extends FieldType implements TranslationContainerInterface * * @return string */ - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'ezisbn'; } @@ -74,7 +74,7 @@ public function getEmptyValue() * * @return bool */ - public function isEmptyValue(SPIValue $value) + public function isEmptyValue(SPIValue $value): bool { return $value->isbn === null || trim($value->isbn) === ''; } @@ -218,7 +218,7 @@ public function toHash(SPIValue $value) * * @return bool */ - public function isSearchable() + public function isSearchable(): bool { return true; } @@ -275,7 +275,7 @@ public function validateFieldSettings($fieldSettings) * * @return bool */ - private function validateISBNChecksum($isbnNr) + private function validateISBNChecksum($isbnNr): bool { $result = 0; $isbnNr = strtoupper($isbnNr); @@ -303,7 +303,7 @@ private function validateISBNChecksum($isbnNr) * * @return bool */ - private function validateISBN13Checksum($isbnNr, &$error) + private function validateISBN13Checksum($isbnNr, &$error): bool { if (!$isbnNr) { return false; diff --git a/src/lib/FieldType/Image/IO/Legacy.php b/src/lib/FieldType/Image/IO/Legacy.php index 956b41e67c..ba53f07518 100644 --- a/src/lib/FieldType/Image/IO/Legacy.php +++ b/src/lib/FieldType/Image/IO/Legacy.php @@ -246,7 +246,7 @@ public function newBinaryCreateStructFromUploadedFile(array $uploadedFile) * * @return bool true if $internalPath is the path to a published image */ - protected function isPublishedImagePath($internalPath) + protected function isPublishedImagePath($internalPath): bool { return strpos($internalPath, $this->publishedPrefix) === 0; } @@ -258,7 +258,7 @@ protected function isPublishedImagePath($internalPath) * * @return bool true if $internalPath is the path to a published image */ - protected function isDraftImagePath($internalPath) + protected function isDraftImagePath($internalPath): bool { return strpos($internalPath, $this->draftPrefix) === 0; } diff --git a/src/lib/FieldType/Image/ImageStorage.php b/src/lib/FieldType/Image/ImageStorage.php index 21e6282a22..9da6b9b5b2 100644 --- a/src/lib/FieldType/Image/ImageStorage.php +++ b/src/lib/FieldType/Image/ImageStorage.php @@ -67,7 +67,7 @@ public function __construct( * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ContentFieldValidationException */ - public function storeFieldData(VersionInfo $versionInfo, Field $field, array $context) + public function storeFieldData(VersionInfo $versionInfo, Field $field, array $context): bool { $contentMetaData = [ 'fieldId' => $field->id, @@ -187,21 +187,20 @@ public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds, array } } - public function hasFieldData() + public function hasFieldData(): bool { return true; } - public function getIndexData(VersionInfo $versionInfo, Field $field, array $context) + public function getIndexData(VersionInfo $versionInfo, Field $field, array $context): array { - // @todo: Correct? - return null; + return []; } /** * @return string */ - private function buildImageId(VersionInfo $versionInfo, Field $field) + private function buildImageId(VersionInfo $versionInfo, Field $field): string { return sprintf( '%s-%s-%s', diff --git a/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php index e3794b2e9d..1f9b4696a7 100644 --- a/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php @@ -231,7 +231,7 @@ public function removeImageReferences($uri, $versionNo, $fieldId): void * * @return int */ - public function countImageReferences($uri) + public function countImageReferences($uri): int { $path = $this->redecorator->redecorateFromSource($uri); diff --git a/src/lib/FieldType/Image/PathGenerator/LegacyPathGenerator.php b/src/lib/FieldType/Image/PathGenerator/LegacyPathGenerator.php index 4de319195d..999868c170 100644 --- a/src/lib/FieldType/Image/PathGenerator/LegacyPathGenerator.php +++ b/src/lib/FieldType/Image/PathGenerator/LegacyPathGenerator.php @@ -22,7 +22,7 @@ class LegacyPathGenerator extends PathGenerator * * @return string */ - public function getStoragePathForField($fieldId, $versionNo, $languageCode) + public function getStoragePathForField($fieldId, $versionNo, $languageCode): string { return sprintf( '%s/%s-%s-%s', @@ -40,7 +40,7 @@ public function getStoragePathForField($fieldId, $versionNo, $languageCode) * * @return string */ - private function getDirectoryStructure($id) + private function getDirectoryStructure($id): string { // our base string is the last 4 digits, defaulting to 0, reversed $idString = strrev( diff --git a/src/lib/FieldType/Image/SearchField.php b/src/lib/FieldType/Image/SearchField.php index 12b4b2e7a1..4c9a5e52b3 100644 --- a/src/lib/FieldType/Image/SearchField.php +++ b/src/lib/FieldType/Image/SearchField.php @@ -88,7 +88,7 @@ public function getIndexDefinition() * * @return string */ - public function getDefaultMatchField() + public function getDefaultMatchField(): string { return 'filename'; } diff --git a/src/lib/FieldType/Image/Type.php b/src/lib/FieldType/Image/Type.php index 4ea29a04ba..a7993a6d30 100644 --- a/src/lib/FieldType/Image/Type.php +++ b/src/lib/FieldType/Image/Type.php @@ -75,7 +75,7 @@ public function __construct( * * @return string */ - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'ezimage'; } @@ -335,7 +335,7 @@ public function validateValidatorConfiguration($validatorConfiguration) /** * {@inheritdoc} */ - protected function getSortInfo(BaseValue $value) + protected function getSortInfo(BaseValue $value): bool { return false; } diff --git a/src/lib/FieldType/Integer/SearchField.php b/src/lib/FieldType/Integer/SearchField.php index 667ffe00f2..750fe80722 100644 --- a/src/lib/FieldType/Integer/SearchField.php +++ b/src/lib/FieldType/Integer/SearchField.php @@ -49,7 +49,7 @@ public function getIndexDefinition() * * @return string */ - public function getDefaultMatchField() + public function getDefaultMatchField(): string { return 'value'; } diff --git a/src/lib/FieldType/Integer/Type.php b/src/lib/FieldType/Integer/Type.php index 735cf69db4..7d768d870c 100644 --- a/src/lib/FieldType/Integer/Type.php +++ b/src/lib/FieldType/Integer/Type.php @@ -45,7 +45,7 @@ protected function getValidators(): array * * @return string */ - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'ezinteger'; } @@ -72,7 +72,7 @@ public function getEmptyValue(): Value * * @param \Ibexa\Core\FieldType\Integer\Value $value */ - public function isEmptyValue(SPIValue $value) + public function isEmptyValue(SPIValue $value): bool { return $value->value === null; } @@ -154,7 +154,7 @@ public function toHash(SPIValue $value): ?int * * @return bool */ - public function isSearchable() + public function isSearchable(): bool { return true; } diff --git a/src/lib/FieldType/Keyword/KeywordStorage.php b/src/lib/FieldType/Keyword/KeywordStorage.php index 5c3ccc6d8f..c91fbd634c 100644 --- a/src/lib/FieldType/Keyword/KeywordStorage.php +++ b/src/lib/FieldType/Keyword/KeywordStorage.php @@ -52,7 +52,7 @@ public function getFieldData(VersionInfo $versionInfo, Field $field, array $cont * * @return bool */ - public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds, array $context) + public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds, array $context): bool { foreach ($fieldIds as $fieldId) { $this->gateway->deleteFieldData($fieldId, $versionInfo->versionNo); @@ -66,20 +66,13 @@ public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds, array * * @return bool */ - public function hasFieldData() + public function hasFieldData(): bool { return true; } - /** - * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo - * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field - * @param array $context - * - * @return \Ibexa\Contracts\Core\Search\Field[]|null - */ - public function getIndexData(VersionInfo $versionInfo, Field $field, array $context) + public function getIndexData(VersionInfo $versionInfo, Field $field, array $context): array { - return null; + return []; } } diff --git a/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php index d54595b00b..16d1d85861 100644 --- a/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php @@ -141,7 +141,7 @@ protected function getAssignedKeywords(int $fieldId, int $versionNo): array * * @return int */ - protected function loadContentTypeId($fieldDefinitionId) + protected function loadContentTypeId($fieldDefinitionId): int { $query = $this->connection->createQueryBuilder(); $query diff --git a/src/lib/FieldType/Keyword/SearchField.php b/src/lib/FieldType/Keyword/SearchField.php index b3cc8ef40b..26bc6d7983 100644 --- a/src/lib/FieldType/Keyword/SearchField.php +++ b/src/lib/FieldType/Keyword/SearchField.php @@ -46,12 +46,12 @@ public function getIndexDefinition() ]; } - public function getDefaultMatchField() + public function getDefaultMatchField(): string { return 'value'; } - public function getDefaultSortField() + public function getDefaultSortField(): string { return 'sort_value'; } diff --git a/src/lib/FieldType/Keyword/Type.php b/src/lib/FieldType/Keyword/Type.php index b2336144bc..da978a7794 100644 --- a/src/lib/FieldType/Keyword/Type.php +++ b/src/lib/FieldType/Keyword/Type.php @@ -28,7 +28,7 @@ class Type extends FieldType implements TranslationContainerInterface * * @return string */ - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'ezkeyword'; } @@ -93,7 +93,7 @@ protected function checkValueStructure(BaseValue $value) /** * {@inheritdoc} */ - protected function getSortInfo(BaseValue $value) + protected function getSortInfo(BaseValue $value): string { return implode(',', $value->values); } @@ -127,7 +127,7 @@ public function toHash(SPIValue $value) * * @return bool */ - public function isSearchable() + public function isSearchable(): bool { return true; } diff --git a/src/lib/FieldType/MapLocation/MapLocationStorage.php b/src/lib/FieldType/MapLocation/MapLocationStorage.php index 43423fa346..a233abbd58 100644 --- a/src/lib/FieldType/MapLocation/MapLocationStorage.php +++ b/src/lib/FieldType/MapLocation/MapLocationStorage.php @@ -55,20 +55,14 @@ public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds, array * * @return bool */ - public function hasFieldData() + public function hasFieldData(): bool { return true; } - /** - * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo - * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field - * @param array $context - * - * @return \Ibexa\Contracts\Core\Search\Field[]|null - */ - public function getIndexData(VersionInfo $versionInfo, Field $field, array $context) + public function getIndexData(VersionInfo $versionInfo, Field $field, array $context): array { - return is_array($field->value->externalData) ? $field->value->externalData['address'] : null; + // Handled by @see \Ibexa\Core\FieldType\MapLocation\SearchField::getIndexData() + return []; } } diff --git a/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php index db1dc0cc6b..667be196d7 100644 --- a/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php @@ -36,7 +36,7 @@ public function __construct(Connection $connection) * * @return bool If restoring of the internal field data is required */ - public function storeFieldData(VersionInfo $versionInfo, Field $field) + public function storeFieldData(VersionInfo $versionInfo, Field $field): bool { if ($field->value->externalData === null) { // Store empty value and return @@ -197,7 +197,7 @@ protected function loadFieldData($fieldId, $versionNo) * * @return bool */ - protected function hasFieldData($fieldId, $versionNo) + protected function hasFieldData($fieldId, $versionNo): bool { return $this->loadFieldData($fieldId, $versionNo) !== null; } diff --git a/src/lib/FieldType/MapLocation/SearchField.php b/src/lib/FieldType/MapLocation/SearchField.php index 169af3822d..0639d0acc6 100644 --- a/src/lib/FieldType/MapLocation/SearchField.php +++ b/src/lib/FieldType/MapLocation/SearchField.php @@ -58,7 +58,7 @@ public function getIndexDefinition() * * @return string */ - public function getDefaultMatchField() + public function getDefaultMatchField(): string { return 'value_address'; } diff --git a/src/lib/FieldType/MapLocation/Type.php b/src/lib/FieldType/MapLocation/Type.php index 4c204177e9..0307fa7288 100644 --- a/src/lib/FieldType/MapLocation/Type.php +++ b/src/lib/FieldType/MapLocation/Type.php @@ -28,7 +28,7 @@ class Type extends FieldType implements TranslationContainerInterface * * @return string */ - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'ezgmaplocation'; } @@ -59,7 +59,7 @@ public function getEmptyValue() * * @return bool */ - public function isEmptyValue(SPIValue $value) + public function isEmptyValue(SPIValue $value): bool { return $value->latitude === null && $value->longitude === null; } @@ -165,7 +165,7 @@ public function toHash(SPIValue $value) * * @return bool */ - public function isSearchable() + public function isSearchable(): bool { return true; } diff --git a/src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php index 09d236e1f9..dd084e4a2d 100644 --- a/src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php @@ -22,7 +22,7 @@ class DoctrineStorage extends BaseDoctrineStorage /** * {@inheritdoc} */ - protected function getStorageTable() + protected function getStorageTable(): string { return 'ezmedia'; } @@ -35,19 +35,19 @@ protected function getPropertyMapping() $propertyMap = parent::getPropertyMapping(); $propertyMap['has_controller'] = [ 'name' => 'hasController', - 'cast' => static function ($val) { + 'cast' => static function ($val): bool { return (bool)$val; }, ]; $propertyMap['is_autoplay'] = [ 'name' => 'autoplay', - 'cast' => static function ($val) { + 'cast' => static function ($val): bool { return (bool)$val; }, ]; $propertyMap['is_loop'] = [ 'name' => 'loop', - 'cast' => static function ($val) { + 'cast' => static function ($val): bool { return (bool)$val; }, ]; diff --git a/src/lib/FieldType/Media/Type.php b/src/lib/FieldType/Media/Type.php index b03050222d..99080c463e 100644 --- a/src/lib/FieldType/Media/Type.php +++ b/src/lib/FieldType/Media/Type.php @@ -60,7 +60,7 @@ class Type extends BaseType implements TranslationContainerInterface * * @return string */ - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'ezmedia'; } @@ -263,7 +263,7 @@ public function fromPersistenceValue(FieldValue $fieldValue) * * @return bool */ - public function isSearchable() + public function isSearchable(): bool { return false; } diff --git a/src/lib/FieldType/Null/Type.php b/src/lib/FieldType/Null/Type.php index d38e177193..6f103b17da 100644 --- a/src/lib/FieldType/Null/Type.php +++ b/src/lib/FieldType/Null/Type.php @@ -126,7 +126,7 @@ public function toHash(SPIValue $value) * * @return bool */ - public function isSearchable() + public function isSearchable(): bool { return true; } diff --git a/src/lib/FieldType/NullStorage.php b/src/lib/FieldType/NullStorage.php index 8ac0416415..cf5a574472 100644 --- a/src/lib/FieldType/NullStorage.php +++ b/src/lib/FieldType/NullStorage.php @@ -19,7 +19,7 @@ class NullStorage implements FieldStorage /** * @see \Ibexa\Contracts\Core\FieldType\FieldStorage::storeFieldData() */ - public function storeFieldData(VersionInfo $versionInfo, Field $field, array $context) + public function storeFieldData(VersionInfo $versionInfo, Field $field, array $context): bool { return false; } @@ -35,7 +35,7 @@ public function getFieldData(VersionInfo $versionInfo, Field $field, array $cont /** * @see \Ibexa\Contracts\Core\FieldType\FieldStorage::deleteFieldData() */ - public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds, array $context) + public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds, array $context): bool { return true; } @@ -45,17 +45,14 @@ public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds, array * * @return bool */ - public function hasFieldData() + public function hasFieldData(): bool { return false; } - /** - * @see \Ibexa\Contracts\Core\FieldType\FieldStorage::getIndexData() - */ - public function getIndexData(VersionInfo $versionInfo, Field $field, array $context) + public function getIndexData(VersionInfo $versionInfo, Field $field, array $context): array { - return false; + return []; } /** diff --git a/src/lib/FieldType/Relation/SearchField.php b/src/lib/FieldType/Relation/SearchField.php index a6375377ea..8ed651e69a 100644 --- a/src/lib/FieldType/Relation/SearchField.php +++ b/src/lib/FieldType/Relation/SearchField.php @@ -44,7 +44,7 @@ public function getIndexDefinition() * * @return string */ - public function getDefaultMatchField() + public function getDefaultMatchField(): string { return 'value'; } diff --git a/src/lib/FieldType/Relation/Type.php b/src/lib/FieldType/Relation/Type.php index dac17b2234..b322db581c 100644 --- a/src/lib/FieldType/Relation/Type.php +++ b/src/lib/FieldType/Relation/Type.php @@ -146,7 +146,7 @@ public function validateFieldSettings($fieldSettings) * * @return string */ - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'ezobjectrelation'; } @@ -215,7 +215,7 @@ public function getEmptyValue() * * @return bool */ - public function isEmptyValue(SPIValue $value) + public function isEmptyValue(SPIValue $value): bool { return $value->destinationContentId === null; } @@ -265,7 +265,7 @@ protected function checkValueStructure(BaseValue $value) * * @return string */ - protected function getSortInfo(BaseValue $value) + protected function getSortInfo(BaseValue $value): string { return (string)$value; } @@ -313,7 +313,7 @@ public function toHash(SPIValue $value) * * @return bool */ - public function isSearchable() + public function isSearchable(): bool { return true; } diff --git a/src/lib/FieldType/RelationList/SearchField.php b/src/lib/FieldType/RelationList/SearchField.php index fb0b3e1369..9cfb25a972 100644 --- a/src/lib/FieldType/RelationList/SearchField.php +++ b/src/lib/FieldType/RelationList/SearchField.php @@ -50,7 +50,7 @@ public function getIndexDefinition() * * @return string */ - public function getDefaultMatchField() + public function getDefaultMatchField(): string { return 'value'; } @@ -64,7 +64,7 @@ public function getDefaultMatchField() * * @return string */ - public function getDefaultSortField() + public function getDefaultSortField(): string { return 'sort_value'; } diff --git a/src/lib/FieldType/RelationList/Type.php b/src/lib/FieldType/RelationList/Type.php index 321e2af620..436f72b39a 100644 --- a/src/lib/FieldType/RelationList/Type.php +++ b/src/lib/FieldType/RelationList/Type.php @@ -296,7 +296,7 @@ public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue) * * @return string */ - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'ezobjectrelationlist'; } @@ -400,7 +400,7 @@ protected function checkValueStructure(BaseValue $value) * * @return string */ - protected function getSortInfo(BaseValue $value) + protected function getSortInfo(BaseValue $value): string { return implode(',', $value->destinationContentIds); } @@ -434,7 +434,7 @@ public function toHash(SPIValue $value) * * @return bool */ - public function isSearchable() + public function isSearchable(): bool { return true; } @@ -479,7 +479,7 @@ public function getRelations(SPIValue $value) * * @return bool */ - private function isValidSelectionMethod($selectionMethod) + private function isValidSelectionMethod($selectionMethod): bool { return in_array($selectionMethod, [ self::SELECTION_BROWSE, diff --git a/src/lib/FieldType/Selection/SearchField.php b/src/lib/FieldType/Selection/SearchField.php index f54743fdce..e39d0c3a13 100644 --- a/src/lib/FieldType/Selection/SearchField.php +++ b/src/lib/FieldType/Selection/SearchField.php @@ -81,7 +81,7 @@ public function getIndexDefinition() * * @return string */ - public function getDefaultMatchField() + public function getDefaultMatchField(): string { return 'selected_option_index'; } @@ -95,7 +95,7 @@ public function getDefaultMatchField() * * @return string */ - public function getDefaultSortField() + public function getDefaultSortField(): string { return 'sort_value'; } diff --git a/src/lib/FieldType/Selection/Type.php b/src/lib/FieldType/Selection/Type.php index 1c727547c4..844632dc92 100644 --- a/src/lib/FieldType/Selection/Type.php +++ b/src/lib/FieldType/Selection/Type.php @@ -121,7 +121,7 @@ public function validateFieldSettings($fieldSettings) * * @return string */ - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'ezselection'; } @@ -243,7 +243,7 @@ public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue) //@todo: find a way to include selection language if (isset($fieldSettings['multilingualOptions'])) { - $possibleOptionIndexesByLanguage = array_map(static function ($languageOptionIndexes) { + $possibleOptionIndexesByLanguage = array_map(static function ($languageOptionIndexes): array { return array_keys($languageOptionIndexes); }, $fieldSettings['multilingualOptions']); @@ -273,7 +273,7 @@ public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue) * * @return string */ - protected function getSortInfo(BaseValue $value) + protected function getSortInfo(BaseValue $value): string { return implode('-', $value->selection); } @@ -307,7 +307,7 @@ public function toHash(SPIValue $value) * * @return bool */ - public function isSearchable() + public function isSearchable(): bool { return true; } diff --git a/src/lib/FieldType/TextBlock/SearchField.php b/src/lib/FieldType/TextBlock/SearchField.php index 78b105f981..7ad3c94d16 100644 --- a/src/lib/FieldType/TextBlock/SearchField.php +++ b/src/lib/FieldType/TextBlock/SearchField.php @@ -40,7 +40,7 @@ public function getIndexData(Field $field, FieldDefinition $fieldDefinition) * * @return string */ - private function extractShortText($string) + private function extractShortText($string): string { return mb_substr(strtok(trim((string)$string), "\r\n"), 0, 255); } @@ -61,7 +61,7 @@ public function getIndexDefinition() * * @return string */ - public function getDefaultMatchField() + public function getDefaultMatchField(): string { return 'value'; } diff --git a/src/lib/FieldType/TextBlock/Type.php b/src/lib/FieldType/TextBlock/Type.php index 272826b527..57abce5128 100644 --- a/src/lib/FieldType/TextBlock/Type.php +++ b/src/lib/FieldType/TextBlock/Type.php @@ -29,7 +29,7 @@ class Type extends BaseTextType protected $validatorConfigurationSchema = []; - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'eztext'; } diff --git a/src/lib/FieldType/TextLine/Type.php b/src/lib/FieldType/TextLine/Type.php index cf78bd2c42..d87092f5d7 100644 --- a/src/lib/FieldType/TextLine/Type.php +++ b/src/lib/FieldType/TextLine/Type.php @@ -84,7 +84,7 @@ public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue) return false === $validator->validate($fieldValue, $fieldDefinition) ? $validator->getMessage() : []; } - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'ezstring'; } diff --git a/src/lib/FieldType/Time/SearchField.php b/src/lib/FieldType/Time/SearchField.php index be825875ef..b56b3275cb 100644 --- a/src/lib/FieldType/Time/SearchField.php +++ b/src/lib/FieldType/Time/SearchField.php @@ -44,7 +44,7 @@ public function getIndexDefinition() * * @return string */ - public function getDefaultMatchField() + public function getDefaultMatchField(): string { return 'value'; } diff --git a/src/lib/FieldType/Time/Type.php b/src/lib/FieldType/Time/Type.php index df3fe4ea21..f7f1bc62fc 100644 --- a/src/lib/FieldType/Time/Type.php +++ b/src/lib/FieldType/Time/Type.php @@ -46,7 +46,7 @@ class Type extends FieldType implements TranslationContainerInterface * * @return string */ - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'eztime'; } @@ -156,7 +156,7 @@ public function fromHash($hash) * * @return bool */ - public function isEmptyValue(SPIValue $value) + public function isEmptyValue(SPIValue $value): bool { if ($value->time === null) { return true; @@ -186,7 +186,7 @@ public function toHash(SPIValue $value) * * @return bool */ - public function isSearchable() + public function isSearchable(): bool { return true; } diff --git a/src/lib/FieldType/Url/SearchField.php b/src/lib/FieldType/Url/SearchField.php index 87b24203e7..efe0867f21 100644 --- a/src/lib/FieldType/Url/SearchField.php +++ b/src/lib/FieldType/Url/SearchField.php @@ -61,7 +61,7 @@ public function getIndexDefinition() * * @return string */ - public function getDefaultMatchField() + public function getDefaultMatchField(): string { return 'value_url'; } diff --git a/src/lib/FieldType/Url/Type.php b/src/lib/FieldType/Url/Type.php index c3a2cdf1af..c25416da71 100644 --- a/src/lib/FieldType/Url/Type.php +++ b/src/lib/FieldType/Url/Type.php @@ -28,7 +28,7 @@ class Type extends FieldType implements TranslationContainerInterface * * @return string */ - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return 'ezurl'; } @@ -97,7 +97,7 @@ protected function checkValueStructure(BaseValue $value) /** * {@inheritdoc} */ - protected function getSortInfo(BaseValue $value) + protected function getSortInfo(BaseValue $value): bool { return false; } diff --git a/src/lib/FieldType/Url/UrlStorage.php b/src/lib/FieldType/Url/UrlStorage.php index b135b5827b..b1ac1f0186 100644 --- a/src/lib/FieldType/Url/UrlStorage.php +++ b/src/lib/FieldType/Url/UrlStorage.php @@ -36,16 +36,7 @@ public function __construct(StorageGatewayInterface $gateway, LoggerInterface $l $this->logger = $logger; } - /** - * @see \Ibexa\Contracts\Core\FieldType\FieldStorage - * - * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo - * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field - * @param array $context - * - * @return bool|mixed - */ - public function storeFieldData(VersionInfo $versionInfo, Field $field, array $context) + public function storeFieldData(VersionInfo $versionInfo, Field $field, array $context): bool { $url = $field->value->externalData; @@ -55,11 +46,7 @@ public function storeFieldData(VersionInfo $versionInfo, Field $field, array $co $map = $this->gateway->getUrlIdMap([$url]); - if (isset($map[$url])) { - $urlId = $map[$url]; - } else { - $urlId = $this->gateway->insertUrl($url); - } + $urlId = $map[$url] ?? $this->gateway->insertUrl($url); $this->gateway->linkUrl($urlId, $field->id, $versionInfo->versionNo); @@ -116,19 +103,13 @@ public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds, array * * @return bool */ - public function hasFieldData() + public function hasFieldData(): bool { return true; } - /** - * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo - * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field - * @param array $context - * - * @return \Ibexa\Contracts\Core\Search\Field[] - */ - public function getIndexData(VersionInfo $versionInfo, Field $field, array $context) + public function getIndexData(VersionInfo $versionInfo, Field $field, array $context): array { + return []; } } diff --git a/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php index 2233118e40..c0ef8a3f18 100644 --- a/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php @@ -99,9 +99,9 @@ public function getUrlIdMap(array $urls) * * @param string $url The URL to insert in the database * - * @return string + * @throws \Doctrine\DBAL\Exception */ - public function insertUrl($url) + public function insertUrl($url): int { $time = time(); diff --git a/src/lib/FieldType/User/Type.php b/src/lib/FieldType/User/Type.php index a7bf7ec338..85a0b322fa 100644 --- a/src/lib/FieldType/User/Type.php +++ b/src/lib/FieldType/User/Type.php @@ -115,7 +115,7 @@ public function __construct( * * @return string */ - public function getFieldTypeIdentifier() + public function getFieldTypeIdentifier(): string { return self::FIELD_TYPE_IDENTIFIER; } @@ -133,7 +133,7 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin * * @return bool */ - public function isSingular() + public function isSingular(): bool { return true; } @@ -143,7 +143,7 @@ public function isSingular() * * @return bool */ - public function onlyEmptyInstance() + public function onlyEmptyInstance(): bool { return true; } @@ -190,7 +190,7 @@ protected function checkValueStructure(BaseValue $value) /** * {@inheritdoc} */ - protected function getSortInfo(BaseValue $value) + protected function getSortInfo(BaseValue $value): bool { return false; } diff --git a/src/lib/FieldType/User/UserStorage.php b/src/lib/FieldType/User/UserStorage.php index 353083a147..8443ccfe57 100644 --- a/src/lib/FieldType/User/UserStorage.php +++ b/src/lib/FieldType/User/UserStorage.php @@ -64,20 +64,14 @@ public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds, array * * @return bool */ - public function hasFieldData() + public function hasFieldData(): bool { return true; } - /** - * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo - * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field - * @param array $context - * - * @return \Ibexa\Contracts\Core\Search\Field[] - */ - public function getIndexData(VersionInfo $versionInfo, Field $field, array $context) + public function getIndexData(VersionInfo $versionInfo, Field $field, array $context): array { + return []; } /** diff --git a/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php index 94236cec61..c7155eb36b 100644 --- a/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php @@ -84,7 +84,7 @@ protected function getPropertyMap() return [ 'has_stored_login' => [ 'name' => 'hasStoredlogin', - 'cast' => static function ($input) { + 'cast' => static function ($input): bool { return $input == '1'; }, ], @@ -116,7 +116,7 @@ protected function getPropertyMap() ], 'is_enabled' => [ 'name' => 'enabled', - 'cast' => static function ($input) { + 'cast' => static function ($input): bool { return $input == '1'; }, ], @@ -155,7 +155,7 @@ protected function convertColumnsToProperties(array $databaseValues) * * @return int */ - protected function fetchUserId($fieldId) + protected function fetchUserId($fieldId): int { $query = $this->connection->createQueryBuilder(); $query diff --git a/src/lib/FieldType/Validator/EmailAddressValidator.php b/src/lib/FieldType/Validator/EmailAddressValidator.php index 254e2f8f54..0a1f853bf8 100644 --- a/src/lib/FieldType/Validator/EmailAddressValidator.php +++ b/src/lib/FieldType/Validator/EmailAddressValidator.php @@ -86,7 +86,7 @@ public function validateConstraints($constraints) * * @return bool */ - public function validate(BaseValue $value, ?FieldDefinition $fieldDefinition = null) + public function validate(BaseValue $value, ?FieldDefinition $fieldDefinition = null): bool { $pattern = '/^((\"[^\"\f\n\r\t\v\b]+\")|([A-Za-z0-9_\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+(\.[A-Za-z0-9_\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+)*))@((\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\-])+\.)+[A-Za-z\-]{2,}))$/'; diff --git a/src/lib/FieldType/Validator/FileExtensionBlackListValidator.php b/src/lib/FieldType/Validator/FileExtensionBlackListValidator.php index eb1c77766a..0bee0955ca 100644 --- a/src/lib/FieldType/Validator/FileExtensionBlackListValidator.php +++ b/src/lib/FieldType/Validator/FileExtensionBlackListValidator.php @@ -47,7 +47,7 @@ public function validateConstraints($constraints) /** * {@inheritdoc} */ - public function validate(BaseValue $value, ?FieldDefinition $fieldDefinition = null) + public function validate(BaseValue $value, ?FieldDefinition $fieldDefinition = null): bool { $this->errors = []; diff --git a/src/lib/FieldType/Validator/FileSizeValidator.php b/src/lib/FieldType/Validator/FileSizeValidator.php index cda86de542..3a1b744e54 100644 --- a/src/lib/FieldType/Validator/FileSizeValidator.php +++ b/src/lib/FieldType/Validator/FileSizeValidator.php @@ -68,7 +68,7 @@ public function validateConstraints($constraints) * * @return bool */ - public function validate(BaseValue $value, ?FieldDefinition $fieldDefinition = null) + public function validate(BaseValue $value, ?FieldDefinition $fieldDefinition = null): bool { $isValid = true; diff --git a/src/lib/FieldType/Validator/ImageValidator.php b/src/lib/FieldType/Validator/ImageValidator.php index c421084d0d..01f371a3ac 100644 --- a/src/lib/FieldType/Validator/ImageValidator.php +++ b/src/lib/FieldType/Validator/ImageValidator.php @@ -25,7 +25,7 @@ public function validateConstraints($constraints, ?FieldDefinition $fieldDefinit /** * {@inheritdoc} */ - public function validate(Value $value, ?FieldDefinition $fieldDefinition = null) + public function validate(Value $value, ?FieldDefinition $fieldDefinition = null): bool { $mimeTypes = []; if (null !== $fieldDefinition) { diff --git a/src/lib/FieldType/Validator/StringLengthValidator.php b/src/lib/FieldType/Validator/StringLengthValidator.php index 041d17cc61..85c136967e 100644 --- a/src/lib/FieldType/Validator/StringLengthValidator.php +++ b/src/lib/FieldType/Validator/StringLengthValidator.php @@ -92,7 +92,7 @@ public function validateConstraints($constraints) * * @return bool */ - protected function validateConstraintsOrder($constraints) + protected function validateConstraintsOrder($constraints): bool { return !isset($constraints['minStringLength'], $constraints['maxStringLength']) || ($constraints['minStringLength'] <= $constraints['maxStringLength']); @@ -107,7 +107,7 @@ protected function validateConstraintsOrder($constraints) * * @return bool */ - public function validate(BaseValue $value, ?FieldDefinition $fieldDefinition = null) + public function validate(BaseValue $value, ?FieldDefinition $fieldDefinition = null): bool { $isValid = true; diff --git a/src/lib/Helper/TranslationHelper.php b/src/lib/Helper/TranslationHelper.php index d882889c35..27c0e84da5 100644 --- a/src/lib/Helper/TranslationHelper.php +++ b/src/lib/Helper/TranslationHelper.php @@ -53,7 +53,7 @@ public function __construct(ConfigResolverInterface $configResolver, ContentServ * * @return string */ - public function getTranslatedContentName(Content $content, $forcedLanguage = null) + public function getTranslatedContentName(Content $content, $forcedLanguage = null): string { return $this->getTranslatedContentNameByVersionInfo( $content->getVersionInfo(), diff --git a/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php b/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php index a6e336b255..d78210a039 100644 --- a/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php +++ b/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php @@ -161,7 +161,7 @@ public function load($spiBinaryFileId) * * @return bool */ - public function exists($spiBinaryFileId) + public function exists($spiBinaryFileId): bool { $path = (string)$this->addPrefix($spiBinaryFileId); @@ -209,7 +209,7 @@ protected function getNameTrunk(SPIBinaryFileCreateStruct $binaryFileCreateStruc * * @return string */ - protected function getScope(SPIBinaryFileCreateStruct $binaryFileCreateStruct) + protected function getScope(SPIBinaryFileCreateStruct $binaryFileCreateStruct): string { [$filePrefix] = explode('/', $binaryFileCreateStruct->id); diff --git a/src/lib/IO/MimeTypeDetector/FileInfo.php b/src/lib/IO/MimeTypeDetector/FileInfo.php index 6dfd600c0d..8ca0b1cc04 100644 --- a/src/lib/IO/MimeTypeDetector/FileInfo.php +++ b/src/lib/IO/MimeTypeDetector/FileInfo.php @@ -30,12 +30,12 @@ public function __construct() } } - public function getFromPath($path) + public function getFromPath($path): string|false { return $this->getFileInfo()->file($path); } - public function getFromBuffer($path) + public function getFromBuffer($path): string|false { return $this->getFileInfo()->buffer($path); } diff --git a/src/lib/Limitation/BlockingLimitationType.php b/src/lib/Limitation/BlockingLimitationType.php index a43604e3d1..0769837be9 100644 --- a/src/lib/Limitation/BlockingLimitationType.php +++ b/src/lib/Limitation/BlockingLimitationType.php @@ -115,7 +115,7 @@ public function buildValue(array $limitationValues) * * @return bool */ - public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null) + public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null): bool { if (!$value instanceof APIBlockingLimitation) { throw new InvalidArgumentException('$value', 'Must be of type: BlockingLimitation'); diff --git a/src/lib/Limitation/LocationLimitationType.php b/src/lib/Limitation/LocationLimitationType.php index 269771cf6e..f90ec4d3e7 100644 --- a/src/lib/Limitation/LocationLimitationType.php +++ b/src/lib/Limitation/LocationLimitationType.php @@ -142,7 +142,7 @@ public function evaluate(APILimitationValue $value, APIUserReference $currentUse } } /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location[]|\Ibexa\Contracts\Core\Persistence\Content\Location[] $targets */ - $targets = array_filter($targets, static function ($target) { + $targets = array_filter($targets, static function ($target): bool { return $target instanceof Location || $target instanceof SPILocation; }); @@ -170,7 +170,7 @@ public function evaluate(APILimitationValue $value, APIUserReference $currentUse * * @return bool */ - protected function evaluateForContentCreateStruct(APILimitationValue $value, array $targets = null) + protected function evaluateForContentCreateStruct(APILimitationValue $value, array $targets = null): bool { // If targets is empty/null return false as user does not have access // to content w/o location with this limitation @@ -224,13 +224,7 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren return new Criterion\LocationId($value->limitationValues); } - /** - * Returns info on valid $limitationValues. - * - * @return mixed[]|int In case of array, a hash with key as valid limitations value and value as human readable name - * of that option, in case of int on of VALUE_SCHEMA_ constants. - */ - public function valueSchema() + public function valueSchema(): int { return self::VALUE_SCHEMA_LOCATION_ID; } diff --git a/src/lib/Limitation/NewObjectStateLimitationType.php b/src/lib/Limitation/NewObjectStateLimitationType.php index c8dd82359a..2db85f5b1b 100644 --- a/src/lib/Limitation/NewObjectStateLimitationType.php +++ b/src/lib/Limitation/NewObjectStateLimitationType.php @@ -110,7 +110,7 @@ public function buildValue(array $limitationValues) * * @return bool */ - public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null) + public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null): bool { if (!$value instanceof APINewObjectStateLimitation) { throw new InvalidArgumentException('$value', 'Must be of type: NewObjectStateLimitation'); diff --git a/src/lib/Limitation/NewSectionLimitationType.php b/src/lib/Limitation/NewSectionLimitationType.php index f5643bd3cd..faa03cd792 100644 --- a/src/lib/Limitation/NewSectionLimitationType.php +++ b/src/lib/Limitation/NewSectionLimitationType.php @@ -112,7 +112,7 @@ public function buildValue(array $limitationValues) * * @return bool */ - public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null) + public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null): bool { if (!$value instanceof APINewSectionLimitation) { throw new InvalidArgumentException('$value', 'Must be of type: APINewSectionLimitation'); diff --git a/src/lib/Limitation/ObjectStateLimitationType.php b/src/lib/Limitation/ObjectStateLimitationType.php index 321fdd49c6..4c4775ece7 100644 --- a/src/lib/Limitation/ObjectStateLimitationType.php +++ b/src/lib/Limitation/ObjectStateLimitationType.php @@ -167,7 +167,7 @@ public function evaluate( * * @return bool */ - private function isStateGroupUsedForLimitation($stateGroupId, array $limitationValues) + private function isStateGroupUsedForLimitation($stateGroupId, array $limitationValues): bool { $objectStateHandler = $this->persistence->objectStateHandler(); $states = $objectStateHandler->loadObjectStates($stateGroupId); diff --git a/src/lib/Limitation/OwnerLimitationType.php b/src/lib/Limitation/OwnerLimitationType.php index e06334e5b0..633623b813 100644 --- a/src/lib/Limitation/OwnerLimitationType.php +++ b/src/lib/Limitation/OwnerLimitationType.php @@ -112,7 +112,7 @@ public function buildValue(array $limitationValues) * * @todo Add support for $limitationValues[0] == 2 when session values can be injected somehow, or deprecate */ - public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null) + public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null): bool { if (!$value instanceof APIOwnerLimitation) { throw new InvalidArgumentException('$value', 'Must be of type: APIOwnerLimitation'); diff --git a/src/lib/Limitation/ParentContentTypeLimitationType.php b/src/lib/Limitation/ParentContentTypeLimitationType.php index 504132f1ee..edf10d02aa 100644 --- a/src/lib/Limitation/ParentContentTypeLimitationType.php +++ b/src/lib/Limitation/ParentContentTypeLimitationType.php @@ -183,7 +183,7 @@ public function evaluate(APILimitationValue $value, APIUserReference $currentUse * * @return bool */ - protected function evaluateForContentCreateStruct(APILimitationValue $value, array $targets = null) + protected function evaluateForContentCreateStruct(APILimitationValue $value, array $targets = null): bool { // If targets is empty/null return false as user does not have access // to content w/o location with this limitation diff --git a/src/lib/Limitation/ParentDepthLimitationType.php b/src/lib/Limitation/ParentDepthLimitationType.php index 0fc70d7873..a8be463053 100644 --- a/src/lib/Limitation/ParentDepthLimitationType.php +++ b/src/lib/Limitation/ParentDepthLimitationType.php @@ -163,7 +163,7 @@ public function evaluate(APILimitationValue $value, APIUserReference $currentUse * * @return bool */ - protected function evaluateForContentCreateStruct(APILimitationValue $value, array $targets = null) + protected function evaluateForContentCreateStruct(APILimitationValue $value, array $targets = null): bool { // If targets is empty/null return false as user does not have access // to content w/o location with this limitation diff --git a/src/lib/Limitation/ParentOwnerLimitationType.php b/src/lib/Limitation/ParentOwnerLimitationType.php index 335f0dee8f..f839264972 100644 --- a/src/lib/Limitation/ParentOwnerLimitationType.php +++ b/src/lib/Limitation/ParentOwnerLimitationType.php @@ -111,7 +111,7 @@ public function buildValue(array $limitationValues) * * @todo Add support for $limitationValues[0] == 2 when session values can be injected somehow */ - public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null) + public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null): bool { if (!$value instanceof APIParentOwnerLimitation) { throw new InvalidArgumentException('$value', 'Must be of type: APIParentOwnerLimitation'); diff --git a/src/lib/Limitation/ParentUserGroupLimitationType.php b/src/lib/Limitation/ParentUserGroupLimitationType.php index 6bf4f0d3be..216ed26e55 100644 --- a/src/lib/Limitation/ParentUserGroupLimitationType.php +++ b/src/lib/Limitation/ParentUserGroupLimitationType.php @@ -112,7 +112,7 @@ public function buildValue(array $limitationValues) * * @return bool */ - public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null) + public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null): bool { if (!$value instanceof APIParentUserGroupLimitation) { throw new InvalidArgumentException('$value', 'Must be of type: APIParentUserGroupLimitation'); diff --git a/src/lib/Limitation/SiteAccessLimitationType.php b/src/lib/Limitation/SiteAccessLimitationType.php index 674c7ab10a..fb35007e48 100644 --- a/src/lib/Limitation/SiteAccessLimitationType.php +++ b/src/lib/Limitation/SiteAccessLimitationType.php @@ -124,7 +124,7 @@ public function buildValue(array $limitationValues) * * @return bool */ - public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null) + public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null): bool { if (!$value instanceof APISiteAccessLimitation) { throw new InvalidArgumentException('$value', 'Must be of type: APISiteAccessLimitation'); diff --git a/src/lib/Limitation/StatusLimitationType.php b/src/lib/Limitation/StatusLimitationType.php index 23d1a59af4..5efd8e2b47 100644 --- a/src/lib/Limitation/StatusLimitationType.php +++ b/src/lib/Limitation/StatusLimitationType.php @@ -110,7 +110,7 @@ public function buildValue(array $limitationValues) * * @return bool */ - public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null) + public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null): bool { if (!$value instanceof APIStatusLimitation) { throw new InvalidArgumentException('$value', 'Must be of type: APIStatusLimitation'); diff --git a/src/lib/Limitation/SubtreeLimitationType.php b/src/lib/Limitation/SubtreeLimitationType.php index 355ac8943f..67ba1511fc 100644 --- a/src/lib/Limitation/SubtreeLimitationType.php +++ b/src/lib/Limitation/SubtreeLimitationType.php @@ -147,7 +147,7 @@ public function evaluate(APILimitationValue $value, APIUserReference $currentUse return self::ACCESS_ABSTAIN; } - $targets = array_filter($targets, static function ($target) { + $targets = array_filter($targets, static function ($target): bool { return !$target instanceof Version; }); @@ -194,7 +194,7 @@ public function evaluate(APILimitationValue $value, APIUserReference $currentUse * * @return bool */ - protected function evaluateForContentCreateStruct(APILimitationValue $value, array $targets) + protected function evaluateForContentCreateStruct(APILimitationValue $value, array $targets): bool { // If targets is empty/null return false as user does not have access // to content w/o location with this limitation @@ -258,13 +258,7 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren return new PermissionSubtree($value->limitationValues); } - /** - * Returns info on valid $limitationValues. - * - * @return mixed[]|int In case of array, a hash with key as valid limitations value and value as human readable name - * of that option, in case of int on of VALUE_SCHEMA_ constants. - */ - public function valueSchema() + public function valueSchema(): int { return self::VALUE_SCHEMA_LOCATION_PATH; } diff --git a/src/lib/Limitation/UserGroupLimitationType.php b/src/lib/Limitation/UserGroupLimitationType.php index 86340bd19b..b00829620a 100644 --- a/src/lib/Limitation/UserGroupLimitationType.php +++ b/src/lib/Limitation/UserGroupLimitationType.php @@ -114,7 +114,7 @@ public function buildValue(array $limitationValues) * * @return bool */ - public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null) + public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null): bool { if (!$value instanceof APIUserGroupLimitation) { throw new InvalidArgumentException('$value', 'Must be of type: APIUserGroupLimitation'); diff --git a/src/lib/MVC/Symfony/Component/Serializer/AbstractPropertyWhitelistNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/AbstractPropertyWhitelistNormalizer.php index 36154396ab..8f89e3128e 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/AbstractPropertyWhitelistNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/AbstractPropertyWhitelistNormalizer.php @@ -8,15 +8,25 @@ namespace Ibexa\Core\MVC\Symfony\Component\Serializer; +use Symfony\Component\Serializer\Exception\LogicException; use Symfony\Component\Serializer\Normalizer\PropertyNormalizer; abstract class AbstractPropertyWhitelistNormalizer extends PropertyNormalizer { - public function normalize($object, string $format = null, array $context = []) + /** + * @return array + * + * @throws \Symfony\Component\Serializer\Exception\ExceptionInterface + */ + public function normalize($object, string $format = null, array $context = []): array { - $data = parent::normalize($object, $format, $context); - foreach (array_keys($data) as $property) { - if (!in_array($property, $this->getAllowedProperties())) { + $data = parent::normalize($object, $format, $context) ?? []; + if (!is_array($data)) { + throw new LogicException(sprintf('Expected an array, got "%s"', gettype($data))); + } + + foreach (array_keys(iterator_to_array($data)) as $property) { + if (!in_array($property, $this->getAllowedProperties(), true)) { unset($data[$property]); } } diff --git a/src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php index 5774f29abb..19410c90ae 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php @@ -12,9 +12,11 @@ class CompoundMatcherNormalizer extends AbstractPropertyWhitelistNormalizer { /** - * @see \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Compound::__sleep. + * @throws \Symfony\Component\Serializer\Exception\ExceptionInterface + * + * @see \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Compound::__sleep */ - public function normalize($object, string $format = null, array $context = []) + public function normalize($object, string $format = null, array $context = []): array { $data = parent::normalize($object, $format, $context); $data['config'] = []; diff --git a/src/lib/MVC/Symfony/Component/Serializer/HostElementNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/HostElementNormalizer.php index 0bf22d9025..3ba19e438f 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/HostElementNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/HostElementNormalizer.php @@ -12,7 +12,7 @@ final class HostElementNormalizer extends AbstractPropertyWhitelistNormalizer { - public function supportsNormalization($data, string $format = null) + public function supportsNormalization($data, string $format = null): bool { return $data instanceof HostElement; } diff --git a/src/lib/MVC/Symfony/Component/Serializer/HostTextNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/HostTextNormalizer.php index cebf291907..af7b1a6693 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/HostTextNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/HostTextNormalizer.php @@ -17,7 +17,7 @@ protected function getAllowedProperties(): array return ['siteAccessesConfiguration']; } - public function supportsNormalization($data, string $format = null) + public function supportsNormalization($data, string $format = null): bool { return $data instanceof HostText; } diff --git a/src/lib/MVC/Symfony/Component/Serializer/MapNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/MapNormalizer.php index 5fbeaa5cfe..80b60cb5bf 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/MapNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/MapNormalizer.php @@ -15,8 +15,12 @@ final class MapNormalizer extends PropertyNormalizer { /** * @see \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Map::__sleep + * + * @param \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Map $object + * + * @return array{key: string, map: array{}, reverseMap: array{}} */ - public function normalize($object, string $format = null, array $context = []) + public function normalize($object, string $format = null, array $context = []): array { return [ 'key' => $object->getMapKey(), @@ -25,7 +29,7 @@ public function normalize($object, string $format = null, array $context = []) ]; } - public function supportsNormalization($data, string $format = null) + public function supportsNormalization($data, string $format = null): bool { return $data instanceof Map; } diff --git a/src/lib/MVC/Symfony/Component/Serializer/RegexHostNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/RegexHostNormalizer.php index bcb59438e0..2aaa3128c2 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/RegexHostNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/RegexHostNormalizer.php @@ -17,7 +17,7 @@ protected function getAllowedProperties(): array return ['siteAccessesConfiguration']; } - public function supportsNormalization($data, string $format = null) + public function supportsNormalization($data, string $format = null): bool { return $data instanceof Host; } diff --git a/src/lib/MVC/Symfony/Component/Serializer/RegexNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/RegexNormalizer.php index 0443e6d0c3..c605c30281 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/RegexNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/RegexNormalizer.php @@ -12,7 +12,7 @@ final class RegexNormalizer extends AbstractPropertyWhitelistNormalizer { - public function supportsNormalization($data, string $format = null) + public function supportsNormalization($data, string $format = null): bool { return $data instanceof Regex; } diff --git a/src/lib/MVC/Symfony/Component/Serializer/RegexURINormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/RegexURINormalizer.php index b3fdeb26ef..391421e7a3 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/RegexURINormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/RegexURINormalizer.php @@ -17,7 +17,7 @@ protected function getAllowedProperties(): array return ['siteAccessesConfiguration']; } - public function supportsNormalization($data, string $format = null) + public function supportsNormalization($data, string $format = null): bool { return $data instanceof URI; } diff --git a/src/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizer.php index 05464fa522..8a5c83768c 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizer.php @@ -13,11 +13,21 @@ final class SimplifiedRequestNormalizer extends PropertyNormalizer { /** - * @see \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize - * * @param \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest $object + * + * @return array{ + * scheme: string, + * host: string, + * port: string, + * pathinfo: string, + * queryParams: array, + * languages: string[], + * headers: array{} + * } + * + * @see \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array { return [ 'scheme' => $object->scheme, @@ -30,7 +40,7 @@ public function normalize($object, $format = null, array $context = []) ]; } - public function supportsNormalization($data, $format = null, array $context = []) + public function supportsNormalization($data, $format = null, array $context = []): bool { return $data instanceof SimplifiedRequest; } diff --git a/src/lib/MVC/Symfony/Component/Serializer/URIElementNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/URIElementNormalizer.php index df8d5f3066..0ac40bceec 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/URIElementNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/URIElementNormalizer.php @@ -12,7 +12,7 @@ final class URIElementNormalizer extends AbstractPropertyWhitelistNormalizer { - public function supportsNormalization($data, string $format = null) + public function supportsNormalization($data, string $format = null): bool { return $data instanceof URIElement; } diff --git a/src/lib/MVC/Symfony/Component/Serializer/URITextNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/URITextNormalizer.php index 37dbfcf899..a6d50a16d6 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/URITextNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/URITextNormalizer.php @@ -17,7 +17,7 @@ protected function getAllowedProperties(): array return ['siteAccessesConfiguration']; } - public function supportsNormalization($data, string $format = null) + public function supportsNormalization($data, string $format = null): bool { return $data instanceof URIText; } diff --git a/src/lib/MVC/Symfony/Controller/Content/DownloadRedirectionController.php b/src/lib/MVC/Symfony/Controller/Content/DownloadRedirectionController.php index 49ab74fba1..b212490190 100644 --- a/src/lib/MVC/Symfony/Controller/Content/DownloadRedirectionController.php +++ b/src/lib/MVC/Symfony/Controller/Content/DownloadRedirectionController.php @@ -15,6 +15,7 @@ use InvalidArgumentException; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\RouterInterface; class DownloadRedirectionController extends Controller @@ -71,7 +72,7 @@ public function redirectToContentDownloadAction($contentId, $fieldId, Request $r $downloadRouteRef->getParams() ); - return new RedirectResponse($downloadUrl, 302); + return new RedirectResponse($downloadUrl, Response::HTTP_FOUND); } /** diff --git a/src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php b/src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php index b03560c9b3..ff194fe641 100644 --- a/src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php +++ b/src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php @@ -62,7 +62,7 @@ public function getContentView() /** * @return bool */ - public function hasContentView() + public function hasContentView(): bool { return isset($this->contentView); } diff --git a/src/lib/MVC/Symfony/EventListener/LanguageSwitchListener.php b/src/lib/MVC/Symfony/EventListener/LanguageSwitchListener.php index 3db628d0ce..3b15bd2d8d 100644 --- a/src/lib/MVC/Symfony/EventListener/LanguageSwitchListener.php +++ b/src/lib/MVC/Symfony/EventListener/LanguageSwitchListener.php @@ -26,7 +26,7 @@ public function __construct(TranslationHelper $translationHelper) $this->translationHelper = $translationHelper; } - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ MVCEvents::ROUTE_REFERENCE_GENERATION => 'onRouteReferenceGeneration', diff --git a/src/lib/MVC/Symfony/EventListener/SiteAccessMatchListener.php b/src/lib/MVC/Symfony/EventListener/SiteAccessMatchListener.php index 1141c72e21..a82f97af7c 100644 --- a/src/lib/MVC/Symfony/EventListener/SiteAccessMatchListener.php +++ b/src/lib/MVC/Symfony/EventListener/SiteAccessMatchListener.php @@ -51,7 +51,7 @@ public function __construct( $this->siteAccessMatcherRegistry = $siteAccessMatcherRegistry; } - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ // Should take place just after FragmentListener (priority 48) in order to get rebuilt request attributes in case of subrequest diff --git a/src/lib/MVC/Symfony/ExpressionLanguage/TwigVariableProviderExtension.php b/src/lib/MVC/Symfony/ExpressionLanguage/TwigVariableProviderExtension.php index fb5e6f16f5..0ca47ef27c 100644 --- a/src/lib/MVC/Symfony/ExpressionLanguage/TwigVariableProviderExtension.php +++ b/src/lib/MVC/Symfony/ExpressionLanguage/TwigVariableProviderExtension.php @@ -27,7 +27,7 @@ public function getFunctions(): array return [ new ExpressionFunction( 'twig_variable_provider', - static function (string $identifier) { + static function (string $identifier): string { return 'Not implemented: Not a Dependency Injection expression'; }, function (array $variables, string $identifier) { diff --git a/src/lib/MVC/Symfony/FieldType/BinaryBase/ContentDownloadUrlGenerator.php b/src/lib/MVC/Symfony/FieldType/BinaryBase/ContentDownloadUrlGenerator.php index a1fa1cd153..15bb27430c 100644 --- a/src/lib/MVC/Symfony/FieldType/BinaryBase/ContentDownloadUrlGenerator.php +++ b/src/lib/MVC/Symfony/FieldType/BinaryBase/ContentDownloadUrlGenerator.php @@ -26,7 +26,7 @@ public function __construct(RouterInterface $router) $this->router = $router; } - public function getStoragePathForField(Field $field, VersionInfo $versionInfo) + public function getStoragePathForField(Field $field, VersionInfo $versionInfo): string { return $this->generate($this->route, $this->getParameters($field, $versionInfo)); } diff --git a/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistry.php b/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistry.php index b21a6bfb59..32ddd5f3a7 100644 --- a/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistry.php +++ b/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistry.php @@ -20,7 +20,7 @@ class ParameterProviderRegistry implements ParameterProviderRegistryInterface * * @return bool */ - public function hasParameterProvider($fieldTypeIdentifier) + public function hasParameterProvider($fieldTypeIdentifier): bool { return isset($this->providers[$fieldTypeIdentifier]); } diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php index 03c8747f8c..4703c40269 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php @@ -23,7 +23,7 @@ class Depth extends MultipleValued * * @return bool */ - public function matchLocation(Location $location) + public function matchLocation(Location $location): bool { return isset($this->values[$location->depth]); } @@ -35,7 +35,7 @@ public function matchLocation(Location $location) * * @return bool */ - public function matchContentInfo(ContentInfo $contentInfo) + public function matchContentInfo(ContentInfo $contentInfo): bool { $location = $this->repository->sudo( static function (Repository $repository) use ($contentInfo) { diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Content.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Content.php index 313faf0768..741bb6782d 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Content.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Content.php @@ -22,7 +22,7 @@ class Content extends MultipleValued * * @return bool */ - public function matchLocation(APILocation $location) + public function matchLocation(APILocation $location): bool { return isset($this->values[$location->getContentInfo()->id]); } @@ -34,12 +34,12 @@ public function matchLocation(APILocation $location) * * @return bool */ - public function matchContentInfo(ContentInfo $contentInfo) + public function matchContentInfo(ContentInfo $contentInfo): bool { return isset($this->values[$contentInfo->id]); } - public function match(View $view) + public function match(View $view): bool { if (!$view instanceof ContentValueView) { return false; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentType.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentType.php index 6cb3d694e9..8039550e4d 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentType.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentType.php @@ -22,7 +22,7 @@ class ContentType extends MultipleValued * * @return bool */ - public function matchLocation(APILocation $location) + public function matchLocation(APILocation $location): bool { return isset($this->values[$location->getContentInfo()->contentTypeId]); } @@ -34,12 +34,12 @@ public function matchLocation(APILocation $location) * * @return bool */ - public function matchContentInfo(ContentInfo $contentInfo) + public function matchContentInfo(ContentInfo $contentInfo): bool { return isset($this->values[$contentInfo->contentTypeId]); } - public function match(View $view) + public function match(View $view): bool { if (!$view instanceof ContentValueView) { return false; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroup.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroup.php index 2d609323f7..3b4216778d 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroup.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroup.php @@ -51,7 +51,7 @@ public function match(View $view) /** * @return bool */ - private function matchContentTypeId($contentTypeId) + private function matchContentTypeId($contentTypeId): bool { $contentTypeGroups = $this->repository ->getContentTypeService() diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Location.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Location.php index 76b776c548..3b9733c180 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Location.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Location.php @@ -22,7 +22,7 @@ class Location extends MultipleValued * * @return bool */ - public function matchLocation(APILocation $location) + public function matchLocation(APILocation $location): bool { return isset($this->values[$location->id]); } @@ -34,12 +34,12 @@ public function matchLocation(APILocation $location) * * @return bool */ - public function matchContentInfo(ContentInfo $contentInfo) + public function matchContentInfo(ContentInfo $contentInfo): bool { return isset($this->values[$contentInfo->mainLocationId]); } - public function match(View $view) + public function match(View $view): bool { if (!$view instanceof LocationValueView) { return false; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationRemote.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationRemote.php index 6187b895d6..3d3a34b5cc 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationRemote.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationRemote.php @@ -37,7 +37,7 @@ public function matchContentInfo(ContentInfo $contentInfo) { } - public function match(View $view) + public function match(View $view): bool { if (!$view instanceof LocationValueView) { return false; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php index 7d93b13afe..1843af3e82 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php @@ -23,7 +23,7 @@ class ParentContentType extends MultipleValued * * @return bool */ - public function matchLocation(APILocation $location) + public function matchLocation(APILocation $location): bool { $parent = $this->repository->sudo( static function (Repository $repository) use ($location) { @@ -52,7 +52,7 @@ static function (Repository $repository) use ($contentInfo) { return $this->matchLocation($location); } - public function match(View $view) + public function match(View $view): bool { if (!$view instanceof LocationValueView) { return false; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocation.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocation.php index efadf73c51..ff3ab61ae3 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocation.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocation.php @@ -23,7 +23,7 @@ class ParentLocation extends MultipleValued * * @return bool */ - public function matchLocation(APILocation $location) + public function matchLocation(APILocation $location): bool { return isset($this->values[$location->parentLocationId]); } @@ -35,7 +35,7 @@ public function matchLocation(APILocation $location) * * @return bool */ - public function matchContentInfo(ContentInfo $contentInfo) + public function matchContentInfo(ContentInfo $contentInfo): bool { $location = $this->repository->sudo( static function (Repository $repository) use ($contentInfo) { @@ -46,7 +46,7 @@ static function (Repository $repository) use ($contentInfo) { return isset($this->values[$location->parentLocationId]); } - public function match(View $view) + public function match(View $view): bool { if (!$view instanceof LocationValueView) { return false; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Remote.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Remote.php index 5c404947bf..9cae3d311b 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Remote.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Remote.php @@ -22,7 +22,7 @@ class Remote extends MultipleValued * * @return bool */ - public function matchLocation(APILocation $location) + public function matchLocation(APILocation $location): bool { return isset($this->values[$location->remoteId]); } @@ -34,12 +34,12 @@ public function matchLocation(APILocation $location) * * @return bool */ - public function matchContentInfo(ContentInfo $contentInfo) + public function matchContentInfo(ContentInfo $contentInfo): bool { return isset($this->values[$contentInfo->remoteId]); } - public function match(View $view) + public function match(View $view): bool { if (!$view instanceof ContentValueView) { return false; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Section.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Section.php index 3f4d35e4dc..e05d569851 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Section.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/Section.php @@ -22,7 +22,7 @@ class Section extends MultipleValued * * @return bool */ - public function matchLocation(APILocation $location) + public function matchLocation(APILocation $location): bool { return isset($this->values[$location->getContentInfo()->getSectionId()]); } @@ -34,12 +34,12 @@ public function matchLocation(APILocation $location) * * @return bool */ - public function matchContentInfo(ContentInfo $contentInfo) + public function matchContentInfo(ContentInfo $contentInfo): bool { return isset($this->values[$contentInfo->getSectionId()]); } - public function match(View $view) + public function match(View $view): bool { if (!$view instanceof ContentValueView) { return false; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentType.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentType.php index a1abeecaa9..266e2d5876 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentType.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentType.php @@ -22,7 +22,7 @@ class ContentType extends MultipleValued * * @return bool */ - public function matchLocation(Location $location) + public function matchLocation(Location $location): bool { $contentType = $this->repository ->getContentTypeService() @@ -38,7 +38,7 @@ public function matchLocation(Location $location) * * @return bool */ - public function matchContentInfo(ContentInfo $contentInfo) + public function matchContentInfo(ContentInfo $contentInfo): bool { $contentType = $this->repository ->getContentTypeService() @@ -47,7 +47,7 @@ public function matchContentInfo(ContentInfo $contentInfo) return isset($this->values[$contentType->identifier]); } - public function match(View $view) + public function match(View $view): bool { if (!$view instanceof ContentValueView) { return false; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentType.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentType.php index 52969c39d3..b52ec15ee5 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentType.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentType.php @@ -24,7 +24,7 @@ class ParentContentType extends MultipleValued * * @return bool */ - public function matchLocation(APILocation $location) + public function matchLocation(APILocation $location): bool { $parentContentType = $this->repository->sudo( static function (Repository $repository) use ($location) { diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/Section.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/Section.php index 41876b240a..89f5360ecd 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/Section.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/Section.php @@ -23,7 +23,7 @@ class Section extends MultipleValued * * @return bool */ - public function matchLocation(Location $location) + public function matchLocation(Location $location): bool { $section = $this->repository->sudo( static function (Repository $repository) use ($location) { @@ -43,7 +43,7 @@ static function (Repository $repository) use ($location) { * * @return bool */ - public function matchContentInfo(ContentInfo $contentInfo) + public function matchContentInfo(ContentInfo $contentInfo): bool { $section = $this->repository->sudo( static function (Repository $repository) use ($contentInfo) { @@ -56,7 +56,7 @@ static function (Repository $repository) use ($contentInfo) { return isset($this->values[$section->identifier]); } - public function match(View $view) + public function match(View $view): bool { if (!$view instanceof ContentValueView) { return false; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/UrlAlias.php b/src/lib/MVC/Symfony/Matcher/ContentBased/UrlAlias.php index 34107f2aa0..906debd877 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/UrlAlias.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/UrlAlias.php @@ -21,7 +21,7 @@ class UrlAlias extends MultipleValued * * @return bool */ - public function matchLocation(Location $location) + public function matchLocation(Location $location): bool { $urlAliasService = $this->repository->getURLAliasService(); $locationUrls = array_merge( diff --git a/src/lib/MVC/Symfony/Routing/Generator/UrlAliasGenerator.php b/src/lib/MVC/Symfony/Routing/Generator/UrlAliasGenerator.php index 18ec998bd3..41abb9a31d 100644 --- a/src/lib/MVC/Symfony/Routing/Generator/UrlAliasGenerator.php +++ b/src/lib/MVC/Symfony/Routing/Generator/UrlAliasGenerator.php @@ -69,7 +69,7 @@ public function __construct(Repository $repository, RouterInterface $defaultRout * * @return string */ - public function doGenerate($location, array $parameters) + public function doGenerate($location, array $parameters): string { $siteAccess = $parameters['siteaccess'] ?? null; @@ -143,7 +143,7 @@ public function getPathPrefixByRootLocationId($rootLocationId, $languages = null * * @return bool */ - public function isUriPrefixExcluded($uri) + public function isUriPrefixExcluded($uri): bool { foreach ($this->excludedUriPrefixes as $excludedPrefix) { $excludedPrefix = '/' . ltrim($excludedPrefix, '/'); diff --git a/src/lib/MVC/Symfony/Routing/UrlAliasRouter.php b/src/lib/MVC/Symfony/Routing/UrlAliasRouter.php index 3cdb02ea24..dc62d9f509 100644 --- a/src/lib/MVC/Symfony/Routing/UrlAliasRouter.php +++ b/src/lib/MVC/Symfony/Routing/UrlAliasRouter.php @@ -263,7 +263,7 @@ protected function getUrlAlias($pathinfo) * * @return \Symfony\Component\Routing\RouteCollection A RouteCollection instance */ - public function getRouteCollection() + public function getRouteCollection(): RouteCollection { return new RouteCollection(); } diff --git a/src/lib/MVC/Symfony/Security/Authorization/Voter/CoreVoter.php b/src/lib/MVC/Symfony/Security/Authorization/Voter/CoreVoter.php index b3695a212c..8a58d7ef21 100644 --- a/src/lib/MVC/Symfony/Security/Authorization/Voter/CoreVoter.php +++ b/src/lib/MVC/Symfony/Security/Authorization/Voter/CoreVoter.php @@ -29,7 +29,7 @@ public function __construct(PermissionResolver $permissionResolver) * * @return bool true if this Voter supports the attribute, false otherwise */ - public function supportsAttribute($attribute) + public function supportsAttribute($attribute): bool { return $attribute instanceof AuthorizationAttribute && empty($attribute->limitations); } @@ -41,7 +41,7 @@ public function supportsAttribute($attribute) * * @return true if this Voter can process the class */ - public function supportsClass($class) + public function supportsClass($class): bool { return true; } @@ -58,7 +58,7 @@ public function supportsClass($class) * * @return int either ACCESS_GRANTED, ACCESS_ABSTAIN, or ACCESS_DENIED */ - public function vote(TokenInterface $token, $object, array $attributes) + public function vote(TokenInterface $token, $object, array $attributes): int { foreach ($attributes as $attribute) { if ($this->supportsAttribute($attribute)) { diff --git a/src/lib/MVC/Symfony/Security/Authorization/Voter/ValueObjectVoter.php b/src/lib/MVC/Symfony/Security/Authorization/Voter/ValueObjectVoter.php index d8e36aab95..422308faff 100644 --- a/src/lib/MVC/Symfony/Security/Authorization/Voter/ValueObjectVoter.php +++ b/src/lib/MVC/Symfony/Security/Authorization/Voter/ValueObjectVoter.php @@ -25,12 +25,12 @@ public function __construct(PermissionResolver $permissionResolver) $this->permissionResolver = $permissionResolver; } - public function supportsAttribute($attribute) + public function supportsAttribute($attribute): bool { return $attribute instanceof AuthorizationAttribute && isset($attribute->limitations['valueObject']); } - public function supportsClass($class) + public function supportsClass($class): bool { return true; } @@ -54,7 +54,7 @@ public function supportsClass($class) * * @return int either ACCESS_GRANTED, ACCESS_ABSTAIN, or ACCESS_DENIED */ - public function vote(TokenInterface $token, $object, array $attributes) + public function vote(TokenInterface $token, $object, array $attributes): int { foreach ($attributes as $attribute) { if ($this->supportsAttribute($attribute)) { diff --git a/src/lib/MVC/Symfony/Security/HttpUtils.php b/src/lib/MVC/Symfony/Security/HttpUtils.php index bc382f66c7..24190d6087 100644 --- a/src/lib/MVC/Symfony/Security/HttpUtils.php +++ b/src/lib/MVC/Symfony/Security/HttpUtils.php @@ -54,7 +54,7 @@ public function checkRequestPath(Request $request, $path) * * @return bool */ - private function isRouteName($path) + private function isRouteName($path): bool { return $path && strpos($path, 'http') !== 0 && strpos($path, '/') !== 0; } diff --git a/src/lib/MVC/Symfony/Security/User.php b/src/lib/MVC/Symfony/Security/User.php index 1e610e21b4..e6b9cdb684 100644 --- a/src/lib/MVC/Symfony/Security/User.php +++ b/src/lib/MVC/Symfony/Security/User.php @@ -79,6 +79,11 @@ public function getSalt() * Returns the username used to authenticate the user. */ public function getUsername(): string + { + return $this->getUserIdentifier(); + } + + public function getUserIdentifier(): string { return $this->getAPIUser()->getLogin(); } diff --git a/src/lib/MVC/Symfony/Security/User/BaseProvider.php b/src/lib/MVC/Symfony/Security/User/BaseProvider.php index b9f7ffe1c5..a75f3e5ac6 100644 --- a/src/lib/MVC/Symfony/Security/User/BaseProvider.php +++ b/src/lib/MVC/Symfony/Security/User/BaseProvider.php @@ -17,7 +17,7 @@ use Ibexa\Core\MVC\Symfony\Security\UserInterface; use Ibexa\Core\Repository\Values\User\UserReference; use Symfony\Component\Security\Core\Exception\UnsupportedUserException; -use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; +use Symfony\Component\Security\Core\Exception\UserNotFoundException; use Symfony\Component\Security\Core\User\UserInterface as CoreUserInterface; abstract class BaseProvider implements APIUserProviderInterface @@ -36,7 +36,7 @@ public function __construct( $this->userService = $userService; } - public function refreshUser(CoreUserInterface $user) + public function refreshUser(CoreUserInterface $user): CoreUserInterface { if (!$user instanceof UserInterface) { throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', get_class($user))); @@ -55,7 +55,7 @@ public function refreshUser(CoreUserInterface $user) return $user; } catch (NotFoundException $e) { - throw new UsernameNotFoundException($e->getMessage(), 0, $e); + throw new UserNotFoundException($e->getMessage(), 0, $e); } } @@ -66,7 +66,7 @@ public function refreshUser(CoreUserInterface $user) * * @return bool */ - public function supportsClass($class) + public function supportsClass($class): bool { return $class === UserInterface::class || is_subclass_of($class, UserInterface::class); } diff --git a/src/lib/MVC/Symfony/Security/UserWrapped.php b/src/lib/MVC/Symfony/Security/UserWrapped.php index 9022edecce..a417445ac6 100644 --- a/src/lib/MVC/Symfony/Security/UserWrapped.php +++ b/src/lib/MVC/Symfony/Security/UserWrapped.php @@ -102,7 +102,7 @@ public function getWrappedUser() return $this->wrappedUser; } - public function getRoles() + public function getRoles(): array { return $this->wrappedUser->getRoles(); } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php index 72927a907b..0554c20a80 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php @@ -61,7 +61,7 @@ public function match() return isset($elements[$this->elementNumber - 1]) ? $elements[$this->elementNumber - 1] : false; } - public function getName() + public function getName(): string { return 'host:element'; } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php index d9380fa24b..a04ef3967c 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php @@ -12,7 +12,7 @@ class Host extends Map { - public function getName() + public function getName(): string { return 'host:map'; } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php index 33c3b44740..1c7083f7fe 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php @@ -12,7 +12,7 @@ class Port extends Map { - public function getName() + public function getName(): string { return 'port'; } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php index d6a76026ed..c4aa6c2bca 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php @@ -28,7 +28,7 @@ public function setRequest(SimplifiedRequest $request) parent::setRequest($request); } - public function getName() + public function getName(): string { return 'uri:map'; } @@ -60,7 +60,7 @@ public function analyseURI($uri) * * @return string The modified link URI */ - public function analyseLink($linkUri) + public function analyseLink($linkUri): string { // Joining slash between uriElements and actual linkUri must be present, except if $linkUri is empty or is just the slash root. $joiningSlash = empty($linkUri) || ($linkUri === '/') ? '' : '/'; diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/Host.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/Host.php index 660bc4ea0e..78a7bdf2ef 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/Host.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/Host.php @@ -37,7 +37,7 @@ public function __construct(array $siteAccessesConfiguration) $this->siteAccessesConfiguration = $siteAccessesConfiguration; } - public function getName() + public function getName(): string { return 'host:regexp'; } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/URI.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/URI.php index a8d8e1a7b1..9d49eeb30c 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/URI.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex/URI.php @@ -37,7 +37,7 @@ public function __construct(array $siteAccessesConfiguration) $this->siteAccessesConfiguration = $siteAccessesConfiguration; } - public function getName() + public function getName(): string { return 'uri:regexp'; } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php index 797a503b28..11c5dcd8ec 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php @@ -100,7 +100,7 @@ protected function getURIElements() return $this->uriElements = $elements; } - public function getName() + public function getName(): string { return 'uri:element'; } @@ -149,7 +149,7 @@ public function analyseURI($uri) * * @return string The modified link URI */ - public function analyseLink($linkUri) + public function analyseLink($linkUri): string { // Joining slash between uriElements and actual linkUri must be present, except if $linkUri is empty. $joiningSlash = empty($linkUri) ? '' : '/'; diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php index 971f8bbd7a..10ec36c376 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php @@ -99,7 +99,7 @@ public function getFilters() * * @return string */ - public function sizeFilter($number, $precision) + public function sizeFilter($number, $precision): string|false { $mod = 1024; $index = count($this->suffixes); diff --git a/src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php b/src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php index f78e1b9470..1d90f7cb48 100644 --- a/src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php +++ b/src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php @@ -20,6 +20,8 @@ */ class CatalogueMapperFileWriter extends FileWriter { + private const string XLF_FILE_NAME_REGEX_PATTERN = '/\.[-_a-z]+\.xlf$/i'; + /** @var \JMS\TranslationBundle\Translation\LoaderManager */ private $loaderManager; @@ -74,14 +76,14 @@ public function write(MessageCatalogue $catalogue, $domain, $filePath, $format) $this->innerFileWriter->write($newCatalogue, $domain, $filePath, $format); } - /** - * @param $filePath - * - * @return mixed - */ - private function getEnglishFilePath($filePath) + private function getEnglishFilePath(string $filePath): string { - return preg_replace('/\.[-_a-z]+\.xlf$/i', '.en.xlf', $filePath); + $enFilePath = preg_replace(self::XLF_FILE_NAME_REGEX_PATTERN, '.en.xlf', $filePath); + if (null === $enFilePath) { + throw new InvalidArgumentException("failed to get English XLF file path for '$filePath'"); + } + + return $enFilePath; } /** @@ -101,7 +103,7 @@ private function loadEnglishCatalogue($foreignFilePath, $domain, $format) ); } - private function hasEnglishCatalogue($foreignFilePath) + private function hasEnglishCatalogue($foreignFilePath): bool { return file_exists($this->getEnglishFilePath($foreignFilePath)); } diff --git a/src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php b/src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php index 6037543115..6df71a3b6c 100644 --- a/src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php +++ b/src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php @@ -68,7 +68,7 @@ public function __construct( $this->requestStack = $requestStack; } - public function matches($argument) + public function matches($argument): bool { return strpos($argument, 'ibexa_content:') !== false; } @@ -283,7 +283,7 @@ private function canRead(Content $content, Location $location = null, bool $isEm * * @return bool */ - private function isEmbed($parameters) + private function isEmbed($parameters): bool { if ($parameters['_controller'] === 'ibexa_content:embedAction') { return true; diff --git a/src/lib/MVC/Symfony/View/Builder/ParametersFilter/RequestAttributes.php b/src/lib/MVC/Symfony/View/Builder/ParametersFilter/RequestAttributes.php index d03b53a0b5..c88679fddc 100644 --- a/src/lib/MVC/Symfony/View/Builder/ParametersFilter/RequestAttributes.php +++ b/src/lib/MVC/Symfony/View/Builder/ParametersFilter/RequestAttributes.php @@ -16,7 +16,7 @@ */ class RequestAttributes implements EventSubscriberInterface { - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ViewEvents::FILTER_BUILDER_PARAMETERS => 'addRequestAttributes']; } diff --git a/src/lib/MVC/Symfony/View/CustomLocationControllerChecker.php b/src/lib/MVC/Symfony/View/CustomLocationControllerChecker.php index 8bcb2a0386..a97e1c7ce4 100644 --- a/src/lib/MVC/Symfony/View/CustomLocationControllerChecker.php +++ b/src/lib/MVC/Symfony/View/CustomLocationControllerChecker.php @@ -29,7 +29,7 @@ class CustomLocationControllerChecker * * @return bool */ - public function usesCustomController(Content $content, Location $location, $viewMode = 'full') + public function usesCustomController(Content $content, Location $location, $viewMode = 'full'): bool { $contentView = new ContentView(null, [], $viewMode); $contentView->setContent($content); diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/CustomParameters.php b/src/lib/MVC/Symfony/View/ParametersInjector/CustomParameters.php index bc848a6e9d..7a30313c76 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/CustomParameters.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/CustomParameters.php @@ -16,7 +16,7 @@ */ class CustomParameters implements EventSubscriberInterface { - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ViewEvents::FILTER_VIEW_PARAMETERS => 'injectCustomParameters']; } diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/EmbedObjectParameters.php b/src/lib/MVC/Symfony/View/ParametersInjector/EmbedObjectParameters.php index 8e3c65f125..8ae533855d 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/EmbedObjectParameters.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/EmbedObjectParameters.php @@ -16,7 +16,7 @@ */ class EmbedObjectParameters implements EventSubscriberInterface { - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ViewEvents::FILTER_VIEW_PARAMETERS => 'injectEmbedObjectParameters']; } diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/NoLayout.php b/src/lib/MVC/Symfony/View/ParametersInjector/NoLayout.php index 0e9fdbcee5..178aa3c828 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/NoLayout.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/NoLayout.php @@ -16,7 +16,7 @@ */ class NoLayout implements EventSubscriberInterface { - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ViewEvents::FILTER_VIEW_PARAMETERS => 'injectCustomParameters']; } diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/ValueObjectsIds.php b/src/lib/MVC/Symfony/View/ParametersInjector/ValueObjectsIds.php index 3afde6a271..4221231683 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/ValueObjectsIds.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/ValueObjectsIds.php @@ -18,7 +18,7 @@ */ class ValueObjectsIds implements EventSubscriberInterface { - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [View\ViewEvents::FILTER_VIEW_PARAMETERS => 'injectValueObjectsIds']; } diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/ViewbaseLayout.php b/src/lib/MVC/Symfony/View/ParametersInjector/ViewbaseLayout.php index 96f3c00927..0548cb4572 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/ViewbaseLayout.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/ViewbaseLayout.php @@ -29,7 +29,7 @@ public function __construct($viewbaseLayout, ConfigResolverInterface $configReso $this->configResolver = $configResolver; } - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ViewEvents::FILTER_VIEW_PARAMETERS => 'injectViewbaseLayout']; } diff --git a/src/lib/Persistence/Cache/ObjectStateHandler.php b/src/lib/Persistence/Cache/ObjectStateHandler.php index e66806e21e..a1dd875ecb 100644 --- a/src/lib/Persistence/Cache/ObjectStateHandler.php +++ b/src/lib/Persistence/Cache/ObjectStateHandler.php @@ -102,7 +102,7 @@ function (Group $group) use ($escapedIdentifier): array { /** * {@inheritdoc} */ - public function loadAllGroups($offset = 0, $limit = -1) + public function loadAllGroups($offset = 0, $limit = -1): array { $stateGroups = $this->getListCacheValue( $this->cacheIdentifierGenerator->generateKey(self::STATE_GROUP_ALL_IDENTIFIER, [], true), diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php index 77c89d3b07..6ce82ff8b1 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php @@ -8,6 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use DOMDocument; +use Ibexa\Contracts\Core\Exception\InvalidArgumentException; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition; use Ibexa\Core\FieldType\Author\Type as AuthorType; @@ -33,10 +34,8 @@ public static function create() } /** - * Converts data from $value to $storageFieldValue. - * - * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value - * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue + * @throws \DOMException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) { @@ -97,7 +96,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * * @return string */ - public function getIndexColumn() + public function getIndexColumn(): string { return 'sort_key_string'; } @@ -108,8 +107,11 @@ public function getIndexColumn() * @param array $authorValue * * @return string The generated XML string + * + * @throws \DOMException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ - private function generateXmlString(array $authorValue) + private function generateXmlString(array $authorValue): string { $doc = new DOMDocument('1.0', 'utf-8'); @@ -121,14 +123,26 @@ private function generateXmlString(array $authorValue) foreach ($authorValue as $author) { $authorNode = $doc->createElement('author'); - $authorNode->setAttribute('id', $author['id']); + $authorNode->setAttribute('id', (string)$author['id']); $authorNode->setAttribute('name', $author['name']); $authorNode->setAttribute('email', $author['email']); $authors->appendChild($authorNode); unset($authorNode); } - return $doc->saveXML(); + $xml = $doc->saveXML(); + if (false === $xml) { + $lastError = libxml_get_last_error(); + throw new InvalidArgumentException( + '$authorValue', + sprintf( + 'AuthorConverter: an error occurred when trying to save author field data: %s', + $lastError !== false ? $lastError->message : 'unknown error' + ) + ); + } + + return $xml; } /** diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxConverter.php index f736f267f6..009e5c4271 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxConverter.php @@ -84,7 +84,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * * @return string */ - public function getIndexColumn() + public function getIndexColumn(): string { return 'sort_key_int'; } diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryConverter.php index eadc9795db..65cbd59657 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryConverter.php @@ -102,7 +102,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * * @return string */ - public function getIndexColumn() + public function getIndexColumn(): string { return 'sort_key_string'; } diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php index 0bf27e9c43..008a6ee045 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php @@ -10,6 +10,7 @@ use DateInterval; use DateTime; use DOMDocument; +use Ibexa\Contracts\Core\Exception\InvalidArgumentException; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition; use Ibexa\Core\FieldType\DateAndTime\Type as DateAndTimeType; @@ -147,7 +148,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * * @return string */ - public function getIndexColumn() + public function getIndexColumn(): string { return 'sort_key_int'; } @@ -155,11 +156,10 @@ public function getIndexColumn() /** * Generates the internal XML structure for $dateInterval, used for date adjustment. * - * @param \DateInterval $dateInterval - * - * @return string The generated XML string + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \DOMException */ - protected function generateDateIntervalXML(DateInterval $dateInterval) + protected function generateDateIntervalXML(DateInterval $dateInterval): string { // Constructing XML structure $doc = new DOMDocument('1.0', 'utf-8'); @@ -197,7 +197,19 @@ protected function generateDateIntervalXML(DateInterval $dateInterval) $doc->appendChild($root); - return $doc->saveXML(); + $xml = $doc->saveXML(); + if (false === $xml) { + $lastError = libxml_get_last_error(); + throw new InvalidArgumentException( + '$dateInterval', + sprintf( + 'DateAndTimeConverter: an error occurred when trying to save date and time field data: %s', + $lastError !== false ? $lastError->message : 'unknown error' + ) + ); + } + + return $xml; } /** diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php index a3192134f1..5266c7f018 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php @@ -115,7 +115,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * * @return string */ - public function getIndexColumn() + public function getIndexColumn(): string { return 'sort_key_int'; } diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php index bd8ed08e4a..a9bd35900b 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php @@ -89,7 +89,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * * @return string */ - public function getIndexColumn() + public function getIndexColumn(): string { return 'sort_key_string'; } diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php index fd9ce297e2..e8e9ab045b 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php @@ -111,7 +111,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * * @return string */ - public function getIndexColumn() + public function getIndexColumn(): string { return 'sort_key_string'; } @@ -127,7 +127,7 @@ public function getIndexColumn() * * @return int */ - private function getStorageDefValidatorState($minValue, $maxValue) + private function getStorageDefValidatorState($minValue, $maxValue): int { $state = 0; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNConverter.php index 621db48b5d..0fb3e540e2 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNConverter.php @@ -98,7 +98,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * * @return string */ - public function getIndexColumn() + public function getIndexColumn(): string { return 'sort_key_string'; } diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageAssetConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageAssetConverter.php index 3f524f1b5f..9077569f3d 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageAssetConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageAssetConverter.php @@ -77,7 +77,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * * @return string */ - public function getIndexColumn() + public function getIndexColumn(): string { return 'sort_key_string'; } diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php index 2f16e78123..c6f7d01b5f 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php @@ -109,7 +109,7 @@ protected function createLegacyXml(array $data) * * @return string */ - protected function fillXml($imageData, $pathInfo, $timestamp) + protected function fillXml($imageData, $pathInfo, $timestamp): string { $additionalData = $this->buildAdditionalDataTag($imageData['additionalData'] ?? []); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/IntegerConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/IntegerConverter.php index f08ef8760c..dcfc8f0041 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/IntegerConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/IntegerConverter.php @@ -117,7 +117,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * * @return string */ - public function getIndexColumn() + public function getIndexColumn(): string { return 'sort_key_int'; } @@ -133,7 +133,7 @@ public function getIndexColumn() * * @return int */ - private function getStorageDefValidatorState($minValue, $maxValue) + private function getStorageDefValidatorState($minValue, $maxValue): int { $state = 0; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordConverter.php index 0a96f28b87..b13aaf685a 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordConverter.php @@ -81,7 +81,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * * @return string */ - public function getIndexColumn() + public function getIndexColumn(): string { return 'sort_key_string'; } diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MapLocationConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MapLocationConverter.php index 94879798aa..ae3ed50636 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MapLocationConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MapLocationConverter.php @@ -81,7 +81,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * * @return string */ - public function getIndexColumn() + public function getIndexColumn(): string { return 'sort_key_string'; } diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaConverter.php index 8644e3fb14..6284a80e4b 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaConverter.php @@ -59,17 +59,8 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin ); } - /** - * Returns the name of the index column in the attribute table. - * - * Returns the name of the index column the datatype uses, which is either - * "sort_key_int" or "sort_key_string". This column is then used for - * filtering and sorting for this type. - * - * @return string - */ - public function getIndexColumn() + public function getIndexColumn(): string { - return false; + return ''; } } diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php index fc59ebe90a..360c48bc30 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php @@ -86,10 +86,8 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * Returns the name of the index column the datatype uses, which is either * "sort_key_int" or "sort_key_string". This column is then used for * filtering and sorting for this type. - * - * @return string */ - public function getIndexColumn() + public function getIndexColumn(): bool { return false; } diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php index 9b03b0f1bb..d1ff7740ba 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php @@ -192,7 +192,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * * @return string */ - public function getIndexColumn() + public function getIndexColumn(): string { return 'sort_key_int'; } diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php index d4ddb2c437..9a3dc4a568 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php @@ -264,7 +264,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * * @return string */ - public function getIndexColumn() + public function getIndexColumn(): string { return 'sort_key_string'; } diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionConverter.php index bd05c2e6e0..234f65771c 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionConverter.php @@ -151,7 +151,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * * @return string */ - public function getIndexColumn() + public function getIndexColumn(): string { return 'sort_key_string'; } diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php index df3723773d..8ec266d445 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php @@ -93,7 +93,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * * @return string */ - public function getIndexColumn() + public function getIndexColumn(): string { return 'sort_key_string'; } diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php index d92b8f7432..ea74c13226 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php @@ -115,7 +115,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * * @return string */ - public function getIndexColumn() + public function getIndexColumn(): string { return 'sort_key_string'; } diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php index 142adb2037..8858fd142e 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php @@ -116,7 +116,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * * @return string */ - public function getIndexColumn() + public function getIndexColumn(): string { return 'sort_key_int'; } diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php index 67b135f59c..f91c6570ed 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php @@ -92,7 +92,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * * @return false */ - public function getIndexColumn() + public function getIndexColumn(): bool { return false; } diff --git a/src/lib/Persistence/Legacy/Content/Handler.php b/src/lib/Persistence/Legacy/Content/Handler.php index cb8b3afc6e..1a8ef9d195 100644 --- a/src/lib/Persistence/Legacy/Content/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Handler.php @@ -466,12 +466,9 @@ public function loadContentInfoByRemoteId($remoteId) ); } - /** - * {@inheritdoc} - */ - public function loadVersionInfo($contentId, $versionNo = null) + public function loadVersionInfo($contentId, $versionNo = null): VersionInfo { - $rows = $this->contentGateway->loadVersionInfo($contentId, $versionNo); + $rows = $this->contentGateway->loadVersionInfo((int)$contentId, $versionNo); if (empty($rows)) { throw new NotFound('content', $contentId); } @@ -481,7 +478,12 @@ public function loadVersionInfo($contentId, $versionNo = null) $this->contentGateway->loadVersionedNameData([['id' => $contentId, 'version' => $rows[0]['ezcontentobject_version_version']]]) ); - return reset($versionInfo); + $versionInfo = reset($versionInfo); + if (false === $versionInfo) { + throw new NotFound('versionInfo', $contentId); + } + + return $versionInfo; } public function countDraftsForUser(int $userId): int @@ -933,7 +935,7 @@ public function deleteTranslationFromDraft($contentId, $versionNo, $languageCode // get all [languageCode => name] entries except the removed Translation $names = array_filter( $versionInfo->names, - static function ($lang) use ($languageCode) { + static function ($lang) use ($languageCode): bool { return $lang !== $languageCode; }, ARRAY_FILTER_USE_KEY diff --git a/src/lib/Persistence/Legacy/Content/Language/Handler.php b/src/lib/Persistence/Legacy/Content/Language/Handler.php index 1f172a5968..13a37c7b16 100644 --- a/src/lib/Persistence/Legacy/Content/Language/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Language/Handler.php @@ -80,7 +80,7 @@ public function update(Language $language) * * @return \Ibexa\Contracts\Core\Persistence\Content\Language */ - public function load($id) + public function load($id): Language { $languages = $this->languageMapper->extractLanguagesFromRows( $this->languageGateway->loadLanguageListData([$id]) @@ -113,7 +113,7 @@ public function loadList(array $ids): iterable * * @return \Ibexa\Contracts\Core\Persistence\Content\Language */ - public function loadByLanguageCode($languageCode) + public function loadByLanguageCode($languageCode): Language { $languages = $this->languageMapper->extractLanguagesFromRows( $this->languageGateway->loadLanguageListDataByLanguageCode([$languageCode]) diff --git a/src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php b/src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php index feca1e2081..7d81269b75 100644 --- a/src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php +++ b/src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php @@ -43,7 +43,7 @@ public function __construct(LanguageHandler $languageHandler) * * @return int */ - public function generateLanguageMask(array $languages) + public function generateLanguageMask(array $languages): int { $mask = 0; if (isset($languages['always-available'])) { @@ -94,7 +94,7 @@ public function generateLanguageMaskFromLanguageIds(array $languageIds, $alwaysA * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ - public function generateLanguageIndicator($languageCode, $alwaysAvailable) + public function generateLanguageIndicator($languageCode, $alwaysAvailable): int { return $this->languageHandler->loadByLanguageCode($languageCode)->id | ($alwaysAvailable ? 1 : 0); } diff --git a/src/lib/Persistence/Legacy/Content/Location/Handler.php b/src/lib/Persistence/Legacy/Content/Location/Handler.php index f0ba2d7332..6fe93eae46 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Location/Handler.php @@ -82,7 +82,7 @@ public function __construct( * * @return string */ - protected function getParentPathString($pathString) + protected function getParentPathString($pathString): string { return implode('/', array_slice(explode('/', $pathString), 0, -2)) . '/'; } @@ -378,7 +378,7 @@ private function updateSubtreeSectionIfNecessary(Location $location, $sectionId) * * @return bool */ - private function isMainLocation(Location $location) + private function isMainLocation(Location $location): bool { $locationContentInfo = $this->contentHandler->loadContentInfo($location->contentId); diff --git a/src/lib/Persistence/Legacy/Content/Location/Mapper.php b/src/lib/Persistence/Legacy/Content/Location/Mapper.php index 2ebb8fe834..949eee2aa6 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/Location/Mapper.php @@ -61,7 +61,7 @@ public function createLocationFromRow(array $data, $prefix = '', ?Location $loca * * @return \Ibexa\Contracts\Core\Persistence\Content\Location[] */ - public function createLocationsFromRows(array $rows, $prefix = '', ?Location $location = null) + public function createLocationsFromRows(array $rows, $prefix = '', ?Location $location = null): array { $locations = []; diff --git a/src/lib/Persistence/Legacy/Content/Mapper.php b/src/lib/Persistence/Legacy/Content/Mapper.php index b0932d8ca1..bb33629493 100644 --- a/src/lib/Persistence/Legacy/Content/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/Mapper.php @@ -476,7 +476,7 @@ private function extractVersionInfoFromRow(array $row, array $names = []) * * @return \Ibexa\Contracts\Core\Persistence\Content\VersionInfo[] */ - public function extractVersionInfoListFromRows(array $rows, array $nameRows) + public function extractVersionInfoListFromRows(array $rows, array $nameRows): array { $nameData = []; foreach ($nameRows as $row) { diff --git a/src/lib/Persistence/Legacy/Content/ObjectState/Handler.php b/src/lib/Persistence/Legacy/Content/ObjectState/Handler.php index 5b78c171e3..e1db7acd40 100644 --- a/src/lib/Persistence/Legacy/Content/ObjectState/Handler.php +++ b/src/lib/Persistence/Legacy/Content/ObjectState/Handler.php @@ -309,7 +309,7 @@ public function delete($stateId) * * @return bool */ - public function setContentState($contentId, $groupId, $stateId) + public function setContentState($contentId, $groupId, $stateId): bool { $this->objectStateGateway->setContentState($contentId, $groupId, $stateId); diff --git a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater.php b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater.php index d8256ec274..7a915f5830 100644 --- a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater.php +++ b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater.php @@ -109,7 +109,7 @@ public function determineActions(Type $fromType, Type $toType) * * @return bool */ - protected function hasFieldDefinition(Type $type, FieldDefinition $fieldDef) + protected function hasFieldDefinition(Type $type, FieldDefinition $fieldDef): bool { foreach ($type->fieldDefinitions as $existFieldDef) { if ($existFieldDef->id == $fieldDef->id) { diff --git a/src/lib/Persistence/Legacy/Content/Type/Handler.php b/src/lib/Persistence/Legacy/Content/Type/Handler.php index a695f1119a..ec267e3c00 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Type/Handler.php @@ -373,7 +373,7 @@ public function update($typeId, $status, UpdateStruct $updateStruct) * * @return bool */ - public function delete($contentTypeId, $status) + public function delete($contentTypeId, $status): bool { if (Type::STATUS_DEFINED === $status && $this->contentTypeGateway->countInstancesOfType($contentTypeId)) { throw new BadStateException( @@ -470,7 +470,7 @@ public function copy($userId, $contentTypeId, $status) * * @todo Add throws for NotFound and BadState when group is not assigned to type */ - public function unlink($groupId, $contentTypeId, $status) + public function unlink($groupId, $contentTypeId, $status): bool { $groupCount = $this->contentTypeGateway->countGroupsForType($contentTypeId, $status); if ($groupCount < 2) { @@ -494,7 +494,7 @@ public function unlink($groupId, $contentTypeId, $status) * * @todo Above throws are not implemented */ - public function link($groupId, $contentTypeId, $status) + public function link($groupId, $contentTypeId, $status): bool { $this->contentTypeGateway->insertGroupAssignment($groupId, $contentTypeId, $status); diff --git a/src/lib/Persistence/Legacy/Content/Type/Mapper.php b/src/lib/Persistence/Legacy/Content/Type/Mapper.php index 6c625659a0..30a9999a6f 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/Type/Mapper.php @@ -129,7 +129,7 @@ public function extractTypesFromRows(array $rows, bool $keepTypeIdAsKey = false) $fieldId = (int)$row['ezcontentclass_attribute_id']; if ($fieldId && !isset($fields[$fieldId])) { - $fieldDataRows = array_filter($rows, static function (array $row) use ($fieldId) { + $fieldDataRows = array_filter($rows, static function (array $row) use ($fieldId): bool { return (int) $row['ezcontentclass_attribute_id'] === (int) $fieldId; }); diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php index 9f5b4399e3..4d91760184 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php @@ -681,7 +681,7 @@ public function loadUrlAliasData(array $urlHashes): array $query ->addSelect( array_map( - static function (string $columnName) use ($tableAlias) { + static function (string $columnName) use ($tableAlias): string { // do not alias data for top level url part $columnAlias = 'u' === $tableAlias ? $columnName @@ -1051,7 +1051,7 @@ public function archiveUrlAliasesForDeletedTranslations( $rowLanguageMask = (int)$row['lang_mask']; $languageIdsToBeRemoved = array_filter( $languageIds, - static function ($languageId) use ($rowLanguageMask) { + static function ($languageId) use ($rowLanguageMask): int { return $languageId & $rowLanguageMask; } ); @@ -1346,7 +1346,7 @@ private function filterOriginalAliases(array $urlAliasesData): array { $originalUrlAliases = array_filter( $urlAliasesData, - static function ($urlAliasData) { + static function ($urlAliasData): bool { // filter is_original=true ignoring broken parent records (cleaned up elsewhere) return (bool)$urlAliasData['is_original'] && $urlAliasData['existing_parent'] !== null; } diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php index c4c5882449..5f757fce01 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php @@ -545,7 +545,7 @@ public function listGlobalURLAliases($languageCode = null, $offset = 0, $limit = * * @return bool */ - public function removeURLAliases(array $urlAliases) + public function removeURLAliases(array $urlAliases): bool { foreach ($urlAliases as $urlAlias) { if ($urlAlias->isCustom) { @@ -829,7 +829,7 @@ private function shouldUrlAliasForSecondLocationBePublishedFirst( $location2ParentId, $name2, $languageId - ) { + ): bool { if ($location1ParentId === $location2ParentId && $name1 === $name2) { $locationEntry1 = $this->getLocationEntryInLanguage($location1Entries, $languageId); $locationEntry2 = $this->getLocationEntryInLanguage($location2Entries, $languageId); @@ -912,7 +912,7 @@ private function getLocationEntryInLanguage(array $locationEntries, $languageId) { $entries = array_filter( $locationEntries, - static function (array $row) use ($languageId) { + static function (array $row) use ($languageId): bool { return (bool) ($row['lang_mask'] & $languageId); } ); @@ -1085,7 +1085,7 @@ protected function removeSubtree($id, $action, $original) * * @return string */ - protected function getHash($text) + protected function getHash($text): string { return md5(mb_strtolower($text, 'UTF-8')); } diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php index 2a4d9dbc7a..988c62195c 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php @@ -183,7 +183,7 @@ public function translate(string $sourceUrl): UrlWildcard $rows = $this->gateway->loadUrlWildcardsData(); uasort( $rows, - static function ($row1, $row2) { + static function ($row1, $row2): int { return strlen($row2['source_url']) - strlen($row1['source_url']); } ); diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Mapper.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Mapper.php index dd2a808119..f888fdb0b7 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Mapper.php @@ -58,7 +58,7 @@ public function extractUrlWildcardFromRow(array $row) * * @return string */ - protected function cleanUrl($url) + protected function cleanUrl($url): string { // if given $url is an absolute URL, then it's not necessary to prepend it with slash if (null !== parse_url($url, PHP_URL_SCHEME)) { diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilder.php index aee1a1e65e..a5aab229df 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilder.php @@ -39,7 +39,7 @@ public function buildQueryConstraint( // extract numerical IDs from $criterion->value e.g. = ['/1/2/', '/1/4/10/'] $locationIDs = array_merge( ...array_map( - static function (string $pathString) { + static function (string $pathString): array { return array_map( 'intval', array_filter(explode('/', trim($pathString, '/'))) diff --git a/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php b/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php index 6d9006bf1b..9226255e42 100644 --- a/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php +++ b/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php @@ -195,7 +195,7 @@ private function extractVersionData(array $rows, int $contentId, int $versionNo) { return array_filter( $rows, - static function (array $row) use ($contentId, $versionNo) { + static function (array $row) use ($contentId, $versionNo): bool { return (int)$row['content_id'] === $contentId && (int)$row['version_no'] === $versionNo; } diff --git a/src/lib/Persistence/Legacy/URL/Handler.php b/src/lib/Persistence/Legacy/URL/Handler.php index 8bc3d27ae6..c9c5313454 100644 --- a/src/lib/Persistence/Legacy/URL/Handler.php +++ b/src/lib/Persistence/Legacy/URL/Handler.php @@ -8,6 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\URL; use Ibexa\Contracts\Core\Persistence\URL\Handler as HandlerInterface; +use Ibexa\Contracts\Core\Persistence\URL\URL; use Ibexa\Contracts\Core\Persistence\URL\URLUpdateStruct; use Ibexa\Contracts\Core\Repository\Values\URL\URLQuery; use Ibexa\Core\Base\Exceptions\NotFoundException; @@ -72,7 +73,7 @@ public function find(URLQuery $query) /** * {@inheritdoc} */ - public function loadById($id) + public function loadById($id): URL { $url = $this->urlMapper->extractURLsFromRows( $this->urlGateway->loadUrlData($id) @@ -88,7 +89,7 @@ public function loadById($id) /** * {@inheritdoc} */ - public function loadByUrl($url) + public function loadByUrl($url): URL { $urls = $this->urlMapper->extractURLsFromRows( $this->urlGateway->loadUrlDataByUrl($url) diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAnd.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAnd.php index a1f2116147..909d43d71c 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAnd.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAnd.php @@ -17,7 +17,7 @@ class LogicalAnd implements CriterionHandler /** * {@inheritdoc} */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\LogicalAnd; } diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNot.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNot.php index 8a9b00fcb3..88cde42903 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNot.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNot.php @@ -17,7 +17,7 @@ class LogicalNot implements CriterionHandler /** * {@inheritdoc} */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\LogicalNot; } @@ -31,7 +31,7 @@ public function handle( CriteriaConverter $converter, QueryBuilder $queryBuilder, Criterion $criterion - ) { + ): string { return sprintf( 'NOT (%s)', $converter->convertCriteria($queryBuilder, $criterion->criteria[0]) diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOr.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOr.php index df8e069d0b..43195a1b9b 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOr.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOr.php @@ -17,7 +17,7 @@ class LogicalOr implements CriterionHandler /** * {@inheritdoc} */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\LogicalOr; } diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAll.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAll.php index aa505fd3ac..2817c5b7d0 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAll.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAll.php @@ -17,7 +17,7 @@ class MatchAll implements CriterionHandler /** * {@inheritdoc} */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\MatchAll; } @@ -29,7 +29,7 @@ public function handle( CriteriaConverter $converter, QueryBuilder $queryBuilder, Criterion $criterion - ) { + ): string { return '1 = 1'; } } diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNone.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNone.php index bd2d5ceecd..8ca474ba70 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNone.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNone.php @@ -17,7 +17,7 @@ class MatchNone implements CriterionHandler /** * {@inheritdoc} */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\MatchNone; } @@ -29,7 +29,7 @@ public function handle( CriteriaConverter $converter, QueryBuilder $queryBuilder, Criterion $criterion - ) { + ): string { return '1 = 0'; } } diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Pattern.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Pattern.php index dc187cb0bf..dbcfc24800 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Pattern.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Pattern.php @@ -18,7 +18,7 @@ class Pattern implements CriterionHandler /** * {@inheritdoc} */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\Pattern; } diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Validity.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Validity.php index e53adbf0d0..bbcf04b25d 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Validity.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Validity.php @@ -18,7 +18,7 @@ class Validity implements CriterionHandler /** * {@inheritdoc} */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\Validity; } diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnly.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnly.php index f2fe945515..3b75f458d3 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnly.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnly.php @@ -18,7 +18,7 @@ class VisibleOnly extends Base /** * {@inheritdoc} */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\VisibleOnly; } diff --git a/src/lib/Persistence/Legacy/User/Mapper.php b/src/lib/Persistence/Legacy/User/Mapper.php index 80bf198616..b18eb8b478 100644 --- a/src/lib/Persistence/Legacy/User/Mapper.php +++ b/src/lib/Persistence/Legacy/User/Mapper.php @@ -64,7 +64,7 @@ public function mapUsers(array $data) * * @return \Ibexa\Contracts\Core\Persistence\User\Policy[] */ - public function mapPolicies(array $data) + public function mapPolicies(array $data): array { /** @var \Ibexa\Contracts\Core\Persistence\User\Policy[] */ $policies = []; diff --git a/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php index 7ffcd7bf3e..4943584224 100644 --- a/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php @@ -721,7 +721,7 @@ private function getAncestorLocationIdsForUser(int $userId): array $nodeIds = array_unique( array_reduce( array_map( - static function ($pathString) { + static function ($pathString): array { return array_filter(explode('/', $pathString)); }, $paths diff --git a/src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php b/src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php index 218b1e4da2..3222ddab15 100644 --- a/src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php +++ b/src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php @@ -98,7 +98,7 @@ public function parseString($string) $tokens = array_filter( $tokens, - static function ($token) { + static function ($token): bool { return !($token['type'] === TransformationProcessor::T_WHITESPACE || $token['type'] === TransformationProcessor::T_COMMENT); } diff --git a/src/lib/Persistence/TransformationProcessor/PcreCompiler.php b/src/lib/Persistence/TransformationProcessor/PcreCompiler.php index 32ad9a1af7..bcbcb98462 100644 --- a/src/lib/Persistence/TransformationProcessor/PcreCompiler.php +++ b/src/lib/Persistence/TransformationProcessor/PcreCompiler.php @@ -172,7 +172,7 @@ protected function compileTransposeModulo(array $rule) * * @return string */ - protected function getModuloCharRange($start, $end, $modulo) + protected function getModuloCharRange($start, $end, $modulo): string { $start = $this->converter->toUnicodeCodepoint($start); $end = $this->converter->toUnicodeCodepoint($end); @@ -219,7 +219,7 @@ protected function compileTargetCharacter($char) { switch (true) { case $char === 'remove': - return static function ($matches) { + return static function ($matches): string { return ''; }; diff --git a/src/lib/Persistence/Utf8Converter.php b/src/lib/Persistence/Utf8Converter.php index a9b6501a98..2317eca3a3 100644 --- a/src/lib/Persistence/Utf8Converter.php +++ b/src/lib/Persistence/Utf8Converter.php @@ -24,7 +24,7 @@ class Utf8Converter * * @return string */ - public static function toUTF8Character($charCode) + public static function toUTF8Character($charCode): string { switch ($charCode) { case 0: diff --git a/src/lib/Repository/Mapper/ContentDomainMapper.php b/src/lib/Repository/Mapper/ContentDomainMapper.php index eacc212226..6d107ed211 100644 --- a/src/lib/Repository/Mapper/ContentDomainMapper.php +++ b/src/lib/Repository/Mapper/ContentDomainMapper.php @@ -780,7 +780,7 @@ public function buildSPILocationCreateStruct( * * @return bool */ - public function isValidLocationSortField($sortField) + public function isValidLocationSortField($sortField): bool { switch ($sortField) { case APILocation::SORT_FIELD_PATH: @@ -808,7 +808,7 @@ public function isValidLocationSortField($sortField) * * @return bool */ - public function isValidLocationSortOrder($sortOrder) + public function isValidLocationSortOrder($sortOrder): bool { switch ($sortOrder) { case APILocation::SORT_ORDER_DESC: @@ -826,7 +826,7 @@ public function isValidLocationSortOrder($sortOrder) * * @return bool */ - public function isValidLocationPriority($priority) + public function isValidLocationPriority($priority): bool { if ($priority === null) { return true; @@ -885,7 +885,7 @@ public function getDateTime($timestamp) * * @return string */ - public function getUniqueHash($object) + public function getUniqueHash($object): string { return md5(uniqid(get_class($object), true)); } diff --git a/src/lib/Repository/Permission/PermissionResolver.php b/src/lib/Repository/Permission/PermissionResolver.php index 54e579e3ba..42204df748 100644 --- a/src/lib/Repository/Permission/PermissionResolver.php +++ b/src/lib/Repository/Permission/PermissionResolver.php @@ -306,7 +306,7 @@ public function lookupLimitations( $possibleLimitations[] = $limitation; } - $limitationFilter = static function (Limitation $limitation) use ($limitationsIdentifiers) { + $limitationFilter = static function (Limitation $limitation) use ($limitationsIdentifiers): bool { return \in_array($limitation->getIdentifier(), $limitationsIdentifiers, true); }; @@ -448,7 +448,7 @@ private function prepareTargetsForType(?array $targets, LimitationType $type): ? // BC: for TargetAware Limitations return only instances of Target, for others return only non-Target instances $targets = array_filter( $targets, - static function ($target) use ($isTargetAware) { + static function ($target) use ($isTargetAware): bool { $isTarget = $target instanceof Target; return $isTargetAware ? $isTarget : !$isTarget; diff --git a/src/lib/Repository/PermissionsCriterionHandler.php b/src/lib/Repository/PermissionsCriterionHandler.php index 819917cf66..0c495db131 100644 --- a/src/lib/Repository/PermissionsCriterionHandler.php +++ b/src/lib/Repository/PermissionsCriterionHandler.php @@ -25,7 +25,7 @@ class PermissionsCriterionHandler extends PermissionCriterionResolver * * @return bool */ - public function addPermissionsCriterion(Criterion &$criterion) + public function addPermissionsCriterion(Criterion &$criterion): bool { $permissionCriterion = $this->getPermissionsCriterion(); if ($permissionCriterion === true || $permissionCriterion === false) { diff --git a/src/lib/Repository/TrashService.php b/src/lib/Repository/TrashService.php index 528eac9cad..02ce266f3f 100644 --- a/src/lib/Repository/TrashService.php +++ b/src/lib/Repository/TrashService.php @@ -406,7 +406,7 @@ protected function getDateTime($timestamp) * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ - private function userHasPermissionsToRemove(ContentInfo $contentInfo, Location $location) + private function userHasPermissionsToRemove(ContentInfo $contentInfo, Location $location): bool { $versionInfo = $this->persistenceHandler->contentHandler()->loadVersionInfo( $contentInfo->id, diff --git a/src/lib/Repository/URLAliasService.php b/src/lib/Repository/URLAliasService.php index 350af54bb3..cf09650b4e 100644 --- a/src/lib/Repository/URLAliasService.php +++ b/src/lib/Repository/URLAliasService.php @@ -487,7 +487,7 @@ protected function isUrlAliasLoadable( ?string $languageCode, bool $showAllTranslations, array $prioritizedLanguageList - ) { + ): bool { if (isset($languageCode) && !in_array($languageCode, $spiUrlAlias->languageCodes)) { return false; } @@ -521,7 +521,7 @@ protected function isUrlAliasLoadable( * * @return bool */ - protected function isPathLoadable(array $pathData, array $languageCodes) + protected function isPathLoadable(array $pathData, array $languageCodes): bool { if ($this->languageResolver->getShowAllTranslations()) { return true; diff --git a/src/lib/Repository/UserService.php b/src/lib/Repository/UserService.php index 1903d15215..091ee4df0c 100644 --- a/src/lib/Repository/UserService.php +++ b/src/lib/Repository/UserService.php @@ -1382,7 +1382,7 @@ private function comparePasswordHashes( * * @return bool */ - private function isUserProfileUpdateRequested(UserUpdateStruct $userUpdateStruct) + private function isUserProfileUpdateRequested(UserUpdateStruct $userUpdateStruct): bool { return !empty($userUpdateStruct->contentUpdateStruct) || diff --git a/src/lib/Repository/Values/ContentType/FieldDefinitionCollection.php b/src/lib/Repository/Values/ContentType/FieldDefinitionCollection.php index f2bbdecd96..38c76a59c0 100644 --- a/src/lib/Repository/Values/ContentType/FieldDefinitionCollection.php +++ b/src/lib/Repository/Values/ContentType/FieldDefinitionCollection.php @@ -161,14 +161,14 @@ public function toArray(): array private function getIsTypePredicate(string $fieldTypeIdentifier): Closure { - return static function (FieldDefinition $fieldDefinition) use ($fieldTypeIdentifier) { + return static function (FieldDefinition $fieldDefinition) use ($fieldTypeIdentifier): bool { return $fieldDefinition->getFieldTypeIdentifier() === $fieldTypeIdentifier; }; } private function getInGroupPredicate(string $fieldGroup): Closure { - return static function (FieldDefinition $fieldDefinition) use ($fieldGroup) { + return static function (FieldDefinition $fieldDefinition) use ($fieldGroup): bool { return $fieldDefinition->fieldGroup === $fieldGroup; }; } diff --git a/src/lib/Search/Common/FieldNameGenerator.php b/src/lib/Search/Common/FieldNameGenerator.php index 7c343ff9b5..696c646096 100644 --- a/src/lib/Search/Common/FieldNameGenerator.php +++ b/src/lib/Search/Common/FieldNameGenerator.php @@ -54,7 +54,7 @@ public function __construct(array $fieldNameMapping) * * @return string */ - public function getName($name, $field = null, $type = null) + public function getName($name, $field = null, $type = null): string { return implode('_', array_filter([$type, $field, $name])); } diff --git a/src/lib/Search/Common/FieldNameResolver.php b/src/lib/Search/Common/FieldNameResolver.php index 890df87213..e1c7847048 100644 --- a/src/lib/Search/Common/FieldNameResolver.php +++ b/src/lib/Search/Common/FieldNameResolver.php @@ -106,7 +106,7 @@ public function getFieldNames( $fieldDefinitionIdentifier, $fieldTypeIdentifier = null, $name = null - ) { + ): array { $fieldTypeNameMap = $this->getFieldTypes($criterion, $fieldDefinitionIdentifier, $fieldTypeIdentifier, $name); return array_keys($fieldTypeNameMap); diff --git a/src/lib/Search/Common/FieldValueMapper/BooleanMapper.php b/src/lib/Search/Common/FieldValueMapper/BooleanMapper.php index 9fb8c0f9db..2f46d1d0ae 100644 --- a/src/lib/Search/Common/FieldValueMapper/BooleanMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/BooleanMapper.php @@ -21,7 +21,7 @@ public function canMap(Field $field): bool return $field->getType() instanceof BooleanField; } - public function map(Field $field) + public function map(Field $field): bool { return (bool)$field->getValue(); } diff --git a/src/lib/Search/Common/FieldValueMapper/DateMapper.php b/src/lib/Search/Common/FieldValueMapper/DateMapper.php index ca8aa1288c..b6b64fe006 100644 --- a/src/lib/Search/Common/FieldValueMapper/DateMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/DateMapper.php @@ -24,7 +24,7 @@ public function canMap(Field $field): bool return $field->getType() instanceof DateField; } - public function map(Field $field) + public function map(Field $field): string { $value = $field->getValue(); if (is_numeric($value)) { diff --git a/src/lib/Search/Common/FieldValueMapper/FloatMapper.php b/src/lib/Search/Common/FieldValueMapper/FloatMapper.php index 7662d5f307..d2ae206559 100644 --- a/src/lib/Search/Common/FieldValueMapper/FloatMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/FloatMapper.php @@ -21,7 +21,7 @@ public function canMap(Field $field): bool return $field->getType() instanceof FloatField; } - public function map(Field $field) + public function map(Field $field): string { return sprintf('%F', (float)$field->getValue()); } diff --git a/src/lib/Search/Common/FieldValueMapper/GeoLocationMapper.php b/src/lib/Search/Common/FieldValueMapper/GeoLocationMapper.php index df7c97c5d0..563e47f65d 100644 --- a/src/lib/Search/Common/FieldValueMapper/GeoLocationMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/GeoLocationMapper.php @@ -21,7 +21,7 @@ public function canMap(Field $field): bool return $field->getType() instanceof GeoLocationField; } - public function map(Field $field) + public function map(Field $field): ?string { $value = $field->getValue(); if ($value['latitude'] === null || $value['longitude'] === null) { diff --git a/src/lib/Search/Common/FieldValueMapper/PriceMapper.php b/src/lib/Search/Common/FieldValueMapper/PriceMapper.php index f8329a02c1..03610394f1 100644 --- a/src/lib/Search/Common/FieldValueMapper/PriceMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/PriceMapper.php @@ -23,12 +23,8 @@ public function canMap(Field $field): bool /** * Map field value to a proper search engine representation. - * - * @param \Ibexa\Contracts\Core\Search\Field $field - * - * @return mixed */ - public function map(Field $field) + public function map(Field $field): float { return (float)$field->getValue(); } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentId.php index 65b252d5cb..c8fae82af7 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentId.php @@ -25,7 +25,7 @@ class ContentId extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\ContentId; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeGroupId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeGroupId.php index 996f6f9c47..02547bfca3 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeGroupId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeGroupId.php @@ -25,7 +25,7 @@ class ContentTypeGroupId extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\ContentTypeGroupId; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeId.php index 33efd29d9f..52e80800aa 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeId.php @@ -25,7 +25,7 @@ class ContentTypeId extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\ContentTypeId; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php index 0051611645..77d83b24ec 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php @@ -52,7 +52,7 @@ public function __construct( * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\ContentTypeIdentifier; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/DateMetadata.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/DateMetadata.php index 6e7c93dfe7..6043125359 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/DateMetadata.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/DateMetadata.php @@ -27,7 +27,7 @@ class DateMetadata extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\DateMetadata; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php index 05c915f855..1e3552950c 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php @@ -67,7 +67,7 @@ public function __construct( * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\Field; } @@ -131,7 +131,7 @@ public function handle( QueryBuilder $queryBuilder, Criterion $criterion, array $languageSettings - ) { + ): string { $fieldsInformation = $this->getFieldsInformation($criterion->target); $subSelect = $this->connection->createQueryBuilder(); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php index a71974bd22..21a37a69ff 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php @@ -102,7 +102,7 @@ public function handle( QueryBuilder $queryBuilder, Criterion $criterion, array $languageSettings - ) { + ): string { $fieldsInformation = $this->getFieldsInformation($criterion->target); $subSelect = $this->connection->createQueryBuilder(); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php index 404cc9653d..3b798c252b 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php @@ -37,7 +37,7 @@ class FieldRelation extends FieldBase * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\FieldRelation; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/HandlerRegistry.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/HandlerRegistry.php index e471b5d211..7128991443 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/HandlerRegistry.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/HandlerRegistry.php @@ -71,7 +71,7 @@ public function get($fieldTypeIdentifier) * * @return bool */ - public function has($fieldTypeIdentifier) + public function has($fieldTypeIdentifier): bool { return isset($this->map[$fieldTypeIdentifier]); } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php index 4926b0cc98..6fdb81452d 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php @@ -121,7 +121,7 @@ public function __construct( * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\FullText; } @@ -129,13 +129,13 @@ public function accept(Criterion $criterion) /** * Tokenize String. * - * @param string $string - * - * @return array + * @return array */ - protected function tokenizeString($string) + protected function tokenizeString(string $string): array { - return preg_split('/[^\w|*]/u', $string, -1, PREG_SPLIT_NO_EMPTY); + $tokens = preg_split('/[^\w|*]/u', $string, -1, PREG_SPLIT_NO_EMPTY); + + return false !== $tokens ? $tokens : []; } /** diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php index b9e258d8cd..aaf4b82ca4 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php @@ -36,7 +36,7 @@ public function __construct(Connection $connection, MaskGenerator $maskGenerator * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\LanguageCode; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php index 4ae0cce95e..cbab0be9cd 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php @@ -24,7 +24,7 @@ class LogicalAnd extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\LogicalAnd; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalNot.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalNot.php index 1d2d8fdb5c..74ec2dc92e 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalNot.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalNot.php @@ -24,7 +24,7 @@ class LogicalNot extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\LogicalNot; } @@ -34,7 +34,7 @@ public function handle( QueryBuilder $queryBuilder, Criterion $criterion, array $languageSettings - ) { + ): string { return sprintf( 'NOT (%s)', $converter->convertCriteria($queryBuilder, $criterion->criteria[0], $languageSettings) diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php index f6843d763a..dad5e7baac 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php @@ -24,7 +24,7 @@ class LogicalOr extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\LogicalOr; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php index 878ba9529a..9b9db1d121 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php @@ -37,7 +37,7 @@ class MapLocationDistance extends FieldBase * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\MapLocationDistance; } @@ -80,7 +80,7 @@ protected function getFieldDefinitionIds($fieldIdentifier) return $fieldDefinitionIdList; } - protected function kilometersToDegrees($kilometers) + protected function kilometersToDegrees($kilometers): float { return $kilometers / self::DEGREE_KM; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchAll.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchAll.php index 4a34903931..81b826e920 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchAll.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchAll.php @@ -24,7 +24,7 @@ class MatchAll extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\MatchAll; } @@ -34,7 +34,7 @@ public function handle( QueryBuilder $queryBuilder, Criterion $criterion, array $languageSettings - ) { + ): string { return '1 = 1'; } } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchNone.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchNone.php index 398724a21e..2b0e08ec4e 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchNone.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchNone.php @@ -24,7 +24,7 @@ class MatchNone extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\MatchNone; } @@ -34,7 +34,7 @@ public function handle( QueryBuilder $queryBuilder, Criterion $criterion, array $languageSettings - ) { + ): string { return '1 = 0'; } } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateId.php index b4b179bb04..58e5962b87 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateId.php @@ -25,7 +25,7 @@ class ObjectStateId extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\ObjectStateId; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/RemoteId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/RemoteId.php index 9adb3e879f..dc65edc995 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/RemoteId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/RemoteId.php @@ -25,7 +25,7 @@ class RemoteId extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\RemoteId; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionId.php index 3478fa7867..240875851c 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionId.php @@ -25,7 +25,7 @@ class SectionId extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\SectionId; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserMetadata.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserMetadata.php index 70c1390471..c03328c58d 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserMetadata.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserMetadata.php @@ -28,7 +28,7 @@ class UserMetadata extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\UserMetadata; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentId.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentId.php index 67710f2c2e..da57c5fb4a 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentId.php @@ -23,7 +23,7 @@ class ContentId extends SortClauseHandler * * @return bool */ - public function accept(SortClause $sortClause) + public function accept(SortClause $sortClause): bool { return $sortClause instanceof SortClause\ContentId; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentName.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentName.php index 538c4b3747..74d4743a75 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentName.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentName.php @@ -23,7 +23,7 @@ class ContentName extends SortClauseHandler * * @return bool */ - public function accept(SortClause $sortClause) + public function accept(SortClause $sortClause): bool { return $sortClause instanceof SortClause\ContentName; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DateModified.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DateModified.php index 6242b440e9..cb0c89a033 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DateModified.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DateModified.php @@ -23,7 +23,7 @@ class DateModified extends SortClauseHandler * * @return bool */ - public function accept(SortClause $sortClause) + public function accept(SortClause $sortClause): bool { return $sortClause instanceof SortClause\DateModified; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DatePublished.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DatePublished.php index ad3c11de0b..b10506094e 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DatePublished.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DatePublished.php @@ -23,7 +23,7 @@ class DatePublished extends SortClauseHandler * * @return bool */ - public function accept(SortClause $sortClause) + public function accept(SortClause $sortClause): bool { return $sortClause instanceof SortClause\DatePublished; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php index 5c333ed05b..700fe0536d 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php @@ -25,7 +25,7 @@ class MapLocationDistance extends Field * * @return bool */ - public function accept(SortClause $sortClause) + public function accept(SortClause $sortClause): bool { return $sortClause instanceof SortClause\MapLocationDistance; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionIdentifier.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionIdentifier.php index 497a7715ba..e645d88680 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionIdentifier.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionIdentifier.php @@ -23,7 +23,7 @@ class SectionIdentifier extends SortClauseHandler * * @return bool */ - public function accept(SortClause $sortClause) + public function accept(SortClause $sortClause): bool { return $sortClause instanceof SortClause\SectionIdentifier; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php index 5f0ccdcd07..dae4c01b63 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php @@ -23,7 +23,7 @@ class SectionName extends SortClauseHandler * * @return bool */ - public function accept(SortClause $sortClause) + public function accept(SortClause $sortClause): bool { return $sortClause instanceof SortClause\SectionName; } diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php index e108d9242e..4ebbb3ece3 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php @@ -24,7 +24,7 @@ class Ancestor extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\Ancestor; } diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationId.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationId.php index 7ec9f70a6c..650d1f05e6 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationId.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationId.php @@ -25,7 +25,7 @@ class LocationId extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\LocationId; } diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationRemoteId.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationRemoteId.php index 26234bace3..5fa2e4807d 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationRemoteId.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationRemoteId.php @@ -25,7 +25,7 @@ class LocationRemoteId extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\LocationRemoteId; } diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/ParentLocationId.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/ParentLocationId.php index 09d97032a1..601ed99448 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/ParentLocationId.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/ParentLocationId.php @@ -25,7 +25,7 @@ class ParentLocationId extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\ParentLocationId; } diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php index 0c38ba0e9c..8831758130 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php @@ -26,7 +26,7 @@ class PermissionSubtree extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof PermissionSubtreeCriterion; } diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php index c3e0ff1b88..a9bf894204 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php @@ -25,7 +25,7 @@ class Subtree extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\Subtree; } diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php index c5b00c9a80..38df55345b 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php @@ -25,7 +25,7 @@ class Visibility extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\Visibility; } diff --git a/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php b/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php index 06c69651c4..36795787d7 100644 --- a/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php +++ b/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php @@ -105,7 +105,7 @@ public function find( * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ - private function getLanguageMask(array $languageSettings) + private function getLanguageMask(array $languageSettings): int { $mask = 0; if ($languageSettings['useAlwaysAvailable']) { @@ -173,7 +173,7 @@ private function getQueryCondition( * * @return int */ - private function getResultCount(Criterion $filter, array $languageFilter) + private function getResultCount(Criterion $filter, array $languageFilter): int { $query = $this->connection->createQueryBuilder(); diff --git a/src/lib/Search/Legacy/Content/Indexer.php b/src/lib/Search/Legacy/Content/Indexer.php index 42c47bd203..51d013a7de 100644 --- a/src/lib/Search/Legacy/Content/Indexer.php +++ b/src/lib/Search/Legacy/Content/Indexer.php @@ -27,7 +27,7 @@ public function __construct( parent::__construct($logger, $persistenceHandler, $connection, $searchHandler); } - public function getName() + public function getName(): string { return 'Ibexa Legacy (SQL) Search Engine'; } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php index 048ae7152a..1414e5d66a 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php @@ -25,7 +25,7 @@ class Ancestor extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\Ancestor; } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php index b1736066f2..8b916642d3 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php @@ -26,7 +26,7 @@ class Depth extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\Location\Depth; } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsMainLocation.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsMainLocation.php index 1bc1d14497..eb8df8ef18 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsMainLocation.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsMainLocation.php @@ -25,7 +25,7 @@ class IsMainLocation extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\Location\IsMainLocation; } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php index 1e6727cbd6..7105498bee 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php @@ -26,7 +26,7 @@ class Priority extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\Location\Priority; } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationId.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationId.php index f42581094b..ced1e322d8 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationId.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationId.php @@ -25,7 +25,7 @@ class LocationId extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\LocationId; } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationRemoteId.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationRemoteId.php index 580b403d07..8ea97ca833 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationRemoteId.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationRemoteId.php @@ -25,7 +25,7 @@ class LocationRemoteId extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\LocationRemoteId; } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/ParentLocationId.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/ParentLocationId.php index 49afc170d7..f3ef44ee92 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/ParentLocationId.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/ParentLocationId.php @@ -25,7 +25,7 @@ class ParentLocationId extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\ParentLocationId; } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php index 74c444e5d3..0947a19c81 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php @@ -42,7 +42,7 @@ public function handle( * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\Subtree; } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Visibility.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Visibility.php index d5fa065a09..d8fe2ce645 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Visibility.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Visibility.php @@ -26,7 +26,7 @@ class Visibility extends CriterionHandler * * @return bool */ - public function accept(Criterion $criterion) + public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\Visibility; } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Depth.php b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Depth.php index f6b743dd54..ea61b1b653 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Depth.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Depth.php @@ -23,7 +23,7 @@ class Depth extends SortClauseHandler * * @return bool */ - public function accept(SortClause $sortClause) + public function accept(SortClause $sortClause): bool { return $sortClause instanceof SortClause\Location\Depth; } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Id.php b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Id.php index e663e12ae4..0923489194 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Id.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Id.php @@ -23,7 +23,7 @@ class Id extends SortClauseHandler * * @return bool */ - public function accept(SortClause $sortClause) + public function accept(SortClause $sortClause): bool { return $sortClause instanceof SortClause\Location\Id; } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/IsMainLocation.php b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/IsMainLocation.php index a62299fdb4..f669210fc6 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/IsMainLocation.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/IsMainLocation.php @@ -23,7 +23,7 @@ class IsMainLocation extends SortClauseHandler * * @return bool */ - public function accept(SortClause $sortClause) + public function accept(SortClause $sortClause): bool { return $sortClause instanceof SortClause\Location\IsMainLocation; } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Path.php b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Path.php index 9f9dab3ed2..b3742a79fa 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Path.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Path.php @@ -23,7 +23,7 @@ class Path extends SortClauseHandler * * @return bool */ - public function accept(SortClause $sortClause) + public function accept(SortClause $sortClause): bool { return $sortClause instanceof SortClause\Location\Path; } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Priority.php b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Priority.php index 5e12144add..2998e5e558 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Priority.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Priority.php @@ -23,7 +23,7 @@ class Priority extends SortClauseHandler * * @return bool */ - public function accept(SortClause $sortClause) + public function accept(SortClause $sortClause): bool { return $sortClause instanceof SortClause\Location\Priority; } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Visibility.php b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Visibility.php index 720d7c56c4..8a5936b908 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Visibility.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Visibility.php @@ -23,7 +23,7 @@ class Visibility extends SortClauseHandler * * @return bool */ - public function accept(SortClause $sortClause) + public function accept(SortClause $sortClause): bool { return $sortClause instanceof SortClause\Location\Visibility; } diff --git a/src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php b/src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php index 4a1e93ef6a..c3c75d702f 100644 --- a/src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php +++ b/src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php @@ -125,7 +125,7 @@ private function extractFullTextField( $fieldType = $this->fieldRegistry->getType($field->type); $fullTextFields = array_filter( $fieldType->getIndexData($field, $fieldDefinition), - static function ($indexField) { + static function ($indexField): bool { return $indexField->type instanceof FieldType\FullTextField; } ); diff --git a/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php b/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php index 348572fc21..729388af3e 100644 --- a/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php +++ b/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php @@ -196,7 +196,7 @@ public function bulkIndex(array $fullTextBulkData) * * @return bool */ - public function remove($contentId, $versionId = null) + public function remove($contentId, $versionId = null): bool { $doDelete = false; $this->connection->beginTransaction(); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPassTest.php index 53c50adf4d..89ccd8aff1 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPassTest.php @@ -35,12 +35,7 @@ public function testTranslationCollector( $this->assertContainerBuilderHasParameter('available_translations', $availableTranslations); } - /** - * @param $path - * - * @return mixed - */ - private function normalizePath($path) + private function normalizePath(string $path): string { return str_replace('/', \DIRECTORY_SEPARATOR, $path); } diff --git a/tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php b/tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php index 3ca1386b0b..912da421af 100644 --- a/tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php +++ b/tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php @@ -930,7 +930,7 @@ final public function disableCheckExceptionOnInvalidReferenceBehaviorPass(): voi $compilerPassConfig->setAfterRemovingPasses( array_filter( $compilerPassConfig->getAfterRemovingPasses(), - static function (CompilerPassInterface $pass) { + static function (CompilerPassInterface $pass): bool { return !($pass instanceof CheckExceptionOnInvalidReferenceBehaviorPass); } ) diff --git a/tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryType/TestQueryType.php b/tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryType/TestQueryType.php index 04df38a82d..2306477800 100644 --- a/tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryType/TestQueryType.php +++ b/tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryType/TestQueryType.php @@ -19,7 +19,7 @@ public function getSupportedParameters() { } - public static function getName() + public static function getName(): string { return 'Test:Test'; } diff --git a/tests/bundle/Core/EventListener/ExceptionListenerTest.php b/tests/bundle/Core/EventListener/ExceptionListenerTest.php index d0edc08889..d84680b4e6 100644 --- a/tests/bundle/Core/EventListener/ExceptionListenerTest.php +++ b/tests/bundle/Core/EventListener/ExceptionListenerTest.php @@ -69,7 +69,7 @@ private function generateExceptionEvent(Exception $exception) return new ExceptionEvent( $this->createMock(HttpKernelInterface::class), new Request(), - HttpKernelInterface::MASTER_REQUEST, + HttpKernelInterface::MAIN_REQUEST, $exception ); } diff --git a/tests/bundle/Core/EventListener/IndexRequestListenerTest.php b/tests/bundle/Core/EventListener/IndexRequestListenerTest.php index 191710276a..854bcc1947 100644 --- a/tests/bundle/Core/EventListener/IndexRequestListenerTest.php +++ b/tests/bundle/Core/EventListener/IndexRequestListenerTest.php @@ -49,7 +49,7 @@ protected function setUp(): void $this->event = new RequestEvent( $this->httpKernel, $this->request, - HttpKernelInterface::MASTER_REQUEST + HttpKernelInterface::MAIN_REQUEST ); } diff --git a/tests/bundle/Core/EventListener/LocaleListenerTest.php b/tests/bundle/Core/EventListener/LocaleListenerTest.php index 15a685c36b..a54dd44da1 100644 --- a/tests/bundle/Core/EventListener/LocaleListenerTest.php +++ b/tests/bundle/Core/EventListener/LocaleListenerTest.php @@ -71,7 +71,7 @@ public function testOnKernelRequest(array $configuredLanguages, array $converted new RequestEvent( $this->createMock(HttpKernelInterface::class), $request, - HttpKernelInterface::MASTER_REQUEST + HttpKernelInterface::MAIN_REQUEST ) ); self::assertSame($expectedLocale, $request->attributes->get('_locale')); diff --git a/tests/bundle/Core/EventListener/OriginalRequestListenerTest.php b/tests/bundle/Core/EventListener/OriginalRequestListenerTest.php index 808c9f37cb..049931a944 100644 --- a/tests/bundle/Core/EventListener/OriginalRequestListenerTest.php +++ b/tests/bundle/Core/EventListener/OriginalRequestListenerTest.php @@ -47,7 +47,7 @@ public function testOnKernelRequestNoOriginalRequest() $event = new RequestEvent( $this->createMock(HttpKernelInterface::class), $request, - HttpKernelInterface::MASTER_REQUEST + HttpKernelInterface::MAIN_REQUEST ); $listener = new OriginalRequestListener(); @@ -75,7 +75,7 @@ public function testOnKernelRequestWithOriginalRequest() $event = new RequestEvent( $this->createMock(HttpKernelInterface::class), $request, - HttpKernelInterface::MASTER_REQUEST + HttpKernelInterface::MAIN_REQUEST ); $listener = new OriginalRequestListener(); diff --git a/tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php b/tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php index 394da78c70..a3e50db59a 100644 --- a/tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php +++ b/tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php @@ -54,7 +54,7 @@ public function testOnKernelRequest(Request $request): void $event = new RequestEvent( $this->httpKernel, $request, - HttpKernelInterface::MASTER_REQUEST + HttpKernelInterface::MAIN_REQUEST ); $this->eventListener->onKernelRequest($event); @@ -70,7 +70,7 @@ public function testOnKernelRequestThrowsException(Request $request): void $event = new RequestEvent( $this->httpKernel, $request, - HttpKernelInterface::MASTER_REQUEST + HttpKernelInterface::MAIN_REQUEST ); $this->eventListener->onKernelRequest($event); @@ -82,7 +82,7 @@ public function validRequestDataProvider(): array [ Request::create( 'https://example.com', - 'GET', + Request::METHOD_GET, [], [], [], @@ -95,7 +95,7 @@ public function validRequestDataProvider(): array [ Request::create( 'https://example.com/', - 'GET', + Request::METHOD_GET, [], [], [], @@ -108,7 +108,7 @@ public function validRequestDataProvider(): array [ Request::create( 'https://example.com/admin/dashboard', - 'GET', + Request::METHOD_GET, [], [], [], @@ -121,7 +121,7 @@ public function validRequestDataProvider(): array [ Request::create( 'https://example.com/admin/dashboard/', - 'GET', + Request::METHOD_GET, [], [], [], @@ -134,7 +134,7 @@ public function validRequestDataProvider(): array [ Request::create( 'https://example.com/Folder/Content', - 'GET', + Request::METHOD_GET, [], [], [], @@ -147,7 +147,7 @@ public function validRequestDataProvider(): array [ Request::create( 'https://example.com/Folder/Content/', - 'GET', + Request::METHOD_GET, [], [], [], @@ -160,7 +160,7 @@ public function validRequestDataProvider(): array [ Request::create( 'https://example.com/app.php-foo', - 'GET', + Request::METHOD_GET, [], [], [], @@ -173,7 +173,7 @@ public function validRequestDataProvider(): array [ Request::create( 'https://example.com/app.php.foo', - 'GET', + Request::METHOD_GET, [], [], [], @@ -186,7 +186,7 @@ public function validRequestDataProvider(): array [ Request::create( 'https://example.com/folder/folder/app.php', - 'GET', + Request::METHOD_GET, [], [], [], @@ -205,7 +205,7 @@ public function prohibitedRequestDataProvider(): array [ Request::create( 'https://example.com/app.php', - 'GET', + Request::METHOD_GET, [], [], [], @@ -218,7 +218,7 @@ public function prohibitedRequestDataProvider(): array [ Request::create( 'https://example.com/app.php/app.php', - 'GET', + Request::METHOD_GET, [], [], [], @@ -231,7 +231,7 @@ public function prohibitedRequestDataProvider(): array [ Request::create( 'https://example.com/folder/app.php', - 'GET', + Request::METHOD_GET, [], [], [], @@ -244,7 +244,7 @@ public function prohibitedRequestDataProvider(): array [ Request::create( 'https://example.com/app.php/foo', - 'GET', + Request::METHOD_GET, [], [], [], @@ -257,7 +257,7 @@ public function prohibitedRequestDataProvider(): array [ Request::create( 'https://example.com/app.php?foo=bar', - 'GET', + Request::METHOD_GET, [], [], [], @@ -270,7 +270,7 @@ public function prohibitedRequestDataProvider(): array [ Request::create( 'https://example.com/app.php#foo', - 'GET', + Request::METHOD_GET, [], [], [], diff --git a/tests/bundle/Core/EventListener/RequestEventListenerTest.php b/tests/bundle/Core/EventListener/RequestEventListenerTest.php index 4ea0c55102..f3bbd9d5d7 100644 --- a/tests/bundle/Core/EventListener/RequestEventListenerTest.php +++ b/tests/bundle/Core/EventListener/RequestEventListenerTest.php @@ -63,7 +63,7 @@ protected function setUp(): void $this->event = new RequestEvent( $this->httpKernel, $this->request, - HttpKernelInterface::MASTER_REQUEST + HttpKernelInterface::MAIN_REQUEST ); } @@ -96,13 +96,13 @@ public function testOnKernelRequestForward() $queryParameters = ['some' => 'thing']; $cookieParameters = ['cookie' => 'value']; - $request = Request::create('/test_sa/foo/bar', 'GET', $queryParameters, $cookieParameters); + $request = Request::create('/test_sa/foo/bar', Request::METHOD_GET, $queryParameters, $cookieParameters); $semanticPathinfo = '/foo/something'; $request->attributes->set('semanticPathinfo', $semanticPathinfo); $request->attributes->set('needsForward', true); $request->attributes->set('someAttribute', 'someValue'); - $expectedForwardRequest = Request::create($semanticPathinfo, 'GET', $queryParameters, $cookieParameters); + $expectedForwardRequest = Request::create($semanticPathinfo, Request::METHOD_GET, $queryParameters, $cookieParameters); $expectedForwardRequest->attributes->set('semanticPathinfo', $semanticPathinfo); $expectedForwardRequest->attributes->set('someAttribute', 'someValue'); @@ -113,7 +113,7 @@ public function testOnKernelRequestForward() ->with(self::equalTo($expectedForwardRequest)) ->will(self::returnValue($response)); - $event = new RequestEvent($this->httpKernel, $request, HttpKernelInterface::MASTER_REQUEST); + $event = new RequestEvent($this->httpKernel, $request, HttpKernelInterface::MAIN_REQUEST); $this->requestEventListener->onKernelRequestForward($event); self::assertSame($response, $event->getResponse()); self::assertTrue($event->isPropagationStopped()); @@ -132,13 +132,13 @@ public function testOnKernelRequestRedirect() { $queryParameters = ['some' => 'thing']; $cookieParameters = ['cookie' => 'value']; - $request = Request::create('/test_sa/foo/bar', 'GET', $queryParameters, $cookieParameters); + $request = Request::create('/test_sa/foo/bar', Request::METHOD_GET, $queryParameters, $cookieParameters); $semanticPathinfo = '/foo/something'; $request->attributes->set('semanticPathinfo', $semanticPathinfo); $request->attributes->set('needsRedirect', true); $request->attributes->set('siteaccess', new SiteAccess('test')); - $event = new RequestEvent($this->httpKernel, $request, HttpKernelInterface::MASTER_REQUEST); + $event = new RequestEvent($this->httpKernel, $request, HttpKernelInterface::MAIN_REQUEST); $this->requestEventListener->onKernelRequestRedirect($event); self::assertTrue($event->hasResponse()); /** @var \Symfony\Component\HttpFoundation\RedirectResponse $response */ @@ -153,14 +153,14 @@ public function testOnKernelRequestRedirectWithLocationId() { $queryParameters = ['some' => 'thing']; $cookieParameters = ['cookie' => 'value']; - $request = Request::create('/test_sa/foo/bar', 'GET', $queryParameters, $cookieParameters); + $request = Request::create('/test_sa/foo/bar', Request::METHOD_GET, $queryParameters, $cookieParameters); $semanticPathinfo = '/foo/something'; $request->attributes->set('semanticPathinfo', $semanticPathinfo); $request->attributes->set('needsRedirect', true); $request->attributes->set('locationId', 123); $request->attributes->set('siteaccess', new SiteAccess('test')); - $event = new RequestEvent($this->httpKernel, $request, HttpKernelInterface::MASTER_REQUEST); + $event = new RequestEvent($this->httpKernel, $request, HttpKernelInterface::MAIN_REQUEST); $this->requestEventListener->onKernelRequestRedirect($event); self::assertTrue($event->hasResponse()); /** @var \Symfony\Component\HttpFoundation\RedirectResponse $response */ @@ -180,7 +180,7 @@ public function testOnKernelRequestRedirectPrependSiteaccess() $siteaccess = new SiteAccess('test', 'foo', $siteaccessMatcher); $semanticPathinfo = '/foo/something'; - $request = Request::create('/test_sa/foo/bar', 'GET', $queryParameters, $cookieParameters); + $request = Request::create('/test_sa/foo/bar', Request::METHOD_GET, $queryParameters, $cookieParameters); $request->attributes->set('semanticPathinfo', $semanticPathinfo); $request->attributes->set('needsRedirect', true); $request->attributes->set('siteaccess', $siteaccess); @@ -193,7 +193,7 @@ public function testOnKernelRequestRedirectPrependSiteaccess() ->with($semanticPathinfo) ->will(self::returnValue($expectedURI)); - $event = new RequestEvent($this->httpKernel, $request, HttpKernelInterface::MASTER_REQUEST); + $event = new RequestEvent($this->httpKernel, $request, HttpKernelInterface::MAIN_REQUEST); $this->requestEventListener->onKernelRequestRedirect($event); self::assertTrue($event->hasResponse()); /** @var \Symfony\Component\HttpFoundation\RedirectResponse $response */ diff --git a/tests/bundle/Core/EventListener/RoutingListenerTest.php b/tests/bundle/Core/EventListener/RoutingListenerTest.php index 1da1ca1e28..76663ac22f 100644 --- a/tests/bundle/Core/EventListener/RoutingListenerTest.php +++ b/tests/bundle/Core/EventListener/RoutingListenerTest.php @@ -77,7 +77,7 @@ public function testOnSiteAccessMatch() ->method('setExcludedUriPrefixes') ->with($excludedUriPrefixes); - $event = new PostSiteAccessMatchEvent(new SiteAccess('test'), new Request(), HttpKernelInterface::MASTER_REQUEST); + $event = new PostSiteAccessMatchEvent(new SiteAccess('test'), new Request(), HttpKernelInterface::MAIN_REQUEST); $listener = new RoutingListener($this->configResolver, $this->urlAliasRouter, $this->urlAliasGenerator); $listener->onSiteAccessMatch($event); } diff --git a/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php b/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php index 8c2bb1650d..1be3172bea 100644 --- a/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php +++ b/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php @@ -65,7 +65,7 @@ public function testOnSiteAccessMatchNoSession() ->expects(self::never()) ->method('setOptions'); $listener = new SessionSetDynamicNameListener($this->configResolver, $this->sessionStorageFactory); - $listener->onSiteAccessMatch(new PostSiteAccessMatchEvent(new SiteAccess('test'), $request, HttpKernelInterface::MASTER_REQUEST)); + $listener->onSiteAccessMatch(new PostSiteAccessMatchEvent(new SiteAccess('test'), $request, HttpKernelInterface::MAIN_REQUEST)); } public function testOnSiteAccessMatchSubRequest() diff --git a/tests/bundle/Core/EventListener/SiteAccessListenerTest.php b/tests/bundle/Core/EventListener/SiteAccessListenerTest.php index 3f8aa0ef9f..164d6dbfec 100644 --- a/tests/bundle/Core/EventListener/SiteAccessListenerTest.php +++ b/tests/bundle/Core/EventListener/SiteAccessListenerTest.php @@ -85,7 +85,7 @@ public function testOnSiteAccessMatchMasterRequest( $siteAccess = new SiteAccess('test', 'test', $matcher); $request = Request::create($uri); - $event = new PostSiteAccessMatchEvent($siteAccess, $request, HttpKernelInterface::MASTER_REQUEST); + $event = new PostSiteAccessMatchEvent($siteAccess, $request, HttpKernelInterface::MAIN_REQUEST); $this->listener->onSiteAccessMatch($event); self::assertSame($expectedSemanticPathinfo, $request->attributes->get('semanticPathinfo')); diff --git a/tests/bundle/Core/EventListener/ViewControllerListenerTest.php b/tests/bundle/Core/EventListener/ViewControllerListenerTest.php index cc29ec416c..f9744862d4 100644 --- a/tests/bundle/Core/EventListener/ViewControllerListenerTest.php +++ b/tests/bundle/Core/EventListener/ViewControllerListenerTest.php @@ -198,7 +198,7 @@ protected function createEvent() $this->createMock(HttpKernelInterface::class), static function () {}, $this->request, - HttpKernelInterface::MASTER_REQUEST + HttpKernelInterface::MAIN_REQUEST ); } } diff --git a/tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php b/tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php index e986c9200c..2a6e88ab9a 100644 --- a/tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php +++ b/tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php @@ -23,7 +23,7 @@ public function testSetLocale(Request $request, $shouldHaveCustomLocale) $event = new RequestEvent( $this->getMockBuilder(HttpKernelInterface::class)->getMock(), $request, - HttpKernelInterface::MASTER_REQUEST + HttpKernelInterface::MAIN_REQUEST ); $subscriber = new CrowdinRequestLocaleSubscriber(); diff --git a/tests/bundle/Core/EventSubscriber/TrustedHeaderClientIpEventSubscriberTest.php b/tests/bundle/Core/EventSubscriber/TrustedHeaderClientIpEventSubscriberTest.php index 55446a653d..a934f1fcbf 100644 --- a/tests/bundle/Core/EventSubscriber/TrustedHeaderClientIpEventSubscriberTest.php +++ b/tests/bundle/Core/EventSubscriber/TrustedHeaderClientIpEventSubscriberTest.php @@ -120,7 +120,7 @@ public function testTrustedHeaderEventSubscriberWithoutTrustedProxy(): void new TrustedHeaderClientIpEventSubscriber('X-Custom-Header') ); - $request = Request::create('/', 'GET', [], [], [], array_merge( + $request = Request::create('/', Request::METHOD_GET, [], [], [], array_merge( $_SERVER, ['PLATFORM_RELATIONSHIPS' => true], )); @@ -158,7 +158,7 @@ public function testTrustedHeaderEventSubscriberWithTrustedProxy( new TrustedHeaderClientIpEventSubscriber($trustedHeaderName) ); - $request = Request::create('/', 'GET', [], [], [], array_merge( + $request = Request::create('/', Request::METHOD_GET, [], [], [], array_merge( $server, ['REMOTE_ADDR' => $remoteAddrIp], )); diff --git a/tests/bundle/Core/Fragment/DirectFragmentRendererTest.php b/tests/bundle/Core/Fragment/DirectFragmentRendererTest.php index 3c90267760..291d83a13c 100644 --- a/tests/bundle/Core/Fragment/DirectFragmentRendererTest.php +++ b/tests/bundle/Core/Fragment/DirectFragmentRendererTest.php @@ -31,7 +31,7 @@ public function testSubRequestBuilding(): void $controllerResolver ->expects(self::any()) ->method('getController') - ->with(self::callback(function (Request $request) { + ->with(self::callback(function (Request $request): bool { $this->assertEquals('/_fragment', $request->getPathInfo()); $this->assertEquals('some::controller', $request->attributes->get('_controller')); $this->assertEquals('attribute_value', $request->attributes->get('some')); @@ -41,7 +41,7 @@ public function testSubRequestBuilding(): void return true; })) - ->willReturn(static function () { + ->willReturn(static function (): string { return 'rendered_response'; }); @@ -123,7 +123,7 @@ public function testControllerStringResponse(): void $controllerResolver ->method('getController') - ->willReturn(static function () { + ->willReturn(static function (): string { return 'some_prerendered_response'; }); diff --git a/tests/bundle/Core/Routing/DefaultRouterTest.php b/tests/bundle/Core/Routing/DefaultRouterTest.php index e81a4ddfc6..71609b38cb 100644 --- a/tests/bundle/Core/Routing/DefaultRouterTest.php +++ b/tests/bundle/Core/Routing/DefaultRouterTest.php @@ -42,7 +42,7 @@ protected function setUp(): void /** * @return class-string<\Ibexa\Bundle\Core\Routing\DefaultRouter> */ - protected function getRouterClass() + protected function getRouterClass(): string { return DefaultRouter::class; } diff --git a/tests/bundle/Core/URLChecker/URLCheckerTest.php b/tests/bundle/Core/URLChecker/URLCheckerTest.php index 51e4074e67..e0d6be90ec 100644 --- a/tests/bundle/Core/URLChecker/URLCheckerTest.php +++ b/tests/bundle/Core/URLChecker/URLCheckerTest.php @@ -113,7 +113,7 @@ private function configureUrlHandlerRegistry(array $schemes) { $this->handlerRegistry ->method('supported') - ->willReturnCallback(static function ($scheme) use ($schemes) { + ->willReturnCallback(static function ($scheme) use ($schemes): bool { return isset($schemes[$scheme]); }); diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/FlysystemTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/FlysystemTest.php index 7ce7f96664..42a641da82 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/FlysystemTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/FlysystemTest.php @@ -20,7 +20,7 @@ public function provideTestedFactory(): Flysystem /** * Returns the expected parent service id. */ - public function provideExpectedParentServiceId() + public function provideExpectedParentServiceId(): string { return 'ibexa.core.io.binarydata_handler.flysystem'; } diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/FlysystemTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/FlysystemTest.php index 51565ab1bf..fb745f670d 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/FlysystemTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/FlysystemTest.php @@ -24,7 +24,7 @@ public function provideTestedFactory() /** * Returns the expected parent service id. */ - public function provideExpectedParentServiceId() + public function provideExpectedParentServiceId(): string { return 'ibexa.core.io.metadata_handler.flysystem'; } diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php index c6658cc34f..384e18f1df 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php @@ -23,7 +23,7 @@ public function provideTestedFactory() return new LegacyDFSCluster(); } - public function provideExpectedParentServiceId() + public function provideExpectedParentServiceId(): string { return \Ibexa\Core\IO\IOMetadataHandler\LegacyDFSCluster::class; } diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php index 265c7f72cb..6058496e9d 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php @@ -72,7 +72,7 @@ public function testConfigureHandler() /** * Registers the handler in the container, like the pass would have done. */ - private function registerHandler($name) + private function registerHandler($name): string { $this->setDefinition($this->provideExpectedParentServiceId(), $this->provideParentServiceDefinition()); $handlerServiceId = sprintf('%s.%s', $this->provideExpectedParentServiceId(), $name); diff --git a/tests/bundle/IO/EventListener/StreamFileListenerTest.php b/tests/bundle/IO/EventListener/StreamFileListenerTest.php index 44965df76e..cce315842e 100644 --- a/tests/bundle/IO/EventListener/StreamFileListenerTest.php +++ b/tests/bundle/IO/EventListener/StreamFileListenerTest.php @@ -158,7 +158,7 @@ protected function createEvent($request) $event = new RequestEvent( $this->createMock(HttpKernelInterface::class), $request, - HttpKernelInterface::MASTER_REQUEST + HttpKernelInterface::MAIN_REQUEST ); return $event; diff --git a/tests/bundle/RepositoryInstaller/IbexaRepositoryInstallerBundleTest.php b/tests/bundle/RepositoryInstaller/IbexaRepositoryInstallerBundleTest.php index aab4504a96..16b396b1b7 100644 --- a/tests/bundle/RepositoryInstaller/IbexaRepositoryInstallerBundleTest.php +++ b/tests/bundle/RepositoryInstaller/IbexaRepositoryInstallerBundleTest.php @@ -39,7 +39,7 @@ public function testBuild(): void self::assertNotEmpty( array_filter( $container->getCompilerPassConfig()->getPasses(), - static function (CompilerPassInterface $compilerPass) { + static function (CompilerPassInterface $compilerPass): bool { return $compilerPass instanceof InstallerTagPass; } ) diff --git a/tests/integration/Core/Repository/BaseTest.php b/tests/integration/Core/Repository/BaseTest.php index f746b8d511..21782516c0 100644 --- a/tests/integration/Core/Repository/BaseTest.php +++ b/tests/integration/Core/Repository/BaseTest.php @@ -275,7 +275,7 @@ protected function assertStructPropertiesCorrect(ValueObject $expectedValues, Va */ private function sortItems(array &$items) { - $sorter = function ($a, $b) { + $sorter = function ($a, $b): int { if (!is_scalar($a) || !is_scalar($b)) { $this->fail('Wrong usage: method ' . __METHOD__ . ' accepts only an array of scalar values'); } diff --git a/tests/integration/Core/Repository/ContentServiceTest.php b/tests/integration/Core/Repository/ContentServiceTest.php index cbe2cc5c4a..00b934058a 100644 --- a/tests/integration/Core/Repository/ContentServiceTest.php +++ b/tests/integration/Core/Repository/ContentServiceTest.php @@ -2769,7 +2769,7 @@ public function testLoadContentByVersionInfoWithSecondParameter() } usort( $actual, - static function ($field1, $field2) { + static function ($field1, $field2): int { if (0 === ($return = strcasecmp($field1->fieldDefIdentifier, $field2->fieldDefIdentifier))) { return strcasecmp($field1->languageCode, $field2->languageCode); } @@ -3665,7 +3665,7 @@ public function testLoadRelations() usort( $relations, - static function ($rel1, $rel2) { + static function ($rel1, $rel2): int { return strcasecmp( $rel2->getDestinationContentInfo()->remoteId, $rel1->getDestinationContentInfo()->remoteId @@ -3985,7 +3985,7 @@ public function testLoadReverseRelations() usort( $reverseRelations, - static function ($rel1, $rel2) { + static function ($rel1, $rel2): int { return strcasecmp( $rel2->getSourceContentInfo()->remoteId, $rel1->getSourceContentInfo()->remoteId @@ -6155,7 +6155,7 @@ private function normalizeFields(array $fields) } usort( $normalized, - static function ($field1, $field2) { + static function ($field1, $field2): int { if (0 === ($return = strcasecmp($field1->fieldDefIdentifier, $field2->fieldDefIdentifier))) { return strcasecmp($field1->languageCode, $field2->languageCode); } diff --git a/tests/integration/Core/Repository/ContentTypeServiceTest.php b/tests/integration/Core/Repository/ContentTypeServiceTest.php index 34ab8e0793..2c3cfc71f8 100644 --- a/tests/integration/Core/Repository/ContentTypeServiceTest.php +++ b/tests/integration/Core/Repository/ContentTypeServiceTest.php @@ -940,7 +940,7 @@ protected function assertFieldDefinitionsCorrect( 'Count of field definition creates did not match count of field definitions.' ); - $sorter = static function ($a, $b) { + $sorter = static function ($a, $b): int { return strcmp($a->identifier, $b->identifier); }; @@ -981,7 +981,7 @@ protected function assertFieldDefinitionsEqual( */ protected function assertContentTypeGroupsCorrect($expectedGroups, $actualGroups) { - $sorter = static function ($a, $b) { + $sorter = static function ($a, $b): int { return strcmp($a->id, $b->id); }; @@ -3112,7 +3112,7 @@ public function testLoadContentTypesContent(array $types) usort( $types, - static function ($a, $b) { + static function ($a, $b): int { if ($a->id == $b->id) { return 0; } diff --git a/tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php b/tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php index edcb4759ae..a1a200a2f8 100644 --- a/tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php @@ -27,7 +27,7 @@ class AuthorIntegrationTest extends SearchMultivaluedBaseIntegrationTest * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'ezauthor'; } @@ -128,7 +128,7 @@ public function getValidCreationFieldData() * * @return string */ - public function getFieldName() + public function getFieldName(): string { return 'Hans Mueller'; } @@ -422,12 +422,12 @@ protected function getValidSearchValueTwo() ]; } - protected function getSearchTargetValueOne() + protected function getSearchTargetValueOne(): string { return 'Ferdinand'; } - protected function getSearchTargetValueTwo() + protected function getSearchTargetValueTwo(): string { return 'Greta'; } diff --git a/tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php b/tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php index 0d7e51ddfc..d93dcf7dc8 100644 --- a/tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/BinaryFileIntegrationTest.php @@ -48,7 +48,7 @@ protected function getFixtureData(): array * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'ezbinaryfile'; } diff --git a/tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php b/tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php index 5e89b06d14..537552f3b5 100644 --- a/tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php @@ -32,7 +32,7 @@ class CheckboxIntegrationTest extends SearchBaseIntegrationTest * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'ezboolean'; } @@ -116,7 +116,7 @@ public function getValidCreationFieldData() * * @return string */ - public function getFieldName() + public function getFieldName(): string { return '1'; } @@ -280,12 +280,12 @@ public function providerForTestIsNotEmptyValue() ]; } - protected function getValidSearchValueOne() + protected function getValidSearchValueOne(): bool { return false; } - protected function getValidSearchValueTwo() + protected function getValidSearchValueTwo(): bool { return true; } diff --git a/tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php b/tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php index 624e3dc6e1..b74fb63e7b 100644 --- a/tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php @@ -25,7 +25,7 @@ class CountryIntegrationTest extends SearchMultivaluedBaseIntegrationTest * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'ezcountry'; } @@ -125,7 +125,7 @@ public function getValidCreationFieldData() * * @return string */ - public function getFieldName() + public function getFieldName(): string { return 'Belgium'; } @@ -382,12 +382,12 @@ protected function getValidSearchValueTwo() return ['Trinidad and Tobago']; } - protected function getSearchTargetValueOne() + protected function getSearchTargetValueOne(): string { return 'Andorra'; } - protected function getSearchTargetValueTwo() + protected function getSearchTargetValueTwo(): string { return 'Trinidad and Tobago'; } diff --git a/tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php b/tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php index b73865824d..9c2616cdad 100644 --- a/tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php @@ -26,7 +26,7 @@ class DateAndTimeIntegrationTest extends SearchBaseIntegrationTest * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'ezdatetime'; } @@ -34,7 +34,7 @@ public function getTypeName() /** * {@inheritdoc} */ - protected function supportsLikeWildcard($value) + protected function supportsLikeWildcard($value): bool { parent::supportsLikeWildcard($value); @@ -139,7 +139,7 @@ public function getValidCreationFieldData() * * @return string */ - public function getFieldName() + public function getFieldName(): string { return 'Fri 1970-02-01 10:17:36'; } @@ -325,12 +325,12 @@ public function providerForTestIsNotEmptyValue() ]; } - protected function getValidSearchValueOne() + protected function getValidSearchValueOne(): string { return '2012-04-15T15:43:56Z'; } - protected function getValidSearchValueTwo() + protected function getValidSearchValueTwo(): string { return '2015-04-15T15:43:56Z'; } diff --git a/tests/integration/Core/Repository/FieldType/DateIntegrationTest.php b/tests/integration/Core/Repository/FieldType/DateIntegrationTest.php index d80ff979d8..1c6b88aca5 100644 --- a/tests/integration/Core/Repository/FieldType/DateIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/DateIntegrationTest.php @@ -27,7 +27,7 @@ class DateIntegrationTest extends SearchBaseIntegrationTest * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'ezdate'; } @@ -35,7 +35,7 @@ public function getTypeName() /** * {@inheritdoc} */ - protected function supportsLikeWildcard($value) + protected function supportsLikeWildcard($value): bool { parent::supportsLikeWildcard($value); @@ -128,7 +128,7 @@ public function getValidCreationFieldData() * * @return string */ - public function getFieldName() + public function getFieldName(): string { return 'Friday 02 January 1970'; } @@ -317,12 +317,12 @@ public function providerForTestIsNotEmptyValue() ]; } - protected function getValidSearchValueOne() + protected function getValidSearchValueOne(): int { return 86400; } - protected function getValidSearchValueTwo() + protected function getValidSearchValueTwo(): int { return 172800; } diff --git a/tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php b/tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php index 9305134166..58ad782a6a 100644 --- a/tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php @@ -25,7 +25,7 @@ class EmailAddressIntegrationTest extends SearchBaseIntegrationTest * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'ezemail'; } @@ -115,7 +115,7 @@ public function getValidCreationFieldData() * * @return string */ - public function getFieldName() + public function getFieldName(): string { return 'spam@ibexa.co'; } @@ -301,23 +301,23 @@ public function providerForTestIsNotEmptyValue() ]; } - protected function getValidSearchValueOne() + protected function getValidSearchValueOne(): string { return 'holmes4@ibexa.co'; } - protected function getSearchTargetValueOne() + protected function getSearchTargetValueOne(): string { // ensure case-insensitivity return strtoupper($this->getValidSearchValueOne()); } - protected function getValidSearchValueTwo() + protected function getValidSearchValueTwo(): string { return 'wyoming.knott@o2.ru'; } - protected function getSearchTargetValueTwo() + protected function getSearchTargetValueTwo(): string { // ensure case-insensitivity return strtoupper($this->getValidSearchValueTwo()); diff --git a/tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php b/tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php index b9aa74d719..97845f7893 100644 --- a/tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php @@ -25,7 +25,7 @@ class FloatIntegrationTest extends SearchBaseIntegrationTest * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'ezfloat'; } @@ -127,7 +127,7 @@ public function getValidCreationFieldData() * * @return string */ - public function getFieldName() + public function getFieldName(): string { return '23.5'; } @@ -299,12 +299,12 @@ public function providerForTestIsNotEmptyValue() ]; } - protected function getValidSearchValueOne() + protected function getValidSearchValueOne(): float { return 25.519; } - protected function getValidSearchValueTwo() + protected function getValidSearchValueTwo(): float { return 25.59; } diff --git a/tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php b/tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php index 372fd1da89..5e7d747927 100644 --- a/tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php @@ -25,7 +25,7 @@ class ISBNIntegrationTest extends SearchBaseIntegrationTest * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'ezisbn'; } @@ -116,7 +116,7 @@ public function getValidCreationFieldData() * * @return string */ - public function getFieldName() + public function getFieldName(): string { return '9789722514095'; } @@ -310,12 +310,12 @@ public function providerForTestIsNotEmptyValue() ]; } - protected function getValidSearchValueOne() + protected function getValidSearchValueOne(): string { return '9780099067504'; } - protected function getValidSearchValueTwo() + protected function getValidSearchValueTwo(): string { return '9780380448340'; } diff --git a/tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php b/tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php index c46c4705bc..6e62427e2d 100644 --- a/tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php @@ -25,7 +25,7 @@ class IntegerIntegrationTest extends SearchBaseIntegrationTest * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'ezinteger'; } @@ -127,7 +127,7 @@ public function getValidCreationFieldData() * * @return string */ - public function getFieldName() + public function getFieldName(): string { return '23'; } @@ -301,12 +301,12 @@ public function providerForTestIsNotEmptyValue() ]; } - protected function getValidSearchValueOne() + protected function getValidSearchValueOne(): int { return 25; } - protected function getValidSearchValueTwo() + protected function getValidSearchValueTwo(): int { return 26; } diff --git a/tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php b/tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php index da9e18cd3e..6673e530a9 100644 --- a/tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php @@ -27,7 +27,7 @@ class KeywordIntegrationTest extends SearchMultivaluedBaseIntegrationTest * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'ezkeyword'; } @@ -130,7 +130,7 @@ public function getValidMultilingualFieldData(array $languageCodes) * * @return string */ - public function getFieldName() + public function getFieldName(): string { return 'foo, bar, sindelfingen'; } @@ -441,12 +441,12 @@ protected function createAndPublishContent($fieldData, ContentType $contentType, return $contentService->publishVersion($contentDraft->versionInfo); } - protected function getValidSearchValueOne() + protected function getValidSearchValueOne(): string { return 'add'; } - protected function getValidSearchValueTwo() + protected function getValidSearchValueTwo(): string { return 'branch'; } diff --git a/tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php b/tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php index 2bba30b21a..240e1a9c6e 100644 --- a/tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php @@ -24,7 +24,7 @@ class MapLocationIntegrationTest extends BaseIntegrationTest * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'ezgmaplocation'; } @@ -114,7 +114,7 @@ public function getValidCreationFieldData() * * @return string */ - public function getFieldName() + public function getFieldName(): string { return 'Bielefeld'; } diff --git a/tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php b/tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php index 4ab6d1bed9..e491315b10 100644 --- a/tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/MediaIntegrationTest.php @@ -53,7 +53,7 @@ protected function getFixtureData(): array * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'ezmedia'; } diff --git a/tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php b/tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php index f7ca3c9568..f1ed678eb4 100644 --- a/tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php @@ -29,7 +29,7 @@ class RelationIntegrationTest extends SearchBaseIntegrationTest * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'ezobjectrelation'; } @@ -37,7 +37,7 @@ public function getTypeName() /** * {@inheritdoc} */ - protected function supportsLikeWildcard($value) + protected function supportsLikeWildcard($value): bool { parent::supportsLikeWildcard($value); @@ -189,7 +189,7 @@ public function getValidCreationFieldData() * * @return string */ - public function getFieldName() + public function getFieldName(): string { return 'Users'; } @@ -353,7 +353,7 @@ public function providerForTestIsNotEmptyValue() ]; } - protected function getValidSearchValueOne() + protected function getValidSearchValueOne(): int { // Using different values for Legacy Search Engine, in order to demonstrate that sort will // depend on how search engine stores field type's value. Legacy stores it as integer, while @@ -365,7 +365,7 @@ protected function getValidSearchValueOne() return 10; } - protected function getValidSearchValueTwo() + protected function getValidSearchValueTwo(): int { // Using different values for Legacy Search Engine, in order to demonstrate that sort will // depend on how search engine stores field type's value. Legacy stores it as integer, while diff --git a/tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php b/tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php index cfcce0d3bd..19fd77c786 100644 --- a/tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php @@ -29,7 +29,7 @@ class RelationListIntegrationTest extends SearchMultivaluedBaseIntegrationTest * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'ezobjectrelationlist'; } @@ -37,7 +37,7 @@ public function getTypeName() /** * {@inheritdoc} */ - protected function supportsLikeWildcard($value) + protected function supportsLikeWildcard($value): bool { parent::supportsLikeWildcard($value); @@ -218,7 +218,7 @@ public function getValidCreationFieldData() * * @return string */ - public function getFieldName() + public function getFieldName(): string { return 'Users' . ' ' . 'Images'; } @@ -392,12 +392,12 @@ protected function getValidSearchValueTwo() return [12]; } - protected function getSearchTargetValueOne() + protected function getSearchTargetValueOne(): int { return 11; } - protected function getSearchTargetValueTwo() + protected function getSearchTargetValueTwo(): int { return 12; } diff --git a/tests/integration/Core/Repository/FieldType/RelationSearchBaseIntegrationTestTrait.php b/tests/integration/Core/Repository/FieldType/RelationSearchBaseIntegrationTestTrait.php index f699b6f595..a6acd700d7 100644 --- a/tests/integration/Core/Repository/FieldType/RelationSearchBaseIntegrationTestTrait.php +++ b/tests/integration/Core/Repository/FieldType/RelationSearchBaseIntegrationTestTrait.php @@ -81,7 +81,7 @@ protected function normalizeRelations(array $relations) { usort( $relations, - static function (Relation $a, Relation $b) { + static function (Relation $a, Relation $b): int { if ($a->type == $b->type) { return $a->destinationContentInfo->id < $b->destinationContentInfo->id ? 1 : -1; } diff --git a/tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php b/tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php index f96272f3a3..0cdb894853 100644 --- a/tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php @@ -85,7 +85,7 @@ public function getValidFieldConfiguration(): array ]; } - public function getFieldName() + public function getFieldName(): string { return 'Arkansas' . ' ' . 'Mississippi'; } diff --git a/tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php b/tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php index c9ec559dae..8d664ba334 100644 --- a/tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php @@ -24,7 +24,7 @@ class TextBlockIntegrationTest extends SearchBaseIntegrationTest * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'eztext'; } @@ -115,7 +115,7 @@ public function getValidCreationFieldData() * * @return string */ - public function getFieldName() + public function getFieldName(): string { return 'Example'; } @@ -285,23 +285,23 @@ public function providerForTestIsNotEmptyValue() ]; } - protected function getValidSearchValueOne() + protected function getValidSearchValueOne(): string { return 'caution is the " path to mediocrity' . PHP_EOL . 'something completely different'; } - protected function getSearchTargetValueOne() + protected function getSearchTargetValueOne(): string { // ensure case-insensitivity return strtoupper('caution is the " path to mediocrity'); } - protected function getValidSearchValueTwo() + protected function getValidSearchValueTwo(): string { return "truth suffers from ' too much analysis\n hello and goodbye"; } - protected function getSearchTargetValueTwo() + protected function getSearchTargetValueTwo(): string { // ensure case-insensitivity return strtoupper("truth suffers from ' too much analysis"); diff --git a/tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php b/tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php index 6e90e1043c..73fb280f23 100644 --- a/tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php @@ -25,7 +25,7 @@ class TextLineIntegrationTest extends SearchBaseIntegrationTest * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'ezstring'; } @@ -127,7 +127,7 @@ public function getValidCreationFieldData() * * @return string */ - public function getFieldName() + public function getFieldName(): string { return 'Example'; } @@ -303,23 +303,23 @@ public function providerForTestIsNotEmptyValue() ]; } - protected function getValidSearchValueOne() + protected function getValidSearchValueOne(): string { return 'aaa'; } - protected function getSearchTargetValueOne() + protected function getSearchTargetValueOne(): string { // ensure case-insensitivity return strtoupper($this->getValidSearchValueOne()); } - protected function getValidSearchValueTwo() + protected function getValidSearchValueTwo(): string { return 'bbb'; } - protected function getSearchTargetValueTwo() + protected function getSearchTargetValueTwo(): string { // ensure case-insensitivity return strtoupper($this->getValidSearchValueTwo()); diff --git a/tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php b/tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php index 246bea5fa6..7bf5f66e29 100644 --- a/tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php @@ -25,7 +25,7 @@ class TimeIntegrationTest extends SearchBaseIntegrationTest * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'eztime'; } @@ -33,7 +33,7 @@ public function getTypeName() /** * {@inheritdoc} */ - protected function supportsLikeWildcard($value) + protected function supportsLikeWildcard($value): bool { parent::supportsLikeWildcard($value); @@ -133,7 +133,7 @@ public function getValidCreationFieldData() * * @return string */ - public function getFieldName() + public function getFieldName(): string { return '1:01:01 am'; } @@ -327,12 +327,12 @@ protected function getValidSearchValueTwo() return new TimeValue($this->getSearchTargetValueTwo()); } - protected function getSearchTargetValueOne() + protected function getSearchTargetValueOne(): int { return 9600; } - protected function getSearchTargetValueTwo() + protected function getSearchTargetValueTwo(): int { return 14400; } diff --git a/tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php b/tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php index 5d0b1aecbd..9a5f34e9ad 100644 --- a/tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php @@ -24,7 +24,7 @@ class UrlIntegrationTest extends SearchBaseIntegrationTest * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'ezurl'; } @@ -108,7 +108,7 @@ public function getValidCreationFieldData() * * @return string */ - public function getFieldName() + public function getFieldName(): string { return 'Example'; } @@ -309,12 +309,12 @@ protected function getValidSearchValueTwo() return new UrlValue('http://example.com', 'Example'); } - protected function getSearchTargetValueOne() + protected function getSearchTargetValueOne(): string { return 'http://ample.com'; } - protected function getSearchTargetValueTwo() + protected function getSearchTargetValueTwo(): string { return 'http://example.com'; } diff --git a/tests/integration/Core/Repository/FieldType/UserIntegrationTest.php b/tests/integration/Core/Repository/FieldType/UserIntegrationTest.php index 5c798c2f24..432e0a2b8c 100644 --- a/tests/integration/Core/Repository/FieldType/UserIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/UserIntegrationTest.php @@ -33,7 +33,7 @@ class UserIntegrationTest extends BaseIntegrationTest * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'ezuser'; } @@ -155,7 +155,7 @@ public function getValidCreationFieldData(): UserValue * * @return string */ - public function getFieldName() + public function getFieldName(): string { return self::TEST_LOGIN; } diff --git a/tests/integration/Core/Repository/LocationServiceTest.php b/tests/integration/Core/Repository/LocationServiceTest.php index 794b43676c..63875e9cb3 100644 --- a/tests/integration/Core/Repository/LocationServiceTest.php +++ b/tests/integration/Core/Repository/LocationServiceTest.php @@ -881,7 +881,7 @@ public function testLoadLocationsContent(array $locations) usort( $locations, - static function ($a, $b) { + static function ($a, $b): int { return strcmp($a->id, $b->id); } ); @@ -1824,7 +1824,7 @@ private function assertContentHasExpectedLocations(array $expectedLocations, Con $locationService = $repository->getLocationService(); $expectedLocationIds = array_map( - static function (Location $location) { + static function (Location $location): int { return (int)$location->id; }, $expectedLocations @@ -3750,7 +3750,7 @@ private function assertAliasExists( self::assertNotEmpty( array_filter( $articleAliasesBeforeDelete, - static function (URLAlias $alias) use ($expectedAliasPath) { + static function (URLAlias $alias) use ($expectedAliasPath): bool { return $alias->path === $expectedAliasPath; } ) diff --git a/tests/integration/Core/Repository/ObjectStateServiceTest.php b/tests/integration/Core/Repository/ObjectStateServiceTest.php index bf3a553cb4..9a792115aa 100644 --- a/tests/integration/Core/Repository/ObjectStateServiceTest.php +++ b/tests/integration/Core/Repository/ObjectStateServiceTest.php @@ -577,7 +577,7 @@ public function testLoadObjectStateGroupsWithOffset() * * @return array */ - protected function getGroupIdentifierMap(array $groups) + protected function getGroupIdentifierMap(array $groups): array { $existingGroupIdentifiers = array_map( static function ($group) { diff --git a/tests/integration/Core/Repository/PermissionResolverTest.php b/tests/integration/Core/Repository/PermissionResolverTest.php index 982e898f8f..d07f89a792 100644 --- a/tests/integration/Core/Repository/PermissionResolverTest.php +++ b/tests/integration/Core/Repository/PermissionResolverTest.php @@ -1198,7 +1198,7 @@ public function testLookupLimitationsWithRoleLimitationsWithoutPolicyLimitations $permissionResolver->setCurrentUserReference($user); /* END: Use Case */ - $expectedPolicy = current(array_filter($role->getPolicies(), static function ($policy) use ($module, $function) { + $expectedPolicy = current(array_filter($role->getPolicies(), static function ($policy) use ($module, $function): bool { return $policy->module === $module && $policy->function === $function; })); diff --git a/tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php b/tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php index c272748e9d..c4db367886 100644 --- a/tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php +++ b/tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php @@ -110,7 +110,7 @@ private function createTestContentType() $contentTypeService->publishContentTypeDraft($this->testContentType); } - private function getMainLanguageCode() + private function getMainLanguageCode(): string { return $this->getRepository()->getContentLanguageService()->getDefaultLanguageCode(); } diff --git a/tests/integration/Core/Repository/RoleServiceTest.php b/tests/integration/Core/Repository/RoleServiceTest.php index 2f7b6ee588..d37e910cb8 100644 --- a/tests/integration/Core/Repository/RoleServiceTest.php +++ b/tests/integration/Core/Repository/RoleServiceTest.php @@ -1206,7 +1206,7 @@ public function testAddPolicyByRoleDraft() } usort( $actual, - static function ($p1, $p2) { + static function ($p1, $p2): int { return strcasecmp($p1['function'], $p2['function']); } ); @@ -3068,7 +3068,7 @@ public function testPublishRoleDraftAddPolicies() } usort( $actual, - static function ($p1, $p2) { + static function ($p1, $p2): int { return strcasecmp($p1['function'], $p2['function']); } ); diff --git a/tests/integration/Core/Repository/SearchServiceFulltextTest.php b/tests/integration/Core/Repository/SearchServiceFulltextTest.php index cf5f7ee188..ff3219f92b 100644 --- a/tests/integration/Core/Repository/SearchServiceFulltextTest.php +++ b/tests/integration/Core/Repository/SearchServiceFulltextTest.php @@ -305,7 +305,7 @@ private function mapKeysToIds(array $expectedKeys, array $idMap) * * @return array */ - private function mapSearchResultToIds(SearchResult $searchResult) + private function mapSearchResultToIds(SearchResult $searchResult): array { $scoreGroupedIds = []; diff --git a/tests/integration/Core/Repository/SearchServiceLocationTest.php b/tests/integration/Core/Repository/SearchServiceLocationTest.php index 889e53b88a..4974ea32d9 100644 --- a/tests/integration/Core/Repository/SearchServiceLocationTest.php +++ b/tests/integration/Core/Repository/SearchServiceLocationTest.php @@ -456,7 +456,7 @@ public function testFindLocationsWithNonSearchableField() /** * @return array */ - protected function mapResultLocationIds(SearchResult $result) + protected function mapResultLocationIds(SearchResult $result): array { return array_map( static function (SearchHit $searchHit) { @@ -1445,7 +1445,7 @@ protected function assertQueryFixture(LocationQuery $query, $fixture, $closure = * * @return string */ - protected function printResult(SearchResult $result) + protected function printResult(SearchResult $result): string { $printed = ''; foreach ($result->searchHits as $hit) { @@ -1485,7 +1485,7 @@ protected function simplifySearchResult(SearchResult $result) * * @return string */ - protected function getFixtureDir() + protected function getFixtureDir(): string { return __DIR__ . '/_fixtures/' . getenv('fixtureDir') . '/'; } diff --git a/tests/integration/Core/Repository/SearchServiceTest.php b/tests/integration/Core/Repository/SearchServiceTest.php index 08c4968cbd..a54b2e5c3a 100644 --- a/tests/integration/Core/Repository/SearchServiceTest.php +++ b/tests/integration/Core/Repository/SearchServiceTest.php @@ -452,7 +452,7 @@ public function getFilterContentSearches() static function (&$data) { usort( $data->searchHits, - static function ($a, $b) { + static function ($a, $b): int { if ($a->score == $b->score) { if ($a->valueObject['id'] == $b->valueObject['id']) { return 0; @@ -1933,7 +1933,7 @@ static function (&$data) { ]; usort( $data->searchHits, - static function ($a, $b) use ($map) { + static function ($a, $b) use ($map): int { return ($map[$a->valueObject['id']] < $map[$b->valueObject['id']]) ? -1 : 1; } ); @@ -2784,7 +2784,7 @@ protected function assertMultilingualFieldFilter( * * @return array */ - protected function mapResultContentIds(SearchResult $result) + protected function mapResultContentIds(SearchResult $result): array { return array_map( static function (SearchHit $searchHit) { @@ -4835,7 +4835,7 @@ protected function assertQueryFixture( * * @return string */ - protected function printResult(SearchResult $result) + protected function printResult(SearchResult $result): string { $printed = ''; foreach ($result->searchHits as $hit) { @@ -4885,7 +4885,7 @@ protected function simplifySearchResult(SearchResult $result) * * @return string */ - protected function getFixtureDir() + protected function getFixtureDir(): string { return __DIR__ . '/_fixtures/' . getenv('fixtureDir') . '/'; } diff --git a/tests/integration/Core/Repository/URLAliasServiceTest.php b/tests/integration/Core/Repository/URLAliasServiceTest.php index 499b2425d8..63dc1e90a7 100644 --- a/tests/integration/Core/Repository/URLAliasServiceTest.php +++ b/tests/integration/Core/Repository/URLAliasServiceTest.php @@ -1757,7 +1757,7 @@ private function assertUrlAliasPropertiesCorrect( * * @return int Number of new rows */ - private function insertBrokenUrlAliasTableFixtures(Connection $connection) + private function insertBrokenUrlAliasTableFixtures(Connection $connection): int { $rows = [ // link to non-existent location diff --git a/tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php b/tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php index ab32f39c34..04f9ca0c5a 100644 --- a/tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php +++ b/tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php @@ -32,7 +32,8 @@ public function hasFieldData() { } - public function getIndexData(VersionInfo $versionInfo, Field $field, array $context) + public function getIndexData(VersionInfo $versionInfo, Field $field, array $context): array { + return []; } } diff --git a/tests/lib/FieldType/AuthorTest.php b/tests/lib/FieldType/AuthorTest.php index 0ade378c4d..0ce6fcd8b4 100644 --- a/tests/lib/FieldType/AuthorTest.php +++ b/tests/lib/FieldType/AuthorTest.php @@ -519,7 +519,7 @@ public function testRemoveAuthors() * * @return string */ - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'ezauthor'; } diff --git a/tests/lib/FieldType/BinaryFileTest.php b/tests/lib/FieldType/BinaryFileTest.php index ccfe1d0dac..f0a94eac5d 100644 --- a/tests/lib/FieldType/BinaryFileTest.php +++ b/tests/lib/FieldType/BinaryFileTest.php @@ -506,7 +506,7 @@ public function provideInputForFromHash() ]; } - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'ezbinaryfile'; } diff --git a/tests/lib/FieldType/CheckboxTest.php b/tests/lib/FieldType/CheckboxTest.php index 35e0056c40..10f6963418 100644 --- a/tests/lib/FieldType/CheckboxTest.php +++ b/tests/lib/FieldType/CheckboxTest.php @@ -263,7 +263,7 @@ public function testFieldValueToString() self::assertSame('0', (string)$valueFalse); } - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'ezboolean'; } diff --git a/tests/lib/FieldType/CountryTest.php b/tests/lib/FieldType/CountryTest.php index b4d8ae5653..fbba207340 100644 --- a/tests/lib/FieldType/CountryTest.php +++ b/tests/lib/FieldType/CountryTest.php @@ -19,7 +19,7 @@ */ class CountryTest extends FieldTypeTest { - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'ezcountry'; } diff --git a/tests/lib/FieldType/DateAndTimeTest.php b/tests/lib/FieldType/DateAndTimeTest.php index 5a03693385..a5d91bf33f 100644 --- a/tests/lib/FieldType/DateAndTimeTest.php +++ b/tests/lib/FieldType/DateAndTimeTest.php @@ -426,7 +426,7 @@ public function provideInValidFieldSettings() ]; } - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'ezdatetime'; } diff --git a/tests/lib/FieldType/DateTest.php b/tests/lib/FieldType/DateTest.php index 3766383aaa..11f9d347db 100644 --- a/tests/lib/FieldType/DateTest.php +++ b/tests/lib/FieldType/DateTest.php @@ -337,7 +337,7 @@ public function provideInValidFieldSettings() ]; } - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'ezdate'; } diff --git a/tests/lib/FieldType/EmailAddressTest.php b/tests/lib/FieldType/EmailAddressTest.php index 157f5a3ed2..31468e09e1 100644 --- a/tests/lib/FieldType/EmailAddressTest.php +++ b/tests/lib/FieldType/EmailAddressTest.php @@ -38,7 +38,7 @@ protected function createFieldTypeUnderTest() ->with(self::anything(), 'lowercase') ->will( self::returnCallback( - static function ($value, $group) { + static function ($value, $group): string { return strtolower($value); } ) @@ -366,7 +366,7 @@ public function provideInvalidValidatorConfiguration() ]; } - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'ezemail'; } diff --git a/tests/lib/FieldType/FileSizeValidatorTest.php b/tests/lib/FieldType/FileSizeValidatorTest.php index 3a06e12bd0..029e074202 100644 --- a/tests/lib/FieldType/FileSizeValidatorTest.php +++ b/tests/lib/FieldType/FileSizeValidatorTest.php @@ -27,7 +27,7 @@ class FileSizeValidatorTest extends TestCase /** * @return int */ - protected function getMaxFileSize() + protected function getMaxFileSize(): int { return 4096; } diff --git a/tests/lib/FieldType/FloatTest.php b/tests/lib/FieldType/FloatTest.php index d76b7d60c3..7200b33660 100644 --- a/tests/lib/FieldType/FloatTest.php +++ b/tests/lib/FieldType/FloatTest.php @@ -400,7 +400,7 @@ public function provideInvalidValidatorConfiguration() ]; } - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'ezfloat'; } diff --git a/tests/lib/FieldType/ISBNTest.php b/tests/lib/FieldType/ISBNTest.php index e4ab6ee633..38cc00a5ff 100644 --- a/tests/lib/FieldType/ISBNTest.php +++ b/tests/lib/FieldType/ISBNTest.php @@ -226,7 +226,7 @@ public function provideInputForFromHash() ]; } - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'ezisbn'; } diff --git a/tests/lib/FieldType/ImageTest.php b/tests/lib/FieldType/ImageTest.php index f1639aeef7..ea81a7caf3 100644 --- a/tests/lib/FieldType/ImageTest.php +++ b/tests/lib/FieldType/ImageTest.php @@ -38,7 +38,7 @@ class ImageTest extends FieldTypeTest 'pgif', ]; - public function getImageInputPath() + public function getImageInputPath(): string { return __DIR__ . '/../_fixtures/squirrel-developers.jpg'; } @@ -483,7 +483,7 @@ public function provideInputForFromHash() ]; } - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'ezimage'; } diff --git a/tests/lib/FieldType/IntegerTest.php b/tests/lib/FieldType/IntegerTest.php index 1e1bd9dc0f..b9c73b56b5 100644 --- a/tests/lib/FieldType/IntegerTest.php +++ b/tests/lib/FieldType/IntegerTest.php @@ -390,7 +390,7 @@ public function provideInvalidValidatorConfiguration() ]; } - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'ezinteger'; } diff --git a/tests/lib/FieldType/KeywordTest.php b/tests/lib/FieldType/KeywordTest.php index e850072e97..953b08311a 100644 --- a/tests/lib/FieldType/KeywordTest.php +++ b/tests/lib/FieldType/KeywordTest.php @@ -227,7 +227,7 @@ public function provideInputForFromHash() ]; } - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'ezkeyword'; } diff --git a/tests/lib/FieldType/MapLocationTest.php b/tests/lib/FieldType/MapLocationTest.php index 345b4362ec..52ff1a046c 100644 --- a/tests/lib/FieldType/MapLocationTest.php +++ b/tests/lib/FieldType/MapLocationTest.php @@ -307,7 +307,7 @@ public function provideInputForFromHash() ]; } - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'ezgmaplocation'; } diff --git a/tests/lib/FieldType/MediaTest.php b/tests/lib/FieldType/MediaTest.php index 4286db0f15..5933628d7a 100644 --- a/tests/lib/FieldType/MediaTest.php +++ b/tests/lib/FieldType/MediaTest.php @@ -664,7 +664,7 @@ public function provideInValidFieldSettings() ]; } - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'ezmedia'; } diff --git a/tests/lib/FieldType/RelationListTest.php b/tests/lib/FieldType/RelationListTest.php index 86b36448ae..d452daec28 100644 --- a/tests/lib/FieldType/RelationListTest.php +++ b/tests/lib/FieldType/RelationListTest.php @@ -850,7 +850,7 @@ public function testGetRelations() ); } - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'ezobjectrelationlist'; } diff --git a/tests/lib/FieldType/RelationTest.php b/tests/lib/FieldType/RelationTest.php index 9fd4197903..54a149a8a1 100644 --- a/tests/lib/FieldType/RelationTest.php +++ b/tests/lib/FieldType/RelationTest.php @@ -451,7 +451,7 @@ private function generateContentTypeValidationError(string $contentTypeIdentifie ); } - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'ezobjectrelation'; } diff --git a/tests/lib/FieldType/SelectionTest.php b/tests/lib/FieldType/SelectionTest.php index 76bd9f71cc..7b05fc327e 100644 --- a/tests/lib/FieldType/SelectionTest.php +++ b/tests/lib/FieldType/SelectionTest.php @@ -328,7 +328,7 @@ public function provideInValidFieldSettings() ]; } - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'ezselection'; } diff --git a/tests/lib/FieldType/TextBlockTest.php b/tests/lib/FieldType/TextBlockTest.php index 59b5a3179b..8bc10e2c72 100644 --- a/tests/lib/FieldType/TextBlockTest.php +++ b/tests/lib/FieldType/TextBlockTest.php @@ -171,7 +171,7 @@ public function provideInValidFieldSettings(): array ]; } - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'eztext'; } diff --git a/tests/lib/FieldType/TextLineTest.php b/tests/lib/FieldType/TextLineTest.php index 2e20e03487..c105184f20 100644 --- a/tests/lib/FieldType/TextLineTest.php +++ b/tests/lib/FieldType/TextLineTest.php @@ -270,7 +270,7 @@ public function provideInvalidValidatorConfiguration(): array ]; } - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'ezstring'; } diff --git a/tests/lib/FieldType/TimeTest.php b/tests/lib/FieldType/TimeTest.php index ca3ec0f93d..c7cf1c510d 100644 --- a/tests/lib/FieldType/TimeTest.php +++ b/tests/lib/FieldType/TimeTest.php @@ -346,7 +346,7 @@ public function provideInValidFieldSettings() ]; } - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'eztime'; } diff --git a/tests/lib/FieldType/UrlTest.php b/tests/lib/FieldType/UrlTest.php index 98f6d7de64..40de5967cd 100644 --- a/tests/lib/FieldType/UrlTest.php +++ b/tests/lib/FieldType/UrlTest.php @@ -243,7 +243,7 @@ public function provideInputForFromHash() ]; } - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'ezurl'; } diff --git a/tests/lib/FieldType/UserTest.php b/tests/lib/FieldType/UserTest.php index eb00e99d34..eddebb1ef4 100644 --- a/tests/lib/FieldType/UserTest.php +++ b/tests/lib/FieldType/UserTest.php @@ -835,7 +835,7 @@ public function provideInValidFieldSettings(): array ]; } - protected function provideFieldTypeIdentifier() + protected function provideFieldTypeIdentifier(): string { return 'ezuser'; } diff --git a/tests/lib/IO/IOServiceTest.php b/tests/lib/IO/IOServiceTest.php index 80e8f2049b..9d473927c2 100644 --- a/tests/lib/IO/IOServiceTest.php +++ b/tests/lib/IO/IOServiceTest.php @@ -128,7 +128,7 @@ public function testCreateBinaryFile(BinaryFileCreateStruct $createStruct) ->method('create') ->with( self::callback( - static function ($subject) use ($id) { + static function ($subject) use ($id): bool { if (!$subject instanceof SPIBinaryFileCreateStruct) { return false; } @@ -396,7 +396,7 @@ protected function getIOService() */ private function getSPIBinaryFileCreateStructCallback($spiId): \Closure { - return static function ($subject) use ($spiId) { + return static function ($subject) use ($spiId): bool { if (!$subject instanceof SPIBinaryFileCreateStruct) { return false; } diff --git a/tests/lib/IO/MimeTypeDetector/FileInfoTest.php b/tests/lib/IO/MimeTypeDetector/FileInfoTest.php index 3b89c720d1..8bf1beac7b 100644 --- a/tests/lib/IO/MimeTypeDetector/FileInfoTest.php +++ b/tests/lib/IO/MimeTypeDetector/FileInfoTest.php @@ -20,7 +20,7 @@ protected function setUp(): void $this->mimeTypeDetector = new MimeTypeDetector(); } - protected function getFixture() + protected function getFixture(): string { return __DIR__ . '/../../_fixtures/squirrel-developers.jpg'; } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizerTest.php index 9388725b48..f496e68738 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizerTest.php @@ -15,20 +15,30 @@ use Ibexa\Tests\Core\MVC\Symfony\Component\Serializer\Stubs\MatcherStub; use Ibexa\Tests\Core\MVC\Symfony\Component\Serializer\Stubs\SerializerStub; use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; +use Symfony\Component\Serializer\Serializer; final class CompoundMatcherNormalizerTest extends TestCase { public function testNormalization(): void { $matcher = new CompoundStub([]); - $matcher->setSubMatchers([ - 'foo' => new MatcherStub('foo'), - 'bar' => new MatcherStub('bar'), - 'baz' => new MatcherStub('baz'), - ]); + $matcher->setSubMatchers( + [ + 'foo' => new MatcherStub('foo'), + 'bar' => new MatcherStub('bar'), + 'baz' => new MatcherStub('baz'), + ] + ); $normalizer = new CompoundMatcherNormalizer(); - $normalizer->setSerializer(new SerializerStub()); + $serializer = new Serializer( + [ + $normalizer, + new SerializerStub(), + new ObjectNormalizer(), + ] + ); self::assertEquals( [ @@ -40,7 +50,7 @@ public function testNormalization(): void 'config' => [], 'matchersMap' => [], ], - $normalizer->normalize($matcher) + $serializer->normalize($matcher) ); } @@ -52,6 +62,9 @@ public function testSupportsNormalization(): void self::assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); } + /** + * @throws \JsonException + */ public function testSupportsDenormalization(): void { $normalizer = new CompoundMatcherNormalizer(); @@ -63,7 +76,8 @@ public function testSupportsDenormalization(): void ], 'config' => [], 'matchersMap' => [], - ] + ], + JSON_THROW_ON_ERROR ); self::assertTrue($normalizer->supportsDenormalization($data, Compound::class, 'json')); diff --git a/tests/lib/MVC/Symfony/Component/Serializer/HostElementNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/HostElementNormalizerTest.php index 6821ad5e24..8f2ace75c3 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/HostElementNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/HostElementNormalizerTest.php @@ -12,15 +12,24 @@ use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\HostElement; -use Ibexa\Tests\Core\MVC\Symfony\Component\Serializer\Stubs\SerializerStub; use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; +use Symfony\Component\Serializer\Serializer; +/** + * @covers \Ibexa\Core\MVC\Symfony\Component\Serializer\HostElementNormalizer + */ final class HostElementNormalizerTest extends TestCase { public function testNormalization(): void { $normalizer = new HostElementNormalizer(); - $normalizer->setSerializer(new SerializerStub()); + $serializer = new Serializer( + [ + $normalizer, + new ObjectNormalizer(), + ] + ); $matcher = new HostElement(2); // Set request and invoke match to initialize HostElement::$hostElements @@ -35,7 +44,7 @@ public function testNormalization(): void 'dev', ], ], - $normalizer->normalize($matcher) + $serializer->normalize($matcher) ); } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/HostTextNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/HostTextNormalizerTest.php index 6f34cf217f..599f0876f6 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/HostTextNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/HostTextNormalizerTest.php @@ -11,15 +11,21 @@ use Ibexa\Core\MVC\Symfony\Component\Serializer\HostTextNormalizer; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\HostText; -use Ibexa\Tests\Core\MVC\Symfony\Component\Serializer\Stubs\SerializerStub; use Ibexa\Tests\Core\Search\TestCase; +use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; +use Symfony\Component\Serializer\Serializer; final class HostTextNormalizerTest extends TestCase { public function testNormalize(): void { $normalizer = new HostTextNormalizer(); - $normalizer->setSerializer(new SerializerStub()); + $serializer = new Serializer( + [ + $normalizer, + new ObjectNormalizer(), + ] + ); $matcher = new HostText([ 'prefix' => 'foo', @@ -33,7 +39,7 @@ public function testNormalize(): void 'suffix' => 'bar', ], ], - $normalizer->normalize($matcher) + $serializer->normalize($matcher) ); } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/RegexHostNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/RegexHostNormalizerTest.php index 978c74d60b..720a300081 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/RegexHostNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/RegexHostNormalizerTest.php @@ -11,15 +11,21 @@ use Ibexa\Core\MVC\Symfony\Component\Serializer\RegexHostNormalizer; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Regex\Host; -use Ibexa\Tests\Core\MVC\Symfony\Component\Serializer\Stubs\SerializerStub; use Ibexa\Tests\Core\Search\TestCase; +use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; +use Symfony\Component\Serializer\Serializer; final class RegexHostNormalizerTest extends TestCase { public function testNormalize(): void { $normalizer = new RegexHostNormalizer(); - $normalizer->setSerializer(new SerializerStub()); + $serializer = new Serializer( + [ + $normalizer, + new ObjectNormalizer(), + ] + ); $matcher = new Host([ 'regex' => '/^Foo(.*)/(.*)/', @@ -33,7 +39,7 @@ public function testNormalize(): void 'itemNumber' => 2, ], ], - $normalizer->normalize($matcher) + $serializer->normalize($matcher) ); } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/RegexURINormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/RegexURINormalizerTest.php index acdef30d8f..2fa16c2e36 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/RegexURINormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/RegexURINormalizerTest.php @@ -11,15 +11,21 @@ use Ibexa\Core\MVC\Symfony\Component\Serializer\RegexURINormalizer; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Regex\URI; -use Ibexa\Tests\Core\MVC\Symfony\Component\Serializer\Stubs\SerializerStub; use Ibexa\Tests\Core\Search\TestCase; +use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; +use Symfony\Component\Serializer\Serializer; final class RegexURINormalizerTest extends TestCase { public function testNormalize(): void { $normalizer = new RegexURINormalizer(); - $normalizer->setSerializer(new SerializerStub()); + $serializer = new Serializer( + [ + $normalizer, + new ObjectNormalizer(), + ] + ); $matcher = new URI([ 'regex' => '/^Foo(.*)/(.*)/', @@ -33,7 +39,7 @@ public function testNormalize(): void 'itemNumber' => 2, ], ], - $normalizer->normalize($matcher) + $serializer->normalize($matcher) ); } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/SerializerStub.php b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/SerializerStub.php index 45c5bd79c5..0da03526c4 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/SerializerStub.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/SerializerStub.php @@ -23,7 +23,7 @@ public function deserialize($data, $type, $format, array $context = []) throw new NotImplementedException(__METHOD__); } - public function normalize($object, string $format = null, array $context = []) + public function normalize($object, string $format = null, array $context = []): array|bool|string|int|float|null|\ArrayObject { if (is_array($object)) { $result = []; @@ -43,8 +43,8 @@ public function normalize($object, string $format = null, array $context = []) return $object; } - public function supportsNormalization($data, string $format = null) + public function supportsNormalization($data, string $format = null): bool { - return true; + return $data instanceof MatcherStub; } } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/URIElementNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/URIElementNormalizerTest.php index ee02ddd759..6607fa1901 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/URIElementNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/URIElementNormalizerTest.php @@ -12,15 +12,21 @@ use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\URIElement; -use Ibexa\Tests\Core\MVC\Symfony\Component\Serializer\Stubs\SerializerStub; use PHPUnit\Framework\TestCase; +use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; +use Symfony\Component\Serializer\Serializer; final class URIElementNormalizerTest extends TestCase { public function testNormalization(): void { $normalizer = new URIElementNormalizer(); - $normalizer->setSerializer(new SerializerStub()); + $serializer = new Serializer( + [ + $normalizer, + new ObjectNormalizer(), + ] + ); $matcher = new URIElement(2); // Set request and invoke match to initialize HostElement::$hostElements @@ -32,7 +38,7 @@ public function testNormalization(): void 'elementNumber' => 2, 'uriElements' => ['foo', 'bar'], ], - $normalizer->normalize($matcher) + $serializer->normalize($matcher) ); } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/URITextNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/URITextNormalizerTest.php index e9940c4c23..e3ebe2fea9 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/URITextNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/URITextNormalizerTest.php @@ -11,15 +11,21 @@ use Ibexa\Core\MVC\Symfony\Component\Serializer\URITextNormalizer; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\URIText; -use Ibexa\Tests\Core\MVC\Symfony\Component\Serializer\Stubs\SerializerStub; use Ibexa\Tests\Core\Search\TestCase; +use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; +use Symfony\Component\Serializer\Serializer; final class URITextNormalizerTest extends TestCase { public function testNormalize(): void { $normalizer = new URITextNormalizer(); - $normalizer->setSerializer(new SerializerStub()); + $serializer = new Serializer( + [ + $normalizer, + new ObjectNormalizer(), + ] + ); $matcher = new URIText([ 'prefix' => 'foo', @@ -33,7 +39,7 @@ public function testNormalize(): void 'suffix' => 'bar', ], ], - $normalizer->normalize($matcher) + $serializer->normalize($matcher) ); } diff --git a/tests/lib/MVC/Symfony/EventListener/SiteAccessMatchListenerTest.php b/tests/lib/MVC/Symfony/EventListener/SiteAccessMatchListenerTest.php index f562dd4641..dbe053643c 100644 --- a/tests/lib/MVC/Symfony/EventListener/SiteAccessMatchListenerTest.php +++ b/tests/lib/MVC/Symfony/EventListener/SiteAccessMatchListenerTest.php @@ -82,7 +82,7 @@ public function testOnKernelRequestSerializedSA() $event = new RequestEvent( $this->createMock(HttpKernelInterface::class), $request, - HttpKernelInterface::MASTER_REQUEST + HttpKernelInterface::MAIN_REQUEST ); $this->saRouter @@ -138,7 +138,7 @@ public function testOnKernelRequestSerializedSAWithCompoundMatcher() $event = new RequestEvent( $this->createMock(HttpKernelInterface::class), $request, - HttpKernelInterface::MASTER_REQUEST + HttpKernelInterface::MAIN_REQUEST ); $this->saRouter @@ -164,7 +164,7 @@ public function testOnKernelRequestSiteAccessPresent() $event = new RequestEvent( $this->createMock(HttpKernelInterface::class), $request, - HttpKernelInterface::MASTER_REQUEST + HttpKernelInterface::MAIN_REQUEST ); $this->saRouter @@ -192,7 +192,7 @@ public function testOnKernelRequest() $event = new RequestEvent( $this->createMock(HttpKernelInterface::class), $request, - HttpKernelInterface::MASTER_REQUEST + HttpKernelInterface::MAIN_REQUEST ); $simplifiedRequest = new SimplifiedRequest( @@ -236,7 +236,7 @@ public function testOnKernelRequestUserHashWithOriginalRequest() $event = new RequestEvent( $this->createMock(HttpKernelInterface::class), $request, - HttpKernelInterface::MASTER_REQUEST + HttpKernelInterface::MAIN_REQUEST ); $simplifiedRequest = new SimplifiedRequest( diff --git a/tests/lib/MVC/Symfony/Security/InteractiveLoginTokenTest.php b/tests/lib/MVC/Symfony/Security/InteractiveLoginTokenTest.php index 9b026077b9..e029d0f3c1 100644 --- a/tests/lib/MVC/Symfony/Security/InteractiveLoginTokenTest.php +++ b/tests/lib/MVC/Symfony/Security/InteractiveLoginTokenTest.php @@ -34,7 +34,7 @@ public function testConstruct() self::assertTrue($token->isAuthenticated()); self::assertSame($originalTokenType, $token->getOriginalTokenType()); self::assertSame($credentials, $token->getCredentials()); - self::assertSame($providerKey, $token->getProviderKey()); + self::assertSame($providerKey, $token->getFirewallName()); self::assertEquals($expectedRoles, $token->getRoleNames()); } diff --git a/tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php b/tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php index b4f5e74957..03a46c3ce3 100644 --- a/tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php +++ b/tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php @@ -106,7 +106,7 @@ public function testExpectedMethodRenderArgumentsFormat(): void ->method('getName') ->willReturn('method_b'); - $controllerReferenceCallback = self::callback(function (ControllerReference $controllerReference) { + $controllerReferenceCallback = self::callback(function (ControllerReference $controllerReference): bool { $this->assertInstanceOf(ControllerReference::class, $controllerReference); $this->assertEquals('ibexa_content::viewAction', $controllerReference->controller); $this->assertSame([ diff --git a/tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php b/tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php index 39f64bbdd0..0b2c55b949 100644 --- a/tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php +++ b/tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php @@ -107,7 +107,7 @@ public function testExpectedMethodRenderRequestFormat(): void ->method('getName') ->willReturn('method_b'); - $controllerReferenceCallback = self::callback(function (ControllerReference $controllerReference) { + $controllerReferenceCallback = self::callback(function (ControllerReference $controllerReference): bool { $this->assertInstanceOf(ControllerReference::class, $controllerReference); $this->assertEquals('ibexa_content::viewAction', $controllerReference->controller); $this->assertSame([ diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php index 238318a116..9314bc9844 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php @@ -132,7 +132,7 @@ protected function getContent($contentTypeIdentifier, array $fieldsData, array $ return $content; } - private function getTemplatePath($tpl) + private function getTemplatePath($tpl): string { return 'templates/' . $tpl; } diff --git a/tests/lib/MVC/Symfony/View/AbstractViewTest.php b/tests/lib/MVC/Symfony/View/AbstractViewTest.php index 43ceba3a19..324ee6133f 100644 --- a/tests/lib/MVC/Symfony/View/AbstractViewTest.php +++ b/tests/lib/MVC/Symfony/View/AbstractViewTest.php @@ -102,7 +102,7 @@ public function goodTemplateIdentifierProvider(): array return [ ['foo:bar:baz.html.twig'], [ - static function () { + static function (): string { return 'foo'; }, ], diff --git a/tests/lib/MVC/Symfony/View/ContentViewTest.php b/tests/lib/MVC/Symfony/View/ContentViewTest.php index 34cfe01d98..0708c32dce 100644 --- a/tests/lib/MVC/Symfony/View/ContentViewTest.php +++ b/tests/lib/MVC/Symfony/View/ContentViewTest.php @@ -43,13 +43,13 @@ public function constructProvider() ['another::identifier', []], ['oops:i_did_it:again', ['singer' => 'Britney Spears']], [ - static function () { + static function (): bool { return true; }, [], ], [ - static function () { + static function (): bool { return true; }, ['truc' => 'muche'], diff --git a/tests/lib/MVC/Symfony/View/ViewManagerTest.php b/tests/lib/MVC/Symfony/View/ViewManagerTest.php index 7eec2b1e53..717b0c4caf 100644 --- a/tests/lib/MVC/Symfony/View/ViewManagerTest.php +++ b/tests/lib/MVC/Symfony/View/ViewManagerTest.php @@ -146,7 +146,7 @@ public function testRenderContentWithClosure() ); // Configuring view provider behaviour - $closure = static function ($params) { + $closure = static function ($params): string { return serialize(array_keys($params)); }; $params = ['foo' => 'bar']; @@ -279,7 +279,7 @@ public function testRenderLocationWithClosure() $location = new Location(['contentInfo' => new ContentInfo()]); // Configuring view provider behaviour - $closure = static function ($params) { + $closure = static function ($params): string { return serialize(array_keys($params)); }; $params = ['foo' => 'bar']; diff --git a/tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php index e96a820e97..44a6221750 100644 --- a/tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php @@ -98,11 +98,11 @@ public function dataProviderForLoadUserBookmarks(): array $fixtures = (require __DIR__ . '/../_fixtures/bookmarks.php')[DoctrineDatabase::TABLE_BOOKMARKS]; $expectedRows = static function ($userId) use ($fixtures) { - $rows = array_filter($fixtures, static function (array $row) use ($userId) { + $rows = array_filter($fixtures, static function (array $row) use ($userId): bool { return $row['user_id'] == $userId; }); - usort($rows, static function ($a, $b) { + usort($rows, static function ($a, $b): int { return $b['id'] <=> $a['id']; }); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php index f34addff09..26e72c3ba8 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php @@ -327,7 +327,7 @@ public function testToFieldDefinitionWithAdjustmentNoSeconds() * * @return string */ - private function getXMLStringFromDateInterval(DateInterval $dateInterval) + private function getXMLStringFromDateInterval(DateInterval $dateInterval): string { $xmlString = << diff --git a/tests/lib/Persistence/Legacy/TestCase.php b/tests/lib/Persistence/Legacy/TestCase.php index f93541c59d..69ba684347 100644 --- a/tests/lib/Persistence/Legacy/TestCase.php +++ b/tests/lib/Persistence/Legacy/TestCase.php @@ -165,7 +165,7 @@ protected static function getResultTextRepresentation(array $result) return implode( "\n", array_map( - static function ($row) { + static function ($row): string { return implode(', ', $row); }, $result @@ -297,7 +297,7 @@ protected function getPublicPropertyNames($object) $refl = new ReflectionObject($object); return array_map( - static function ($prop) { + static function ($prop): string { return $prop->getName(); }, $refl->getProperties(ReflectionProperty::IS_PUBLIC) diff --git a/tests/lib/Persistence/Legacy/User/UserHandlerTest.php b/tests/lib/Persistence/Legacy/User/UserHandlerTest.php index 3af2a2eeeb..ae0cfc0d8f 100644 --- a/tests/lib/Persistence/Legacy/User/UserHandlerTest.php +++ b/tests/lib/Persistence/Legacy/User/UserHandlerTest.php @@ -923,12 +923,12 @@ public function testLoadPoliciesForUser() self::assertTrue( array_reduce( array_map( - static function ($policy) { + static function ($policy): bool { return $policy instanceof Persistence\User\Policy; }, $policies ), - static function ($a, $b) { + static function ($a, $b): bool { return $a && $b; }, true diff --git a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedParserTest.php b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedParserTest.php index c8d8dc9d83..4ad3164640 100644 --- a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedParserTest.php +++ b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedParserTest.php @@ -15,14 +15,21 @@ */ class TransformationProcessorDefinitionBasedParserTest extends TestCase { - public static function getTestFiles() + /** + * @phpstan-return array + */ + public static function getTestFiles(): array { - return array_map( - static function ($file) { - return [realpath($file)]; - }, - glob(__DIR__ . '/_fixtures/transformations/*.tr') - ); + $glob = glob(__DIR__ . '/_fixtures/transformations/*.tr'); + + return false !== $glob + ? array_map( + static function (string $file) { + return [realpath($file)]; + }, + $glob + ) + : []; } /** diff --git a/tests/lib/Repository/Service/Mock/RoleTest.php b/tests/lib/Repository/Service/Mock/RoleTest.php index 325bdceec5..d44e615251 100644 --- a/tests/lib/Repository/Service/Mock/RoleTest.php +++ b/tests/lib/Repository/Service/Mock/RoleTest.php @@ -204,7 +204,7 @@ public function testUpdatePolicyThrowsLimitationValidationException() ->method('__get') ->will( self::returnCallback( - static function ($propertyName) { + static function ($propertyName): ?string { switch ($propertyName) { case 'module': return 'mockModule'; diff --git a/tests/lib/Repository/SiteAccessAware/ContentServiceTest.php b/tests/lib/Repository/SiteAccessAware/ContentServiceTest.php index 62446a7ab8..0990be3e1f 100644 --- a/tests/lib/Repository/SiteAccessAware/ContentServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/ContentServiceTest.php @@ -31,12 +31,12 @@ */ class ContentServiceTest extends AbstractServiceTest { - public function getAPIServiceClassName() + public function getAPIServiceClassName(): string { return APIService::class; } - public function getSiteAccessAwareServiceClassName() + public function getSiteAccessAwareServiceClassName(): string { return ContentService::class; } diff --git a/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php b/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php index a9a7042d79..7327d4eee9 100644 --- a/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php @@ -23,12 +23,12 @@ class ContentTypeServiceTest extends AbstractServiceTest { - public function getAPIServiceClassName() + public function getAPIServiceClassName(): string { return APIService::class; } - public function getSiteAccessAwareServiceClassName() + public function getSiteAccessAwareServiceClassName(): string { return ContentTypeService::class; } diff --git a/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php b/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php index f8848c1c2f..666ee1d01e 100644 --- a/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php @@ -14,12 +14,12 @@ class LanguageServiceTest extends AbstractServiceTest { - public function getAPIServiceClassName() + public function getAPIServiceClassName(): string { return APIService::class; } - public function getSiteAccessAwareServiceClassName() + public function getSiteAccessAwareServiceClassName(): string { return LanguageService::class; } diff --git a/tests/lib/Repository/SiteAccessAware/LocationServiceTest.php b/tests/lib/Repository/SiteAccessAware/LocationServiceTest.php index 54c9dd1099..3ed7b2a8d8 100644 --- a/tests/lib/Repository/SiteAccessAware/LocationServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/LocationServiceTest.php @@ -20,12 +20,12 @@ class LocationServiceTest extends AbstractServiceTest { - public function getAPIServiceClassName() + public function getAPIServiceClassName(): string { return APIService::class; } - public function getSiteAccessAwareServiceClassName() + public function getSiteAccessAwareServiceClassName(): string { return LocationService::class; } diff --git a/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php b/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php index 20a4cae470..178367644b 100644 --- a/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php @@ -19,12 +19,12 @@ class ObjectStateServiceTest extends AbstractServiceTest { - public function getAPIServiceClassName() + public function getAPIServiceClassName(): string { return APIService::class; } - public function getSiteAccessAwareServiceClassName() + public function getSiteAccessAwareServiceClassName(): string { return ObjectStateService::class; } diff --git a/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php b/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php index 34ea7e41bf..9d7e85a428 100644 --- a/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php @@ -16,12 +16,12 @@ class SearchServiceTest extends AbstractServiceTest { - public function getAPIServiceClassName() + public function getAPIServiceClassName(): string { return APIService::class; } - public function getSiteAccessAwareServiceClassName() + public function getSiteAccessAwareServiceClassName(): string { return SearchService::class; } diff --git a/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php b/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php index 5f9980a216..30279d2456 100644 --- a/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php @@ -18,12 +18,12 @@ class TrashServiceTest extends AbstractServiceTest { - public function getAPIServiceClassName() + public function getAPIServiceClassName(): string { return APIService::class; } - public function getSiteAccessAwareServiceClassName() + public function getSiteAccessAwareServiceClassName(): string { return TrashService::class; } diff --git a/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php b/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php index 160828947f..fc600a2f80 100644 --- a/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php @@ -14,12 +14,12 @@ class UrlAliasServiceTest extends AbstractServiceTest { - public function getAPIServiceClassName() + public function getAPIServiceClassName(): string { return APIService::class; } - public function getSiteAccessAwareServiceClassName() + public function getSiteAccessAwareServiceClassName(): string { return URLAliasService::class; } diff --git a/tests/lib/Repository/SiteAccessAware/UserServiceTest.php b/tests/lib/Repository/SiteAccessAware/UserServiceTest.php index a27572d3f7..c37cc72a85 100644 --- a/tests/lib/Repository/SiteAccessAware/UserServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/UserServiceTest.php @@ -24,12 +24,12 @@ class UserServiceTest extends AbstractServiceTest { - public function getAPIServiceClassName() + public function getAPIServiceClassName(): string { return APIService::class; } - public function getSiteAccessAwareServiceClassName() + public function getSiteAccessAwareServiceClassName(): string { return UserService::class; } diff --git a/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php b/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php index be4d4cce44..75c42f537f 100644 --- a/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php @@ -113,7 +113,7 @@ protected function getContentMapperMock() ->with(self::isType('array')) ->will( self::returnCallback( - static function ($rows) { + static function ($rows): array { $contentInfoObjs = []; foreach ($rows as $row) { $contentId = (int)$row['id']; diff --git a/tests/lib/Search/Legacy/Content/HandlerContentTest.php b/tests/lib/Search/Legacy/Content/HandlerContentTest.php index ac184d25ae..26befbcdcf 100644 --- a/tests/lib/Search/Legacy/Content/HandlerContentTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerContentTest.php @@ -212,7 +212,7 @@ protected function getContentMapperMock() ->with(self::isType('array')) ->will( self::returnCallback( - static function ($rows) { + static function ($rows): array { $contentInfoObjs = []; foreach ($rows as $row) { $contentId = (int)$row['id']; diff --git a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php index d5264353a4..9c9865ea75 100644 --- a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php @@ -121,7 +121,7 @@ protected function getLocationMapperMock() ->with(self::isType('array')) ->will( self::returnCallback( - static function ($rows) { + static function ($rows): array { $locations = []; foreach ($rows as $row) { $locationId = (int)$row['node_id']; diff --git a/tests/lib/Search/Legacy/Content/HandlerLocationTest.php b/tests/lib/Search/Legacy/Content/HandlerLocationTest.php index 8761d99507..3d6ef6da82 100644 --- a/tests/lib/Search/Legacy/Content/HandlerLocationTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerLocationTest.php @@ -182,7 +182,7 @@ protected function getLocationMapperMock() ->with(self::isType('array')) ->will( self::returnCallback( - static function ($rows) { + static function ($rows): array { $locations = []; foreach ($rows as $row) { $locationId = (int)$row['node_id']; From 282cfbbf9dcaf60d8a19b86e4497095f3ac7fdde Mon Sep 17 00:00:00 2001 From: Konrad Oboza Date: Tue, 3 Sep 2024 18:34:46 +0200 Subject: [PATCH 35/53] IBX-8804: Moved `PASSWORD_HASH_OAUTH2` from `ibexa/oauth2-client` (#419) --- phpstan-baseline.neon | 35 ----------- src/contracts/Repository/Values/User/User.php | 58 +++++-------------- .../Exception/UnsupportedPasswordHashType.php | 2 +- .../Repository/User/PasswordHashService.php | 15 +++-- .../User/PasswordHashServiceInterface.php | 19 ------ .../User/PasswordHashServiceTest.php | 6 +- tests/lib/Repository/Values/User/UserTest.php | 56 ++---------------- 7 files changed, 37 insertions(+), 154 deletions(-) delete mode 100644 src/lib/Repository/User/PasswordHashServiceInterface.php diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 1bb7256ea2..b66728adf6 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -60560,41 +60560,6 @@ parameters: count: 1 path: tests/lib/Repository/Values/User/UserTest.php - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\Repository\\\\Values\\\\User\\\\UserTest\\:\\:testGetName\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/Repository/Values/User/UserTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\Repository\\\\Values\\\\User\\\\UserTest\\:\\:testIsPropertySet\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/Repository/Values/User/UserTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\Repository\\\\Values\\\\User\\\\UserTest\\:\\:testMissingProperty\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/Repository/Values/User/UserTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\Repository\\\\Values\\\\User\\\\UserTest\\:\\:testNewClass\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/Repository/Values/User/UserTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\Repository\\\\Values\\\\User\\\\UserTest\\:\\:testObjectProperties\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/Repository/Values/User/UserTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\Repository\\\\Values\\\\User\\\\UserTest\\:\\:testReadOnlyProperty\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/Repository/Values/User/UserTest.php - - - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\Repository\\\\Values\\\\User\\\\UserTest\\:\\:testUnsetProperty\\(\\) has no return type specified\\.$#" - count: 1 - path: tests/lib/Repository/Values/User/UserTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\Search\\\\Common\\\\FieldValueMapper\\\\RemoteIdentifierMapperTest\\:\\:getDataForTestCanMap\\(\\) return type has no value type specified in iterable type iterable\\.$#" count: 1 diff --git a/src/contracts/Repository/Values/User/User.php b/src/contracts/Repository/Values/User/User.php index 37de429c59..07457de91c 100644 --- a/src/contracts/Repository/Values/User/User.php +++ b/src/contracts/Repository/Values/User/User.php @@ -8,6 +8,7 @@ namespace Ibexa\Contracts\Core\Repository\Values\User; +use DateTimeInterface; use Ibexa\Contracts\Core\Repository\Values\Content\Content; /** @@ -24,63 +25,36 @@ abstract class User extends Content implements UserReference /** * @var int[] List of supported (by default) hash types. */ - public const SUPPORTED_PASSWORD_HASHES = [ + public const array SUPPORTED_PASSWORD_HASHES = [ self::PASSWORD_HASH_BCRYPT, self::PASSWORD_HASH_PHP_DEFAULT, + self::PASSWORD_HASH_INVALID, ]; - /** @var int Passwords in bcrypt */ - public const PASSWORD_HASH_BCRYPT = 6; + public const int PASSWORD_HASH_BCRYPT = 6; - /** @var int Passwords hashed by PHPs default algorithm, which may change over time */ - public const PASSWORD_HASH_PHP_DEFAULT = 7; + public const int PASSWORD_HASH_PHP_DEFAULT = 7; - /** @var int Default password hash, used when none is specified, may change over time */ - public const DEFAULT_PASSWORD_HASH = self::PASSWORD_HASH_PHP_DEFAULT; + public const int PASSWORD_HASH_INVALID = 256; - /** - * User login. - * - * @var string - */ - protected $login; + public const int DEFAULT_PASSWORD_HASH = self::PASSWORD_HASH_PHP_DEFAULT; - /** - * User E-Mail address. - * - * @var string - */ - protected $email; + protected string $login; - /** - * User password hash. - * - * @var string - */ - protected $passwordHash; + protected string $email; - /** - * Datetime of last password update. - * - * @var \DateTimeInterface|null - */ - protected $passwordUpdatedAt; + protected string $passwordHash; - /** - * Hash algorithm used to hash the password. - * - * @var int - */ - protected $hashAlgorithm; + protected ?DateTimeInterface $passwordUpdatedAt; + + protected int $hashAlgorithm; /** * Flag to signal if user is enabled or not. * - * User can not login if false - * - * @var bool + * User cannot login if false */ - protected $enabled = false; + protected bool $enabled = false; /** * Max number of time user is allowed to login. @@ -90,7 +64,7 @@ abstract class User extends Content implements UserReference * * @var int */ - protected $maxLogin; + protected int $maxLogin; public function getUserId(): int { diff --git a/src/lib/Repository/User/Exception/UnsupportedPasswordHashType.php b/src/lib/Repository/User/Exception/UnsupportedPasswordHashType.php index 104a3cf7ce..b71aecf7ac 100644 --- a/src/lib/Repository/User/Exception/UnsupportedPasswordHashType.php +++ b/src/lib/Repository/User/Exception/UnsupportedPasswordHashType.php @@ -10,7 +10,7 @@ use Ibexa\Core\Base\Exceptions\InvalidArgumentException; -class UnsupportedPasswordHashType extends InvalidArgumentException +final class UnsupportedPasswordHashType extends InvalidArgumentException { public function __construct(int $hashType) { diff --git a/src/lib/Repository/User/PasswordHashService.php b/src/lib/Repository/User/PasswordHashService.php index f0bebb85dd..6f6edd8f30 100644 --- a/src/lib/Repository/User/PasswordHashService.php +++ b/src/lib/Repository/User/PasswordHashService.php @@ -8,16 +8,16 @@ namespace Ibexa\Core\Repository\User; +use Ibexa\Contracts\Core\Repository\PasswordHashService as APIPasswordHashService; use Ibexa\Contracts\Core\Repository\Values\User\User; use Ibexa\Core\Repository\User\Exception\UnsupportedPasswordHashType; /** * @internal */ -final class PasswordHashService implements PasswordHashServiceInterface +final class PasswordHashService implements APIPasswordHashService { - /** @var int */ - private $defaultHashType; + private int $defaultHashType; public function __construct(int $hashType = User::DEFAULT_PASSWORD_HASH) { @@ -56,6 +56,9 @@ public function createPasswordHash( case User::PASSWORD_HASH_PHP_DEFAULT: return password_hash($password, PASSWORD_DEFAULT); + case User::PASSWORD_HASH_INVALID: + return ''; + default: throw new UnsupportedPasswordHashType($hashType); } @@ -68,7 +71,11 @@ public function isValidPassword( string $passwordHash, ?int $hashType = null ): bool { - if ($hashType === User::PASSWORD_HASH_BCRYPT || $hashType === User::PASSWORD_HASH_PHP_DEFAULT) { + if ( + $hashType === User::PASSWORD_HASH_BCRYPT + || $hashType === User::PASSWORD_HASH_PHP_DEFAULT + || $hashType === User::PASSWORD_HASH_INVALID + ) { // In case of bcrypt let PHP's password functionality do its magic return password_verify($plainPassword, $passwordHash); } diff --git a/src/lib/Repository/User/PasswordHashServiceInterface.php b/src/lib/Repository/User/PasswordHashServiceInterface.php deleted file mode 100644 index 9d23de7744..0000000000 --- a/src/lib/Repository/User/PasswordHashServiceInterface.php +++ /dev/null @@ -1,19 +0,0 @@ -passwordHashService->getSupportedHashTypes() ); diff --git a/tests/lib/Repository/Values/User/UserTest.php b/tests/lib/Repository/Values/User/UserTest.php index af686d7c57..ada2c2df8c 100644 --- a/tests/lib/Repository/Values/User/UserTest.php +++ b/tests/lib/Repository/Values/User/UserTest.php @@ -18,34 +18,11 @@ /** * @covers \Ibexa\Core\Repository\Values\User\User */ -class UserTest extends TestCase +final class UserTest extends TestCase { use ValueObjectTestTrait; - /** - * Test a new class and default values on properties. - */ - public function testNewClass() - { - $user = new User(); - - $this->assertPropertiesCorrect( - [ - 'login' => null, - 'email' => null, - 'passwordHash' => null, - 'hashAlgorithm' => null, - 'maxLogin' => null, - 'enabled' => false, - ], - $user - ); - } - - /** - * Test getName method. - */ - public function testGetName() + public function testGetName(): void { $name = 'Translated name'; $contentMock = $this->createMock(Content::class); @@ -64,10 +41,7 @@ public function testGetName() self::assertEquals($name, $object->getName()); } - /** - * Test retrieving missing property. - */ - public function testMissingProperty() + public function testMissingProperty(): void { $this->expectException(PropertyNotFoundException::class); @@ -76,7 +50,7 @@ public function testMissingProperty() self::fail('Succeeded getting non existing property'); } - public function testObjectProperties() + public function testObjectProperties(): void { $object = new User(); $properties = $object->attributes(); @@ -98,22 +72,7 @@ public function testObjectProperties() } } - /** - * Test setting read only property. - */ - public function testReadOnlyProperty() - { - $this->expectException(PropertyReadOnlyException::class); - - $user = new User(); - $user->login = 'user'; - self::fail('Succeeded setting read only property'); - } - - /** - * Test if property exists. - */ - public function testIsPropertySet() + public function testIsPropertySet(): void { $user = new User(); $value = isset($user->notDefined); @@ -123,10 +82,7 @@ public function testIsPropertySet() self::assertTrue($value); } - /** - * Test unsetting a property. - */ - public function testUnsetProperty() + public function testUnsetProperty(): void { $this->expectException(PropertyReadOnlyException::class); From 18d40c6105fc0d0a6e3e9ae222c2e8267c09e026 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 17 Sep 2024 14:45:32 +0200 Subject: [PATCH 36/53] Improved strictness of URLChecker HTTPHandler and URL Value Object (#427) For more details see https://github.com/ibexa/core/pull/427 Key changes: * Fixed strict types for URLChecker HTTPHandler::createCurlHandlerForUrl * Introduced strict getters for URL ValueObject * Improved LogicException message * [PHPStan] Aligned baseline with the changes --- .../Core/URLChecker/Handler/HTTPHandler.php | 17 +++++----- src/contracts/Repository/Values/URL/URL.php | 31 +++++++++++++++++++ 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/src/bundle/Core/URLChecker/Handler/HTTPHandler.php b/src/bundle/Core/URLChecker/Handler/HTTPHandler.php index 34e6ddd5f2..a121c2c2af 100644 --- a/src/bundle/Core/URLChecker/Handler/HTTPHandler.php +++ b/src/bundle/Core/URLChecker/Handler/HTTPHandler.php @@ -7,7 +7,9 @@ namespace Ibexa\Bundle\Core\URLChecker\Handler; +use CurlHandle; use Ibexa\Contracts\Core\Repository\Values\URL\URL; +use LogicException; use Symfony\Component\OptionsResolver\OptionsResolver; class HTTPHandler extends AbstractConfigResolverBasedURLHandler @@ -108,20 +110,15 @@ public function getOptions(): array /** * Initialize and return a cURL session for given URL. * - * @param \Ibexa\Contracts\Core\Repository\Values\URL\URL $url - * @param array $handlers - * @param int $connectionTimeout - * @param int $timeout - * - * @return resource + * @param array $handlers */ - private function createCurlHandlerForUrl(URL $url, array &$handlers, int $connectionTimeout, int $timeout) + private function createCurlHandlerForUrl(URL $url, array &$handlers, int $connectionTimeout, int $timeout): CurlHandle { $options = $this->getOptions(); $handler = curl_init(); curl_setopt_array($handler, [ - CURLOPT_URL => $url->url, + CURLOPT_URL => $url->getUrl(), CURLOPT_RETURNTRANSFER => false, CURLOPT_FOLLOWLOCATION => true, CURLOPT_CONNECTTIMEOUT => $connectionTimeout, @@ -139,6 +136,10 @@ private function createCurlHandlerForUrl(URL $url, array &$handlers, int $connec $handlers[(int)$handler] = $url; + if (false === $handler) { + throw new LogicException("Failed to create Curl handler for '{$url->getUrl()}' URL", 1); + } + return $handler; } diff --git a/src/contracts/Repository/Values/URL/URL.php b/src/contracts/Repository/Values/URL/URL.php index 3febc00d4a..721d6d1506 100644 --- a/src/contracts/Repository/Values/URL/URL.php +++ b/src/contracts/Repository/Values/URL/URL.php @@ -8,6 +8,7 @@ namespace Ibexa\Contracts\Core\Repository\Values\URL; +use DateTimeInterface; use Ibexa\Contracts\Core\Repository\Values\ValueObject; class URL extends ValueObject @@ -53,4 +54,34 @@ class URL extends ValueObject * @var \DateTimeInterface */ protected $modified; + + public function getId(): int + { + return $this->id; + } + + public function getUrl(): string + { + return $this->url; + } + + public function isValid(): bool + { + return $this->isValid; + } + + public function getLastChecked(): ?DateTimeInterface + { + return $this->lastChecked; + } + + public function getCreated(): ?DateTimeInterface + { + return $this->created; + } + + public function getModified(): ?DateTimeInterface + { + return $this->modified; + } } From c57c22942e412e973d11153d0b17a8db05f86e46 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Sat, 28 Sep 2024 16:51:07 +0200 Subject: [PATCH 37/53] [Tests] Migrated deprecated PHPUnit configuration (#429) --- phpunit-integration-legacy-solr.xml | 63 ++++++++++------------- phpunit-integration-legacy.xml | 79 +++++++++++++---------------- 2 files changed, 62 insertions(+), 80 deletions(-) diff --git a/phpunit-integration-legacy-solr.xml b/phpunit-integration-legacy-solr.xml index 3d0b871b97..d7289a08bc 100644 --- a/phpunit-integration-legacy-solr.xml +++ b/phpunit-integration-legacy-solr.xml @@ -1,37 +1,28 @@ - - - - - - - - - - - - - - - - - - - tests/integration/Core - tests/integration/Core/Repository/Filtering - - - - - tests/integration - - + + + + + tests/integration + + + + + + + + + + + + + + + + + + + tests/integration/Core + tests/integration/Core/Repository/Filtering + + diff --git a/phpunit-integration-legacy.xml b/phpunit-integration-legacy.xml index 5a574be479..ecc8215071 100644 --- a/phpunit-integration-legacy.xml +++ b/phpunit-integration-legacy.xml @@ -1,45 +1,36 @@ - - - - - - - - - - - - - - - - tests/integration/Core - - - tests/integration/Debug - - - tests/integration/IO - - - tests/integration/LegacySearchEngine - - - tests/integration/RepositoryInstaller - - - - - tests/integration - - + + + + + tests/integration + + + + + + + + + + + + + + + + tests/integration/Core + + + tests/integration/Debug + + + tests/integration/IO + + + tests/integration/LegacySearchEngine + + + tests/integration/RepositoryInstaller + + From 72754be02fc31daf8c8d1f390d93b0b90910c48d Mon Sep 17 00:00:00 2001 From: Konrad Oboza Date: Wed, 2 Oct 2024 13:02:23 +0200 Subject: [PATCH 38/53] IBX-8811: Rebranded SiteAccess session prefix (#420) --- .../Configuration/Parser/Common.php | 2 +- .../SessionSetDynamicNameListener.php | 40 +++++--------- .../Resources/config/default_settings.yml | 2 +- .../SessionInitByPostListenerTest.php | 20 +++---- .../SessionSetDynamicNameListenerTest.php | 53 +++++++++++-------- .../SimplifiedRequestNormalizerTest.php | 6 +-- 6 files changed, 59 insertions(+), 64 deletions(-) diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/Common.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/Common.php index 6eeaa1d927..1fd613b6f5 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/Common.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/Common.php @@ -89,7 +89,7 @@ public function addSemanticConfig(NodeBuilder $nodeBuilder) ->children() ->scalarNode('name') ->info('The session name. If you want a session name per siteaccess, use "{siteaccess_hash}" token. Will override default session name from framework.session.name') - ->example('eZSESSID{siteaccess_hash}') + ->example('IBX_SESSION_ID{siteaccess_hash}') ->end() ->scalarNode('cookie_lifetime')->end() ->scalarNode('cookie_path')->end() diff --git a/src/bundle/Core/EventListener/SessionSetDynamicNameListener.php b/src/bundle/Core/EventListener/SessionSetDynamicNameListener.php index 156596c995..5b5d6b7134 100644 --- a/src/bundle/Core/EventListener/SessionSetDynamicNameListener.php +++ b/src/bundle/Core/EventListener/SessionSetDynamicNameListener.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Bundle\Core\EventListener; @@ -21,27 +22,16 @@ * * Allows to set a dynamic session name based on the siteaccess name. */ -class SessionSetDynamicNameListener implements EventSubscriberInterface +final readonly class SessionSetDynamicNameListener implements EventSubscriberInterface { - public const MARKER = '{siteaccess_hash}'; + public const string MARKER = '{siteaccess_hash}'; - /** - * Prefix for session name. - */ - public const SESSION_NAME_PREFIX = 'eZSESSID'; - - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; - - /** @var \Symfony\Component\HttpFoundation\Session\Storage\SessionStorageFactoryInterface */ - private $sessionStorageFactory; + public const string SESSION_NAME_PREFIX = 'IBX_SESSION_ID'; public function __construct( - ConfigResolverInterface $configResolver, - SessionStorageFactoryInterface $sessionStorageFactory + private ConfigResolverInterface $configResolver, + private SessionStorageFactoryInterface $sessionStorageFactory ) { - $this->configResolver = $configResolver; - $this->sessionStorageFactory = $sessionStorageFactory; } public static function getSubscribedEvents(): array @@ -51,7 +41,7 @@ public static function getSubscribedEvents(): array ]; } - public function onSiteAccessMatch(PostSiteAccessMatchEvent $event) + public function onSiteAccessMatch(PostSiteAccessMatchEvent $event): void { $request = $event->getRequest(); $session = $request->hasSession() ? $request->getSession() : null; @@ -69,26 +59,20 @@ public function onSiteAccessMatch(PostSiteAccessMatchEvent $event) } $sessionOptions = (array)$this->configResolver->getParameter('session'); - $sessionName = isset($sessionOptions['name']) ? $sessionOptions['name'] : $session->getName(); + $sessionName = $sessionOptions['name'] ?? $session->getName(); $sessionOptions['name'] = $this->getSessionName($sessionName, $event->getSiteAccess()); $sessionStorage->setOptions($sessionOptions); } - /** - * @param string $sessionName - * @param \Ibexa\Core\MVC\Symfony\SiteAccess $siteAccess - * - * @return string - */ - private function getSessionName($sessionName, SiteAccess $siteAccess) + private function getSessionName(string $sessionName, SiteAccess $siteAccess): string { // Add session prefix if needed. - if (strpos($sessionName, static::SESSION_NAME_PREFIX) !== 0) { - $sessionName = static::SESSION_NAME_PREFIX . '_' . $sessionName; + if (!str_starts_with($sessionName, self::SESSION_NAME_PREFIX)) { + $sessionName = self::SESSION_NAME_PREFIX . '_' . $sessionName; } // Check if uniqueness marker is present. If so, session name will be unique for current siteaccess. - if (strpos($sessionName, self::MARKER) !== false) { + if (str_contains($sessionName, self::MARKER)) { $sessionName = str_replace(self::MARKER, md5($siteAccess->name), $sessionName); } diff --git a/src/bundle/Core/Resources/config/default_settings.yml b/src/bundle/Core/Resources/config/default_settings.yml index 7f34d7fe3f..1e74eb3334 100644 --- a/src/bundle/Core/Resources/config/default_settings.yml +++ b/src/bundle/Core/Resources/config/default_settings.yml @@ -83,7 +83,7 @@ parameters: # Common settings ibexa.repositories: {} ibexa.site_access.config.default.repository: ~ - ibexa.session_name.default: "eZSESSID{siteaccess_hash}" + ibexa.session_name.default: "IBX_SESSION_ID{siteaccess_hash}" ibexa.site_access.config.default.session_name: '%ibexa.session_name.default%' # Using "{siteaccess_hash}" in session name makes it unique per siteaccess ibexa.site_access.config.default.session: { name: '%ibexa.session_name.default%' } # Session options that will override options from framework ibexa.site_access.config.default.url_alias_router: true # Use UrlAliasRouter by default diff --git a/tests/bundle/Core/EventListener/SessionInitByPostListenerTest.php b/tests/bundle/Core/EventListener/SessionInitByPostListenerTest.php index 9173ab69d1..0a377947dc 100644 --- a/tests/bundle/Core/EventListener/SessionInitByPostListenerTest.php +++ b/tests/bundle/Core/EventListener/SessionInitByPostListenerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Tests\Bundle\Core\EventListener; @@ -18,10 +19,9 @@ use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; use Symfony\Component\HttpKernel\HttpKernelInterface; -class SessionInitByPostListenerTest extends TestCase +final class SessionInitByPostListenerTest extends TestCase { - /** @var \Ibexa\Bundle\Core\EventListener\SessionInitByPostListener */ - private $listener; + private SessionInitByPostListener $listener; protected function setUp(): void { @@ -29,7 +29,7 @@ protected function setUp(): void $this->listener = new SessionInitByPostListener(); } - public function testGetSubscribedEvents() + public function testGetSubscribedEvents(): void { self::assertSame( [ @@ -39,7 +39,7 @@ public function testGetSubscribedEvents() ); } - public function testOnSiteAccessMatchNoSessionService() + public function testOnSiteAccessMatchNoSessionService(): void { $request = new Request(); $request->setSession(new Session(new MockArraySessionStorage())); @@ -49,7 +49,7 @@ public function testOnSiteAccessMatchNoSessionService() self::assertNull($listener->onSiteAccessMatch($event)); } - public function testOnSiteAccessMatchSubRequest() + public function testOnSiteAccessMatchSubRequest(): void { $session = $this->createMock(SessionInterface::class); $session @@ -63,9 +63,9 @@ public function testOnSiteAccessMatchSubRequest() $this->listener->onSiteAccessMatch($event); } - public function testOnSiteAccessMatchRequestNoSessionName() + public function testOnSiteAccessMatchRequestNoSessionName(): void { - $sessionName = 'eZSESSID'; + $sessionName = 'IBX_SESSION_ID'; $session = $this->createMock(SessionInterface::class); $session @@ -90,9 +90,9 @@ public function testOnSiteAccessMatchRequestNoSessionName() $this->listener->onSiteAccessMatch($event); } - public function testOnSiteAccessMatchNewSessionName() + public function testOnSiteAccessMatchNewSessionName(): void { - $sessionName = 'eZSESSID'; + $sessionName = 'IBX_SESSION_ID'; $sessionId = 'foobar123'; $session = $this->createMock(SessionInterface::class); diff --git a/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php b/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php index 1be3172bea..618a167d3c 100644 --- a/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php +++ b/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Tests\Bundle\Core\EventListener; @@ -18,37 +19,43 @@ use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageFactoryInterface; +use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface; use Symfony\Component\HttpKernel\HttpKernelInterface; -class SessionSetDynamicNameListenerTest extends TestCase +final class SessionSetDynamicNameListenerTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $configResolver; + /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface&\PHPUnit\Framework\MockObject\MockObject */ + private ConfigResolverInterface $configResolver; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $sessionStorageFactory; + /** @var \Symfony\Component\HttpFoundation\Session\Storage\SessionStorageFactoryInterface&\PHPUnit\Framework\MockObject\MockObject */ + private SessionStorageFactoryInterface $sessionStorageFactory; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $sessionStorage; + /** @var \Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface&\PHPUnit\Framework\MockObject\MockObject */ + private SessionStorageInterface $sessionStorage; protected function setUp(): void { parent::setUp(); + $this->configResolver = $this->getMockBuilder(ConfigResolverInterface::class) ->disableOriginalConstructor() ->getMock(); + $this->sessionStorage = $this->getMockBuilder(NativeSessionStorage::class) ->disableOriginalConstructor() ->getMock(); + $this->sessionStorageFactory = $this->getMockBuilder(SessionStorageFactoryInterface::class) ->getMock(); + $this->sessionStorageFactory->method('createStorage') ->willReturn($this->sessionStorage); } - public function testGetSubscribedEvents() + public function testGetSubscribedEvents(): void { $listener = new SessionSetDynamicNameListener($this->configResolver, $this->sessionStorageFactory); + self::assertSame( [ MVCEvents::SITEACCESS => ['onSiteAccessMatch', 250], @@ -57,18 +64,19 @@ public function testGetSubscribedEvents() ); } - public function testOnSiteAccessMatchNoSession() + public function testOnSiteAccessMatchNoSession(): void { $request = new Request(); $this->sessionStorage ->expects(self::never()) ->method('setOptions'); + $listener = new SessionSetDynamicNameListener($this->configResolver, $this->sessionStorageFactory); $listener->onSiteAccessMatch(new PostSiteAccessMatchEvent(new SiteAccess('test'), $request, HttpKernelInterface::MAIN_REQUEST)); } - public function testOnSiteAccessMatchSubRequest() + public function testOnSiteAccessMatchSubRequest(): void { $this->sessionStorage ->expects(self::never()) @@ -77,7 +85,7 @@ public function testOnSiteAccessMatchSubRequest() $listener->onSiteAccessMatch(new PostSiteAccessMatchEvent(new SiteAccess('test'), new Request(), HttpKernelInterface::SUB_REQUEST)); } - public function testOnSiteAccessMatchNonNativeSessionStorage() + public function testOnSiteAccessMatchNonNativeSessionStorage(): void { $this->configResolver ->expects(self::never()) @@ -92,7 +100,7 @@ public function testOnSiteAccessMatchNonNativeSessionStorage() /** * @dataProvider onSiteAccessMatchProvider */ - public function testOnSiteAccessMatch(SiteAccess $siteAccess, $configuredSessionStorageOptions, array $expectedSessionStorageOptions) + public function testOnSiteAccessMatch(SiteAccess $siteAccess, $configuredSessionStorageOptions, array $expectedSessionStorageOptions): void { $request = new Request(); $request->setSession(new Session(new MockArraySessionStorage())); @@ -111,14 +119,17 @@ public function testOnSiteAccessMatch(SiteAccess $siteAccess, $configuredSession $listener->onSiteAccessMatch(new PostSiteAccessMatchEvent($siteAccess, $request, HttpKernelInterface::MAIN_REQUEST)); } - public function onSiteAccessMatchProvider() + /** + * @return array{array{\Ibexa\Core\MVC\Symfony\SiteAccess, array, array}} + */ + public function onSiteAccessMatchProvider(): array { return [ - [new SiteAccess('foo'), ['name' => 'eZSESSID'], ['name' => 'eZSESSID']], - [new SiteAccess('foo'), ['name' => 'eZSESSID{siteaccess_hash}'], ['name' => 'eZSESSID' . md5('foo')]], - [new SiteAccess('foo'), ['name' => 'this_is_a_session_name'], ['name' => 'eZSESSID_this_is_a_session_name']], - [new SiteAccess('foo'), ['name' => 'something{siteaccess_hash}'], ['name' => 'eZSESSID_something' . md5('foo')]], - [new SiteAccess('bar_baz'), ['name' => '{siteaccess_hash}something'], ['name' => 'eZSESSID_' . md5('bar_baz') . 'something']], + [new SiteAccess('foo'), ['name' => 'IBX_SESSION_ID'], ['name' => 'IBX_SESSION_ID']], + [new SiteAccess('foo'), ['name' => 'IBX_SESSION_ID{siteaccess_hash}'], ['name' => 'IBX_SESSION_ID' . md5('foo')]], + [new SiteAccess('foo'), ['name' => 'this_is_a_session_name'], ['name' => 'IBX_SESSION_ID_this_is_a_session_name']], + [new SiteAccess('foo'), ['name' => 'something{siteaccess_hash}'], ['name' => 'IBX_SESSION_ID_something' . md5('foo')]], + [new SiteAccess('bar_baz'), ['name' => '{siteaccess_hash}something'], ['name' => 'IBX_SESSION_ID_' . md5('bar_baz') . 'something']], [ new SiteAccess('foo'), [ @@ -130,7 +141,7 @@ public function onSiteAccessMatchProvider() 'cookie_httponly' => true, ], [ - 'name' => 'eZSESSID_this_is_a_session_name', + 'name' => 'IBX_SESSION_ID_this_is_a_session_name', 'cookie_path' => '/foo', 'cookie_domain' => 'foo.com', 'cookie_lifetime' => 86400, @@ -141,14 +152,14 @@ public function onSiteAccessMatchProvider() ]; } - public function testOnSiteAccessMatchNoConfiguredSessionName() + public function testOnSiteAccessMatchNoConfiguredSessionName(): void { $request = new Request(); $request->setSession(new Session(new MockArraySessionStorage('some_default_name'))); $configuredSessionStorageOptions = ['cookie_path' => '/bar']; $sessionName = 'some_default_name'; - $sessionOptions = $configuredSessionStorageOptions + ['name' => "eZSESSID_$sessionName"]; + $sessionOptions = $configuredSessionStorageOptions + ['name' => "IBX_SESSION_ID_$sessionName"]; $this->sessionStorage ->expects(self::once()) diff --git a/tests/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizerTest.php index da1d9a3022..4e8491f9b0 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizerTest.php @@ -14,7 +14,7 @@ final class SimplifiedRequestNormalizerTest extends TestCase { - public function testNormalize() + public function testNormalize(): void { $request = new SimplifiedRequest([ 'scheme' => 'http', @@ -27,7 +27,7 @@ public function testNormalize() 'Accept-Encoding' => 'gzip, deflate, br', 'Accept-Language' => 'pl-PL,pl;q=0.9,en-US;q=0.8,en;q=0.7', 'User-Agent' => 'Mozilla/5.0', - 'Cookie' => 'eZSESSID21232f297a57a5a743894a0e4a801fc3=mgbs2p6lv936hb5hmdd2cvq6bq', + 'Cookie' => 'IBX_SESSION_ID21232f297a57a5a743894a0e4a801fc3=mgbs2p6lv936hb5hmdd2cvq6bq', 'Connection' => 'keep-alive', ], 'languages' => ['pl-PL', 'en-US'], @@ -46,7 +46,7 @@ public function testNormalize() ], $normalizer->normalize($request)); } - public function testSupportsNormalization() + public function testSupportsNormalization(): void { $normalizer = new SimplifiedRequestNormalizer(); From 362008c63121cbd1ef04983a499aefbdec0d57a8 Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Mon, 1 Jul 2024 20:48:37 +0200 Subject: [PATCH 39/53] IBX-8418: Remove drafts when trashing its parent or ancestor location --- .../Persistence/Content/Location/Handler.php | 5 ++++ src/lib/Persistence/Cache/LocationHandler.php | 14 +++++++++++ .../Legacy/Content/Location/Gateway.php | 7 ++++++ .../Location/Gateway/DoctrineDatabase.php | 24 +++++++++++++++++++ .../Location/Gateway/ExceptionConversion.php | 12 ++++++++++ .../Legacy/Content/Location/Handler.php | 5 ++++ .../Legacy/Content/TreeHandler.php | 20 ++++++++++++++++ src/lib/Repository/TrashService.php | 1 + 8 files changed, 88 insertions(+) diff --git a/src/contracts/Persistence/Content/Location/Handler.php b/src/contracts/Persistence/Content/Location/Handler.php index 5a0d45abbe..078783dd0b 100644 --- a/src/contracts/Persistence/Content/Location/Handler.php +++ b/src/contracts/Persistence/Content/Location/Handler.php @@ -216,6 +216,11 @@ public function create(CreateStruct $location); */ public function removeSubtree($locationId); + /** + * Removes all draft contents that have no location assigned to them under the given parent location. + */ + public function deleteChildrenDrafts(int $locationId): void; + /** * Set section on all content objects in the subtree. * Only main locations will be updated. diff --git a/src/lib/Persistence/Cache/LocationHandler.php b/src/lib/Persistence/Cache/LocationHandler.php index aaf4ba161e..78a4be91db 100644 --- a/src/lib/Persistence/Cache/LocationHandler.php +++ b/src/lib/Persistence/Cache/LocationHandler.php @@ -416,6 +416,20 @@ public function removeSubtree($locationId) return $return; } + public function deleteChildrenDrafts(int $locationId): void + { + $this->logger->logCall(__METHOD__, ['location' => $locationId]); + + $this->persistenceHandler->locationHandler()->deleteChildrenDrafts($locationId); + + $this->cache->invalidateTags([ + $this->cacheIdentifierGenerator->generateTag( + self::LOCATION_PATH_IDENTIFIER, + [$locationId], + ), + ]); + } + /** * {@inheritdoc} */ diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway.php b/src/lib/Persistence/Legacy/Content/Location/Gateway.php index 75da7c235d..84a4e021d1 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway.php @@ -112,6 +112,13 @@ abstract public function loadParentLocationsDataForDraftContent(int $contentId): */ abstract public function getSubtreeContent(int $sourceId, bool $onlyIds = false): array; + /** + * Finds draft contents created under the given parent location. + * + * @return array + */ + abstract public function getSubtreeChildrenDraftContentIds(int $sourceId): array; + abstract public function getSubtreeSize(string $path): int; /** diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php index 1387db0560..b93f29f3a4 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php @@ -11,6 +11,7 @@ use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; +use Doctrine\DBAL\Result; use Ibexa\Contracts\Core\Persistence\Content\ContentInfo; use Ibexa\Contracts\Core\Persistence\Content\Location; use Ibexa\Contracts\Core\Persistence\Content\Location\CreateStruct; @@ -239,6 +240,29 @@ public function getSubtreeContent(int $sourceId, bool $onlyIds = false): array : $results; } + /** + * @return array + * + * @throws \Doctrine\DBAL\Exception + * @throws \Doctrine\DBAL\Driver\Exception + */ + public function getSubtreeChildrenDraftContentIds(int $sourceId): array + { + $query = $this->connection->createQueryBuilder(); + $query + ->select('contentobject_id') + ->from('eznode_assignment', 'n') + ->innerJoin('n', 'ezcontentobject', 'c', 'n.contentobject_id = c.id') + ->andWhere('n.parent_node = :parentNode') + ->andWhere('c.status = :status') + ->setParameter(':parentNode', $sourceId, ParameterType::INTEGER) + ->setParameter(':status', ContentInfo::STATUS_DRAFT, ParameterType::INTEGER); + + $statement = $query->execute(); + + return $statement instanceof Result ? $statement->fetchFirstColumn() : []; + } + public function getSubtreeSize(string $path): int { $query = $this->createNodeQueryBuilder([$this->dbPlatform->getCountExpression('node_id')]); diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php index 267fd9e9f5..3eb53f2f5e 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php @@ -107,6 +107,18 @@ public function getSubtreeContent(int $sourceId, bool $onlyIds = false): array } } + /** + * @return array + */ + public function getSubtreeChildrenDraftContentIds(int $sourceId): array + { + try { + return $this->innerGateway->getSubtreeChildrenDraftContentIds($sourceId); + } catch (PDOException $e) { + throw DatabaseException::wrap($e); + } + } + public function getSubtreeSize(string $path): int { try { diff --git a/src/lib/Persistence/Legacy/Content/Location/Handler.php b/src/lib/Persistence/Legacy/Content/Location/Handler.php index 6fe93eae46..dfcb28fac3 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Location/Handler.php @@ -547,6 +547,11 @@ public function removeSubtree($locationId) $this->treeHandler->removeSubtree($locationId); } + public function deleteChildrenDrafts(int $locationId): void + { + $this->treeHandler->deleteChildrenDrafts($locationId); + } + /** * Set section on all content objects in the subtree. * diff --git a/src/lib/Persistence/Legacy/Content/TreeHandler.php b/src/lib/Persistence/Legacy/Content/TreeHandler.php index e48f433fe6..6b375e376f 100644 --- a/src/lib/Persistence/Legacy/Content/TreeHandler.php +++ b/src/lib/Persistence/Legacy/Content/TreeHandler.php @@ -216,6 +216,26 @@ public function removeSubtree($locationId) $this->locationGateway->deleteNodeAssignment($contentId); } + /** + * Removes draft contents assigned to the given parent location and its descendant locations. + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + */ + public function deleteChildrenDrafts(int $locationId): void + { + $subLocations = $this->locationGateway->getChildren($locationId); + foreach ($subLocations as $subLocation) { + $this->deleteChildrenDrafts($subLocation['node_id']); + } + + // Fetch child draft content ids + $subtreeChildrenDraftIds = $this->locationGateway->getSubtreeChildrenDraftContentIds($locationId); + + foreach ($subtreeChildrenDraftIds as $contentId) { + $this->removeRawContent($contentId); + } + } + /** * Set section on all content objects in the subtree. * diff --git a/src/lib/Repository/TrashService.php b/src/lib/Repository/TrashService.php index 02ce266f3f..92291e5ef9 100644 --- a/src/lib/Repository/TrashService.php +++ b/src/lib/Repository/TrashService.php @@ -146,6 +146,7 @@ public function trash(Location $location): ?APITrashItem $this->repository->beginTransaction(); try { + $this->persistenceHandler->locationHandler()->deleteChildrenDrafts($location->id); $spiTrashItem = $this->persistenceHandler->trashHandler()->trashSubtree($location->id); $this->persistenceHandler->urlAliasHandler()->locationDeleted($location->id); $this->repository->commit(); From 851573dc5d354a493841f1d212bbf50a33b8a089 Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Sun, 7 Jul 2024 14:35:43 +0200 Subject: [PATCH 40/53] IBX-8418: Implement unit tests --- .../Persistence/Cache/LocationHandlerTest.php | 1 + .../Legacy/Content/LocationHandlerTest.php | 12 ++++ .../Legacy/Content/TreeHandlerTest.php | 62 +++++++++++++++++++ 3 files changed, 75 insertions(+) diff --git a/tests/lib/Persistence/Cache/LocationHandlerTest.php b/tests/lib/Persistence/Cache/LocationHandlerTest.php index 918a49166a..87a68a7836 100644 --- a/tests/lib/Persistence/Cache/LocationHandlerTest.php +++ b/tests/lib/Persistence/Cache/LocationHandlerTest.php @@ -68,6 +68,7 @@ public function providerForUnCachedMethods(): array ['c-4', 'ragl-4'], ], ['removeSubtree', [12], [['location_path', [12], false]], null, ['lp-12']], + ['deleteChildrenDrafts', [12], [['location_path', [12], false]], null, ['lp-12']], ['setSectionForSubtree', [12, 2], [['location_path', [12], false]], null, ['lp-12']], ['changeMainLocation', [4, 12], [['content', [4], false]], null, ['c-4']], ['countLocationsByContent', [4]], diff --git a/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php b/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php index 860ea9fcf6..5432b5eac2 100644 --- a/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php @@ -686,6 +686,18 @@ public function testCountLocationsByContent(): void $handler->countLocationsByContent($contentId); } + public function testDeleteChildrenDrafts(): void + { + $handler = $this->getLocationHandler(); + + $this->treeHandler + ->expects(self::once()) + ->method('deleteChildrenDrafts') + ->with(42); + + $handler->deleteChildrenDrafts(42); + } + /** * Returns the handler to test with $methods mocked. * diff --git a/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php b/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php index 5e5adc6b9e..ac676a203f 100644 --- a/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php @@ -401,6 +401,68 @@ public function testLoadLocation() self::assertTrue($location instanceof Location); } + public function testDeleteChildrenDraftsRecursive(): void + { + $locationGatewayMock = $this->getLocationGatewayMock(); + $contentGatewayMock = $this->getContentGatewayMock(); + $contentMapperMock = $this->getContentMapperMock(); + + $locationGatewayMock + ->expects(self::exactly(3)) + ->method('getChildren') + ->willReturnMap([ + [42, [ + ['node_id' => 201], + ['node_id' => 202], + ]], + [201, []], + [202, []], + ]); + + $locationGatewayMock + ->expects(self::exactly(3)) + ->method('getSubtreeChildrenDraftContentIds') + ->willReturnMap([ + [201, [101]], + [202, [102]], + [42, [99]], + ]); + + $contentGatewayMock + ->expects(self::exactly(3)) + ->method('loadContentInfo') + ->willReturnMap([ + [101, ['main_node_id' => 201]], + [102, ['main_node_id' => 202]], + [99, ['main_node_id' => 42]], + ]); + + $contentMapperMock + ->expects(self::exactly(3)) + ->method('extractContentInfoFromRow') + ->willReturnCallback(static function (array $row): ContentInfo { + return new ContentInfo(['mainLocationId' => $row['main_node_id']]); + }); + + $contentGatewayMock + ->expects(self::exactly(3)) + ->method('deleteContent') + ->willReturnCallback(static function (int $contentId): void { + $argumentValue = match ($contentId) { + 99 => 99, + 101 => 101, + 102 => 102, + default => null + }; + + self::assertSame($argumentValue, $contentId); + }); + + $treeHandler = $this->getTreeHandler(); + + $treeHandler->deleteChildrenDrafts(42); + } + /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Persistence\Legacy\Content\Location\Gateway */ protected $locationGatewayMock; From 1b991cc551e7740b34685fff91e01cf8783c2bd2 Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Sun, 7 Jul 2024 14:38:22 +0200 Subject: [PATCH 41/53] IBX-8418: Fix unit test --- tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php b/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php index ac676a203f..f1d185bf1a 100644 --- a/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php @@ -448,14 +448,7 @@ public function testDeleteChildrenDraftsRecursive(): void ->expects(self::exactly(3)) ->method('deleteContent') ->willReturnCallback(static function (int $contentId): void { - $argumentValue = match ($contentId) { - 99 => 99, - 101 => 101, - 102 => 102, - default => null - }; - - self::assertSame($argumentValue, $contentId); + self::assertContains($contentId, [99, 101, 102]); }); $treeHandler = $this->getTreeHandler(); From d547da7398c1cfeae6d14375c9614eb88480f19c Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Mon, 8 Jul 2024 10:57:11 +0200 Subject: [PATCH 42/53] IBX-8418: Provided integration test --- src/contracts/Test/IbexaKernelTestTrait.php | 6 ++ src/contracts/Test/IbexaTestKernel.php | 1 + .../Repository/TrashService/TrashTest.php | 58 +++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 tests/integration/Core/Repository/TrashService/TrashTest.php diff --git a/src/contracts/Test/IbexaKernelTestTrait.php b/src/contracts/Test/IbexaKernelTestTrait.php index fb36233104..309db68f89 100644 --- a/src/contracts/Test/IbexaKernelTestTrait.php +++ b/src/contracts/Test/IbexaKernelTestTrait.php @@ -19,6 +19,7 @@ use Ibexa\Contracts\Core\Repository\RoleService; use Ibexa\Contracts\Core\Repository\SearchService; use Ibexa\Contracts\Core\Repository\SectionService; +use Ibexa\Contracts\Core\Repository\TrashService; use Ibexa\Contracts\Core\Repository\URLAliasService; use Ibexa\Contracts\Core\Repository\UserService; use Ibexa\Contracts\Core\Test\Persistence\Fixture\FixtureImporter; @@ -170,6 +171,11 @@ protected static function getUrlAliasService(): URLAliasService return self::getServiceByClassName(URLAliasService::class); } + protected static function getTrashService(): TrashService + { + return self::getServiceByClassName(TrashService::class); + } + protected static function setAnonymousUser(): void { $anonymousUserId = 10; diff --git a/src/contracts/Test/IbexaTestKernel.php b/src/contracts/Test/IbexaTestKernel.php index 05498302ba..025460c0dc 100644 --- a/src/contracts/Test/IbexaTestKernel.php +++ b/src/contracts/Test/IbexaTestKernel.php @@ -91,6 +91,7 @@ class IbexaTestKernel extends Kernel implements IbexaTestKernelInterface Repository\UserService::class, Repository\TokenService::class, Repository\URLAliasService::class, + Repository\TrashService::class, Repository\BookmarkService::class, Handler::class, ]; diff --git a/tests/integration/Core/Repository/TrashService/TrashTest.php b/tests/integration/Core/Repository/TrashService/TrashTest.php new file mode 100644 index 0000000000..9b0c195f01 --- /dev/null +++ b/tests/integration/Core/Repository/TrashService/TrashTest.php @@ -0,0 +1,58 @@ +getTrashService(); + $contentService = $this->getContentService(); + + $folder = $this->createFolder(['eng-GB' => 'Folder'], 2); + $folderMainLocationId = $folder->getVersionInfo()->getContentInfo()->getMainLocationId(); + + Assert::assertIsNumeric($folderMainLocationId); + + $childFolder = $this->createFolder( + ['eng-GB' => 'Child folder'], + $folderMainLocationId, + ); + $childFolderMainLocationId = $childFolder->getVersionInfo()->getContentInfo()->getMainLocationId(); + + Assert::assertIsNumeric($childFolderMainLocationId); + + $draft1 = $this->createFolderDraft(['eng-GB' => 'Folder draft 1'], $folderMainLocationId); + $draft2 = $this->createFolderDraft(['eng-GB' => 'Folder draft 2'], $childFolderMainLocationId); + $draft3 = $this->createFolderDraft(['eng-GB' => 'Folder draft 3'], $childFolderMainLocationId); + + $locationToTrash = $this->getLocationService()->loadLocation($folderMainLocationId); + + $trashService->trash($locationToTrash); + + self::expectException(NotFoundException::class); + $contentService->loadContentInfo($draft1->getId()); + + self::expectException(NotFoundException::class); + $contentService->loadContentInfo($draft2->getId()); + + self::expectException(NotFoundException::class); + $contentService->loadContentInfo($draft3->getId()); + } +} From f4bc59fb699cc968557225dd2bd88561757f78f8 Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Tue, 6 Aug 2024 14:47:47 +0200 Subject: [PATCH 43/53] IBX-8418: Applied review remarks --- phpstan.neon.dist | 2 +- .../Content/Location/Gateway/DoctrineDatabase.php | 2 +- .../Core/Repository/TrashService/TrashTest.php | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 2a0a65fbbd..ede3c85d30 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -8,7 +8,7 @@ parameters: treatPhpDocTypesAsCertain: false ignoreErrors: - - message: "#^Cannot call method (fetchOne|fetchColumn|fetchAllAssociative|fetchAssociative|fetchAllKeyValue|fetchFirstColumn)\\(\\) on Doctrine\\\\DBAL\\\\ForwardCompatibility\\\\Result\\|int\\|string\\.$#" + message: "#^Cannot call method (fetchOne|fetchColumn|fetchFirstColumn|fetchAllAssociative|fetchAssociative|fetchAllKeyValue|fetchFirstColumn)\\(\\) on Doctrine\\\\DBAL\\\\ForwardCompatibility\\\\Result\\|int\\|string\\.$#" paths: - src/* - tests/* diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php index b93f29f3a4..db9e3cbab0 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php @@ -260,7 +260,7 @@ public function getSubtreeChildrenDraftContentIds(int $sourceId): array $statement = $query->execute(); - return $statement instanceof Result ? $statement->fetchFirstColumn() : []; + return $statement->fetchFirstColumn(); } public function getSubtreeSize(string $path): int diff --git a/tests/integration/Core/Repository/TrashService/TrashTest.php b/tests/integration/Core/Repository/TrashService/TrashTest.php index 9b0c195f01..e1db40beb0 100644 --- a/tests/integration/Core/Repository/TrashService/TrashTest.php +++ b/tests/integration/Core/Repository/TrashService/TrashTest.php @@ -22,8 +22,8 @@ final class TrashTest extends RepositoryTestCase */ public function testTrashLocationDeletesChildrenDrafts(): void { - $trashService = $this->getTrashService(); - $contentService = $this->getContentService(); + $trashService = self::getTrashService(); + $contentService = self::getContentService(); $folder = $this->createFolder(['eng-GB' => 'Folder'], 2); $folderMainLocationId = $folder->getVersionInfo()->getContentInfo()->getMainLocationId(); @@ -46,13 +46,13 @@ public function testTrashLocationDeletesChildrenDrafts(): void $trashService->trash($locationToTrash); - self::expectException(NotFoundException::class); + $this->expectException(NotFoundException::class); $contentService->loadContentInfo($draft1->getId()); - self::expectException(NotFoundException::class); + $this->expectException(NotFoundException::class); $contentService->loadContentInfo($draft2->getId()); - self::expectException(NotFoundException::class); + $this->expectException(NotFoundException::class); $contentService->loadContentInfo($draft3->getId()); } } From 49ca70b7910d72f0f5ae199768a73a38938dc7be Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Tue, 6 Aug 2024 15:06:00 +0200 Subject: [PATCH 44/53] IBX-8418: CS --- .../Legacy/Content/Location/Gateway/DoctrineDatabase.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php index db9e3cbab0..592c4488d1 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php @@ -11,7 +11,6 @@ use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; -use Doctrine\DBAL\Result; use Ibexa\Contracts\Core\Persistence\Content\ContentInfo; use Ibexa\Contracts\Core\Persistence\Content\Location; use Ibexa\Contracts\Core\Persistence\Content\Location\CreateStruct; From ac20ef32eeda4f24a89a147b39fff9d1c626ba07 Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Tue, 6 Aug 2024 21:09:47 +0200 Subject: [PATCH 45/53] IBX-8418: Fixed integration test --- .../Repository/TrashService/TrashTest.php | 40 ++++++++++++++----- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/tests/integration/Core/Repository/TrashService/TrashTest.php b/tests/integration/Core/Repository/TrashService/TrashTest.php index e1db40beb0..d34e7ebdbb 100644 --- a/tests/integration/Core/Repository/TrashService/TrashTest.php +++ b/tests/integration/Core/Repository/TrashService/TrashTest.php @@ -27,7 +27,6 @@ public function testTrashLocationDeletesChildrenDrafts(): void $folder = $this->createFolder(['eng-GB' => 'Folder'], 2); $folderMainLocationId = $folder->getVersionInfo()->getContentInfo()->getMainLocationId(); - Assert::assertIsNumeric($folderMainLocationId); $childFolder = $this->createFolder( @@ -35,24 +34,47 @@ public function testTrashLocationDeletesChildrenDrafts(): void $folderMainLocationId, ); $childFolderMainLocationId = $childFolder->getVersionInfo()->getContentInfo()->getMainLocationId(); - Assert::assertIsNumeric($childFolderMainLocationId); + $secondDepthChildFolder = $this->createFolder( + ['eng-GB' => 'Second depth folder'], + $childFolderMainLocationId, + ); + $secondDepthChildFolderLocationId = $secondDepthChildFolder + ->getVersionInfo() + ->getContentInfo() + ->getMainLocationId() + ; + Assert::assertIsNumeric($secondDepthChildFolderLocationId); + $draft1 = $this->createFolderDraft(['eng-GB' => 'Folder draft 1'], $folderMainLocationId); $draft2 = $this->createFolderDraft(['eng-GB' => 'Folder draft 2'], $childFolderMainLocationId); $draft3 = $this->createFolderDraft(['eng-GB' => 'Folder draft 3'], $childFolderMainLocationId); + $draftSecondDepth = $this->createFolderDraft( + ['eng-GB' => 'Folder draft 4'], + $secondDepthChildFolderLocationId, + ); $locationToTrash = $this->getLocationService()->loadLocation($folderMainLocationId); $trashService->trash($locationToTrash); - $this->expectException(NotFoundException::class); - $contentService->loadContentInfo($draft1->getId()); - - $this->expectException(NotFoundException::class); - $contentService->loadContentInfo($draft2->getId()); + $draftIds = [ + $draft1->getId(), + $draft2->getId(), + $draft3->getId(), + $draftSecondDepth->getId(), + ]; - $this->expectException(NotFoundException::class); - $contentService->loadContentInfo($draft3->getId()); + foreach ($draftIds as $draftId) { + try { + $contentService->loadContentInfo($draftId); + $this->fail( + sprintf('Expected NotFoundException not thrown for draft ID = %d', $draftId), + ); + } catch (NotFoundException $e) { + self::assertInstanceOf(NotFoundException::class, $e); + } + } } } From 3df3ef444c5a20f0c9f88b07edf55988e4c7c16b Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Wed, 7 Aug 2024 09:38:19 +0200 Subject: [PATCH 46/53] IBX-8418: Fixed integration test --- .../Core/Repository/TrashService/TrashTest.php | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/tests/integration/Core/Repository/TrashService/TrashTest.php b/tests/integration/Core/Repository/TrashService/TrashTest.php index d34e7ebdbb..849745e17e 100644 --- a/tests/integration/Core/Repository/TrashService/TrashTest.php +++ b/tests/integration/Core/Repository/TrashService/TrashTest.php @@ -59,22 +59,13 @@ public function testTrashLocationDeletesChildrenDrafts(): void $trashService->trash($locationToTrash); - $draftIds = [ + $contentInfos = $contentService->loadContentInfoList([ $draft1->getId(), $draft2->getId(), $draft3->getId(), $draftSecondDepth->getId(), - ]; + ]); - foreach ($draftIds as $draftId) { - try { - $contentService->loadContentInfo($draftId); - $this->fail( - sprintf('Expected NotFoundException not thrown for draft ID = %d', $draftId), - ); - } catch (NotFoundException $e) { - self::assertInstanceOf(NotFoundException::class, $e); - } - } + self::assertEmpty($contentInfos); } } From 93ce431c42214303dc6c30cb592b864fbc333476 Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Wed, 7 Aug 2024 09:54:32 +0200 Subject: [PATCH 47/53] IBX-8418: CS --- tests/integration/Core/Repository/TrashService/TrashTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/integration/Core/Repository/TrashService/TrashTest.php b/tests/integration/Core/Repository/TrashService/TrashTest.php index 849745e17e..28b58144b1 100644 --- a/tests/integration/Core/Repository/TrashService/TrashTest.php +++ b/tests/integration/Core/Repository/TrashService/TrashTest.php @@ -8,7 +8,6 @@ namespace Ibexa\Tests\Integration\Core\Repository\TrashService; -use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Tests\Integration\Core\RepositoryTestCase; use PHPUnit\Framework\Assert; From c081478640a54cfdc4174750e393e683e8a7a082 Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Wed, 7 Aug 2024 10:11:08 +0200 Subject: [PATCH 48/53] IBX-8418: Fixup --- tests/integration/Core/Repository/TrashService/TrashTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/Core/Repository/TrashService/TrashTest.php b/tests/integration/Core/Repository/TrashService/TrashTest.php index 28b58144b1..7699ccb97e 100644 --- a/tests/integration/Core/Repository/TrashService/TrashTest.php +++ b/tests/integration/Core/Repository/TrashService/TrashTest.php @@ -54,7 +54,7 @@ public function testTrashLocationDeletesChildrenDrafts(): void $secondDepthChildFolderLocationId, ); - $locationToTrash = $this->getLocationService()->loadLocation($folderMainLocationId); + $locationToTrash = self::getLocationService()->loadLocation($folderMainLocationId); $trashService->trash($locationToTrash); From 7ee0e79a8de5af1377eeece0e2394821a8338662 Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Wed, 2 Oct 2024 17:57:56 +0200 Subject: [PATCH 49/53] IBX-8148: Stan --- tests/integration/Core/Repository/ContentServiceTest.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/integration/Core/Repository/ContentServiceTest.php b/tests/integration/Core/Repository/ContentServiceTest.php index 00b934058a..83b5ae328a 100644 --- a/tests/integration/Core/Repository/ContentServiceTest.php +++ b/tests/integration/Core/Repository/ContentServiceTest.php @@ -6735,7 +6735,13 @@ private function createParentLocationsForHideReveal(int $parentLocationId): arra $this->createFolder([self::ENG_US => 'P3'], $parentLocationId)->contentInfo->mainLocationId, ]; - return array_values($this->locationService->loadLocationList($parentFoldersLocationsIds)); + $locations = $this->locationService->loadLocationList($parentFoldersLocationsIds); + $locationsArray = []; + foreach ($locations as $location) { + $locationsArray[] = $location; + } + + return array_values($locationsArray); } /** From cc08cd635653bf80b81d8164a1fa7214e12a4774 Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Wed, 2 Oct 2024 17:58:09 +0200 Subject: [PATCH 50/53] IBX-8148: Stan --- tests/integration/Core/Repository/ContentServiceTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/Core/Repository/ContentServiceTest.php b/tests/integration/Core/Repository/ContentServiceTest.php index 83b5ae328a..617a6e2430 100644 --- a/tests/integration/Core/Repository/ContentServiceTest.php +++ b/tests/integration/Core/Repository/ContentServiceTest.php @@ -6741,7 +6741,7 @@ private function createParentLocationsForHideReveal(int $parentLocationId): arra $locationsArray[] = $location; } - return array_values($locationsArray); + return $locationsArray; } /** From 9c886eb3b3295d7b802f50b4652429b33c735420 Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Thu, 17 Oct 2024 18:07:27 +0200 Subject: [PATCH 51/53] IBX-8418: Delete children drafts when deleting content --- .../Persistence/Legacy/Content/Handler.php | 1 + .../ContentService/DeleteContentTest.php | 67 +++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 tests/integration/Core/Repository/ContentService/DeleteContentTest.php diff --git a/src/lib/Persistence/Legacy/Content/Handler.php b/src/lib/Persistence/Legacy/Content/Handler.php index 1a8ef9d195..6672a4fbcc 100644 --- a/src/lib/Persistence/Legacy/Content/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Handler.php @@ -653,6 +653,7 @@ public function deleteContent($contentId) $this->removeRawContent($contentId); } else { foreach ($contentLocations as $locationId) { + $this->treeHandler->deleteChildrenDrafts($locationId); $this->treeHandler->removeSubtree($locationId); } } diff --git a/tests/integration/Core/Repository/ContentService/DeleteContentTest.php b/tests/integration/Core/Repository/ContentService/DeleteContentTest.php new file mode 100644 index 0000000000..a2b92c954d --- /dev/null +++ b/tests/integration/Core/Repository/ContentService/DeleteContentTest.php @@ -0,0 +1,67 @@ +createFolder(['eng-GB' => 'Folder'], 2); + $folderMainLocationId = $folder->getVersionInfo()->getContentInfo()->getMainLocationId(); + Assert::assertIsNumeric($folderMainLocationId); + + $childFolder = $this->createFolder( + ['eng-GB' => 'Child folder'], + $folderMainLocationId, + ); + $childFolderMainLocationId = $childFolder->getVersionInfo()->getContentInfo()->getMainLocationId(); + Assert::assertIsNumeric($childFolderMainLocationId); + + $secondDepthChildFolder = $this->createFolder( + ['eng-GB' => 'Second depth folder'], + $childFolderMainLocationId, + ); + $secondDepthChildFolderLocationId = $secondDepthChildFolder + ->getVersionInfo() + ->getContentInfo() + ->getMainLocationId() + ; + Assert::assertIsNumeric($secondDepthChildFolderLocationId); + + $draft1 = $this->createFolderDraft(['eng-GB' => 'Folder draft 1'], $folderMainLocationId); + $draft2 = $this->createFolderDraft(['eng-GB' => 'Folder draft 2'], $childFolderMainLocationId); + $draft3 = $this->createFolderDraft(['eng-GB' => 'Folder draft 3'], $childFolderMainLocationId); + $draftSecondDepth = $this->createFolderDraft( + ['eng-GB' => 'Folder draft 4'], + $secondDepthChildFolderLocationId, + ); + + $contentService->deleteContent($folder->getContentInfo()); + + $contentInfos = $contentService->loadContentInfoList([ + $draft1->getId(), + $draft2->getId(), + $draft3->getId(), + $draftSecondDepth->getId(), + ]); + + self::assertEmpty($contentInfos); + } +} From 059990fd6b119aae63d32688589b6cf35bd90693 Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Thu, 17 Oct 2024 18:28:11 +0200 Subject: [PATCH 52/53] Revert "IBX-8418: Fixup" This reverts commit c081478640a54cfdc4174750e393e683e8a7a082. --- tests/integration/Core/Repository/TrashService/TrashTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/Core/Repository/TrashService/TrashTest.php b/tests/integration/Core/Repository/TrashService/TrashTest.php index 7699ccb97e..28b58144b1 100644 --- a/tests/integration/Core/Repository/TrashService/TrashTest.php +++ b/tests/integration/Core/Repository/TrashService/TrashTest.php @@ -54,7 +54,7 @@ public function testTrashLocationDeletesChildrenDrafts(): void $secondDepthChildFolderLocationId, ); - $locationToTrash = self::getLocationService()->loadLocation($folderMainLocationId); + $locationToTrash = $this->getLocationService()->loadLocation($folderMainLocationId); $trashService->trash($locationToTrash); From 734922390b03af22decb2b5017cf30ac3b22707a Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Thu, 17 Oct 2024 18:31:50 +0200 Subject: [PATCH 53/53] Revert "Revert "IBX-8418: Fixup"" This reverts commit 059990fd6b119aae63d32688589b6cf35bd90693. --- tests/integration/Core/Repository/TrashService/TrashTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/Core/Repository/TrashService/TrashTest.php b/tests/integration/Core/Repository/TrashService/TrashTest.php index 28b58144b1..7699ccb97e 100644 --- a/tests/integration/Core/Repository/TrashService/TrashTest.php +++ b/tests/integration/Core/Repository/TrashService/TrashTest.php @@ -54,7 +54,7 @@ public function testTrashLocationDeletesChildrenDrafts(): void $secondDepthChildFolderLocationId, ); - $locationToTrash = $this->getLocationService()->loadLocation($folderMainLocationId); + $locationToTrash = self::getLocationService()->loadLocation($folderMainLocationId); $trashService->trash($locationToTrash);