Skip to content

5.11 - #19062

Draft
brandonkelly wants to merge 23 commits into
5.xfrom
5.11
Draft

5.11#19062
brandonkelly wants to merge 23 commits into
5.xfrom
5.11

Conversation

@brandonkelly

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings August 4, 2026 18:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces several Craft CMS 5.11 changes across routing, URL utilities, sessions, and element services, with accompanying unit/functional tests and dependency updates.

Changes:

  • Added .well-known/passkey-endpoints support (routing + controller + functional test).
  • Added Elements::reorderNestedElements() (refactor from controller) with a focused unit test.
  • Expanded UrlHelper URL param removal capabilities (removeParams(), removeAllParams(), and url(..., false) behavior) with new unit tests; updated Twig/yii2-debug dependencies and added a 5.11 changelog.

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/unit/services/ElementsTest.php Adds a unit test for nested element reordering, including test-only field/section setup and teardown.
tests/unit/helpers/UrlHelperTest.php Adds test coverage for new URL param removal helpers and url() behavior changes.
tests/functional/WellKnownCest.php Adds functional coverage for the new .well-known/passkey-endpoints response.
src/web/UrlManager.php Routes new discoverable .well-known/passkey-endpoints requests.
src/web/DbSession.php Introduces a DbSession subclass to avoid session-opening when headers are already sent.
src/services/Elements.php Adds reorderNestedElements() service method (refactor from controller).
src/helpers/UrlHelper.php Adds removeParams()/removeAllParams() and extends url() to accept false for param removal.
src/controllers/WellKnownController.php Implements the .well-known/passkey-endpoints controller action.
src/controllers/NestedElementsController.php Refactors controller logic to call Elements::reorderNestedElements().
composer.lock Updates locked dependency versions to match new requirements.
composer.json Bumps Twig and yii2-debug version constraints.
CHANGELOG-5.11.md Adds initial 5.11 release notes entries for the new behaviors/features.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/services/Elements.php
Comment on lines +939 to +946
if ($nestedElements instanceof ElementQueryInterface) {
$oldSortOrders = (clone $nestedElements)
->status(null)
->asArray()
->select(['id', 'sortOrder'])
->pairs();
} else {
$oldSortOrders = $nestedElements
Comment thread src/helpers/UrlHelper.php
Comment on lines 362 to +366
if ($scheme === null && !$request->getIsConsoleRequest() && $request->getIsSecureConnection()) {
$scheme = 'https';
}

return self::_createUrl($path, $params, $scheme, $cpUrl, showScriptName: $showScriptName);
return self::_createUrl($path, $params ?: null, $scheme, $cpUrl, showScriptName: $showScriptName);
Comment on lines +208 to +212
Craft::$app->getEntries()->deleteSection($this->section);
Craft::$app->getEntries()->deleteEntryType($this->ownerEntryType);
Craft::$app->getEntries()->deleteEntryType($this->blockEntryType);
Craft::$app->getFields()->deleteField($this->matrixField);
Craft::$app->getFields()->deleteField($this->blockTextField);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants