Re: Digest for php-fig@googlegroups.com - 1 update in 1 topic

42 views
Skip to first unread message

Steve McDougall

unread,
Mar 20, 2024, 8:59:17 AMMar 20
to php...@googlegroups.com
I'd be interested in seeing how a set of standard attributes could be created to replace PhpDoc if I'm honest! But I'd be open to further discussions and information on the progression of this

Kind Regards
Steve McDougall

On Tue, 19 Mar 2024, 01:49 , <php...@googlegroups.com> wrote:
Ken Guest <k...@guest.ie>: Mar 18 02:15PM

I'm happy to sponsor this PSR on establishing a phpdoc standard, if there
are no objections.
 
K.
 
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to php-fig+u...@googlegroups.com.

Jaap van Otterdijk

unread,
Mar 20, 2024, 1:43:28 PMMar 20
to PHP Framework Interoperability Group
I do not think we should revisit the context of psr-5 and 19.  Phpdoc as a standard still makes a lot of sense. Maybe an extension could be to allow attributes, but that would enforce us to rethink the existing standard, where psr-5 is just about defining a real standard for a defacto standard that has been around for more than 20 years now.

But I'm open to talking about this topic.

Regards
Jaap
Op 20 mrt. 2024, om 13:59, Steve McDougall <justst...@gmail.com> schreef:

Larry Garfield

unread,
Mar 21, 2024, 12:31:31 PMMar 21
to PHP-FIG
On Wed, Mar 20, 2024, at 5:43 PM, Jaap van Otterdijk wrote:
> I do not think we should revisit the context of psr-5 and 19. Phpdoc
> as a standard still makes a lot of sense. Maybe an extension could be
> to allow attributes, but that would enforce us to rethink the existing
> standard, where psr-5 is just about defining a real standard for a
> defacto standard that has been around for more than 20 years now.
>
> But I'm open to talking about this topic.
>
> Regards
> Jaap

Clarification: PSR-5/19 were proposed as a way to standardize and update the old phpdoc convention, which *currently has no official standard*. That effort has stalled numerous times over the last decade, for various reasons.

The landscape has also changed in that time, such that attributes can now replace virtually all library-specific doc tags, and the language's ability to represent types now covers basically everything except array shapes and generics. That makes the relevant scope for PSR-5 much smaller, but also means it should ask questions like "should there be a FIG standard for defining generics types, or is the current status of PHPStan and Psalm having slightly different versions acceptable?" (I am not answering that question now, just noting it as the sort of thing the WG should discuss.)

--Larry Garfield

Steve McDougall

unread,
Mar 22, 2024, 8:02:48 AMMar 22
to php...@googlegroups.com
> ask questions like "should there be a FIG standard for defining generics types, or is the current status of PHPStan and Psalm having slightly different versions acceptable?"

I think you hit the nail on the head there Larry. While PhpStan and Psalm have similar standards that differ for their own use cases, there are others that also want to contribute to this space.

For example, Ryan Chandler is building a subset of PHP in Rust. He is also building tooling for PHP in Rust, and mentioned static analysis several times. If there was a PSR for generics etc, it would enable the wider community structured guidance for anything they wanted to work on.

PhpDocs are slowly becoming less and less valuable as attributes become the norm. Having PSRs in place to handle the move from doc blocks to whatever is next, would be a good move by the FIG 

Kind Regards
Steve McDougall

On Fri, 22 Mar 2024, 01:49 , <php...@googlegroups.com> wrote:
Reply all
Reply to author
Forward
0 new messages