« first day (1618 days earlier)      last day (3340 days later) » 

11:00 PM
(But I'd definitely not be okay with (array) $string being disallowed (even with RFC))
 
The solution to that bizarre case above is to cast to the array first, then do a count and reuse the variable in the foreach loop.
 
yes
I'm not telling you it's impossible to fix it… but it might raise some depreciations in real code too…
 
Which is the point. Deprecate it now and remove it later.
 
Yeah, I have no problem with… just wanting to make you aware of it…
 
So @NikiC and @bwoebi, should I just open a PR that does that change..?
How do you think I should approach this non-RFC?
 
11:05 PM
Do you have ext/ karma? Then just push… a PR might raise too many questions ?
 
You don't think that's a bit under-handed?
 
@LeviMorrison I think maybe just leave it a little bit to allow people to relax a bit more, and then ask if it needs an RFC? tbh - it probably will though.
 
That's why the question mark at the end… Let's see what Nikita tells us.
It's just touching something in ext/standard so… not sure if it needs fullblown rfc
 
It's a two line diff; add something here and here.
 
@LeviMorrison I'd suggest doing a PR and then sending a mail to internals asking whether this is okay, with a provision that you'll merge it if there are no objections
 
11:14 PM
Also, its really weird that you can build without the SPL.
I wonder if you actually can.
 
@LeviMorrison you can't? It's hard coded to be enabled.
I thought.
 
@LeviMorrison nope, you can't
 
@Danack There is a fair bit of usage of HAVE_SPL.
How should I word the deprecation message?
 
Jul 23 '14 at 13:41, by Danack
@ircmaxell http://php.net/manual/en/spl.installation.php - "As of PHP 5.3.0 this extension can no longer be disabled and is therefore always available."
 
> Count may only be used on arrays and objects that implement Countable
^ That's technically a lie.
You can have a count handler without the interface.
(in practice I've never seen that)
 
@LeviMorrison same for ArrayAccess
(and in practice, it's used in quite a few places.)
but this is C extension stuff..
 
@Danack yeah, absolutely superfluous that check…
 
What do you guys think about that message?
4 mins ago, by Levi Morrison
> Count may only be used on arrays and objects that implement Countable
 
s/may/should
As technically it currently 'works', which is the derprecated behaviour.
 
@LeviMorrison I hope you're leaving null untouched?
 
11:32 PM
@Ocramius when I delete an entity with remove + flush - is it expected that all references to the object invalidated? I am deleting one entity then when I re-save another entity - it still has a reference to it and fails with "A new entity was found through the relationship "
@Ocramius it's kind of "expected" but how do I tell the latter to not try do that?
 
You have to break the associations yourself
or re-hydrate
 
oh, that's a problem... I don't handle that code
I expected to have something like "cascade: persist" but for another direction :-D
 
@bwoebi It has a deprecation message too, yes. Why?
 
@LeviMorrison hmm… not sure. well…
And… we still don't have stacktraces for our warnings etc. :-(
 
I probably need to say some kind of %s given in the message, right?
 
11:41 PM
@zerkms yeah, there's cascade:detach, but you are not detaching :P
 
@LeviMorrison yeah
 
I can't find the function for that.
Surely there is one?
 
zend_zval_type_name ?
or what are you searching? @LeviMorrison
 
FAILED TEST SUMMARY
---------------------------------------------------------------------
Test timezone_transitions_get() function : usage variation - Passing unexpected values to first argument $timestamp_begin. [ext/date/tests/timezone_transitions_get_variation2.phpt]
Test timezone_transitions_get() function : usage variation - Passing unexpected values to first argument $timestamp_env. [ext/date/tests/timezone_transitions_get_variation3.phpt]
SimpleXML: var_dump() [ext/simplexml/tests/000.phpt]
 
ext/simplexml/tests/bug35785.phpt … is probably the reason why NULL shouldn't be deprecated…
 
11:52 PM
@Ocramius yep, nullifying it explicitly helped. But it's painful - to handle everything manually :-S
 
@zerkms you could use a listener
and traverse all associations with that object
(in the UoW)
 
(by the way, I am not shocked at all that TZ tests would have issues)
@bwoebi I think that's a good reason to deprecate null.
:)
 
Not as long as internal APIs use null as substitute for empty array (simplexml)
 

« first day (1618 days earlier)      last day (3340 days later) »