Skip to content

Commit 399983b

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into 4.8
# Conflicts: # system/Autoloader/Autoloader.php # system/Common.php # tests/system/Commands/CommandTest.php # tests/system/Commands/Utilities/Routes/FilterCollectorTest.php # tests/system/Debug/ExceptionsTest.php # utils/phpstan-baseline/loader.neon # utils/phpstan-baseline/missingType.iterableValue.neon
2 parents 3b0bd2b + 246cbd4 commit 399983b

File tree

90 files changed

+624
-513
lines changed

Some content is hidden

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

90 files changed

+624
-513
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ phpmetrics.json export-ignore
2727
phpstan-baseline.php export-ignore
2828
phpstan-bootstrap.php export-ignore
2929
phpstan.neon.dist export-ignore
30-
phpunit.xml.dist export-ignore
30+
phpunit.dist.xml export-ignore
3131
psalm-baseline.xml export-ignore
3232
psalm.xml export-ignore
3333
psalm_autoload.php export-ignore

.github/labeler.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
- any-glob-to-any-file:
1111
- '.github/workflows/*'
1212

13-
# Add the `documentation` label to PRs that change any file in the `user_guide_src/source/` directory.
13+
# Add the `documentation` label to PRs for documentation only.
1414
'documentation':
1515
- changed-files:
1616
- any-glob-to-all-files:
17-
- 'user_guide_src/source/*'
17+
- 'user_guide_src/source/**'
1818

19-
# Add the `testing` label to PRs that change files in the `tests/` directory ONLY.
19+
# Add the `testing` label to PRs that changes tests only.
2020
'testing':
2121
- changed-files:
2222
- any-glob-to-all-files:
23-
- 'tests/*'
23+
- 'tests/**'

.github/scripts/random-tests-config.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ CLI
1616
# Commands
1717
# Config
1818
Cookie
19-
DataCaster
19+
# DataCaster
2020
# DataConverter
2121
# Database
22-
Debug
23-
Email
24-
Encryption
25-
Entity
22+
# Debug
23+
# Email
24+
# Encryption
25+
# Entity
2626
Events
2727
Files
2828
# Filters
@@ -31,7 +31,7 @@ Format
3131
# Helpers
3232
# Honeypot
3333
HotReloader
34-
I18n
34+
# I18n
3535
# Images
3636
Language
3737
Log

.github/workflows/deploy-distributables.yml

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

