Skip to content

Commit

Permalink
IBX-8139: Dropped class_alias BC layer statements from all classes (#111
Browse files Browse the repository at this point in the history
)

For more details see https://issues.ibexa.co/browse/IBX-8139 and #111

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] Fixed license string
  • Loading branch information
alongosz authored Jun 5, 2024
1 parent 1f4d2a8 commit 50dc38e
Show file tree
Hide file tree
Showing 132 changed files with 3 additions and 268 deletions.
9 changes: 3 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ibexa/behat",
"description": "Ibexa Behat",
"license": "GPL-2.0",
"license": "(GPL-2.0-only or proprietary)",
"replace": {
"ezsystems/behatbundle": "*"
},
Expand Down Expand Up @@ -54,9 +54,7 @@
"psr-4": {
"Ibexa\\Behat\\": "src/lib/",
"Ibexa\\Bundle\\Behat\\": "src/bundle/",
"Ibexa\\Contracts\\Behat\\": "src/contracts/",
"EzSystems\\BehatBundle\\": "src/bundle/",
"EzSystems\\Behat\\": "src/lib/"
"Ibexa\\Contracts\\Behat\\": "src/contracts/"
}
},
"conflict": {
Expand All @@ -65,8 +63,7 @@
"autoload-dev": {
"psr-4": {
"Ibexa\\Tests\\Behat\\": "tests/lib/",
"Ibexa\\Tests\\Bundle\\Behat\\": "tests/bundle/",
"EzSystems\\Behat\\Test\\": "tests/"
"Ibexa\\Tests\\Bundle\\Behat\\": "tests/bundle/"
}
},
"scripts": {
Expand Down
2 changes: 0 additions & 2 deletions src/bundle/Command/CreateExampleDataCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,3 @@ public function getDeprecatedAliases(): array
return ['ezplatform:tools:create-data'];
}
}

class_alias(CreateExampleDataCommand::class, 'EzSystems\BehatBundle\Command\CreateExampleDataCommand');
2 changes: 0 additions & 2 deletions src/bundle/Command/CreateExampleDataManagerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,5 +167,3 @@ public function getDeprecatedAliases(): array
return ['ezplatform:tools:generate-items'];
}
}

class_alias(CreateExampleDataManagerCommand::class, 'EzSystems\BehatBundle\Command\CreateExampleDataManagerCommand');
2 changes: 0 additions & 2 deletions src/bundle/Command/CreateLanguageCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,3 @@ protected function execute(InputInterface $input, OutputInterface $output): int
return 0;
}
}

class_alias(CreateLanguageCommand::class, 'EzSystems\BehatBundle\Command\CreateLanguageCommand');
2 changes: 0 additions & 2 deletions src/bundle/Command/TestSiteaccessCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,3 @@ protected function execute(InputInterface $input, OutputInterface $output): int
return 0;
}
}

class_alias(TestSiteaccessCommand::class, 'EzSystems\BehatBundle\Command\TestSiteaccessCommand');
2 changes: 0 additions & 2 deletions src/bundle/Controller/ExceptionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ public function throwRepositoryUnauthorizedAction($module = 'foo', $function = '
throw new UnauthorizedException($module, $function, $properties);
}
}

class_alias(ExceptionController::class, 'EzSystems\BehatBundle\Controller\ExceptionController');
2 changes: 0 additions & 2 deletions src/bundle/Controller/RenderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,3 @@ public function longAction(ContentView $view): ContentView
return $view;
}
}

class_alias(RenderController::class, 'EzSystems\BehatBundle\Controller\RenderController');
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,3 @@ private function shouldEnableInteractiveDebug(ContainerBuilder $container): bool
$container->getParameter(IbexaBehatExtension::BROWSER_DEBUG_INTERACTIVE_ENABLED);
}
}

class_alias(ElementFactoryCompilerPass::class, 'EzSystems\BehatBundle\DependencyInjection\Compiler\ElementFactoryCompilerPass');
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,3 @@ public function process(ContainerBuilder $container)
}
}
}

class_alias(FieldTypeDataProviderPass::class, 'EzSystems\BehatBundle\DependencyInjection\Compiler\FieldTypeDataProviderPass');
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,3 @@ public function process(ContainerBuilder $container)
}
}
}

