Skip to content

Commit f38806b

Browse files
committed
Merge remote-tracking branch 'origin/develop' into 4.3
Conflicts: tests/system/CLI/CommandRunnerTest.php user_guide_src/source/changelogs/index.rst user_guide_src/source/installation/upgrading.rst
2 parents 3c92e6e + 9d95248 commit f38806b

File tree

189 files changed

+540
-89
lines changed

Some content is hidden

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

189 files changed

+540
-89
lines changed

.github/scripts/validate-version

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
set -o pipefail
3+
4+
if [[ -z $1 ]]; then
5+
echo "validate-version requires a version identifier"
6+
exit 1
7+
fi
8+
9+
FILES=("system/CodeIgniter.php" "user_guide_src/source/conf.py")
10+
LENGTH="${#FILES[@]}"
11+
12+
for FILE in "${FILES[@]}"; do
13+
COUNT="$((COUNT + $(grep -c "$FILE" -e "$1")))"
14+
done
15+
16+
if [[ $COUNT -ne $LENGTH ]]; then
17+
echo "CodeIgniter version is not updated to v"$1""
18+
exit 1
19+
fi
20+
21+
echo "CodeIgniter version is updated to v"$1""

.github/workflows/deploy-framework.yml renamed to .github/workflows/deploy-distributables.yml

Lines changed: 83 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,40 @@
1-
# When a new Release is created, deploy relevant
1+
# When a new release is created, deploy relevant
22
# files to each of the generated repos.
3-
name: Deploy Framework
3+
name: Deploy Distributable Repos
44

55
on:
66
release:
77
types: [published]
88

99
jobs:
10+
check-version:
11+
name: Check for updated version
12+
runs-on: ubuntu-22.04
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0 # fetch all tags
19+
20+
- name: Get latest version
21+
run: |
22+
echo 'LATEST_VERSION<<EOF' >> $GITHUB_ENV
23+
echo $(git describe --tags --abbrev=0) | sed "s/v//" >> $GITHUB_ENV
24+
echo 'EOF' >> $GITHUB_ENV
25+
26+
- name: Search for updated version
27+
if: ${{ env.LATEST_VERSION }}
28+
run: |
29+
chmod +x ${GITHUB_WORKSPACE}/.github/scripts/validate-version
30+
${GITHUB_WORKSPACE}/.github/scripts/validate-version ${{ env.LATEST_VERSION }}
31+
1032
framework:
1133
name: Deploy to framework
1234
if: github.repository == 'codeigniter4/CodeIgniter4'
13-
runs-on: ubuntu-latest
35+
runs-on: ubuntu-22.04
36+
needs: check-version
37+
1438
steps:
1539
- name: Identify
1640
run: |
@@ -55,7 +79,9 @@ jobs:
5579
appstarter:
5680
name: Deploy to appstarter
5781
if: github.repository == 'codeigniter4/CodeIgniter4'
58-
runs-on: ubuntu-latest
82+
runs-on: ubuntu-22.04
83+
needs: check-version
84+
5985
steps:
6086
- name: Identify
6187
run: |
@@ -96,3 +122,56 @@ jobs:
96122
name: release.data.name,
97123
body: release.data.body
98124
})
125+
126+
userguide:
127+
name: Deploy to userguide
128+
if: github.repository == 'codeigniter4/CodeIgniter4'
129+
runs-on: ubuntu-22.04
130+
needs: check-version
131+
132+
steps:
133+
- name: Identify
134+
run: |
135+
git config --global user.email "[email protected]"
136+
git config --global user.name "${GITHUB_ACTOR}"
137+
138+
- name: Checkout source
139+
uses: actions/checkout@v3
140+
with:
141+
path: source
142+
143+
- name: Checkout target
144+
uses: actions/checkout@v3
145+
with:
146+
repository: codeigniter4/userguide
147+
token: ${{ secrets.ACCESS_TOKEN }}
148+
path: userguide
149+
150+
- name: Install Sphinx
151+
run: |
152+
sudo apt install python3-sphinx
153+
sudo pip3 install sphinxcontrib-phpdomain
154+
sudo pip3 install sphinx_rtd_theme
155+
156+
- name: Chmod
157+
run: chmod +x ./source/.github/scripts/deploy-userguide
158+
159+
- name: Deploy
160+
run: ./source/.github/scripts/deploy-userguide ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/userguide ${GITHUB_REF##*/}
161+
162+
- name: Release
163+
uses: actions/github-script@v6
164+
with:
165+
github-token: ${{secrets.ACCESS_TOKEN}}
166+
script: |
167+
const release = await github.rest.repos.getLatestRelease({
168+
owner: context.repo.owner,
169+
repo: context.repo.repo
170+
})
171+
github.rest.repos.createRelease({
172+
owner: context.repo.owner,
173+
repo: 'userguide',
174+
tag_name: release.data.tag_name,
175+
name: release.data.name,
176+
body: release.data.body
177+
})

.github/workflows/deploy-userguide.yml

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

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## [v4.2.10](https://github.com/codeigniter4/CodeIgniter4/tree/v4.2.10) (2022-11-05)
4+
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.2.9...v4.2.10)
5+
6+
### Fixed Bugs
7+
* docs: fix PHPDoc types in Session by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6796
8+
* fix: output "0" at the end of toolbar js when Kint::$enabled_mode is false by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6809
9+
10+
### Refactoring
11+
* Refactor assertHeaderEmitted and assertHeaderNotEmitted by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/6806
12+
* fix: variable types for PHPStan 1.9.0 by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6810
13+
314
## [v4.2.9](https://github.com/codeigniter4/CodeIgniter4/tree/v4.2.9) (2022-10-30)
415
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.2.8...v4.2.9)
516