7474
- name: Release
75-
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
75+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
7676
with:
7777
github-token: ${{secrets.ACCESS_TOKEN}}
7878
script: |
@@ -126,7 +126,7 @@ jobs:
126126
run: ./source/.github/scripts/deploy-appstarter ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/appstarter ${GITHUB_REF##*/}
127127

128128
- name: Release
129-
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
129+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
130130
with:
131131
github-token: ${{secrets.ACCESS_TOKEN}}
132132
script: |
@@ -190,7 +190,7 @@ jobs:
190190
run: ./source/.github/scripts/deploy-userguide ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/userguide ${GITHUB_REF##*/}
191191

192192
- name: Release
193-
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
193+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
194194
with:
195195
github-token: ${{secrets.ACCESS_TOKEN}}
196196
script: |

.github/workflows/label-pr.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,55 @@ on:
77
- pull_request_target
88

99
jobs:
10+
validate-source:
11+
permissions:
12+
contents: read
13+
pull-requests: read
14+
runs-on: ubuntu-24.04
15+
outputs:
16+
valid: ${{ steps.check.outputs.valid }}
17+
18+
steps:
19+
- name: Check if PR is from the main repository
20+
id: check
21+
run: |
22+
if [[ "$HEAD_REPO" == "codeigniter4/CodeIgniter4" ]]; then
23+
echo "valid=true" >> $GITHUB_OUTPUT
24+
else
25+
echo "valid=false" >> $GITHUB_OUTPUT
26+
fi
27+
env:
28+
HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
29+
1030
add-labels:
31+
needs: validate-source
1132
permissions:
1233
contents: read
1334
pull-requests: write
1435
runs-on: ubuntu-24.04
1536

1637
steps:
38+
- name: Checkout
39+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
40+
with:
41+
persist-credentials: false
42+
43+
- name: Verify PR source for workflow file changes
44+
run: |
45+
# Get changed files in this PR
46+
git fetch origin "refs/pull/${{ github.event.pull_request.number }}/merge"
47+
CHANGED_FILES=$(git diff --name-only origin/develop FETCH_HEAD 2>/dev/null || echo "")
48+
49+
# Check if this workflow file is being modified
50+
if echo "$CHANGED_FILES" | grep -q "\.github/workflows/label-pr\.yml"; then
51+
if [[ "$IS_VALID" != "true" ]]; then
52+
echo "::error::Changes to label-pr.yml can only be made from the main repository."
53+
exit 1
54+
fi
55+
fi
56+
env:
57+
IS_VALID: ${{ needs.validate-source.outputs.valid }}
58+
1759
- name: Add labels
1860
uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
1961
with:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,6 @@ _modules/*
127127
.vscode/
128128

129129
/results/
130-
/phpunit*.xml
130+
/phpunit.xml
131131

132132
/.php-cs-fixer.php

admin/framework/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,4 @@ _modules/*
123123
.vscode/
124124

125125
/results/
126-
/phpunit*.xml
126+
/phpunit.xml
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
4+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
55
bootstrap="system/Test/bootstrap.php"
66
backupGlobals="false"
77
beStrictAboutOutputDuringTests="true"
88
colors="true"
99
columns="max"
1010
failOnRisky="true"
1111
failOnWarning="true"
12-
cacheDirectory="build/.phpunit.cache">
13-
<coverage
14-
includeUncoveredFiles="true"
15-
pathCoverage="false"
16-
ignoreDeprecatedCodeUnits="true"
17-
disableCodeCoverageIgnore="true">
12+
cacheDirectory="build/.phpunit.cache"
13+
>
14+
<coverage pathCoverage="false" ignoreDeprecatedCodeUnits="true">
1815
<report>
1916
<clover outputFile="build/logs/clover.xml"/>
2017
<html outputDirectory="build/logs/html"/>
2118
<php outputFile="build/logs/coverage.serialized"/>
2219
<text outputFile="php://stdout" showUncoveredFiles="false"/>
2320
</report>
2421
</coverage>
22+
2523
<testsuites>
2624
<testsuite name="App">
2725
<directory>./tests</directory>
2826
</testsuite>
2927
</testsuites>
28+
3029
<logging>
3130
<testdoxHtml outputFile="build/logs/testdox.html"/>
3231
<testdoxText outputFile="build/logs/testdox.txt"/>
3332
<junit outputFile="build/logs/logfile.xml"/>
3433
</logging>
34+
3535
<source>
3636
<include>
3737
<directory suffix=".php">./app</directory>
@@ -41,6 +41,7 @@
4141
<file>./app/Config/Routes.php</file>
4242
</exclude>
4343
</source>
44+
4445
<php>
4546
<server name="app.baseURL" value="http://example.com/"/>
4647
<server name="CODEIGNITER_SCREAM_DEPRECATIONS" value="0"/>

admin/starter/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,4 @@ _modules/*
123123
.vscode/
124124

125125
/results/
126-
/phpunit*.xml
126+
/phpunit.xml
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
4+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
55
bootstrap="vendor/codeigniter4/framework/system/Test/bootstrap.php"
66
backupGlobals="false"
77
beStrictAboutOutputDuringTests="true"
88
colors="true"
99
columns="max"
1010
failOnRisky="true"
1111
failOnWarning="true"
12-
cacheDirectory="build/.phpunit.cache">
13-
<coverage
14-
includeUncoveredFiles="true"
15-
pathCoverage="false"
16-
ignoreDeprecatedCodeUnits="true"
17-
disableCodeCoverageIgnore="true">
12+
cacheDirectory="build/.phpunit.cache"
13+
>
14+
<coverage pathCoverage="false" ignoreDeprecatedCodeUnits="true">
1815
<report>
1916
<clover outputFile="build/logs/clover.xml"/>
2017
<html outputDirectory="build/logs/html"/>
2118
<php outputFile="build/logs/coverage.serialized"/>
2219
<text outputFile="php://stdout" showUncoveredFiles="false"/>
2320
</report>
2421
</coverage>
22+
2523
<testsuites>
2624
<testsuite name="App">
2725
<directory>./tests</directory>
2826
</testsuite>
2927
</testsuites>
28+
3029
<logging>
3130
<testdoxHtml outputFile="build/logs/testdox.html"/>
3231
<testdoxText outputFile="build/logs/testdox.txt"/>
3332
<junit outputFile="build/logs/logfile.xml"/>
3433
</logging>
34+
3535
<source>
3636
<include>
3737
<directory suffix=".php">./app</directory>
@@ -41,6 +41,7 @@
4141
<file>./app/Config/Routes.php</file>
4242
</exclude>
4343
</source>
44+
4445
<php>
4546
<server name="app.baseURL" value="http://example.com/"/>
4647
<server name="CODEIGNITER_SCREAM_DEPRECATIONS" value="0"/>

0 commit comments

Comments
 (0)