Skip to content
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

4.5.5 Ready code #9174

Merged
merged 148 commits into from
Sep 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
6fced22
docs: add changelog and upgrade for v4.5.5
kenjis Jul 27, 2024
24d3c5f
Merge pull request #9084 from kenjis/docs-changelog-4.5.5
kenjis Jul 28, 2024
ab87a9c
Update phpunit to `^10.5.16 || ^11.2`
paulbalandan Jul 26, 2024
e33e6f2
Fix phpunit errors
paulbalandan Jul 26, 2024
9c99605
Merge pull request #9080 from paulbalandan/update-to-phpunit-11
paulbalandan Jul 28, 2024
bc05562
docs: update outdated descriptions
kenjis Jul 29, 2024
78ed34b
docs: capitalize first letter
kenjis Jul 29, 2024
f5a2654
docs: update phpstan command with composer scripts
kenjis Jul 29, 2024
33dd691
docs: improve Upgrade Models sample code
kenjis Jul 29, 2024
c53bde5
docs: fix code
kenjis Jul 30, 2024
0aafa5c
chore: use codeigniter4/.github/.github/ for phpcpd
datamweb Jul 30, 2024
8f46c88
fix: add --exclude SQLSRV/Forge.php
datamweb Jul 30, 2024
18ba6f2
Merge pull request #9086 from kenjis/update-contributing
kenjis Jul 30, 2024
25ae312
refactor: code readability
datamweb Jul 31, 2024
7369828
refactor: use `>-` for readability
datamweb Jul 31, 2024
4909cfe
fix: remove empty space
datamweb Jul 31, 2024
f9d77a2
Merge pull request #9090 from datamweb/use-org-github-action
kenjis Jul 31, 2024
2f8139c
docs: add links to sections
kenjis Jul 31, 2024
ceb26a5
docs: add empty line for readability
kenjis Jul 31, 2024
a2dffb3
docs: improve sample code
kenjis Jul 31, 2024
1d3336b
Merge pull request #9087 from kenjis/docs-upgrade-model
kenjis Aug 1, 2024
ac225bb
docs: add step to update Composer packages
kenjis Aug 1, 2024
712dcb0
docs: add warning for In-Model Validation
kenjis Aug 2, 2024
9e90c2e
docs: add link to "Saving Sets of Validation Rules to the Config File"
kenjis Aug 2, 2024
7938cf3
docs: add in-page links
kenjis Aug 2, 2024
0630332
docs: add link to list of validation rules
kenjis Aug 2, 2024
223f286
test: refactor test code with DataProvider
kenjis Aug 2, 2024
d40b3e7
refactor: reduce_multiples()
kenjis Aug 2, 2024
0c4c656
test: add test cases
kenjis Aug 2, 2024
892cbac
docs: fix incorrect default value and sample code for reduce_multiples()
kenjis Aug 2, 2024
caeb828
docs: decorate text
kenjis Aug 2, 2024
d30c061
docs: remove uneeded 2nd param in sample code
kenjis Aug 2, 2024
0be3116
test: add @return
kenjis Aug 2, 2024
c1687fa
refactor: remove unneeded ()
kenjis Aug 2, 2024
82dbd91
Merge pull request #9099 from kenjis/refactor-reduce_multiples
kenjis Aug 2, 2024
ae63cb4
docs: fix @return type
kenjis Aug 2, 2024
26da98d
docs: update PHPDocs
kenjis Aug 2, 2024
80e9d3f
docs: describe how to remove `report-uri`
kenjis Aug 2, 2024
5ba2b78
test: add test to remove report-uri
kenjis Aug 2, 2024
fe3f489
Merge pull request #9093 from kenjis/docs-curlrequest.rst
kenjis Aug 2, 2024
078d4c1
Merge pull request #9094 from kenjis/update-workflow.md
kenjis Aug 2, 2024
ed1dfda
Merge pull request #9097 from kenjis/docs-model-validation
kenjis Aug 2, 2024
6617533
Merge pull request #9098 from kenjis/phpdoc-BaseModel
kenjis Aug 2, 2024
2b3b8ed
Merge pull request #9100 from kenjis/docs-ContentSecurityPolicy
kenjis Aug 2, 2024
3143cf3
test: add property types
kenjis Aug 2, 2024
c408acf
test: add tests for validateData() with custom error messages
kenjis Aug 3, 2024
ab82f41
test: add tests for differs and matches
kenjis Aug 3, 2024
156e45b
fix: rule `differs` and `matches` with dot array
kenjis Aug 3, 2024
72c92e0
test: add @var for PHPStan
kenjis Aug 3, 2024
0e96b3c
Merge pull request #9102 from kenjis/test-controller-validateData
kenjis Aug 6, 2024
5a340d0
Merge pull request #9103 from kenjis/fix-validation-differs-matches
kenjis Aug 6, 2024
dda004a
test: fix incorrect property name $_original
kenjis Aug 7, 2024
87ed495
test: add type definitions
kenjis Aug 7, 2024
f81c295
docs: update @var type
kenjis Aug 7, 2024
820aaec
chore: update phpstan-baseline
kenjis Aug 7, 2024
5f31845
docs: improve description
kenjis Aug 8, 2024
ace1963
docs: improve description for "Locale Detection"
kenjis Aug 8, 2024
d87be95
docs: move paragraph to better place
kenjis Aug 8, 2024
b1d56ec
docs: fix typo in lang filename
kenjis Aug 8, 2024
2d786f8
docs: improve sub section title
kenjis Aug 8, 2024
a6e862e
docs: add "Overriding System Message Translations"
kenjis Aug 8, 2024
7e2ea39
docs: add note for dots in lang keys
kenjis Aug 9, 2024
8319a3c
test: add tests for lang keys with dots
kenjis Aug 9, 2024
f08c4ae
docs: make description more detailed
kenjis Aug 9, 2024
6e9158f
docs: add @var for better DX
kenjis Aug 9, 2024
4f2de95
test: refactor to fix PHPStan errors
kenjis Aug 9, 2024
208cd08
fix: update preload.php
kenjis Aug 9, 2024
3cb3839
docs: add about missing Language locale
kenjis Aug 10, 2024
2835cc4
docs: remove unneeded <?php in sample code
kenjis Aug 10, 2024
ed35c36
docs: update PHPDoc comments
kenjis Aug 10, 2024
a325d2e
docs: add @var for better DX
kenjis Aug 10, 2024
5f02439
docs: replace deprecated failValidationError()
kenjis Aug 10, 2024
cb152ad
docs: add () after method names
kenjis Aug 10, 2024
c6a96d6
update 057.php
warcooft Aug 10, 2024
a5c7f77
Merge pull request #9107 from kenjis/fix-EntityTest
kenjis Aug 11, 2024
c1aad11
Merge pull request #9114 from kenjis/docs-replace-failValidationError
kenjis Aug 11, 2024
3806ff5
Merge pull request #9113 from kenjis/docs-CSRF-filter
kenjis Aug 11, 2024
f60d277
Merge pull request #9115 from warcooft/docs-model
kenjis Aug 11, 2024
62c8f3b
chore(deps-dev): update rector/rector requirement from 1.2.2 to 1.2.3
dependabot[bot] Aug 13, 2024
a151d6a
Merge pull request #9119 from codeigniter4/dependabot/composer/rector…
samsonasik Aug 13, 2024
3e06557
Merge pull request #9109 from kenjis/docs-localization.rst
kenjis Aug 16, 2024
f2e560f
Merge pull request #9111 from kenjis/update-preload.php
kenjis Aug 16, 2024
861df58
docs: make description more precise
kenjis Aug 17, 2024
a969827
docs: add Retrieving the Controller and Method Names
datamweb Aug 17, 2024
d8953ad
docs: add e.g. for Retrieving the Controller and Method Names
datamweb Aug 17, 2024
4259b47
style: run cs-fix for happy code style
datamweb Aug 17, 2024
dea8829
refactor: use recommended code for service
datamweb Aug 18, 2024
2861340
fix: use Router in text
datamweb Aug 18, 2024
b9a327d
docs: update for easier to read
datamweb Aug 19, 2024
919f0df
docs: add new Getting Routing Information & Accessing Active Filters …
datamweb Aug 19, 2024
962aecd
style: run composer cs-fix
datamweb Aug 19, 2024
febe5a4
docs: apply suggestions from code review
datamweb Aug 20, 2024
0093929
docs: fix UG style
datamweb Aug 20, 2024
92337f2
Merge pull request #9127 from kenjis/docs-model-afterUpdate-id
kenjis Aug 22, 2024
655bd1d
Merge pull request #9129 from datamweb/docs-add-Retrieving-Controller…
kenjis Aug 22, 2024
dbff203
test: add test for numeric field name
kenjis Aug 22, 2024
99f41ee
fix: TypeError when there is numeric field name
kenjis Aug 22, 2024
2979ece
docs: make @var more precise
kenjis Aug 22, 2024
96ae584
docs: update psr/log to 3.0.1
kenjis Aug 23, 2024
fe00974
chore(deps-dev): update rector/rector requirement from 1.2.3 to 1.2.4
dependabot[bot] Aug 23, 2024
597579a
Merge pull request #9147 from codeigniter4/dependabot/composer/rector…
samsonasik Aug 24, 2024
6eaaa60
chore: workaround for php-cs-fixer 3.63
kenjis Aug 27, 2024
8772496
Merge pull request #9152 from kenjis/temp-fix-for-php-cs-fixer-3.63
kenjis Aug 27, 2024
e3324e7
docs: fix doc comment
kenjis Aug 27, 2024
219010e
Merge pull request #9143 from kenjis/update-psr-log-3.0.1
kenjis Aug 27, 2024
679ba59
docs: make comments more precise
kenjis Aug 27, 2024
90513e3
docs: Change tags to elements and fix some typos helpers/html_helper.rst
obozdag Aug 27, 2024
6bd60da
Fix decleration to declaration in helpers/html_helper.rst
obozdag Aug 27, 2024
366f7d7
docs: Fix element names in helpes/html_helper.rst
obozdag Aug 27, 2024
82584a6
Merge pull request #9142 from kenjis/fix-validation-numeric-field-name
kenjis Aug 27, 2024
2800673
Merge pull request #9153 from obozdag/patch-18
kenjis Aug 27, 2024
982f995
chore: fix link
kenjis Aug 27, 2024
2f78165
Merge pull request #9155 from kenjis/fix-label-add-conflict-all-pr.yml
samsonasik Aug 28, 2024
87eb71c
refactor: enable AddMethodCallBasedStrictParamTypeRector
samsonasik Aug 28, 2024
68d2fed
Merge pull request #9156 from samsonasik/refactor-enable-add-method-c…
samsonasik Aug 28, 2024
87acaf7
docs: update comment
kenjis Aug 28, 2024
694b031
fix: remove uneeded if condition
kenjis Aug 28, 2024
9e97a0c
refactor: break long lines
kenjis Aug 28, 2024
d12af0a
chore: update php-cs-fixer to ^3.63.2
kenjis Aug 29, 2024
83d1bd9
Merge pull request #9159 from kenjis/update-cs-fixert-to-3.63
kenjis Aug 29, 2024
77f5e47
Merge pull request #9151 from kenjis/fix-comment-Router.php
kenjis Aug 30, 2024
c326cd1
Merge pull request #9157 from kenjis/refactor-BaseBuilder
kenjis Aug 30, 2024
59aca8e
feat: add function to check PHP DB extension
kenjis Aug 30, 2024
a9925c7
fix: pass through custom drivers
kenjis Aug 30, 2024
496ef23
docs: Fix some typos in helpers/html_helper.rst
obozdag Sep 2, 2024
31b4508
docs: Fix some function definitions in helpers/html_helper.rst
obozdag Sep 2, 2024
de35cf4
docs: Fix track function definition in helpers/html_helper.rst
obozdag Sep 2, 2024
ffd1b68
Merge pull request #9160 from kenjis/check-db-ext
kenjis Sep 5, 2024
31abe0b
docs: add missing @param
kenjis Sep 5, 2024
1daaa57
docs: fix typos
kenjis Sep 5, 2024
06958be
Fix typo in BaseConnection.php
ThomasMeschke Sep 5, 2024
fe6efed
docs: Update $config['indexPage'] in helpers/html_helper.rst
obozdag Sep 5, 2024
4cbe5ec
Merge pull request #9170 from ThomasMeschke/develop
kenjis Sep 6, 2024
0deb909
Merge pull request #9168 from kenjis/add-phpdoc-html_helper
kenjis Sep 6, 2024
39c2898
Merge pull request #9161 from obozdag/patch-19
kenjis Sep 6, 2024
3d310cf
test: add tests for auto_link()
kenjis Sep 5, 2024
d7da0b8
fix: auto_link() regexp
kenjis Sep 5, 2024
fdba502
docs: add changelog
kenjis Sep 6, 2024
9ac45a1
Update validation.rst
eightrix Sep 6, 2024
e81e8e7
docs: Fix track function src param definition in helpers/html_helper.rst
obozdag Sep 6, 2024
008f2a9
Merge pull request #9172 from eightrix/patch-1
kenjis Sep 6, 2024
1e868d0
docs: Fix param function definition in helpers/html_helper.rst
obozdag Sep 6, 2024
8e09849
docs: Fix source function definition in helpers/html_helper.rst
obozdag Sep 6, 2024
f8e36d9
Merge pull request #9164 from obozdag/patch-22
kenjis Sep 6, 2024
ae0dcf4
Merge pull request #9163 from obozdag/patch-21
kenjis Sep 6, 2024
0e283be
Merge pull request #9169 from kenjis/fix-auto-link-regexp
kenjis Sep 6, 2024
f3de4d8
Prep for 4.5.5 release
kenjis Sep 6, 2024
ae63c75
Merge pull request #9173 from kenjis/release-4.5.5
kenjis Sep 7, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/label-add-conflict-all-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ jobs:
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#pushing-your-branch)"
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
54 changes: 17 additions & 37 deletions .github/workflows/test-phpcpd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
- 'public/**.php'
- 'system/**.php'
- '.github/workflows/test-phpcpd.yml'