admin/RELEASE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ CodeIgniter 4.x.x release.
6060
6161
See the changelog: https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md
6262
```
63-
* Watch for the "Deploy Framework" Action to make sure **framework** and **appstarter** get updated
64-
* Run the following commands to install and test AppStarter and verify the new version:
63+
* Watch for the "Deploy Distributable Repos" action to make sure **framework**, **appstarter**, and **userguide** get updated
64+
* Run the following commands to install and test `appstarter` and verify the new version:
6565
```console
6666
composer create-project codeigniter4/appstarter release-test
6767
cd release-test
6868
composer test && composer info codeigniter4/framework
6969
```
70-
* Verify that the User Guide Actions succeeded:
71-
* "Deploy User Guide", framework repo
70+
* Verify that the user guide actions succeeded:
71+
* "Deploy Distributable Repos", framework repo
7272
* "Deploy Production", UG repo
7373
* "pages-build-deployment", both repos
7474
* Fast-forward `develop` branch to catch the merge commit from `master`

system/CodeIgniter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class CodeIgniter
4747
/**
4848
* The current version of CodeIgniter Framework
4949
*/
50-
public const CI_VERSION = '4.2.8';
50+
public const CI_VERSION = '4.2.10';
5151

5252
/**
5353
* App startup time.

system/Model.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ public function setTable(string $table)
157157

158158
/**
159159
* Fetches the row of database from $this->table with a primary key
160-
* matching $id. This methods works only with dbCalls
161-
* This methods works only with dbCalls
160+
* matching $id.
161+
* This method works only with dbCalls.
162162
*
163163
* @param bool $singleton Single or multiple results
164164
* @param array|int|string|null $id One primary key or an array of primary keys
@@ -189,8 +189,8 @@ protected function doFind(bool $singleton, $id = null)
189189
}
190190

191191
/**
192-
* Fetches the column of database from $this->table
193-
* This methods works only with dbCalls
192+
* Fetches the column of database from $this->table.
193+
* This method works only with dbCalls.
194194
*
195195
* @param string $columnName Column Name
196196
*
@@ -204,7 +204,7 @@ protected function doFindColumn(string $columnName)
204204
/**
205205
* Works with the current Query Builder instance to return
206206
* all results, while optionally limiting them.
207-
* This methods works only with dbCalls
207+
* This method works only with dbCalls.
208208
*
209209
* @param int $limit Limit
210210
* @param int $offset Offset
@@ -227,7 +227,7 @@ protected function doFindAll(int $limit = 0, int $offset = 0)
227227
/**
228228
* Returns the first row of the result set. Will take any previous
229229
* Query Builder calls into account when determining the result set.
230-
* This methods works only with dbCalls
230+
* This method works only with dbCalls.
231231
*
232232
* @return array|object|null
233233
*/
@@ -252,7 +252,7 @@ protected function doFirst()
252252

253253
/**
254254
* Inserts data into the current table.
255-
* This method works only with dbCalls
255+
* This method works only with dbCalls.
256256
*
257257
* @param array $data Data
258258
*
@@ -315,7 +315,7 @@ protected function doInsert(array $data)
315315

316316
/**
317317
* Compiles batch insert strings and runs the queries, validating each row prior.
318-
* This methods works only with dbCalls
318+
* This method works only with dbCalls.
319319
*
320320
* @param array|null $set An associative array of insert values
321321
* @param bool|null $escape Whether to escape values
@@ -341,7 +341,7 @@ protected function doInsertBatch(?array $set = null, ?bool $escape = null, int $
341341

342342
/**
343343
* Updates a single record in $this->table.
344-
* This methods works only with dbCalls
344+
* This method works only with dbCalls.
345345
*
346346
* @param array|int|string|null $id
347347
* @param array|null $data
@@ -367,7 +367,7 @@ protected function doUpdate($id = null, $data = null): bool
367367

368368
/**
369369
* Compiles an update string and runs the query
370-
* This methods works only with dbCalls
370+
* This method works only with dbCalls.
371371
*
372372
* @param array|null $set An associative array of update values
373373
* @param string|null $index The where key
@@ -386,7 +386,7 @@ protected function doUpdateBatch(?array $set = null, ?string $index = null, int
386386
/**
387387
* Deletes a single record from $this->table where $id matches
388388
* the table's primaryKey
389-
* This methods works only with dbCalls
389+
* This method works only with dbCalls.
390390
*
391391
* @param array|int|string|null $id The rows primary key(s)
392392
* @param bool $purge Allows overriding the soft deletes setting.
@@ -431,7 +431,7 @@ protected function doDelete($id = null, bool $purge = false)
431431
/**
432432
* Permanently deletes all rows that have been marked as deleted
433433
* through soft deletes (deleted = 1)
434-
* This methods works only with dbCalls
434+
* This method works only with dbCalls.
435435
*
436436
* @return bool|string Returns a string if in test mode.
437437
*/
@@ -445,7 +445,7 @@ protected function doPurgeDeleted()
445445
/**
446446
* Works with the find* methods to return only the rows that
447447
* have been deleted.
448-
* This methods works only with dbCalls
448+
* This method works only with dbCalls.
449449
*/
450450
protected function doOnlyDeleted()
451451
{
@@ -454,7 +454,7 @@ protected function doOnlyDeleted()
454454

455455
/**
456456
* Compiles a replace into string and runs the query
457-
* This methods works only with dbCalls
457+
* This method works only with dbCalls.
458458
*
459459
* @param array|null $data Data
460460
* @param bool $returnSQL Set to true to return Query String
@@ -470,7 +470,7 @@ protected function doReplace(?array $data = null, bool $returnSQL = false)
470470
* Grabs the last error(s) that occurred from the Database connection.
471471
* The return array should be in the following format:
472472
* ['source' => 'message']
473-
* This methods works only with dbCalls
473+
* This method works only with dbCalls.
474474
*
475475
* @return array<string,string>
476476
*/
@@ -524,7 +524,7 @@ public function getIdValue($data)
524524
* Loops over records in batches, allowing you to operate on them.
525525
* Works with $this->builder to get the Compiled select to
526526
* determine the rows to operate on.
527-
* This methods works only with dbCalls
527+
* This method works only with dbCalls.
528528
*
529529
* @throws DataException
530530
*/

tests/system/API/ResponseTraitTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
/**
2626
* @internal
27+
*
28+
* @group Others
2729
*/
2830
final class ResponseTraitTest extends CIUnitTestCase
2931
{

tests/system/Autoloader/AutoloaderTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424
/**
2525
* @internal
26+
*
27+
* @group Others
2628
*/
2729
final class AutoloaderTest extends CIUnitTestCase
2830
{

tests/system/Autoloader/FileLocatorTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
/**
2020
* @internal
21+
*
22+
* @group Others
2123
*/
2224
final class FileLocatorTest extends CIUnitTestCase
2325
{

0 commit comments

Comments
 (0)