Skip to content

Conversation

@alongosz
Copy link
Member

@alongosz alongosz commented May 8, 2024

🎫 Issue IBX-8118

Description:

This PR defines the first rule, to remove our BC layer class_alias statements from the codebase.

Usage

Create ./rector.php:

<?php

/**
 * @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);

use Ibexa\Rector\Rule\Internal\RemoveLegacyClassAliasRector;
use Rector\Config\RectorConfig;

return static function (RectorConfig $rectorConfig): void {
    $rectorConfig->paths(
        [
            __DIR__ . '/src', // see if it matches your project structure
            __DIR__ . '/tests',
        ]
    );

    $rectorConfig->rule(RemoveLegacyClassAliasRector::class);
};

For QA:

Optionally, check if the rector rule works as expected.

Documentation:

No doc needed, this is an internal rule.

@alongosz alongosz force-pushed the ibx-8117-prepare-rector-package branch from 2fb6ad2 to 121bf48 Compare May 9, 2024 08:42
@alongosz alongosz force-pushed the ibx-8118-rules-remove-legacy-class-alias branch from bf0add0 to db459d1 Compare May 9, 2024 08:42
@alongosz alongosz requested review from a team and mnocon May 9, 2024 08:46
@konradoboza konradoboza requested a review from a team May 9, 2024 13:41
@alongosz alongosz force-pushed the ibx-8118-rules-remove-legacy-class-alias branch from db459d1 to 882b680 Compare May 9, 2024 16:57
Base automatically changed from ibx-8117-prepare-rector-package to main May 10, 2024 09:28
@alongosz alongosz force-pushed the ibx-8118-rules-remove-legacy-class-alias branch from 882b680 to b8b7841 Compare May 10, 2024 09:30
@alongosz alongosz merged commit b1c7fdb into main May 10, 2024
@alongosz alongosz deleted the ibx-8118-rules-remove-legacy-class-alias branch May 10, 2024 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants