Skip to content

Commit

Permalink
Merge pull request #9083 from codeigniter4/develop
Browse files Browse the repository at this point in the history
4.5.4 Ready code
  • Loading branch information
kenjis authored Jul 27, 2024
2 parents 9b27444 + dd03593 commit 9f6196d
Show file tree
Hide file tree
Showing 89 changed files with 773 additions and 463 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ CONTRIBUTING.md export-ignore

# contributor/development files
tests/ export-ignore
tools/ export-ignore
utils/ export-ignore
.php-cs-fixer.dist.php export-ignore
.php-cs-fixer.no-header.php export-ignore
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-phpunit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ jobs:
mssql:
image: mcr.microsoft.com/mssql/server:2022-latest
env:
SA_PASSWORD: 1Secure*Password1
MSSQL_SA_PASSWORD: 1Secure*Password1
ACCEPT_EULA: Y
MSSQL_PID: Developer
ports:
- 1433:1433
options: >-
--health-cmd="/opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U sa -P 1Secure*Password1 -Q 'SELECT @@VERSION'"
--health-cmd="/opt/mssql-tools18/bin/sqlcmd -C -S 127.0.0.1 -U sa -P 1Secure*Password1 -Q 'SELECT @@VERSION'"
--health-interval=10s
--health-timeout=5s
--health-retries=3
Expand Down
13 changes: 2 additions & 11 deletions .github/workflows/test-coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,5 @@ jobs:
- name: Install dependencies
run: composer update --ansi --no-interaction

- name: Run lint on `app/`, `admin/`, `public/`
run: vendor/bin/php-cs-fixer fix --verbose --ansi --dry-run --config=.php-cs-fixer.no-header.php --using-cache=no --diff

- name: Run lint on `system/`, `utils/`, and root PHP files
run: vendor/bin/php-cs-fixer fix --verbose --ansi --dry-run --using-cache=no --diff

- name: Run lint on `tests`
run: vendor/bin/php-cs-fixer fix --verbose --ansi --dry-run --config=.php-cs-fixer.tests.php --using-cache=no --diff

- name: Run lint on `user_guide_src/source/`
run: vendor/bin/php-cs-fixer fix --verbose --ansi --dry-run --config=.php-cs-fixer.user-guide.php --using-cache=no --diff
- name: Run lint
run: composer cs
2 changes: 1 addition & 1 deletion .github/workflows/test-phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ jobs:
run: composer update --ansi --no-interaction

- name: Run static analysis
run: vendor/bin/phpstan analyse
run: composer phpstan:check
4 changes: 2 additions & 2 deletions .github/workflows/test-psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
build:
name: Psalm Analysis
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
if: (! contains(github.event.head_commit.message, '[ci skip]'))

steps:
- name: Checkout
Expand Down Expand Up @@ -68,4 +68,4 @@ jobs:
fi
- name: Run Psalm analysis
run: vendor/bin/psalm
run: utils/vendor/bin/psalm
11 changes: 2 additions & 9 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
'ThirdParty',
'Validation/Views',
])
->notPath([
])
->notName('#Foobar.php$#')
->append([
__FILE__,
Expand All @@ -41,17 +39,12 @@
__DIR__ . '/spark',
]);

$overrides = [
// for updating to coding-standard
'modernize_strpos' => true,
'ordered_attributes' => ['order' => [], 'sort_algorithm' => 'alpha'],
'php_unit_attributes' => true,
];
$overrides = [];

