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

[12.x] remove faker property from Factory #53440

Closed
wants to merge 1 commit into from

Conversation

browner12
Copy link
Contributor

$this->faker is the old way of doing things, and ALL the documentation says to use fake(), which also gives some localization benefits. we should remove the property from Factory to cleanup the code and prevent its use.

the WithFaker trait is has never been documented as far as I can tell, and fake() should be used instead now anyway.

the fake() helper was introduced in #42844 2 years ago.

`$this->faker` is the old way of doing things, and ALL the documentation says to use `fake()`, which also gives some localization benefits.  we should remove the property from `Factory` to cleanup the code and prevent its use.

the `WithFaker` trait is has never been documented as far as I can tell, and `fake()` should be used instead now anyway.
@taylorotwell
Copy link
Member

Hmm, I'm not sure this breaking change is worth it for end users since the maintenance burden on our end is so small.

@browner12
Copy link
Contributor Author

@taylorotwell I don't disagree that the maintenance burden right now is small, but I do feel the day will come when Laravel has to make the decision to remove some of this code for the health of the framework.

@browner12 browner12 deleted the AB-drop-faker-property branch November 7, 2024 22:25
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