Skip to content

Commit ba75eed

Browse files
authored
Merge pull request #7271 from codeigniter4/develop
4.3.2 Ready code
2 parents cc14fdd + 586a0a2 commit ba75eed

File tree

183 files changed

+2792
-1341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+2792
-1341
lines changed

CHANGELOG.md

Lines changed: 48 additions & 421 deletions
Large diffs are not rendered by default.

admin/framework/.github/workflows/close-pull-request.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,23 @@ name: Close Pull Request
22

33
on:
44
pull_request_target:
5-
types: [opened]
5+
types: [opened, reopened]
6+
7+
permissions:
8+
pull-requests: write
69

710
jobs:
811
main:
912
runs-on: ubuntu-latest
1013
steps:
1114
- name: Close PR with nice message
12-
uses: superbrothers/close-pull-request@v3
13-
with:
14-
comment: >
15+
run: gh pr close ${{ env.ISSUE }} -c "${{ env.COMMENT }}"
16+
working-directory: ${{ github.workspace }}
17+
env:
18+
COMMENT: >
1519
Thank you for your pull request. However, you have submitted your PR on a read-only
16-
split of `codeigniter4/CodeIgniter4`. This repository, unfortunately, does
20+
split of <code>codeigniter4/CodeIgniter4</code>. This repository, unfortunately, does
1721
not accept PRs. Please submit your PR at https://github.com/codeigniter4/CodeIgniter4
1822
repository.<br/><br/>Thank you.
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
ISSUE: ${{ github.event.pull_request.html_url }}

