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

- Fix AnonymousMigrations parsing for } beyond the class declaration #11

Merged
merged 2 commits into from
Oct 20, 2023

Conversation

flap152
Copy link
Contributor

@flap152 flap152 commented Oct 1, 2023

In the AnonymousMigrations task the closing ; will appear in the wrong location if } appears after the class (in a comment section for example), as reported in issue #10 .

In this PR, we parse the class to determine where the declaration ends, then insert a ;
This is similar to what happens in the DownMigration task.

…elcaration (most probably in comments).

- Added fixture and test case
@flap152
Copy link
Contributor Author

flap152 commented Oct 1, 2023

The migration fixture is created specifically to address the issue, but the comment section is the only significant difference and could simply be added to the "simple.php" migration if wanted

@jasonmccreary
Copy link
Collaborator

Sorry for the delay, if you can fix the lint issue, I'll get this merged and tagged.

@flap152
Copy link
Contributor Author

flap152 commented Oct 20, 2023

Locally, phplint itself was ok but pint fixed a couple whitespaces. I enabled GH actions on my fork and pushed to main to trigger them and got all green. Should be ok now.

@jasonmccreary jasonmccreary merged commit 4d85c93 into laravel-shift:main Oct 20, 2023
5 checks passed
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.

2 participants