diff --git a/.gitattributes b/.gitattributes
index c41e331ff63c..3f67f2e35167 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -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
diff --git a/.github/workflows/reusable-phpunit-test.yml b/.github/workflows/reusable-phpunit-test.yml
index 4943d3f3ac2c..84ade1d08862 100644
--- a/.github/workflows/reusable-phpunit-test.yml
+++ b/.github/workflows/reusable-phpunit-test.yml
@@ -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
diff --git a/.github/workflows/test-coding-standards.yml b/.github/workflows/test-coding-standards.yml
index 7e5f18820288..f30475a76dba 100644
--- a/.github/workflows/test-coding-standards.yml
+++ b/.github/workflows/test-coding-standards.yml
@@ -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
diff --git a/.github/workflows/test-phpstan.yml b/.github/workflows/test-phpstan.yml
index 360b403ac923..aca331f30481 100644
--- a/.github/workflows/test-phpstan.yml
+++ b/.github/workflows/test-phpstan.yml
@@ -85,4 +85,4 @@ jobs:
run: composer update --ansi --no-interaction
- name: Run static analysis
- run: vendor/bin/phpstan analyse
+ run: composer phpstan:check
diff --git a/.github/workflows/test-psalm.yml b/.github/workflows/test-psalm.yml
index a623109fbb15..b1f5891a46d9 100644
--- a/.github/workflows/test-psalm.yml
+++ b/.github/workflows/test-psalm.yml
@@ -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
@@ -68,4 +68,4 @@ jobs:
fi
- name: Run Psalm analysis
- run: vendor/bin/psalm
+ run: utils/vendor/bin/psalm
diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php
index 4ce5e25fbc1d..a50b126db075 100644
--- a/.php-cs-fixer.dist.php
+++ b/.php-cs-fixer.dist.php
@@ -28,8 +28,6 @@
'ThirdParty',
'Validation/Views',
])
- ->notPath([
- ])
->notName('#Foobar.php$#')
->append([
__FILE__,
@@ -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,
],
diff --git a/.php-cs-fixer.no-header.php b/.php-cs-fixer.no-header.php
index e7d9647e317e..f3bc97dc78ac 100644
--- a/.php-cs-fixer.no-header.php
+++ b/.php-cs-fixer.no-header.php
@@ -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([
@@ -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));
diff --git a/.php-cs-fixer.tests.php b/.php-cs-fixer.tests.php
index 1b4bfd71e30d..28a7124909e5 100644
--- a/.php-cs-fixer.tests.php
+++ b/.php-cs-fixer.tests.php
@@ -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',
- 'admin@codeigniter.com'
-);
+return $config
+ ->setFinder($finder)
+ ->setCacheFile('build/.php-cs-fixer.tests.cache')
+ ->setRules(array_merge($config->getRules(), $overrides));
diff --git a/.php-cs-fixer.user-guide.php b/.php-cs-fixer.user-guide.php
index 3be7cd45c708..6b925ee8b0b7 100644
--- a/.php-cs-fixer.user-guide.php
+++ b/.php-cs-fixer.user-guide.php
@@ -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([
@@ -32,6 +32,7 @@
$overrides = [
'echo_tag_syntax' => false,
+ 'header_comment' => false,
'php_unit_internal_class' => false,
'no_unused_imports' => false,
'class_attributes_separation' => false,
@@ -39,19 +40,9 @@
'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));
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9351b205e637..1d2778139204 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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)
diff --git a/admin/RELEASE.md b/admin/RELEASE.md
index 8c5f463355fb..4f199a821177 100644
--- a/admin/RELEASE.md
+++ b/admin/RELEASE.md
@@ -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
```
@@ -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
@@ -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
@@ -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**,
@@ -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
diff --git a/admin/css/debug-toolbar/toolbar.scss b/admin/css/debug-toolbar/toolbar.scss
index 97a92690b937..eec3d25546e3 100644
--- a/admin/css/debug-toolbar/toolbar.scss
+++ b/admin/css/debug-toolbar/toolbar.scss
@@ -95,6 +95,7 @@
}
h2 {
+ font-weight: bold;
font-size: $base-size;
margin: 0;
padding: 5px 0 10px 0;
@@ -292,6 +293,8 @@
// The tabs container
.tab {
+ height: fit-content;
+ text-align: left;
bottom: 35px;
display: none;
left: 0;
@@ -306,6 +309,8 @@
// The "Timeline" tab
.timeline {
+ position: static;
+ display: table;
margin-left: 0;
width: 100%;
diff --git a/admin/pre-commit b/admin/pre-commit
index f64268277e72..19bec4f4726b 100644
--- a/admin/pre-commit
+++ b/admin/pre-commit
@@ -24,39 +24,10 @@ if [ "$FILES" != "" ]; then
echo "Running PHP CS Fixer..."
# Run on whole codebase to skip on unnecessary filtering
- # Run first on app, admin, public
- if [ -d /proc/cygdrive ]; then
- ./vendor/bin/php-cs-fixer fix --verbose --dry-run --diff --config=.php-cs-fixer.no-header.php
- else
- php ./vendor/bin/php-cs-fixer fix --verbose --dry-run --diff --config=.php-cs-fixer.no-header.php
- fi
-
- if [ $? != 0 ]; then
- echo "Files in app, admin, or public are not following the coding standards. Please fix them before commit."
- exit 1
- fi
-
- # Next, run on system, tests, utils, and root PHP files
- if [ -d /proc/cygdrive ]; then
- ./vendor/bin/php-cs-fixer fix --verbose --dry-run --diff
- else
- php ./vendor/bin/php-cs-fixer fix --verbose --dry-run --diff
- fi
-
- if [ $? != 0 ]; then
- echo "Files in system, tests, utils, or root are not following the coding standards. Please fix them before commit."
- exit 1
- fi
-
- # Next, run on user_guide_src/source PHP files
- if [ -d /proc/cygdrive ]; then
- ./vendor/bin/php-cs-fixer fix --verbose --dry-run --diff --config=.php-cs-fixer.user-guide.php
- else
- php ./vendor/bin/php-cs-fixer fix --verbose --dry-run --diff --config=.php-cs-fixer.user-guide.php
- fi
+ composer cs
if [ $? != 0 ]; then
- echo "Files in user_guide_src/source are not following the coding standards. Please fix them before commit."
+ echo "There are PHP files which are not following the coding standards. Please fix them before commit."
exit 1
fi
fi
diff --git a/admin/starter/.github/workflows/phpunit.yml b/admin/starter/.github/workflows/phpunit.yml
index f43435df9765..2be22ec16095 100644
--- a/admin/starter/.github/workflows/phpunit.yml
+++ b/admin/starter/.github/workflows/phpunit.yml
@@ -15,7 +15,7 @@ jobs:
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
diff --git a/admin/starter/composer.json b/admin/starter/composer.json
index b84684d82a4f..38a51e29fb64 100644
--- a/admin/starter/composer.json
+++ b/admin/starter/composer.json
@@ -21,7 +21,7 @@
"autoload": {
"psr-4": {
"App\\": "app/",
- "Config\\": "app/Config"
+ "Config\\": "app/Config/"
},
"exclude-from-classmap": [
"**/Database/Migrations/**"
diff --git a/app/Config/Events.php b/app/Config/Events.php
index 993abd24ebc7..62a7b86d46c8 100644
--- a/app/Config/Events.php
+++ b/app/Config/Events.php
@@ -23,7 +23,7 @@
* Events::on('create', [$myInstance, 'myMethod']);
*/
-Events::on('pre_system', static function () {
+Events::on('pre_system', static function (): void {
if (ENVIRONMENT !== 'testing') {
if (ini_get('zlib.output_compression')) {
throw FrameworkException::forEnabledZlibOutputCompression();
@@ -47,7 +47,7 @@
Services::toolbar()->respond();
// Hot Reload route - for framework use on the hot reloader.
if (ENVIRONMENT === 'development') {
- Services::routes()->get('__hot-reload', static function () {
+ Services::routes()->get('__hot-reload', static function (): void {
(new HotReloader())->run();
});
}
diff --git a/composer.json b/composer.json
index 76020a1f6ea5..6915af74aa8f 100644
--- a/composer.json
+++ b/composer.json
@@ -17,23 +17,18 @@
"psr/log": "^3.0"
},
"require-dev": {
- "codeigniter/coding-standard": "^1.7",
"codeigniter/phpstan-codeigniter": "^1.4",
- "ergebnis/composer-normalize": "^2.28",
"fakerphp/faker": "^1.9",
- "friendsofphp/php-cs-fixer": "^3.47.1",
"kint-php/kint": "^5.0.4",
"mikey179/vfsstream": "^1.6",
- "nexusphp/cs-config": "^3.6",
"nexusphp/tachycardia": "^2.0",
- "phpstan/extension-installer": "^1.3",
+ "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",
"predis/predis": "^1.1 || ^2.0",
- "rector/rector": "1.1.1",
- "vimeo/psalm": "^5.0"
+ "rector/rector": "1.2.2"
},
"replace": {
"codeigniter4/framework": "self.version"
@@ -72,12 +67,11 @@
"autoload-dev": {
"psr-4": {
"CodeIgniter\\": "tests/system/",
- "Utils\\": "utils/"
+ "Utils\\": "utils/src/"
}
},
"config": {
"allow-plugins": {
- "ergebnis/composer-normalize": true,
"phpstan/extension-installer": true
},
"optimize-autoloader": true,
@@ -91,29 +85,33 @@
},
"scripts": {
"post-update-cmd": [
- "CodeIgniter\\ComposerScripts::postUpdate",
- "composer update --working-dir=tools/phpmetrics"
+ "CodeIgniter\\ComposerScripts::postUpdate"
+ ],
+ "post-autoload-dump": [
+ "@composer update --working-dir=utils"
],
"analyze": [
"Composer\\Config::disableProcessTimeout",
- "bash -c \"XDEBUG_MODE=off phpstan analyse\"",
- "rector process --dry-run"
+ "@phpstan:check",
+ "vendor/bin/rector process --dry-run"
],
"cs": [
"Composer\\Config::disableProcessTimeout",
- "php-cs-fixer fix --ansi --verbose --dry-run --diff --config=.php-cs-fixer.user-guide.php",
- "php-cs-fixer fix --ansi --verbose --dry-run --diff --config=.php-cs-fixer.no-header.php",
- "php-cs-fixer fix --ansi --verbose --dry-run --diff --config=.php-cs-fixer.tests.php",
- "php-cs-fixer fix --ansi --verbose --dry-run --diff"
+ "utils/vendor/bin/php-cs-fixer check --ansi --verbose --diff --config=.php-cs-fixer.user-guide.php",
+ "utils/vendor/bin/php-cs-fixer check --ansi --verbose --diff --config=.php-cs-fixer.no-header.php",
+ "utils/vendor/bin/php-cs-fixer check --ansi --verbose --diff --config=.php-cs-fixer.tests.php",
+ "utils/vendor/bin/php-cs-fixer check --ansi --verbose --diff"
],
"cs-fix": [
"Composer\\Config::disableProcessTimeout",
- "php-cs-fixer fix --ansi --verbose --diff --config=.php-cs-fixer.user-guide.php",
- "php-cs-fixer fix --ansi --verbose --diff --config=.php-cs-fixer.no-header.php",
- "php-cs-fixer fix --ansi --verbose --diff --config=.php-cs-fixer.tests.php",
- "php-cs-fixer fix --ansi --verbose --diff"
+ "utils/vendor/bin/php-cs-fixer fix --ansi --verbose --diff --config=.php-cs-fixer.user-guide.php",
+ "utils/vendor/bin/php-cs-fixer fix --ansi --verbose --diff --config=.php-cs-fixer.no-header.php",
+ "utils/vendor/bin/php-cs-fixer fix --ansi --verbose --diff --config=.php-cs-fixer.tests.php",
+ "utils/vendor/bin/php-cs-fixer fix --ansi --verbose --diff"
],
- "metrics": "tools/phpmetrics/vendor/bin/phpmetrics --config=phpmetrics.json",
+ "metrics": "utils/vendor/bin/phpmetrics --config=phpmetrics.json",
+ "phpstan:baseline": "vendor/bin/phpstan analyse --ansi --generate-baseline=phpstan-baseline.php",
+ "phpstan:check": "vendor/bin/phpstan analyse --verbose --ansi",
"sa": "@analyze",
"style": "@cs-fix",
"test": "phpunit"
@@ -123,6 +121,8 @@
"cs": "Check the coding style",
"cs-fix": "Fix the coding style",
"metrics": "Run PhpMetrics",
+ "phpstan:baseline": "Run PHPStan then dump all errors to baseline",
+ "phpstan:check": "Run PHPStan with support for identifiers",
"test": "Run unit tests"
}
}
diff --git a/phpdoc.dist.xml b/phpdoc.dist.xml
index 5e5a31cb483a..e67b1b29ed55 100644
--- a/phpdoc.dist.xml
+++ b/phpdoc.dist.xml
@@ -10,7 +10,7 @@
api/cache/
-
+