Overview

Now we require Drupal 11.1 we can use attributes instead of annotations in plugins for better DX.

Proposed resolution

 * @ConfigEntityType(
 *    id = \Drupal\experience_builder\Entity\Component::ENTITY_TYPE_ID,
 *    label = @Translation("Component"),
 *    label_singular = @Translation("component"),
...

becomes

#[ConfigEntityType(
  id: Component::ENTITY_TYPE_ID,
  label: new TranslatableMarkup('Component'),
  label_singular: new TranslatableMarkup('Component'),
...

User interface changes

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

longwave created an issue. See original summary.

meghasharma’s picture

Assigned: Unassigned » meghasharma

meghasharma’s picture

Assigned: meghasharma » Unassigned
Status: Active » Needs work

Converted all ConfigEntityType plugins to use PHP 8 attributes instead of annotations.

utkarsh_kumar_singh’s picture

Assigned: Unassigned » utkarsh_kumar_singh

I am working on it.

utkarsh_kumar_singh’s picture

Assigned: utkarsh_kumar_singh » Unassigned
Status: Needs work » Needs review

Resolved merge conflict.

penyaskito’s picture

Status: Needs review » Needs work

That rebase went bad. Lots of unrelated changes.

utkarsh_kumar_singh’s picture

Hello @penyaskito,
Thank you for your feedback. Could you please clarify which unrelated changes you are referring to in MR !855? When I check the MR, I see only 5 files changed, which I believe are related to the issue. I'd really appreciate any specific pointers so I can correct it properly.

wim leers made their first commit to this issue’s fork.

wim leers’s picture

@utkarsh_kumar_singh Yep, looking good now! 👍😄

Fixed a few nits, but I believe the remaining feedback is actionable for you :)

wim leers’s picture

Also: not all plugin annotations have been converted. For example: \Drupal\experience_builder\Entity\Page's.

utkarsh_kumar_singh’s picture

Status: Needs work » Needs review

Hello @wim leers,
Thank you for your suggestion, and apologies for the delay. I've implemented the suggested changes—please review.

longwave’s picture

Status: Needs review » Needs work

Failing phpstan and tests.

longwave’s picture

Status: Needs work » Needs review

penyaskito’s picture

wim leers’s picture

Assigned: Unassigned » wim leers

It will be so nice to have this in! :D

And given it's a long weekend for many, I'm prioritizing this landing today to minimize overall disruption.

wim leers changed the visibility of the branch 0.x to hidden.

wim leers’s picture

Assigned: wim leers » Unassigned
Status: Needs review » Reviewed & tested by the community
wim leers’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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