Skip to content

Deprecate Double cast #1104

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

Closed
wants to merge 1 commit into from
Closed

Conversation

mttsch
Copy link
Contributor

@mttsch mttsch commented Aug 19, 2025

With PHP's (double) cast being deprecated and already having only been an alias for the (float) cast, introduce Float_ as a replacement for the Double cast.

@mttsch
Copy link
Contributor Author

mttsch commented Aug 19, 2025

Primarily, this PR is meant as a discussion opener whether such a deprecation is even wanted or deemed too disruptive for package consumers.

With PHP's `(double)` cast being deprecated and already having only been an alias for the `(float)` cast, introduce `Float_` as a replacement for the `Double` cast.
@mttsch mttsch force-pushed the deprecate-double-cast branch from 9d35f1c to aa35e9c Compare August 19, 2025 19:21
@@ -36,21 +36,21 @@ array(
)
)
3: Stmt_Expression(
expr: Expr_Cast_Double(
expr: Expr_Cast_Float(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if this is covered by BC?

Copy link
Owner

Choose a reason for hiding this comment

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

It is.

@nikic
Copy link
Owner

nikic commented Aug 19, 2025

We can only rename nodes at major version boundaries. I'd suggest filing an issue and we can add it to the 6.0 milestone.

@mttsch
Copy link
Contributor Author

mttsch commented Aug 20, 2025

@nikic Done #1105 1105

@mttsch mttsch closed this Aug 20, 2025
@mttsch mttsch deleted the deprecate-double-cast branch August 20, 2025 03:38
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