Mathias Arlaud

Results 69 comments of Mathias Arlaud

I'm afraid that the current `array_last` implementation doesn't work with associative arrays. Indeed: ```php var_dump(array_slice(['a' => 2, 'b' => 1], -1, 1)[0]); ``` outputs a warning telling `Undefined array key...

Hey @vuryss, thanks for the report! > I have no idea why this was implemented From the PHP point of view, `int|string` is the very same as `string|int`. Sorting types...

One way to achieve that could be to only sort types when calling `__toString`. (same for `IntersectionType` actually)

Thinking about is once again, this is kind of broken by design. Even if it's possible using PHPStan (or an explicit declaration), retrieving types in a given order using native...

Indeed, I think that's a too subtle edge case. Moreover, it would lead to inconsistencies: > Even if it's possible using PHPStan (or an explicit declaration), retrieving types in a...

Hey @vonalbert! Actually, I followed an excellent blog post by @mnavarrocarter, but it seems like it has been removed (maybe Matias could give us the reason why?). In the meantime,...

I really think there gonna be use cases where we need to check access stuff than the class name on the target. Think about IRI creation, or discrimination based on...

> That are some good points. Im not in love with Nette because of its ugly generated PHP code, awkward API, it is opinionated and lack of extensibility. This is...

Maybe we can wait for https://github.com/symfony/symfony/pull/52510 and https://github.com/symfony/symfony/pull/53160 to be merged, to parse `list`? But I think that such a feature could be great indeed :+1: