kbond / foundry-next

MIT License
0 stars 1 forks source link

fix: accessing property in proxy after modification should not throw error #14

Closed nikophil closed 8 months ago

nikophil commented 8 months ago

here is a failing test case

this test produces the following error:

1) Zenstruck\Foundry\Tests\Integration\ORM\GenericEntityProxyFactoryTest::test_something
RuntimeException: Cannot auto refresh "Zenstruck\Foundry\Tests\Fixture\Entity\GenericEntity" as there are unsaved changes. Be sure to call ->_save() or disable auto refreshing (see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#auto-refresh for details).

/home/nikophil/works/zenstruck/foundry-next/src/Persistence/PersistenceManager.php:218
/home/nikophil/works/zenstruck/foundry-next/src/Persistence/IsProxy.php:68
/home/nikophil/works/zenstruck/foundry-next/src/Persistence/IsProxy.php:113
/home/nikophil/works/zenstruck/foundry-next/tests/Integration/ORM/GenericEntityProxyFactoryTest.php:33
nikophil commented 8 months ago

this cannot be fixed and will be documented in the upgrade guide