Merged
Conversation
57fd083 to
77c5b6e
Compare
9cb446e to
739d91e
Compare
65a79f6 to
ba51619
Compare
W0rma
approved these changes
Apr 28, 2025
Member
Author
|
@W0rma Thank you! |
W0rma
reviewed
May 12, 2025
Comment on lines
+84
to
+86
| if (property_exists($this, $property)) { | ||
| $this->{$property} = $di->instantiate($actor); | ||
| } |
Contributor
There was a problem hiding this comment.
@TavoNiievez This check breaks some tests in one of my own projects if I try to access $this->tester. Error message: Undefined property: xxxTest::$tester
The test works fine if I remove the if clause and just call $this->{$property} = $di->instantiate($actor);
Member
Author
There was a problem hiding this comment.
@W0rma Sounds like you're right. Could you open a PR with something like this:
$di = $this->getMetadata()->getService('di');
if (($actor = $this->getMetadata()->getCurrent('actor')) &&
($property = lcfirst((string) Configuration::config()['actor_suffix']))) {
$this->{$property} = $di->instantiate($actor);
}?
Contributor
There was a problem hiding this comment.
@TavoNiievez See #6856
The change fixes the tests of my own project.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.