Re: [PHP-DEV] [RFC] [Vote] Resource to object conversion

2024-01-09 Thread Máté Kocsis
Hi Kamil,

Good question... After the workaround, I think there's less reason to
do the conversion in the next major version indeed. To be honest,
I am not able to recall any use-case where a real BC break could happen.
I mean, there is a very tiny one where resources can be casted to
integers, while objects by default cannot be, but this problem is also
easily solvable (and Nikita had to do it for CurlHandle in the past),
so I don't have any other idea.

In my opinion, the main argument for converting stream resources to objects
in a major version is the "marketing value" of this achievement and possibly
the unintended side-effects/edge cases which we don't yet foresee.

Regards,
Máté


Re: [PHP-DEV] [RFC] [Vote] Resource to object conversion

2024-01-05 Thread Kamil Tekiela
Hi Máté,

I have one question. If the primary stream resources get the
is_resource hack, what hampers the changes from landing in a minor
version? I'd assume that the migration would be mostly seamless. Is it
the get_resource_type checks? Is it because is_resource also checks
whether the resource is closed?

Regards,
Kamil

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php