Skip to content

Commit

Permalink
Merge pull request #9345 from codeigniter4/develop
Browse files Browse the repository at this point in the history
4.5.6 Ready code
  • Loading branch information
paulbalandan authored Dec 28, 2024
2 parents b0b7ecb + ebb5bd7 commit 51cdd7d
Show file tree
Hide file tree
Showing 364 changed files with 17,335 additions and 20,048 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/deploy-distributables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,15 @@ jobs:
token: ${{ secrets.ACCESS_TOKEN }}
path: userguide

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Sphinx
run: |
sudo apt install python3-sphinx
sudo pip3 install sphinxcontrib-phpdomain
sudo pip3 install sphinx_rtd_theme
python -m pip install --upgrade pip
pip install -r ./source/user_guide_src/requirements.txt
- name: Chmod
run: chmod +x ./source/.github/scripts/deploy-userguide
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/deploy-userguide-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,20 @@ jobs:
php-version: '8.1'
coverage: none

# Build the latest User Guide
- name: Build with Sphinx
uses: ammaraskar/[email protected]
- name: Setup Python
uses: actions/setup-python@v5
with:
docs-folder: user_guide_src/
python-version: '3.12'

- name: Install Sphinx
run: |
python -m pip install --upgrade pip
pip install -r user_guide_src/requirements.txt
# Build the latest User Guide
- name: Build Docs with Sphinx
run: make html
working-directory: user_guide_src

- name: Add "Edit this page" links
run: |
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/reusable-coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ jobs:
runs-on: ubuntu-22.04

steps:
- name: Checkout base branch for PR
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}

- name: Checkout
uses: actions/checkout@v4

Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/reusable-phpunit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
steps:
- name: Create database for MSSQL Server
if: ${{ inputs.db-platform == 'SQLSRV' }}
run: sqlcmd -S 127.0.0.1 -U sa -P 1Secure*Password1 -Q "CREATE DATABASE test"
run: sqlcmd -S 127.0.0.1 -U sa -P 1Secure*Password1 -Q "CREATE DATABASE test COLLATE Latin1_General_100_CS_AS_SC_UTF8"

- name: Install latest ImageMagick
if: ${{ contains(inputs.extra-extensions, 'imagick') }}
Expand All @@ -148,6 +148,12 @@ jobs:
sudo apt-get install -y gsfonts libmagickwand-dev imagemagick
sudo apt-get install --fix-broken
- name: Checkout base branch for PR
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}

- name: Checkout
uses: actions/checkout@v4

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/reusable-serviceless-phpunit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ jobs:
sudo apt-get install -y imagemagick
sudo apt-get install --fix-broken
- name: Checkout base branch for PR
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}

- name: Checkout
uses: actions/checkout@v4

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test-autoreview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ jobs:
name: Check normalized composer.json
runs-on: ubuntu-latest
steps:
- name: Checkout base branch for PR
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}

- name: Checkout
uses: actions/checkout@v4

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test-coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ jobs:
- '8.3'

steps:
- name: Checkout base branch for PR
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}

- name: Checkout
uses: actions/checkout@v4

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test-deptrac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ jobs:
name: Architectural Inspection
runs-on: ubuntu-22.04
steps:
- name: Checkout base branch for PR
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}

- name: Checkout
uses: actions/checkout@v4

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test-phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ jobs:
strategy:
fail-fast: false
steps:
- name: Checkout base branch for PR
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}

- name: Checkout
uses: actions/checkout@v4

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test-psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ jobs:
if: (! contains(github.event.head_commit.message, '[ci skip]'))

steps:
- name: Checkout base branch for PR
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}

- name: Checkout
uses: actions/checkout@v4

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test-rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ jobs:
matrix:
php-versions: ['8.1', '8.3']
steps:
- name: Checkout base branch for PR
if: github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}

- name: Checkout
uses: actions/checkout@v4

Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/test-userguide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,19 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Sphinx
run: |
python -m pip install --upgrade pip
pip install -r user_guide_src/requirements.txt
- name: Detect usage of tabs in RST files
run: php utils/check_tabs_in_rst.php

- uses: ammaraskar/[email protected]
with:
docs-folder: user_guide_src
build-command: 'make html SPHINXOPTS="-W --keep-going -w /tmp/sphinx-log"'
- name: Build Docs with Sphinx
run: make html SPHINXOPTS="-W --keep-going -w /tmp/sphinx-log"
working-directory: user_guide_src
1 change: 1 addition & 0 deletions .php-cs-fixer.tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
'_support/View/Cells/multiplier.php',
'_support/View/Cells/colors.php',
'_support/View/Cells/addition.php',
'system/Database/Live/PreparedQueryTest.php',
])
->notName('#Foobar.php$#');

Expand Down
57 changes: 57 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,62 @@
# Changelog

## [v4.5.6](https://github.com/codeigniter4/CodeIgniter4/tree/v4.5.6) (2024-12-28)
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.5.5...v4.5.6)

