Skip to content

Commit

Permalink
Merge pull request #9174 from codeigniter4/develop
Browse files Browse the repository at this point in the history
4.5.5 Ready code
  • Loading branch information
kenjis authored Sep 7, 2024
2 parents 9f6196d + ae63c75 commit b0b7ecb
Show file tree
Hide file tree
Showing 95 changed files with 959 additions and 810 deletions.
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

0 comments on commit b0b7ecb

Please sign in to comment.