class_alias(LimitationParserPass::class, 'EzSystems\BehatBundle\DependencyInjection\Compiler\LimitationParserPass');
2 changes: 0 additions & 2 deletions src/bundle/DependencyInjection/IbexaBehatExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,3 @@ private function shouldLoadDxpServices(ContainerBuilder $container)
return isset($bundles['IbexaPageBuilderBundle'], $bundles['IbexaWorkflowBundle']);
}
}

class_alias(IbexaBehatExtension::class, 'EzSystems\BehatBundle\DependencyInjection\eZBehatExtension');
2 changes: 0 additions & 2 deletions src/bundle/IbexaBehatBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,3 @@ public function build(ContainerBuilder $container)
$container->addCompilerPass(new ElementFactoryCompilerPass());
}
}

class_alias(IbexaBehatBundle::class, 'EzSystems\BehatBundle\EzSystemsBehatBundle');
2 changes: 0 additions & 2 deletions src/bundle/IbexaExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,3 @@ private function getParameterReference(string $name): string
return '%' . $name . '%';
}
}

class_alias(IbexaExtension::class, 'EzSystems\BehatBundle\BehatExtension');
2 changes: 0 additions & 2 deletions src/bundle/Initializer/BehatSiteAccessInitializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,3 @@ private function getSiteAccess(): SiteAccess
return new SiteAccess($siteAccessName, 'cli');
}
}

class_alias(BehatSiteAccessInitializer::class, 'EzSystems\BehatBundle\Initializer\BehatSiteAccessInitializer');
2 changes: 0 additions & 2 deletions src/bundle/Templating/Twig/PHPTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,3 @@ public function getFilters()
];
}
}

class_alias(PHPTypeExtension::class, 'EzSystems\BehatBundle\Templating\Twig\PHPTypeExtension');
2 changes: 0 additions & 2 deletions src/lib/API/ContentData/ContentDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,3 @@ private function fillContentStructWithData(ContentType $contentType, string $mai
return $contentStruct;
}
}

class_alias(ContentDataProvider::class, 'EzSystems\Behat\API\ContentData\ContentDataProvider');
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,3 @@ protected function getFaker(): Generator
return $this->randomDataGenerator->getFaker();
}
}

class_alias(AbstractFieldTypeDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\AbstractFieldTypeDataProvider');
2 changes: 0 additions & 2 deletions src/lib/API/ContentData/FieldTypeData/AuthorDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,3 @@ private function getSingleAuthor(string $language = 'eng-GB'): Author
return $author;
}
}

class_alias(AuthorDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\AuthorDataProvider');
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,3 @@ public function parseFromString(string $value)
return new Value(['inputUri' => $filePath]);
}
}

class_alias(BinaryFileDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\BinaryFileDataProvider');
2 changes: 0 additions & 2 deletions src/lib/API/ContentData/FieldTypeData/BooleanDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,3 @@ public function parseFromString(string $value)
return 'true' === strtolower($value);
}
}

class_alias(BooleanDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\BooleanDataProvider');
2 changes: 0 additions & 2 deletions src/lib/API/ContentData/FieldTypeData/CountryDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,3 @@ public function parseFromString(string $value)
return new Value([$value => self::COUNTRY_DATA[$value]]);
}
}

class_alias(CountryDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\CountryDataProvider');
2 changes: 0 additions & 2 deletions src/lib/API/ContentData/FieldTypeData/DateDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,3 @@ public function parseFromString(string $value)
return DateTime::createFromFormat('Y-m-d', $value);
}
}

class_alias(DateDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\DateDataProvider');
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,3 @@ public function parseFromString(string $value)
return DateTime::createFromFormat('Y-m-d H:i:s', $value);
}
}

class_alias(DateTimeDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\DateTimeDataProvider');
2 changes: 0 additions & 2 deletions src/lib/API/ContentData/FieldTypeData/EmailDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,3 @@ public function generateData(string $contentTypeIdentifier, string $fieldIdentif
return $this->getFaker()->companyEmail;
}
}

class_alias(EmailDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\EmailDataProvider');
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ public function generateData(string $contentTypeIdentifier, string $fieldIdentif

public function parseFromString(string $value);
}

class_alias(FieldTypeDataProviderInterface::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\FieldTypeDataProviderInterface');
2 changes: 0 additions & 2 deletions src/lib/API/ContentData/FieldTypeData/FloatDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@ public function parseFromString(string $value)
return (float) $value;
}
}

