Skip to content

4.2.1 Ready code #6136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 118 commits into from
Jun 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
749307e
Update website process
MGatner Jun 3, 2022
5b70287
Adds information that ignore() is not unique to insert
eSkiSo Jun 3, 2022
cf4641c
Merge pull request #6071 from eSkiSo/patch-3
samsonasik Jun 4, 2022
148ee02
docs: update for v4.2
kenjis Jun 5, 2022
3713970
docs: update authentication.rst
kenjis Jun 5, 2022
b329d9c
Merge pull request #6074 from kenjis/fix-docs-upgrading-routing
kenjis Jun 5, 2022
55a6861
Merge pull request #6075 from kenjis/fix-docs-authentication
kenjis Jun 5, 2022
57e9237
fix: get_cookie() does not take Config\Cookie::$prefix
kenjis Jun 6, 2022
784d8c9
fix: Session Handlers does not take Config\Cookie
kenjis Jun 6, 2022
d82b7e2
docs: make PHPDoc more accurate
kenjis Jun 6, 2022
17824fb
docs: add details
kenjis Jun 6, 2022
b350c5c
docs: fix typo
kenjis Jun 6, 2022
09f22a1
Apply translateURIDashes()
pjsde Jun 6, 2022
bc141f9
chore(deps-dev): update rector/rector requirement from 0.13.3 to 0.13.4
dependabot[bot] Jun 6, 2022
5c2211b
re-run rector 0.13.4 to remove unneeded @var
samsonasik Jun 6, 2022
cab0c68
Merge pull request #6085 from codeigniter4/dependabot/composer/rector…
samsonasik Jun 6, 2022
8e4a669
Move preload.php example to starter app
samsonasik Jun 7, 2022
3e7f640
Merge pull request #6088 from samsonasik/move-preload
samsonasik Jun 7, 2022
a1c7ca2
Merge pull request #6080 from kenjis/fix-get_cookie-ignores-ConfigCookie
kenjis Jun 7, 2022
4559b31
fix: remove $this->cookiePrefix because Session cookie ignores it
kenjis Jun 7, 2022
b1e0dc3
Fix decorators
lonnieezell Jun 7, 2022
f86119a
Strict is_array check
lonnieezell Jun 7, 2022
558f97b
fix: Cookie class option prefix bug
kenjis Jun 7, 2022
026ac22
fix: session cookie name has cookie config prefix
kenjis Jun 7, 2022
2b8acc5
docs: fix typo
kenjis Jun 7, 2022
1e5ae8d
Merge pull request #6084 from pjsde/apply-translate-uri-dashes
MGatner Jun 7, 2022
6cab49d
Merge pull request #6092 from kenjis/fix-cli_controllers.rst
kenjis Jun 7, 2022
f48f749
Fix MIME guessing of extension from type
paulbalandan Jun 1, 2022
6ae194b
Remove renumerate script in file list to lint
paulbalandan Jun 7, 2022
29272af
Remove useless catch
paulbalandan Jun 7, 2022
a04ba62
chore: update workflow for 4.3 branch
kenjis Jun 7, 2022
9d87a76
Merge pull request #6083 from kenjis/fix-docs-cookie
kenjis Jun 7, 2022
b63104b
Merge pull request #6091 from kenjis/fix-session-cooike-name-bug
kenjis Jun 7, 2022
eadd095
Restore old ViewDecoratorTrait
lonnieezell Jun 8, 2022
f457aff
fix: spark routes shows "ERROR: 404"
kenjis Jun 8, 2022
a81c9fb
Merge pull request #6094 from paulbalandan/renumerate-remove
paulbalandan Jun 8, 2022
199c813
Merge pull request #6096 from kenjis/fix-github-workflow-for-4.3
kenjis Jun 8, 2022
0fb288a
Merge pull request #6081 from kenjis/fix-Session-ignores-ConfigCookie
kenjis Jun 8, 2022
5de6cf5
style: compile sass
kenjis Jun 8, 2022
31bd101
Merge pull request #6090 from codeigniter4/decorator-fix
MGatner Jun 8, 2022
1398b13
Merge pull request #6095 from paulbalandan/useless-catch
MGatner Jun 8, 2022
22924e8
Merge pull request #6099 from kenjis/update-sass-css
paulbalandan Jun 8, 2022
4174a86
chore(deps-dev): update predis/predis requirement from ^1.1 to ^2.0
dependabot[bot] Jun 8, 2022
359c26c
docs: add highlights for v4.2.0
kenjis Jun 9, 2022
1cf8a18
Fix too short title underline
paulbalandan Jun 9, 2022
d7aa1b4
docs: add New Contributors
kenjis Jun 9, 2022
2cb259e
Merge pull request #6059 from paulbalandan/mime-guessing
kenjis Jun 9, 2022
c1dceda
Update predis to v2.0 in framework
paulbalandan Jun 9, 2022
f191dfd
chore(deps-dev): update rector/rector requirement from 0.13.4 to 0.13.5
dependabot[bot] Jun 9, 2022
a4fbe4b
re-run rector on rector 0.13.5
samsonasik Jun 9, 2022
b82d6db
Merge pull request #6103 from codeigniter4/dependabot/composer/rector…
samsonasik Jun 9, 2022
a185960
fix: reverse routing does not work with full classname starting with `\`
kenjis Jun 10, 2022
b2df4f7
test: split big TestCase class
kenjis Jun 10, 2022
0720d83
fix: get_cookie() may not use cookie prefix
kenjis Jun 6, 2022
e23f940
test: fix $_COOKIE value
kenjis Jun 6, 2022
a09683d
docs: fix doc comment
kenjis Jun 8, 2022
4d3e4c2
docs: add documentation
kenjis Jun 10, 2022
5d79a98
Merge pull request #6101 from kenjis/fix-docs-420-highlights
samsonasik Jun 10, 2022
8aa14d7
docs: update branch model
kenjis Jun 10, 2022
f379849
docs: remove spaces at the end of line
kenjis Jun 10, 2022
f6cb047
docs: update command example style
kenjis Jun 10, 2022
f33f68f
chore: update PULL_REQUEST_TEMPLATE.md
kenjis Jun 10, 2022
d2cc6a3
fix: insert error message
kenjis Jun 10, 2022
5eb41d6
Merge pull request #6104 from kenjis/fix-RouteCollection-namespace-bug
kenjis Jun 11, 2022
189e378
docs: fix by proofreading
kenjis Jun 11, 2022
850d59a
docs: fix by proofreading
kenjis Jun 11, 2022
0015abd
docs: add language identifier `console` to code blocks
kenjis Jun 11, 2022
ef400de
Merge pull request #6108 from kenjis/fix-QB-insert-error-message
kenjis Jun 11, 2022
4188311
test: fix lost error message when after testInsertResultFail.
ytetsuro Jun 12, 2022
b1da2b6
style: fix style.
ytetsuro Jun 12, 2022
998727d
Merge pull request #6106 from kenjis/fix-docs-pull_request.md
kenjis Jun 12, 2022
6bdbe10
Merge pull request #6098 from kenjis/fix-spark-routes-bug
kenjis Jun 12, 2022
b8486c2
Use both predis v1.1 and v2.0
paulbalandan Jun 12, 2022
5f0233f
Merge pull request #6113 from ytetsuro/patch-4
kenjis Jun 13, 2022
05f4768
test: add disableDBDebug() and enableDBDebug()
kenjis Jun 13, 2022
a6d7572
test: refactor to use disableDBDebug() and enableDBDebug()
kenjis Jun 13, 2022
9e1de18
test: add missing $this->enableDBDebug()
kenjis Jun 13, 2022
d20d021
test: add empty lines or so
kenjis Jun 13, 2022
3e373b5
test: fix missing email (not null column)
kenjis Jun 13, 2022
2c84b3c
Merge branch 'develop' into dependabot/composer/predis/predis-tw-2.0
paulbalandan Jun 13, 2022
8e89736
Merge pull request #6100 from codeigniter4/dependabot/composer/predis…
MGatner Jun 13, 2022
623f778
fix: migrate --all causes `Class "SQLite3" not found` error
kenjis Jun 13, 2022
8f0a2ad
docs: add note about $setUpMethods
kenjis Jun 13, 2022
fce1561
docs: remove $setUpMethods and $tearDownMethods
kenjis Jun 14, 2022
91075b0
docs: improve explanation on setUp/tearDown
kenjis Jun 14, 2022
609e41f
docs: add Warning
kenjis Jun 14, 2022
63fa376
docs: fix syntax error in files.rst
kenjis Jun 14, 2022
e4414c8
Merge pull request #6119 from kenjis/fix-docs-files.rst
kenjis Jun 14, 2022
7f7e7cf
fix: Time::setTestNow() does not work with fa Locale
kenjis Jun 13, 2022
15cd4ca
fix: Time::humanize() causes error with ar locale
kenjis Jun 14, 2022
dfa4c3a
docs: fix title level
kenjis Jun 14, 2022
cdf2977
docs: add links, explanations
kenjis Jun 14, 2022
731cf02
docs: remove "you would commonly use for datetime columns in a database"
kenjis Jun 14, 2022
5701bb8
docs: add output in locale fa
kenjis Jun 14, 2022
17fd4ea
docs: add method name examples
kenjis Jun 14, 2022
2f8d368
Merge pull request #6118 from kenjis/fix-docs-testing/overview.rst
kenjis Jun 14, 2022
8e5360c
Merge pull request #6116 from kenjis/fix-Time-setTestNow-bug
kenjis Jun 14, 2022
3587358
Merge pull request #6121 from kenjis/fix-docs-time.rst
kenjis Jun 14, 2022
c4901f4
Merge pull request #6117 from kenjis/fix-migration-all-sqlite3-error
kenjis Jun 14, 2022
89223f7
Merge pull request #6115 from kenjis/fix-DBDebug-false-tests
kenjis Jun 15, 2022
a19128b
fix: trigger DBQuery is not fired when query error and DBDebug is true
kenjis Jun 15, 2022
0d8f818
docs: fix DBQuery explanation
kenjis Jun 15, 2022
1fda6d4
docs: fix title underline
kenjis Jun 15, 2022
05c6b49
docs: fix config file path
kenjis Jun 15, 2022
6699530
Merge pull request #6128 from kenjis/fix-docs-database-events
kenjis Jun 15, 2022
ea5b283
Merge pull request #6127 from kenjis/fix-trigger-DBQuery-on-failed-query
kenjis Jun 15, 2022
3519efd
docs: update about mainly Changelog
kenjis Jun 15, 2022
48a07b5
Merge pull request #6120 from kenjis/fix-Time-humanize
kenjis Jun 15, 2022
1f837bb
docs: fix PHPDoc
kenjis Jun 15, 2022
ed22aa5
Revert "Merge pull request #5653 from kenjis/refactor-CLI-Incomming-R…
kenjis Jun 16, 2022
d060c86
Merge pull request #6131 from kenjis/fix-phpdoc-CodeIgniter.php
kenjis Jun 16, 2022
3be408f
Merge pull request #6130 from kenjis/fix-pull_request.md-Changelog
kenjis Jun 16, 2022
a25b93a
tangix Jun 16, 2022
6be86cf
Update user_guide_src/source/models/model.rst
tangix Jun 16, 2022
4f69eb6
Merge pull request #6134 from tangix/update-model-docs
paulbalandan Jun 16, 2022
70281b5
Merge pull request #6082 from kenjis/fix-get_cookie-prefix
kenjis Jun 16, 2022
de8d057
Prep for 4.2.1 release
MGatner Jun 16, 2022
380fb88
Merge pull request #6135 from codeigniter4/release-4.2.1
MGatner Jun 16, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Each pull request should address a single issue and have a meaningful title.

- 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"__

**Description**
Explain what you have changed, and why.

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-deptrac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
branches:
- 'develop'
- 'v4.*'
- '4.*'
paths:
- 'app/**.php'
- 'system/**.php'
Expand All @@ -16,7 +16,7 @@ on:
push:
branches:
- 'develop'
- 'v4.*'
- '4.*'
paths:
- 'app/**.php'
- 'system/**.php'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-phpcpd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
branches:
- 'develop'
- 'v4.*'
- '4.*'
paths:
- 'app/**.php'
- 'public/**.php'
Expand All @@ -16,7 +16,7 @@ on:
push:
branches:
- 'develop'
- 'v4.*'
- '4.*'
paths:
- 'app/**.php'
- 'public/**.php'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
branches:
- 'develop'
- 'v4.*'
- '4.*'
paths:
- 'app/**.php'
- 'system/**.php'
Expand All @@ -18,7 +18,7 @@ on:
push:
branches:
- 'develop'
- 'v4.*'
- '4.*'
paths:
- 'app/**.php'
- 'system/**.php'
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- develop
- '4.*'
paths:
- 'app/**.php'
- 'system/**.php'
Expand All @@ -16,7 +17,7 @@ on:
pull_request:
branches:
- develop
- 'v4.*'
- '4.*'
paths:
- 'app/**.php'
- 'system/**.php'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
branches:
- 'develop'
- 'v4.*'
- '4.*'
paths:
- 'app/**.php'
- 'system/**.php'
Expand All @@ -18,7 +18,7 @@ on:
push:
branches:
- 'develop'
- 'v4.*'
- '4.*'
paths:
- 'app/**.php'
- 'system/**.php'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-scss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
branches:
- 'develop'
- 'v4.x'
- '4.*'
paths:
- '**.scss'
- '**.css'
Expand All @@ -13,7 +13,7 @@ on:
push:
branches:
- 'develop'
- 'v4.x'
- '4.*'
paths:
- '**.scss'
- '**.css'
Expand Down
1 change: 0 additions & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
__DIR__ . '/.php-cs-fixer.user-guide.php',
__DIR__ . '/rector.php',
__DIR__ . '/spark',
__DIR__ . '/user_guide_src/renumerate.php',
]);

$overrides = [];
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Changelog

## [v4.2.1](https://github.com/codeigniter4/CodeIgniter4/tree/v4.2.1) (2022-06-16)
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.2.0...v4.2.1)

### Breaking Changes
* Fix MIME guessing of extension from type by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/6059
* fix: get_cookie() may not use the cookie prefix by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6082

### Fixed Bugs
* fix: get_cookie() does not take Config\Cookie::$prefix by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6080
* fix: session cookie name bug by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6091
* fix: Session Handlers do not take Config\Cookie by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6081
* fix: reverse routing does not work with full classname starting with `\` by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6104
* fix: insert error message in QueryBuilder by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6108
* fix: `spark routes` shows "ERROR: 404" by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6098
* fix: Time::setTestNow() does not work with fa Locale by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6116
* fix: `migrate --all` causes `Class "SQLite3" not found` error by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6117
* fix: event DBQuery is not fired on failed query when DBDebug is true by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6127
* fix: `Time::humanize()` causes error with ar locale by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6120
* Fix decorators by @lonnieezell in https://github.com/codeigniter4/CodeIgniter4/pull/6090
* Fix lost error message by test when after testInsertResultFail. by @ytetsuro in https://github.com/codeigniter4/CodeIgniter4/pull/6113
* test: fix forgetting to restore DBDebug value by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6115

### Refactoring
* Apply AutoRouterImproved::translateURIDashes() by @pjsde in https://github.com/codeigniter4/CodeIgniter4/pull/6084
* Remove useless catch by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/6095
* Move preload.php example to starter app by @samsonasik in https://github.com/codeigniter4/CodeIgniter4/pull/6088
* style: compile sass by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/6099

## [v4.2.0](https://github.com/codeigniter4/CodeIgniter4/tree/v4.2.0) (2022-06-03)
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.1.9...v4.2.0)

Expand Down
8 changes: 4 additions & 4 deletions admin/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ composer test && composer info codeigniter4/framework
* Description: "CodeIgniter 4.x.x User Guide"
* Watch for the "github pages" Environment to make sure the deployment succeeds

## Website
### Website

Currently the User Guide on the website has to be updated manually. Visit Jim's user home
where the served directory **codeigniter.com** exists. Copy the latest **docs** folder from
the User Guide repo to **public/userguide4** and browse to the website to make sure it works.
The User Guide website should update itself via the deploy GitHub Action. Should this fail
the server must be updated manually. See repo and hosting details in the deploy script
at the User Guide repo.

## Announcement

Expand Down
2 changes: 1 addition & 1 deletion admin/framework/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"mikey179/vfsstream": "^1.6",
"nexusphp/cs-config": "^3.3",
"phpunit/phpunit": "^9.1",
"predis/predis": "^1.1"
"predis/predis": "^1.1 || ^2.0"
},
"suggest": {
"ext-fileinfo": "Improves mime type detection for files"
Expand Down
7 changes: 3 additions & 4 deletions preload.php → admin/starter/preload.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,14 @@ function str_contains(string $haystack, string $needle): bool
}
}

class Preload
class preload
{
/**
* @var array Paths to preload.
*/
private array $paths = [
[
'include' => // __DIR__ . '/vendor/codeigniter4/framework/system',
__DIR__ . '/system',
'include' => __DIR__ . '/vendor/codeigniter4/framework/system',
'exclude' => [
// Not needed if you don't use them.
'/system/Database/OCI8/',
Expand Down Expand Up @@ -110,4 +109,4 @@ public function load()
}
}

(new Preload())->load();
(new preload())->load();
19 changes: 8 additions & 11 deletions app/Config/Mimes.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ class Mimes
],
'pptx' => [
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
'application/x-zip',
'application/zip',
],
'wbxml' => 'application/wbxml',
'wmlc' => 'application/wmlc',
Expand Down Expand Up @@ -512,20 +510,19 @@ public static function guessExtensionFromType(string $type, ?string $proposedExt

$proposedExtension = trim(strtolower($proposedExtension ?? ''));

if ($proposedExtension !== '') {
if (array_key_exists($proposedExtension, static::$mimes) && in_array($type, is_string(static::$mimes[$proposedExtension]) ? [static::$mimes[$proposedExtension]] : static::$mimes[$proposedExtension], true)) {
// The detected mime type matches with the proposed extension.
return $proposedExtension;
}

// An extension was proposed, but the media type does not match the mime type list.
return null;
if (
$proposedExtension !== ''
&& array_key_exists($proposedExtension, static::$mimes)
&& in_array($type, (array) static::$mimes[$proposedExtension], true)
) {
// The detected mime type matches with the proposed extension.
return $proposedExtension;
}

// Reverse check the mime type list if no extension was proposed.
// This search is order sensitive!
foreach (static::$mimes as $ext => $types) {
if ((is_string($types) && $types === $type) || (is_array($types) && in_array($type, $types, true))) {
if (in_array($type, (array) $types, true)) {
return $ext;
}
}
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"nexusphp/tachycardia": "^1.0",
"phpstan/phpstan": "^1.7.1",
"phpunit/phpunit": "^9.1",
"predis/predis": "^1.1",
"rector/rector": "0.13.3"
"predis/predis": "^1.1 || ^2.0",
"rector/rector": "0.13.5"
},
"suggest": {
"ext-fileinfo": "Improves mime type detection for files"
Expand Down
Loading