-
-
Notifications
You must be signed in to change notification settings - Fork 90
feat: replace proxy mechanism with PHP 8.4 lazy objects #893
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
base: 2.6.x
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When called without args, let's make the refresh()
function proxify everything.
this feels weird, function refresh(object &$object): object
{
return Configuration::instance()->persistence()->refresh($object);
} maybe we could add a new function? |
Hmm yeah, forgot about that. maybe a |
9bd9a76
to
6fedc74
Compare
|
57b3f02
to
4c21aaf
Compare
OK CI is now green 🙂 I've deprecated I've listed in an issue what needs to be done before releasing this Benchmark is showing a small performance downgrade, which seems totally legit, because we're performing more requests than before with
|
43bd959
to
8a01c56
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Thanks for working on this!
8a01c56
to
f16f893
Compare
690b95a
to
75dd015
Compare
f16f893
to
5c886d2
Compare
21860d7
to
067851e
Compare
067851e
to
58dbe05
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Think we should release 2.6 before merging?
@@ -176,6 +201,24 @@ function enable_persisting(): void | |||
Configuration::instance()->persistence()->enablePersisting(); | |||
} | |||
|
|||
function assertPersisted(object $object, string $message = '{entity} is not persisted.'): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we should stick with our current snake_case function naming.
In a future PR, thinking we should add some helper phpunit methods to either Factories or a new trait:
->save()
->assertPersisted()
- etc...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we should stick with our current snake_case function naming.
do you mean I should change to _assertPersisted()
?
In a future PR, thinking we should add some helper phpunit methods to either Factories or a new trait
yeah, why not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you mean I should change to _assertPersisted()?
assert_persisted()
to match the other functions like persistent_factory()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL ok sorry 😅 🤦
relates to #899
I think we'll release this in Foundry 2.6