class_alias(FloatDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\FloatDataProvider');
2 changes: 0 additions & 2 deletions src/lib/API/ContentData/FieldTypeData/ISBNDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,3 @@ public function generateData(string $contentTypeIdentifier, string $fieldIdentif
return $this->getFaker()->isbn13;
}
}

class_alias(ISBNDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\ISBNDataProvider');
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,3 @@ public function parseFromString(string $value)
return new Value($location->getContentInfo()->id, $this->getFaker()->realText(100));
}
}

class_alias(ImageAssetDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\ImageAssetDataProvider');
2 changes: 0 additions & 2 deletions src/lib/API/ContentData/FieldTypeData/ImageDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,3 @@ public function parseFromString(string $value)
);
}
}

class_alias(ImageDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\ImageDataProvider');
2 changes: 0 additions & 2 deletions src/lib/API/ContentData/FieldTypeData/IntegerDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@ public function parseFromString(string $value)
return (int) $value;
}
}

class_alias(IntegerDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\IntegerDataProvider');
2 changes: 0 additions & 2 deletions src/lib/API/ContentData/FieldTypeData/MapDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,3 @@ public function parseFromString(string $value)
return new Value(self::LOCATION_DATA[$value]);
}
}

class_alias(MapDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\MapDataProvider');
2 changes: 0 additions & 2 deletions src/lib/API/ContentData/FieldTypeData/MatrixDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,3 @@ private function getRandomEntry($columnIdentifiers)
return new Row($values);
}
}

class_alias(MatrixDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\MatrixDataProvider');
2 changes: 0 additions & 2 deletions src/lib/API/ContentData/FieldTypeData/MediaDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,3 @@ public function parseFromString(string $value)
return $mediaValue;
}
}

class_alias(MediaDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\MediaDataProvider');
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,3 @@ protected function getContentID(string $locationPath)
return $location->getContentInfo()->id;
}
}

class_alias(ObjectRelationDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\ObjectRelationDataProvider');
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,3 @@ public function parseFromString(string $value)
return new Value($itemsToAdd);
}
}

class_alias(ObjectRelationListDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\ObjectRelationListDataProvider');
2 changes: 0 additions & 2 deletions src/lib/API/ContentData/FieldTypeData/PasswordProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,3 @@ public function generateData(string $contentTypeIdentifier, string $fieldIdentif
return self::DEFAUlT_PASSWORD;
}
}

class_alias(PasswordProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\PasswordProvider');
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,3 @@ public function parseFromString(string $value)
return sprintf(self::SIMPLE_RICHTEXT_XML, $value);
}
}

class_alias(RichTextDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\RichTextDataProvider');
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,3 @@ public function parseFromString(string $value)
return new Value($options);
}
}

class_alias(SelectionDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\SelectionDataProvider');
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,3 @@ public function generateData(string $contentTypeIdentifier, string $fieldIdentif
return $this->getFaker()->paragraphs(5, true);
}
}

class_alias(TextBlockDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\TextBlockDataProvider');
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,3 @@ public function parseFromString(string $value): Value
return new Value($value);
}
}

class_alias(TextLineDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\TextLineDataProvider');
2 changes: 0 additions & 2 deletions src/lib/API/ContentData/FieldTypeData/TimeDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,3 @@ public function parseFromString(string $value)
return Value::fromDateTime(DateTime::createFromFormat('H:i:s', $value));
}
}

class_alias(TimeDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\TimeDataProvider');
2 changes: 0 additions & 2 deletions src/lib/API/ContentData/FieldTypeData/URLDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,3 @@ public function parseFromString(string $value)
return new Value($url, $text);
}
}

class_alias(URLDataProvider::class, 'EzSystems\Behat\API\ContentData\FieldTypeData\URLDataProvider');
2 changes: 0 additions & 2 deletions src/lib/API/ContentData/FieldTypeNameConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,3 @@ public static function getFieldTypeIdentifierByName(string $fieldTypeName): stri
return array_search($fieldTypeName, static::$FIELD_TYPE_MAPPING);
}
}

class_alias(FieldTypeNameConverter::class, 'EzSystems\Behat\API\ContentData\FieldTypeNameConverter');
2 changes: 0 additions & 2 deletions src/lib/API/ContentData/RandomDataGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,3 @@ public function getRandomProbability(): float
return random_int(0, 999) / 1000;
}
}