### Fixed Bugs

* fix: auto_link() converts invalid strings like `://codeigniter.com` by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/9180
* fix: change session start log level by @element-code in https://github.com/codeigniter4/CodeIgniter4/pull/9221
* fix: `getValidated()` when validation multiple asterisk by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/9220
* fix: Parser - Equal key name replace conflict by @CosDiabos in https://github.com/codeigniter4/CodeIgniter4/pull/9246
* fix: case-insensitivity in the `like()` method when in use with accented characters by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9238
* fix: TypeError for routes when translateURIDashes is enabled by @maniaba in https://github.com/codeigniter4/CodeIgniter4/pull/9209
* fix: `fetchGlobal()` with numeric key by @neznaika0 in https://github.com/codeigniter4/CodeIgniter4/pull/9251
* fix: curl request crashes with params that give an int once hexed. by @ping-yee in https://github.com/codeigniter4/CodeIgniter4/pull/9198
* docs: allow boolean values in the model for PHPStan by @ping-yee in https://github.com/codeigniter4/CodeIgniter4/pull/9276
* fix: respect complex language strings when using validation by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9201
* fix: `DownloadResponse` cache headers by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9237
* docs: fix `@param` `ResponseInterface::setJSON()` also accepts objects by @JulianAtkins in https://github.com/codeigniter4/CodeIgniter4/pull/9287
* fix: [CURLRequest] body contains "HTTP/1.0 200 Connection established" by @ping-yee in https://github.com/codeigniter4/CodeIgniter4/pull/9285
* fix: `Postgre\Connection::reconnect()` `TypeError` in `pg_ping()` by @ping-yee in https://github.com/codeigniter4/CodeIgniter4/pull/9279
* fix: primary key mapping in the model for the entity by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9307
* fix: check if defined `WRITEPATH` exists by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9317
* fix: handling binary data for prepared statement by @michalsn in https://github.com/codeigniter4/CodeIgniter4/pull/9337

### Refactoring