admin/framework/composer.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"psr/log": "^1.1"
1414
},
1515
"require-dev": {
16-
"kint-php/kint": "^5.0.1",
16+
"kint-php/kint": "^5.0.3",
1717
"codeigniter/coding-standard": "^1.5",
1818
"fakerphp/faker": "^1.9",
1919
"friendsofphp/php-cs-fixer": "3.13.0",
@@ -42,6 +42,11 @@
4242
"ext-fileinfo": "Improves mime type detection for files",
4343
"ext-readline": "Improves CLI::input() usability"
4444
},
45+
"config": {
46+
"optimize-autoloader": true,
47+
"preferred-install": "dist",
48+
"sort-packages": true
49+
},
4550
"autoload": {
4651
"psr-4": {
4752
"CodeIgniter\\": "system/"
@@ -51,9 +56,6 @@
5156
]
5257
},
5358
"scripts": {
54-
"post-update-cmd": [
55-
"CodeIgniter\\ComposerScripts::postUpdate"
56-
],
5759
"test": "phpunit"
5860
},
5961
"support": {

admin/starter/.github/workflows/close-pull-request.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,23 @@ name: Close Pull Request
22

33
on:
44
pull_request_target:
5-
types: [opened]
5+
types: [opened, reopened]
6+
7+
permissions:
8+
pull-requests: write
69

710
jobs:
811
main:
912
runs-on: ubuntu-latest
1013
steps:
1114
- name: Close PR with nice message
12-
uses: superbrothers/close-pull-request@v3
13-
with:
14-
comment: >
15+
run: gh pr close ${{ env.ISSUE }} -c "${{ env.COMMENT }}"
16+
working-directory: ${{ github.workspace }}
17+
env:
18+
COMMENT: >
1519
Thank you for your pull request. However, you have submitted your PR on a read-only
16-
split of `codeigniter4/CodeIgniter4`. This repository, unfortunately, does
20+
split of <code>codeigniter4/CodeIgniter4</code>. This repository, unfortunately, does
1721
not accept PRs. Please submit your PR at https://github.com/codeigniter4/CodeIgniter4
1822
repository.<br/><br/>Thank you.
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
ISSUE: ${{ github.event.pull_request.html_url }}

admin/starter/composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
"mikey179/vfsstream": "^1.6",
1414
"phpunit/phpunit": "^9.1"
1515
},
16-
"suggest": {
17-
"ext-fileinfo": "Improves mime type detection for files"
16+
"config": {
17+
"optimize-autoloader": true,
18+
"preferred-install": "dist",
19+
"sort-packages": true
1820
},
1921
"autoload": {
2022
"exclude-from-classmap": [

admin/userguide/.github/workflows/close-pull-request.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,23 @@ name: Close Pull Request
22

33
on:
44
pull_request_target:
5-
types: [opened]
5+
types: [opened, reopened]
6+
7+
permissions:
8+
pull-requests: write
69

710
jobs:
811
main:
912
runs-on: ubuntu-latest
1013
steps:
1114
- name: Close PR with nice message
12-
uses: superbrothers/close-pull-request@v3
13-
with:
14-
comment: >
15+
run: gh pr close ${{ env.ISSUE }} -c "${{ env.COMMENT }}"
16+
working-directory: ${{ github.workspace }}
17+
env:
18+
COMMENT: >
1519
Thank you for your pull request. However, you have submitted your PR on a read-only
16-
split of `codeigniter4/CodeIgniter4`. This repository, unfortunately, does
20+
split of <code>codeigniter4/CodeIgniter4</code>. This repository, unfortunately, does
1721
not accept PRs. Please submit your PR at https://github.com/codeigniter4/CodeIgniter4
1822
repository.<br/><br/>Thank you.
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
ISSUE: ${{ github.event.pull_request.html_url }}

app/Config/App.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,10 @@ class App extends BaseConfig
1212
* Base Site URL
1313
* --------------------------------------------------------------------------
1414
*
15-
* URL to your CodeIgniter root. Typically this will be your base URL,
15+
* URL to your CodeIgniter root. Typically, this will be your base URL,
1616
* WITH a trailing slash:
1717
*
1818
* http://example.com/
19-
*
20-
* If this is not set then CodeIgniter will try guess the protocol, domain
21-
* and path to your installation. However, you should always configure this
22-
* explicitly and never rely on auto-guessing, especially in production
23-
* environments.
2419
*/
2520
public string $baseURL = 'http://localhost:8080/';
2621

app/Config/Mimes.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ class Mimes
5353
'lzh' => 'application/octet-stream',
5454
'exe' => [
5555
'application/octet-stream',
56+
'application/vnd.microsoft.portable-executable',
57+
'application/x-dosexec',
5658
'application/x-msdownload',
5759
],
5860
'class' => 'application/octet-stream',

app/Views/errors/html/error_exception.php

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
<?php $error_id = uniqid('error', true); ?>
1+
<?php
2+
use Config\Services;
3+
use CodeIgniter\CodeIgniter;
4+
5+
$errorId = uniqid('error', true);
6+
?>
27
<!doctype html>
38
<html>
49
<head>
@@ -77,16 +82,16 @@
7782
<?php if (isset($row['class'])) : ?>
7883
&nbsp;&nbsp;&mdash;&nbsp;&nbsp;<?= esc($row['class'] . $row['type'] . $row['function']) ?>
7984
<?php if (! empty($row['args'])) : ?>
80-
<?php $args_id = $error_id . 'args' . $index ?>
81-
( <a href="#" onclick="return toggle('<?= esc($args_id, 'attr') ?>');">arguments</a> )
82-
<div class="args" id="<?= esc($args_id, 'attr') ?>">
85+
<?php $argsId = $errorId . 'args' . $index ?>
86+
( <a href="#" onclick="return toggle('<?= esc($argsId, 'attr') ?>');">arguments</a> )
87+
<div class="args" id="<?= esc($argsId, 'attr') ?>">
8388
<table cellspacing="0">
8489

8590
<?php
8691
$params = null;
8792
// Reflection by name is not available for closure function
8893
if (substr($row['function'], -1) !== '}') {
89-
$mirror = isset($row['class']) ? new \ReflectionMethod($row['class'], $row['function']) : new \ReflectionFunction($row['function']);
94+
$mirror = isset($row['class']) ? new ReflectionMethod($row['class'], $row['function']) : new ReflectionFunction($row['function']);
9095
$params = $mirror->getParameters();
9196
}
9297

@@ -189,7 +194,7 @@
189194

190195
<!-- Request -->
191196
<div class="content" id="request">
192-
<?php $request = \Config\Services::request(); ?>
197+
<?php $request = Services::request(); ?>
193198

194199
<table>
195200
<tbody>
@@ -283,21 +288,11 @@
283288
</tr>
284289
</thead>
285290
<tbody>
286-
<?php foreach ($headers as $value) : ?>
287-
<?php
288-
if (empty($value)) {
289-
continue;
290-
}
291-
292-
if (! is_array($value)) {
293-
$value = [$value];
294-
} ?>
295-
<?php foreach ($value as $h) : ?>
296-
<tr>
297-
<td><?= esc($h->getName(), 'html') ?></td>
298-
<td><?= esc($h->getValueLine(), 'html') ?></td>
299-
</tr>
300-
<?php endforeach; ?>
291+
<?php foreach ($headers as $header) : ?>
292+
<tr>
293+
<td><?= esc($header->getName(), 'html') ?></td>
294+
<td><?= esc($header->getValueLine(), 'html') ?></td>
295+
</tr>
301296
<?php endforeach; ?>
302297
</tbody>
303298
</table>
@@ -307,7 +302,7 @@
307302

308303
<!-- Response -->
309304
<?php
310-
$response = \Config\Services::response();
305+
$response = Services::response();
311306
$response->setStatusCode(http_response_code());
312307
?>
313308
<div class="content" id="response">
@@ -332,7 +327,7 @@
332327
</tr>
333328
</thead>
334329
<tbody>
335-
<?php foreach ($headers as $name => $value) : ?>
330+
<?php foreach (array_keys($headers) as $name) : ?>
336331
<tr>
337332
<td><?= esc($name, 'html') ?></td>
338333
<td><?= esc($response->getHeaderLine($name), 'html') ?></td>
@@ -387,7 +382,7 @@
387382
<p>
388383
Displayed at <?= esc(date('H:i:sa')) ?> &mdash;
389384
PHP: <?= esc(PHP_VERSION) ?> &mdash;
390-
CodeIgniter: <?= esc(\CodeIgniter\CodeIgniter::CI_VERSION) ?>
385+
CodeIgniter: <?= esc(CodeIgniter::CI_VERSION) ?>
391386
</p>
392387

393388
</div>

changelogs/CHANGELOG_4.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Changelog
1+
# Changelog 4.0
22

33
## [v4.0.5](https://github.com/codeigniter4/CodeIgniter4/tree/v4.0.5) (2021-01-31)
44

changelogs/CHANGELOG_4.1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Changelog
1+
# Changelog 4.1
22

33
## [v4.1.9](https://github.com/codeigniter4/CodeIgniter4/tree/v4.1.9) (2022-02-25)
44

0 commit comments

Comments
 (0)