Problem/Motivation
* The remainder of this documentation will assume Annotation-based discovery,
* since this is the most common method.
*
* @subsection sub_manager Defining a plugin manager class and service
* To define an annotation-based plugin manager:
* - Choose a namespace subdirectory for your plugin. For example, search page
* plugins go in directory Plugin/Search under the module namespace.
* - Define an annotation class for your plugin type. This class should extend
* \Drupal\Component\Annotation\Plugin, and for most plugin types, it should
* contain member variables corresponding to the annotations plugins will
* need to provide. All plugins have at least $id: a unique string
* identifier.
Everything that talks about annotations should be attributes instead, in the above and the rest of that section.
Tagging as novice but this line will need more substantial changes:
it should
* contain member variables corresponding to the annotations plugins will
* need to provide.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|
Issue fork drupal-3613569
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
Comment #4
charlliequadros commentedHi @joachim
I’ve made the requested changes. Please let me know if anything else is needed.
Comment #5
charlliequadros commentedComment #6
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #7
joachim commentedLooks great!
I'm not sure why the bot isn't happy -- could it be line length?
Just one thing I think needs changing.
Comment #8
charlliequadros commentedComment #9
charlliequadros commentedHi @joachim
I’ve made the change you suggested, and it’s now ready for review.
Regarding the bot, I believe it was a false positive.
Comment #10
charlliequadros commentedComment #11
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #12
charlliequadros commentedComment #13
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #14
charlliequadros commentedComment #15
charlliequadros commentedThe build is failing because only one file was changed, and that file ends with `api.php`. PHPStan ignores these files, so it ends up with no files to analyse and returns an error.
This is the expected behaviour in this scenario. If this is not the desired behaviour, we can create an issue to investigate and adjust it.
Comment #16
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #17
charlliequadros commentedComment #18
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #19
quietone commentedThe bot is complaining because there is a bug in the Drupal core commit checks, commit-code-check.sh, when there are only *.api.php files in the MR the PHPStan checks fail.
Comment #20
charlliequadros commentedComment #21
danielvezaWhat do we think about expanding the scope of this one slightly to just remove all references to annotations in that file (unless they're needed for reason). I've just been reviewing it and the changes as they are all look good and are probably ready for RTBC, but there is still 38 references to annotations in that file. My vote would be to do it in one hit, but if people disagree maybe we make a follow up and RTBC this one?
Comment #22
charlliequadros commentedHi @danielveza, @joachim
Personally, I would prefer opening a separate issue, mainly to keep the changes separated and easier to track.
However, I'm not sure if there is any real advantage to doing that or if it makes much difference to the Drupal workflow.
I'm happy with either approach.
Comment #23
smustgrave commented+1 to knocking it all in one go. Current MR is pretty small so expanding wouldn't be a review load.