Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: codeigniter4/CodeIgniter4
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.4.1
Choose a base ref
...
head repository: codeigniter4/CodeIgniter4
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing 1,880 changed files with 69,441 additions and 26,522 deletions.
46 changes: 25 additions & 21 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -5,31 +5,35 @@

# git files
.gitattributes export-ignore
.gitignore export-ignore
.gitignore export-ignore

# Don't give admin files
.github/ export-ignore
admin/ export-ignore
contributing/ export-ignore
.editorconfig export-ignore
.nojekyll export-ignore export-ignore
# admin files
.github/ export-ignore
admin/ export-ignore
contributing/ export-ignore
.editorconfig export-ignore
CODE_OF_CONDUCT.md export-ignore
CONTRIBUTING.md export-ignore
CONTRIBUTING.md export-ignore

# They don't want our test files
tests/AutoReview/ export-ignore
tests/system/ export-ignore
utils/ export-ignore
deptrac.yaml export-ignore
rector.php export-ignore
phpunit.xml.dist export-ignore
phpstan-baseline.neon.dist export-ignore
phpstan.neon.dist export-ignore
phpstan-bootstrap.php export-ignore
.php-cs-fixer.dist.php export-ignore
.php-cs-fixer.no-header.php export-ignore
# contributor/development files
tests/ export-ignore
utils/ export-ignore
.php-cs-fixer.dist.php export-ignore
.php-cs-fixer.no-header.php export-ignore
.php-cs-fixer.tests.php export-ignore
.php-cs-fixer.user-guide.php export-ignore
deptrac.yaml export-ignore
phpmetrics.json export-ignore
phpstan-baseline.php export-ignore
phpstan-bootstrap.php export-ignore
phpstan.neon.dist export-ignore
phpunit.xml.dist export-ignore
psalm-baseline.xml export-ignore
psalm.xml export-ignore
psalm_autoload.php export-ignore
rector.php export-ignore

# The source user guide, either
# source user guide
user_guide_src/ export-ignore
.nojekyll export-ignore
phpdoc.dist.xml export-ignore
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -25,10 +25,10 @@ body:
description: Which PHP versions did you run your code?
multiple: true
options:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
- '8.4'
validations:
required: true

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ blank_issues_enabled: false
contact_links:
- name: CodeIgniter Forum
url: https://forum.codeigniter.com/forum-30.html
about: Please ask your support questions in the forums. Thanks!
about: Please ask your support questions and/or feature requests in the forums. Thanks!

- name: CodeIgniter Slack channel
url: https://codeigniterchat.slack.com
11 changes: 0 additions & 11 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/planned-work.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
name: Planned work
about: Approved work planning
about: Maintainers' space. DO NOT use this for your bug reports!
title: 'Dev: '
labels: dev
assignees: ''

---

Repo maintainers will create "issues" for planned work, so it can be tracked.
Maintainers will create "issues" for planned work, so it can be tracked.
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -2,10 +2,11 @@
Each pull request should address a single issue and have a meaningful title.
- PR title must include the type (feat, fix, chore, docs, perf, refactor, style, test) of the commit per Conventional Commits specification. See https://www.conventionalcommits.org/en/v1.0.0/ for the discussion.
- Pull requests must be in English.
- If a pull request fixes an issue, reference the issue with a suitable keyword (e.g., Fixes <issue number>).
- All bug fixes should be sent to the __"develop"__ branch, this is where the next bug fix version will be developed.
- PRs with any enhancement should be sent to the next minor version branch, e.g. __"4.3"__
- PRs with any enhancement should be sent to the next minor version branch, e.g. __"4.5"__
-->
**Description**
69 changes: 69 additions & 0 deletions .github/mergeable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# https://mergeable.readthedocs.io/en/latest/configuration.html