$options = [
'cacheFile' => 'build/.php-cs-fixer.cache',
'finder' => $finder,
'customFixers' => FixerGenerator::create('vendor/nexusphp/cs-config/src/Fixer', 'Nexus\\CsConfig\\Fixer'),
'customFixers' => FixerGenerator::create('utils/vendor/nexusphp/cs-config/src/Fixer', 'Nexus\\CsConfig\\Fixer'),
'customRules' => [
NoCodeSeparatorCommentFixer::name() => true,
],
Expand Down
27 changes: 9 additions & 18 deletions .php-cs-fixer.no-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
* 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\ConfigInterface;
use PhpCsFixer\Finder;

/** @var ConfigInterface $config */
$config = require __DIR__ . '/.php-cs-fixer.dist.php';

$finder = Finder::create()
->files()
->in([
Expand All @@ -30,19 +30,10 @@
]);

$overrides = [
// for updating to coding-standard
'modernize_strpos' => true,
'ordered_attributes' => ['order' => [], 'sort_algorithm' => 'alpha'],
'php_unit_attributes' => true,
];

$options = [
'cacheFile' => 'build/.php-cs-fixer.no-header.cache',
'finder' => $finder,
'customFixers' => FixerGenerator::create('vendor/nexusphp/cs-config/src/Fixer', 'Nexus\\CsConfig\\Fixer'),
'customRules' => [
NoCodeSeparatorCommentFixer::name() => true,
],
'header_comment' => false,
];

return Factory::create(new CodeIgniter4(), $overrides, $options)->forProjects();
return $config
->setFinder($finder)
->setCacheFile('build/.php-cs-fixer.no-header.cache')
->setRules(array_merge($config->getRules(), $overrides));
36 changes: 9 additions & 27 deletions .php-cs-fixer.tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,29 @@
* 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\ConfigInterface;
use PhpCsFixer\Finder;

/** @var ConfigInterface $config */
$config = require __DIR__ . '/.php-cs-fixer.dist.php';

$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([
]);
->notName('#Foobar.php$#');

$overrides = [
'void_return' => true,
// for updating to coding-standard
'modernize_strpos' => true,
'ordered_attributes' => ['order' => [], 'sort_algorithm' => 'alpha'],
'php_unit_attributes' => true,
];

$options = [
'cacheFile' => 'build/.php-cs-fixer.tests.cache',
'finder' => $finder,
'customFixers' => FixerGenerator::create('vendor/nexusphp/cs-config/src/Fixer', 'Nexus\\CsConfig\\Fixer'),
'customRules' => [
NoCodeSeparatorCommentFixer::name() => true,
],
];

return Factory::create(new CodeIgniter4(), $overrides, $options)->forLibrary(
'CodeIgniter 4 framework',
'CodeIgniter Foundation',
'[email protected]'
);
return $config
->setFinder($finder)
->setCacheFile('build/.php-cs-fixer.tests.cache')
->setRules(array_merge($config->getRules(), $overrides));
27 changes: 9 additions & 18 deletions .php-cs-fixer.user-guide.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
* 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\ConfigInterface;
use PhpCsFixer\Finder;

/** @var ConfigInterface $config */
$config = require __DIR__ . '/.php-cs-fixer.dist.php';

$finder = Finder::create()
->files()
->in([
Expand All @@ -32,26 +32,17 @@

$overrides = [
'echo_tag_syntax' => false,
'header_comment' => false,
'php_unit_internal_class' => false,
'no_unused_imports' => false,
'class_attributes_separation' => false,
'fully_qualified_strict_types' => [
'import_symbols' => false,
'leading_backslash_in_global_namespace' => true,
],
// for updating to coding-standard
'modernize_strpos' => true,
'ordered_attributes' => ['order' => [], 'sort_algorithm' => 'alpha'],
'php_unit_attributes' => true,
];

$options = [
'cacheFile' => 'build/.php-cs-fixer.user-guide.cache',
'finder' => $finder,
'customFixers' => FixerGenerator::create('vendor/nexusphp/cs-config/src/Fixer', 'Nexus\\CsConfig\\Fixer'),
'customRules' => [
NoCodeSeparatorCommentFixer::name() => true,
],
];

return Factory::create(new CodeIgniter4(), $overrides, $options)->forProjects();
return $config
->setFinder($finder)
->setCacheFile('build/.php-cs-fixer.user-guide.cache')
->setRules(array_merge($config->getRules(), $overrides));
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Changelog

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

### Fixed Bugs

* fix: [OCI8] Easy Connect string validation by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/9006
* fix: [QueryBuilder] select() with RawSql may cause TypeError by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/9009
* fix: [QueryBuilder] `select()` does not escape after `NULL` by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/9010
* fix: allow string as parameter to CURLRequest version by @tangix in https://github.com/codeigniter4/CodeIgniter4/pull/9021
* fix: `spark phpini:check` may cause TypeError by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/9026
* fix: Prevent invalid session handlers by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9036
* fix: DebugBar CSS for daisyUI by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/9046
* docs: `referrer` is undefined by @totoprayogo1916 in https://github.com/codeigniter4/CodeIgniter4/pull/9059
* fix: filters passed to the ``$routes->group()`` are not merged into the filters passed to the inner routes by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/9064

### Refactoring

* refactor: use first class callable on function call by @samsonasik in https://github.com/codeigniter4/CodeIgniter4/pull/9004
* refactor: enable AddClosureVoidReturnTypeWhereNoReturnRector to add void return on closure by @samsonasik in https://github.com/codeigniter4/CodeIgniter4/pull/9008
* refactor: enable AddFunctionVoidReturnTypeWhereNoReturnRector to add void to functions by @samsonasik in https://github.com/codeigniter4/CodeIgniter4/pull/9014
* refactor: Enable phpunit 10 attribute Rector rules by @samsonasik in https://github.com/codeigniter4/CodeIgniter4/pull/9015
* refactor: fix `Throttler::check()` $tokens by @paulbalandan in https://github.com/codeigniter4/CodeIgniter4/pull/9067

## [v4.5.3](https://github.com/codeigniter4/CodeIgniter4/tree/v4.5.3) (2024-06-25)
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.5.2...v4.5.3)

Expand Down
35 changes: 20 additions & 15 deletions admin/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,22 @@
>
> -MGatner, kenjis
## Merge `develop` branch into next minor version branch `4.x`
## Notation

- `4.x.x`: The new release version. (e.g., `4.5.3`)
- `4.y`: The next minor version. (e.g., `4.6`)
- `4.z`: The next next minor version. (e.g., `4.7`)

## Merge `develop` branch into next minor version branch `4.y`

Before starting release process, if there are commits in `develop` branch that
are not merged into `4.x` branch, merge them. This is because if conflicts occur,
are not merged into `4.y` branch, merge them. This is because if conflicts occur,
merging will take time.

```console
git fetch upstream
git switch 4.x
git merge upstream/4.x
git switch 4.y
git merge upstream/4.y
git merge upstream/develop
git push upstream HEAD
```
Expand All @@ -24,11 +30,10 @@ git push upstream HEAD

If you release a new minor version.

* [ ] Create PR to merge `4.x` into `develop` and merge it
* [ ] Create PR to merge `4.y` into `develop` and merge it
* [ ] 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
* [ ] Delete the merged `4.y` branch (This closes all PRs to the branch)

## Changelog

Expand Down Expand Up @@ -90,8 +95,8 @@ Work off direct clones of the repos so the release branches persist for a time.
* [ ] 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
* [ ] Update **user_guide_src/source/installation/upgrade_{ver}.rst**
* [ ] fill in the "All Changes" section, and add it to **upgrading.rst**
* [ ] Update **user_guide_src/source/installation/upgrade_4xx.rst**
* [ ] fill in the "All Changes" section, and add it to **upgrade_4xx.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
Expand Down Expand Up @@ -137,7 +142,7 @@ Work off direct clones of the repos so the release branches persist for a time.
## New Contributors
*

**Full Changelog**: https://github.com/codeigniter4/CodeIgniter4/compare/v4.x.x...v4.x.x
**Full Changelog**: https://github.com/codeigniter4/CodeIgniter4/compare/v4.x.w...v4.x.x
```
Click the "Generate release notes" button, and get the "New Contributors".
* [ ] Watch for the "Deploy Distributable Repos" action to make sure **framework**,
Expand All @@ -164,19 +169,19 @@ Work off direct clones of the repos so the release branches persist for a time.
git merge origin/master
git push origin HEAD
```
* [ ] Update the next minor version branch `4.x`:
* [ ] Update the next minor version branch `4.y`:
```console
git fetch origin
git checkout 4.x
git merge origin/4.x
git checkout 4.y
git merge origin/4.y
git merge origin/develop
git push origin HEAD
```
* [ ] [Minor version only] Create the new next minor version branch `4.x`:
* [ ] [Minor version only] Create the new next minor version branch `4.z`:
```console
git fetch origin
git switch develop
git switch -c 4.x
git switch -c 4.z
git push origin HEAD
```
* [ ] Request CVEs and Publish any Security Advisories that were resolved from private forks
Expand Down
5 changes: 5 additions & 0 deletions admin/css/debug-toolbar/toolbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
}

h2 {
font-weight: bold;
font-size: $base-size;
margin: 0;
padding: 5px 0 10px 0;
Expand Down Expand Up @@ -292,6 +293,8 @@

// The tabs container
.tab {
height: fit-content;
text-align: left;
bottom: 35px;
display: none;
left: 0;
Expand All @@ -306,6 +309,8 @@

// The "Timeline" tab
.timeline {
position: static;
display: table;
margin-left: 0;
width: 100%;

Expand Down
Loading

0 comments on commit 9f6196d

Please sign in to comment.