Closed (fixed)
Project:
JSON-RPC
Version:
3.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
31 Aug 2024 at 01:13 UTC
Updated:
4 Aug 2025 at 10:59 UTC
Jump to comment: Most recent
Core is moving from Doctrine annotations to PHP attributes, so we should too.
Although I have created an MR, I don't understand Attributes or Annotations well, so I would highly appreciate anyone who steps up and wants to work on this issue.
The current working branch is attributes_refactor. The test failures are caused by AnnotationNormalizer in jsonapi_discovery, which needs to be updated to support attributes.
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
Comment #2
ptmkenny commentedThis can be part of the 3.0 release.
Comment #3
ptmkenny commentedPlugin implementations should use PHP attributes instead of annotations
Plugin types should use PHP attributes instead of annotations
Comment #4
ptmkenny commentedComment #6
ptmkenny commentedComment #7
ptmkenny commentedComment #8
ptmkenny commentedAfter struggling with this, I think we're blocked on #3484651: Fatal error: Declaration of Drupal\Component\Plugin\Attribute\AttributeBase::setClass(string $class): void must be compatible with Drupal\Component\Plugin\Definition\PluginDefinitionInterface::setClass($class) .
Comment #9
ptmkenny commentedComment from fathershawn on Slack:
Comment #12
ptmkenny commentedComment #13
ptmkenny commentedComment #17
ptmkenny commentedComment #18
ptmkenny commentedComment #20
ptmkenny commented