5.11 - #19062
Draft
brandonkelly wants to merge 23 commits into
Draft
Conversation
[ci skip]
[ci skip]
UrlHelper::removeParams(), removeAllParams()
Resolves #19139
[ci skip]
# Conflicts: # composer.lock
[ci skip]
reorderNestedElements()
[ci skip]
…dpoints Add support for `.well-known/passkey-endpoints`
[ci skip]
Contributor
There was a problem hiding this comment.
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-endpointssupport (routing + controller + functional test). - Added
Elements::reorderNestedElements()(refactor from controller) with a focused unit test. - Expanded
UrlHelperURL param removal capabilities (removeParams(),removeAllParams(), andurl(..., 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 on lines
+939
to
+946
| if ($nestedElements instanceof ElementQueryInterface) { | ||
| $oldSortOrders = (clone $nestedElements) | ||
| ->status(null) | ||
| ->asArray() | ||
| ->select(['id', 'sortOrder']) | ||
| ->pairs(); | ||
| } else { | ||
| $oldSortOrders = $nestedElements |
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.