Skip to content

Commit

Permalink
Fix: Remove get_called_class and get_class options from functions opt…
Browse files Browse the repository at this point in the history
…ion of function_to_constant fixer
  • Loading branch information
localheinz committed Oct 21, 2023
1 parent ae2767a commit 8ab698b
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ For a full diff see [`6.8.1...main`][6.8.1...main].

- Configured `case` option of `elements` option of `class_attributes_separation` fixer ([#922]), by [@localheinz]

### Fixed

- Removed `get_called_class` and `get_class` options from `functions` option of `function_to_constant` fixer where the resulting code would be incompatible with the target PHP version ([#923]), by [@localheinz]

## [`6.8.1`][6.8.1]

For a full diff see [`6.8.0...6.8.1`][6.8.0...6.8.1].
Expand Down
2 changes: 0 additions & 2 deletions src/RuleSet/Php53.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,6 @@ public static function create(): RuleSet
],
'function_to_constant' => [
'functions' => [
'get_called_class',
'get_class',
'php_sapi_name',
'phpversion',
'pi',
Expand Down
2 changes: 0 additions & 2 deletions src/RuleSet/Php54.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,6 @@ public static function create(): RuleSet
],
'function_to_constant' => [
'functions' => [
'get_called_class',
'get_class',
'php_sapi_name',
'phpversion',
'pi',
Expand Down
2 changes: 0 additions & 2 deletions test/Unit/RuleSet/Php53Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ protected function expectedRules(): Rules
],
'function_to_constant' => [
'functions' => [
'get_called_class',
'get_class',
'php_sapi_name',
'phpversion',
'pi',
Expand Down
2 changes: 0 additions & 2 deletions test/Unit/RuleSet/Php54Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,6 @@ protected function expectedRules(): Rules
],
'function_to_constant' => [
'functions' => [
'get_called_class',
'get_class',
'php_sapi_name',
'phpversion',
'pi',
Expand Down

0 comments on commit 8ab698b

Please sign in to comment.