Skip to content

Commit 6cb01b1

Browse files
authored
Merge pull request #8864 from paulbalandan/ordered-attributes
style: enable `ordered_attributes`
2 parents 174d76e + 13015db commit 6cb01b1

32 files changed

Lines changed: 101 additions & 97 deletions

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
$overrides = [
4545
// for updating to coding-standard
4646
'modernize_strpos' => true,
47+
'ordered_attributes' => ['order' => [], 'sort_algorithm' => 'alpha'],
4748
'php_unit_attributes' => true,
4849
];
4950

.php-cs-fixer.no-header.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
$overrides = [
3333
// for updating to coding-standard
3434
'modernize_strpos' => true,
35+
'ordered_attributes' => ['order' => [], 'sort_algorithm' => 'alpha'],
3536
'php_unit_attributes' => true,
3637
];
3738

.php-cs-fixer.tests.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
'void_return' => true,
3838
// for updating to coding-standard
3939
'modernize_strpos' => true,
40+
'ordered_attributes' => ['order' => [], 'sort_algorithm' => 'alpha'],
4041
'php_unit_attributes' => true,
4142
];
4243

.php-cs-fixer.user-guide.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
],
4242
// for updating to coding-standard
4343
'modernize_strpos' => true,
44+
'ordered_attributes' => ['order' => [], 'sort_algorithm' => 'alpha'],
4445
'php_unit_attributes' => true,
4546
];
4647

tests/system/Autoloader/AutoloaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,8 @@ public function testAutoloaderLoadsNonClassFiles(): void
392392
$loader->unregister();
393393
}
394394

395-
#[RunInSeparateProcess]
396395
#[PreserveGlobalState(false)]
396+
#[RunInSeparateProcess]
397397
public function testLoadHelpers(): void
398398
{
399399
// Workaround for errors on PHPUnit 10 and PHP 8.3.

tests/system/CodeIgniterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
/**
4141
* @internal
4242
*/
43-
#[RunTestsInSeparateProcesses]
4443
#[BackupGlobals(true)]
4544
#[Group('Others')]
45+
#[RunTestsInSeparateProcesses]
4646
final class CodeIgniterTest extends CIUnitTestCase
4747
{
4848
private CodeIgniter $codeigniter;

tests/system/Commands/GenerateKeyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ public function testGenerateKeyShowsEncodedKey(): void
8888
$this->assertStringContainsString('hex2bin:', $this->getBuffer());
8989
}
9090

91-
#[RunInSeparateProcess]
9291
#[PreserveGlobalState(false)]
92+
#[RunInSeparateProcess]
9393
public function testGenerateKeyCreatesNewKey(): void
9494
{
9595
command('key:generate');

tests/system/CommonFunctionsSendTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ protected function setUp(): void
3939
* Make sure cookies are set by RedirectResponse this way
4040
* See https://github.com/codeigniter4/CodeIgniter4/issues/1393
4141
*/
42-
#[RunInSeparateProcess]
4342
#[PreserveGlobalState(false)]
43+
#[RunInSeparateProcess]
4444
public function testRedirectResponseCookiesSent(): void
4545
{
4646
$loginTime = time();

tests/system/CommonFunctionsTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ public function testEscapeRecursiveArrayRaw(): void
272272
$this->assertSame($data, esc($data, 'raw'));
273273
}
274274

275-
#[RunInSeparateProcess]
276275
#[PreserveGlobalState(false)]
276+
#[RunInSeparateProcess]
277277
public function testSessionInstance(): void
278278
{
279279
// Workaround for errors on PHPUnit 10 and PHP 8.3.
@@ -285,8 +285,8 @@ public function testSessionInstance(): void
285285
$this->assertInstanceOf(Session::class, session());
286286
}
287287

288-
#[RunInSeparateProcess]
289288
#[PreserveGlobalState(false)]
289+
#[RunInSeparateProcess]
290290
public function testSessionVariable(): void
291291
{
292292
// Workaround for errors on PHPUnit 10 and PHP 8.3.
@@ -300,8 +300,8 @@ public function testSessionVariable(): void
300300
$this->assertSame('Hi there', session('notbogus'));
301301
}
302302

303-
#[RunInSeparateProcess]
304303
#[PreserveGlobalState(false)]
304+
#[RunInSeparateProcess]
305305
public function testSessionVariableNotThere(): void
306306
{
307307
// Workaround for errors on PHPUnit 10 and PHP 8.3.
@@ -426,8 +426,8 @@ public function testModelExistsAbsoluteClassname(): void
426426
$this->assertInstanceOf(JobModel::class, model(JobModel::class));
427427
}
428428

429-
#[RunInSeparateProcess]
430429
#[PreserveGlobalState(false)]
430+
#[RunInSeparateProcess]
431431
public function testOldInput(): void
432432
{
433433
// Workaround for errors on PHPUnit 10 and PHP 8.3.
@@ -463,8 +463,8 @@ public function testOldInput(): void
463463
$this->assertSame('fritz', old('zibble'));
464464
}
465465

466-
#[RunInSeparateProcess]
467466
#[PreserveGlobalState(false)]
467+
#[RunInSeparateProcess]
468468
public function testOldInputSerializeData(): void
469469
{
470470
// Workaround for errors on PHPUnit 10 and PHP 8.3.
@@ -501,8 +501,8 @@ public function testOldInputSerializeData(): void
501501
/**
502502
* @see https://github.com/codeigniter4/CodeIgniter4/issues/1492
503503
*/
504-
#[RunInSeparateProcess]
505504
#[PreserveGlobalState(false)]
505+
#[RunInSeparateProcess]
506506
public function testOldInputArray(): void
507507
{
508508
// Workaround for errors on PHPUnit 10 and PHP 8.3.
@@ -620,8 +620,8 @@ public function testRedirectResponseCookies1(): void
620620
$this->assertTrue($answer1->hasCookie('login_time'));
621621
}
622622

623-
#[RunInSeparateProcess]
624623
#[PreserveGlobalState(false)]
624+
#[RunInSeparateProcess]
625625
public function testTrace(): void
626626
{
627627
// Workaround for errors on PHPUnit 10 and PHP 8.3.
@@ -645,8 +645,8 @@ public function testViewNotSaveData(): void
645645
$this->assertStringContainsString('<h1>is_not</h1>', view('\Tests\Support\View\Views\simples'));
646646
}
647647

648-
#[RunInSeparateProcess]
649648
#[PreserveGlobalState(false)]
649+
#[RunInSeparateProcess]
650650
public function testForceHttpsNullRequestAndResponse(): void
651651
{
652652
// Workaround for errors on PHPUnit 10 and PHP 8.3.
@@ -761,8 +761,8 @@ public function testDWithCSP(): void
761761
Kint::$cli_detection = $cliDetection;
762762
}
763763

764-
#[RunInSeparateProcess]
765764
#[PreserveGlobalState(false)]
765+
#[RunInSeparateProcess]
766766
public function testTraceWithCSP(): void
767767
{
768768
// Workaround for errors on PHPUnit 10 and PHP 8.3.

tests/system/CommonHelperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
/**
2626
* @internal
2727
*/
28-
#[Group('Others')]
2928
#[CoversFunction('helper')]
29+
#[Group('Others')]
3030
final class CommonHelperTest extends CIUnitTestCase
3131
{
3232
private array $dummyHelpers = [

0 commit comments

Comments
 (0)