* refactor: enable TypedPropertyFromAssignsRector by @samsonasik in https://github.com/codeigniter4/CodeIgniter4/pull/9184
* refactor: enable ClosureReturnTypeRector by @samsonasik in https://github.com/codeigniter4/CodeIgniter4/pull/9187
* refactor: remove unnecessary `is_countable()` check in `getMethodParams()` by @datamweb in https://github.com/codeigniter4/CodeIgniter4/pull/9206
* refactor: add more readonly property definitions on AutoRouteCollector and SiteURI by @samsonasik in https://github.com/codeigniter4/CodeIgniter4/pull/9210
* refactor: starter key handling in SodiumHandler by @datamweb in https://github.com/codeigniter4/CodeIgniter4/pull/9207
* refactor: enable rector code quality level 14 by @samsonasik in https://github.com/codeigniter4/CodeIgniter4/pull/9232
* refactor: cleanup `DatabaseHandler::gc()` for session by @grimpirate in https://github.com/codeigniter4/CodeIgniter4/pull/9230
* refactor: enable rector code quality level 15 by @samsonasik in https://github.com/codeigniter4/CodeIgniter4/pull/9243
* refactor: enable SimplifyBoolIdenticalTrueRector by @samsonasik in https://github.com/codeigniter4/CodeIgniter4/pull/9244
* refactor: enable FlipTypeControlToUseExclusiveTypeRector by @samsonasik in https://github.com/codeigniter4/CodeIgniter4/pull/9253
* refactor: flip assert and actual value position on tests by @samsonasik in https://github.com/codeigniter4/CodeIgniter4/pull/9260
* perf: Improve call as `service()` by @neznaika0 in https://github.com/codeigniter4/CodeIgniter4/pull/9248
* refactor: use compare empty array on Forge on keys property by @samsonasik in https://github.com/codeigniter4/CodeIgniter4/pull/9267
* refactor: Fix `phpstan` errors related to `Autoloader` by @neznaika0 in https://github.com/codeigniter4/CodeIgniter4/pull/9249
* refactor: use `Superglobals` in setting 'REQUEST_METHOD' in `FeatureT… by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9294
* refactor: use `baseURI` instead of `base_uri` by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9296
* refactor: Apply code quality level 31 for rector by @samsonasik in https://github.com/codeigniter4/CodeIgniter4/pull/9303
* refactor: rename `stdclass` to `stdClass` by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9312
* refactor: fix `phpDoc.parseError` errors by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9313
* refactor: fix `method.nameCase` errors by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9315
* refactor: rename `controller` to `Controller` by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9314
* refactor: fix implicit array creation by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9316
* refactor: follow up implicit variable array by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/9319
* refactor: split phpstan-baseline into smaller files by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9299
* refactor: upgrade to use phpstan 2 and rector 2 by @samsonasik in https://github.com/codeigniter4/CodeIgniter4/pull/9322
* refactor: fix `Forge::processIndexes()` for empty `$this->fields` by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9330
* refactor: `Reflection*::setAccessible()` is now no-op in PHP 8.1 by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9331
* refactor: add `@throws RedirectException` in `Controller::initController` by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9327
* refactor: fix warning on new static usage by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9342
* refactor: fix used void return type by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9341
* refactor: enable instanceof and strictBooleans rector set by @samsonasik in https://github.com/codeigniter4/CodeIgniter4/pull/9339

## [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)

Expand Down
48 changes: 26 additions & 22 deletions admin/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
- `4.y`: The next minor version. (e.g., `4.6`)
- `4.z`: The next next minor version. (e.g., `4.7`)

> [!NOTE]
> Copy this file, and replace the versions above with the actual versions.
## Merge `develop` branch into next minor version branch `4.y`

Before starting release process, if there are commits in `develop` branch that
Expand All @@ -35,6 +38,26 @@ If you release a new minor version.
"Branch protection rules" to the next minor version. E.g. `4.5``4.6`
* [ ] Delete the merged `4.y` branch (This closes all PRs to the branch)

## Preparation

Work off direct clones of the repos so the release branches persist for a time.

* [ ] Clone both **codeigniter4/CodeIgniter4** and **codeigniter4/userguide** and
resolve any necessary PRs
```console
rm -rf CodeIgniter4.bk userguide.bk
mv CodeIgniter4 CodeIgniter4.bk
mv userguide userguide.bk
git clone [email protected]:codeigniter4/CodeIgniter4.git
git clone [email protected]:codeigniter4/userguide.git
```
* [ ] Vet the **admin/** folders for any removed hidden files (Action deploy scripts
*do not remove these*)
```console
cd CodeIgniter4
git diff --name-status origin/master admin/
```

## Changelog

When generating the changelog each Pull Request to be included must have one of
Expand Down Expand Up @@ -65,33 +88,14 @@ the changelog.
Copy the resulting content into **CHANGELOG.md** and adjust the format to match
the existing content.

## Preparation

Work off direct clones of the repos so the release branches persist for a time.

* [ ] Clone both **codeigniter4/CodeIgniter4** and **codeigniter4/userguide** and
resolve any necessary PRs
```console
rm -rf CodeIgniter4.bk userguide.bk
mv CodeIgniter4 CodeIgniter4.bk
mv userguide userguide.bk
git clone [email protected]:codeigniter4/CodeIgniter4.git
git clone [email protected]:codeigniter4/userguide.git
```
* [ ] Vet the **admin/** folders for any removed hidden files (Action deploy scripts
*do not remove these*)
```console
cd CodeIgniter4
git diff --name-status origin/master admin/
```
* [ ] Merge any Security Advisory PRs in private forks

## Process

> **Note** Most changes that need noting in the User Guide and docs should have
> [!NOTE]
> Most changes that need noting in the User Guide and docs should have
> been included with their PR, so this process assumes you will not be
> generating much new content.
* [ ] Merge any Security Advisory PRs in private forks
* [ ] Replace **CHANGELOG.md** with the new version generated above
* [ ] Update **user_guide_src/source/changelogs/v4.x.x.rst**
* Remove the section titles that have no items
Expand Down
3 changes: 1 addition & 2 deletions admin/starter/tests/session/ExampleSessionTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

use CodeIgniter\Test\CIUnitTestCase;
use Config\Services;

/**
* @internal
Expand All @@ -10,7 +9,7 @@ final class ExampleSessionTest extends CIUnitTestCase
{
public function testSessionSimple(): void
{
$session = Services::session();
$session = service('session');

$session->set('logged_in', 123);
$this->assertSame(123, $session->get('logged_in'));
Expand Down
3 changes: 1 addition & 2 deletions admin/starter/tests/unit/HealthTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use CodeIgniter\Test\CIUnitTestCase;
use Config\App;
use Config\Services;
use Tests\Support\Libraries\ConfigReader;

/**
Expand All @@ -17,7 +16,7 @@ public function testIsDefinedAppPath(): void

public function testBaseUrlHasBeenSet(): void
{
$validation = Services::validation();
$validation = service('validation');

$env = false;

Expand Down
4 changes: 2 additions & 2 deletions app/Config/Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
*/
if (CI_DEBUG && ! is_cli()) {
Events::on('DBQuery', 'CodeIgniter\Debug\Toolbar\Collectors\Database::collect');
Services::toolbar()->respond();
service('toolbar')->respond();
// Hot Reload route - for framework use on the hot reloader.
if (ENVIRONMENT === 'development') {
Services::routes()->get('__hot-reload', static function (): void {
service('routes')->get('__hot-reload', static function (): void {
(new HotReloader())->run();
});
}
Expand Down
2 changes: 1 addition & 1 deletion app/Config/Format.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ class Format extends BaseConfig
*/
public function getFormatter(string $mime)
{
return Services::format()->getFormatter($mime);
return service('format')->getFormatter($mime);
}
}
Loading

0 comments on commit 51cdd7d

Please sign in to comment.