Skip to content

Commit 10a849e

Browse files
committed
Remove phpExecutable as setPhpExecutable() is now deprecated in upstream
1 parent f14b6b4 commit 10a849e

File tree

3 files changed

+0
-8
lines changed

3 files changed

+0
-8
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ containing your desired options.
150150
| hideProgress | `bool` | `false` |
151151
| indent | `string` | `' '` // 4 spaces |
152152
| lineEnding | `string` | `"\n"` |
153-
| phpExecutable | `null, string` | `null` |
154153
| isRiskyAllowed | `bool` | `false` |
155154
| usingCache | `bool` | `true` |
156155
| customRules | `array` | `[]` |

src/Factory.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ final class Factory
3434
* hideProgress: bool,
3535
* indent: non-empty-string,
3636
* lineEnding: non-empty-string,
37-
* phpExecutable: null|string,
3837
* isRiskyAllowed: bool,
3938
* usingCache: bool,
4039
* rules: array<string, array<string, mixed>|bool>
@@ -55,7 +54,6 @@ private function __construct(private RulesetInterface $ruleset, private array $o
5554
* hideProgress?: bool,
5655
* indent?: non-empty-string,
5756
* lineEnding?: non-empty-string,
58-
* phpExecutable?: null|string,
5957
* isRiskyAllowed?: bool,
6058
* usingCache?: bool,
6159
* customRules?: array<string, array<string, mixed>|bool>
@@ -90,7 +88,6 @@ public static function create(RulesetInterface $ruleset, array $overrides = [],
9088
$options['hideProgress'] ??= false;
9189
$options['indent'] ??= ' ';
9290
$options['lineEnding'] ??= "\n";
93-
$options['phpExecutable'] ??= null;
9491
$options['isRiskyAllowed'] ??= $ruleset->willAutoActivateIsRiskyAllowed();
9592
$options['usingCache'] ??= true;
9693
$options['rules'] = array_merge($ruleset->getRules(), $overrides, $options['customRules'] ?? []);
@@ -168,7 +165,6 @@ private function invoke(array $overrides = []): ConfigInterface
168165
->setHideProgress($this->options['hideProgress'])
169166
->setIndent($this->options['indent'])
170167
->setLineEnding($this->options['lineEnding'])
171-
->setPhpExecutable($this->options['phpExecutable'])
172168
->setRiskyAllowed($this->options['isRiskyAllowed'])
173169
->setUsingCache($this->options['usingCache'])
174170
->setRules($rules)

tests/FactoryTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ public function testFactoryReturnsDefaultOptionsWhenNoOptionsGiven(): void
8585
self::assertFalse($config->getHideProgress());
8686
self::assertSame(' ', $config->getIndent());
8787
self::assertSame("\n", $config->getLineEnding());
88-
self::assertNull($config->getPhpExecutable());
8988
self::assertFalse($config->getRiskyAllowed());
9089
self::assertTrue($config->getUsingCache());
9190
}
@@ -98,7 +97,6 @@ public function testFactoryConsumesPassedOptionsToIt(): void
9897
'hideProgress' => true,
9998
'indent' => "\t",
10099
'lineEnding' => "\r\n",
101-
'phpExecutable' => PHP_BINARY,
102100
'usingCache' => false,
103101
];
104102
$config = Factory::create($this->mockRuleset(), [], $options)->forProjects();
@@ -108,7 +106,6 @@ public function testFactoryConsumesPassedOptionsToIt(): void
108106
self::assertTrue($config->getHideProgress());
109107
self::assertSame($options['indent'], $config->getIndent());
110108
self::assertSame($options['lineEnding'], $config->getLineEnding());
111-
self::assertSame($options['phpExecutable'], $config->getPhpExecutable());
112109
self::assertFalse($config->getUsingCache());
113110
}
114111

0 commit comments

Comments
 (0)