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

Make Abstract{Migration,Seed}::getAdapter return non-null #2261

Merged
merged 3 commits into from
Jan 23, 2024

Conversation

MasterOdin
Copy link
Member

@MasterOdin MasterOdin commented Jan 23, 2024

Closes #2200

Modifies the getAdapter method for the AbstractMigration and AbstractSeed classes to always return an adapter, or error if there is not one available. This is a change of behavior for AbstractMigration as it was documented as nullable before, while AbstractSeed would throw a fatal error if the adapter was not set. Now both will return a \RuntimeException if this method is called before an adapter has been set, but it's not expected that this should happen in user code unless they modify the constructor method to call it, but at that point it'd always be null so not sure why anyone would. As such, not considering this a BC break.

@MasterOdin MasterOdin merged commit cb5afbf into 0.x Jan 23, 2024
12 checks passed
@MasterOdin MasterOdin deleted the get-adapter-nullable branch January 23, 2024 16:24
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.

Why is migration adapter nullable?
1 participant