-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
[Regex] Introduce *_match() functions to fetch captured data groups #151
Conversation
Pull Request Test Coverage Report for Build 733281690
💛 - Coveralls |
integration/Psalm/EventHandler/RegexCaptureGroupsFunctionReturnTypeProvider.php
Outdated
Show resolved
Hide resolved
f138529
to
58bb2d3
Compare
ce89775
to
dd8cc8f
Compare
Introduced the
|
d8b9338
to
0b1613f
Compare
@azjezz Fixed it without using a psalm plugin. Instead the conditional return types of psalm did the trick together with a fallback to a custom |
Rebased it to 1.6.X. Let me know if there is anything else I can do in order to finish this one! |
@azjezz How do you want to continue with this PR? Is it something you want to include? Because if so, I need to move a part to the new plugin repository. |
yes, let's move things to the new plugin, merge changes there, then we merge this. |
Allright, will do it soon - but having some time constraints due to yet another lockdown here. |
Added the PR to the psalm plugin, but It will conflict with the open issue - so it's not completely done. Next rebased against 1.7.x - shall I keep the psalm plugin changes in here as well or remove it from the PR? |
remove it, we don't want to add anything to the old plugin, just keeping it to not break BC. php-standard-library/psalm-plugin#3 has been merged, so i guess you can rebase php-standard-library/psalm-plugin#5 |
overall, this LGTM. I'll probably do another review later and merge if everything is okay. we can release this, along side #138 in 1.7 :) |
This PR introduces a
first_match()
andevery_match()
function in which you can specify the shape of the result: