Skip to content

Commit e467c4b

Browse files
committed
Add Laravel 12 support
1 parent 118af7a commit e467c4b

File tree

3 files changed

+13
-18
lines changed

3 files changed

+13
-18
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
/coverage
88
/SCRATCH.md
99
/REFACTORING.md
10+
.phpunit.result.cache

composer.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@
2020
}
2121
],
2222
"require": {
23-
"php": "^7.3|^8.0",
24-
"illuminate/support": "^7.0|^8.0",
25-
"illuminate/console": "^7.0|^8.0"
23+
"php": "^8.0",
24+
"illuminate/support": "^11.0|^12.0",
25+
"illuminate/console": "^11.0|^12.0"
2626
},
2727
"require-dev": {
28-
"phpunit/phpunit": "^7.5|^8.0|^9.0",
28+
"orchestra/testbench": "^9.0|^10.0",
29+
"phpunit/phpunit": "^11.0",
2930
"roave/security-advisories": "dev-master"
3031
},
3132
"autoload": {

tests/Unit/EnvironmentSetCommandTest.php

+7-14
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,12 @@ public function testAssertKeyIsValid(string $key, bool $isGood): void
106106
}
107107

108108
/**
109-
* @return array
110109
* @see EnvironmentSetCommandTest::testSetEnvVariable
111110
*/
112-
public function setEnvVariableDataProvider(): array
111+
public static function setEnvVariableDataProvider(): array
113112
{
114113
// Unfortunately, we can't test nested key names using str_replace().
115-
$envFileContent = $this->getTestEnvFile();
114+
$envFileContent = static::getTestEnvFile();
116115
return [
117116
[
118117
&$envFileContent,
@@ -194,12 +193,11 @@ public function setEnvVariableDataProvider(): array
194193
}
195194

196195
/**
197-
* @return array
198196
* @see EnvironmentSetCommandTest::testReadKeyValuePair
199197
*/
200-
public function readKeyValuePairDataProvider(): array
198+
public static function readKeyValuePairDataProvider(): array
201199
{
202-
$envFileContent = $this->getTestEnvFile();
200+
$envFileContent = static::getTestEnvFile();
203201
return [
204202
[&$envFileContent, 'not_existed_key', null],
205203
[&$envFileContent, 'some_key', 'some_key=some_value'],
@@ -220,10 +218,9 @@ public function readKeyValuePairDataProvider(): array
220218
}
221219

222220
/**
223-
* @return array
224221
* @see EnvironmentSetCommandTest::testAssertKeyIsValid
225222
*/
226-
public function assertKeyIsValidDataProvider(): array
223+
public static function assertKeyIsValidDataProvider(): array
227224
{
228225
return [
229226
// Wrong keys
@@ -246,10 +243,9 @@ public function assertKeyIsValidDataProvider(): array
246243
}
247244

248245
/**
249-
* @return array
250246
* @see EnvironmentSetCommandTest::testParseCommandArguments
251247
*/
252-
public function parseKeyValueArgumentsDataProvider(): array
248+
public static function parseKeyValueArgumentsDataProvider(): array
253249
{
254250
return [
255251
// Normal syntax.
@@ -344,10 +340,7 @@ public function parseKeyValueArgumentsDataProvider(): array
344340
];
345341
}
346342

347-
/**
348-
* @return string
349-
*/
350-
protected function getTestEnvFile(): string
343+
protected static function getTestEnvFile(): string
351344
{
352345
return 'some_key=some_value' . "\n"
353346
. ' spaces_at_the_beginning_of_the_line=42442' . "\n"

0 commit comments

Comments
 (0)