push:
branches:
- 'develop'
Expand All @@ -23,40 +22,21 @@ on:
- 'system/**.php'
- '.github/workflows/test-phpcpd.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build:
name: Duplicate Code Detection
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: phpcpd
extensions: dom, mbstring

- name: Detect code duplication
run: phpcpd
--exclude system/Test
--exclude system/ThirdParty
--exclude system/Database/SQLSRV/Builder.php
--exclude system/Database/SQLSRV/Forge.php
--exclude system/Database/MySQLi/Builder.php
--exclude system/Database/OCI8/Builder.php
--exclude system/Database/Postgre/Builder.php
--exclude system/Debug/Exceptions.php
--exclude system/HTTP/SiteURI.php
--exclude system/Validation/Rules.php
--exclude system/Autoloader/Autoloader.php
--exclude system/Config/Filters.php
-- app/ public/ system/
phpcpd:
uses: codeigniter4/.github/.github/workflows/phpcpd.yml@main
with:
dirs: "app/ public/ system/"
options: >-
--exclude system/Test
--exclude system/ThirdParty
--exclude system/Database/SQLSRV/Builder.php
--exclude system/Database/SQLSRV/Forge.php
--exclude system/Database/MySQLi/Builder.php
--exclude system/Database/OCI8/Builder.php
--exclude system/Database/Postgre/Builder.php
--exclude system/Debug/Exceptions.php
--exclude system/HTTP/SiteURI.php
--exclude system/Validation/Rules.php
--exclude system/Autoloader/Autoloader.php
--exclude system/Config/Filters.php
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
# Changelog

