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 SchemaAggregation when renaming tables through non-static method call #1065

Merged
merged 2 commits into from
Dec 10, 2021

Conversation

N-Silbernagel
Copy link
Contributor

  • Added or updated tests
  • Documented user facing changes
  • Updated CHANGELOG.md

Changes

In Laravel migrations we can rename a table by getting a reference to the table through Schema::table and renaming the table via the rename method.
Larastan analyzes those cases incorrectly, but rather treats them the same as a "renameColumn" call, resulting in "trying to access undefined property x" errors on models whose tables were renamed through that method.
This PR aims at changing that.

The method does not seem to be well documented but when you already have migrations using the method, it's hard to change them afterwards.

Breaking changes

I'm not aware of any.

@szepeviktor
Copy link
Collaborator

Hello Nils! 👋
Thank you for your work.

@canvural canvural merged commit b772627 into larastan:master Dec 10, 2021
@canvural
Copy link
Collaborator

Thank you!

@N-Silbernagel
Copy link
Contributor Author

Happy to contribute, love how the project is tested. Keep up the great work

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.

None yet

3 participants