Elektrine lite

โ† Feed

ignace nyamagana butera

nyamsprod@phpc.social

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

Posts

  • Post #4466573

    @timwolla @derickr 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.

  • Post #4466572

    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. ๐Ÿš€ #PHP #OOP

  • Post #4279868

    @ocramius@mastodon.social there&#39;s a hidden paragraph in the #UEFA statement, it mention that it won&#39;t participate until Italy qualify again ๐Ÿ˜‚ ๐Ÿ˜‚ ๐Ÿ˜‚ ๐Ÿ˜‚

  • Post #4164953

    For Tokei I found myself having to type this everywhere. function method(Duration|DateInterval|Interval|Task|TimeDuration $duration) Here&#39;s me again wishing for type alias in #PHP I do not really care about generics and yes I know that type alias is hard in #PHP . PS: For those with eagle eyes yes next Tokei release will support the upcoming PHP8.6 Time\Duration class out of the box

  • Post #4007459

    @timwolla@phpc.social used your proof of concept as a basis to add support for Time\Duration in my Tokei package. I will wait for the vote result to see if I need to use Duration::sub or Duration::subtract :) ... Currently using the later. https://github.com/bakame-php/tokei/blob/main/lib/Time/Duration.php

  • Post #3910121

    Tokei 0.2.0 introduces support for identified Temporal Value Objects: temporal values that can carry identifiers and preserve their meaning through operations. For instance the following example shows how task identifiers are retained during a union operation. #duration #localtime #php #identifier

  • Post #3907050

    Tokei 0.2.0 introduces support for dividing one duration by another. The operation returns a DTO exposing the quotient and remainder, giving developers the flexibility to access the result either through its properties or by using array destructuring with asTuple() #duration #localtime #php https://bakame-php.github.io/tokei/

  • Post #3883896

    #PHP I am happy to announce the immediate release of tokei 0.2.0 โ€” codename Botan ๐ŸŒธ This release brings new features, bug fixes, breaking changes, and an official documentation website: https://bakame-php.github.io/tokei/ Tokei is a small, low-level PHP package for working with local time, durations, and intervals. Try it out and share your feedback through an issue or PR: https://github.com/bakame-php/tokei If you find it useful, leave a โญ or consider sponsoring the project. Thanks for yo...

  • Post #3859817

    #PHP I&#39;ve been toying around with hooks lately, and I have mixed feelings about them. On the one hand, they can be quite handy in certain situations. On the other, the trade-off of losing the readonly modifier for the entire class is a real headache. For instance, you loose, in memory cache inside your class. Not sure if I like or dislike this consequence. And I am sure they are other things being lost with it

  • Post #3738697

    #PHP I&#39;ve notice that I barely use __toString nowadays. I came to realise that there is no one true single string representation for anything. So __toString is a bad micro/early optimisation that should be avoided. It is conceptually a bad idea. I prefer toWhateverRepresentationString. it might be a bit longer to type but it won&#39;t bite you in six months. PS: I have the share the same thoughts for toArray.

  • Post #1113787

    @timwolla 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

  • Post #1113786

    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

  • Post #961718

    How to correctly use the Deprecated attribute according to @nicolasgrekas it even give a &amp;quot;beautiful&amp;quot; error log message when E_USER_DEPRECATED is not silenced

  • Post #747210

    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 ๐Ÿค”

  • Post #723521

    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 !! #http-structured-field #headers #php

  • Post #723520

    #funfacts I updated the league/uri mono repo to use #PHPStan v2 instead of v1 currently for fun locally. The package is developed with level max. The result from a clean pass in v1 I got more than 200 errors in v2 ๐Ÿคฏ . The question is should I really clean them all ๐Ÿค”

  • Post #723519

    Interesting fact that no one cares about Laravel13 soon to be released will require PHP8.3 minimum whereas the latest Symfony8 requires PHP8.4 different framework, different strategy I presume. But still, I would have expected an alignment of L13 to PHP8.4 ๐Ÿคท #PHP guess I was wrong

  • Post #723517

    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