Skip to content
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

Hooks reflection #4110

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open

Hooks reflection #4110

wants to merge 21 commits into from

Conversation

Crell
Copy link
Contributor

@Crell Crell commented Nov 20, 2024

New PR, includes #4039, which generates the stubs.

Resolves #4039.

I'm not certain if the enum is in the right place, but I wasn't sure where else to put it. Open to suggestions.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, seems like the output from gen_stub is wrong, that's good to know :|

But thanks for working on it!

reference/reflection/reflectionproperty/gethook.xml Outdated Show resolved Hide resolved
reference/reflection/reflectionproperty/gethook.xml Outdated Show resolved Hide resolved
reference/reflection/reflectionproperty/gethook.xml Outdated Show resolved Hide resolved
reference/reflection/reflectionproperty/gethook.xml Outdated Show resolved Hide resolved
reference/reflection/reflectionproperty/gethooks.xml Outdated Show resolved Hide resolved
reference/reflection/reflectionproperty/getrawvalue.xml Outdated Show resolved Hide resolved
reference/reflection/reflectionproperty/hashook.xml Outdated Show resolved Hide resolved
reference/reflection/reflectionproperty/hashooks.xml Outdated Show resolved Hide resolved
@Crell Crell marked this pull request as ready for review December 1, 2024 05:25
Comment on lines 55 to 56
$rProp->getHook(PropertyHookType::Get); // Returns an instance of \ReflectionMethod.
$rProp->getHook(PropertyHookType::Set); // Returns null.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer a var_dump() (possible using ::class) with a screen tag instead of a comment, as those are more annoying for translations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. In that case, do we even need the screen tag anymore? Just have it show output and leave it to the new wasm runner.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I have php/web-php#1180 to reuse the output.

I don't see the point in forcing everyone to run WASM, and require JS, just to see the expected output.

reference/reflection/reflectionproperty/gethooks.xml Outdated Show resolved Hide resolved
reference/reflection/reflectionproperty/gethooks.xml Outdated Show resolved Hide resolved
reference/reflection/reflectionproperty/isfinal.xml Outdated Show resolved Hide resolved
reference/reflection/reflectionproperty/isprivateset.xml Outdated Show resolved Hide resolved
reference/reflection/reflectionproperty/isprotectedset.xml Outdated Show resolved Hide resolved
reference/reflection/reflectionproperty/isvirtual.xml Outdated Show resolved Hide resolved
reference/reflection/reflectionproperty/isvirtual.xml Outdated Show resolved Hide resolved
@Girgias
Copy link
Member

Girgias commented Dec 13, 2024

I didn't realize, but @Crell you didn't address some of the review comments.

@Crell
Copy link
Contributor Author

Crell commented Dec 14, 2024

Switched all the examples to generate output. I did not include the output, because it's a hassle to do and we now have the Wasm runner that will produce it for us on-demand.

@Crell
Copy link
Contributor Author

Crell commented Dec 16, 2024

@Girgias Which comments haven't been addressed?

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Output of examples is missing.

@Crell
Copy link
Contributor Author

Crell commented Dec 22, 2024

I disagree that manually pre-generating the output is worthwhile now that we have the Wasm runner. If someone else would like to modify the PR to include that, go ahead, but I have limited time with a baby now, so won't be doing so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants