Skip to content

Commit 3a7ec1e

Browse files
authored
Merge pull request #206 from codeigniter4projects/update-ci
chore: Update to work on latest CI 4.3
2 parents afae669 + 75b12c6 commit 3a7ec1e

File tree

13 files changed

+938
-805
lines changed

13 files changed

+938
-805
lines changed

app/Config/ContentSecurityPolicy.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
*/
1616
class ContentSecurityPolicy extends BaseConfig
1717
{
18-
//-------------------------------------------------------------------------
18+
// -------------------------------------------------------------------------
1919
// Broadbrush CSP management
20-
//-------------------------------------------------------------------------
20+
// -------------------------------------------------------------------------
2121

2222
/**
2323
* Default CSP report context
@@ -43,10 +43,10 @@ class ContentSecurityPolicy extends BaseConfig
4343
*/
4444
public $upgradeInsecureRequests = false;
4545

46-
//-------------------------------------------------------------------------
46+
// -------------------------------------------------------------------------
4747
// Sources allowed
4848
// Note: once you set a policy to 'none', it cannot be further restricted
49-
//-------------------------------------------------------------------------
49+
// -------------------------------------------------------------------------
5050

5151
/**
5252
* Will default to self if not overridden

app/Config/Kint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Config;
44

55
use CodeIgniter\Config\BaseConfig;
6-
use Kint\Renderer\Renderer;
6+
use Kint\Renderer\AbstractRenderer as Renderer;
77

88
/**
99
* --------------------------------------------------------------------------

app/Config/Validation.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
class Validation extends BaseConfig
1212
{
13-
//--------------------------------------------------------------------
13+
// --------------------------------------------------------------------
1414
// Setup
15-
//--------------------------------------------------------------------
15+
// --------------------------------------------------------------------
1616

1717
/**
1818
* Stores the classes that contain the
@@ -38,7 +38,7 @@ class Validation extends BaseConfig
3838
'single' => 'CodeIgniter\Validation\Views\single',
3939
];
4040

41-
//--------------------------------------------------------------------
41+
// --------------------------------------------------------------------
4242
// Rules
43-
//--------------------------------------------------------------------
43+
// --------------------------------------------------------------------
4444
}

app/Database/Migrations/2020-07-12-143952_create_monsters.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ public function up(): void
8585
* it harder to work with databases, so we will leave them off for now. Feel free
8686
* to uncomment them if you want to play:
8787
*/
88-
//$this->forge->addForeignKey('ability_id', 'abilities', 'id', false, 'CASCADE');
89-
//$this->forge->addForeignKey('monster_id', 'monsters', 'id', false, 'CASCADE');
88+
// $this->forge->addForeignKey('ability_id', 'abilities', 'id', false, 'CASCADE');
89+
// $this->forge->addForeignKey('monster_id', 'monsters', 'id', false, 'CASCADE');
9090

9191
$this->forge->createTable('abilities_monsters');
9292

app/Entities/Monster.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Monster extends Entity
2626
*
2727
* @return array
2828
*/
29-
//public function getAbilities(): array
30-
//{
31-
//}
29+
// public function getAbilities(): array
30+
// {
31+
// }
3232
}

app/Models/DungeonModel.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class DungeonModel extends Model
6868
*
6969
* @return array
7070
*/
71-
//public function getMonstersForDungeon(int $dungeonId): array
72-
//{
73-
//}
71+
// public function getMonstersForDungeon(int $dungeonId): array
72+
// {
73+
// }
7474
}

app/Views/errors/html/error_exception.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
} else {
6969
echo esc(clean_path($row['file']) . ' : ' . $row['line']);
7070
}
71-
?>
71+
?>
7272
<?php else: ?>
7373
{PHP internal code}
7474
<?php endif; ?>
@@ -83,14 +83,14 @@
8383
<table cellspacing="0">
8484

8585
<?php
86-
$params = null;
87-
// Reflection by name is not available for closure function
88-
if (substr($row['function'], -1) !== '}') {
89-
$mirror = isset($row['class']) ? new \ReflectionMethod($row['class'], $row['function']) : new \ReflectionFunction($row['function']);
90-
$params = $mirror->getParameters();
91-
}
92-
93-
foreach ($row['args'] as $key => $value) : ?>
86+
$params = null;
87+
// Reflection by name is not available for closure function
88+
if (substr($row['function'], -1) !== '}') {
89+
$mirror = isset($row['class']) ? new \ReflectionMethod($row['class'], $row['function']) : new \ReflectionFunction($row['function']);
90+
$params = $mirror->getParameters();
91+
}
92+
93+
foreach ($row['args'] as $key => $value) : ?>
9494
<tr>
9595
<td><code><?= esc(isset($params[$key]) ? '$' . $params[$key]->name : "#{$key}") ?></code></td>
9696
<td><pre><?= esc(print_r($value, true)) ?></pre></td>
@@ -308,8 +308,8 @@
308308
<!-- Response -->
309309
<?php
310310
$response = \Config\Services::response();
311-
$response->setStatusCode(http_response_code());
312-
?>
311+
$response->setStatusCode(http_response_code());
312+
?>
313313
<div class="content" id="response">
314314
<table>
315315
<tr>

