home.social

#phpfig — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #phpfig, aggregated by home.social.

  1. If #PHPFIG, I think it’d work like a registry (like the IANA registries that IETF RFCs can create). A PSR would define the registry & process for adding attributes to it. That could allow changes in a much more fluid way. #PHP

  2. I think some collection of community-approved attributes might be beneficial for PHP.

    I’m thinking in terms of attributes like `#[Internal]` that might not make sense to add directly to the language but would be good to have so that static analysis tools and IDEs could standardize on them (like with phpdoc annotations).

    Is this something @phpfig would take on? If not them, who?

    #PHP #PHPFIG

  3. "Users can provide both encoded and decoded query characters. Implementations ensure the correct encoding as outlined in getQuery()." —UriInterface, PSR-7

    If I'm building a library that uses PSR-7 interfaces, how do I know whether I can provide encoded or decoded query characters to the implementation, since my library doesn't know what implementation(s) it's dealing with?

    #PHP #PHPFIG #PSR7

  4. I've made a few small changes to this draft and have updated it to 0.2.1. It's only been 2 years and 4 months since the 0.1.0 draft. 😳

    Maybe I should try to do something with this, like approach #PHPFIG about it. I'm just not sure I have the energy to do much more than present a draft.

    php-identifier.readthedocs.io/

  5. Hey #PHP. When you use union and intersection types, do you include spaces?

    (RT for reach, etc. This is survey data for @phpfig. If you know of any official policies by major projects already, please note/link in the replies.)

    #codingstyle #phpfig

  6. @jrf_nl Do you know of any phpcs sniffs that implement the newer #PHPFig PER Coding Style 2.0?

    In particular, I'm thinking about: “If a function or method contains no statements or comments (such as an empty no-op implementation or when using constructor property promotion), then the body SHOULD be abbreviated as {} and placed on the same line as the previous symbol, separated by a space.”

    And the similar rule for classes.

    php-fig.org/per/coding-style/

  7. @danb @EdGrosvenor If we were able to set up some kind of governance structure like #PHPFig, then we could have community projects apply for “representation,” which would get them a voting seat, but we’d need to define a level of active participation their voter needs to maintain. They’d be the liaison for the project and would need to participate in discussions relevant to their project’s interests.

  8. How does a screen reader read a hashtag that includes an acronym and a pronounceable word, like #PHPFig? I would say this as “P-H-P fig,” for example. How does a screen reader read it? I’d like to make my hashtags as accessible as possible.

    #accessibility

  9. The @phpfig PSRs should also define the names of the packages that include the interfaces, as well as the name used to indicate implementations of the PSR.

    i.e., PSR-17 would include psr/http-factory and psr/http-factory-implementation, so I don’t have to go searching for these names every time.

    #PHP #PHPFig #PSR

  10. I really like what @Crell wrote here:
    peakd.com/hive-168588/@crell/m

    espcially like the Error marker suggestion that would be handled by ?? and ?->

    can we hope an RFC for something like that and/or a #phpfig #PSR ?

    #php

  11. WPSR

    Auf dem CloudFest Hackathon im März, hab‘ ich mich ein wenig mit Alain Schlesser über WordPress und Plugin-Entwicklung unterhalten. Alain meinte, dass er, wenn es das Plugin hergibt und es zeitlich möglich ist, immer zuerst eine generische Library bauen und diese dann über ein WordPress-Plugin implementieren würde.

    notiz.blog/2022/05/15/wpsr/