Skip to content
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

Rename refactoring ignores constants inside yaml files #1667

Closed
sabat24 opened this issue Jul 3, 2021 · 0 comments · Fixed by #1683
Closed

Rename refactoring ignores constants inside yaml files #1667

sabat24 opened this issue Jul 3, 2021 · 0 comments · Fixed by #1683

Comments

@sabat24
Copy link

sabat24 commented Jul 3, 2021

  1. Create some class and add there a constant
namespace App\Model;
 
final class Status
{
    public const DRAFT = 'draft';
}
  1. Create some yaml file (in my case it's a workflow)
framework:
  workflows:
    training_status:
      type: 'state_machine'
      initial_marking: !php/const App\Model\Status::DRAFT
  1. Try to refactor the name of the constant in Status class from DRAFT to something else.

The reference to DRAFT constants won't be changed.

For example if I go to my App\\Model\\Status.php and refactor name from public const DRAFT = 'draft'; to public const DRAFT_NEW = 'draft'; IDE should change it also in YAML to initial_marking: !php/const App\Model\Status::DRAFT_NEW

Is it possible to tell IDE about connection between constants used in YAML during refactoring?

adamwojs added a commit to adamwojs/idea-php-symfony2-plugin that referenced this issue Aug 1, 2021
adamwojs added a commit to adamwojs/idea-php-symfony2-plugin that referenced this issue Aug 1, 2021
adamwojs added a commit to adamwojs/idea-php-symfony2-plugin that referenced this issue Aug 1, 2021
Haehnchen added a commit that referenced this issue Aug 1, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fixed #1667: Rename refactoring ignores constants inside yaml files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant