Skip to content

Commit f5ca37a

Browse files
authored
Merge pull request #2912 from codeigniter4/develop
4.0.3 release
2 parents 278a747 + 7edf31b commit f5ca37a

File tree

394 files changed

+8823
-7084
lines changed

Some content is hidden

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

394 files changed

+8823
-7084
lines changed

.github/scripts/deploy-appstarter

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
## Deploy codeigniter4/appstarter
4+
5+
# Setup variables
6+
SOURCE=$1
7+
TARGET=$2
8+
RELEASE=$3
9+
10+
echo "Preparing for version $3"
11+
echo "Merging files from $1 to $2"
12+
13+
# Prepare the source
14+
cd $SOURCE
15+
git checkout master
16+
17+
# Prepare the target
18+
cd $TARGET
19+
git checkout master
20+
rm -rf *
21+
22+
# Copy common files
23+
releasable='app public writable env license.txt spark .gitignore'
24+
for fff in $releasable ; do
25+
cp -Rf ${SOURCE}/$fff ./
26+
done
27+
28+
# Copy repo-specific files
29+
cp -Rf ${SOURCE}/admin/starter/. ./
30+
31+
# Commit the changes
32+
git add .
33+
git commit -m "Release ${RELEASE}"
34+
git push

.github/scripts/deploy-framework

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
## Deploy codeigniter4/framework
4+
5+
# Setup variables
6+
SOURCE=$1
7+
TARGET=$2
8+
RELEASE=$3
9+
10+
echo "Preparing for version $3"
11+
echo "Merging files from $1 to $2"
12+
13+
# Prepare the source
14+
cd $SOURCE
15+
git checkout master
16+
17+
# Prepare the target
18+
cd $TARGET
19+
git checkout master
20+
rm -rf *
21+
22+
# Copy common files
23+
releasable='app public writable env license.txt spark .gitignore system'
24+
for fff in $releasable ; do
25+
cp -Rf ${SOURCE}/$fff ./
26+
done
27+
28+
# Copy repo-specific files
29+
cp -Rf ${SOURCE}/admin/framework/. ./
30+
31+
# Commit the changes
32+
git add .
33+
git commit -m "Release ${RELEASE}"
34+
git push

