Skip to content

[TASK] Deprecate ::atRuleArgs() #1191

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

Open
wants to merge 1 commit into
base: v8.x
Choose a base branch
from
Open

Conversation

oliverklee
Copy link
Collaborator

These methods

  • are not used internally
  • are redundant to the existing getters
  • have wildly different return types across classes, which reduces the usefulness of the general method

@oliverklee oliverklee added the deprecation A method, property, or some functionality has been deprecated. label Mar 18, 2025
@oliverklee oliverklee requested a review from JakeQZ March 18, 2025 11:31
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.

Some of the classes don't have equivalent alternative getters, so we should add these first.

I've made a suggestion for the deprecation note for the interface.

@@ -42,6 +42,8 @@ public function atRuleName()

/**
* @return string
*
* @deprecated since V8.8.0, will be removed in version 9.0.0. Use the specific getter instead.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This class doesn't have a specific getter for $arguments, so one will need to be added first.

@@ -103,6 +103,8 @@ public function atRuleName()

/**
* @return string
*
* @deprecated since V8.8.0, will be removed in version 9.0.0. Use the specific getter instead.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This doesn't have a getter for the CSSString object property, only one that returns a native string. I wonder if we should first add a getter for the CSSString.

@@ -45,6 +45,8 @@ public function atRuleName()

/**
* @return string
*
* @deprecated since V8.8.0, will be removed in version 9.0.0. Use the specific getter instead.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This doesn't have a specific getter for the $arguments property, so we should add one first.

These methods

- are not used internally
- are redundant to the existing getters
- have wildly different return types across classes, which
  reduces the usefulness of the general method
@oliverklee oliverklee force-pushed the task/deprecate/atruleargs branch from 749bbb7 to 1ade62f Compare May 10, 2025 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation A method, property, or some functionality has been deprecated. to-backport
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants