Make SQL direction default behavior more consistent when an unknown direction is passed

Created on 4 September 2019, over 5 years ago
Updated 24 February 2023, almost 2 years ago

Problem/Motivation

Follow-up for #3039568 #2711739: Missing summary/param/return docs for several QueryInterface methods → .

The direction parameter for QueryInterface::sort() needs a better description.

See why: #2711739: Missing summary/param/return docs for several QueryInterface methods →

/core/lib/Drupal/Core/Entity/Query/QueryInterface.php

/**
 * Sorts the result set by a given field.
 *
 * @param string $field
 *   Name of a field.
 * @param string $direction
 *   The direction to sort. Allowed values are "ASC" and "DESC". Any other
 *   value will be converted to "ASC".
 * @param string|null $langcode
 *   Language code (optional).
 *
 * @return $this
 *   The called object.
 */
public function sort($field, $direction = 'ASC', $langcode = NULL);

Proposed resolution

?

📌 Task
Status

Needs work

Version

10.1 ✨

Component
Database  →

Last updated 2 days ago

  • Maintained by
  • 🇳🇱Netherlands @daffie
Created by

🇵🇱Poland Krzysztof Domański Poland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024