class_alias(RandomDataGenerator::class, 'EzSystems\Behat\API\ContentData\RandomDataGenerator');
2 changes: 0 additions & 2 deletions src/lib/API/Context/ContentContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,3 @@ private function parseData(TableNode $contentItemData)
return $contentItemData->getHash();
}
}

class_alias(ContentContext::class, 'EzSystems\Behat\API\Context\ContentContext');
2 changes: 0 additions & 2 deletions src/lib/API/Context/ContentTypeContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,3 @@ private function parseTaxonomySettings(string $settings): array
return ['taxonomy' => $settings];
}
}

class_alias(ContentTypeContext::class, 'EzSystems\Behat\API\Context\ContentTypeContext');
2 changes: 0 additions & 2 deletions src/lib/API/Context/LanguageContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,3 @@ public function createLanguageIfNotExists(string $name, string $languageCode)
$this->languageFacade->createLanguageIfNotExists($name, $languageCode);
}
}

class_alias(LanguageContext::class, 'EzSystems\Behat\API\Context\LanguageContext');
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,3 @@ private function parseCommonContentTypes(string $contentTypeName): string
return $contentTypeName;
}
}

class_alias(ContentTypeLimitationParser::class, 'EzSystems\Behat\API\Context\LimitationParser\ContentTypeLimitationParser');
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,3 @@ public function parse(string $limitationValues): Limitation
);
}
}

class_alias(FieldGroupLimitationParser::class, 'EzSystems\Behat\API\Context\LimitationParser\FieldGroupLimitationParser');
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@ public function parse(string $limitationValues): Limitation
);
}
}

class_alias(LanguageLimitationParser::class, 'EzSystems\Behat\API\Context\LimitationParser\LanguageLimitationParser');
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ public function supports(string $limitationType): bool;

public function parse(string $limitationValues): Limitation;
}

class_alias(LimitationParserInterface::class, 'EzSystems\Behat\API\Context\LimitationParser\LimitationParserInterface');
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,3 @@ public function getLimitationParsers(): array
return $this->limitationParsers;
}
}

class_alias(LimitationParsersCollector::class, 'EzSystems\Behat\API\Context\LimitationParser\LimitationParsersCollector');
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,3 @@ public function parse(string $limitationValues): Limitation
);
}
}

class_alias(LocationLimitationParser::class, 'EzSystems\Behat\API\Context\LimitationParser\LocationLimitationParser');
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,3 @@ public function parse(string $limitationValues): Limitation
);
}
}

class_alias(NewSectionLimitationParser::class, 'EzSystems\Behat\API\Context\LimitationParser\NewSectionLimitationParser');
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,3 @@ protected function parseObjectStateValues($objectStates)
return $values;
}
}

class_alias(NewStateLimitationParser::class, 'EzSystems\Behat\API\Context\LimitationParser\NewStateLimitationParser');
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,3 @@ public function parse(string $limitationValues): Limitation
);
}
}

class_alias(ObjectStateLimitationParser::class, 'EzSystems\Behat\API\Context\LimitationParser\ObjectStateLimitationParser');
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,3 @@ public function parse(string $limitationValues): Limitation
);
}
}

class_alias(OwnerLimitationParser::class, 'EzSystems\Behat\API\Context\LimitationParser\OwnerLimitationParser');
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,3 @@ public function parse(string $limitationValues): Limitation
);
}
}

class_alias(ParentContentTypeLimitationParser::class, 'EzSystems\Behat\API\Context\LimitationParser\ParentContentTypeLimitationParser');
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,3 @@ public function parse(string $limitationValues): Limitation
);
}
}

class_alias(ParentDepthLimitationParser::class, 'EzSystems\Behat\API\Context\LimitationParser\ParentDepthLimitationParser');
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,3 @@ public function parse(string $limitationValues): Limitation
);
}
}

class_alias(ParentOwnerLimitationParser::class, 'EzSystems\Behat\API\Context\LimitationParser\ParentOwnerLimitationParser');
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,3 @@ public function parse(string $limitationValues): Limitation
);
}
}

class_alias(ParentUserGroupLimitationParser::class, 'EzSystems\Behat\API\Context\LimitationParser\ParentUserGroupLimitationParser');
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,3 @@ public function parse(string $limitationValues): Limitation
);
}
}

class_alias(SectionLimitationParser::class, 'EzSystems\Behat\API\Context\LimitationParser\SectionLimitationParser');
Loading

0 comments on commit 50dc38e

Please sign in to comment.