- ๐ญ๐บHungary nevergone Nyรญregyhรกza, Hungary, Europe
How can we move this issue forward? Related issue: ๐ Add @method PhpDoc for EntityStorageInterface descendants Postponed
- ๐ท๐บRussia Chi
Drupal Coding Standards should be updated to allow this.
Was it actually forbidden?
- ๐บ๐ธUnited States neclimdul Houston, TX
I don't believe so but our CS tends toward if its not documented, its not allowed. Like without explicit documentation of how we allow its usage, its not supported in tools and reviews get held up bike-shedding or excluding. And without that documentation on how we allow its use, we can end up with inconsistent usage that we end up having to spend a lot of time unraveling.
That said, I don't know what would hold this up. We should just accept the phpdoc version and move on.
- ๐ท๐บRussia Chi
Coding Standard will never cover everything. Meaning there will be always some degree of freedom. If something is not prohibited explicitly you are free to use it.
BTW there are examples of @method usage in core.
https://git.drupalcode.org/project/drupal/-/blob/10.1.0-rc1/core/lib/Dru...I propose we close this issue as "works as expected".
- ๐ต๐นPortugal gueguerreiro Lisboa
It is used there, but it is clearly not supported if we head to the api.drupal.org page: https://api.drupal.org/api/drupal/core!lib!Drupal!Component!Datetime!Dat... It looks like broken text that shouldn't be there.
I'm not sure if there's an issue queue specific for the parser that is being used to build the api.drupal.org pages, but wouldn't @method calls being explicitly supported by the Coding Standards be a pre-requirement to have that support in api.drupal.org also? See #3323252-12: Add @method PhpDoc for EntityStorageInterface descendants โ in the related issues, and #3077520-22: Fix and improve DateTimePlus documentation โ , which pertains directly to the DateTime documentation with @methods that was linked above.
I agree with #5 that if we're including @method support, we should also add support for @property methods.
- ๐ท๐บRussia Chi
@gueguerreiro, it's just a bug in API project โ that needs to be reported and fixed. It has nothing to do with Drupal coding standarts.