## [v4.5.4](https://github.com/codeigniter4/CodeIgniter4/tree/v4.5.3) (2024-07-27)
## [v4.5.5](https://github.com/codeigniter4/CodeIgniter4/tree/v4.5.5) (2024-09-07)
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.5.4...v4.5.5)

### Fixed Bugs

* fix: Validation rule `differs`/`matches` with dot array by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/9103
* fix: update preload.php by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/9111
* fix: [Validation] TypeError when using numeric field names by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/9142
* fix: `auto_link()` regexp by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/9169

### Refactoring

* refactor: reduce_multiples() and fix user guide by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/9099
* refactor: enable AddMethodCallBasedStrictParamTypeRector by @samsonasik in https://github.com/codeigniter4/CodeIgniter4/pull/9156
* refactor: BaseBuilder by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/9157
* refactor: improve error message for missing PHP DB extensions by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/9160
* refactor: fix typo in BaseConnection.php by @ThomasMeschke in https://github.com/codeigniter4/CodeIgniter4/pull/9170

## [v4.5.4](https://github.com/codeigniter4/CodeIgniter4/tree/v4.5.4) (2024-07-27)
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.5.3...v4.5.4)

### Fixed Bugs
Expand Down
2 changes: 1 addition & 1 deletion admin/framework/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"kint-php/kint": "^5.0.4",
"mikey179/vfsstream": "^1.6",
"nexusphp/cs-config": "^3.6",
"phpunit/phpunit": "^10.5.16",
"phpunit/phpunit": "^10.5.16 || ^11.2",
"predis/predis": "^1.1 || ^2.0"
},
"suggest": {
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan": "^1.11",
"phpstan/phpstan-strict-rules": "^1.6",
"phpunit/phpcov": "^9.0.2",
"phpunit/phpunit": "^10.5.16",
"phpunit/phpcov": "^9.0.2 || ^10.0",
"phpunit/phpunit": "^10.5.16 || ^11.2",
"predis/predis": "^1.1 || ^2.0",
"rector/rector": "1.2.2"
"rector/rector": "1.2.4"
},
"replace": {
"codeigniter4/framework": "self.version"
Expand Down
13 changes: 6 additions & 7 deletions contributing/internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ projects outside of CodeIgniter. Basically, this means that any
dependencies should be kept to a minimum. Any dependencies must be able
to be passed into the constructor. If you do need to use one of the
other core packages, you can create that in the constructor using the
`Services` class, as long as you provide a way for dependencies to
`service()` function, as long as you provide a way for dependencies to
override that:

```php
public function __construct(?Foo $foo = null)
{
$this->foo = $foo ?? \Config\Services::foo();
$this->foo = $foo ?? service('foo');
}
```

## Type declarations
## Type Declarations

PHP7 provides [Type declarations](https://www.php.net/manual/en/language.types.declarations.php)
for method parameters and return types. Use it where possible. Return type
Expand Down Expand Up @@ -112,10 +112,9 @@ should generally match the package name.

## Autoloader

All files within the package should be added to
**system/Config/AutoloadConfig.php**, in the "classmap" property. This
is only used for core framework files, and helps to minimize file system
scans and keep performance high.
All source files within the **system/ThirdParty** should be added to
**system/Config/AutoloadConfig.php**, in the `$coreClassmap` property. This
is only used for loading the third party packages without Composer.

## Command-Line Support

Expand Down
4 changes: 2 additions & 2 deletions contributing/pull_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ PHPStan is expected to scan the entire framework by running this command in your
terminal:

```console
vendor/bin/phpstan analyse
composer phpstan:check
```

See also:
Expand All @@ -272,7 +272,7 @@ false positive and should be ignored, the baseline can be updated with the follo
command:

```console
vendor/bin/phpstan analyze --generate-baseline phpstan-baseline.php
composer phpstan:baseline
```

#### Rector
Expand Down
7 changes: 7 additions & 0 deletions contributing/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,13 @@ You might get conflicts when you rebase. It is your
responsibility to resolve those locally, so that you can continue
collaborating with the shared repository.

Occasionally, the Composer packages for development may be updated. Run the
following command to use the latest packages:

```console
composer update
```

And finally push your local branch to your GitHub repository:

```console
Expand Down
2 changes: 1 addition & 1 deletion phpdoc.dist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<output>api/build/</output>
<cache>api/cache/</cache>
</paths>
<version number="4.5.4">
<version number="4.5.5">
<api format="php">
<source dsn=".">
<path>system</path>
Expand Down
Loading
Loading