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

Refactor #1

Merged
merged 53 commits into from
Jul 5, 2020
Merged

Refactor #1

merged 53 commits into from
Jul 5, 2020

Conversation

kbond
Copy link
Member

@kbond kbond commented Jun 13, 2020

kbond added 30 commits June 13, 2020 07:36
- make()
- makeMany()
- create()
- createMany()
- persist() -> create()
- persistMany() -> createMany()
- by default, use symfony/property-access to set values and disallow extra properties
- attribute keys can be prefixed with "optional:" to ignore
- attribute keys can be prefixed with "force:" to "force set" their value to properties directly
- add option to disable constructor
- add option to always allow extra attributes
- add option to always "force set" attributes
- remove self return type, add return static to docblock
- ensure instance of current factory is returned
…rnative:

- $factory->withoutPersisting()->create()->object()
- array_map(fn($p) => $p->object(), $factory->withoutPersisting()->createMany())
- make Manager constructor arguments required
- remove Manager::boot()
- make Manager/StoryManager services
- call Factory::boot() in ZenstruckFoundryBundle::boot()
- add test to ensure stories as services are loaded correctly
- proxies created in global state would have a different "Manager" than the
one used in your tests causing the om to think these were not persisted.
Always grabbing the current manager from Factory::manager() solves this.
- also removed injecting into RepositoryProxy to be consistent.
- using without bundle must be explicitly configured
@kbond kbond merged commit 21a87ff into master Jul 5, 2020
@kbond kbond deleted the refactor branch July 5, 2020 11:39
@nikophil nikophil mentioned this pull request Dec 21, 2023
6 tasks
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.

None yet

1 participant