Open kbond opened 1 year ago
Bundle config diff:
zenstruck_foundry:
- auto_refresh_proxies: null
instantiator:
- without_constructor: false
+ use_constructor: true
allow_extra_attributes: false
always_force_properties: false
service: null
+ orm:
+ auto_persist: true
+ reset:
+ connections: [default]
+ entity_managers: [default]
+ mode: schema
+ mongo:
+ auto_persist: true
+ reset:
+ document_managers: [default]
- database_resetter:
- enabled: true
- orm:
- connections: []
- object_managers: []
- reset_mode: schema
- odm:
- object_managers: []
global_state: []
- make_factory:
- default_namespace: Factory
(added these to above list)
Here's a list of 2.x BC breaks. Most can be mitigated with deprecations in 1.x:
Zenstruck\Foundry\Factory
withAttributes()
->with()
__construct()
removedZenstruck\Foundry\ModelFactory
->Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory
protected function getDefaults(): array
->protected function defaults(): array|callable
protected static function getClass(): string
->public static function class(): string
protected function initialize()
->protected function initialize(): static
addState()
->with()
Zenstruck\Foundry\Proxy
->Zenstruck\Foundry\Persistence\Proxy
\Stringable
isPersisted()
removedobject()
->_real()
save()
->_save()
remove()
->_delete()
refresh()
->_refresh()
forceSet()
->_set()
forceSetAll()
removedforceGet()
->_get()
repository()
->_repository()
enableAutoRefresh()
->_enableAutoRefresh()
disableAutoRefresh()
->_disableAutoRefresh()
withoutAutoRefresh()
->_withoutAutoRefresh()
assertPersisted()
removedassertNotPersisted()
removedZenstruck\Foundry\anonymous()
->Zenstruck\Foundry\factory()
(factory()
is currently deprecated in 1.x...)Zenstruck\Foundry\create()
->Zenstruck\Foundry\Persistence\persist()
Zenstruck\Foundry\create_many()
removedZenstruck\Foundry\instantiate()
->Zenstruck\Foundry\object()
Zenstruck\Foundry\instantiate_many()
removedZenstruck\Foundry\repository()
->Zenstruck\Foundry\Persistence\repository()
Zenstruck\Foundry\Test\TestState
->Zenstruck\Foundry\Test\UnitTestConfig
(better name?)Zenstruck\Foundry\Factory::delayFlush()
->Zenstruck\Foundry\Persistence\flush_after()
Zenstruck\Foundry\Test\Factories
disablePersist()
->Zenstruck\Foundry\Persistence\disable_persisting()
enablePersist()
->Zenstruck\Foundry\Persistence\enable_persisting()
Zenstruck\Foundry\Instantiator
toZenstruck\Foundry\Object\Instantiator
new Instantiator()
=>Instantiator::withConstructor()
Zenstruck\Foundry\RepositoryProxy
toZenstruck\Foundry\Persistence\RepositoryDecorator