Skip to content

Commit 20a9fb0

Browse files
authored
Merge pull request #594 from datamweb/fix-shield-setup-for-ci430
fix: update `shield:setup` for correct run in CI4.3.0+
2 parents 084bb14 + 384c3fc commit 20a9fb0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Commands/Setup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ private function setSecurityCSRF(): void
267267
{
268268
$file = 'Config/Security.php';
269269
$replaces = [
270-
'public $csrfProtection = \'cookie\';' => 'public $csrfProtection = \'session\';',
270+
'$csrfProtection = \'cookie\';' => '$csrfProtection = \'session\';',
271271
];
272272

273273
$path = $this->distPath . $file;

tests/Commands/SetupTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function testRun(): void
6161
$this->assertStringContainsString('service(\'auth\')->routes($routes);', $routes);
6262

6363
$security = file_get_contents($appFolder . 'Config/Security.php');
64-
$this->assertStringContainsString('public $csrfProtection = \'session\';', $security);
64+
$this->assertStringContainsString('$csrfProtection = \'session\';', $security);
6565

6666
$result = str_replace(["\033[0;32m", "\033[0m"], '', CITestStreamFilter::$buffer);
6767

0 commit comments

Comments
 (0)