Skip to content

[BUGFIX] Fix the return type of Selector::isValid() #1174

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

Merged
merged 2 commits into from
Mar 16, 2025

Conversation

oliverklee
Copy link
Collaborator

Fixes #1043
Part of #811

@oliverklee oliverklee requested a review from JakeQZ March 16, 2025 15:59
@oliverklee oliverklee self-assigned this Mar 16, 2025
@oliverklee oliverklee removed the request for review from JakeQZ March 16, 2025 16:24
@oliverklee oliverklee marked this pull request as draft March 16, 2025 16:24
@oliverklee oliverklee added the blocked Needs another issue to be resolved first label Mar 16, 2025
Copy link
Collaborator

@JakeQZ JakeQZ left a comment

Choose a reason for hiding this comment

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

The failing test is because this breaks keyframes parsing, and is not related to the vendor prefix. It just so happens that the keyframes test was written with a vendor prefix, and no equivalent test was written without a vendor prefix.

{
return \preg_match(static::SELECTOR_VALIDATION_RX, $selector);
$numberOfMatches = \preg_match(self::SELECTOR_VALIDATION_RX, $selector);
Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs to be static because KeyframeSelector overrides the SELECTOR_VALIDATION_RX constant to also allow keyframe animation percentage.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, that's why. Fix coming up …

@oliverklee oliverklee force-pushed the bugfix/valid-selector-type branch from 4f80f1e to 3104219 Compare March 16, 2025 19:49
@oliverklee oliverklee marked this pull request as ready for review March 16, 2025 19:49
@oliverklee oliverklee requested a review from JakeQZ March 16, 2025 19:49
@oliverklee oliverklee removed the blocked Needs another issue to be resolved first label Mar 16, 2025
@coveralls
Copy link

Coverage Status

coverage: 56.036% (+0.1%) from 55.906%
when pulling 3104219 on bugfix/valid-selector-type
into 4889353 on main.

@JakeQZ JakeQZ merged commit 4d965b3 into main Mar 16, 2025
21 checks passed
@JakeQZ JakeQZ deleted the bugfix/valid-selector-type branch March 16, 2025 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Have Selector::isValid() actually return a bool
3 participants