Hello Rob,
> To add to this, we apparently use json_encode at work to serialize custom
> exceptions, which appears to work. This RFC would break that, I think.
>
>
Exception is not marked as ZEND_ACC_NOT_SERIALIZABLE and would not be
affected.
Philip
Hello Rob,
I think it would be good to list these non-serializable objects in the RFC.
> It doesn't have to be exhaustive, but the list includes throwables,
> weak-maps, weak-references, closures, fibers, etc. Some people may be
> relying on this behavior (and I'd be curious to know that use cas
Hello,
As per my previous email to the list, I have now created the official RFC
to deprecate calling json_serialize() on instances of classes marked with
ZEND_ACC_NOT_SERIALIZABLE.
https://wiki.php.net/rfc/deprecate-json_encode-nonserializable
I have also created a PR with the implementation he
Hi,
On Aug 30, 2024 at 16:47:43, Claude Pache wrote:
>
> Note that the issue is not limited to Generators. For instance a Closure
> object is also json-encodable but not serialisable.
>
> IMO, every internal class (not just Generator) that is marked as
> non-serialisable, should also be non-js
Hi John,
On Aug 30, 2024 at 09:42:05, John Coggeshall
wrote:
> This seems entirely reasonable and I would welcome an RFC for it (unless
> someone has a better idea as to how to handle this case).
>
>
The other options I considered were to either materialize the Generator,
but given that they c
Hi Ilija,
On Aug 30, 2024 at 09:49:14, Ilija Tovilo wrote:
>
> To grant you RFC karma, I need to know your wiki.php.net username.
>
Username is pilif
Thank you
Philip Hofstetter
Hello,
In the aftermath of an internal refactoring of an internal code-base to
turn something eager into something more lazy using Generators, it occurred
to me that while PHP refuses to serialize() a Generator, accidentally
running json_encode() over a Generator produces the worst possible result
Hi,
Minor point: Why is the $initializer return type null, instead of void? I
>> don't see a purpose to allowing an explicit null return and nothing else.
>>
>
> Updated to use "void". Both would work :)
>
>
Super minor nitpick: You have updated the prototype, but not the
explanation text which
Hi,
On Thu, Nov 16, 2023 at 17:14 Jakub Zelenka wrote:
> I will personally vote against this if there is no is_resource
> change as I think it's just too big BC break even for 9.0 - it will likely
> require massive update of many code bases.
As someone maintaining a large code-base going back
Hi,
`DateTimeImmutable::modify()` is documented as returning
`DateTimeImmutable`, but it seems to actually be more specifically
returning `static`:
https://3v4l.org/j9ZSo
Now I'm wondering whether this is a documentation issue (where it
should return `static|false` and has not been updated to ac
Hi,
On 6 Jun 2022 at 21:15:12, Dan Ackroyd wrote:
>
> 2. Other than the SQLite blobOpen functionality, does anyone know of
> any other functionality that is exposed by SQLite or Postgres that
> isn't currently exposed through the magic PDO methods?
>
a wrapper around PQescapeIdentifier in lib
Hello
The following valid <= PHP 8.0 code that intends to make the $line property
public is a fatal error in 8.1
class FooException extends Exception {
public $line;
}
However, the fixed code for 8.1:
class FooException extends Exception {
public int $line;
}
Is a fatal error in <= 8.
Hi,
On Sun, Aug 9, 2020 at 8:34 PM Jordi Boggiano wrote:
> Can't say I'm big on interpolation but I'd definitely expect this to
> work because why not?
A reason why not is because it will break backwards compatibility with
existing (though admittedly unlikely) code which also can't be fixed
by
Hello,
I'm currently looking into porting some extensions (both internal and
public) to PHP 8 while still keeping support for PHP 7 (for the public
ones) and PHP 5.6 (don't ask :-().
In many cases, I've been using the ZEND_ENGINE_3 define to handle the
PHP 5/7 difference.
Now, the Zend Engine ve
Hi,
On Tue, Jan 21, 2020 at 6:17 PM Nikita Popov wrote:
>
> In the cases you encountered, do you know what type count() was used on?
> Was it null? false? Or something else?
>
> Nikita
we were in a similar boat as Björn to the point where we manually
patched PHP in production in order to not e
tests.
Philip
On Mon, Sep 9, 2019 at 8:03 AM Philip Hofstetter
wrote:
> Hello,
>
> (I'm writing to the internals list because I don't think that at this
> point, FFI usage is wide-spread enough to get an opinion on other venues)
>
> maybe I'm just stupid, bu
On Mon, Sep 9, 2019 at 10:13 AM Stanislav Malyshev
wrote:
> > isset($err)
> > $err[0] != null
> > -> is always true, regardless of whether func as assigned an error or not
> >
> > $err[0];
> > -> segfault
>
> This is a bit confusing - if $err[0] segfaults, how it can be != null?
> Does this beha
Hello,
(I'm writing to the internals list because I don't think that at this
point, FFI usage is wide-spread enough to get an opinion on other venues)
maybe I'm just stupid, but I think there has been a slight oversight in the
API design for the FFI interface.
My problem is with functions that r
Hi,
On Wed, Aug 28, 2019 at 11:33 AM Nikita Popov wrote:
>
> I think it's time to take a look at our existing warnings & notices in the
> engine, and think about whether their current classification is still
> appropriate. Error conditions like "undefined variable" only generating a
> notice is
Hi,
I few years ago, I did a throwaway implementation for this for reading:
https://github.com/pilif/php-src/tree/pdo_pgsql-improvements
This supports columns of type jsonb, json and text[] and I was
considering also adding support for the various timestamps, date and
so on.
Generally, interest
Hi,
I have just reported #72666 (touch() works differently on plain paths
and file:// paths with regards to cleaning the stat cache) and I would
gladly provide a PR with a fix and unit tests. However, before I start
working on this (well - it would be an easy fix), I would like to
question whether
Hi
On Tue, Apr 12, 2016 at 10:21 AM, Michael Wallner wrote:
> On 08/04/16 04:17, Yasuo Ohgaki wrote:
>
>> PRNG like /dev/urandom is supposed to be secure, but fair point. It
>> may be good idea keeping old hash based session ID just in case
>> someone find vulnerability. I suppose it's unlikely w
Hi,
I'm having a cause of slightly ugly code that runs differently from PHP 5.6
to PHP 7 and I don't think this difference is documented, nor expected. As
I'm not sure whether this is an intended change or not, I'm asking here
firstr before making a bug report.
The code in question is
$b =
Hi,
I have done a bit of investigation into bug 70279 and I'm at a point where
I need an opinion of somebody with fastcgi experience.
The bug was caused by f20118aa669f9992fee8a64024e623805669391b (
https://github.com/php/php-src/commit/f20118aa669f9992fee8a64024e623805669391b)
which IMHO has a m
Hi
On Wed, Jul 8, 2015 at 9:45 PM, Stanislav Malyshev wrote:
>> I would change the function to return NULL instead; what do you think?
>
> While the exact value of U_NO_NUMERIC_VALUE looks weird, nobody is going
> to use it directly, you'd be using U_NO_NUMERIC_VALUE. Comparing to it
> doesn't lo
Hi,
On Thu, Jul 2, 2015 at 4:52 PM Anatol Belski wrote:
> please read this thread for more info
> https://github.com/php/php-src/commit/8e19705a93d785cd1ff8ba3a69699b00169fea47
> .
>
yeah. I also understood Nikita's response. I guess you can close the two
bugs for now as this really isn't fix
Hi,
as this probably requires some discussion, I'm coming here to ask.
I'm talking about bug 69977 and 61483: Both are about the fact that it's
currently not possible to properly type-hint descendant classes of DateTime
and friends.
The reason is the missing use ZEND_ARG_OBJ_INFO, so right now,
Hi,
On Mon, Dec 29, 2014 at 2:42 PM, Levi Morrison wrote:
> 1) providing a non-callable type is a logical error even if you
> suppress it with $throw = false
yes.
> 2) and parameter types are the standard way of checking this, not some
> odd boolean as another parameter
yes
> 3) this would
Hello
Tangentially related:
On Tuesday, October 21, 2014, Dmitry Stogov wrote:
>
>
> It won't allow Unicode strings as array keys;
I wish there was a way for specific objects to opt into this.
Using __toString() we have something that mostly behaves just like a
string and can be used whereve
On Fri, Sep 5, 2014 at 1:18 PM, Remi Collet wrote:
> 2. ProxyPass Configuration
>
> ProxyPass /proxy/ fcgi://127.0.0.1:9003//var/www/html/
>
> URL = /proxy/info.php/a/b?q=a
> SCRIPT_NAME = /proxy/info.php/a/b
> => Broken
This is bugging me too on my development machine where I'm stuck at
Ap
Hi,
On Tue, Jul 22, 2014 at 3:18 PM, Etienne Kneuss wrote:
> This means https://wiki.php.net/phpng-upgrading should be completed to
> reflect all changes.
as a pure consumer maintaining some internal extensions, I would very
much like to see this too, at least when you decide to go ahead with
t
31 matches
Mail list logo