Skip to content

Conversation

@duncanmcclean
Copy link
Member

This pull request fixes an issue with the eloquent:import-users command when computed values exist for users.

The command would complain that there's "No users to import". Calling app(UserRepository::class)->all() directly would return the flat-file user, but User::all() wouldn't.

The reason for this is because the Eloquent repository is resolved/cached by the facade from when the computed value was registered in the AppServiceProvider.

This PR fixes it by clearing resolved instances of the User after we bind the flat file repository.

Fixes #13214

@jasonvarga jasonvarga merged commit 566eb8b into 5.x Dec 5, 2025
28 checks passed
@jasonvarga jasonvarga deleted the fix-import-user-with-computed-values branch December 5, 2025 14:33
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.

Users database import fails if computed values exist

3 participants