Skip to content

Commit 68009a4

Browse files
authored
Merge pull request #216 from kenjis/update-ci-443
Update to CI 4.4.3
2 parents 2fbe98d + 868d614 commit 68009a4

File tree

9 files changed

+83
-45
lines changed

9 files changed

+83
-45
lines changed

.env.example

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,9 @@ CI_ENVIRONMENT = development
2121
#--------------------------------------------------------------------
2222

2323
app.baseURL = 'http://localhost:8080'
24+
# If you have trouble with `.`, you could also use `_`.
25+
# app_baseURL = ''
2426
# app.forceGlobalSecureRequests = false
25-
26-
# app.sessionDriver = 'CodeIgniter\Session\Handlers\FileHandler'
27-
# app.sessionCookieName = 'ci_session'
28-
# app.sessionExpiration = 7200
29-
# app.sessionSavePath = NULL
30-
# app.sessionMatchIP = false
31-
# app.sessionTimeToUpdate = 300
32-
# app.sessionRegenerateDestroy = false
33-
3427
# app.CSPEnabled = false
3528

3629
#--------------------------------------------------------------------
@@ -41,11 +34,12 @@ database.default.database = ../writable/database.db
4134
database.default.DBDriver = SQLite3
4235

4336
# database.tests.hostname = localhost
44-
# database.tests.database = ci4
37+
# database.tests.database = ci4_test
4538
# database.tests.username = root
4639
# database.tests.password = root
4740
# database.tests.DBDriver = MySQLi
4841
# database.tests.DBPrefix =
42+
# database.tests.port = 3306
4943

5044
#--------------------------------------------------------------------
5145
# CONTENT SECURITY POLICY
@@ -56,7 +50,7 @@ database.default.DBDriver = SQLite3
5650
# contentsecuritypolicy.scriptSrc = 'self'
5751
# contentsecuritypolicy.styleSrc = 'self'
5852
# contentsecuritypolicy.imageSrc = 'self'
59-
# contentsecuritypolicy.base_uri = null
53+
# contentsecuritypolicy.baseURI = null
6054
# contentsecuritypolicy.childSrc = null
6155
# contentsecuritypolicy.connectSrc = 'self'
6256
# contentsecuritypolicy.fontSrc = null
@@ -69,6 +63,9 @@ database.default.DBDriver = SQLite3
6963
# contentsecuritypolicy.reportURI = null
7064
# contentsecuritypolicy.sandbox = false
7165
# contentsecuritypolicy.upgradeInsecureRequests = false
66+
# contentsecuritypolicy.styleNonceTag = '{csp-style-nonce}'
67+
# contentsecuritypolicy.scriptNonceTag = '{csp-script-nonce}'
68+
# contentsecuritypolicy.autoNonce = true
7269

7370
#--------------------------------------------------------------------
7471
# COOKIE
@@ -106,16 +103,36 @@ database.default.DBDriver = SQLite3
106103
# SECURITY
107104
#--------------------------------------------------------------------
108105

106+
# security.csrfProtection = 'cookie'
107+
# security.tokenRandomize = false
109108
# security.tokenName = 'csrf_token_name'
110109
# security.headerName = 'X-CSRF-TOKEN'
111110
# security.cookieName = 'csrf_cookie_name'
112111
# security.expires = 7200
113112
# security.regenerate = true
114-
# security.redirect = true
113+
# security.redirect = false
115114
# security.samesite = 'Lax'
116115

116+
#--------------------------------------------------------------------
117+
# SESSION
118+
#--------------------------------------------------------------------
119+
120+
# session.driver = 'CodeIgniter\Session\Handlers\FileHandler'
121+
# session.cookieName = 'ci_session'
122+
# session.expiration = 7200
123+
# session.savePath = null
124+
# session.matchIP = false
125+
# session.timeToUpdate = 300
126+
# session.regenerateDestroy = false
127+
117128
#--------------------------------------------------------------------
118129
# LOGGER
119130
#--------------------------------------------------------------------
120131

121132
# logger.threshold = 4
133+
134+
#--------------------------------------------------------------------
135+
# CURLRequest
136+
#--------------------------------------------------------------------
137+
138+
# curlrequest.shareOptions = true

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ To setup a working playground on your own local device, read through the next se
2626

2727
In order to get the playground setup on your own computer, you'll need a few minimum requirements - all of which
2828
are listed on [CodeIgniter's repo](https://github.com/codeigniter4/CodeIgniter4#server-requirements). Basically,
29-
as long as you are running PHP 7.2 or later you'll meet most of them.
29+
as long as you are running PHP 7.4 or later you'll meet most of them.
3030

3131
While CodeIgniter does not require it, using this repo also requires the use of
3232
[Composer](https://getcomposer.org/) to install CodeIgniter as a dependency, and PHPUnit - the test framework.
@@ -40,14 +40,16 @@ With those out of the way, it only takes a few small steps to get the project up
4040

4141
1 - Clone the repo if you haven't already, from the CLI:
4242

43-
git clone https://github.com/codeigniter4projects/playground
43+
```console
44+
git clone https://github.com/codeigniter4projects/playground
45+
```
4446

4547
That creates a new directory, `playground`, under your current directory.
4648

4749
2 - Enter the new directory and install the project dependencies with Composer. NOTE: The command shown
4850
here assumes that you have Composer loaded globally. If you don't, then pretend we're using `composer.phar`.
4951

50-
```
52+
```console
5153
cd playground
5254
composer install
5355
```
@@ -66,19 +68,23 @@ composer install
6668

6769
4 - Back on the command line, we install all of the needed database tables and sample data.
6870

69-
```
71+
```console
7072
php spark migrate
7173
php spark db:seed PlaygroundSeeder
7274
```
7375

7476
5 - That's it! If you're hosting through Apache, Nginx, etc, then head to your site. If you just want a quick
7577
way to work with your site locally, go back to the CLI and start up `spark`, CodeIgniter's small server.
7678

77-
php spark serve
79+
```console
80+
php spark serve
81+
```
7882

7983
If you get would like to change the port it's running on, that's no problem:
8084

81-
php spark serve --port 8081
85+
```console
86+
php spark serve --port 8081
87+
```
8288

8389
Enjoy!
8490

app/Config/Boot/development.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
| In development, we want to show as many errors as possible to help
88
| make sure they don't make it to production. And save us hours of
99
| painful debugging.
10+
|
11+
| If you set 'display_errors' to '1', CI4's detailed error report will show.
1012
*/
1113
error_reporting(-1);
1214
ini_set('display_errors', '1');

app/Config/Boot/production.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
|--------------------------------------------------------------------------
77
| Don't show ANY in production environments. Instead, let the system catch
88
| it and display a generic error message.
9+
|
10+
| If you set 'display_errors' to '1', CI4's detailed error report will show.
911
*/
1012
ini_set('display_errors', '0');
1113
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);

app/Config/Boot/testing.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
22

3+
/*
4+
* The environment testing is reserved for PHPUnit testing. It has special
5+
* conditions built into the framework at various places to assist with that.
6+
* You can’t use it for your development.
7+
*/
8+
39
/*
410
|--------------------------------------------------------------------------
511
| ERROR DISPLAY

app/Config/Filters.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ class Filters extends BaseConfig
1515
* Configures aliases for Filter classes to
1616
* make reading things nicer and simpler.
1717
*
18-
* @var array<string, string>
19-
* @phpstan-var array<string, class-string>
18+
* @var array<string, array<int, string>|string> [filter_name => classname]
19+
* or [filter_name => [classname1, classname2, ...]]
20+
* @phpstan-var array<string, class-string|list<class-string>>
2021
*/
2122
public array $aliases = [
2223
'csrf' => CSRF::class,

app/Views/errors/html/error_404.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
<?= nl2br(esc($message)) ?>
7878
<?php else : ?>
7979
<?= lang('Errors.sorryCannotFind') ?>
80-
<?php endif ?>
80+
<?php endif; ?>
8181
</p>
8282
</div>
8383
</body>

app/Views/errors/html/error_exception.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
<?php endif; ?>
4545
</div>
4646

47+
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE) : ?>
4748
<div class="container">
4849

4950
<ul class="tabs" id="tabs">
@@ -66,7 +67,7 @@
6667
<li>
6768
<p>
6869
<!-- Trace info -->
69-
<?php if (isset($row['file']) && is_file($row['file'])) :?>
70+
<?php if (isset($row['file']) && is_file($row['file'])) : ?>
7071
<?php
7172
if (isset($row['function']) && in_array($row['function'], ['include', 'include_once', 'require', 'require_once'], true)) {
7273
echo esc($row['function'] . ' ' . clean_path($row['file']));
@@ -375,14 +376,16 @@
375376
</div> <!-- /tab-content -->
376377

377378
</div> <!-- /container -->
379+
<?php endif; ?>
378380

379381
<div class="footer">
380382
<div class="container">
381383

382384
<p>
383385
Displayed at <?= esc(date('H:i:sa')) ?> &mdash;
384386
PHP: <?= esc(PHP_VERSION) ?> &mdash;
385-
CodeIgniter: <?= esc(CodeIgniter::CI_VERSION) ?>
387+
CodeIgniter: <?= esc(CodeIgniter::CI_VERSION) ?> --
388+
Environment: <?= ENVIRONMENT ?>
386389
</p>
387390

388391
</div>

composer.lock

Lines changed: 23 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)