Wouter de Jong

Results 145 comments of Wouter de Jong

I would create only one extension, which can do either of this behavior based on configuration. That's more idiomatic Behat. As said in https://github.com/zenstruck/foundry/issues/234#issuecomment-1006502314 , it might also be worth...

Btw, I can't reproduce the Psalm errors locally :confused:

> Am I correct in that we can't add methods to the generated proxy? Yes. Proxies, at least within the scope of the ProxyManager library, are meant to behave exactly...

To summarize our Slack conversation: * [x] Move these proxy methods to normal functions: `force_set`, `force_get`, `disable_autorefresh`, `enable_autorefresh`, `without_autorefresh` * [x] Move `save` and `remove` to methods on the `Factory`...

I've updated the PR solving the biggest blocker: refreshing the model (value holder) of the proxy. I'll try to find some time later this week/weekend to fix the 2 remaining...

PR updated once again with the helper functions and an updated README. As the proxy object now really behaves like the real object, I've removed most of the mentions of...

> Have you thought anymore a out how we're going to migrate users to this? Currently, you would opt-in for the new proxy manager in each factory: ```php class PostFactory...

> Following Symfony's BC policy, we can't remove the current Proxy system entirely in 2.0? Introducing a new system is a 3 step progress in Symfony BC: 1. In a...

> Auto-refreshing doesn't work - maybe this is possible with some more tweaks. I'm also ok deprecating auto-refreshing and removing in 2.0. It is complex and has caused some confusion......

> This is different from https://github.com/wouterj/symfony-demo/blob/fc122b2615652934a66acddfb6cb26241c883235/tests/Command/AddUserCommandTest.php#L108, correct? Yes, I guess that's a Doctrine error. If that error is fixed, and this is resolved (I need to think about your 2nd...