Skip to content

Commit

Permalink
IBX-8139: Dropped class_alias BC layer statements from all classes (#28)
Browse files Browse the repository at this point in the history
For more details see https://issues.ibexa.co/browse/IBX-8139 and #28

Key changes:

* Dropped class_alias BC layer from production code

* [Composer] Dropped legacy namespaces from autoload section
  • Loading branch information
alongosz authored Jun 5, 2024
1 parent f589d3b commit 7a20190
Show file tree
Hide file tree
Showing 24 changed files with 1 addition and 48 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
"psr-4": {
"Ibexa\\Bundle\\FieldTypeQuery\\": "src/bundle/",
"Ibexa\\FieldTypeQuery\\": "src/lib/",
"Ibexa\\Contracts\\FieldTypeQuery\\": "src/contracts/",
"EzSystems\\EzPlatformQueryFieldType\\": "src/lib/"
"Ibexa\\Contracts\\FieldTypeQuery\\": "src/contracts/"
}
},
"autoload-dev": {
Expand Down
2 changes: 0 additions & 2 deletions src/bundle/Controller/QueryFieldRestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,3 @@ private function loadLocationByPath(Request $request): Location
return $this->locationService->loadLocation((int)$locationId);
}
}

class_alias(QueryFieldRestController::class, 'EzSystems\EzPlatformQueryFieldType\Controller\QueryFieldRestController');
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,3 @@ public function process(ContainerBuilder $container)
$container->setParameter(self::PARAMETER, $parameter);
}
}

class_alias(ConfigurableFieldDefinitionMapperPass::class, 'EzSystems\EzPlatformQueryFieldType\Symfony\DependencyInjection\Compiler\ConfigurableFieldDefinitionMapperPass');
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,3 @@ static function ($parameterName) {
}
}
}

class_alias(FieldDefinitionIdentifierViewMatcherPass::class, 'EzSystems\EzPlatformQueryFieldType\Symfony\DependencyInjection\Compiler\FieldDefinitionIdentifierViewMatcherPass');
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,3 @@ private function buildQueryTypeName($queryTypeIdentifier)
);
}
}

class_alias(QueryTypesListPass::class, 'EzSystems\EzPlatformQueryFieldType\Symfony\DependencyInjection\Compiler\QueryTypesListPass');
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,3 @@ private function prependGraphQL(ContainerBuilder $container): void
]);
}
}

class_alias(IbexaFieldTypeQueryExtension::class, 'EzSystems\EzPlatformQueryFieldType\Symfony\DependencyInjection\EzSystemsEzPlatformQueryFieldTypeExtension');
2 changes: 0 additions & 2 deletions src/bundle/IbexaFieldTypeQueryBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,3 @@ public function build(ContainerBuilder $container)
$container->addCompilerPass(new Compiler\FieldDefinitionIdentifierViewMatcherPass());
}
}

class_alias(IbexaFieldTypeQueryBundle::class, 'EzSystems\EzPlatformQueryFieldType\Symfony\EzSystemsEzPlatformQueryFieldTypeBundle');
2 changes: 0 additions & 2 deletions src/contracts/QueryFieldLocationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,3 @@ public function loadContentItemsSliceForLocation(Location $location, string $fie
*/
public function countContentItemsForLocation(Location $location, string $fieldDefinitionIdentifier): int;
}

class_alias(QueryFieldLocationService::class, 'EzSystems\EzPlatformQueryFieldType\API\QueryFieldLocationService');
2 changes: 0 additions & 2 deletions src/contracts/QueryFieldServiceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,3 @@ public function loadContentItemsSlice(Content $content, string $fieldDefinitionI
*/
public function getPaginationConfiguration(Content $content, string $fieldDefinitionIdentifier): int;
}

class_alias(QueryFieldServiceInterface::class, 'EzSystems\EzPlatformQueryFieldType\API\QueryFieldServiceInterface');
2 changes: 0 additions & 2 deletions src/lib/ContentView/FieldDefinitionIdentifierMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,3 @@ public function match(View $view)
return in_array($view->getParameter('fieldIdentifier'), $this->getValues(), true);
}
}

class_alias(FieldDefinitionIdentifierMatcher::class, 'EzSystems\EzPlatformQueryFieldType\eZ\ContentView\FieldDefinitionIdentifierMatcher');
2 changes: 0 additions & 2 deletions src/lib/ContentView/QueryResultsInjector.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,3 @@ private function buildResults(FilterViewParametersEvent $event): iterable
}
}
}

class_alias(QueryResultsInjector::class, 'EzSystems\EzPlatformQueryFieldType\eZ\ContentView\QueryResultsInjector');
2 changes: 0 additions & 2 deletions src/lib/ContentView/QueryResultsPagerFantaAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,3 @@ public function getSlice($offset, $length)
);
}
}

class_alias(QueryResultsPagerFantaAdapter::class, 'EzSystems\EzPlatformQueryFieldType\eZ\ContentView\QueryResultsPagerFantaAdapter');
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,3 @@ public function getSlice($offset, $length)
);
}
}

class_alias(QueryResultsWithLocationPagerFantaAdapter::class, 'EzSystems\EzPlatformQueryFieldType\eZ\ContentView\QueryResultsWithLocationPagerFantaAdapter');
2 changes: 0 additions & 2 deletions src/lib/ExceptionSafeQueryFieldService.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,3 @@ public function countContentItemsForLocation(Location $location, string $fieldDe
}
}
}

class_alias(ExceptionSafeQueryFieldService::class, 'EzSystems\EzPlatformQueryFieldType\API\ExceptionSafeQueryFieldService');
2 changes: 0 additions & 2 deletions src/lib/FieldType/Form/QueryFieldFormType.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,3 @@ public function buildForm(FormBuilderInterface $builder, array $options)
$builder->addModelTransformer(new FieldValueTransformer($this->fieldTypeService->getFieldType('ezcontentquery')));
}
}

class_alias(QueryFieldFormType::class, 'EzSystems\EzPlatformQueryFieldType\eZ\FieldType\Form\QueryFieldFormType');
2 changes: 0 additions & 2 deletions src/lib/FieldType/Mapper/ParametersTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,3 @@ public function reverseTransform($value)
return Yaml::parse($value);
}
}

class_alias(ParametersTransformer::class, 'EzSystems\EzPlatformQueryFieldType\eZ\FieldType\Mapper\ParametersTransformer');
2 changes: 0 additions & 2 deletions src/lib/FieldType/Mapper/QueryFormMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,3 @@ private function getContentTypes()
}
}
}

class_alias(QueryFormMapper::class, 'EzSystems\EzPlatformQueryFieldType\eZ\FieldType\Mapper\QueryFormMapper');
2 changes: 0 additions & 2 deletions src/lib/FieldType/Query/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,5 +248,3 @@ public static function getTranslationMessages(): array
];
}
}

class_alias(Type::class, 'EzSystems\EzPlatformQueryFieldType\eZ\FieldType\Query\Type');
2 changes: 0 additions & 2 deletions src/lib/FieldType/Query/Value.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,3 @@ public function __toString()
return (string)$this->text;
}
}

class_alias(Value::class, 'EzSystems\EzPlatformQueryFieldType\eZ\FieldType\Query\Value');
2 changes: 0 additions & 2 deletions src/lib/GraphQL/ContentQueryFieldDefinitionMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,3 @@ private function nameValueConnectionType($typeIdentifier): string
);
}
}

class_alias(ContentQueryFieldDefinitionMapper::class, 'EzSystems\EzPlatformQueryFieldType\GraphQL\ContentQueryFieldDefinitionMapper');
2 changes: 0 additions & 2 deletions src/lib/GraphQL/QueryFieldResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,3 @@ public function resolveQueryFieldDefinitionParameters(array $parameters): array
return $return;
}
}

class_alias(QueryFieldResolver::class, 'EzSystems\EzPlatformQueryFieldType\GraphQL\QueryFieldResolver');
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,3 @@ public function getIndexColumn()
return 'sort_key_string';
}
}

class_alias(QueryConverter::class, 'EzSystems\EzPlatformQueryFieldType\eZ\Persistence\Legacy\Content\FieldValue\Converter\QueryConverter');
2 changes: 0 additions & 2 deletions src/lib/QueryFieldPaginationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@
interface QueryFieldPaginationService
{
}

class_alias(QueryFieldPaginationService::class, 'EzSystems\EzPlatformQueryFieldType\API\QueryFieldPaginationService');
2 changes: 0 additions & 2 deletions src/lib/QueryFieldService.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,5 +206,3 @@ static function (SearchHit $searchHit): Content {
);
}
}

class_alias(QueryFieldService::class, 'EzSystems\EzPlatformQueryFieldType\API\QueryFieldService');

0 comments on commit 7a20190

Please sign in to comment.