Sign in

Ignace Nyamagana Butera

@nyamsprod.com
207 followers 22 following 96 posts

Software developer. Creator of PHP centric package like league/csv, league/uri and bakame/http-structured-fields. Sponsor me at github.com/sponsors/nyamsprod

PostsRepliesMedia
Ignace Nyamagana Butera @nyamsprod.com · 25/09/2026
Just released a new minor version of league/period. It: - drops support for PHP8.1 - add support for PHP8.6 Time\Duration. And there's always that small bug fixe in between Happy upgrading and coding! github.com/thephpleague... #period #duration #php81 #php86 #time
github.com
Release version 5.4.0 · thephpleague/period
Added Support for Time\Duration Fixed Fix inconsistent behaviour in Duration named constructor #141 Deprecated None Removed PHP8.1 support Full Changelog: 5.3.3...5.4.0
010
Ignace Nyamagana Butera @nyamsprod.com · 15/09/2026
#tokei is now officially stable. I just released version 1.0.0 nicknamed Daria. Using duration and local time in PHP has never been that straightforward. Along with the release a documentation website and a logo are now avaiable at bakame-php.github.io/tokei/ #PHP #Duration #localtime #interval
bakame-php.github.io
Tokei. Duration, Local time and interval primitives without timezone complexity - Tokei
A framework-agnostic PHP library to handle duration, time, circular 24-hour intervals, and interval sets, without timezone complexity.
030
Ignace Nyamagana Butera @nyamsprod.com · 10/09/2026
What if URI Templates could work both ways? Template → URI Template ← URI With the next minor version of league/uri, you will be able to extract variables from a URI into an ExtractionResult. Same template. Both directions. #PHP #URI #URITemplate
PHP code showing URI Template extraction with League\Uri. A template contains repeated variables, including {term:1} and {term}, plus an exploded query variable {q*}. The URI /1.1/search/j/john/?q=a&q=b&limit=10 is extracted into an ExtractionResult, producing version "1.1", term "john", q as ["a", "b"], and limit "10".
010
Ignace Nyamagana Butera @nyamsprod.com · 20/08/2026
league/csv warnings on the README page are getting bigger on each PHP version upgrade 😂 😂 #PHP86 #maintenance #CSV
000
Ignace Nyamagana Butera @nyamsprod.com · 18/07/2026
The Duration class in Tokei 0.2.0 introduces the modulo() and dividedInto() methods that provide an easy way to retrieve the remainder of a duration division. This is especially useful when dealing with circular ranges. #duration #localtime #php #circular-range bakame-php.github.io/tokei/
Example demonstrating the difference between Duration::modulo() and the remainder returned by Duration::dividedInto(). For a positive duration of 3 hours and 35 seconds divided by 1 hour, both methods return a remainder of 35 seconds. For the negated duration, modulo() returns a positive remainder (59 minutes and 25 seconds), while dividedInto()->remainder preserves the sign of the original duration and returns −35 seconds.
000
Ignace Nyamagana Butera @nyamsprod.com · 17/07/2026
🎉 tokei 0.2.0 — codename Botan is out! New features, bug fixes, BC breaks, and official docs: bakame-php.github.io/tokei/ Tokei is a small #PHP package for working with local time, durations, and intervals. Try it, share feedback, and leave a ⭐ if you find it useful: github.com/bakame-php/t...
bakame-php.github.io
Tokei. Duration, Local time and interval primitives without timezone complexity - Tokei
A framework-agnostic PHP library to handle duration, time, circular 24-hour intervals, and interval sets, without timezone complexity.
000
Reposted by Ignace Nyamagana Butera
Alexandre Daubois @alexdaubois.bsky.social · 28/04/2026
Ember 1.3 is out! 🔥🐘 I wrote a blog post about the new features of 1.2 & 1.3: plugin system, access and runtime logs live visualisation, upstreams health, Docker Hub... a lot to discover! Everything you need to know 👉 les-tilleuls.coop/en/blog/embe...
021
Ignace Nyamagana Butera @nyamsprod.com · 11/04/2026
Did you know that you can map #CSV row to DTO using league/csv ? in the next version you will be able in #PHP8.5+ to use a static closure to allow specific casting rules
The script shows how using the League/csv package you will be able in the next minor version to use in PHP8.5+ closure to further specify row cell casting to DTO properties so that each CSV record is converted into a fully PHP typed structure.
001
Ignace Nyamagana Butera @nyamsprod.com · 07/04/2026
nothing beats good ol' match 🎉
000
Reposted by Ignace Nyamagana Butera
Alexandre Daubois @alexdaubois.bsky.social · 02/04/2026
#PHP streams have a built-in notification system. Set a callback in the stream context. Get called on CONNECT, MIME_TYPE, FILE_SIZE, PROGRESS, COMPLETED. Download progress bars. In pure PHP. No curl_setopt. No ReactPHP. This callback has existed since PHP 5.2!
052
Reposted by Ignace Nyamagana Butera
Alexandre Daubois @alexdaubois.bsky.social · 30/03/2026
#PHP has a built-in stream filter that converts character encoding on the fly. convert.iconv.FROM/TO. Attach it to any stream. Data is re-encoded as it flows through. Read a Shift_JIS file as UTF-8. No iconv() call. No mb_convert. Just fopen + filter.
032
Ignace Nyamagana Butera @nyamsprod.com · 29/03/2026
github.com/thephpleague... you can have examples here if you are interested and they're more usage like converting the file from iso to utf8 and so forth
github.com
csv/src/CallbackStreamFilterTest.php at master · thephpleague/csv
CSV data manipulation made easy in PHP. Contribute to thephpleague/csv development by creating an account on GitHub.
000
Ignace Nyamagana Butera @nyamsprod.com · 29/03/2026
been using this for years now in league/csv to improve and add powerful feature to the package. And yes this is an underused and little know powerful feature from PHP
110
Reposted by Ignace Nyamagana Butera
Alexandre Daubois @alexdaubois.bsky.social · 19/03/2026
The #JsonPath @symfony component just got an upgrade! Per the RFC, it is now possible to declare custom functions to be parsed and used in your JSON paths. The component is now complete: RFC-compliant, extendable... Maybe you have ideas for it? github.com/symfony/symf...
023
Ignace Nyamagana Butera @nyamsprod.com · 15/03/2026
Nice finding... sadly sorting correctly per directory is kindof broken
001
Ignace Nyamagana Butera @nyamsprod.com · 09/03/2026
Correct!! in dev every answer is.. "it depends" 👍
010
Ignace Nyamagana Butera @nyamsprod.com · 09/03/2026
If the goal is download why not just use the php:://output stream directly 🤔
100
Ignace Nyamagana Butera @nyamsprod.com · 02/03/2026
I do not think they are forgotten they just have a bad reputations... nuance. I know about them but if I stumble on them during a codebase review they will be the first I ask to refactor to a more maintainable and readable code.
010
Ignace Nyamagana Butera @nyamsprod.com · 12/02/2026
A straight forward package in PHP to parse, manipulate and generate The Cache-Status HTTP Header Field. github.com/bakame-php/h... #php #http-cache-status #http-structured-fields
github.com
GitHub - bakame-php/http-cache-status: Cache-Status HTTP Response Header Field
Cache-Status HTTP Response Header Field. Contribute to bakame-php/http-cache-status development by creating an account on GitHub.
000
Ignace Nyamagana Butera @nyamsprod.com · 10/02/2026
firefish.imirhil.fr/notes/aijate...
firefish.imirhil.fr
aeris (@aeris)
C’est qui qui a fuité aujourd’hui ? C’est La Carte Avantage Jeune https://bonjourlafuite.eu.org/#La%20Carte%20Avantage%20Jeune-2026-02-09
000
Ignace Nyamagana Butera @nyamsprod.com · 17/01/2026
nyamsprod.com/blog/dealing... a new blog post explaining the new fetures in the #PHP #URI Toolkit but also encourage developers to participate in shaping the future of PHP
nyamsprod.com
Dealing with a PHP BC break | nyamsprod
000
Ignace Nyamagana Butera @nyamsprod.com · 16/01/2026
I just released version 7.8.0 of all my #PHP #URI packages. The new version adds support for BackedEnum everywhere, improve string coercion and allow migrating and mitigating the BC breaks introduced in http_build_query in #PHP8.4 full changelog github.com/thephpleague...
This example show the usage of the new QueryString::compose method with the new QueryComposeMode Enum.  It highlights the different ways to compose an query string to better migrate between the BC breaks in http_build_query  behaviours .
the QueryComposeMode::Native mode just encode using http_build_query so it is PHP version dependent.
020
Ignace Nyamagana Butera @nyamsprod.com · 27/12/2025
Last release of the year #CSV github.com/thephpleague... also last release which supports #PHP8.1 . It adds Enum formatting support on writing
github.com
Release version 9.28.0 · thephpleague/csv
Added EnumFormatter to format Enum for CSV serialization Deprecated None Fixed None Remove None This is the last version supporting PHP8.1
020
Ignace Nyamagana Butera @nyamsprod.com · 08/12/2025
League URI Toolkit 7.7.0 is released. 🎉 - It fixes a regression introduced in version 7.6.0 - adds a redact URI components API via the Modifier class - Improve host parsing and host handling Learn more on the uri.thephpleague.com documentation website. #PHP #URI #OSS
The picture shows some of the new features and fixes added to the package. Like the public Redact API and the improved path modification. see more on the documentation website
000
Ignace Nyamagana Butera @nyamsprod.com · 18/11/2025
This is now live and for everyone to use just do `composer require league/uri-polyfill league/uri-component` and you will be good to go with version 7.6
010
Ignace Nyamagana Butera @nyamsprod.com · 18/11/2025
I am very happy to announce that the League #URI toolkit for #PHP developers 7.6 has been released! This release includes a new uri-polyfill package, a new URN object, a new FragmentDirectives object and tons of improvements please check the uri.thephpleague.com for more information
uri.thephpleague.com
000
Ignace Nyamagana Butera @nyamsprod.com · 18/11/2025
Also I remember creating this Calendar object with Period based on an article from your team 😀 gist.github.com/nyamsprod/c1...
gist.github.com
Create a Calendar in PHP using League Period
Create a Calendar in PHP using League Period. GitHub Gist: instantly share code, notes, and snippets.
140
Ignace Nyamagana Butera @nyamsprod.com · 18/11/2025
I did this for the Period package and it works like a charm github.com/thephpleague...
github.com
period/src/Period.php at d1d83adc60e2f82ace9cb8004552cc8a8c1b5947 · thephpleague/period
PHP's time range API. Contribute to thephpleague/period development by creating an account on GitHub.
120
Ignace Nyamagana Butera @nyamsprod.com · 29/10/2025
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
The League\Uri\Modifier class wraps any URI object and perform the correct modification on the wrapped URI. After any applied modification you can access the changed URI using the Modifier::unwrap() method.
The method will always return an URI of the same instance of the one you give to the Modifier::wrap method.
The Modifier class works for League Uri own URI class but also for PSR-7 UriInterface implementing classes and PHP's new native URI classes.
020
Ignace Nyamagana Butera @nyamsprod.com · 24/10/2025
Finishing adding these imports everywhere in league/uri codebase version 7.6 is almost ready!! #PHP #URI #OSS #thephpleague
The image highlights the addition of import definition for PHP new native URI extension in league/uri codebase. This extension will always be available when PHP8.5 is released and support for them is being added to league/uri.
010
Ignace Nyamagana Butera @nyamsprod.com · 15/10/2025
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
The league URI toolkit has a new package ready to be released named uri-polyfill and it brings PHP's new URI extension to PHP8.1+ version
000
Ignace Nyamagana Butera @nyamsprod.com · 14/10/2025
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...
All the current named constructors are being deprecated and replaced by 2 simple named constructors that are easier and more powerful to work with.
For instance Reader::createFromString is replaced by Reader::fromString
and all the other methods are replaced by the more easy to use Reader::from.
010
Ignace Nyamagana Butera @nyamsprod.com · 26/09/2025
Coming in the next minor version of #LeagueCSV the JsonConverter #ndjson support is improved you can now do the following #php #csv #oss
You load a CSV written in french iso-8895-15 and using the ";" as delimiter
You first load the CSV document. 
Then using the stream feature you convert on the fly the document into UTF-8 using mb_string extension. 
You convert and store the CSV document as a NDJson file using a list with a header. Last but not least you convert the strings into integer where it makes sense using the JsonConverter formatter capabilities.
000
Ignace Nyamagana Butera @nyamsprod.com · 25/09/2025
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
uri.thephpleague.com
Modern API to process URIs in PHP - URI
Modern API to process URIs in PHP
000
Ignace Nyamagana Butera @nyamsprod.com · 13/09/2025
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
nyamsprod.com
Dealing with Warnings in PHP, the Right Way | nyamsprod
001
Ignace Nyamagana Butera @nyamsprod.com · 05/09/2025
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
A fluent, unit-aware PHPUnit helper for asserting profiler metrics. Straightforward to use by adding a simple trait to your PHPUnit test class. And Since all the data are in bytes or nanoseconds you can assert using other units and they will be automatically converted into the proper unit.
010
Ignace Nyamagana Butera @nyamsprod.com · 19/08/2025
I hope theses examples explain the goal. To have total control over the functions behaviour.
The Warning class is a utility for controlling PHP warnings during the execution of callbacks. It provides two static methods:

trap() — converts any PHP warning (E_WARNING or E_USER_WARNING) emitted by the callback into an ErrorException, allowing them to be caught and handled like regular exceptions.

cloak() — suppresses warnings emitted by the callback, effectively hiding them during execution.

Both methods ensure that the original error handler is restored after the callback executes, and they propagate any exceptions thrown directly by the callback.
110
Ignace Nyamagana Butera @nyamsprod.com · 19/08/2025
That what does it wraps them
000
Ignace Nyamagana Butera @nyamsprod.com · 18/08/2025
`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
100
Ignace Nyamagana Butera @nyamsprod.com · 18/08/2025
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.
200
Ignace Nyamagana Butera @nyamsprod.com · 18/08/2025
A code smell ? Why ?
100
Ignace Nyamagana Butera @nyamsprod.com · 18/08/2025
I usually hate traits but I hate even more the PHP error control operator so I made this trait #PHP #trait
This PHP trait safely executes a callback while suppressing PHP warnings and notices during its execution.

Useful for calling functions or methods that may trigger non-critical errors without interrupting program flow like most PHP internal functions.
110
Ignace Nyamagana Butera @nyamsprod.com · 15/08/2025
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
github.com
bakame-php/stackwatch
A minimalist multi-metric PHP Profiler. Contribute to bakame-php/stackwatch development by creating an account on GitHub.
010
Ignace Nyamagana Butera @nyamsprod.com · 13/08/2025
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
010
Ignace Nyamagana Butera @nyamsprod.com · 03/07/2025
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
wiki.php.net
PHP: rfc:data_encoding_api
001
Ignace Nyamagana Butera @nyamsprod.com · 03/07/2025
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.com
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.
000
Ignace Nyamagana Butera @nyamsprod.com · 26/06/2025
An entry level package to profile your code it's not #xdebug but it does the job needed github.com/bakame-php/a... #php #profiling #memoryusage #microtime
github.com
GitHub - bakame-php/aide-profiler: A simple profiler in PHP
A simple profiler in PHP. Contribute to bakame-php/aide-profiler development by creating an account on GitHub.
010
Ignace Nyamagana Butera @nyamsprod.com · 22/05/2025
It's official #PHP8.5 will get not one but two URI/URL compliant parsers 🎉 externals.io/message/1273... #RFC3986 #WHATWG-URL
externals.io
[RFC] [Vote] Add WHATWG compliant URL parsing API - Externals
#externals - Opening PHP's #internals to the outside
000
Reposted by Ignace Nyamagana Butera
Alexandre Daubois @alexdaubois.bsky.social · 20/05/2025
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...
0123
Ignace Nyamagana Butera @nyamsprod.com · 06/05/2025
#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.
wiki.php.net
PHP: rfc:url_parsing_api
031