composer.json

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,73 @@
11
{
2-
"name": "codeigniter4projects/playground",
3-
"description": "A space to learn and experience CodeIgniter 4",
4-
"license": "MIT",
5-
"type": "project",
6-
"keywords": [
7-
"codeigniter",
8-
"codeigniter4"
9-
],
10-
"authors": [
11-
{
12-
"name": "Matthew Gatner",
13-
"email": "[email protected]",
14-
"homepage": "https://tattersoftware.com",
15-
"role": "Developer"
16-
}
17-
],
18-
"homepage": "https://codeigniter.com",
19-
"support": {
20-
"forum": "http://forum.codeigniter.com/",
21-
"source": "https://github.com/codeigniter4projects/playground",
22-
"slack": "https://codeigniterchat.slack.com"
23-
},
24-
"require": {
25-
"php": "^7.4 || ^8.0",
26-
"codeigniter4/framework": "^4.1"
27-
},
28-
"require-dev": {
29-
"psr/container": "1.1.2",
30-
"codeigniter4/devkit": "^1.0"
31-
},
32-
"config": {
33-
"allow-plugins": {
34-
"phpstan/extension-installer": true
35-
}
36-
},
37-
"minimum-stability": "dev",
38-
"prefer-stable": true,
39-
"autoload": {
40-
"exclude-from-classmap": [
41-
"**/Database/Migrations/**"
42-
]
43-
},
44-
"autoload-dev": {
45-
"psr-4": {
46-
"Tests\\Support\\": "tests/_support"
47-
}
48-
},
49-
"config": {
50-
"allow-plugins": {
51-
"phpstan/extension-installer": true
52-
}
53-
},
54-
"scripts": {
55-
"analyze": "phpstan analyze",
56-
"ci": [
57-
"Composer\\Config::disableProcessTimeout",
58-
"@deduplicate",
59-
"@analyze",
60-
"@test",
61-
"@inspect",
62-
"rector process",
63-
"@style"
64-
],
65-
"deduplicate": "phpcpd app/ src/",
66-
"inspect": "deptrac analyze --cache-file=build/deptrac.cache",
67-
"mutate": "infection --threads=2 --skip-initial-tests --coverage=build/phpunit",
68-
"patch": "patch",
69-
"retool": "retool",
70-
"style": "php-cs-fixer fix --verbose --ansi --using-cache=no",
71-
"test": "phpunit"
2+
"name": "codeigniter4projects/playground",
3+
"description": "A space to learn and experience CodeIgniter 4",
4+
"license": "MIT",
5+
"type": "project",
6+
"keywords": [
7+
"codeigniter",
8+
"codeigniter4"
9+
],
10+
"authors": [
11+
{
12+
"name": "Matthew Gatner",
13+
"email": "[email protected]",
14+
"homepage": "https://tattersoftware.com",
15+
"role": "Developer"
16+
}
17+
],
18+
"homepage": "https://codeigniter.com",
19+
"support": {
20+
"forum": "http://forum.codeigniter.com/",
21+
"source": "https://github.com/codeigniter4projects/playground",
22+
"slack": "https://codeigniterchat.slack.com"
23+
},
24+
"require": {
25+
"php": "^7.4 || ^8.0",
26+
"codeigniter4/framework": "^4.3"
27+
},
28+
"require-dev": {
29+
"psr/container": "1.1.2",
30+
"codeigniter4/devkit": "^1.0"
31+
},
32+
"config": {
33+
"allow-plugins": {
34+
"phpstan/extension-installer": true
7235
}
36+
},
37+
"minimum-stability": "dev",
38+
"prefer-stable": true,
39+
"autoload": {
40+
"exclude-from-classmap": [
41+
"**/Database/Migrations/**"
42+
]
43+
},
44+
"autoload-dev": {
45+
"psr-4": {
46+
"Tests\\Support\\": "tests/_support"
47+
}
48+
},
49+
"config": {
50+
"allow-plugins": {
51+
"phpstan/extension-installer": true
52+
}
53+
},
54+
"scripts": {
55+
"analyze": "phpstan analyze",
56+
"ci": [
57+
"Composer\\Config::disableProcessTimeout",
58+
"@deduplicate",
59+
"@analyze",
60+
"@test",
61+
"@inspect",
62+
"rector process",
63+
"@style"
64+
],
65+
"deduplicate": "phpcpd app/ src/",
66+
"inspect": "deptrac analyze --cache-file=build/deptrac.cache",
67+
"mutate": "infection --threads=2 --skip-initial-tests --coverage=build/phpunit",
68+
"patch": "patch",
69+
"retool": "retool",
70+
"style": "php-cs-fixer fix --verbose --ansi --using-cache=no",
71+
"test": "phpunit"
72+
}
7373
}

0 commit comments

Comments
 (0)