Skip to content

Commit

Permalink
Yii 2.0.46
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Aug 30, 2022
1 parent 1e5d53d commit 5b6427a
Show file tree
Hide file tree
Showing 17 changed files with 192 additions and 330 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-WIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
- `craft\helpers\Component::iconSvg()` now namespaces the SVG contents, and adds `aria-hidden="true"`. ([#11703](https://github.com/craftcms/cms/pull/11703))
- `craft\services\Search::EVENT_BEFORE_INDEX_KEYWORDS` is now cancellable by setting `$event->isValid` to `false`. ([#11705](https://github.com/craftcms/cms/discussions/11705))
- `checkboxSelect` inputs without `showAllOption: true` now post an empty value if no options were selected. ([#11748](https://github.com/craftcms/cms/issues/11748))
- Updated Yii to 2.0.46.

### Deprecated
- Deprecated `craft\base\Element::EVENT_AUTHORIZE_CREATE_DRAFTS`. `craft\services\Elements::EVENT_AUTHORIZE_CREATE_DRAFTS` should be used instead.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"twig/twig": "~3.3.0",
"voku/stringy": "^6.4.0",
"webonyx/graphql-php": "~14.11.5",
"yiisoft/yii2": "~2.0.45.0",
"yiisoft/yii2": "~2.0.46.0",
"yiisoft/yii2-debug": "~2.1.19.0",
"yiisoft/yii2-queue": "~2.3.2",
"yiisoft/yii2-symfonymailer": "^2.0.0"
Expand Down
398 changes: 190 additions & 208 deletions composer.lock

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ parameters:
- stubs/GraphQL/Type/Definition/ResolveInfo.stub
- stubs/samdark/log/PsrTarget.stub
- stubs/yii/base/Component.stub
- stubs/yii/base/ErrorHandler.stub
- stubs/yii/base/Event.stub
- stubs/yii/base/Module.stub
- stubs/yii/BaseYii.stub
Expand All @@ -40,13 +39,7 @@ parameters:
- stubs/yii/di/ServiceLocator.stub
- stubs/yii/helpers/BaseArrayHelper.stub
- stubs/yii/validators/UniqueValidator.stub
- stubs/yii/validators/UrlValidator.stub
- stubs/yii/validators/Validator.stub
- stubs/yii/web/AssetManager.stub
- stubs/yii/web/ErrorHandler.stub
- stubs/yii/web/Request.stub
- stubs/yii/web/Response.stub
- stubs/yii/web/User.stub
earlyTerminatingMethodCalls:
Craft:
- dd
Expand Down
2 changes: 0 additions & 2 deletions src/controllers/AppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ public function actionMigrate(bool $applyProjectConfigChanges = false): Response
$backupPath = $db->backup();
} catch (Throwable $e) {
Craft::$app->disableMaintenanceMode();
/** @phpstan-ignore-next-line */
throw new ServerErrorHttpException('Error backing up the database.', 0, $e);
}
}
Expand Down Expand Up @@ -304,7 +303,6 @@ public function actionMigrate(bool $applyProjectConfigChanges = false): Response
}

Craft::$app->disableMaintenanceMode();
/** @phpstan-ignore-next-line */
throw new ServerErrorHttpException($error, 0, $e);
}

Expand Down
1 change: 0 additions & 1 deletion src/controllers/CategoriesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ public function actionSaveCategory(): ?Response
'category'
);
} catch (Throwable $e) {
/** @phpstan-ignore-next-line */
throw new ServerErrorHttpException(Craft::t('app', 'An error occurred when duplicating the category.'), 0, $e);
}
}
Expand Down
1 change: 0 additions & 1 deletion src/controllers/ElementsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,6 @@ public function actionDuplicate(): ?Response
'type' => $element::lowerDisplayName(),
]));
} catch (Throwable $e) {
/** @phpstan-ignore-next-line */
throw new ServerErrorHttpException('An error occurred when duplicating the element.', 0, $e);
}

Expand Down
1 change: 0 additions & 1 deletion src/controllers/EntriesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ public function actionSaveEntry(bool $duplicate = false): ?Response
'entry'
);
} catch (Throwable $e) {
/** @phpstan-ignore-next-line */
throw new ServerErrorHttpException(Craft::t('app', 'An error occurred when duplicating the entry.'), 0, $e);
}
}
Expand Down
10 changes: 0 additions & 10 deletions stubs/yii/BaseYii.stub
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,8 @@ class BaseYii
* @return T
*/
public static function createObject($type, array $params = []);

/**
* @param \yii\log\Logger|null $logger
* @return void
*/
public static function setLogger($logger) {}
}

namespace yii\log;

class Logger {}

namespace craft\console;

class Application {}
Expand Down
18 changes: 0 additions & 18 deletions stubs/yii/base/ErrorHandler.stub

This file was deleted.

11 changes: 0 additions & 11 deletions stubs/yii/validators/UrlValidator.stub

This file was deleted.

10 changes: 0 additions & 10 deletions stubs/yii/validators/Validator.stub
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@ namespace yii\validators;

class Validator
{
/**
* @var string|null
*/
public $message;

/**
* @var callable|null
*/
public $isEmpty;

/**
* @param string|\Closure $type
* @param \yii\base\Model|\craft\base\ModelInterface $model
Expand Down
11 changes: 0 additions & 11 deletions stubs/yii/web/AssetManager.stub

This file was deleted.

11 changes: 0 additions & 11 deletions stubs/yii/web/ErrorHandler.stub

This file was deleted.

11 changes: 0 additions & 11 deletions stubs/yii/web/Request.stub

This file was deleted.

11 changes: 0 additions & 11 deletions stubs/yii/web/Response.stub

This file was deleted.

16 changes: 0 additions & 16 deletions stubs/yii/web/User.stub

This file was deleted.

0 comments on commit 5b6427a

Please sign in to comment.