[PSR-12] Proposal for a @generated tag

42 views
Skip to first unread message

Enrico Zimuel

unread,
Aug 10, 2021, 12:05:01 PMAug 10
to php...@googlegroups.com
Hi,

While working with generated PHP files, I noticed we don't have a specific phpDoc tag to inform us that a file/class/function has been generated.

This information is really important because the generated file should not be edited manually:-)

My proposal is to add a @generated tag for PSR-12 as follows:
/**
 * @generated using util/GenerateEndpoints.php script
 */

What do you think?
Thanks!

Regards,
Enrico Zimuel

Alexander Makarov

unread,
Aug 10, 2021, 12:09:56 PMAug 10
to PHP Framework Interoperability Group
That sounds like a candidate for PSR-5, not for PSR-12.

Chuck Burgess

unread,
Aug 10, 2021, 12:12:56 PMAug 10
to php...@googlegroups.com
PSR-19 actually... that's the tag catalog.
CRB


--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/6d0cbf93-e8e4-4447-83b2-03f5d456a1can%40googlegroups.com.

Enrico Zimuel

unread,
Aug 10, 2021, 12:18:30 PMAug 10
to php...@googlegroups.com
Hi Chuck,

That's true, the proposal is for PSR-19.

Thanks!

Regards,
Enrico

Enrico Zimuel

unread,
Aug 17, 2021, 6:19:25 AMAug 17
to php...@googlegroups.com
Hi Chuck,

I just sent this PR https://github.com/php-fig/fig-standards/pull/1249 proposing the @generated tag for PSR-19.

Regards,
Enrico

Reply all
Reply to author
Forward
0 new messages