From f83b772c4fd671f16dbe5d1c7799a338a42f15ef Mon Sep 17 00:00:00 2001 From: Gustavo Botti Date: Thu, 11 Jan 2024 13:27:26 -0300 Subject: [PATCH 01/12] Update input-tabular-input.md (#20100) Upper case title, as used in other pages --- docs/guide/input-tabular-input.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/input-tabular-input.md b/docs/guide/input-tabular-input.md index 44c9ffea1d5..f5aa95b57af 100644 --- a/docs/guide/input-tabular-input.md +++ b/docs/guide/input-tabular-input.md @@ -1,4 +1,4 @@ -Collecting tabular input +Collecting Tabular Input ======================== Sometimes you need to handle multiple models of the same kind in a single form. For example, multiple settings, where From 60ea174348a16249e79c73d1de86b47c6d594a7f Mon Sep 17 00:00:00 2001 From: Gustavo Botti Date: Fri, 12 Jan 2024 02:57:18 -0300 Subject: [PATCH 02/12] Fix typo in Menu phpdoc (#20101) --- framework/widgets/Menu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/widgets/Menu.php b/framework/widgets/Menu.php index 025379796f1..d474ceb3a0e 100644 --- a/framework/widgets/Menu.php +++ b/framework/widgets/Menu.php @@ -23,7 +23,7 @@ * Menu checks the current route and request parameters to toggle certain menu items * with active state. * - * Note that Menu only renders the HTML tags about the menu. It does do any styling. + * Note that Menu only renders the HTML tags about the menu. It does not do any styling. * You are responsible to provide CSS styles to make it look like a real menu. * * The following example shows how to use Menu: From c9c5c61f7683a6f33e366e3c9cdb2d6dc0e3031f Mon Sep 17 00:00:00 2001 From: Skeptic Spriggan Date: Thu, 18 Jan 2024 16:30:22 +0100 Subject: [PATCH 03/12] Fix error summary always visible with CSP header (#19691) --- framework/CHANGELOG.md | 1 + framework/helpers/BaseHtml.php | 8 +++++++- tests/framework/helpers/HtmlTest.php | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 7296c02cd3d..58e84e4f92d 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -7,6 +7,7 @@ Yii Framework 2 Change Log - Bug #17181: Improved `BaseUrl::isRelative($url)` performance (sammousa, bizley, rob006) - Bug #17191: Fixed `BaseUrl::isRelative($url)` method in `yii\helpers\BaseUrl` (ggh2e3) - Bug #18469: Fixed `Link::serialize(array $links)` method in `yii\web\Link` (ggh2e3) +- Bug #19691: Fix error summary always visible with CSP header (skepticspriggan) - Bug #20040: Fix type `boolean` in `MSSQL` (terabytesoftw) - Bug #20005: Fix `yii\console\controllers\ServeController` to specify the router script (terabytesoftw) - Bug #19060: Fix `yii\widgets\Menu` bug when using Closure for active item and adding additional tests in `tests\framework\widgets\MenuTest` (atrandafir) diff --git a/framework/helpers/BaseHtml.php b/framework/helpers/BaseHtml.php index 45812e4165b..82262b8a96b 100644 --- a/framework/helpers/BaseHtml.php +++ b/framework/helpers/BaseHtml.php @@ -1260,6 +1260,7 @@ public static function activeHint($model, $attribute, $options = []) * - showAllErrors: boolean, if set to true every error message for each attribute will be shown otherwise * only the first error message for each attribute will be shown. Defaults to `false`. * Option is available since 2.0.10. + * - emptyClass: string, the class name that is added to an empty summary. * * The rest of the options will be rendered as the attributes of the container tag. * @@ -1271,12 +1272,17 @@ public static function errorSummary($models, $options = []) $footer = ArrayHelper::remove($options, 'footer', ''); $encode = ArrayHelper::remove($options, 'encode', true); $showAllErrors = ArrayHelper::remove($options, 'showAllErrors', false); + $emptyClass = ArrayHelper::remove($options, 'emptyClass', null); unset($options['header']); $lines = self::collectErrors($models, $encode, $showAllErrors); if (empty($lines)) { // still render the placeholder for client-side validation use $content = '
    '; - $options['style'] = isset($options['style']) ? rtrim($options['style'], ';') . '; display:none' : 'display:none'; + if($emptyClass !== null) { + $options['class'] = $emptyClass; + } else { + $options['style'] = isset($options['style']) ? rtrim($options['style'], ';') . '; display:none' : 'display:none'; + } } else { $content = '
    • ' . implode("
    • \n
    • ", $lines) . '
    '; } diff --git a/tests/framework/helpers/HtmlTest.php b/tests/framework/helpers/HtmlTest.php index 12e8869d2d8..eef2f84bf7f 100644 --- a/tests/framework/helpers/HtmlTest.php +++ b/tests/framework/helpers/HtmlTest.php @@ -1672,6 +1672,11 @@ function ($model) { $model->addError('name', 'Error message. Here are even more chars: ""'); }, ], + [ + 'empty_class', + ['emptyClass' => 'd-none'], + '

    Please fix the following errors:

      ', + ], ]; } From 018fcb5d9662722fa99e6d3b2c6bfdaf8a07a5e2 Mon Sep 17 00:00:00 2001 From: skepticspriggan <91023755+skepticspriggan@users.noreply.github.com> Date: Thu, 18 Jan 2024 18:14:51 +0100 Subject: [PATCH 04/12] Fix error summary always visible with CSP header (#19691) Co-authored-by: Alexander Makarov --- framework/helpers/BaseHtml.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/helpers/BaseHtml.php b/framework/helpers/BaseHtml.php index 82262b8a96b..4f17fa670ea 100644 --- a/framework/helpers/BaseHtml.php +++ b/framework/helpers/BaseHtml.php @@ -1278,7 +1278,7 @@ public static function errorSummary($models, $options = []) if (empty($lines)) { // still render the placeholder for client-side validation use $content = '
        '; - if($emptyClass !== null) { + if ($emptyClass !== null) { $options['class'] = $emptyClass; } else { $options['style'] = isset($options['style']) ? rtrim($options['style'], ';') . '; display:none' : 'display:none'; From 32a20f9338a96120a2be51a5cf55036d32c98f4d Mon Sep 17 00:00:00 2001 From: skepticspriggan <91023755+skepticspriggan@users.noreply.github.com> Date: Thu, 18 Jan 2024 18:23:38 +0100 Subject: [PATCH 05/12] Fix error summary always visible with CSP header (#19691) Co-authored-by: Alexander Makarov --- framework/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 58e84e4f92d..a4dd74dfcb8 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -7,7 +7,7 @@ Yii Framework 2 Change Log - Bug #17181: Improved `BaseUrl::isRelative($url)` performance (sammousa, bizley, rob006) - Bug #17191: Fixed `BaseUrl::isRelative($url)` method in `yii\helpers\BaseUrl` (ggh2e3) - Bug #18469: Fixed `Link::serialize(array $links)` method in `yii\web\Link` (ggh2e3) -- Bug #19691: Fix error summary always visible with CSP header (skepticspriggan) +- Bug #19691: Allow using custom class to style error summary (skepticspriggan) - Bug #20040: Fix type `boolean` in `MSSQL` (terabytesoftw) - Bug #20005: Fix `yii\console\controllers\ServeController` to specify the router script (terabytesoftw) - Bug #19060: Fix `yii\widgets\Menu` bug when using Closure for active item and adding additional tests in `tests\framework\widgets\MenuTest` (atrandafir) From c2e0485e0a2c0e0c780459a202e65b705ac7fa60 Mon Sep 17 00:00:00 2001 From: skepticspriggan <91023755+skepticspriggan@users.noreply.github.com> Date: Fri, 16 Feb 2024 23:11:56 +0100 Subject: [PATCH 06/12] Explain why DI fails sometimes and how to fix this (#20010) (#20108) * Explain why DI fails sometimes and how to fix this (#20010) * Explain why AR does not support DI by default and how to support it (#20010) --- docs/guide/db-active-record.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/guide/db-active-record.md b/docs/guide/db-active-record.md index e87727469bb..e77317214e5 100644 --- a/docs/guide/db-active-record.md +++ b/docs/guide/db-active-record.md @@ -650,6 +650,17 @@ life cycle will happen: > - [[yii\db\ActiveRecord::updateCounters()]] > - [[yii\db\ActiveRecord::updateAllCounters()]] +> Note: DI is not supported by default due to performance concerns. You can add support if needed by overriding +> the [[yii\db\ActiveRecord::instantiate()|instantiate()]] method to instantiate the class via [[Yii::createObject()]]: +> +> ```php +> public static function instantiate($row) +> { +> return Yii::createObject(static::class); +> } +> ``` + + ### Refreshing Data Life Cycle When calling [[yii\db\ActiveRecord::refresh()|refresh()]] to refresh an Active Record instance, the From 78cc7198f40cdb4afd7502f67841fd1506ded6d5 Mon Sep 17 00:00:00 2001 From: Muhammad Zubayr Date: Tue, 27 Feb 2024 11:32:33 +0500 Subject: [PATCH 07/12] =?UTF-8?q?Correction=20text=20"=D0=A2=D0=B0=D2=B3?= =?UTF-8?q?=D1=80=D0=B8=D1=80=D0=B8=D0=BB=D0=B0=D1=88"=20=3D>=20"=D0=A2?= =?UTF-8?q?=D0=B0=D2=B3=D1=80=D0=B8=D1=80=D0=BB=D0=B0=D1=88"=20(#20120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In Uzbek it is "Таҳрирлаш" not "Таҳририлаш" --- framework/messages/uz-Cy/yii.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/messages/uz-Cy/yii.php b/framework/messages/uz-Cy/yii.php index c7ae1e73d88..3d8d03ad5bb 100644 --- a/framework/messages/uz-Cy/yii.php +++ b/framework/messages/uz-Cy/yii.php @@ -67,7 +67,7 @@ 'Unknown alias: -{name}' => '', 'Unknown filter attribute "{attribute}"' => '', 'Unknown option: --{name}' => 'Ноаниқ танлов: --{name}', - 'Update' => 'Таҳририлаш', + 'Update' => 'Таҳрирлаш', 'View' => 'Кўриш', 'Yes' => 'Ҳа', 'You are not allowed to perform this action.' => 'Сизга ушбу амални бажаришга руҳсат берилмаган.', From 283499cf61475c9a3a67d7dd214ccf7235e31086 Mon Sep 17 00:00:00 2001 From: rhertogh Date: Sun, 3 Mar 2024 09:32:21 +0100 Subject: [PATCH 08/12] Fix #20122: Fixed parsing of boolean keywords (e.g. used in SQLite) in `\yii\db\ColumnSchema::typecast()` --- framework/CHANGELOG.md | 1 + framework/db/ColumnSchema.php | 2 +- tests/framework/db/SchemaTest.php | 33 +++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index a4dd74dfcb8..9567e04fd97 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -14,6 +14,7 @@ Yii Framework 2 Change Log - Bug #13920: Fixed erroneous validation for specific cases (tim-fischer-maschinensucher) - Bug #19927: Fixed `console\controllers\MessageController` when saving translations to database: fixed FK error when adding new string and language at the same time, checking/regenerating all missing messages and dropping messages for unused languages (atrandafir) - Bug #20002: Fixed superfluous query on HEAD request in serializer (xicond) +- Bug #20122: Fixed parsing of boolean keywords (e.g. used in SQLite) in `\yii\db\ColumnSchema::typecast()` (rhertogh) - Enh #12743: Added new methods `BaseActiveRecord::loadRelations()` and `BaseActiveRecord::loadRelationsFor()` to eager load related models for existing primary model instances (PowerGamer1) - Enh #20030: Improve performance of handling `ErrorHandler::$memoryReserveSize` (antonshevelev, rob006) - Enh #20042: Add empty array check to `ActiveQueryTrait::findWith()` (renkas) diff --git a/framework/db/ColumnSchema.php b/framework/db/ColumnSchema.php index 74e1ddea84b..1d01cec2707 100644 --- a/framework/db/ColumnSchema.php +++ b/framework/db/ColumnSchema.php @@ -174,7 +174,7 @@ protected function typecast($value) case 'boolean': // treating a 0 bit value as false too // https://github.com/yiisoft/yii2/issues/9006 - return (bool) $value && $value !== "\0"; + return (bool) $value && $value !== "\0" && strtolower($value) !== 'false'; case 'double': return (float) $value; } diff --git a/tests/framework/db/SchemaTest.php b/tests/framework/db/SchemaTest.php index af02b2170b6..dd05f78d9c2 100644 --- a/tests/framework/db/SchemaTest.php +++ b/tests/framework/db/SchemaTest.php @@ -545,6 +545,39 @@ public function testColumnSchemaDbTypecastWithEmptyCharType() $this->assertSame('', $columnSchema->dbTypecast('')); } + /** + * @dataProvider columnSchemaDbTypecastBooleanPhpTypeProvider + * @param mixed $value + * @param bool $expected + */ + public function testColumnSchemaDbTypecastBooleanPhpType($value, $expected) + { + $columnSchema = new ColumnSchema(['phpType' => Schema::TYPE_BOOLEAN]); + $this->assertSame($expected, $columnSchema->dbTypecast($value)); + } + + public function columnSchemaDbTypecastBooleanPhpTypeProvider() + { + return [ + [1, true], + [0, false], + ['1', true], + ['0', false], + + // https://github.com/yiisoft/yii2/issues/9006 + ["\1", true], + ["\0", false], + + // https://github.com/yiisoft/yii2/pull/20122 + ['TRUE', true], + ['FALSE', false], + ['true', true], + ['false', false], + ['True', true], + ['False', false], + ]; + } + public function testFindUniqueIndexes() { if ($this->driverName === 'sqlsrv') { From e02245f18e08b732040328ba3ef01350b3199862 Mon Sep 17 00:00:00 2001 From: forevermatt Date: Wed, 6 Mar 2024 14:34:00 -0500 Subject: [PATCH 09/12] Fix typo in setCookieParams() documentation --- framework/web/Session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/web/Session.php b/framework/web/Session.php index 40768924cf5..eb900bf96c1 100644 --- a/framework/web/Session.php +++ b/framework/web/Session.php @@ -398,7 +398,7 @@ public function getCookieParams() * of `session_get_cookie_params()`. * @param array $value cookie parameters, valid keys include: `lifetime`, `path`, `domain`, `secure` and `httponly`. * Starting with Yii 2.0.21 `sameSite` is also supported. It requires PHP version 7.3.0 or higher. - * For securtiy, an exception will be thrown if `sameSite` is set while using an unsupported version of PHP. + * For security, an exception will be thrown if `sameSite` is set while using an unsupported version of PHP. * To use this feature across different PHP versions check the version first. E.g. * ```php * [ From 75b95980f1ea8e2054cb835fb440d056675708f8 Mon Sep 17 00:00:00 2001 From: DaniloNicacio <70544466+DaniloNicacio@users.noreply.github.com> Date: Thu, 7 Mar 2024 01:24:00 -0400 Subject: [PATCH 10/12] FIx misspelled "token" in Portuguese Translation (#20125) Change "toke" on line 52 to "token" --- docs/guide-pt-BR/start-installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide-pt-BR/start-installation.md b/docs/guide-pt-BR/start-installation.md index a5228fb9b6d..1fcc2d07c4b 100644 --- a/docs/guide-pt-BR/start-installation.md +++ b/docs/guide-pt-BR/start-installation.md @@ -49,7 +49,7 @@ Você pode atualizar o Composer executando o comando `composer self-update`. > A quantidade de solicitações depende do número de dependências que sua aplicação possui e pode extrapolar a > **taxa limite da API do Github**. Se você atingir esse limite, o Composer pode pedir a você suas credenciais de login para obter um > token de acesso à API Github. Em conexões rápidas você pode atingir esse limite antes que o Composer consiga lidar com a situação, então, recomendamos -> configurar um toke de acesso antes de instalar o Yii. +> configurar um token de acesso antes de instalar o Yii. > Por favor, consulte a [documentação do Composer sobre tokens da API Github](https://getcomposer.org/doc/articles/troubleshooting.md#api-rate-limit-and-oauth-tokens) > para instruções de como fazer isso. From e2a167028b5c77cf9533e1e9acb7ae9b785b6bd6 Mon Sep 17 00:00:00 2001 From: Razvan Grigore Date: Tue, 19 Mar 2024 16:21:27 +0200 Subject: [PATCH 11/12] Upgrade to PSR12 coding standard (#20121) --- .github/workflows/lint.yaml | 22 + .php_cs | 27 - composer.json | 9 +- composer.lock | 2518 +++-------------- cs/TODO.md | 1 - cs/src/YiiConfig.php | 172 -- cs/src/YiisoftConfig.php | 39 - framework/BaseYii.php | 4 +- framework/CHANGELOG.md | 1 + framework/Yii.php | 3 + framework/assets/yii.activeForm.js | 5 +- framework/assets/yii.gridView.js | 5 +- framework/assets/yii.js | 21 +- framework/assets/yii.validation.js | 19 +- framework/base/Action.php | 3 +- framework/base/ActionEvent.php | 1 + framework/base/ActionFilter.php | 1 + framework/base/Application.php | 1 + framework/base/ArrayAccessTrait.php | 1 + framework/base/Arrayable.php | 1 + framework/base/ArrayableTrait.php | 1 + framework/base/BaseObject.php | 1 + framework/base/Behavior.php | 1 + framework/base/BootstrapInterface.php | 1 + framework/base/Component.php | 1 + framework/base/Configurable.php | 1 + framework/base/Controller.php | 3 +- .../base/DynamicContentAwareInterface.php | 1 + framework/base/DynamicContentAwareTrait.php | 1 + framework/base/DynamicModel.php | 1 + framework/base/ErrorException.php | 1 + framework/base/ErrorHandler.php | 1 + framework/base/Event.php | 1 + framework/base/Exception.php | 1 + framework/base/ExitException.php | 1 + framework/base/InlineAction.php | 1 + framework/base/InvalidArgumentException.php | 1 + framework/base/InvalidCallException.php | 1 + framework/base/InvalidConfigException.php | 1 + framework/base/InvalidParamException.php | 1 + framework/base/InvalidRouteException.php | 1 + framework/base/InvalidValueException.php | 1 + framework/base/Model.php | 1 + framework/base/ModelEvent.php | 1 + framework/base/Module.php | 3 +- framework/base/NotSupportedException.php | 1 + framework/base/Object.php | 1 + framework/base/Request.php | 1 + framework/base/Response.php | 1 + framework/base/Security.php | 4 +- framework/base/StaticInstanceInterface.php | 1 + framework/base/StaticInstanceTrait.php | 1 + framework/base/Theme.php | 1 + framework/base/UnknownClassException.php | 1 + framework/base/UnknownMethodException.php | 1 + framework/base/UnknownPropertyException.php | 1 + framework/base/UserException.php | 1 + framework/base/View.php | 3 +- framework/base/ViewContextInterface.php | 1 + framework/base/ViewEvent.php | 1 + framework/base/ViewNotFoundException.php | 1 + framework/base/ViewRenderer.php | 1 + framework/base/Widget.php | 1 + framework/base/WidgetEvent.php | 1 + framework/behaviors/AttributeBehavior.php | 4 +- .../behaviors/AttributeTypecastBehavior.php | 11 +- framework/behaviors/AttributesBehavior.php | 7 +- framework/behaviors/BlameableBehavior.php | 1 + .../behaviors/CacheableWidgetBehavior.php | 1 + .../behaviors/OptimisticLockBehavior.php | 1 + framework/behaviors/SluggableBehavior.php | 1 + framework/behaviors/TimestampBehavior.php | 1 + framework/caching/ApcCache.php | 1 + framework/caching/ArrayCache.php | 1 + framework/caching/Cache.php | 1 + framework/caching/CacheInterface.php | 1 + framework/caching/ChainedDependency.php | 1 + framework/caching/DbCache.php | 1 + framework/caching/DbDependency.php | 1 + framework/caching/DbQueryDependency.php | 1 + framework/caching/Dependency.php | 1 + framework/caching/DummyCache.php | 1 + framework/caching/ExpressionDependency.php | 1 + framework/caching/FileCache.php | 1 + framework/caching/FileDependency.php | 1 + framework/caching/MemCache.php | 1 + framework/caching/MemCacheServer.php | 1 + framework/caching/TagDependency.php | 1 + framework/caching/WinCache.php | 1 + framework/caching/XCache.php | 1 + framework/caching/ZendDataCache.php | 1 + .../migrations/m150909_153426_cache_init.php | 1 + framework/captcha/Captcha.php | 1 + framework/captcha/CaptchaAction.php | 1 + framework/captcha/CaptchaAsset.php | 1 + framework/captcha/CaptchaValidator.php | 1 + framework/classes.php | 1 + framework/console/Application.php | 1 + framework/console/Controller.php | 1 + framework/console/ErrorHandler.php | 7 +- framework/console/Exception.php | 1 + framework/console/ExitCode.php | 1 + framework/console/Markdown.php | 1 + framework/console/Request.php | 1 + framework/console/Response.php | 1 + framework/console/UnknownCommandException.php | 1 + .../console/controllers/AssetController.php | 1 + .../controllers/BaseMigrateController.php | 1 + .../console/controllers/CacheController.php | 1 + .../console/controllers/FixtureController.php | 1 + .../console/controllers/HelpController.php | 32 +- .../console/controllers/MessageController.php | 103 +- .../console/controllers/MigrateController.php | 7 +- .../console/controllers/ServeController.php | 1 + framework/console/widgets/Table.php | 14 +- framework/data/ActiveDataFilter.php | 1 + framework/data/ActiveDataProvider.php | 1 + framework/data/ArrayDataProvider.php | 1 + framework/data/BaseDataProvider.php | 2 + framework/data/DataFilter.php | 1 + framework/data/DataProviderInterface.php | 1 + framework/data/Pagination.php | 1 + framework/data/Sort.php | 1 + framework/data/SqlDataProvider.php | 1 + framework/db/ActiveQuery.php | 1 + framework/db/ActiveQueryInterface.php | 1 + framework/db/ActiveQueryTrait.php | 1 + framework/db/ActiveRecord.php | 1 + framework/db/ActiveRecordInterface.php | 1 + framework/db/ActiveRelationTrait.php | 5 +- framework/db/AfterSaveEvent.php | 1 + framework/db/ArrayExpression.php | 2 + framework/db/BaseActiveRecord.php | 1 + framework/db/BatchQueryResult.php | 13 +- framework/db/CheckConstraint.php | 1 + framework/db/ColumnSchema.php | 16 +- framework/db/ColumnSchemaBuilder.php | 1 + framework/db/Command.php | 3 +- framework/db/Connection.php | 2 +- framework/db/Constraint.php | 1 + framework/db/ConstraintFinderInterface.php | 1 + framework/db/ConstraintFinderTrait.php | 1 + framework/db/DataReader.php | 1 + framework/db/DefaultValueConstraint.php | 1 + framework/db/Exception.php | 1 + framework/db/Expression.php | 1 + framework/db/ExpressionBuilder.php | 1 + framework/db/ExpressionBuilderInterface.php | 1 + framework/db/ExpressionBuilderTrait.php | 1 + framework/db/ExpressionInterface.php | 1 + framework/db/ForeignKeyConstraint.php | 1 + framework/db/IndexConstraint.php | 1 + framework/db/IntegrityException.php | 1 + framework/db/JsonExpression.php | 1 + framework/db/Migration.php | 1 + framework/db/MigrationInterface.php | 1 + framework/db/PdoValue.php | 2 + framework/db/PdoValueBuilder.php | 1 + framework/db/Query.php | 1 + framework/db/QueryBuilder.php | 4 +- framework/db/QueryExpressionBuilder.php | 1 + framework/db/QueryInterface.php | 1 + framework/db/QueryTrait.php | 1 + framework/db/Schema.php | 1 + framework/db/SchemaBuilderTrait.php | 1 + framework/db/SqlToken.php | 1 + framework/db/SqlTokenizer.php | 1 + framework/db/StaleObjectException.php | 1 + framework/db/TableSchema.php | 1 + framework/db/Transaction.php | 1 + framework/db/ViewFinderTrait.php | 1 + framework/db/conditions/AndCondition.php | 1 + .../db/conditions/BetweenColumnsCondition.php | 2 + .../BetweenColumnsConditionBuilder.php | 1 + framework/db/conditions/BetweenCondition.php | 2 + .../db/conditions/BetweenConditionBuilder.php | 1 + .../db/conditions/ConditionInterface.php | 1 + .../db/conditions/ConjunctionCondition.php | 1 + .../ConjunctionConditionBuilder.php | 1 + framework/db/conditions/ExistsCondition.php | 2 + .../db/conditions/ExistsConditionBuilder.php | 1 + framework/db/conditions/HashCondition.php | 2 + .../db/conditions/HashConditionBuilder.php | 1 + framework/db/conditions/InCondition.php | 2 + .../db/conditions/InConditionBuilder.php | 4 +- framework/db/conditions/LikeCondition.php | 1 + .../db/conditions/LikeConditionBuilder.php | 1 + framework/db/conditions/NotCondition.php | 2 + .../db/conditions/NotConditionBuilder.php | 1 + framework/db/conditions/OrCondition.php | 1 + framework/db/conditions/SimpleCondition.php | 2 + .../db/conditions/SimpleConditionBuilder.php | 1 + framework/db/cubrid/ColumnSchemaBuilder.php | 1 + framework/db/cubrid/QueryBuilder.php | 1 + framework/db/cubrid/Schema.php | 4 +- .../conditions/LikeConditionBuilder.php | 1 + framework/db/mssql/ColumnSchema.php | 1 + framework/db/mssql/ColumnSchemaBuilder.php | 1 + framework/db/mssql/DBLibPDO.php | 1 + framework/db/mssql/PDO.php | 1 + framework/db/mssql/QueryBuilder.php | 27 +- framework/db/mssql/Schema.php | 3 +- framework/db/mssql/SqlsrvPDO.php | 1 + framework/db/mssql/TableSchema.php | 1 + .../mssql/conditions/InConditionBuilder.php | 1 + .../mssql/conditions/LikeConditionBuilder.php | 1 + framework/db/mysql/ColumnSchema.php | 1 + framework/db/mysql/ColumnSchemaBuilder.php | 1 + framework/db/mysql/JsonExpressionBuilder.php | 1 + framework/db/mysql/QueryBuilder.php | 6 +- framework/db/mysql/Schema.php | 7 +- framework/db/oci/ColumnSchemaBuilder.php | 1 + framework/db/oci/Command.php | 1 + framework/db/oci/QueryBuilder.php | 5 +- framework/db/oci/Schema.php | 1 + .../db/oci/conditions/InConditionBuilder.php | 1 + .../oci/conditions/LikeConditionBuilder.php | 1 + framework/db/pgsql/ArrayExpressionBuilder.php | 3 +- framework/db/pgsql/ArrayParser.php | 2 + framework/db/pgsql/ColumnSchema.php | 1 + framework/db/pgsql/JsonExpressionBuilder.php | 1 + framework/db/pgsql/QueryBuilder.php | 14 +- framework/db/pgsql/Schema.php | 4 +- framework/db/sqlite/ColumnSchemaBuilder.php | 1 + framework/db/sqlite/Command.php | 1 + framework/db/sqlite/QueryBuilder.php | 1 + framework/db/sqlite/Schema.php | 1 + framework/db/sqlite/SqlTokenizer.php | 1 + .../sqlite/conditions/InConditionBuilder.php | 1 + .../conditions/LikeConditionBuilder.php | 1 + framework/di/Container.php | 2 +- framework/di/Instance.php | 1 + framework/di/NotInstantiableException.php | 1 + framework/di/ServiceLocator.php | 1 + framework/filters/AccessControl.php | 1 + framework/filters/AccessRule.php | 4 +- framework/filters/AjaxFilter.php | 1 + framework/filters/ContentNegotiator.php | 1 + framework/filters/Cors.php | 1 + framework/filters/HostControl.php | 1 + framework/filters/HttpCache.php | 1 + framework/filters/PageCache.php | 1 + framework/filters/RateLimitInterface.php | 1 + framework/filters/RateLimiter.php | 1 + framework/filters/VerbFilter.php | 1 + framework/filters/auth/AuthInterface.php | 1 + framework/filters/auth/AuthMethod.php | 1 + framework/filters/auth/CompositeAuth.php | 1 + framework/filters/auth/HttpBasicAuth.php | 1 + framework/filters/auth/HttpBearerAuth.php | 1 + framework/filters/auth/HttpHeaderAuth.php | 1 + framework/filters/auth/QueryParamAuth.php | 1 + framework/grid/ActionColumn.php | 1 + framework/grid/CheckboxColumn.php | 1 + framework/grid/Column.php | 1 + framework/grid/DataColumn.php | 9 +- framework/grid/GridView.php | 1 + framework/grid/GridViewAsset.php | 1 + framework/grid/RadioButtonColumn.php | 1 + framework/grid/SerialColumn.php | 1 + framework/helpers/ArrayHelper.php | 1 + framework/helpers/BaseArrayHelper.php | 1 + framework/helpers/BaseConsole.php | 5 +- framework/helpers/BaseFileHelper.php | 1 + framework/helpers/BaseFormatConverter.php | 73 +- framework/helpers/BaseHtml.php | 1 + framework/helpers/BaseHtmlPurifier.php | 1 + framework/helpers/BaseInflector.php | 2 +- framework/helpers/BaseIpHelper.php | 1 + framework/helpers/BaseJson.php | 1 + framework/helpers/BaseMarkdown.php | 1 + framework/helpers/BaseStringHelper.php | 6 +- framework/helpers/BaseUrl.php | 1 + framework/helpers/BaseVarDumper.php | 1 + framework/helpers/Console.php | 1 + framework/helpers/FileHelper.php | 1 + framework/helpers/FormatConverter.php | 1 + framework/helpers/Html.php | 1 + framework/helpers/HtmlPurifier.php | 1 + framework/helpers/Inflector.php | 1 + framework/helpers/IpHelper.php | 1 + framework/helpers/Json.php | 1 + framework/helpers/Markdown.php | 1 + framework/helpers/ReplaceArrayValue.php | 1 + framework/helpers/StringHelper.php | 1 + framework/helpers/UnsetArrayValue.php | 1 + framework/helpers/Url.php | 1 + framework/helpers/VarDumper.php | 1 + framework/helpers/mimeAliases.php | 2 + framework/helpers/mimeExtensions.php | 2 + framework/helpers/mimeTypes.php | 4 +- framework/i18n/DbMessageSource.php | 1 + framework/i18n/Formatter.php | 7 +- framework/i18n/GettextFile.php | 1 + framework/i18n/GettextMessageSource.php | 1 + framework/i18n/GettextMoFile.php | 1 + framework/i18n/GettextPoFile.php | 1 + framework/i18n/I18N.php | 1 + framework/i18n/Locale.php | 1 + framework/i18n/MessageFormatter.php | 4 +- framework/i18n/MessageSource.php | 1 + framework/i18n/MissingTranslationEvent.php | 1 + framework/i18n/PhpMessageSource.php | 1 + .../migrations/m150207_210500_i18n_init.php | 1 + framework/log/DbTarget.php | 7 +- framework/log/Dispatcher.php | 1 + framework/log/EmailTarget.php | 1 + framework/log/FileTarget.php | 1 + framework/log/LogRuntimeException.php | 1 + framework/log/Logger.php | 1 + framework/log/SyslogTarget.php | 1 + framework/log/Target.php | 1 + .../migrations/m141106_185632_log_init.php | 11 +- framework/mail/BaseMailer.php | 1 + framework/mail/BaseMessage.php | 1 + framework/mail/MailEvent.php | 1 + framework/mail/MailerInterface.php | 1 + framework/mail/MessageInterface.php | 1 + framework/messages/af/yii.php | 1 + framework/messages/ar/yii.php | 1 + framework/messages/az/yii.php | 1 + framework/messages/be/yii.php | 1 + framework/messages/bg/yii.php | 1 + framework/messages/bs/yii.php | 1 + framework/messages/ca/yii.php | 1 + framework/messages/config.php | 1 + framework/messages/cs/yii.php | 1 + framework/messages/da/yii.php | 1 + framework/messages/de/yii.php | 1 + framework/messages/el/yii.php | 1 + framework/messages/es/yii.php | 1 + framework/messages/et/yii.php | 1 + framework/messages/fa/yii.php | 1 + framework/messages/fi/yii.php | 1 + framework/messages/fr/yii.php | 1 + framework/messages/he/yii.php | 1 + framework/messages/hi/yii.php | 1 + framework/messages/hr/yii.php | 1 + framework/messages/hu/yii.php | 1 + framework/messages/hy/yii.php | 1 + framework/messages/id/yii.php | 1 + framework/messages/it/yii.php | 1 + framework/messages/ja/yii.php | 1 + framework/messages/ka/yii.php | 1 + framework/messages/kk/yii.php | 1 + framework/messages/ko/yii.php | 1 + framework/messages/kz/yii.php | 1 + framework/messages/lt/yii.php | 1 + framework/messages/lv/yii.php | 1 + framework/messages/ms/yii.php | 1 + framework/messages/nb-NO/yii.php | 1 + framework/messages/nl/yii.php | 1 + framework/messages/pl/yii.php | 1 + framework/messages/pt-BR/yii.php | 1 + framework/messages/pt/yii.php | 1 + framework/messages/ro/yii.php | 1 + framework/messages/ru/yii.php | 1 + framework/messages/sk/yii.php | 1 + framework/messages/sl/yii.php | 1 + framework/messages/sr-Latn/yii.php | 1 + framework/messages/sr/yii.php | 1 + framework/messages/sv/yii.php | 1 + framework/messages/tg/yii.php | 1 + framework/messages/th/yii.php | 1 + framework/messages/tr/yii.php | 1 + framework/messages/uk/yii.php | 1 + framework/messages/uz-Cy/yii.php | 1 + framework/messages/uz/yii.php | 1 + framework/messages/vi/yii.php | 1 + framework/messages/zh-TW/yii.php | 1 + framework/messages/zh/yii.php | 1 + framework/mutex/DbMutex.php | 1 + framework/mutex/FileMutex.php | 1 + framework/mutex/Mutex.php | 1 + framework/mutex/MysqlMutex.php | 3 +- framework/mutex/OracleMutex.php | 1 + framework/mutex/PgsqlMutex.php | 1 + framework/mutex/RetryAcquireTrait.php | 1 + framework/rbac/Assignment.php | 1 + framework/rbac/BaseManager.php | 1 + framework/rbac/CheckAccessInterface.php | 1 + framework/rbac/DbManager.php | 1 + framework/rbac/Item.php | 1 + framework/rbac/ManagerInterface.php | 1 + framework/rbac/Permission.php | 1 + framework/rbac/PhpManager.php | 1 + framework/rbac/Role.php | 1 + framework/rbac/Rule.php | 1 + .../migrations/m140506_102106_rbac_init.php | 1 + ...c_add_index_on_auth_assignment_user_id.php | 1 + ...38_rbac_updates_indexes_without_prefix.php | 1 + ...00409_110543_rbac_update_mssql_trigger.php | 11 +- framework/rest/Action.php | 1 + framework/rest/ActiveController.php | 1 + framework/rest/Controller.php | 1 + framework/rest/CreateAction.php | 1 + framework/rest/DeleteAction.php | 1 + framework/rest/IndexAction.php | 1 + framework/rest/OptionsAction.php | 1 + framework/rest/Serializer.php | 1 + framework/rest/UpdateAction.php | 1 + framework/rest/UrlRule.php | 1 + framework/rest/ViewAction.php | 1 + framework/test/ActiveFixture.php | 2 +- framework/test/ArrayFixture.php | 1 + framework/test/BaseActiveFixture.php | 1 + framework/test/DbFixture.php | 1 + framework/test/FileFixtureTrait.php | 2 +- framework/test/Fixture.php | 1 + framework/test/FixtureTrait.php | 1 + framework/test/InitDbFixture.php | 1 + framework/validators/BooleanValidator.php | 1 + framework/validators/CompareValidator.php | 1 + framework/validators/DateValidator.php | 1 + .../validators/DefaultValueValidator.php | 1 + framework/validators/EachValidator.php | 1 + framework/validators/EmailValidator.php | 1 + framework/validators/ExistValidator.php | 6 +- framework/validators/FileValidator.php | 1 + framework/validators/FilterValidator.php | 1 + framework/validators/ImageValidator.php | 1 + framework/validators/InlineValidator.php | 1 + framework/validators/IpValidator.php | 1 + framework/validators/NumberValidator.php | 1 + framework/validators/PunycodeAsset.php | 1 + framework/validators/RangeValidator.php | 7 +- .../validators/RegularExpressionValidator.php | 1 + framework/validators/RequiredValidator.php | 1 + framework/validators/SafeValidator.php | 1 + framework/validators/StringValidator.php | 1 + framework/validators/TrimValidator.php | 1 + framework/validators/UniqueValidator.php | 1 + framework/validators/UrlValidator.php | 1 + framework/validators/ValidationAsset.php | 1 + framework/validators/Validator.php | 1 + framework/views/addColumnMigration.php | 2 + framework/views/createJunctionMigration.php | 2 + framework/views/createTableMigration.php | 2 + framework/views/dropColumnMigration.php | 2 + framework/views/dropTableMigration.php | 2 + framework/views/migration.php | 2 + framework/web/Application.php | 1 + framework/web/AssetBundle.php | 1 + framework/web/AssetConverter.php | 1 + framework/web/AssetConverterInterface.php | 1 + framework/web/AssetManager.php | 1 + framework/web/BadRequestHttpException.php | 1 + framework/web/CacheSession.php | 1 + framework/web/CompositeUrlRule.php | 1 + framework/web/ConflictHttpException.php | 1 + framework/web/Controller.php | 1 + framework/web/Cookie.php | 1 + framework/web/CookieCollection.php | 1 + framework/web/DbSession.php | 3 +- framework/web/ErrorAction.php | 1 + framework/web/ErrorHandler.php | 1 + framework/web/ForbiddenHttpException.php | 1 + framework/web/GoneHttpException.php | 1 + framework/web/GroupUrlRule.php | 1 + framework/web/HeaderCollection.php | 1 + framework/web/HeadersAlreadySentException.php | 1 + framework/web/HtmlResponseFormatter.php | 1 + framework/web/HttpException.php | 1 + framework/web/IdentityInterface.php | 1 + framework/web/JqueryAsset.php | 1 + framework/web/JsExpression.php | 1 + framework/web/JsonParser.php | 1 + framework/web/JsonResponseFormatter.php | 4 +- framework/web/Link.php | 1 + framework/web/Linkable.php | 1 + .../web/MethodNotAllowedHttpException.php | 1 + framework/web/MultiFieldSession.php | 1 + framework/web/MultipartFormDataParser.php | 1 + framework/web/NotAcceptableHttpException.php | 1 + framework/web/NotFoundHttpException.php | 1 + .../web/RangeNotSatisfiableHttpException.php | 1 + framework/web/Request.php | 23 +- framework/web/RequestParserInterface.php | 1 + framework/web/Response.php | 1 + framework/web/ResponseFormatterInterface.php | 1 + framework/web/ServerErrorHttpException.php | 1 + framework/web/Session.php | 18 +- framework/web/SessionIterator.php | 1 + .../web/TooManyRequestsHttpException.php | 1 + framework/web/UnauthorizedHttpException.php | 1 + .../web/UnprocessableEntityHttpException.php | 1 + .../web/UnsupportedMediaTypeHttpException.php | 1 + framework/web/UploadedFile.php | 1 + framework/web/UrlManager.php | 1 + framework/web/UrlNormalizer.php | 1 + .../web/UrlNormalizerRedirectException.php | 1 + framework/web/UrlRule.php | 1 + framework/web/UrlRuleInterface.php | 1 + framework/web/User.php | 4 +- framework/web/UserEvent.php | 1 + framework/web/View.php | 1 + framework/web/ViewAction.php | 1 + framework/web/XmlResponseFormatter.php | 4 +- framework/web/YiiAsset.php | 1 + .../m160313_153426_session_init.php | 1 + framework/widgets/ActiveField.php | 1 + framework/widgets/ActiveForm.php | 1 + framework/widgets/ActiveFormAsset.php | 1 + framework/widgets/BaseListView.php | 1 + framework/widgets/Block.php | 1 + framework/widgets/Breadcrumbs.php | 1 + framework/widgets/ContentDecorator.php | 1 + framework/widgets/DetailView.php | 1 + framework/widgets/FragmentCache.php | 1 + framework/widgets/InputWidget.php | 1 + framework/widgets/LinkPager.php | 1 + framework/widgets/LinkSorter.php | 1 + framework/widgets/ListView.php | 1 + framework/widgets/MaskedInput.php | 1 + framework/widgets/MaskedInputAsset.php | 1 + framework/widgets/Menu.php | 1 + framework/widgets/Pjax.php | 1 + framework/widgets/PjaxAsset.php | 1 + framework/widgets/Spaceless.php | 1 + phpcs.xml.dist | 18 + tests/framework/log/TargetTest.php | 7 +- 521 files changed, 1265 insertions(+), 2619 deletions(-) create mode 100644 .github/workflows/lint.yaml delete mode 100644 .php_cs delete mode 100644 cs/TODO.md delete mode 100644 cs/src/YiiConfig.php delete mode 100644 cs/src/YiisoftConfig.php create mode 100644 phpcs.xml.dist diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 00000000000..17e514f9588 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,22 @@ +name: lint + +on: [push, pull_request] + +jobs: + phpcs: + runs-on: ubuntu-latest + name: PHP_CodeSniffer + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + tools: cs2pr + + - name: Install dependencies + run: composer install --prefer-dist + + - name: Run phpcs + run: vendor/bin/phpcs -q --report=checkstyle framework/ | cs2pr diff --git a/.php_cs b/.php_cs deleted file mode 100644 index 0350dff093c..00000000000 --- a/.php_cs +++ /dev/null @@ -1,27 +0,0 @@ -setCacheFile(__DIR__ . '/tests/runtime/php_cs.cache') - ->mergeRules([ - 'braces' => [ - 'allow_single_line_closure' => true, - ], - ]) - ->setFinder( - PhpCsFixer\Finder::create() - ->in(__DIR__) - ->exclude('docs') - ->exclude('apps') - ->exclude('extensions') - // requirement checker should work even on PHP 4.3, so it needs special treatment - ->exclude('framework/requirements') - ->notPath('framework/classes.php') - ->notPath('framework/helpers/mimeTypes.php') - ->notPath('framework/views/messageConfig.php') - ); diff --git a/composer.json b/composer.json index ef5d068f59d..937900a8004 100644 --- a/composer.json +++ b/composer.json @@ -85,8 +85,9 @@ "cweagans/composer-patches": "^1.7", "phpunit/phpunit": "4.8.34", "cebe/indent": "~1.0.2", - "friendsofphp/php-cs-fixer": "~2.2.3 | ^3.0", - "johnkary/phpunit-speedtrap": "^1.0" + "johnkary/phpunit-speedtrap": "^1.0", + "dealerdirect/phpcodesniffer-composer-installer": "*", + "yiisoft/yii2-coding-standards": "^3.0" }, "repositories": [ { @@ -104,7 +105,6 @@ }, "autoload-dev": { "psr-4": { - "yii\\cs\\": "cs/src/", "yii\\build\\": "build/", "yiiunit\\": "tests/" } @@ -112,7 +112,8 @@ "config": { "allow-plugins": { "cweagans/composer-patches": true, - "yiisoft/yii2-composer": true + "yiisoft/yii2-composer": true, + "dealerdirect/phpcodesniffer-composer-installer": true } }, "bin": [ diff --git a/composer.lock b/composer.lock index e3b8a15c6c7..0b04891c850 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9ee35a67e578251573a9017059b62b76", + "content-hash": "7f989051117a0e72e6e59f7e1e568220", "packages": [ { "name": "bower-asset/inputmask", @@ -29,16 +29,16 @@ }, { "name": "bower-asset/jquery", - "version": "3.6.4", + "version": "3.7.1", "source": { "type": "git", - "url": "git@github.com:jquery/jquery-dist.git", - "reference": "91ef2d8836342875f2519b5815197ea0f23613cf" + "url": "https://github.com/jquery/jquery-dist.git", + "reference": "fde1f76e2799dd877c176abde0ec836553246991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jquery/jquery-dist/zipball/91ef2d8836342875f2519b5815197ea0f23613cf", - "reference": "91ef2d8836342875f2519b5815197ea0f23613cf" + "url": "https://api.github.com/repos/jquery/jquery-dist/zipball/fde1f76e2799dd877c176abde0ec836553246991", + "reference": "fde1f76e2799dd877c176abde0ec836553246991" }, "type": "bower-asset", "license": [ @@ -47,16 +47,16 @@ }, { "name": "bower-asset/punycode", - "version": "v2.2.3", + "version": "v2.3.1", "source": { "type": "git", "url": "https://github.com/mathiasbynens/punycode.js.git", - "reference": "46d412120e2feb868876769a9847790ba278c882" + "reference": "9e1b2cda98d215d3a73fcbfe93c62e021f4ba768" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mathiasbynens/punycode.js/zipball/46d412120e2feb868876769a9847790ba278c882", - "reference": "46d412120e2feb868876769a9847790ba278c882" + "url": "https://api.github.com/repos/mathiasbynens/punycode.js/zipball/9e1b2cda98d215d3a73fcbfe93c62e021f4ba768", + "reference": "9e1b2cda98d215d3a73fcbfe93c62e021f4ba768" }, "type": "bower-asset" }, @@ -371,224 +371,6 @@ }, "time": "2014-05-23T14:40:08+00:00" }, - { - "name": "composer/pcre", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/composer/pcre.git", - "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/00104306927c7a0919b4ced2aaa6782c1e61a3c9", - "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.3", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Pcre\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "PCRE wrapping library that offers type-safe preg_* replacements.", - "keywords": [ - "PCRE", - "preg", - "regex", - "regular expression" - ], - "support": { - "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.1" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2023-10-11T07:11:09+00:00" - }, - { - "name": "composer/semver", - "version": "3.4.0", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.4", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "support": { - "irc": "ircs://irc.libera.chat:6697/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.0" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2023-08-31T09:50:34+00:00" - }, - { - "name": "composer/xdebug-handler", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "ced299686f41dce890debac69273b47ffe98a40c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", - "reference": "ced299686f41dce890debac69273b47ffe98a40c", - "shasum": "" - }, - "require": { - "composer/pcre": "^1 || ^2 || ^3", - "php": "^7.2.5 || ^8.0", - "psr/log": "^1 || ^2 || ^3" - }, - "require-dev": { - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Composer\\XdebugHandler\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" - } - ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-02-25T21:32:43+00:00" - }, { "name": "cweagans/composer-patches", "version": "1.7.3", @@ -638,40 +420,39 @@ "time": "2022-12-20T22:53:13+00:00" }, { - "name": "doctrine/annotations", - "version": "1.14.3", + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af" + "url": "https://github.com/PHPCSStandards/composer-installer.git", + "reference": "4be43904336affa5c2f70744a348312336afd0da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", - "reference": "fb0d71a7393298a7b232cbf4c8b1f73f3ec3d5af", + "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da", + "reference": "4be43904336affa5c2f70744a348312336afd0da", "shasum": "" }, "require": { - "doctrine/lexer": "^1 || ^2", - "ext-tokenizer": "*", - "php": "^7.1 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.4", + "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" }, "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "~1.4.10 || ^1.8.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^4.4 || ^5.4 || ^6", - "vimeo/psalm": "^4.10" + "composer/composer": "*", + "ext-json": "*", + "ext-zip": "*", + "php-parallel-lint/php-parallel-lint": "^1.3.1", + "phpcompatibility/php-compatibility": "^9.0", + "yoast/phpunit-polyfills": "^1.0" }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" + "type": "composer-plugin", + "extra": { + "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" }, - "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -680,85 +461,41 @@ ], "authors": [ { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" }, { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors" } ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.14.3" - }, - "time": "2023-02-01T09:20:38+00:00" - }, - { - "name": "doctrine/deprecations", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/doctrine/deprecations.git", - "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931", - "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "1.4.10 || 1.10.15", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "0.18.4", - "psr/log": "^1 || ^2 || ^3", - "vimeo/psalm": "4.30.0 || 5.12.0" - }, - "suggest": { - "psr/log": "Allows logging deprecations via PSR-3 logger implementation" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcbf", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" ], - "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", - "homepage": "https://www.doctrine-project.org/", "support": { - "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.2" + "issues": "https://github.com/PHPCSStandards/composer-installer/issues", + "source": "https://github.com/PHPCSStandards/composer-installer" }, - "time": "2023-09-27T20:04:15+00:00" + "time": "2023-01-05T11:28:13+00:00" }, { "name": "doctrine/instantiator", @@ -831,34 +568,32 @@ "time": "2022-12-30T00:15:36+00:00" }, { - "name": "doctrine/lexer", - "version": "2.1.0", + "name": "johnkary/phpunit-speedtrap", + "version": "v1.1.0", "source": { "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" + "url": "https://github.com/johnkary/phpunit-speedtrap.git", + "reference": "f7cfe17c5a7076ed0ccca5450fe3bb981ec56361" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", - "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "url": "https://api.github.com/repos/johnkary/phpunit-speedtrap/zipball/f7cfe17c5a7076ed0ccca5450fe3bb981ec56361", + "reference": "f7cfe17c5a7076ed0ccca5450fe3bb981ec56361", "shasum": "" }, "require": { - "doctrine/deprecations": "^1.0", - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^4.11 || ^5.0" + "php": ">=5.6", + "phpunit/phpunit": ">=4.7,<6.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "src" + "psr-0": { + "JohnKary": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -867,276 +602,58 @@ ], "authors": [ { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" + "name": "John Kary", + "email": "john@johnkary.net" } ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "description": "Find slow tests in your PHPUnit test suite", + "homepage": "https://github.com/johnkary/phpunit-speedtrap", "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" + "phpunit", + "profile", + "slow" ], "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/2.1.0" + "issues": "https://github.com/johnkary/phpunit-speedtrap/issues", + "source": "https://github.com/johnkary/phpunit-speedtrap/tree/1.1" }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2022-12-14T08:49:07+00:00" + "time": "2017-03-25T17:14:26+00:00" }, { - "name": "friendsofphp/php-cs-fixer", - "version": "v3.9.5", + "name": "phpdocumentor/reflection-docblock", + "version": "2.0.5", "source": { "type": "git", - "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "4465d70ba776806857a1ac2a6f877e582445ff36" + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/4465d70ba776806857a1ac2a6f877e582445ff36", - "reference": "4465d70ba776806857a1ac2a6f877e582445ff36", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e6a969a640b00d8daa3c66518b0405fb41ae0c4b", + "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b", "shasum": "" }, "require": { - "composer/semver": "^3.2", - "composer/xdebug-handler": "^3.0.3", - "doctrine/annotations": "^1.13", - "ext-json": "*", - "ext-tokenizer": "*", - "php": "^7.4 || ^8.0", - "php-cs-fixer/diff": "^2.0", - "symfony/console": "^5.4 || ^6.0", - "symfony/event-dispatcher": "^5.4 || ^6.0", - "symfony/filesystem": "^5.4 || ^6.0", - "symfony/finder": "^5.4 || ^6.0", - "symfony/options-resolver": "^5.4 || ^6.0", - "symfony/polyfill-mbstring": "^1.23", - "symfony/polyfill-php80": "^1.25", - "symfony/polyfill-php81": "^1.25", - "symfony/process": "^5.4 || ^6.0", - "symfony/stopwatch": "^5.4 || ^6.0" + "php": ">=5.3.3" }, "require-dev": { - "justinrainbow/json-schema": "^5.2", - "keradus/cli-executor": "^1.5", - "mikey179/vfsstream": "^1.6.10", - "php-coveralls/php-coveralls": "^2.5.2", - "php-cs-fixer/accessible-object": "^1.1", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy": "^1.15", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5", - "phpunitgoodpractices/polyfill": "^1.5", - "phpunitgoodpractices/traits": "^1.9.1", - "symfony/phpunit-bridge": "^6.0", - "symfony/yaml": "^5.4 || ^6.0" + "phpunit/phpunit": "~4.0" }, "suggest": { - "ext-dom": "For handling output formats in XML", - "ext-mbstring": "For handling non-UTF8 characters." + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } }, - "bin": [ - "php-cs-fixer" - ], - "type": "application", "autoload": { - "psr-4": { - "PhpCsFixer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Dariusz Rumiński", - "email": "dariusz.ruminski@gmail.com" - } - ], - "description": "A tool to automatically fix PHP code style", - "support": { - "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.9.5" - }, - "funding": [ - { - "url": "https://github.com/keradus", - "type": "github" - } - ], - "time": "2022-07-22T08:43:51+00:00" - }, - { - "name": "johnkary/phpunit-speedtrap", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/johnkary/phpunit-speedtrap.git", - "reference": "f7cfe17c5a7076ed0ccca5450fe3bb981ec56361" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/johnkary/phpunit-speedtrap/zipball/f7cfe17c5a7076ed0ccca5450fe3bb981ec56361", - "reference": "f7cfe17c5a7076ed0ccca5450fe3bb981ec56361", - "shasum": "" - }, - "require": { - "php": ">=5.6", - "phpunit/phpunit": ">=4.7,<6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-0": { - "JohnKary": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Kary", - "email": "john@johnkary.net" - } - ], - "description": "Find slow tests in your PHPUnit test suite", - "homepage": "https://github.com/johnkary/phpunit-speedtrap", - "keywords": [ - "phpunit", - "profile", - "slow" - ], - "support": { - "issues": "https://github.com/johnkary/phpunit-speedtrap/issues", - "source": "https://github.com/johnkary/phpunit-speedtrap/tree/1.1" - }, - "time": "2017-03-25T17:14:26+00:00" - }, - { - "name": "php-cs-fixer/diff", - "version": "v2.0.2", - "source": { - "type": "git", - "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/29dc0d507e838c4580d018bd8b5cb412474f7ec3", - "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", - "symfony/process": "^3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "sebastian/diff v3 backport support for PHP 5.6+", - "homepage": "https://github.com/PHP-CS-Fixer", - "keywords": [ - "diff" - ], - "support": { - "issues": "https://github.com/PHP-CS-Fixer/diff/issues", - "source": "https://github.com/PHP-CS-Fixer/diff/tree/v2.0.2" - }, - "abandoned": true, - "time": "2020-10-14T08:32:19+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "2.0.5", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e6a969a640b00d8daa3c66518b0405fb41ae0c4b", - "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/" - ] + "psr-0": { + "phpDocumentor": [ + "src/" + ] } }, "notification-url": "https://packagist.org/downloads/", @@ -1625,397 +1142,195 @@ "time": "2015-10-02T06:51:40+00:00" }, { - "name": "psr/cache", - "version": "3.0.0", + "name": "sebastian/comparator", + "version": "1.2.4", "source": { "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", "shasum": "" }, "require": { - "php": ">=8.0.0" + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Common interface for caching libraries", + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", "keywords": [ - "cache", - "psr", - "psr-6" + "comparator", + "compare", + "equality" ], "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/1.2" }, - "time": "2021-02-03T23:26:27+00:00" + "time": "2017-01-29T09:50:25+00:00" }, { - "name": "psr/container", - "version": "2.0.2", + "name": "sebastian/diff", + "version": "1.4.1", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", "shasum": "" }, "require": { - "php": ">=7.4.0" + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.4-dev" } }, "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" + "diff" ], "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/master" }, - "time": "2021-11-05T16:47:00+00:00" + "time": "2015-12-08T07:14:41+00:00" }, { - "name": "psr/event-dispatcher", - "version": "1.0.0", + "name": "sebastian/environment", + "version": "1.3.7", "source": { "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716", + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Standard interfaces for event handling.", + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", "keywords": [ - "events", - "psr", - "psr-14" + "Xdebug", + "environment", + "hhvm" ], "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/1.3.7" }, - "time": "2019-01-08T18:20:26+00:00" + "time": "2016-05-17T03:18:57+00:00" }, { - "name": "psr/log", - "version": "3.0.0", + "name": "sebastian/exporter", + "version": "1.2.2", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" - }, - "time": "2021-07-14T16:46:02+00:00" - }, - { - "name": "sebastian/comparator", - "version": "1.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/1.2" - }, - "time": "2017-01-29T09:50:25+00:00" - }, - { - "name": "sebastian/diff", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/master" - }, - "time": "2015-12-08T07:14:41+00:00" - }, - { - "name": "sebastian/environment", - "version": "1.3.7", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716", - "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/1.3.7" - }, - "time": "2016-05-17T03:18:57+00:00" - }, - { - "name": "sebastian/exporter", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", "shasum": "" }, "require": { @@ -2128,1272 +1443,221 @@ "issues": "https://github.com/sebastianbergmann/global-state/issues", "source": "https://github.com/sebastianbergmann/global-state/tree/1.1.1" }, - "time": "2015-10-12T03:26:01+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/master" - }, - "time": "2016-10-03T07:41:43+00:00" - }, - { - "name": "sebastian/version", - "version": "1.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/1.0.6" - }, - "time": "2015-06-21T13:59:46+00:00" - }, - { - "name": "symfony/console", - "version": "v6.3.8", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0d14a9f6d04d4ac38a8cea1171f4554e325dae92", - "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^5.4|^6.0" - }, - "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/dotenv": "<5.4", - "symfony/event-dispatcher": "<5.4", - "symfony/lock": "<5.4", - "symfony/process": "<5.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0|3.0" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/lock": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/var-dumper": "^5.4|^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", - "keywords": [ - "cli", - "command-line", - "console", - "terminal" - ], - "support": { - "source": "https://github.com/symfony/console/tree/v6.3.8" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-10-31T08:09:35+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v3.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.4-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-05-23T14:45:45+00:00" - }, - { - "name": "symfony/event-dispatcher", - "version": "v6.3.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/adb01fe097a4ee930db9258a3cc906b5beb5cf2e", - "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/event-dispatcher-contracts": "^2.5|^3" - }, - "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/service-contracts": "<2.5" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0|3.0" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/error-handler": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/http-foundation": "^5.4|^6.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/stopwatch": "^5.4|^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-07-06T06:56:43+00:00" - }, - { - "name": "symfony/event-dispatcher-contracts", - "version": "v3.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "a76aed96a42d2b521153fb382d418e30d18b59df" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/a76aed96a42d2b521153fb382d418e30d18b59df", - "reference": "a76aed96a42d2b521153fb382d418e30d18b59df", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/event-dispatcher": "^1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.4-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to dispatching event", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.4.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-05-23T14:45:45+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v6.3.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", - "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides basic utilities for the filesystem", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.3.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-06-01T08:30:39+00:00" - }, - { - "name": "symfony/finder", - "version": "v6.3.5", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/a1b31d88c0e998168ca7792f222cbecee47428c4", - "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "require-dev": { - "symfony/filesystem": "^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/finder/tree/v6.3.5" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-09-26T12:56:25+00:00" - }, - { - "name": "symfony/options-resolver", - "version": "v6.3.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/options-resolver.git", - "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/a10f19f5198d589d5c33333cffe98dc9820332dd", - "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\OptionsResolver\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an improved replacement for the array_replace PHP function", - "homepage": "https://symfony.com", - "keywords": [ - "config", - "configuration", - "options" - ], - "support": { - "source": "https://github.com/symfony/options-resolver/tree/v6.3.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-05-12T14:21:09+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.28.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-01-26T09:26:14+00:00" - }, - { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.28.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "875e90aeea2777b6f135677f618529449334a612" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", - "reference": "875e90aeea2777b6f135677f618529449334a612", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's grapheme_* functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-01-26T09:26:14+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.28.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-01-26T09:26:14+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-07-28T09:04:16+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.28.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2015-10-12T03:26:01+00:00" }, { - "name": "symfony/polyfill-php81", - "version": "v1.28.0", + "name": "sebastian/recursion-context", + "version": "1.0.5", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", - "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.28-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "1.0.x-dev" } }, "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, "classmap": [ - "Resources/stubs" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" }, { - "url": "https://github.com/fabpot", - "type": "github" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" }, { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" + "name": "Adam Harvey", + "email": "aharvey@php.net" } ], - "time": "2023-01-26T09:26:14+00:00" + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/master" + }, + "time": "2016-10-03T07:41:43+00:00" }, { - "name": "symfony/process", - "version": "v6.3.4", + "name": "sebastian/version", + "version": "1.0.6", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/0b5c29118f2e980d455d2e34a5659f4579847c54", - "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", "shasum": "" }, - "require": { - "php": ">=8.1" - }, "type": "library", "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Executes commands in sub-processes", - "homepage": "https://symfony.com", + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", "support": { - "source": "https://github.com/symfony/process/tree/v6.3.4" + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/1.0.6" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-08-07T10:39:22+00:00" + "time": "2015-06-21T13:59:46+00:00" }, { - "name": "symfony/service-contracts", - "version": "v3.4.0", + "name": "squizlabs/php_codesniffer", + "version": "3.9.0", "source": { "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838" + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/b3313c2dbffaf71c8de2934e2ea56ed2291a3838", - "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/d63cee4890a8afaf86a22e51ad4d97c91dd4579b", + "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b", "shasum": "" }, "require": { - "php": ">=8.1", - "psr/container": "^2.0" + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" }, - "conflict": { - "ext-psr": "<1.1|>=2" + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" }, + "bin": [ + "bin/phpcbf", + "bin/phpcs" + ], "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "dev-master": "3.x-dev" } }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Greg Sherwood", + "role": "Former lead" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" + "phpcs", + "standards", + "static analysis" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.4.0" + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" + "url": "https://github.com/PHPCSStandards", + "type": "github" }, { - "url": "https://github.com/fabpot", + "url": "https://github.com/jrfnl", "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" } ], - "time": "2023-07-30T20:28:31+00:00" + "time": "2024-02-16T15:06:51+00:00" }, { - "name": "symfony/stopwatch", - "version": "v6.3.0", + "name": "symfony/polyfill-ctype", + "version": "v1.29.0", "source": { "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", - "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/service-contracts": "^2.5|^3" + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" }, "type": "library", + "extra": { + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3401,18 +1665,24 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Provides a way to profile code", + "description": "Symfony polyfill for ctype functions", "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.3.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" }, "funding": [ { @@ -3428,46 +1698,39 @@ "type": "tidelift" } ], - "time": "2023-02-16T10:14:28+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { - "name": "symfony/string", - "version": "v6.3.8", + "name": "symfony/yaml", + "version": "v3.4.47", "source": { "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "13880a87790c76ef994c91e87efb96134522577a" + "url": "https://github.com/symfony/yaml.git", + "reference": "88289caa3c166321883f67fe5130188ebbb47094" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/13880a87790c76ef994c91e87efb96134522577a", - "reference": "13880a87790c76ef994c91e87efb96134522577a", + "url": "https://api.github.com/repos/symfony/yaml/zipball/88289caa3c166321883f67fe5130188ebbb47094", + "reference": "88289caa3c166321883f67fe5130188ebbb47094", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0" + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8" }, "conflict": { - "symfony/translation-contracts": "<2.5" + "symfony/console": "<3.4" }, "require-dev": { - "symfony/error-handler": "^5.4|^6.0", - "symfony/http-client": "^5.4|^6.0", - "symfony/intl": "^6.2", - "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^5.4|^6.0" + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" }, "type": "library", "autoload": { - "files": [ - "Resources/functions.php" - ], "psr-4": { - "Symfony\\Component\\String\\": "" + "Symfony\\Component\\Yaml\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -3479,26 +1742,18 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "keywords": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.8" + "source": "https://github.com/symfony/yaml/tree/v3.4.47" }, "funding": [ { @@ -3514,78 +1769,93 @@ "type": "tidelift" } ], - "time": "2023-11-09T08:28:21+00:00" + "time": "2020-10-24T10:57:07+00:00" }, { - "name": "symfony/yaml", - "version": "v3.4.47", + "name": "yiisoft/yii2-coding-standards", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "88289caa3c166321883f67fe5130188ebbb47094" + "url": "https://github.com/yiisoft/yii2-coding-standards.git", + "reference": "8bc39acaae848aec1ad52b2af4cf380e3f0b104e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/88289caa3c166321883f67fe5130188ebbb47094", - "reference": "88289caa3c166321883f67fe5130188ebbb47094", + "url": "https://api.github.com/repos/yiisoft/yii2-coding-standards/zipball/8bc39acaae848aec1ad52b2af4cf380e3f0b104e", + "reference": "8bc39acaae848aec1ad52b2af4cf380e3f0b104e", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", - "symfony/polyfill-ctype": "~1.8" - }, - "conflict": { - "symfony/console": "<3.4" - }, - "require-dev": { - "symfony/console": "~3.4|~4.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" + "php": ">=5.4.0", + "squizlabs/php_codesniffer": ">=3.2" }, - "type": "library", + "type": "phpcodesniffer-standard", "autoload": { "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "yii\\console\\controllers\\": "src/console/controllers/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Qiang Xue", + "email": "qiang.xue@gmail.com", + "homepage": "https://www.yiiframework.com/", + "role": "Founder and project lead" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Alexander Makarov", + "email": "sam@rmcreative.ru", + "homepage": "https://rmcreative.ru/", + "role": "Core framework development" + }, + { + "name": "Maurizio Domba", + "homepage": "https://mdomba.info/", + "role": "Core framework development" + }, + { + "name": "Carsten Brandt", + "email": "mail@cebe.cc", + "homepage": "https://cebe.cc/", + "role": "Core framework development" + }, + { + "name": "Timur Ruziev", + "email": "resurtm@gmail.com", + "homepage": "https://resurtm.com/", + "role": "Core framework development" + }, + { + "name": "Paul Klimov", + "email": "klimov.paul@gmail.com", + "role": "Core framework development" } ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", + "description": "Yii PHP Framework Version 2 - Coding standard tools", + "homepage": "https://www.yiiframework.com/", + "keywords": [ + "codesniffer", + "framework", + "yii" + ], "support": { - "source": "https://github.com/symfony/yaml/tree/v3.4.47" + "forum": "https://www.yiiframework.com/forum/", + "irc": "ircs://irc.libera.chat:6697/yii", + "issues": "https://github.com/yiisoft/yii2/issues?state=open", + "source": "https://github.com/yiisoft/yii2", + "wiki": "https://www.yiiframework.com/wiki/" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" + "url": "https://opencollective.com/yiisoft", + "type": "open_collective" } ], - "time": "2020-10-24T10:57:07+00:00" + "time": "2024-03-15T12:57:48+00:00" } ], "aliases": [], diff --git a/cs/TODO.md b/cs/TODO.md deleted file mode 100644 index 79862057096..00000000000 --- a/cs/TODO.md +++ /dev/null @@ -1 +0,0 @@ -This should be moved to separate package, like `yii\yii2-cs`. diff --git a/cs/src/YiiConfig.php b/cs/src/YiiConfig.php deleted file mode 100644 index 582ab283bf0..00000000000 --- a/cs/src/YiiConfig.php +++ /dev/null @@ -1,172 +0,0 @@ - - * @since 2.0.0 - */ -class YiiConfig extends Config -{ - /** - * {@inheritdoc} - */ - public function __construct($name = 'yii-cs-config') - { - parent::__construct($name); - - $this->setRiskyAllowed(true); - - $this->setRules([ - '@PSR2' => true, - 'array_syntax' => [ - 'syntax' => 'short', - ], - 'binary_operator_spaces' => [ - 'align_double_arrow' => false, - 'align_equals' => false, - ], - 'blank_line_after_opening_tag' => true, - 'cast_spaces' => true, - 'concat_space' => [ - 'spacing' => 'one', - ], - 'dir_constant' => true, - 'ereg_to_preg' => true, - 'function_typehint_space' => true, - 'hash_to_slash_comment' => true, - 'include' => true, - 'heredoc_to_nowdoc' => true, - 'is_null' => [ - 'use_yoda_style' => false, - ], - 'linebreak_after_opening_tag' => true, - 'lowercase_cast' => true, - 'magic_constant_casing' => true, -// 'mb_str_functions' => true, // needs more discussion -// 'method_separation' => true, // conflicts with current Yii style with double line between properties and methods - 'modernize_types_casting' => true, - 'native_function_casing' => true, - 'new_with_braces' => true, - 'no_alias_functions' => true, - 'no_blank_lines_after_class_opening' => true, - 'no_blank_lines_after_phpdoc' => true, - 'no_empty_comment' => true, - 'no_empty_phpdoc' => true, - 'no_empty_statement' => true, - 'no_extra_consecutive_blank_lines' => [ - 'tokens' => [ - 'break', - 'continue', -// 'extra', // conflicts with current Yii style with double line between properties and methods - 'return', - 'throw', - 'use', - 'use_trait', -// 'curly_brace_block', // breaks namespaces blocks - 'parenthesis_brace_block', - 'square_brace_block', - ], - ], - 'no_leading_import_slash' => true, - 'no_leading_namespace_whitespace' => true, - 'no_mixed_echo_print' => true, - 'no_multiline_whitespace_around_double_arrow' => true, - 'no_multiline_whitespace_before_semicolons' => true, - 'no_php4_constructor' => true, - 'no_short_bool_cast' => true, - 'no_singleline_whitespace_before_semicolons' => true, - 'no_spaces_around_offset' => true, - 'no_trailing_comma_in_list_call' => true, - 'no_trailing_comma_in_singleline_array' => true, - 'no_unneeded_control_parentheses' => true, - 'no_unused_imports' => true, - 'no_useless_else' => true, - 'no_useless_return' => true, - 'no_whitespace_before_comma_in_array' => true, - 'no_whitespace_in_blank_line' => true, - 'non_printable_character' => true, - 'normalize_index_brace' => true, - 'object_operator_without_whitespace' => true, -// 'ordered_class_elements' => [ // needs more discussion -// 'order' => [ -// 'use_trait', -// 'constant_public', -// 'constant_protected', -// 'constant_private', -// 'property_public', -// 'property_protected', -// 'property_private', -// 'construct', -// 'destruct', -// 'magic', -// ], -// ], - 'ordered_imports' => [ - 'sortAlgorithm' => 'alpha', - 'importsOrder' => [ - 'const', - 'function', - 'class', - ], - ], - 'php_unit_construct' => true, - 'php_unit_dedicate_assert' => true, - 'php_unit_fqcn_annotation' => true, -// 'php_unit_strict' => true, // needs more attention - 'phpdoc_add_missing_param_annotation' => true, - 'phpdoc_indent' => true, -// 'phpdoc_inline_tag' => true, // see https://github.com/yiisoft/yii2/issues/11635 - 'phpdoc_no_access' => true, - 'phpdoc_no_empty_return' => true, - 'phpdoc_no_package' => true, - 'phpdoc_no_useless_inheritdoc' => true, -// 'phpdoc_order', // may be useful, but should be configurable: https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/1602 - 'phpdoc_return_self_reference' => true, - 'phpdoc_scalar' => true, - 'phpdoc_single_line_var_spacing' => true, - 'phpdoc_summary' => true, -// 'phpdoc_to_comment' => true, // breaks phpdoc for define('CONSTANT', $value); - 'phpdoc_trim' => true, - 'phpdoc_types' => true, - 'phpdoc_var_without_name' => true, - 'protected_to_private' => true, - 'psr4' => true, - 'self_accessor' => true, - 'short_scalar_cast' => true, - 'single_blank_line_before_namespace' => true, - 'single_quote' => true, - 'standardize_not_equals' => true, - 'ternary_operator_spaces' => true, - 'trailing_comma_in_multiline_array' => true, - 'trim_array_spaces' => true, - 'unary_operator_spaces' => true, - 'whitespace_after_comma_in_array' => true, - ]); - } - - /** - * Merge current rules' config with provided list of rules. - * - * @param array $rules - * @return $this - * @see setRules() - * @see ArrayHelper::merge() - */ - public function mergeRules(array $rules) - { - $this->setRules(ArrayHelper::merge($this->getRules(), $rules)); - - return $this; - } -} diff --git a/cs/src/YiisoftConfig.php b/cs/src/YiisoftConfig.php deleted file mode 100644 index 16dc6d6f871..00000000000 --- a/cs/src/YiisoftConfig.php +++ /dev/null @@ -1,39 +0,0 @@ - - * @since 2.0.0 - */ -final class YiisoftConfig extends YiiConfig -{ - /** - * {@inheritdoc} - */ - public function __construct() - { - parent::__construct('yiisoft-cs-config'); - - $header = <<<'HEADER' -@link https://www.yiiframework.com/ -@copyright Copyright (c) 2008 Yii Software LLC -@license https://www.yiiframework.com/license/ -HEADER; - - $this->mergeRules([ - 'header_comment' => [ - 'header' => $header, - 'commentType' => 'PHPDoc', - 'separate' => 'bottom', - ], - ]); - } -} diff --git a/framework/BaseYii.php b/framework/BaseYii.php index 496f6aa121a..ff716b4d349 100644 --- a/framework/BaseYii.php +++ b/framework/BaseYii.php @@ -1,4 +1,5 @@ '' . \Yii::t('yii', - 'Yii Framework') . '', + 'yii' => '' . \Yii::t('yii', 'Yii Framework') . '', ]); } diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 9567e04fd97..78ddfdcbb70 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -20,6 +20,7 @@ Yii Framework 2 Change Log - Enh #20042: Add empty array check to `ActiveQueryTrait::findWith()` (renkas) - Enh #20032: Added `yii\helpers\BaseStringHelper::mask()` method for string masking with multibyte support (salehhashemi1992) - Enh #20034: Added `yii\helpers\BaseStringHelper::findBetween()` to retrieve a substring that lies between two strings (salehhashemi1992) +- Enh #20121: Added `yiisoft/yii2-coding-standards` to composer `require-dev` and lint code to comply with PSR12 (razvanphp) 2.0.49.2 October 12, 2023 diff --git a/framework/Yii.php b/framework/Yii.php index d02b95a231a..ee9a1b5dc69 100644 --- a/framework/Yii.php +++ b/framework/Yii.php @@ -1,4 +1,5 @@ * @since 2.0 + * @phpcs:disable PSR1.Files.SideEffects.FoundWithSymbols + * @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace */ class Yii extends \yii\BaseYii { diff --git a/framework/assets/yii.activeForm.js b/framework/assets/yii.activeForm.js index 5b9ce4aaec2..045cfebcaa1 100644 --- a/framework/assets/yii.activeForm.js +++ b/framework/assets/yii.activeForm.js @@ -330,7 +330,7 @@ this.$form = $form; var $input = findInput($form, this); - var disabled = $input.toArray().reduce(function(result, next) { + var disabled = $input.toArray().reduce(function (result, next) { return result && $(next).is(':disabled'); }, true); if (disabled) { @@ -733,8 +733,7 @@ var errorAttributes = [], $input; $.each(data.attributes, function () { - var hasError = (submitting && updateInput($form, this, messages)) || (!submitting && attrHasError($form, - this, messages)); + var hasError = (submitting && updateInput($form, this, messages)) || (!submitting && attrHasError($form, this, messages)); $input = findInput($form, this); if (!$input.is(':disabled') && !this.cancelled && hasError) { diff --git a/framework/assets/yii.gridView.js b/framework/assets/yii.gridView.js index f02d4d95e94..cdcb3731960 100644 --- a/framework/assets/yii.gridView.js +++ b/framework/assets/yii.gridView.js @@ -198,7 +198,7 @@ $grid.find(checkAllInput + (all ? ":not(:checked)" : ":checked")).prop('checked', all).change(); }; initEventHandler($grid, 'checkRow', 'click.yiiGridView', "#" + id + " " + inputs, handler); - if($grid.find(inputs).length) { + if ($grid.find(inputs).length) { handler(); // Ensure "check all" checkbox is checked on page load if all data row checkboxes are initially checked. } }, @@ -245,7 +245,8 @@ * @param {string} selector jQuery selector * @param {function} callback The actual function to be executed with this event */ - function initEventHandler($gridView, type, event, selector, callback) { + function initEventHandler($gridView, type, event, selector, callback) + { var id = $gridView.attr('id'); var prevHandler = gridEventHandlers[id]; if (prevHandler !== undefined && prevHandler[type] !== undefined) { diff --git a/framework/assets/yii.js b/framework/assets/yii.js index 6384d07d172..e7a61f75456 100644 --- a/framework/assets/yii.js +++ b/framework/assets/yii.js @@ -353,7 +353,8 @@ window.yii = (function ($) { } }; - function initCsrfHandler() { + function initCsrfHandler() + { // automatically send CSRF token for all AJAX requests $.ajaxPrefilter(function (options, originalOptions, xhr) { if (!options.crossDomain && pub.getCsrfParam()) { @@ -363,7 +364,8 @@ window.yii = (function ($) { pub.refreshCsrfToken(); } - function initRedirectHandler() { + function initRedirectHandler() + { // handle AJAX redirection $(document).ajaxComplete(function (event, xhr) { var url = xhr && xhr.getResponseHeader('X-Redirect'); @@ -373,7 +375,8 @@ window.yii = (function ($) { }); } - function initAssetFilters() { + function initAssetFilters() + { /** * Used for storing loaded scripts and information about loading each script if it's in the process of loading. * A single script can have one of the following values: @@ -472,7 +475,8 @@ window.yii = (function ($) { }); } - function initDataMethods() { + function initDataMethods() + { var handler = function (event) { var $this = $(this), method = $this.data('method'), @@ -499,7 +503,8 @@ window.yii = (function ($) { .on('change.yii', pub.changeableSelector, handler); } - function isReloadableAsset(url) { + function isReloadableAsset(url) + { for (var i = 0; i < pub.reloadableScripts.length; i++) { var rule = getAbsoluteUrl(pub.reloadableScripts[i]); var match = new RegExp("^" + escapeRegExp(rule).split('\\*').join('.+') + "$").test(url); @@ -512,7 +517,8 @@ window.yii = (function ($) { } // https://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex/6969486#6969486 - function escapeRegExp(str) { + function escapeRegExp(str) + { return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); } @@ -521,7 +527,8 @@ window.yii = (function ($) { * @param {string} url Initial URL * @returns {string} */ - function getAbsoluteUrl(url) { + function getAbsoluteUrl(url) + { return url.charAt(0) === '/' ? pub.getBaseCurrentUrl() + url : url; } diff --git a/framework/assets/yii.validation.js b/framework/assets/yii.validation.js index 2cae037e3c1..af80bb80493 100644 --- a/framework/assets/yii.validation.js +++ b/framework/assets/yii.validation.js @@ -95,7 +95,7 @@ yii.validation = (function ($) { }, validateImage: function (file, messages, options, deferred, fileReader, image) { - image.onload = function() { + image.onload = function () { validateImageSize(file, image, messages, options); deferred.resolve(); }; @@ -379,7 +379,8 @@ yii.validation = (function ($) { } }; - function getUploadedFiles(attribute, messages, options) { + function getUploadedFiles(attribute, messages, options) + { // Skip validation if File API is not available if (typeof File === "undefined") { return []; @@ -415,12 +416,13 @@ yii.validation = (function ($) { return files; } - function validateFile(file, messages, options) { + function validateFile(file, messages, options) + { if (options.extensions && options.extensions.length > 0) { var found = false; var filename = file.name.toLowerCase(); - for (var index=0; index < options.extensions.length; index++) { + for (var index = 0; index < options.extensions.length; index++) { var ext = options.extensions[index].toLowerCase(); if ((ext === '' && filename.indexOf('.') === -1) || (filename.substr(filename.length - options.extensions[index].length - 1) === ('.' + ext))) { found = true; @@ -448,7 +450,8 @@ yii.validation = (function ($) { } } - function validateMimeType(mimeTypes, fileType) { + function validateMimeType(mimeTypes, fileType) + { for (var i = 0, len = mimeTypes.length; i < len; i++) { if (new RegExp(mimeTypes[i]).test(fileType)) { return true; @@ -458,7 +461,8 @@ yii.validation = (function ($) { return false; } - function validateImageSize(file, image, messages, options) { + function validateImageSize(file, image, messages, options) + { if (options.minWidth && image.width < options.minWidth) { messages.push(options.underWidth.replace(/\{file\}/g, file.name)); } @@ -479,7 +483,8 @@ yii.validation = (function ($) { /** * PHP: `trim($path, ' /')`, JS: `yii.helpers.trim(path, {chars: ' /'})` */ - function trimString(value, options = {skipOnEmpty: true, chars: null}) { + function trimString(value, options = {skipOnEmpty: true, chars: null}) + { if (options.skipOnEmpty !== false && pub.isEmpty(value)) { return value; } diff --git a/framework/base/Action.php b/framework/base/Action.php index 45d95c59cbf..b5d04b80ddd 100644 --- a/framework/base/Action.php +++ b/framework/base/Action.php @@ -1,4 +1,5 @@ controller->bindActionParams($this, $params); - Yii::debug('Running action: ' . get_class($this) . '::run(), invoked by ' . get_class($this->controller), __METHOD__); + Yii::debug('Running action: ' . get_class($this) . '::run(), invoked by ' . get_class($this->controller), __METHOD__); if (Yii::$app->requestedParams === null) { Yii::$app->requestedParams = $args; } diff --git a/framework/base/ActionEvent.php b/framework/base/ActionEvent.php index ab03d7366f1..9cfe64509ce 100644 --- a/framework/base/ActionEvent.php +++ b/framework/base/ActionEvent.php @@ -1,4 +1,5 @@ getName(); if (($component = $this->module->get($name, false)) instanceof $typeName) { $args[] = $component; - $requestedParams[$name] = "Component: " . get_class($component) . " \$$name"; + $requestedParams[$name] = 'Component: ' . get_class($component) . " \$$name"; } elseif ($this->module->has($typeName) && ($service = $this->module->get($typeName)) instanceof $typeName) { $args[] = $service; $requestedParams[$name] = 'Module ' . get_class($this->module) . " DI: $typeName \$$name"; diff --git a/framework/base/DynamicContentAwareInterface.php b/framework/base/DynamicContentAwareInterface.php index 58e2625c550..e605d8568f7 100644 --- a/framework/base/DynamicContentAwareInterface.php +++ b/framework/base/DynamicContentAwareInterface.php @@ -1,4 +1,5 @@ controllerNamespace . '\\' . str_replace('/', '\\', $prefix) . $className, '\\'); if (strpos($className, '-') !== false || !class_exists($className)) { return null; diff --git a/framework/base/NotSupportedException.php b/framework/base/NotSupportedException.php index 4161fb737f4..32a1bed9770 100644 --- a/framework/base/NotSupportedException.php +++ b/framework/base/NotSupportedException.php @@ -1,4 +1,5 @@ 30 ) { diff --git a/framework/base/StaticInstanceInterface.php b/framework/base/StaticInstanceInterface.php index 12cce4bfbc8..0d9af1134b5 100644 --- a/framework/base/StaticInstanceInterface.php +++ b/framework/base/StaticInstanceInterface.php @@ -1,4 +1,5 @@ dynamicPlaceholders[$placeholder] = $statements; -} + } /** * Evaluates the given PHP statements. diff --git a/framework/base/ViewContextInterface.php b/framework/base/ViewContextInterface.php index df2834c0d5c..ef2a1a4377d 100644 --- a/framework/base/ViewContextInterface.php +++ b/framework/base/ViewContextInterface.php @@ -1,4 +1,5 @@ skipUpdateOnClean + if ( + $this->skipUpdateOnClean && $event->name == ActiveRecord::EVENT_BEFORE_UPDATE && empty($this->owner->dirtyAttributes) ) { diff --git a/framework/behaviors/AttributeTypecastBehavior.php b/framework/behaviors/AttributeTypecastBehavior.php index a418b15de25..e2bde1b9a98 100644 --- a/framework/behaviors/AttributeTypecastBehavior.php +++ b/framework/behaviors/AttributeTypecastBehavior.php @@ -1,4 +1,5 @@ attributeTypes */ - private static $autoDetectedAttributeTypes = []; + private static $_autoDetectedAttributeTypes = []; /** @@ -193,7 +194,7 @@ class AttributeTypecastBehavior extends Behavior */ public static function clearAutoDetectedAttributeTypes() { - self::$autoDetectedAttributeTypes = []; + self::$_autoDetectedAttributeTypes = []; } /** @@ -205,10 +206,10 @@ public function attach($owner) if ($this->attributeTypes === null) { $ownerClass = get_class($this->owner); - if (!isset(self::$autoDetectedAttributeTypes[$ownerClass])) { - self::$autoDetectedAttributeTypes[$ownerClass] = $this->detectAttributeTypes(); + if (!isset(self::$_autoDetectedAttributeTypes[$ownerClass])) { + self::$_autoDetectedAttributeTypes[$ownerClass] = $this->detectAttributeTypes(); } - $this->attributeTypes = self::$autoDetectedAttributeTypes[$ownerClass]; + $this->attributeTypes = self::$_autoDetectedAttributeTypes[$ownerClass]; } } diff --git a/framework/behaviors/AttributesBehavior.php b/framework/behaviors/AttributesBehavior.php index df093864a34..5ab2ceea0d1 100644 --- a/framework/behaviors/AttributesBehavior.php +++ b/framework/behaviors/AttributesBehavior.php @@ -1,4 +1,5 @@ skipUpdateOnClean + if ( + $this->skipUpdateOnClean && $event->name === ActiveRecord::EVENT_BEFORE_UPDATE && empty($this->owner->dirtyAttributes) ) { @@ -152,7 +154,8 @@ public function evaluateAttributes($event) if (!empty($this->order[$event->name])) { $attributes = array_merge( array_intersect((array) $this->order[$event->name], $attributes), - array_diff($attributes, (array) $this->order[$event->name])); + array_diff($attributes, (array) $this->order[$event->name]) + ); } foreach ($attributes as $attribute) { if ($this->preserveNonEmptyValues && !empty($this->owner->$attribute)) { diff --git a/framework/behaviors/BlameableBehavior.php b/framework/behaviors/BlameableBehavior.php index f83b8b3f28c..f6396c33bfd 100755 --- a/framework/behaviors/BlameableBehavior.php +++ b/framework/behaviors/BlameableBehavior.php @@ -1,4 +1,5 @@ controller instanceof \yii\console\Controller && Yii::$app->controller->isColorEnabled($stream) - || Yii::$app instanceof \yii\console\Application && Console::streamSupportsAnsiColors($stream)) { + if ( + Yii::$app->controller instanceof \yii\console\Controller && Yii::$app->controller->isColorEnabled($stream) + || Yii::$app instanceof \yii\console\Application && Console::streamSupportsAnsiColors($stream) + ) { $message = Console::ansiFormat($message, $format); } diff --git a/framework/console/Exception.php b/framework/console/Exception.php index 59ee7d71acb..784857246da 100644 --- a/framework/console/Exception.php +++ b/framework/console/Exception.php @@ -1,4 +1,5 @@ getActionArgsHelp($action) as $argument => $help) { - $description = preg_replace("~\R~", '', addcslashes($help['comment'], ':')) ?: $argument; + $description = preg_replace('~\R~', '', addcslashes($help['comment'], ':')) ?: $argument; $this->stdout($argument . ':' . $description . "\n"); } $this->stdout("\n"); foreach ($controller->getActionOptionsHelp($action) as $argument => $help) { - $description = preg_replace("~\R~", '', addcslashes($help['comment'], ':')); + $description = preg_replace('~\R~', '', addcslashes($help['comment'], ':')); $this->stdout('--' . $argument . ($description ? ':' . $description : '') . "\n"); } } @@ -440,11 +441,12 @@ protected function getSubCommandHelp($controller, $actionID) if (!empty($args)) { foreach ($args as $name => $arg) { $this->stdout($this->formatOptionHelp( - '- ' . $this->ansiFormat($name, Console::FG_CYAN), - $arg['required'], - $arg['type'], - $arg['default'], - $arg['comment']) . "\n\n"); + '- ' . $this->ansiFormat($name, Console::FG_CYAN), + $arg['required'], + $arg['type'], + $arg['default'], + $arg['comment'] + ) . "\n\n"); } } @@ -452,12 +454,16 @@ protected function getSubCommandHelp($controller, $actionID) $this->stdout("\nOPTIONS\n\n", Console::BOLD); foreach ($options as $name => $option) { $this->stdout($this->formatOptionHelp( - $this->ansiFormat('--' . $name . $this->formatOptionAliases($controller, $name), - Console::FG_RED, empty($option['required']) ? Console::FG_RED : Console::BOLD), - !empty($option['required']), - $option['type'], - $option['default'], - $option['comment']) . "\n\n"); + $this->ansiFormat( + '--' . $name . $this->formatOptionAliases($controller, $name), + Console::FG_RED, + empty($option['required']) ? Console::FG_RED : Console::BOLD + ), + !empty($option['required']), + $option['type'], + $option['default'], + $option['comment'] + ) . "\n\n"); } } } diff --git a/framework/console/controllers/MessageController.php b/framework/console/controllers/MessageController.php index 6d5a7d6448f..a869ab0195a 100644 --- a/framework/console/controllers/MessageController.php +++ b/framework/console/controllers/MessageController.php @@ -1,4 +1,5 @@ stdout('Inserting new messages...'); $insertCount = 0; @@ -392,9 +393,9 @@ protected function saveMessagesToDb($messages, $db, $sourceMessageTable, $messag $db->schema->insert($sourceMessageTable, ['category' => $category, 'message' => $msg]); } } - + $this->stdout($insertCount ? "{$insertCount} saved.\n" : "Nothing to save.\n"); - + $this->stdout($removeUnused ? 'Deleting obsoleted messages...' : 'Updating obsoleted messages...'); if (empty($obsolete)) { @@ -408,13 +409,13 @@ protected function saveMessagesToDb($messages, $db, $sourceMessageTable, $messag ->execute(); $this->stdout("{$affected} deleted.\n"); } elseif ($markUnused) { - $marked=0; + $marked = 0; $rows = (new Query()) ->select(['id', 'message']) ->from($sourceMessageTable) ->where(['in', 'id', array_keys($obsolete)]) ->all($db); - + foreach ($rows as $row) { $marked++; $db->createCommand()->update( @@ -428,64 +429,64 @@ protected function saveMessagesToDb($messages, $db, $sourceMessageTable, $messag $this->stdout("kept untouched.\n"); } } - + // get fresh message id list $freshMessagesIds = []; $rows = (new Query())->select(['id'])->from($sourceMessageTable)->all($db); foreach ($rows as $row) { $freshMessagesIds[] = $row['id']; } - - $this->stdout("Generating missing rows..."); + + $this->stdout('Generating missing rows...'); $generatedMissingRows = []; - + foreach ($languages as $language) { - $count = 0; - - // get list of ids of translations for this language - $msgRowsIds = []; - $msgRows = (new Query())->select(['id'])->from($messageTable)->where([ - 'language'=>$language, - ])->all($db); - foreach ($msgRows as $row) { - $msgRowsIds[] = $row['id']; - } - - // insert missing - foreach ($freshMessagesIds as $id) { - if (!in_array($id, $msgRowsIds)) { - $db->createCommand() - ->insert($messageTable, ['id' => $id, 'language' => $language]) - ->execute(); - $count++; + $count = 0; + + // get list of ids of translations for this language + $msgRowsIds = []; + $msgRows = (new Query())->select(['id'])->from($messageTable)->where([ + 'language' => $language, + ])->all($db); + foreach ($msgRows as $row) { + $msgRowsIds[] = $row['id']; } - } - if ($count) { - $generatedMissingRows[] = "{$count} for {$language}"; - } - } - - $this->stdout($generatedMissingRows ? implode(", ", $generatedMissingRows).".\n" : "Nothing to do.\n"); - - $this->stdout("Dropping unused languages..."); - $droppedLanguages=[]; - + + // insert missing + foreach ($freshMessagesIds as $id) { + if (!in_array($id, $msgRowsIds)) { + $db->createCommand() + ->insert($messageTable, ['id' => $id, 'language' => $language]) + ->execute(); + $count++; + } + } + if ($count) { + $generatedMissingRows[] = "{$count} for {$language}"; + } + } + + $this->stdout($generatedMissingRows ? implode(', ', $generatedMissingRows) . ".\n" : "Nothing to do.\n"); + + $this->stdout('Dropping unused languages...'); + $droppedLanguages = []; + $currentLanguages = []; $rows = (new Query())->select(['language'])->from($messageTable)->groupBy('language')->all($db); foreach ($rows as $row) { $currentLanguages[] = $row['language']; } - + foreach ($currentLanguages as $currentLanguage) { - if (!in_array($currentLanguage, $languages)) { - $deleted=$db->createCommand()->delete($messageTable, "language=:language", [ - 'language'=>$currentLanguage, - ])->execute(); - $droppedLanguages[] = "removed {$deleted} rows for $currentLanguage"; - } - } - - $this->stdout($droppedLanguages ? implode(", ", $droppedLanguages).".\n" : "Nothing to do.\n"); + if (!in_array($currentLanguage, $languages)) { + $deleted = $db->createCommand()->delete($messageTable, 'language=:language', [ + 'language' => $currentLanguage, + ])->execute(); + $droppedLanguages[] = "removed {$deleted} rows for $currentLanguage"; + } + } + + $this->stdout($droppedLanguages ? implode(', ', $droppedLanguages) . ".\n" : "Nothing to do.\n"); } /** diff --git a/framework/console/controllers/MigrateController.php b/framework/console/controllers/MigrateController.php index 17b6a76389a..3a7e5803641 100644 --- a/framework/console/controllers/MigrateController.php +++ b/framework/console/controllers/MigrateController.php @@ -1,4 +1,5 @@ templateFile; $table = null; - if (preg_match( - '/^create_?junction_?(?:table)?_?(?:for)?(.+)_?and(.+)_?tables?$/i', - $name, - $matches - )) { + if (preg_match('/^create_?junction_?(?:table)?_?(?:for)?(.+)_?and(.+)_?tables?$/i', $name, $matches)) { $templateFile = $this->generatorTemplateFiles['create_junction']; $firstTable = $this->normalizeTableName($matches[1]); $secondTable = $this->normalizeTableName($matches[2]); diff --git a/framework/console/controllers/ServeController.php b/framework/console/controllers/ServeController.php index b806f67d55b..2b8ce9f78c0 100644 --- a/framework/console/controllers/ServeController.php +++ b/framework/console/controllers/ServeController.php @@ -1,4 +1,5 @@ rows = array_map(function($row) { - return array_map(function($value) { + $this->rows = array_map(function ($row) { + return array_map(function ($value) { return empty($value) && !is_numeric($value) ? ' ' : (is_array($value) @@ -198,7 +199,8 @@ public function run() ); // Header if ($headerCount > 0) { - $buffer .= $this->renderRow($this->headers, + $buffer .= $this->renderRow( + $this->headers, $this->chars[self::CHAR_LEFT], $this->chars[self::CHAR_MIDDLE], $this->chars[self::CHAR_RIGHT] @@ -215,10 +217,12 @@ public function run() $this->chars[self::CHAR_RIGHT_MID] ); } - $buffer .= $this->renderRow($row, + $buffer .= $this->renderRow( + $row, $this->chars[self::CHAR_LEFT], $this->chars[self::CHAR_MIDDLE], - $this->chars[self::CHAR_RIGHT]); + $this->chars[self::CHAR_RIGHT] + ); } $buffer .= $this->renderSeparator( diff --git a/framework/data/ActiveDataFilter.php b/framework/data/ActiveDataFilter.php index be5704aa675..bf6eea2c32e 100644 --- a/framework/data/ActiveDataFilter.php +++ b/framework/data/ActiveDataFilter.php @@ -1,4 +1,5 @@ * @since 2.0 + * @phpcs:disable Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore */ abstract class BaseDataProvider extends Component implements DataProviderInterface { diff --git a/framework/data/DataFilter.php b/framework/data/DataFilter.php index 057509203fe..8d4142e93f9 100644 --- a/framework/data/DataFilter.php +++ b/framework/data/DataFilter.php @@ -1,4 +1,5 @@ * @author Carsten Brandt * @since 2.0 + * @phpcs:disable Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore * * @method ActiveRecordInterface|array|null one($db = null) See [[ActiveQueryInterface::one()]] for more info. * @method ActiveRecordInterface[] all($db = null) See [[ActiveQueryInterface::all()]] for more info. @@ -453,7 +455,8 @@ private function buildBuckets($models, $link, $viaModels = null, $viaQuery = nul * @param array $viaMap * @return array */ - private function mapVia($map, $viaMap) { + private function mapVia($map, $viaMap) + { $resultMap = []; foreach ($map as $key => $linkKeys) { $resultMap[$key] = []; diff --git a/framework/db/AfterSaveEvent.php b/framework/db/AfterSaveEvent.php index 3efccc10ec1..1a8a768d4fa 100644 --- a/framework/db/AfterSaveEvent.php +++ b/framework/db/AfterSaveEvent.php @@ -1,4 +1,5 @@ * @since 2.0.14 + * @phpcs:disable Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore */ class ArrayExpression implements ExpressionInterface, \ArrayAccess, \Countable, \IteratorAggregate { diff --git a/framework/db/BaseActiveRecord.php b/framework/db/BaseActiveRecord.php index 0791c45ec2f..41732caab1d 100644 --- a/framework/db/BaseActiveRecord.php +++ b/framework/db/BaseActiveRecord.php @@ -1,4 +1,5 @@ errorInfo[1]) ? $e->errorInfo[1] : null; - if ($this->getDbDriverName() !== 'sqlsrv' || $errorCode !== $this->mssqlNoMoreRowsErrorCode) { + if ($this->getDbDriverName() !== 'sqlsrv' || $errorCode !== self::MSSQL_NO_MORE_ROWS_ERROR_CODE) { throw $e; } } diff --git a/framework/db/CheckConstraint.php b/framework/db/CheckConstraint.php index 585032cfe80..1bb86d92bf4 100644 --- a/framework/db/CheckConstraint.php +++ b/framework/db/CheckConstraint.php @@ -1,4 +1,5 @@ type, [ @@ -123,12 +125,14 @@ protected function typecast($value) Schema::TYPE_BINARY, Schema::TYPE_CHAR ], - true) + true + ) ) { return null; } - if ($value === null + if ( + $value === null || gettype($value) === $this->phpType || $value instanceof ExpressionInterface || $value instanceof Query @@ -136,7 +140,8 @@ protected function typecast($value) return $value; } - if (is_array($value) + if ( + is_array($value) && count($value) === 2 && isset($value[1]) && in_array($value[1], $this->getPdoParamTypes(), true) @@ -154,7 +159,8 @@ protected function typecast($value) // ensure type cast always has . as decimal separator in all locales return StringHelper::floatToString($value); } - if (is_numeric($value) + if ( + is_numeric($value) && ColumnSchemaBuilder::CATEGORY_NUMERIC === ColumnSchemaBuilder::$typeCategoryMap[$this->type] ) { // https://github.com/yiisoft/yii2/issues/14663 diff --git a/framework/db/ColumnSchemaBuilder.php b/framework/db/ColumnSchemaBuilder.php index 756b4b8aa8b..d77515fad5d 100644 --- a/framework/db/ColumnSchemaBuilder.php +++ b/framework/db/ColumnSchemaBuilder.php @@ -1,4 +1,5 @@ _sql); diff --git a/framework/db/Connection.php b/framework/db/Connection.php index 4df8f3af62f..2a1c151c79d 100644 --- a/framework/db/Connection.php +++ b/framework/db/Connection.php @@ -1,4 +1,5 @@ * @since 2.0.14 + * @phpcs:disable Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore */ final class PdoValue implements ExpressionInterface { diff --git a/framework/db/PdoValueBuilder.php b/framework/db/PdoValueBuilder.php index 6bec24c94bd..2eae1532739 100644 --- a/framework/db/PdoValueBuilder.php +++ b/framework/db/PdoValueBuilder.php @@ -1,4 +1,5 @@ columns : []; $sets = []; foreach ($columns as $name => $value) { - $value = isset($columnSchemas[$name]) ? $columnSchemas[$name]->dbTypecast($value) : $value; if ($value instanceof ExpressionInterface) { $placeholder = $this->buildExpression($value, $params); @@ -1527,7 +1527,7 @@ public function buildWithQueries($withs, &$params) $result[] = $with['alias'] . ' AS (' . $with['query'] . ')'; } - return 'WITH ' . ($recursive ? 'RECURSIVE ' : '') . implode (', ', $result); + return 'WITH ' . ($recursive ? 'RECURSIVE ' : '') . implode(', ', $result); } /** diff --git a/framework/db/QueryExpressionBuilder.php b/framework/db/QueryExpressionBuilder.php index e811c053c99..bd88a758ea0 100644 --- a/framework/db/QueryExpressionBuilder.php +++ b/framework/db/QueryExpressionBuilder.php @@ -1,4 +1,5 @@ * @since 2.0.14 + * @phpcs:disable Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore */ class BetweenColumnsCondition implements ConditionInterface { diff --git a/framework/db/conditions/BetweenColumnsConditionBuilder.php b/framework/db/conditions/BetweenColumnsConditionBuilder.php index 0795d0f2f85..516489c9c77 100644 --- a/framework/db/conditions/BetweenColumnsConditionBuilder.php +++ b/framework/db/conditions/BetweenColumnsConditionBuilder.php @@ -1,4 +1,5 @@ * @since 2.0.14 + * @phpcs:disable Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore */ class BetweenCondition implements ConditionInterface { diff --git a/framework/db/conditions/BetweenConditionBuilder.php b/framework/db/conditions/BetweenConditionBuilder.php index 2af0a29fe7c..dde3f9c3bb9 100644 --- a/framework/db/conditions/BetweenConditionBuilder.php +++ b/framework/db/conditions/BetweenConditionBuilder.php @@ -1,4 +1,5 @@ * @since 2.0.14 + * @phpcs:disable Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore */ class ExistsCondition implements ConditionInterface { diff --git a/framework/db/conditions/ExistsConditionBuilder.php b/framework/db/conditions/ExistsConditionBuilder.php index c7997d974cc..dcef6f7dcdc 100644 --- a/framework/db/conditions/ExistsConditionBuilder.php +++ b/framework/db/conditions/ExistsConditionBuilder.php @@ -1,4 +1,5 @@ * @since 2.0.14 + * @phpcs:disable Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore */ class HashCondition implements ConditionInterface { diff --git a/framework/db/conditions/HashConditionBuilder.php b/framework/db/conditions/HashConditionBuilder.php index 9e0b5a48002..da77c709322 100644 --- a/framework/db/conditions/HashConditionBuilder.php +++ b/framework/db/conditions/HashConditionBuilder.php @@ -1,4 +1,5 @@ * @since 2.0.14 + * @phpcs:disable Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore */ class InCondition implements ConditionInterface { diff --git a/framework/db/conditions/InConditionBuilder.php b/framework/db/conditions/InConditionBuilder.php index 3717c226b1f..32cb078ed79 100644 --- a/framework/db/conditions/InConditionBuilder.php +++ b/framework/db/conditions/InConditionBuilder.php @@ -1,4 +1,5 @@ queryBuilder->db->quoteColumnName($column); if ($operator === 'IN') { return sprintf('%s IS NULL', $column); diff --git a/framework/db/conditions/LikeCondition.php b/framework/db/conditions/LikeCondition.php index 0fe2a8fa0eb..8d203aab4cb 100644 --- a/framework/db/conditions/LikeCondition.php +++ b/framework/db/conditions/LikeCondition.php @@ -1,4 +1,5 @@ * @since 2.0.14 + * @phpcs:disable Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore */ class NotCondition implements ConditionInterface { diff --git a/framework/db/conditions/NotConditionBuilder.php b/framework/db/conditions/NotConditionBuilder.php index 23772621f97..842d08a12e8 100644 --- a/framework/db/conditions/NotConditionBuilder.php +++ b/framework/db/conditions/NotConditionBuilder.php @@ -1,4 +1,5 @@ * @since 2.0.14 + * @phpcs:disable Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore */ class SimpleCondition implements ConditionInterface { diff --git a/framework/db/conditions/SimpleConditionBuilder.php b/framework/db/conditions/SimpleConditionBuilder.php index 00a75115b8e..1983f52bfaf 100644 --- a/framework/db/conditions/SimpleConditionBuilder.php +++ b/framework/db/conditions/SimpleConditionBuilder.php @@ -1,4 +1,5 @@ type === 'timestamp' && $info['Default'] === 'SYS_TIMESTAMP' || + if ( + $column->type === 'timestamp' && $info['Default'] === 'SYS_TIMESTAMP' || $column->type === 'datetime' && $info['Default'] === 'SYS_DATETIME' || $column->type === 'date' && $info['Default'] === 'SYS_DATE' || $column->type === 'time' && $info['Default'] === 'SYS_TIME' diff --git a/framework/db/cubrid/conditions/LikeConditionBuilder.php b/framework/db/cubrid/conditions/LikeConditionBuilder.php index 80cd27173ea..89f0fe3ab88 100644 --- a/framework/db/cubrid/conditions/LikeConditionBuilder.php +++ b/framework/db/cubrid/conditions/LikeConditionBuilder.php @@ -1,4 +1,5 @@ hasLimit($limit)) { if ($limit instanceof Expression) { - $limit = '('. (string)$limit . ')'; + $limit = '(' . (string)$limit . ')'; } $sql = "SELECT TOP $limit * FROM ($sql) sub"; } else { @@ -199,7 +200,7 @@ public function alterColumn($table, $column, $type) if ($checkValue !== null) { $sqlAfter[] = "ALTER TABLE {$tableName} ADD CONSTRAINT " . $this->db->quoteColumnName("CK_{$constraintBase}") . - " CHECK (" . ($defaultValue instanceof Expression ? $checkValue : new Expression($checkValue)) . ")"; + ' CHECK (' . ($defaultValue instanceof Expression ? $checkValue : new Expression($checkValue)) . ')'; } if ($type->isUnique()) { @@ -307,10 +308,10 @@ protected function buildAddCommentSql($comment, $table, $column = null) throw new InvalidArgumentException("Table not found: $table"); } - $schemaName = $tableSchema->schemaName ? "N'" . $tableSchema->schemaName . "'": 'SCHEMA_NAME()'; - $tableName = "N" . $this->db->quoteValue($tableSchema->name); - $columnName = $column ? "N" . $this->db->quoteValue($column) : null; - $comment = "N" . $this->db->quoteValue($comment); + $schemaName = $tableSchema->schemaName ? "N'" . $tableSchema->schemaName . "'" : 'SCHEMA_NAME()'; + $tableName = 'N' . $this->db->quoteValue($tableSchema->name); + $columnName = $column ? 'N' . $this->db->quoteValue($column) : null; + $comment = 'N' . $this->db->quoteValue($comment); $functionParams = " @name = N'MS_description', @@ -373,9 +374,9 @@ protected function buildRemoveCommentSql($table, $column = null) throw new InvalidArgumentException("Table not found: $table"); } - $schemaName = $tableSchema->schemaName ? "N'" . $tableSchema->schemaName . "'": 'SCHEMA_NAME()'; - $tableName = "N" . $this->db->quoteValue($tableSchema->name); - $columnName = $column ? "N" . $this->db->quoteValue($column) : null; + $schemaName = $tableSchema->schemaName ? "N'" . $tableSchema->schemaName . "'" : 'SCHEMA_NAME()'; + $tableName = 'N' . $this->db->quoteValue($tableSchema->name); + $columnName = $column ? 'N' . $this->db->quoteValue($column) : null; return " IF EXISTS ( @@ -502,7 +503,7 @@ public function insert($table, $columns, &$params) } $quoteColumnName = $this->db->quoteColumnName($column->name); - $cols[] = $quoteColumnName . ' ' . $dbType . ' ' . ($column->allowNull ? "NULL" : ""); + $cols[] = $quoteColumnName . ' ' . $dbType . ' ' . ($column->allowNull ? 'NULL' : ''); $outputColumns[] = 'INSERTED.' . $quoteColumnName; } } @@ -639,7 +640,7 @@ protected function extractAlias($table) * @see https://docs.microsoft.com/sql/relational-databases/system-catalog-views/sys-objects-transact-sql * @return string the DROP CONSTRAINTS SQL */ - private function dropConstraintsForColumn($table, $column, $type='') + private function dropConstraintsForColumn($table, $column, $type = '') { return "DECLARE @tableName VARCHAR(MAX) = '" . $this->db->quoteTableName($table) . "' DECLARE @columnName VARCHAR(MAX) = '{$column}' @@ -659,7 +660,7 @@ private function dropConstraintsForColumn($table, $column, $type='') WHERE i.[is_unique_constraint]=1 and i.[object_id]=OBJECT_ID(@tableName) ) cons JOIN [sys].[objects] so ON so.[object_id]=cons.[object_id] - " . (!empty($type) ? " WHERE so.[type]='{$type}'" : "") . ") + " . (!empty($type) ? " WHERE so.[type]='{$type}'" : '') . ") IF @constraintName IS NULL BREAK EXEC (N'ALTER TABLE ' + @tableName + ' DROP CONSTRAINT [' + @constraintName + ']') END"; @@ -672,6 +673,6 @@ private function dropConstraintsForColumn($table, $column, $type='') public function dropColumn($table, $column) { return $this->dropConstraintsForColumn($table, $column) . "\nALTER TABLE " . $this->db->quoteTableName($table) - . " DROP COLUMN " . $this->db->quoteColumnName($column); + . ' DROP COLUMN ' . $this->db->quoteColumnName($column); } } diff --git a/framework/db/mssql/Schema.php b/framework/db/mssql/Schema.php index db7f07c87cb..a71f2e78647 100644 --- a/framework/db/mssql/Schema.php +++ b/framework/db/mssql/Schema.php @@ -1,4 +1,5 @@ db->quoteValue($table->name); + $whereSql = '[t1].[table_name] = ' . $this->db->quoteValue($table->name); if ($table->catalogName !== null) { $columnsTableName = "{$table->catalogName}.{$columnsTableName}"; $whereSql .= " AND [t1].[table_catalog] = '{$table->catalogName}'"; diff --git a/framework/db/mssql/SqlsrvPDO.php b/framework/db/mssql/SqlsrvPDO.php index 4285e220df0..ed8139eefad 100644 --- a/framework/db/mssql/SqlsrvPDO.php +++ b/framework/db/mssql/SqlsrvPDO.php @@ -1,4 +1,5 @@ columns)->name]; $defaultValue = 'DEFAULT'; } - + foreach ($columns as $name) { $names[] = $this->db->quoteColumnName($name); $placeholders[] = $defaultValue; @@ -312,8 +313,7 @@ public function upsert($table, $insertColumns, $updateColumns, &$params) public function addCommentOnColumn($table, $column, $comment) { // Strip existing comment which may include escaped quotes - $definition = trim(preg_replace("/COMMENT '(?:''|[^'])*'/i", '', - $this->getColumnDefinition($table, $column))); + $definition = trim(preg_replace("/COMMENT '(?:''|[^'])*'/i", '', $this->getColumnDefinition($table, $column))); $checkRegex = '/CHECK *(\(([^()]|(?-2))*\))/'; $check = preg_match($checkRegex, $definition, $checkMatches); diff --git a/framework/db/mysql/Schema.php b/framework/db/mysql/Schema.php index fa2270eb77d..6f8a2eb3ef7 100644 --- a/framework/db/mysql/Schema.php +++ b/framework/db/mysql/Schema.php @@ -1,4 +1,5 @@ type, ['timestamp', 'datetime', 'date', 'time']) + if ( + in_array($column->type, ['timestamp', 'datetime', 'date', 'time']) && isset($info['default']) - && preg_match('/^current_timestamp(?:\(([0-9]*)\))?$/i', $info['default'], $matches)) { + && preg_match('/^current_timestamp(?:\(([0-9]*)\))?$/i', $info['default'], $matches) + ) { $column->defaultValue = new Expression('CURRENT_TIMESTAMP' . (!empty($matches[1]) ? '(' . $matches[1] . ')' : '')); } elseif (isset($type) && $type === 'bit') { $column->defaultValue = bindec(trim(isset($info['default']) ? $info['default'] : '', 'b\'')); diff --git a/framework/db/oci/ColumnSchemaBuilder.php b/framework/db/oci/ColumnSchemaBuilder.php index dcb5ff21ef8..b104588c4cd 100644 --- a/framework/db/oci/ColumnSchemaBuilder.php +++ b/framework/db/oci/ColumnSchemaBuilder.php @@ -1,4 +1,5 @@ primaryKey)>1) { + if (count($tableSchema->primaryKey) > 1) { throw new InvalidArgumentException("Can't reset sequence for composite primary key in table: $table"); } // use master connection to get the biggest PK value $value = $this->db->useMaster(function (Connection $db) use ($tableSchema) { return $db->createCommand( - 'SELECT MAX("' . $tableSchema->primaryKey[0] . '") FROM "'. $tableSchema->name . '"' + 'SELECT MAX("' . $tableSchema->primaryKey[0] . '") FROM "' . $tableSchema->name . '"' )->queryScalar(); }) + 1; } diff --git a/framework/db/oci/Schema.php b/framework/db/oci/Schema.php index e0e4c05e2da..6234bfa490d 100644 --- a/framework/db/oci/Schema.php +++ b/framework/db/oci/Schema.php @@ -1,4 +1,5 @@ getType(), $expression->getDimension()-1); + return new $expressionClass($value, $expression->getType(), $expression->getDimension() - 1); } /** diff --git a/framework/db/pgsql/ArrayParser.php b/framework/db/pgsql/ArrayParser.php index 50a204e3c5d..e50ee3b7cda 100644 --- a/framework/db/pgsql/ArrayParser.php +++ b/framework/db/pgsql/ArrayParser.php @@ -1,4 +1,5 @@ * @author Dmytro Naumenko * @since 2.0.14 + * @phpcs:disable Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore */ class ArrayParser { diff --git a/framework/db/pgsql/ColumnSchema.php b/framework/db/pgsql/ColumnSchema.php index 33d97bbdf55..533e333e7b8 100644 --- a/framework/db/pgsql/ColumnSchema.php +++ b/framework/db/pgsql/ColumnSchema.php @@ -1,4 +1,5 @@ db->quoteTableName($name); @@ -435,7 +437,7 @@ private function oldUpsert($table, $insertColumns, $updateColumns, &$params) list($updates, $params) = $this->prepareUpdateSets($table, $updateColumns, $params); $updateSql = 'UPDATE ' . $this->db->quoteTableName($table) . ' SET ' . implode(', ', $updates) . ' FROM "EXCLUDED" ' . $this->buildWhere($updateCondition, $params) - . ' RETURNING ' . $this->db->quoteTableName($table) .'.*'; + . ' RETURNING ' . $this->db->quoteTableName($table) . '.*'; $selectUpsertSubQuery = (new Query()) ->select(new Expression('1')) ->from('upsert') diff --git a/framework/db/pgsql/Schema.php b/framework/db/pgsql/Schema.php index 154e01a3808..4b3604cf3bf 100644 --- a/framework/db/pgsql/Schema.php +++ b/framework/db/pgsql/Schema.php @@ -1,4 +1,5 @@ allowNull = $info['is_nullable']; $column->autoIncrement = $info['is_autoinc']; $column->comment = $info['column_comment']; - if ($info['type_scheme'] !== null && !in_array($info['type_scheme'], [$this->defaultSchema, 'pg_catalog'], true) - ) { + if ($info['type_scheme'] !== null && !in_array($info['type_scheme'], [$this->defaultSchema, 'pg_catalog'], true)) { $column->dbType = $info['type_scheme'] . '.' . $info['data_type']; } else { $column->dbType = $info['data_type']; diff --git a/framework/db/sqlite/ColumnSchemaBuilder.php b/framework/db/sqlite/ColumnSchemaBuilder.php index d9853b08ab3..7f3444d3d36 100644 --- a/framework/db/sqlite/ColumnSchemaBuilder.php +++ b/framework/db/sqlite/ColumnSchemaBuilder.php @@ -1,4 +1,5 @@ isBuiltin(); } - } else { $class = $param->getClass(); $isClass = $class !== null; diff --git a/framework/di/Instance.php b/framework/di/Instance.php index 39bd801b354..458b01f274c 100644 --- a/framework/di/Instance.php +++ b/framework/di/Instance.php @@ -1,4 +1,5 @@ matchAction($action) + if ( + $this->matchAction($action) && $this->matchRole($user) && $this->matchIP($request->getUserIP()) && $this->matchVerb($request->getMethod()) diff --git a/framework/filters/AjaxFilter.php b/framework/filters/AjaxFilter.php index 02b3d7ebf0e..a950946df95 100644 --- a/framework/filters/AjaxFilter.php +++ b/framework/filters/AjaxFilter.php @@ -1,4 +1,5 @@ filterAttribute === null) { + if ($this->filterAttribute === null) { $this->filterAttribute = $this->attribute; } } @@ -150,8 +151,10 @@ protected function renderHeaderCellContent() $label = Html::encode($label); } - if ($this->attribute !== null && $this->enableSorting && - ($sort = $this->grid->dataProvider->getSort()) !== false && $sort->hasAttribute($this->attribute)) { + if ( + $this->attribute !== null && $this->enableSorting && + ($sort = $this->grid->dataProvider->getSort()) !== false && $sort->hasAttribute($this->attribute) + ) { return $sort->link($this->attribute, array_merge($this->sortLinkOptions, ['label' => $label])); } diff --git a/framework/grid/GridView.php b/framework/grid/GridView.php index 7ee0e06bbc0..fc37be02859 100644 --- a/framework/grid/GridView.php +++ b/framework/grid/GridView.php @@ -1,4 +1,5 @@ "''''", // single `'` should be encoded as `''`, which internally should be encoded as `''''` // Day '\d' => "'d'", - 'd' => 'dd', // Day of the month, 2 digits with leading zeros 01 to 31 + 'd' => 'dd', // Day of the month, 2 digits with leading zeros — 01 to 31 '\D' => "'D'", - 'D' => 'eee', // A textual representation of a day, three letters Mon through Sun + 'D' => 'eee', // A textual representation of a day, three letters — Mon through Sun '\j' => "'j'", - 'j' => 'd', // Day of the month without leading zeros 1 to 31 + 'j' => 'd', // Day of the month without leading zeros — 1 to 31 '\l' => "'l'", - 'l' => 'eeee', // A full textual representation of the day of the week Sunday through Saturday + 'l' => 'eeee', // A full textual representation of the day of the week — Sunday through Saturday '\N' => "'N'", 'N' => 'e', // ISO-8601 numeric representation of the day of the week, 1 (for Monday) through 7 (for Sunday) '\S' => "'S'", - 'S' => '', // English ordinal suffix for the day of the month, 2 characters st, nd, rd or th. Works well with j + 'S' => '', // English ordinal suffix for the day of the month, 2 characters — st, nd, rd or th. Works well with j '\w' => "'w'", - 'w' => '', // Numeric representation of the day of the week 0 (for Sunday) through 6 (for Saturday) + 'w' => '', // Numeric representation of the day of the week — 0 (for Sunday) through 6 (for Saturday) '\z' => "'z'", - 'z' => 'D', // The day of the year (starting from 0) 0 through 365 + 'z' => 'D', // The day of the year (starting from 0) — 0 through 365 // Week '\W' => "'W'", - 'W' => 'w', // ISO-8601 week number of year, weeks starting on Monday (added in PHP 4.1.0) Example: 42 (the 42nd week in the year) + 'W' => 'w', // ISO-8601 week number of year, weeks starting on Monday (added in PHP 4.1.0) — Example: 42 (the 42nd week in the year) // Month '\F' => "'F'", 'F' => 'MMMM', // A full textual representation of a month, January through December '\m' => "'m'", - 'm' => 'MM', // Numeric representation of a month, with leading zeros 01 through 12 + 'm' => 'MM', // Numeric representation of a month, with leading zeros — 01 through 12 '\M' => "'M'", - 'M' => 'MMM', // A short textual representation of a month, three letters Jan through Dec + 'M' => 'MMM', // A short textual representation of a month, three letters — Jan through Dec '\n' => "'n'", - 'n' => 'M', // Numeric representation of a month, without leading zeros 1 through 12, not supported by ICU but we fallback to "with leading zero" + 'n' => 'M', // Numeric representation of a month, without leading zeros — 1 through 12, not supported by ICU but we fallback to "with leading zero" '\t' => "'t'", - 't' => '', // Number of days in the given month 28 through 31 + 't' => '', // Number of days in the given month — 28 through 31 // Year '\L' => "'L'", 'L' => '', // Whether it's a leap year, 1 if it is a leap year, 0 otherwise. '\o' => "'o'", 'o' => 'Y', // ISO-8601 year number. This has the same value as Y, except that if the ISO week number (W) belongs to the previous or next year, that year is used instead. '\Y' => "'Y'", - 'Y' => 'yyyy', // A full numeric representation of a year, 4 digits Examples: 1999 or 2003 + 'Y' => 'yyyy', // A full numeric representation of a year, 4 digits — Examples: 1999 or 2003 '\y' => "'y'", - 'y' => 'yy', // A two digit representation of a year Examples: 99 or 03 + 'y' => 'yy', // A two digit representation of a year — Examples: 99 or 03 // Time '\a' => "'a'", 'a' => 'a', // Lowercase Ante meridiem and Post meridiem, am or pm '\A' => "'A'", 'A' => 'a', // Uppercase Ante meridiem and Post meridiem, AM or PM, not supported by ICU but we fallback to lowercase '\B' => "'B'", - 'B' => '', // Swatch Internet time 000 through 999 + 'B' => '', // Swatch Internet time — 000 through 999 '\g' => "'g'", - 'g' => 'h', // 12-hour format of an hour without leading zeros 1 through 12 + 'g' => 'h', // 12-hour format of an hour without leading zeros — 1 through 12 '\G' => "'G'", 'G' => 'H', // 24-hour format of an hour without leading zeros 0 to 23h '\h' => "'h'", @@ -294,9 +295,9 @@ public static function convertDatePhpToIcu($pattern) '\H' => "'H'", 'H' => 'HH', // 24-hour format of an hour with leading zeros, 00 to 23 h '\i' => "'i'", - 'i' => 'mm', // Minutes with leading zeros 00 to 59 + 'i' => 'mm', // Minutes with leading zeros — 00 to 59 '\s' => "'s'", - 's' => 'ss', // Seconds, with leading zeros 00 through 59 + 's' => 'ss', // Seconds, with leading zeros — 00 through 59 '\u' => "'u'", 'u' => '', // Microseconds. Example: 654321 // Timezone @@ -482,37 +483,37 @@ public static function convertDatePhpToJui($pattern) // https://www.php.net/manual/en/function.date return strtr($pattern, [ // Day - 'd' => 'dd', // Day of the month, 2 digits with leading zeros 01 to 31 - 'D' => 'D', // A textual representation of a day, three letters Mon through Sun - 'j' => 'd', // Day of the month without leading zeros 1 to 31 - 'l' => 'DD', // A full textual representation of the day of the week Sunday through Saturday + 'd' => 'dd', // Day of the month, 2 digits with leading zeros — 01 to 31 + 'D' => 'D', // A textual representation of a day, three letters — Mon through Sun + 'j' => 'd', // Day of the month without leading zeros — 1 to 31 + 'l' => 'DD', // A full textual representation of the day of the week — Sunday through Saturday 'N' => '', // ISO-8601 numeric representation of the day of the week, 1 (for Monday) through 7 (for Sunday) - 'S' => '', // English ordinal suffix for the day of the month, 2 characters st, nd, rd or th. Works well with j - 'w' => '', // Numeric representation of the day of the week 0 (for Sunday) through 6 (for Saturday) - 'z' => 'o', // The day of the year (starting from 0) 0 through 365 + 'S' => '', // English ordinal suffix for the day of the month, 2 characters — st, nd, rd or th. Works well with j + 'w' => '', // Numeric representation of the day of the week — 0 (for Sunday) through 6 (for Saturday) + 'z' => 'o', // The day of the year (starting from 0) — 0 through 365 // Week - 'W' => '', // ISO-8601 week number of year, weeks starting on Monday (added in PHP 4.1.0) Example: 42 (the 42nd week in the year) + 'W' => '', // ISO-8601 week number of year, weeks starting on Monday (added in PHP 4.1.0) — Example: 42 (the 42nd week in the year) // Month 'F' => 'MM', // A full textual representation of a month, January through December - 'm' => 'mm', // Numeric representation of a month, with leading zeros 01 through 12 - 'M' => 'M', // A short textual representation of a month, three letters Jan through Dec - 'n' => 'm', // Numeric representation of a month, without leading zeros 1 through 12 - 't' => '', // Number of days in the given month 28 through 31 + 'm' => 'mm', // Numeric representation of a month, with leading zeros — 01 through 12 + 'M' => 'M', // A short textual representation of a month, three letters — Jan through Dec + 'n' => 'm', // Numeric representation of a month, without leading zeros — 1 through 12 + 't' => '', // Number of days in the given month — 28 through 31 // Year 'L' => '', // Whether it's a leap year, 1 if it is a leap year, 0 otherwise. 'o' => '', // ISO-8601 year number. This has the same value as Y, except that if the ISO week number (W) belongs to the previous or next year, that year is used instead. - 'Y' => 'yy', // A full numeric representation of a year, 4 digits Examples: 1999 or 2003 - 'y' => 'y', // A two digit representation of a year Examples: 99 or 03 + 'Y' => 'yy', // A full numeric representation of a year, 4 digits — Examples: 1999 or 2003 + 'y' => 'y', // A two digit representation of a year — Examples: 99 or 03 // Time 'a' => '', // Lowercase Ante meridiem and Post meridiem, am or pm 'A' => '', // Uppercase Ante meridiem and Post meridiem, AM or PM, not supported by ICU but we fallback to lowercase - 'B' => '', // Swatch Internet time 000 through 999 - 'g' => '', // 12-hour format of an hour without leading zeros 1 through 12 + 'B' => '', // Swatch Internet time — 000 through 999 + 'g' => '', // 12-hour format of an hour without leading zeros — 1 through 12 'G' => '', // 24-hour format of an hour without leading zeros 0 to 23h 'h' => '', // 12-hour format of an hour with leading zeros, 01 to 12 h 'H' => '', // 24-hour format of an hour with leading zeros, 00 to 23 h - 'i' => '', // Minutes with leading zeros 00 to 59 - 's' => '', // Seconds, with leading zeros 00 through 59 + 'i' => '', // Minutes with leading zeros — 00 to 59 + 's' => '', // Seconds, with leading zeros — 00 through 59 'u' => '', // Microseconds. Example: 654321 // Timezone 'e' => '', // Timezone identifier. Examples: UTC, GMT, Atlantic/Azores diff --git a/framework/helpers/BaseHtml.php b/framework/helpers/BaseHtml.php index 4f17fa670ea..e610af6ca1f 100644 --- a/framework/helpers/BaseHtml.php +++ b/framework/helpers/BaseHtml.php @@ -1,4 +1,5 @@ charset : 'UTF-8'; } - } diff --git a/framework/helpers/BaseIpHelper.php b/framework/helpers/BaseIpHelper.php index 5ab73a63106..98b97ddd56a 100644 --- a/framework/helpers/BaseIpHelper.php +++ b/framework/helpers/BaseIpHelper.php @@ -1,4 +1,5 @@ 'application/rtf', 'text/xml' => 'application/xml', diff --git a/framework/helpers/mimeExtensions.php b/framework/helpers/mimeExtensions.php index e4936030fd8..8247ff28297 100644 --- a/framework/helpers/mimeExtensions.php +++ b/framework/helpers/mimeExtensions.php @@ -1,4 +1,5 @@ 'ez', 'application/applixware' => 'aw', diff --git a/framework/helpers/mimeTypes.php b/framework/helpers/mimeTypes.php index f895e8d0728..c5ddb934900 100644 --- a/framework/helpers/mimeTypes.php +++ b/framework/helpers/mimeTypes.php @@ -1,4 +1,5 @@ 'application/vnd.lotus-1-2-3', '3dml' => 'text/vnd.in3d.3dml', @@ -1008,7 +1010,7 @@ # fix for bundled libmagic bug, see also https://github.com/yiisoft/yii2/issues/19925 if ((PHP_VERSION_ID >= 80100 && PHP_VERSION_ID < 80122) || (PHP_VERSION_ID >= 80200 && PHP_VERSION_ID < 80209)) { - $mimeTypes = array_replace($mimeTypes, array('xz' => 'application/octet-stream')); + $mimeTypes = array_replace($mimeTypes, ['xz' => 'application/octet-stream']); } return $mimeTypes; diff --git a/framework/i18n/DbMessageSource.php b/framework/i18n/DbMessageSource.php index 0686291d2a7..155cbc3eccc 100644 --- a/framework/i18n/DbMessageSource.php +++ b/framework/i18n/DbMessageSource.php @@ -1,4 +1,5 @@ defaultTimeZone)) + new DateTimeZone($this->defaultTimeZone) + ) ) !== false ) { // try Y-m-d format (support invalid dates like 2012-13-01) return $checkDateTimeInfo ? [$timestamp, false, true] : $timestamp; @@ -891,7 +893,8 @@ protected function normalizeDatetimeValue($value, $checkDateTimeInfo = false) ($timestamp = DateTime::createFromFormat( 'Y-m-d H:i:s', $value, - new DateTimeZone($this->defaultTimeZone)) + new DateTimeZone($this->defaultTimeZone) + ) ) !== false ) { // try Y-m-d H:i:s format (support invalid dates like 2012-13-01 12:63:12) return $checkDateTimeInfo ? [$timestamp, true, true] : $timestamp; diff --git a/framework/i18n/GettextFile.php b/framework/i18n/GettextFile.php index 6e320348c31..519d9e1571c 100644 --- a/framework/i18n/GettextFile.php +++ b/framework/i18n/GettextFile.php @@ -1,4 +1,5 @@ bindValues([ + if ( + $command->bindValues([ ':level' => $level, ':category' => $category, ':log_time' => $timestamp, ':prefix' => $this->getMessagePrefix($message), ':message' => $text, - ])->execute() > 0) { + ])->execute() > 0 + ) { continue; } throw new LogRuntimeException('Unable to export log through database!'); diff --git a/framework/log/Dispatcher.php b/framework/log/Dispatcher.php index 11b6b0016a9..c913bc0873f 100644 --- a/framework/log/Dispatcher.php +++ b/framework/log/Dispatcher.php @@ -1,4 +1,5 @@ dbTargets === []) { + if ($this->_dbTargets === []) { $log = Yii::$app->getLog(); $usedTargets = []; @@ -45,17 +46,17 @@ protected function getDbTargets() if (!in_array($currentTarget, $usedTargets, true)) { // do not create same table twice $usedTargets[] = $currentTarget; - $this->dbTargets[] = $target; + $this->_dbTargets[] = $target; } } } - if ($this->dbTargets === []) { + if ($this->_dbTargets === []) { throw new InvalidConfigException('You should configure "log" component to use one or more database targets before executing this migration.'); } } - return $this->dbTargets; + return $this->_dbTargets; } public function up() diff --git a/framework/mail/BaseMailer.php b/framework/mail/BaseMailer.php index c5f76fb7538..f07bfa4f87e 100644 --- a/framework/mail/BaseMailer.php +++ b/framework/mail/BaseMailer.php @@ -1,4 +1,5 @@ keyPrefix instanceof Expression) { $expression = strtr($expression, [':prefix' => $this->keyPrefix->expression]); $params = $this->keyPrefix->params; diff --git a/framework/mutex/OracleMutex.php b/framework/mutex/OracleMutex.php index 1e15876edd8..c24c5f20b3f 100644 --- a/framework/mutex/OracleMutex.php +++ b/framework/mutex/OracleMutex.php @@ -1,4 +1,5 @@ from(['fkc' => 'sys.foreign_key_columns']) ->innerJoin(['c' => 'sys.columns'], 'fkc.parent_object_id = c.object_id AND fkc.parent_column_id = c.column_id') ->innerJoin(['r' => 'sys.columns'], 'fkc.referenced_object_id = r.object_id AND fkc.referenced_column_id = r.column_id') - ->andWhere('fkc.parent_object_id=OBJECT_ID(:fkc_parent_object_id)',[':fkc_parent_object_id' => $this->db->schema->getRawTableName($table)]) - ->andWhere('fkc.referenced_object_id=OBJECT_ID(:fkc_referenced_object_id)',[':fkc_referenced_object_id' => $this->db->schema->getRawTableName($referenceTable)]) + ->andWhere('fkc.parent_object_id=OBJECT_ID(:fkc_parent_object_id)', [':fkc_parent_object_id' => $this->db->schema->getRawTableName($table)]) + ->andWhere('fkc.referenced_object_id=OBJECT_ID(:fkc_referenced_object_id)', [':fkc_referenced_object_id' => $this->db->schema->getRawTableName($referenceTable)]) ->andWhere(['c.name' => $column]) ->andWhere(['r.name' => $referenceColumn]) ->scalar($this->db); @@ -77,8 +78,7 @@ public function up() BEGIN DELETE FROM {$schema}.{$authManager->itemChildTable} WHERE parent IN (SELECT name FROM deleted) OR child IN (SELECT name FROM deleted); DELETE FROM {$schema}.{$authManager->itemTable} WHERE name IN (SELECT name FROM deleted); - END;" - ); + END;"); $foreignKey = $this->findForeignKeyName($authManager->itemChildTable, 'child', $authManager->itemTable, 'name'); $this->execute("CREATE TRIGGER {$schema}.trigger_update_{$triggerSuffix} @@ -106,8 +106,7 @@ public function up() BEGIN ALTER TABLE {$authManager->itemChildTable} CHECK CONSTRAINT {$foreignKey}; END - END;" - ); + END;"); } } diff --git a/framework/rest/Action.php b/framework/rest/Action.php index c700d665c8f..ca9accb27cf 100644 --- a/framework/rest/Action.php +++ b/framework/rest/Action.php @@ -1,4 +1,5 @@ dataFile === null) { - if ($this->dataDirectory !== null) { $dataFile = $this->getTableSchema()->fullName . '.php'; } else { diff --git a/framework/test/ArrayFixture.php b/framework/test/ArrayFixture.php index c146ab34e33..faa59c7a539 100644 --- a/framework/test/ArrayFixture.php +++ b/framework/test/ArrayFixture.php @@ -1,4 +1,5 @@ forceMasterDb && method_exists($connection, 'useMaster')) { - $exists = $connection->useMaster(function() use ($relationQuery) { + $exists = $connection->useMaster(function () use ($relationQuery) { return $relationQuery->exists(); }); } else { @@ -328,7 +329,8 @@ private function applyTableAlias($query, $conditions, $alias = null) $prefixedColumn = "{$alias}.[[" . preg_replace( '/^' . preg_quote($alias, '/') . '\.(.*)$/', '$1', - $columnName) . ']]'; + $columnName + ) . ']]'; } else { // there is an expression, can't prefix it reliably $prefixedColumn = $columnName; diff --git a/framework/validators/FileValidator.php b/framework/validators/FileValidator.php index 28d97f9c972..a93814a39ab 100644 --- a/framework/validators/FileValidator.php +++ b/framework/validators/FileValidator.php @@ -1,4 +1,5 @@ range) + if ( + !is_array($this->range) && !($this->range instanceof \Closure) && !($this->range instanceof \Traversable) ) { @@ -75,7 +77,8 @@ protected function validateValue($value) { $in = false; - if ($this->allowArray + if ( + $this->allowArray && ($value instanceof \Traversable || is_array($value)) && ArrayHelper::isSubset($value, $this->range, $this->strict) ) { diff --git a/framework/validators/RegularExpressionValidator.php b/framework/validators/RegularExpressionValidator.php index 747c4d2a9ee..7de28d478b2 100644 --- a/framework/validators/RegularExpressionValidator.php +++ b/framework/validators/RegularExpressionValidator.php @@ -1,4 +1,5 @@ db->useMaster(function() use ($oldID) { + $row = $this->db->useMaster(function () use ($oldID) { return (new Query())->from($this->sessionTable) ->where(['id' => $oldID]) ->createCommand($this->db) diff --git a/framework/web/ErrorAction.php b/framework/web/ErrorAction.php index e59f3ab2453..7ac9b0cbe27 100644 --- a/framework/web/ErrorAction.php +++ b/framework/web/ErrorAction.php @@ -1,4 +1,5 @@ data) + if ( + is_array($response->data) && isset($response->data['data'], $response->data['callback']) ) { $response->content = sprintf( diff --git a/framework/web/Link.php b/framework/web/Link.php index 3f90fc66a28..bf62be8e76c 100644 --- a/framework/web/Link.php +++ b/framework/web/Link.php @@ -1,4 +1,5 @@ getSecureForwardedHeaderTrustedPart('for'); - if ($ip !== null && preg_match( - '/^\[?(?P(?:(?:(?:[0-9a-f]{1,4}:){1,6}(?:[0-9a-f]{1,4})?(?:(?::[0-9a-f]{1,4}){1,6}))|(?:\d{1,3}\.){3}\d{1,3}))\]?(?::(?P\d+))?$/', - $ip, - $matches - )) { + if ( + $ip !== null && preg_match( + '/^\[?(?P(?:(?:(?:[0-9a-f]{1,4}:){1,6}(?:[0-9a-f]{1,4})?(?:(?::[0-9a-f]{1,4}){1,6}))|(?:\d{1,3}\.){3}\d{1,3}))\]?(?::(?P\d+))?$/', + $ip, + $matches + ) + ) { $ip = $this->getUserIpFromIpHeader($matches['ip']); if ($ip !== null) { return $ip; @@ -1291,7 +1297,7 @@ protected function getUserIpFromIpHeader($ips) public function getUserHost() { $userIp = $this->getUserIpFromIpHeaders(); - if($userIp === null) { + if ($userIp === null) { return $this->getRemoteHost(); } return gethostbyaddr($userIp); @@ -1980,8 +1986,7 @@ protected function getSecureForwardedHeaderParts() preg_match_all('/(?:[^",]++|"[^"]++")+/', $forwarded, $forwardedElements); foreach ($forwardedElements[0] as $forwardedPairs) { - preg_match_all('/(?P\w+)\s*=\s*(?:(?P[^",;]*[^",;\s])|"(?P[^"]+)")/', $forwardedPairs, - $matches, PREG_SET_ORDER); + preg_match_all('/(?P\w+)\s*=\s*(?:(?P[^",;]*[^",;\s])|"(?P[^"]+)")/', $forwardedPairs, $matches, PREG_SET_ORDER); $this->_secureForwardedHeaderParts[] = array_reduce($matches, function ($carry, $item) { $value = $item['value']; if (isset($item['value2']) && $item['value2'] !== '') { diff --git a/framework/web/RequestParserInterface.php b/framework/web/RequestParserInterface.php index 44a1051a6dd..cbc02ba731a 100644 --- a/framework/web/RequestParserInterface.php +++ b/framework/web/RequestParserInterface.php @@ -1,4 +1,5 @@ getIsActive()) { if (isset($_SESSION)) { - $this->frozenSessionData = $_SESSION; + $this->_frozenSessionData = $_SESSION; } $this->close(); Yii::info('Session frozen', __METHOD__); @@ -1029,8 +1028,7 @@ protected function freeze() */ protected function unfreeze() { - if (null !== $this->frozenSessionData) { - + if (null !== $this->_frozenSessionData) { YII_DEBUG ? session_start() : @session_start(); if ($this->getIsActive()) { @@ -1041,8 +1039,8 @@ protected function unfreeze() Yii::error($message, __METHOD__); } - $_SESSION = $this->frozenSessionData; - $this->frozenSessionData = null; + $_SESSION = $this->_frozenSessionData; + $this->_frozenSessionData = null; } } diff --git a/framework/web/SessionIterator.php b/framework/web/SessionIterator.php index e4b4c9eb809..433ebd943ac 100644 --- a/framework/web/SessionIterator.php +++ b/framework/web/SessionIterator.php @@ -1,4 +1,5 @@ getRequest(); $canRedirect = !$checkAcceptHeader || $this->checkRedirectAcceptable(); - if ($this->enableSession + if ( + $this->enableSession && $request->getIsGet() && (!$checkAjax || !$request->getIsAjax()) && $canRedirect diff --git a/framework/web/UserEvent.php b/framework/web/UserEvent.php index 34a028910bf..404d2c52d3d 100644 --- a/framework/web/UserEvent.php +++ b/framework/web/UserEvent.php @@ -1,4 +1,5 @@ useTraversableAsArray && !$data instanceof Arrayable) ) { foreach ($data as $name => $value) { diff --git a/framework/web/YiiAsset.php b/framework/web/YiiAsset.php index a66908b8a9d..52a73d795da 100644 --- a/framework/web/YiiAsset.php +++ b/framework/web/YiiAsset.php @@ -1,4 +1,5 @@ + + + + + + + + + + + + + + + + framework/views/* + diff --git a/tests/framework/log/TargetTest.php b/tests/framework/log/TargetTest.php index eace93aa3bf..30480bb2f73 100644 --- a/tests/framework/log/TargetTest.php +++ b/tests/framework/log/TargetTest.php @@ -76,7 +76,12 @@ public function testFilter($filter, $expected) $logger->log('testH', Logger::LEVEL_ERROR, 'yii.db.Command.whatever'); $logger->log('testI', Logger::LEVEL_ERROR, 'yii\db\Command::query'); - $this->assertEquals(count($expected), count(static::$messages), 'Expected ' . implode(',', $expected) . ', got ' . implode(',', array_column(static::$messages, 0))); + $messageColumn = []; + foreach (static::$messages as $message) { + $messageColumn[] = $message[0]; + } + + $this->assertEquals(count($expected), count(static::$messages), 'Expected ' . implode(',', $expected) . ', got ' . implode(',', $messageColumn)); $i = 0; foreach ($expected as $e) { $this->assertEquals('test' . $e, static::$messages[$i++][0]); From a59a2b875dedca9beffa0e50842b95d4f599b590 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Wed, 20 Mar 2024 06:28:21 -0300 Subject: [PATCH 12/12] Remove unsed packages. --- composer.json | 2 -- composer.lock | 54 +-------------------------------------------------- 2 files changed, 1 insertion(+), 55 deletions(-) diff --git a/composer.json b/composer.json index 960b6bff731..37a21f8ce9b 100644 --- a/composer.json +++ b/composer.json @@ -84,7 +84,6 @@ "dms/phpunit-arraysubset-asserts": "^0.5", "phpunit/phpunit": "^9.6", "cebe/indent": "~1.0.2", - "johnkary/phpunit-speedtrap": "^1.0", "dealerdirect/phpcodesniffer-composer-installer": "*", "yiisoft/yii2-coding-standards": "^3.0" }, @@ -110,7 +109,6 @@ }, "config": { "allow-plugins": { - "cweagans/composer-patches": true, "yiisoft/yii2-composer": true, "dealerdirect/phpcodesniffer-composer-installer": true } diff --git a/composer.lock b/composer.lock index 0462f2fdaf1..e5d5f186df3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a87c124a4306ffc2d162e8fe374a9960", + "content-hash": "7269257cc9e1f2b37d4e30c637bb226b", "packages": [ { "name": "bower-asset/inputmask", @@ -513,58 +513,6 @@ ], "time": "2022-12-30T00:23:10+00:00" }, - { - "name": "johnkary/phpunit-speedtrap", - "version": "v1.0.2", - "source": { - "type": "git", - "url": "https://github.com/johnkary/phpunit-speedtrap.git", - "reference": "ad242a6e84b0d63d2e50832babad77d6d545bc0a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/johnkary/phpunit-speedtrap/zipball/ad242a6e84b0d63d2e50832babad77d6d545bc0a", - "reference": "ad242a6e84b0d63d2e50832babad77d6d545bc0a", - "shasum": "" - }, - "require": { - "php": ">=5.6", - "phpunit/phpunit": ">=4.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "JohnKary": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Kary", - "email": "john@johnkary.net" - } - ], - "description": "Find slow tests in your PHPUnit test suite", - "homepage": "https://github.com/johnkary/phpunit-speedtrap", - "keywords": [ - "phpunit", - "profile", - "slow" - ], - "support": { - "issues": "https://github.com/johnkary/phpunit-speedtrap/issues", - "source": "https://github.com/johnkary/phpunit-speedtrap/tree/master" - }, - "time": "2017-02-13T15:22:35+00:00" - }, { "name": "myclabs/deep-copy", "version": "1.11.1",