Skip to content

Commit

Permalink
Merge pull request #7271 from codeigniter4/develop
Browse files Browse the repository at this point in the history
4.3.2 Ready code
  • Loading branch information
kenjis authored Feb 18, 2023
2 parents cc14fdd + 586a0a2 commit ba75eed
Show file tree
Hide file tree
Showing 183 changed files with 2,792 additions and 1,341 deletions.
469 changes: 48 additions & 421 deletions CHANGELOG.md

Large diffs are not rendered by default.

16 changes: 11 additions & 5 deletions admin/framework/.github/workflows/close-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@ name: Close Pull Request

on:
pull_request_target:
types: [opened]
types: [opened, reopened]

permissions:
pull-requests: write

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Close PR with nice message
uses: superbrothers/close-pull-request@v3
with:
comment: >
run: gh pr close ${{ env.ISSUE }} -c "${{ env.COMMENT }}"
working-directory: ${{ github.workspace }}
env:
COMMENT: >
Thank you for your pull request. However, you have submitted your PR on a read-only
split of `codeigniter4/CodeIgniter4`. This repository, unfortunately, does
split of <code>codeigniter4/CodeIgniter4</code>. This repository, unfortunately, does
not accept PRs. Please submit your PR at https://github.com/codeigniter4/CodeIgniter4
repository.<br/><br/>Thank you.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE: ${{ github.event.pull_request.html_url }}
10 changes: 6 additions & 4 deletions admin/framework/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"psr/log": "^1.1"
},
"require-dev": {
"kint-php/kint": "^5.0.1",
"kint-php/kint": "^5.0.3",
"codeigniter/coding-standard": "^1.5",
"fakerphp/faker": "^1.9",
"friendsofphp/php-cs-fixer": "3.13.0",
Expand Down Expand Up @@ -42,6 +42,11 @@
"ext-fileinfo": "Improves mime type detection for files",
"ext-readline": "Improves CLI::input() usability"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"autoload": {
"psr-4": {
"CodeIgniter\\": "system/"
Expand All @@ -51,9 +56,6 @@
]
},
"scripts": {
"post-update-cmd": [
"CodeIgniter\\ComposerScripts::postUpdate"
],
"test": "phpunit"
},
"support": {
Expand Down
16 changes: 11 additions & 5 deletions admin/starter/.github/workflows/close-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@ name: Close Pull Request

on:
pull_request_target:
types: [opened]
types: [opened, reopened]

permissions:
pull-requests: write

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Close PR with nice message
uses: superbrothers/close-pull-request@v3
with:
comment: >
run: gh pr close ${{ env.ISSUE }} -c "${{ env.COMMENT }}"
working-directory: ${{ github.workspace }}
env:
COMMENT: >
Thank you for your pull request. However, you have submitted your PR on a read-only
split of `codeigniter4/CodeIgniter4`. This repository, unfortunately, does
split of <code>codeigniter4/CodeIgniter4</code>. This repository, unfortunately, does
not accept PRs. Please submit your PR at https://github.com/codeigniter4/CodeIgniter4
repository.<br/><br/>Thank you.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE: ${{ github.event.pull_request.html_url }}
6 changes: 4 additions & 2 deletions admin/starter/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
"mikey179/vfsstream": "^1.6",
"phpunit/phpunit": "^9.1"
},
"suggest": {
"ext-fileinfo": "Improves mime type detection for files"
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"autoload": {
"exclude-from-classmap": [
Expand Down
16 changes: 11 additions & 5 deletions admin/userguide/.github/workflows/close-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@ name: Close Pull Request

on:
pull_request_target:
types: [opened]
types: [opened, reopened]

permissions:
pull-requests: write

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Close PR with nice message
uses: superbrothers/close-pull-request@v3
with:
comment: >
run: gh pr close ${{ env.ISSUE }} -c "${{ env.COMMENT }}"
working-directory: ${{ github.workspace }}
env:
COMMENT: >
Thank you for your pull request. However, you have submitted your PR on a read-only
split of `codeigniter4/CodeIgniter4`. This repository, unfortunately, does
split of <code>codeigniter4/CodeIgniter4</code>. This repository, unfortunately, does
not accept PRs. Please submit your PR at https://github.com/codeigniter4/CodeIgniter4
repository.<br/><br/>Thank you.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE: ${{ github.event.pull_request.html_url }}
7 changes: 1 addition & 6 deletions app/Config/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,10 @@ class App extends BaseConfig
* Base Site URL
* --------------------------------------------------------------------------
*
* URL to your CodeIgniter root. Typically this will be your base URL,
* URL to your CodeIgniter root. Typically, this will be your base URL,
* WITH a trailing slash:
*
* http://example.com/
*
* If this is not set then CodeIgniter will try guess the protocol, domain
* and path to your installation. However, you should always configure this
* explicitly and never rely on auto-guessing, especially in production
* environments.
*/
public string $baseURL = 'http://localhost:8080/';

Expand Down
2 changes: 2 additions & 0 deletions app/Config/Mimes.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ class Mimes
'lzh' => 'application/octet-stream',
'exe' => [
'application/octet-stream',
'application/vnd.microsoft.portable-executable',
'application/x-dosexec',
'application/x-msdownload',
],
'class' => 'application/octet-stream',
Expand Down
43 changes: 19 additions & 24 deletions app/Views/errors/html/error_exception.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<?php $error_id = uniqid('error', true); ?>
<?php
use Config\Services;
use CodeIgniter\CodeIgniter;

$errorId = uniqid('error', true);
?>
<!doctype html>
<html>
<head>
Expand Down Expand Up @@ -77,16 +82,16 @@
<?php if (isset($row['class'])) : ?>
&nbsp;&nbsp;&mdash;&nbsp;&nbsp;<?= esc($row['class'] . $row['type'] . $row['function']) ?>
<?php if (! empty($row['args'])) : ?>
<?php $args_id = $error_id . 'args' . $index ?>
( <a href="#" onclick="return toggle('<?= esc($args_id, 'attr') ?>');">arguments</a> )
<div class="args" id="<?= esc($args_id, 'attr') ?>">
<?php $argsId = $errorId . 'args' . $index ?>
( <a href="#" onclick="return toggle('<?= esc($argsId, 'attr') ?>');">arguments</a> )
<div class="args" id="<?= esc($argsId, 'attr') ?>">
<table cellspacing="0">

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

Expand Down Expand Up @@ -189,7 +194,7 @@

<!-- Request -->
<div class="content" id="request">
<?php $request = \Config\Services::request(); ?>
<?php $request = Services::request(); ?>

<table>
<tbody>
Expand Down Expand Up @@ -283,21 +288,11 @@
</tr>
</thead>
<tbody>
<?php foreach ($headers as $value) : ?>
<?php
if (empty($value)) {
continue;
}

if (! is_array($value)) {
$value = [$value];
} ?>
<?php foreach ($value as $h) : ?>
<tr>
<td><?= esc($h->getName(), 'html') ?></td>
<td><?= esc($h->getValueLine(), 'html') ?></td>
</tr>
<?php endforeach; ?>
<?php foreach ($headers as $header) : ?>
<tr>
<td><?= esc($header->getName(), 'html') ?></td>
<td><?= esc($header->getValueLine(), 'html') ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
Expand All @@ -307,7 +302,7 @@

<!-- Response -->
<?php
$response = \Config\Services::response();
$response = Services::response();
$response->setStatusCode(http_response_code());
?>
<div class="content" id="response">
Expand All @@ -332,7 +327,7 @@
</tr>
</thead>
<tbody>
<?php foreach ($headers as $name => $value) : ?>
<?php foreach (array_keys($headers) as $name) : ?>
<tr>
<td><?= esc($name, 'html') ?></td>
<td><?= esc($response->getHeaderLine($name), 'html') ?></td>
Expand Down Expand Up @@ -387,7 +382,7 @@
<p>
Displayed at <?= esc(date('H:i:sa')) ?> &mdash;
PHP: <?= esc(PHP_VERSION) ?> &mdash;
CodeIgniter: <?= esc(\CodeIgniter\CodeIgniter::CI_VERSION) ?>
CodeIgniter: <?= esc(CodeIgniter::CI_VERSION) ?>
</p>

</div>
Expand Down
2 changes: 1 addition & 1 deletion changelogs/CHANGELOG_4.0.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Changelog
# Changelog 4.0

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

Expand Down
2 changes: 1 addition & 1 deletion changelogs/CHANGELOG_4.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Changelog
# Changelog 4.1

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

Expand Down
Loading

0 comments on commit ba75eed

Please sign in to comment.