10000 Bug: rule `ServiceSetStringNameToClassNameRector` applied for config.php · Issue #709 · rectorphp/rector-symfony · GitHub
[go: up one dir, main page]

Skip to content

Bug: rule ServiceSetStringNameToClassNameRector applied for config.php #709

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Myks92 opened this issue Mar 24, 2025 · 2 comments
Closed

Comments

@Myks92
Copy link
Contributor
Myks92 commented Mar 24, 2025

I have config in path src/Access/Rbac/config.php:

// src/Access/Rbac/config.php
<?php

declare(strict_types=1);

namespace App\Access\Rbac;

use App\Access\Rbac\Entity\Permission;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

return static function (ContainerConfigurator $configurator): void {
    $configurator->extension('doctrine', [
        'dbal' => [
            'types' => [
                Permission\IdType::NAME => Permission\IdType::class,
                Permission\NameType::NAME => Permission\NameType::class,
                Permission\CodeType::NAME => Permission\CodeType::class,
            ],
        ],
        'orm' => [
            'mappings' => [
                'AccessRbac' => [
                    'is_bundle' => false,
                    'type' => 'attribute',
                    'dir' => __DIR__ . '/Entity',
                    'prefix' => 'App\Access\Rbac\Entity',
                    'alias' => 'AccessRbac',
                ],
            ],
        ],
    ]);
};

In the config has mappings for Doctrine ORM. String 'prefix' => 'App\Access\Rbac\Entity' replaced on 'prefix' => 'app\access\rbac\entity' the rule ServiceSetStringNameToClassNameRector

Image.

I think it's not right.

@TomasVotruba
Copy link
Member

Thank you for your report!

We'll need an isolated failing demo link from: http://getrector.com/demo,
that way we can reproduce the bug.

@Myks92
Copy link
Contributor Author
Myks92 commented Mar 24, 2025

Unfortunately, I was unable to solve this problem using try Rector. Unfortunately, I was unable to solve this problem using try Rector. But I fixed up with PR #710.

@Myks92 Myks92 closed this as completed Mar 28, 2025
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

No branches or pull requests

2 participants
0