Skip to content

Commit 8c7f701

Browse files
authored
Merge pull request #5294 from codeigniter4/develop
4.1.5 Ready code
2 parents d686c86 + eede117 commit 8c7f701

File tree

392 files changed

+15217
-6870
lines changed

Some content is hidden

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

392 files changed

+15217
-6870
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ contributing/ export-ignore
1414
.editorconfig export-ignore
1515
.nojekyll export-ignore export-ignore
1616
CODE_OF_CONDUCT.md export-ignore
17-
DCO.txt export-ignore
1817
PULL_REQUEST_TEMPLATE.md export-ignore
1918
stale.yml export-ignore
2019
Vagrantfile.dist export-ignore

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Bug report
2+
description: Create a report to help us improve CodeIgniter
3+
title: "Bug: "
4+
labels: ['bug']
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for taking the time to fill out this bug report!
11+
12+
Before you begin, **please ensure that there are no existing issues,
13+
whether still open or closed, related to your report**.
14+
If there is, your report will be closed promptly.
15+
16+
And if you are not using the [latest version](https://github.com/codeigniter4/CodeIgniter4/releases) of CodeIgniter, please update.
17+
18+
---
19+
20+
- type: dropdown
21+
id: php-version
22+
attributes:
23+
label: PHP Version
24+
description: Which PHP versions did you run your code?
25+
multiple: true
26+
options:
27+
- '7.3'
28+
- '7.4'
29+
- '8.0'
30+
- '8.1'
31+
validations:
32+
required: true
33+
34+
- type: input
35+
id: codeigniter-version
36+
attributes:
37+
label: CodeIgniter4 Version
38+
validations:
39+
required: true
40+
41+
- type: dropdown
42+
id: operating-systems
43+
attributes:
44+
label: Which operating systems have you tested for this bug?
45+
description: You may select more than one.
46+
multiple: true
47+
options:
48+
- macOS
49+
- Windows
50+
- Linux
51+
validations:
52+
required: true
53+
54+
- type: dropdown
55+
id: server
56+
attributes:
57+
label: Which server did you use?
58+
options:
59+
- apache
60+
- cli
61+
- cli-server (PHP built-in webserver)
62+
- cgi-fcgi
63+
- fpm-fcgi
64+
- phpdbg
65+
validations:
66+
required: true
67+
68+
- type: input
69+
id: database
70+
attributes:
71+
label: Database
72+
validations:
73+
required: false
74+
75+
- type: textarea
76+
id: description
77+
attributes:
78+
label: What happened?
79+
placeholder: Tell us what you see!
80+
validations:
81+
required: true
82+
83+
- type: textarea
84+
attributes:
85+
label: Steps to Reproduce
86+
description: Steps to reproduce the behavior.
87+
validations:
88+
required: true
89+
90+
- type: textarea
91+
attributes:
92+
label: Expected Output
93+
description: What do you expect to happen instead of this filed bug?
94+
validations:
95+
required: true
96+
97+
- type: textarea
98+
attributes:
99+
label: Anything else?
100+
description: |
101+
Links? References? Anything that will give us more context about the issue you are encountering!
102+
103+
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
104+
validations:
105+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: CodeIgniter Forum
4+
url: https://forum.codeigniter.com
5+
about: Please ask your support questions in the forums. Thanks!
6+
7+
- name: CodeIgniter Slack channel
8+
url: https://codeigniterchat.slack.com
9+
about: Engage with other members of the community in our Slack channel.

.github/ISSUE_TEMPLATE/support-question.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

PULL_REQUEST_TEMPLATE.md renamed to .github/PULL_REQUEST_TEMPLATE.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ Explain what you have changed, and why.
55

66
**Checklist:**
77
- [ ] Securely signed commits
8-
- [ ] Component(s) with PHPdocs
8+
- [ ] Component(s) with PHPDoc blocks, only if necessary or adds value
99
- [ ] Unit testing, with >80% coverage
1010
- [ ] User guide updated
1111
- [ ] Conforms to style guide
1212

13-
---------Remove from here down in your description----------
13+
<!--
1414
1515
**Notes**
1616
- Pull requests must be in English
@@ -19,4 +19,5 @@ Explain what you have changed, and why.
1919
- Unsolicited pull requests will be considered, but there is no guarantee of acceptance
2020
- Pull requests should be from a feature branch in the contributor's fork of the repository
2121
to the develop branch of the project repository
22-
22+
23+
-->

.github/workflows/deploy-apidocs.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,12 @@ jobs:
3939
uses: shivammathur/setup-php@v2
4040
with:
4141
php-version: '8.0'
42+
tools: phive
4243
coverage: none
4344

44-
- name: Download phpDocumentor v3.1
45-
run: |
46-
cd ./source
47-
curl \
48-
-L https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.1.0/phpDocumentor.phar \
49-
-o admin/phpDocumentor.phar
45+
- name: Download latest phpDocumentor
46+
working-directory: source
47+
run: sudo phive --no-progress install --global --trust-gpg-keys 67F861C3D889C656 phpDocumentor
5048

5149
- name: Prepare API repo
5250
working-directory: api
@@ -58,7 +56,7 @@ jobs:
5856
- name: Build API in source repo
5957
working-directory: source
6058
run: |
61-
php admin/phpDocumentor.phar run --ansi --verbose
59+
phpDocumentor run --ansi --verbose
6260
cp -R ${GITHUB_WORKSPACE}/source/api/build/* ${GITHUB_WORKSPACE}/api/docs
6361
6462
- name: Deploy to API repo

.github/workflows/deploy-framework.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
run: ./source/.github/scripts/deploy-framework ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/framework ${GITHUB_REF##*/}
3737

