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

minor: deprecate auto-persist configuration #818

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

nikophil
Copy link
Member

No description provided.

@nikophil nikophil changed the title minor: deprecate auto-persist minor: deprecate auto-persist configuration Feb 16, 2025
@nikophil nikophil force-pushed the minor/deprecate-auto-persist branch from f760f2f to 46e99fe Compare February 16, 2025 14:32
@nikophil nikophil requested a review from kbond February 16, 2025 14:35
Copy link
Member

@kbond kbond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify, the way to achieve is to use ->withoutPersisting() on your factory?

@nikophil
Copy link
Member Author

@kbond yep, there are multiple ways to do this:

  • indeed, use ->withoutPersisting() on your factory
  • use the helper disable_persisting() which disables it globally, for the current test

@nikophil
Copy link
Member Author

nikophil commented Feb 24, 2025

by the way, this was not tested, nor documented and I've never seen it used in the wild. It is also a small annoyance, because before accessing PersistentObjectFactory::$persistMode you have to check if it is actually initialized.

For all these reasons, I think the best is to deprecate it. But I'm fine to keep it if you think we should ☺️

@kbond
Copy link
Member

kbond commented Feb 24, 2025

Let's deprecate and see if we hear anything

@nikophil nikophil merged commit 7b33216 into zenstruck:2.x Feb 24, 2025
66 checks passed
@nikophil nikophil deleted the minor/deprecate-auto-persist branch February 24, 2025 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants