ignace nyamagana butera
Software developer. Creator of PHP centric package like league/csv, league/uri and bakame/http-structured-fields. Sponsor me at github.com/sponsors/nyamsprod
The next #tokei release brings a complete rewrite of its `Duration` and `Time` classes.
The new `Duration` implementation aligns with the upcoming `Time\Duration` class introduced in PHP 8.6, while `Time` is now represented internally as the elapsed duration since midnight.
These changes significantly simplify the internal implementation and provide a stronger foundation for the library.
This might be the last release before the first stable version. 🚀
@heiglandreas@phpc.social I currently favour using format() and fromFormat() methods on my objects. with a Format Enum which list the most common use case in my domain and expose all the properties so that you can in your own domain define other string representations if needed via a Formatter or a Builder. I would argue that the best trade off I have for now 🤷♂️ . But the main take-away is it has to be explicit and __toString is everything but that.
I feel that at some point in time I will have to do either write a long post or create a talk around handling #deprecations in #PHP https://github.com/thephpleague/csv/issues/574#issuecomment-4115906017 I regularly get those tickets and conversation and I feel the community does not know what a deprecation is... am I wrong or am I wrong 🤔
For the next League URI major version I will merge the uri and the uri-components packages but how should the merge occurs:
Should I keep the Components subnamespace or get rid of it completely 🤔 .
Keeping it reduces BC break but then postpone to the next major version some changes.
Removing the Component namespace adds a bigger BC break BUT simplify greatly the package usage for newcomers 🤷 So should I
I just discovered I never published my http-cache-status package for PHP 😆 ... now it is done
https://packagist.org/packages/bakame/http-cache-status enjoy and happy coding !!
How to correctly use the Deprecated attribute according to @nicolasgrekas@phpc.social it even give a "beautiful" error log message when E_USER_DEPRECATED is not silenced
@timwolla@phpc.social @derickr@phpc.social https://github.com/symfony/polyfill/pull/642/changes added tim as co-author since I built the polyfill based on his work. I will update the implementation once the php implementation tests land on php source code.
@velkuns@phpc.social this is a recurring question that I get when people look at my packages I will TL;DR ir with:
- ease of tests discovery
- ease of maintenance
- uniformity in package configuration
But that's just my opinion. And it depends on the package and on how many people work on it I guess (even though I do not really buy that last argument)
PS: Last time I've checked TypeScript does the same but maybe they changed in the meantime (I do not use TypeScript).
@timwolla@phpc.social I still find it fascinating that base64_encode and base64_decode are defined under the URLs extension 🤷
https://www.php.net/manual/en/book.url.php