version: 2
mergeable:
- when: issues.opened, issues.reopened
validate:
- do: or
validate:
- do: and
validate:
- do: description
must_include:
regex: '### PHP Version'
- do: description
must_include:
regex: '### CodeIgniter4 Version'
- do: author
must_include:
regex: ^kenjis|lonnieezell|MGatner|michalsn|paulbalandan|samsonasik$
fail:
- do: comment
payload:
body: |
Hi there, @@author! :wave:
It looks like you opened an issue without following the bug report template:
* Bug report ([open an issue](https://github.com/codeigniter4/CodeIgniter4/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml&title=Bug%3A+))
* For feature request or support question, please use the [forums](https://forum.codeigniter.com/forum-30.html).
The current issue will be closed. This is a precaution to save maintainers' time, I hope you'll understand.
Sincerely, the mergeable bot 🤖
- do: close

- when: pull_request.opened, pull_request.ready_for_review
filter:
- do: payload
pull_request:
author_association:
must_include:
regex: ^NONE|FIRST_TIME_CONTRIBUTOR|FIRST_TIMER$
validate: []
pass:
- do: comment
payload:
body: |
Hi there, @@author! :wave:
Thank you for sending this PR!
We expect the following in all Pull Requests (PRs).
- PRs must be sent to the [appropriate branch](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#branching)
- All git commits must be [GPG-signed](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#signing)
- Must follow our [style guide](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#php-style)
- Be [commented](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#comments) in the PHP source file
- Be documented in the [user guide](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#user-guide)
- Be [unit tested](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md#unit-testing)
- Pass all checks in GitHub Actions
> [!IMPORTANT]
> We expect all code changes or bug-fixes to be accompanied by one or more tests added to our test suite to prove the code works.
If pull requests do not comply with the above, they will likely be closed. Since we are a team of volunteers, we don't have any more time to work
on the framework than you do. Please make it as painless for your contributions to be included as possible.
See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md
Sincerely, the mergeable bot 🤖
8 changes: 8 additions & 0 deletions .github/prlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"title": [
{
"pattern": "^(\\[\\d+\\.\\d+\\]\\s{1})?(feat|fix|chore|docs|perf|refactor|style|test|config|revert)(\\([\\-.@:`a-zA-Z0-9]+\\))?!?:\\s{1}\\S.+\\S|Prep for \\d\\.\\d\\.\\d release|\\d\\.\\d\\.\\d (Ready|Merge) code$",
"message": "PR title must include the type (feat, fix, chore, docs, perf, refactor, style, test, config, revert) of the commit per Conventional Commits specification. See https://www.conventionalcommits.org/en/v1.0.0/ for the discussion."
}
]
}
21 changes: 20 additions & 1 deletion .github/scripts/deploy-userguide
Original file line number Diff line number Diff line change
@@ -6,7 +6,26 @@
SOURCE=$1
TARGET=$2
RELEASE=$3
VERSION=`echo "$RELEASE" | cut -c 2-`

# Check if RELEASE is empty
if [ -z "$RELEASE" ]; then
echo "Error: \$RELEASE parameter is empty."
exit 1
fi

VERSION=$(echo "$RELEASE" | cut -c 2-)

# Check if VERSION is empty
if [ -z "$VERSION" ]; then
echo "Error: Failed to extract \$VERSION from \$RELEASE parameter '$RELEASE'."
exit 1
fi

# Check if VERSION matches the format X.Y.Z
if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: VERSION '$VERSION' does not match the expected format X.Y.Z."
exit 1
fi

echo "Preparing for version $3"
echo "Merging files from $1 to $2"
4 changes: 2 additions & 2 deletions .github/workflows/deploy-apidocs.yml
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ jobs:

- name: Download latest phpDocumentor
working-directory: source
run: phive --no-progress install --trust-gpg-keys 8AC0BAA79732DD42 phpDocumentor
run: phive --no-progress install --trust-gpg-keys 6DA3ACC4991FFAE5 phpDocumentor

- name: Prepare API repo
working-directory: api
@@ -61,7 +61,7 @@ jobs:
- name: Build API in source repo
working-directory: source
run: |
php tools/phpDocumentor run --ansi --verbose
php tools/phpDocumentor --ansi --verbose
cp -R ${GITHUB_WORKSPACE}/source/api/build/* ${GITHUB_WORKSPACE}/api/docs
- name: Deploy to API repo
16 changes: 10 additions & 6 deletions .github/workflows/deploy-distributables.yml
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ jobs:
run: ./source/.github/scripts/deploy-framework ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/framework ${GITHUB_REF##*/}

- name: Release
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{secrets.ACCESS_TOKEN}}
script: |
@@ -116,7 +116,7 @@ jobs:
run: ./source/.github/scripts/deploy-appstarter ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/appstarter ${GITHUB_REF##*/}

- name: Release
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{secrets.ACCESS_TOKEN}}
script: |
@@ -159,11 +159,15 @@ jobs:
token: ${{ secrets.ACCESS_TOKEN }}
path: userguide

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Sphinx
run: |
sudo apt install python3-sphinx
sudo pip3 install sphinxcontrib-phpdomain
sudo pip3 install sphinx_rtd_theme
python -m pip install --upgrade pip
pip install -r ./source/user_guide_src/requirements.txt
- name: Chmod
run: chmod +x ./source/.github/scripts/deploy-userguide
@@ -172,7 +176,7 @@ jobs:
run: ./source/.github/scripts/deploy-userguide ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/userguide ${GITHUB_REF##*/}

- name: Release
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{secrets.ACCESS_TOKEN}}
script: |
21 changes: 15 additions & 6 deletions .github/workflows/deploy-userguide-latest.yml
Original file line number Diff line number Diff line change
@@ -30,14 +30,23 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: '8.1'
coverage: none

# Build the latest User Guide
- name: Build with Sphinx
uses: ammaraskar/sphinx-action@0.4
- name: Setup Python
uses: actions/setup-python@v5
with:
docs-folder: user_guide_src/
python-version: '3.12'

- name: Install Sphinx
run: |
python -m pip install --upgrade pip
pip install -r user_guide_src/requirements.txt
# Build the latest User Guide
- name: Build Docs with Sphinx
run: make html
working-directory: user_guide_src

- name: Add "Edit this page" links
run: |
@@ -48,7 +57,7 @@ jobs:
# Create an artifact of the html output
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: HTML Documentation
path: user_guide_src/build/html/
51 changes: 51 additions & 0 deletions .github/workflows/label-add-conflict-all-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Auto Label "stale" for All PRs

on:
push:
branches:
- develop
- '4.*'

jobs:
build:
name: Check Conflicts

permissions:
contents: read
pull-requests: write

runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Get PR List
id: PR-list
run: echo "pr_list=$(gh pr list -L 100 --json mergeable,url,labels,author)" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 'Add label "stale" and comment'
env:
PR_LIST: ${{ steps.PR-list.outputs.pr_list }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
IFS=$'\n' # Set Internal Field Separator to newline to handle array elements
# Iterate through the PRs in PR_LIST
for pr in $(echo "$PR_LIST" | jq -c '.[]'); do
mergeable=$(echo "$pr" | jq -r '.mergeable')
author=$(echo "$pr" | jq -r '.author.login')
labels=$(echo "$pr" | jq -c '.labels[].name' | tr -d '[]"')
url=$(echo "$pr" | jq -r '.url')
# CONFLICTING and no 'stale' label
if [ "$mergeable" == "CONFLICTING" ] && [[ ! "$labels" == *"stale"* ]]; then
# Add "stale" label
gh pr edit $url --add-label "stale"
# Add a comment
gh pr comment $url --body ":wave: Hi, @$author!<br><br>We detected conflicts in your PR against the base branch :speak_no_evil:<br>You may want to sync :arrows_counterclockwise: your branch with upstream!<br><br>Ref: [Syncing Your Branch](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/workflow.md#updating-your-branch)"
fi
done
Loading