Ignace Nyamagana Butera
banner
nyamsprod.com
Ignace Nyamagana Butera
@nyamsprod.com
190 followers 22 following 72 posts
Software developer. Creator of PHP centric package like league/csv, league/uri and bakame/http-structured-fields. Sponsor me at http://github.com/sponsors/nyamsprod
Posts Media Videos Starter Packs
Pinned
There's a new league/uri package in town guess which one it is ? uri.thephpleague.com
It will be release with version 7.6 of all the other packages 🥳 #PHP #URI #polyfill special thanks to github.com/TimWolla, github.com/kocsismate and github.com/TRowbotham for the help and support
Here's a sneak peak at what you will be able to do with version 7.6 of the PHP league uri toolkit.

The toolkit adds support for the new PHP URI extension and gives you a nice API to work with URI in PHP.

learn more on uri.thephpleague.com

#PHP #URI #RFC3986 #WHATWGURL
Finishing adding these imports everywhere in league/uri codebase version 7.6 is almost ready!! #PHP #URI #OSS
#thephpleague
There's a new league/uri package in town guess which one it is ? uri.thephpleague.com
It will be release with version 7.6 of all the other packages 🥳 #PHP #URI #polyfill special thanks to github.com/TimWolla, github.com/kocsismate and github.com/TRowbotham for the help and support
Coming in the next version of league/csv named constructors simplification. All the current named constructors are deprecated in favor of just two. which will simplify the user choice and improve DX #csv #php #oss #thephpleague Read the doc for more informations csv.thephpleague.com/9.0/connecti...
Coming in the next minor version of #LeagueCSV the JsonConverter #ndjson support is improved you can now do the following #php #csv #oss
New minor versions of the league/uri packages are coming in a couple of weeks. They will contain new features and deprecations. Please head over the documentation site or play around with the dev-master and report bugs or regressions now. #PHP #URI #OOS uri.thephpleague.com
Modern API to process URIs in PHP - URI
Modern API to process URIs in PHP
uri.thephpleague.com
PHP warnings:
Sometimes harmless 🤷
Sometimes critical 💥
Always annoying 😅

My fix: a Warning class to cloak or trap them, once and for all.

nyamsprod.com/blog/dealing...

#php #warnings #error_handling
Dealing with Warnings in PHP, the Right Way | nyamsprod
nyamsprod.com
A new version of #stackwatch is out with tons of new features, fixes and removal for instance the new version nows comes with a PHPUnit helper traits to ease testing callback or method performances. See more on the documentation website bakame-php.github.io/stackwatch/ #php #profiling #OOP
I hope theses examples explain the goal. To have total control over the functions behaviour.
That what does it wraps them
`fopen` returns false on error ... so fopen is a code smell is that what you are saying 🤔 and that's the case for most php internal functions. so the solution is for a known behaviour of PHP not for userland code where I do not expect developer to use E_USER_WARNING + false but rather exceptions
because the method already return false why would I want to know twice that there's a error ... If the function was returning an Error like a ValueError I would not have to suppress anything. I already know I have false returned it's twice the same information for no real added value.
I usually hate traits but I hate even more the PHP error control operator so I made this trait #PHP #trait
I created a new package called #stackwatch and If someone is interested I have 3 open issues on #stackwatich which I need help for github.com/bakame-php/s... to tag the first stable version.

Of course feel free to add more issues if you test the package #php #profiling
bakame-php/stackwatch
A minimalist multi-metric PHP Profiler. Contribute to bakame-php/stackwatch development by creating an account on GitHub.
github.com
Periodic reminder: stop using boolean as options flags in #PHP use Enum instead. Boolean flags are hard to read and to remember and lead to tricky bugs and requiring a trip to the method/function definition, Enum are explicit and readable and offer granularity instead of a simple yes/no answer
I have updated my RFC around data encoding in PHP to allow users to migrate to the new API. wiki.php.net/rfc/data_enc... comments and remarks are welcomed #PHP #RFC #base64 #base16 #base58 #base32
PHP: rfc:data_encoding_api
wiki.php.net
github.com/bakame-php/a... is almost stable if you could give a spin an report issues or improvement it would be nice. It is a nice non brainer straightforward profiler in PHP which seats between Xdebug and you double call to microtime 😂 Give it a shot. #PHP #profiler #OSS
GitHub - bakame-php/aide-profiler: A minimalist multi-metric PHP Profiler
A minimalist multi-metric PHP Profiler. Contribute to bakame-php/aide-profiler development by creating an account on GitHub.
github.com
Reposted by Ignace Nyamagana Butera
The new @symfony.com #JsonPath component just got more useful: directly integrate it in your test cases to ensure everything is at the right place in your #JSON string/resource 👀

Experimental and to be tested in #Symfony 7.3 🙌

Pull request: github.com/symfony/symf...
#PHP may be the first language to correctly support #RFC3986 #URI and #WHATWG #URL at the same time if
RFC wiki.php.net/rfc/url_pars... passes.

I created a polyfill which works on PHP8.1+ github.com/bakame-php/a... It will get tagged as stable once the RFC has passed.
PHP: rfc:url_parsing_api
wiki.php.net
League/csv 9.22.0 is out with a new class the Buffer which enable buffering and performing CRUD operation on your data. Please read the documentation csv.thephpleague.com/9.0/writer/b... and the release notes for more github.com/thephpleague... #php #csv #leagueCSV