Skip to content

[CodingStyle] Deprecate WrapEncapsedVariableInCurlyBracesRector - #8272

Merged
TomasVotruba merged 1 commit into
mainfrom
deprecate-wrap-encapsed-variable-in-curly-braces
Aug 3, 2026
Merged

[CodingStyle] Deprecate WrapEncapsedVariableInCurlyBracesRector#8272
TomasVotruba merged 1 commit into
mainfrom
deprecate-wrap-encapsed-variable-in-curly-braces

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Deprecates WrapEncapsedVariableInCurlyBracesRector and removes it from the coding style level.

The rule only wraps a plain interpolated variable in curly braces:

 function run($world)
 {
-    echo "Hello $world!";
+    echo "Hello {$world}!";
 }

This is a pure coding standard preference with no real value:

  • no PHP version deprecates "$var" — the syntax stays valid
  • the actual deprecation, ${var} (PHP 8.2), is already covered by VariableInStringInterpolationFixerRector in the php82 set
  • a coding standard tool is the right place for this

Follows the same shape as #8268 and #8269.

@TomasVotruba
TomasVotruba merged commit 5e14d8b into main Aug 3, 2026
64 checks passed
@TomasVotruba
TomasVotruba deleted the deprecate-wrap-encapsed-variable-in-curly-braces branch August 3, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant