Skip to content

Commit

Permalink
Merge pull request #8783 from codeigniter4/develop
Browse files Browse the repository at this point in the history
4.5.1 Ready code
  • Loading branch information
kenjis authored Apr 14, 2024
2 parents c4a89e1 + 2b77a0b commit 432d724
Show file tree
Hide file tree
Showing 106 changed files with 1,161 additions and 2,565 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ writable/uploads/*
!writable/uploads/index.html

writable/debugbar/*
!writable/debugbar/.gitkeep
!writable/debugbar/index.html

writable/**/*.db
writable/**/*.sqlite
Expand Down Expand Up @@ -125,7 +125,5 @@ nb-configuration.xml

/results/
/phpunit*.xml
/.phpunit.*.cache
/.phpunit.cache

/.php-cs-fixer.php
5 changes: 1 addition & 4 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
->files()
->in([
__DIR__ . '/system',
__DIR__ . '/tests',
__DIR__ . '/utils',
])
->exclude([
Expand All @@ -30,14 +29,12 @@
'Validation/Views',
])
->notPath([
'_support/View/Cells/multiplier.php',
'_support/View/Cells/colors.php',
'_support/View/Cells/addition.php',
])
->notName('#Foobar.php$#')
->append([
__FILE__,
__DIR__ . '/.php-cs-fixer.no-header.php',
__DIR__ . '/.php-cs-fixer.tests.php',
__DIR__ . '/.php-cs-fixer.user-guide.php',
__DIR__ . '/rector.php',
__DIR__ . '/spark',
Expand Down
57 changes: 57 additions & 0 deletions .php-cs-fixer.tests.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php

declare(strict_types=1);

/**
* This file is part of CodeIgniter 4 framework.
*
* (c) CodeIgniter Foundation <[email protected]>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

use CodeIgniter\CodingStandard\CodeIgniter4;
use Nexus\CsConfig\Factory;
use Nexus\CsConfig\Fixer\Comment\NoCodeSeparatorCommentFixer;
use Nexus\CsConfig\FixerGenerator;
use PhpCsFixer\Finder;

$finder = Finder::create()
->files()
->in([
__DIR__ . '/tests',
])
->exclude([
])
->notPath([
'_support/View/Cells/multiplier.php',
'_support/View/Cells/colors.php',
'_support/View/Cells/addition.php',
])
->notName('#Foobar.php$#')
->append([
]);

$overrides = [
'void_return' => true,
];

$options = [
'cacheFile' => 'build/.php-cs-fixer.tests.cache',
'finder' => $finder,
];

$config = Factory::create(new CodeIgniter4(), $overrides, $options)->forLibrary(
'CodeIgniter 4 framework',
'CodeIgniter Foundation',
'[email protected]'
);

$config
->registerCustomFixers(FixerGenerator::create('vendor/nexusphp/cs-config/src/Fixer', 'Nexus\\CsConfig\\Fixer'))
->setRules(array_merge($config->getRules(), [
NoCodeSeparatorCommentFixer::name() => true,
]));

return $config;
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Changelog

## [v4.5.1](https://github.com/codeigniter4/CodeIgniter4/tree/v4.5.1) (2024-04-14)
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.5.0...v4.5.1)

### Fixed Bugs

* fix: TypeError in form() by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8736
* fix: [DebugBar] TypeError in Toolbar by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8727
* fix: TypeError when Time is passed to Model by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8738
* docs: added Config\Feature::$oldFilterOrder to app/Config/Feature.php… by @mullernato in https://github.com/codeigniter4/CodeIgniter4/pull/8749
* fix: Factories::get() cannot get defined classes by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8744
* fix: `BaseConnection::escape()` does not accept Stringable by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8756
* fix: [CURLRequest] `getHeaderLine('Content-Type')` causes InvalidArgumentException by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8760
* fix: [CURLRequest] construct param $config is not used by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8761
* fix: [FileLocator] Cannot declare class XXX, because the name is already in use by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8745
* fix: [DebugBar] Toolbar display may be broken by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8772
* fix: Cannot declare class CodeIgniter\Config\Services, because the name is already in use by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8776
* docs: fix Postgre DSN sample by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8774

### Refactoring

* test: refactor Config/Registrar.php by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8731
* test: add return void by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8746
* refactor: system/CLI/BaseCommand.php by @mcsaygili in https://github.com/codeigniter4/CodeIgniter4/pull/8741
* refactor: system/View/Plugins.php by @mcsaygili in https://github.com/codeigniter4/CodeIgniter4/pull/8742
* refactor: fix method name `ValidationErrors` in View\Plugins by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8758
* refactor: system/Debug/Toolbar/Collectors/Routes.php by @mcsaygili in https://github.com/codeigniter4/CodeIgniter4/pull/8751
* refactor: improve error message in BaseExceptionHandler by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8766
* refactor: FabricatorModel by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/8770

## [v4.5.0](https://github.com/codeigniter4/CodeIgniter4/tree/v4.5.0) (2024-04-07)
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.4.8...v4.5.0)

Expand Down
17 changes: 9 additions & 8 deletions admin/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> Documentation guide based on the releases of `4.0.5` and `4.1.0` on January 31, 2021.
>
> Updated for `4.4.3` on October 27, 2023.
> Updated for `4.5.0` on April 7, 2024.
>
> -MGatner, kenjis
Expand All @@ -25,10 +25,10 @@ git push upstream HEAD
If you release a new minor version.

* [ ] Create PR to merge `4.x` into `develop` and merge it
* [ ] Rename the current minor version (e.g., `4.4`) in Setting > Branches >
"Branch protection rules" to the next minor version. E.g. `4.4``4.5`
* [ ] Rename the current minor version (e.g., `4.5`) in Setting > Branches >
"Branch protection rules" to the next minor version. E.g. `4.5``4.6`
* [ ] Delete the merged `4.x` branch (This closes all PRs to the branch)
* [ ] Do the regular release process. Go to the next "Changelog" section
* Do the regular release process. Go to the next "Changelog" section

## Changelog

Expand Down Expand Up @@ -91,10 +91,11 @@ Work off direct clones of the repos so the release branches persist for a time.
* [ ] Update **user_guide_src/source/changelogs/v4.x.x.rst**
* Remove the section titles that have no items
* [ ] Update **user_guide_src/source/installation/upgrade_{ver}.rst**
* fill in the "All Changes" section, and add it to **upgrading.rst**
* git diff --name-status origin/master -- . ':!system'
* Remove the section titles that have no items
* [Minor version only] Update the "from" version in the title. E.g., `from 4.3.x``from 4.3.8`
* [ ] fill in the "All Changes" section, and add it to **upgrading.rst**
* git diff --name-status origin/master -- . ':!system' ':!tests' ':!user_guide_src'
* Note: `tests/` is not used for distribution repos. See `admin/starter/tests/`
* [ ] Remove the section titles that have no items
* [ ] [Minor version only] Update the "from" version in the title. E.g., `from 4.3.x``from 4.3.8`
* [ ] Run `php admin/prepare-release.php 4.x.x` and push to origin
* The above command does the following:
* Create a new branch `release-4.x.x`
Expand Down
4 changes: 3 additions & 1 deletion admin/create-new-changelog.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ function replace_file_content(string $path, string $pattern, string $replace): v
$isMinorUpdate = ($minorCurrent !== $minor);

// Creates a branch for release.
system('git switch develop');
if (! $isMinorUpdate) {
system('git switch develop');
}
system('git switch -c docs-changelog-' . $version);
system('git switch docs-changelog-' . $version);

Expand Down
1 change: 1 addition & 0 deletions admin/css/debug-toolbar/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See [contributing/css.md](../../../contributing/css.md).
6 changes: 4 additions & 2 deletions admin/css/debug-toolbar/toolbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
width: 36px;

// Spacing
margin: 0px;
padding: 0px;
margin: 0;
padding: 0;

// Content
clear: both;
Expand Down Expand Up @@ -85,6 +85,8 @@
display: flex;
font-weight: normal;
margin: 0 0 0 auto;
padding: 0;
font-family: $base-font;

svg {
width: 16px;
Expand Down
2 changes: 0 additions & 2 deletions admin/framework/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,3 @@ nb-configuration.xml

/results/
/phpunit*.xml
/.phpunit.*.cache

107 changes: 61 additions & 46 deletions admin/framework/phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,48 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="system/Test/bootstrap.php" backupGlobals="false" colors="true" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache">
<coverage includeUncoveredFiles="true">
<report>
<clover outputFile="build/logs/clover.xml"/>
<html outputDirectory="build/logs/html"/>
<php outputFile="build/logs/coverage.serialized"/>
<text outputFile="php://stdout" showUncoveredFiles="false"/>
</report>
</coverage>
<testsuites>
<testsuite name="App">
<directory>./tests</directory>
</testsuite>
</testsuites>
<logging>
<testdoxHtml outputFile="build/logs/testdox.html"/>
<testdoxText outputFile="build/logs/testdox.txt"/>
<junit outputFile="build/logs/logfile.xml"/>
</logging>
<php>
<server name="app.baseURL" value="http://example.com/"/>
<!-- Directory containing phpunit.xml -->
<const name="HOMEPATH" value="./"/>
<!-- Directory containing the Paths config file -->
<const name="CONFIGPATH" value="./app/Config/"/>
<!-- Directory containing the front controller (index.php) -->
<const name="PUBLICPATH" value="./public/"/>
<!-- Database configuration -->
<!-- Uncomment to provide your own database for testing
<env name="database.tests.hostname" value="localhost"/>
<env name="database.tests.database" value="tests"/>
<env name="database.tests.username" value="tests_user"/>
<env name="database.tests.password" value=""/>
<env name="database.tests.DBDriver" value="MySQLi"/>
<env name="database.tests.DBPrefix" value="tests_"/>
-->
</php>
<source>
<include>
<directory suffix=".php">./app</directory>
</include>
<exclude>
<directory suffix=".php">./app/Views</directory>
<file>./app/Config/Routes.php</file>
</exclude>
</source>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
bootstrap="system/Test/bootstrap.php"
backupGlobals="false"
beStrictAboutOutputDuringTests="true"
colors="true"
columns="max"
failOnRisky="true"
failOnWarning="true"
cacheDirectory="build/.phpunit.cache">
<coverage
includeUncoveredFiles="true"
pathCoverage="false"
ignoreDeprecatedCodeUnits="true"
disableCodeCoverageIgnore="true">
<report>
<clover outputFile="build/logs/clover.xml"/>
<html outputDirectory="build/logs/html"/>
<php outputFile="build/logs/coverage.serialized"/>
<text outputFile="php://stdout" showUncoveredFiles="false"/>
</report>
</coverage>
<testsuites>
<testsuite name="App">
<directory>./tests</directory>
</testsuite>
</testsuites>
<logging>
<testdoxHtml outputFile="build/logs/testdox.html"/>
<testdoxText outputFile="build/logs/testdox.txt"/>
<junit outputFile="build/logs/logfile.xml"/>
</logging>
<source>
<include>
<directory suffix=".php">./app</directory>
</include>
<exclude>
<directory suffix=".php">./app/Views</directory>
<file>./app/Config/Routes.php</file>
</exclude>
</source>
<php>
<server name="app.baseURL" value="http://example.com/"/>
<server name="CODEIGNITER_SCREAM_DEPRECATIONS" value="0"/>
<!-- Directory containing phpunit.xml -->
<const name="HOMEPATH" value="./"/>
<!-- Directory containing the Paths config file -->
<const name="CONFIGPATH" value="./app/Config/"/>
<!-- Directory containing the front controller (index.php) -->
<const name="PUBLICPATH" value="./public/"/>
<!-- Database configuration -->
<!-- Uncomment to provide your own database for testing
<env name="database.tests.hostname" value="localhost"/>
<env name="database.tests.database" value="tests"/>
<env name="database.tests.username" value="tests_user"/>
<env name="database.tests.password" value=""/>
<env name="database.tests.DBDriver" value="MySQLi"/>
<env name="database.tests.DBPrefix" value="tests_"/>
-->
</php>
</phpunit>
2 changes: 0 additions & 2 deletions admin/starter/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,3 @@ nb-configuration.xml

/results/
/phpunit*.xml
/.phpunit.*.cache

Loading

0 comments on commit 432d724

Please sign in to comment.