.github/workflows/deploy.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Deploy
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
framework:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Identify
13+
run: |
14+
git config --global user.email "[email protected]"
15+
git config --global user.name "${GITHUB_ACTOR}"
16+
17+
- name: Checkout source
18+
uses: actions/checkout@v2
19+
with:
20+
path: source
21+
22+
- name: Checkout target
23+
uses: actions/checkout@v2
24+
with:
25+
repository: codeigniter4/framework
26+
token: ${{ secrets.ACCESS_TOKEN }}
27+
path: framework
28+
29+
- name: Chmod
30+
run: chmod +x ./source/.github/scripts/deploy-framework
31+
32+
- name: Deploy
33+
run: ./source/.github/scripts/deploy-framework ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/framework ${GITHUB_REF##*/}
34+
35+
- name: Release
36+
uses: actions/[email protected]
37+
with:
38+
github-token: ${{secrets.ACCESS_TOKEN}}
39+
script: |
40+
const release = await github.repos.getLatestRelease({
41+
owner: context.repo.owner,
42+
repo: context.repo.repo
43+
})
44+
github.repos.createRelease({
45+
owner: context.repo.owner,
46+
repo: 'framework',
47+
tag_name: release.data.tag_name,
48+
name: release.data.name,
49+
body: release.data.body
50+
})
51+
52+
appstarter:
53+
runs-on: ubuntu-latest
54+
55+
steps:
56+
- name: Identify
57+
run: |
58+
git config --global user.email "[email protected]"
59+
git config --global user.name "${GITHUB_ACTOR}"
60+
61+
- name: Checkout source
62+
uses: actions/checkout@v2
63+
with:
64+
path: source
65+
66+
- name: Checkout target
67+
uses: actions/checkout@v2
68+
with:
69+
repository: codeigniter4/appstarter
70+
token: ${{ secrets.ACCESS_TOKEN }}
71+
path: appstarter
72+
73+
- name: Chmod
74+
run: chmod +x ./source/.github/scripts/deploy-appstarter
75+
76+
- name: Deploy
77+
run: ./source/.github/scripts/deploy-appstarter ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/appstarter ${GITHUB_REF##*/}
78+
79+
- name: Release
80+
uses: actions/[email protected]
81+
with:
82+
github-token: ${{secrets.ACCESS_TOKEN}}
83+
script: |
84+
const release = await github.repos.getLatestRelease({
85+
owner: context.repo.owner,
86+
repo: context.repo.repo
87+
})
88+
github.repos.createRelease({
89+
owner: context.repo.owner,
90+
repo: 'appstarter',
91+
tag_name: release.data.tag_name,
92+
name: release.data.name,
93+
body: release.data.body
94+
})

CHANGELOG.md

Lines changed: 217 additions & 10 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,11 @@ If you are using the command-line, you can do the following to update your fork
9292
3. `git push origin develop`
9393

9494
Your fork is now up to date. This should be done regularly and, at the least, before you submit a pull request.
95+
96+
## Translations Installation
97+
98+
If you wish to contribute to the system message translations,
99+
then fork and clone the [translations repository](https://github.com/codeigniter4/translations>)
100+
separately from the codebase.
101+
102+
These are two independent repositories!

README.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,29 @@
22

33
[![Build Status](https://travis-ci.org/codeigniter4/CodeIgniter4.svg?branch=develop)](https://travis-ci.org/codeigniter4/CodeIgniter4)
44
[![Coverage Status](https://coveralls.io/repos/github/codeigniter4/CodeIgniter4/badge.svg?branch=develop)](https://coveralls.io/github/codeigniter4/CodeIgniter4?branch=develop)
5+
[![Downloads](https://poser.pugx.org/codeigniter4/framework/downloads)](https://packagist.org/packages/codeigniter4/framework)
6+
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/codeigniter4/CodeIgniter4)](https://packagist.org/packages/codeigniter4/framework)
7+
[![GitHub stars](https://img.shields.io/github/stars/codeigniter4/CodeIgniter4)](https://packagist.org/packages/codeigniter4/framework)
8+
[![GitHub license](https://img.shields.io/github/license/codeigniter4/CodeIgniter4)](https://github.com/codeigniter4/CodeIgniter4/blob/develop/license.txt)
9+
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/codeigniter4/CodeIgniter4/pulls)
510
<br>
611

712
## What is CodeIgniter?
813

9-
CodeIgniter is a PHP full-stack web framework that is light, fast, flexible, and secure.
14+
CodeIgniter is a PHP full-stack web framework that is light, fast, flexible, and secure.
1015
More information can be found at the [official site](http://codeigniter.com).
1116

12-
This repository holds the source code for CodeIgniter 4 only.
13-
Version 4 is a complete rewrite to bring the quality and the code into a more modern version,
14-
while still keeping as many of the things intact that has made people love the framework over the years.
15-
16-
**This is pre-release code and should not be used in production sites.**
17+
This repository holds the source code for CodeIgniter 4 only.
18+
Version 4 is a complete rewrite to bring the quality and the code into a more modern version,
19+
while still keeping as many of the things intact that has made people love the framework over the years.
1720

1821
More information about the plans for version 4 can be found in [the announcement](http://forum.codeigniter.com/thread-62615.html) on the forums.
1922

2023
### Documentation
2124

22-
The [User Guide](https://codeigniter4.github.io/userguide/) is the primary documentation for CodeIgniter 4.
25+
The [User Guide](https://codeigniter4.github.io/userguide/) is the primary documentation for CodeIgniter 4.
2326

24-
The current **in-progress** User Guide can be found [here](https://codeigniter4.github.io/CodeIgniter4/).
27+
The current **in-progress** User Guide can be found [here](https://codeigniter4.github.io/CodeIgniter4/).
2528
As with the rest of the framework, it is a work in progress, and will see changes over time to structure, explanations, etc.
2629

2730
You might also be interested in the [API documentation](https://codeigniter4.github.io/api/) for the framework components.
@@ -40,9 +43,9 @@ The user guide updating and deployment is a bit awkward at the moment, but we ar
4043

4144
## Repository Management
4245

43-
CodeIgniter is developed completely on a volunteer basis. As such, please give up to 7 days
44-
for your issues to be reviewed. If you haven't heard from one of the team in that time period,
45-
feel free to leave a comment on the issue so that it gets brought back to our attention.
46+
CodeIgniter is developed completely on a volunteer basis. As such, please give up to 7 days
47+
for your issues to be reviewed. If you haven't heard from one of the team in that time period,
48+
feel free to leave a comment on the issue so that it gets brought back to our attention.
4649

4750
We use Github issues to track **BUGS** and to track approved **DEVELOPMENT** work packages.
4851
We use our [forum](http://forum.codeigniter.com) to provide SUPPORT and to discuss
@@ -53,7 +56,7 @@ be closed! If you are not sure if you have found a bug, raise a thread on the fo
5356
someone else may have encountered the same thing.
5457

5558
Before raising a new Github issue, please check that your bug hasn't already
56-
been reported or fixed.
59+
been reported or fixed.
5760

5861
We use pull requests (PRs) for CONTRIBUTIONS to the repository.
5962
We are looking for contributions that address one of the reported bugs or
@@ -69,8 +72,8 @@ to optional packages, with their own repository.
6972

7073
We **are** accepting contributions from the community!
7174

72-
We will try to manage the process somewhat, by adding a ["help wanted" label](https://github.com/codeigniter4/CodeIgniter4/labels/help%20wanted) to those that we are
73-
specifically interested in at any point in time. Join the discussion for those issues and let us know
75+
We will try to manage the process somewhat, by adding a ["help wanted" label](https://github.com/codeigniter4/CodeIgniter4/labels/help%20wanted) to those that we are
76+
specifically interested in at any point in time. Join the discussion for those issues and let us know
7477
if you want to take the lead on one of them.
7578

7679
At this time, we are not looking for out-of-scope contributions, only those that would be considered part of our controlled evolution!
@@ -79,17 +82,17 @@ Please read the [*Contributing to CodeIgniter*](https://github.com/codeigniter4/
7982

8083
## Server Requirements
8184

82-
PHP version 7.2 or higher is required, with the following extensions installed:
85+
PHP version 7.2 or higher is required, with the following extensions installed:
8386

8487

8588
- [intl](http://php.net/manual/en/intl.requirements.php)
8689
- [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library
90+
- [mbstring](http://php.net/manual/en/mbstring.installation.php)
8791

8892
Additionally, make sure that the following extensions are enabled in your PHP:
8993

9094
- json (enabled by default - don't turn it off)
9195
- xml (enabled by default - don't turn it off)
92-
- [mbstring](http://php.net/manual/en/mbstring.installation.php)
9396
- [mysqlnd](http://php.net/manual/en/mysqlnd.install.php)
9497

9598
## Running CodeIgniter Tests

admin/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This folder contains tools or docs useful for project maintainers.
1616
It is meant to be downloaded by developers, or composer-installed.
1717
This is a read-only repository.
1818
- **appstarter** is the released application starter repository.
19-
It is derived from the framework's `application` and `public` folders, with
19+
It is derived from the framework's `app` and `public` folders, with
2020
a composer requirement dependency to pull in the framework itself.
2121
It is meant to be downloaded or composer-installed.
2222
This is a read-only repository.
@@ -64,14 +64,10 @@ scripts used by the release manager:
6464
in it, and it will run the related scripts following, to revise
6565
the release distributions.
6666
Usage: `admin/release version qualifier`
67-
- **release-framework** builds the distributable framework repo.
68-
It could be used on its own, but is normally part of `release`.
69-
- **release-appstarter** builds the distributable appstarter repo.
70-
It could be used on its own, but is normally part of `release`.
7167
- **release-userguide** builds the distributable userguide repo.
7268
It could be used on its own, but is normally part of `release`.
7369
- **release-deploy** pushes the release changes to the appropriate github
74-
repositories. Tag & create releases on github. This is not easily reversible!
70+
repositories. Tag & create releases on GitHub. This is not easily reversible!
7571
Usage: `admin/release-deploy version qualifier`
7672
- **release-revert** can be used to restore your repositories to the state they
7773
were in before you started a release. **IF** you haven't deployed.

admin/framework/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ This repository holds the distributable version of the framework,
99
including the user guide. It has been built from the
1010
[development repository](https://github.com/codeigniter4/CodeIgniter4).
1111

12-
**This is pre-release code and should not be used in production sites.**
13-
1412
More information about the plans for version 4 can be found in [the announcement](http://forum.codeigniter.com/thread-62615.html) on the forums.
1513

1614
The user guide corresponding to this version of the framework can be found

admin/framework/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"ext-curl": "*",
1010
"ext-intl": "*",
1111
"ext-json": "*",
12+
"ext-mbstring": "*",
1213
"kint-php/kint": "^3.3",
1314
"psr/log": "^1.1",
1415
"laminas/laminas-escaper": "^2.6"

admin/module/tests/database/ExampleDatabaseTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public function testSoftDeleteLeavesRow()
2626
{
2727
$model = new ExampleModel();
2828
$this->setPrivateProperty($model, 'useSoftDeletes', true);
29+
$this->setPrivateProperty($model, 'tempUseSoftDeletes', true);
2930

3031
$object = $model->first();
3132
$model->delete($object->id);

admin/pre-commit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ SFILES=${SFILES:-$STAGED_FILES_CMD}
1717
echo "Checking PHP Lint..."
1818
for FILE in $SFILES
1919
do
20-
php -l -d display_errors=0 $PROJECT/$FILE
20+
php -l -d display_errors=0 "$PROJECT/$FILE"
2121
if [ $? != 0 ]
2222
then
2323
echo "Fix the error before commit."
2424
exit 1
2525
fi
26-
FILES="$FILES $PROJECT/$FILE"
26+
FILES="$FILES $FILE"
2727
done
2828

2929
if [ "$FILES" != "" ]

admin/release

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ if [ -d dist ]; then
8989
fi
9090
mkdir dist
9191

92-
setup_repo framework
9392
setup_repo userguide
94-
setup_repo appstarter
9593

9694
#---------------------------------------------------
9795
# Housekeeping - make sure writable is flushed of test files
@@ -139,9 +137,7 @@ git commit -S -m "Release ${RELEASE}"
139137
#---------------------------------------------------
140138
# Build the distributables
141139

142-
. admin/release-framework
143140
. admin/release-userguide
144-
. admin/release-appstarter
145141

146142
#---------------------------------------------------
147143
# Done for now

admin/release-appstarter

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

0 commit comments

Comments
 (0)