3838
- name: Release
39-
uses: actions/github-script@v4
39+
uses: actions/github-script@v5
4040
with:
4141
github-token: ${{secrets.ACCESS_TOKEN}}
4242
script: |
@@ -81,7 +81,7 @@ jobs:
8181
run: ./source/.github/scripts/deploy-appstarter ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/appstarter ${GITHUB_REF##*/}
8282

8383
- name: Release
84-
uses: actions/github-script@v4
84+
uses: actions/github-script@v5
8585
with:
8686
github-token: ${{secrets.ACCESS_TOKEN}}
8787
script: |

.github/workflows/test-deptrac.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# When a PR is opened or a push is made, perform an
2+
# architectural inspection on the code using Deptrac.
3+
name: Deptrac
4+
5+
on:
6+
pull_request:
7+
branches:
8+
- 'develop'
9+
- '4.*'
10+
paths:
11+
- 'app/**'
12+
- 'system/**'
13+
- 'composer.json'
14+
- 'depfile.yaml'
15+
- '.github/workflows/test-deptrac.yml'
16+
push:
17+
branches:
18+
- 'develop'
19+
- '4.*'
20+
paths:
21+
- 'app/**'
22+
- 'system/**'
23+
- 'composer.json'
24+
- 'depfile.yaml'
25+
- '.github/workflows/test-deptrac.yml'
26+
27+
jobs:
28+
build:
29+
name: Architectural Inspection
30+
runs-on: ubuntu-20.04
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v2
34+
35+
- name: Setup PHP
36+
uses: shivammathur/setup-php@v2
37+
with:
38+
php-version: '8.0'
39+
tools: composer, phive
40+
extensions: intl, json, mbstring, gd, mysqlnd, xdebug, xml, sqlite3
41+
42+
- name: Validate composer.json
43+
run: composer validate --strict
44+
45+
- name: Get composer cache directory
46+
id: composer-cache
47+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
48+
49+
- name: Create composer cache directory
50+
run: mkdir -p ${{ steps.composer-cache.outputs.dir }}
51+
52+
- name: Cache composer dependencies
53+
uses: actions/cache@v2
54+
with:
55+
path: ${{ steps.composer-cache.outputs.dir }}
56+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
57+
restore-keys: ${{ runner.os }}-composer-
58+
59+
- name: Create Deptrac cache directory
60+
run: mkdir -p build/
61+
62+
- name: Cache Deptrac results
63+
uses: actions/cache@v2
64+
with:
65+
path: build
66+
key: ${{ runner.os }}-deptrac-${{ github.sha }}
67+
restore-keys: ${{ runner.os }}-deptrac-
68+
69+
- name: Install dependencies
70+
run: composer update --ansi --no-interaction
71+
72+
- name: Run architectural inspection
73+
run: |
74+
sudo phive --no-progress install --global qossmic/deptrac --trust-gpg-keys B8F640134AB1782E
75+
deptrac analyze --cache-file=build/deptrac.cache

.github/workflows/test-phpcpd.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@ jobs:
3434
uses: shivammathur/setup-php@v2
3535
with:
3636
php-version: '8.0'
37-
tools: phive
38-
extensions: intl, json, mbstring, xml
37+
tools: phpcpd
38+
extensions: dom, mbstring
3939

4040
- name: Detect code duplication
41-
run: |
42-
sudo phive --no-progress install --global --trust-gpg-keys 4AA394086372C20A phpcpd
43-
phpcpd --exclude system/Test --exclude system/ThirdParty --exclude system/Database/SQLSRV/Builder.php app/ public/ system/
41+
run: phpcpd --exclude system/Test --exclude system/ThirdParty --exclude system/Database/SQLSRV/Builder.php --exclude system/Database/SQLSRV/Forge.php -- app/ public/ system/

.github/workflows/test-phpunit.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ jobs:
124124
run: |
125125
composer update --ansi --no-interaction
126126
composer remove --ansi --dev --unused -W rector/rector phpstan/phpstan friendsofphp/php-cs-fixer nexusphp/cs-config codeigniter/coding-standard
127-
php -r 'file_put_contents("vendor/laminas/laminas-zendframework-bridge/src/autoload.php", "");'
128127
env:
129128
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
130129

.github/workflows/test-userguide.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,22 @@ name: Test User Guide
66

77
on:
88
pull_request:
9-
branches:
10-
- 'develop'
11-
- '4.*'
129
paths:
1310
- 'user_guide_src/**'
11+
- '.github/workflows/test-userguide.yml'
1412

1513
jobs:
1614
syntax_check:
1715
name: Check User Guide syntax
1816
runs-on: ubuntu-20.04
17+
1918
steps:
20-
- uses: actions/checkout@v2
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
22+
- name: Detect usage of tabs in RST files
23+
run: php utils/check_tabs_in_rst.php
24+
2125
- uses: ammaraskar/[email protected]
2226
with:
2327
docs-folder: user_guide_src

.no-header.php-cs-fixer.dist.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,22 @@
2525
__DIR__ . '/app',
2626
__DIR__ . '/public',
2727
])
28-
->notName('#Logger\.php$#');
28+
->notName('#Logger\.php$#')
29+
->append([
30+
__DIR__ . '/admin/starter/builds',
31+
]);
2932

30-
$overrides = [];
33+
$overrides = [
34+
'ordered_class_elements' => [
35+
'order' => [
36+
'use_trait',
37+
'constant',
38+
'property',
39+
'method',
40+
],
41+
'sort_algorithm' => 'none',
42+
],
43+
];
3144

3245
$options = [
3346
'cacheFile' => 'build/.no-header.php-cs-fixer.cache',

0 commit comments

Comments
 (0)