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

Array universal key #143

Merged
merged 7 commits into from
Feb 8, 2019
Merged

Conversation

JarJak
Copy link
Contributor

@JarJak JarJak commented Jan 16, 2019

Array universal key @*@ will match any key not presented in the pattern.
It works similarly to @...@ but for key-value arrays.

It needs "@*@": "@*@" instead of just @*@ or @...@ to bypass JSON validation.

It solves problem described in #40 but it is more elastic than #39 and #132 as it allows both specifying value pattern (like "@*@": @string@) and place where additional keys are allowed. Also it is more obvious to guess what wildcard key does than learning about pattern modifiers.

@JarJak
Copy link
Contributor Author

JarJak commented Jan 16, 2019

All tests green :)

@norberttech
Copy link
Member

hey @JarJak thanks for your work! Could you please also update readme and mention this feature?

@JarJak
Copy link
Contributor Author

JarJak commented Feb 7, 2019

@norzechowicz done

@norberttech norberttech merged commit 300c41a into coduo:master Feb 8, 2019
@norberttech
Copy link
Member

Thanks @JarJak I also created new release https://github.com/coduo/php-matcher/releases/tag/3.1.2 🎉

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