Problem/Motivation

This Task is follow up from issue #2693485: Content types are ordered by machine name on /node/add page (+ similar issues with other entities)

Steps to reproduce

Proposed resolution

Deprecate the string code path and use typehint with an array in

+++ b/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php
@@ -112,4 +112,27 @@ protected function createBlockContentType($label, $create_body = FALSE) {
+  protected function createBlockContentTypeWithId($id, $label = '') {

Typehint will be added in D12 when the deprecation is removed.

Issue fork drupal-3196937

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

adalbertov created an issue. See original summary.

paulocs’s picture

Version: 10.0.x-dev » 9.2.x-dev
paulocs’s picture

Status: Needs work » Needs review
StatusFileSize
new5.96 KB

A patch for it.

kleiton_rodrigues’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new461.78 KB
new578.95 KB

The patch 3196937-3.patch is working correctly.
Was not found error and the patch was applied successfully.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
--- Commands Executed ---
core/scripts/dev/commit-code-check.sh --drupalci
Return Code: 1
--- Output ---
/var/www/html/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php:96:28 - Unknown word (paramter)
/var/www/html/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php:107:139 - Unknown word (paramter)

CSpell: failed

There's a spelling mistake.


@kleiton_rodrigues thank you for looking into this issue.

Posting screenshots of your codebase or CLI does not advance the issue, since the automated testing infrastructure tells us whether the patch applies correctly.

So, I've removed the issue credit for that screenshot. In the future, you can get credit for issues by reading the issue to understand its purpose, and posting your review or testing of that purpose. Thank you!

ayushmishra206’s picture

Status: Needs work » Needs review
StatusFileSize
new836 bytes
new6.02 KB

Made the change pointed out in #5. Please review.

ayushmishra206’s picture

StatusFileSize
new35.85 KB
new6.03 KB
new1.04 KB

Apology for the last patch, apparently the patch passed the Custom Command test in my local. Attaching the screenshot.
Also attached is the patch and diff after the fix.

Status: Needs review » Needs work

The last submitted patch, 7: 3196937-7.patch, failed testing. View results

guilhermevp made their first commit to this issue’s fork.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone made their first commit to this issue’s fork.

quietone’s picture

Title: In /core/modules/block_content/tests/src/Functional/BlockContentTestBase deprecate the string code path and use typehint with an array. » Deprecate the string code path for values parameter in \Drupal\Tests\block_content\Functional\BlockContentTestBase::createBlockContentType
Status: Needs work » Needs review
quietone’s picture

Title: Deprecate the string code path for values parameter in \Drupal\Tests\block_content\Functional\BlockContentTestBase::createBlockContentType » Deprecate the string code path for values parameter in BlockContentTestBase::createBlockContentType
smustgrave’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Seems straight forward. Tweaked IS to mention the typehint will be added in D12.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs change record

Added some comments to the MR. We need to create a CR for this one and use it in the deprecation notice.

quietone’s picture

Status: Needs work » Needs review

I thought I left a note here about the CR. Anyway, I did mess up the changes. That should be fixed now and I created the CR and updated the link in the deprecation message.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs change record

CR is there and pretty straight forward. Still get confused when a CR is needed vs pointing to an issue as I've seen both and get told different things.

But feedback to shorten replacements with just ID appears complete.

Remarking

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed f296e34 and pushed to 11.x. Thanks!

  • alexpott committed f296e346 on 11.x
    Issue #3196937 by quietone, ayushmishra206, paulocs, guilhermevp,...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.