You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Add Missing Properties transformation not working as expected in Traits #726
When I :call phpactor#Transform("add_missing_properties") (or hit a on the Transform prompt) while in a Trait, it adds a new class. When performing the same action from a class, it works as expected.
Expected Behaviour
Phpactor adds a new private property to the trait.
Actual Behaviour
It creates an entirely new class matching the name of the trait and adds the property there instead.
After a few hours yesterday digging around, I was able to track the issue down to the code-transform repo and in turn found code-builder was lacking Trait support.
I've been able to fix locally so I'll open PRs on the respective repositories soon. While I've added some tests, it's still a work in progress and could likely use some feedback on potential refactoring and extra tests.
With everything split between at least two repos, hopefully this issue will help to keep everything tied together in one place.
Side note: I tried to join the Slack linked at the bottom of the README before opening this, but the invite link has expired. Is it still in use?Edit: Found new Slack link. PR at #727
changed the title [-]Add Missing Properties transformation not working as expected on Traits[/-][+]Add Missing Properties transformation not working as expected in Traits[/+]on Jan 29, 2019
Activity
dshoreman commentedon Jan 29, 2019
After a few hours yesterday digging around, I was able to track the issue down to the code-transform repo and in turn found code-builder was lacking Trait support.
I've been able to fix locally so I'll open PRs on the respective repositories soon. While I've added some tests, it's still a work in progress and could likely use some feedback on potential refactoring and extra tests.
With everything split between at least two repos, hopefully this issue will help to keep everything tied together in one place.
Side note: I tried to join the Slack linked at the bottom of the README before opening this, but the invite link has expired.
Is it still in use?Edit: Found new Slack link. PR at #727[-]Add Missing Properties transformation not working as expected on Traits[/-][+]Add Missing Properties transformation not working as expected in Traits[/+]dantleech commentedon Jan 29, 2019
Great, feel free to ping me on Slack :)
Stop calling class() when the "class" is a Trait
Stop calling class() when the "class" is a Trait