Skip to content

Conversation

@alongosz
Copy link
Member

@alongosz alongosz commented Jul 22, 2024

🎫 Issue IBX-8394

Description:

Added to Ibexa 5.0 set list a rule which renames usages of deprecated \Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider with
\Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface

Added also test coverage for the Ibexa 5.0 set - can be in the future expaned with coverage for pre-existing and new configuration.

DX: Defined \Ibexa\Contracts\Rector\Sets\IbexaSetList set list, so the Developer's rector.php config could be as follows:

   
declare(strict_types=1);

use Ibexa\Contracts\Rector\Sets\IbexaSetList;
use Rector\Config\RectorConfig;

return RectorConfig::configure()
                   ->withPaths([__DIR__ . '/src', __DIR__ . '/tests'])
                   ->withSets([IbexaSetList::IBEXA_50->value])
;

instead of hardcoded path from ./vendor/....

For QA:

Documentation:

Changed example configuration.

Comment on lines +25 to +30
use Ibexa\Bundle\Core\ApiLoader\RepositoryConfigurationProvider;

class FooBar {
public function foo(): \Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface
{
return $this->bar(\Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface::class);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Rector per design expects that a Developer runs CS fixer afterwards. For the automated PR I'll run CS fixer with extra FQCN import rule, which will both remove unused use and simplify FQCN.

@alongosz alongosz requested a review from a team July 23, 2024 10:38
@alongosz
Copy link
Member Author

Update: aligned docs with the changes.

@alongosz alongosz merged commit 0def678 into main Jul 25, 2024
@alongosz alongosz deleted the ibx-8394-ibexa-5.0-repo-config-provider-rector branch July 25, 2024 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants