Re: [PHP-DEV] How to detect classes with a count_elements handler in userland?

2016-11-17 Thread Craig Duncan
> > Just to chime in ... can you split the PR into the RFC, and the new thing > please. > Of course, that's done now: https://github.com/php/php-src/pull/2206

[PHP-DEV] [RFC DISCUSSION] User defined session serializer

2016-11-17 Thread Yasuo Ohgaki
Hi all, Session module implements serialize handler as module. This RFC is to expose it to user space. RFC https://wiki.php.net/rfc/user_defined_session_serializer PR https://github.com/php/php-src/pull/2205 Comments are appreciated! Regards, -- Yasuo Ohgaki yohg...@ohgaki.net -- PHP Intern

Re: [PHP-DEV] function overloading

2016-11-17 Thread Rowan Collins
On 16/11/2016 09:32, Quim Calpe wrote: class EventHandler { public function handle(Event $event) { if ($event instanceof ProductCreated) { ... } elseif ($event instanceof ProductNameChanged) { ... } } } I don't see much wrong with this; th

Re: [PHP-DEV] How to detect classes with a count_elements handler in userland?

2016-11-17 Thread Nikita Popov
On Thu, Nov 17, 2016 at 8:30 AM, Joe Watkins wrote: > Morning, > > Just to chime in ... can you split the PR into the RFC, and the new thing > please. > > Just another question on how we could make objects that have > count_elements (which is in object handlers) implement an interface on the > cl

Re: [PHP-DEV] How to detect classes with a count_elements handler in userland?

2016-11-17 Thread Christoph M. Becker
On 16.11.2016 at 22:02, Nikita Popov wrote: > On Mon, Nov 14, 2016 at 2:22 PM, Christoph M. Becker > wrote: > >> On 13.11.2016 at 22:10, Craig Duncan wrote: >> How about just making those classes implement the interface instead? >>> >>> Christoph pointed out that there may be classes in ext

[PHP-DEV] Countable Type Hint

2016-11-17 Thread Craig Duncan
Hi everybody Following on from the recent rfc for *count()* ( https://wiki.php.net/rfc/counting_non_countables) and the one for *iterable* (https://wiki.php.net/rfc/iterable) it would be useful if there was a `countable` type hint: function foo(countable $thing) { if (count($thing) > 0) {

Re: [PHP-DEV] Countable Type Hint

2016-11-17 Thread Levi Morrison
On Thu, Nov 17, 2016 at 5:52 AM, Craig Duncan wrote: > Hi everybody > > Following on from the recent rfc for *count()* ( > https://wiki.php.net/rfc/counting_non_countables) and the one for *iterable* > (https://wiki.php.net/rfc/iterable) it would be useful if there was a > `countable` type hint: >

Re: [PHP-DEV] Countable Type Hint

2016-11-17 Thread Josh Di Fabio
On Thu, Nov 17, 2016 at 1:00 PM Levi Morrison wrote: > On Thu, Nov 17, 2016 at 5:52 AM, Craig Duncan wrote: > > Hi everybody > > > > Following on from the recent rfc for *count()* ( > > https://wiki.php.net/rfc/counting_non_countables) and the one for > *iterable* > > (https://wiki.php.net/rfc/i

Re: [PHP-DEV] Countable Type Hint

2016-11-17 Thread Craig Duncan
On 17 November 2016 at 13:50, Josh Di Fabio wrote: > What's the benefit of such an interface? Why not simply ask for `int > $count` in your param list instead? > Using the example from my original email, it's a bit awkward to always have to pass the count of a countable: handle_records($result,

Re: [PHP-DEV] Countable Type Hint

2016-11-17 Thread Josh Di Fabio
On Thu, Nov 17, 2016 at 2:01 PM Craig Duncan wrote: > On 17 November 2016 at 13:50, Josh Di Fabio wrote: > > What's the benefit of such an interface? Why not simply ask for `int > $count` in your param list instead? > > > Using the example from my original email, it's a bit awkward to always > h

Re: [PHP-DEV] Countable Type Hint

2016-11-17 Thread Jordi Boggiano
On 17/11/2016 13:52, Craig Duncan wrote: Hi everybody Following on from the recent rfc for *count()* ( https://wiki.php.net/rfc/counting_non_countables) and the one for *iterable* (https://wiki.php.net/rfc/iterable) it would be useful if there was a `countable` type hint: function foo(countable

Re: [PHP-DEV] Countable Type Hint

2016-11-17 Thread Christoph M. Becker
On 17.11.2016 at 15:06, Josh Di Fabio wrote: > Apologies, I thought you were simply proposing the following: > > interface Countable > { > function count(): int; > } We already have this as of PHP 5.1.0, see . :-) -- Christoph M. Becker -- P

Re: [PHP-DEV] Countable Type Hint

2016-11-17 Thread Rowan Collins
On 17/11/2016 14:06, Josh Di Fabio wrote: Apologies, I thought you were simply proposing the following: interface Countable { function count(): int; } No, what Craig is proposing is a type hint that covers both the existing Countable interface and primitives which are naturally countable.

Re: [PHP-DEV] Countable Type Hint

2016-11-17 Thread Niklas Keller
> > No, what Craig is proposing is a type hint that covers both the existing > Countable interface and primitives which are naturally countable. > > If the union types RFC had passed, you'd be able to say "array|Traversable > $foo"; a recent RFC lets you instead say "iterable $foo". The suggestion

Re: [PHP-DEV] How to detect classes with a count_elements handler in userland?

2016-11-17 Thread Joe Watkins
Afternoon, A change in convention makes sense, and sounds much nicer than hacking anything to make it work. I do prefer this approach to yet-another-function. Is changing convention all we would do though, or would we raise a warning when handler is present and interface is not ? Cheers Joe On

Re: [PHP-DEV] [VOTE] Debugging PDO Prepared Statement Emulation

2016-11-17 Thread Adam Baratz
> > Once the proposal had been accepted, and merged, it's not really > legitimate to unilaterally decide that it's a bad implementation and revert > it yourself. > That's fair. I will revert the revert and open a new RFC to supersede the previous one. Thanks again for your patience. Adam

[PHP-DEV] UGLY Benchmark Results for PHP Master 2016-11-17

2016-11-17 Thread lp_benchmark_robot
Results for project PHP master, build date 2016-11-17 06:26:51+02:00 commit: 7f196e3 previous commit:41983a1 revision date: 2016-11-17 11:09:07+09:00 environment:Haswell-EP cpu:Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz 2x18 cores, stepping 2, LLC 45 MB

[PHP-DEV] [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Joe Watkins
Afternoon internals, This has been discussed before in various RFC threads, there does seem to be some consensus that 50%+1 votes could be harmful. To what degree, I am not sure. I raise for discussion the topic of abolishing 50%+1 votes, and requiring all changes regardless of their nature to p

Re: [PHP-DEV] [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Dennis Clarke
On 11/17/2016 12:18 PM, Joe Watkins wrote: Afternoon internals, This has been discussed before in various RFC threads, there does seem to be some consensus that 50%+1 votes could be harmful. To what degree, I am not sure. I raise for discussion the topic of abolishing 50%+1 votes, and requirin

[PHP-DEV] Re: [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Joe Watkins
Afternoon internals, https://wiki.php.net/rfc/abolish-narrow-margins Cheers Joe On Thu, Nov 17, 2016 at 5:18 PM, Joe Watkins wrote: > Afternoon internals, > > This has been discussed before in various RFC threads, there does seem to > be some consensus that 50%+1 votes could be harmful. > > To

[PHP-DEV] Re: [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Christoph M. Becker
On 17.11.2016 at 18:18, Joe Watkins wrote: > Afternoon internals, > > This has been discussed before in various RFC threads, there does seem to > be some consensus that 50%+1 votes could be harmful. > > To what degree, I am not sure. > > I raise for discussion the topic of abolishing 50%+1 vote

Re: [PHP-DEV] [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Kalle Sommer Nielsen
Hi Joe 2016-11-17 18:18 GMT+01:00 Joe Watkins : > Afternoon internals, > > This has been discussed before in various RFC threads, there does seem to > be some consensus that 50%+1 votes could be harmful. I still stand by that we should only let active contributors to PHP vote, while I understand

Re: [PHP-DEV] [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Joe Watkins
Afternoon internals, https://wiki.php.net/rfc/abolish-narrow-margins Cheers Joe On Thu, Nov 17, 2016 at 5:33 PM, Dennis Clarke wrote: > On 11/17/2016 12:18 PM, Joe Watkins wrote: > >> Afternoon internals, >> >> This has been discussed before in various RFC threads, there does seem to >> be

[PHP-DEV] Re: [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Joe Watkins
Afternoon Chrisoph, The minimum number of votes is going to be the subject of another RFC, let's leave that aside for now. I've written many RFC's that change the language, the majority have failed. Setting the bar high is the aim, and the bar feels high at 2/3+1, but crucially, not higher than

Re: [PHP-DEV] [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Nikita Popov
On Thu, Nov 17, 2016 at 6:18 PM, Joe Watkins wrote: > Afternoon internals, > > This has been discussed before in various RFC threads, there does seem to > be some consensus that 50%+1 votes could be harmful. > > To what degree, I am not sure. > > I raise for discussion the topic of abolishing 50%

Re: [PHP-DEV] [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Joe Watkins
Afternoon Nikita, My mistake, changing that ... Cheers Joe On Thu, Nov 17, 2016 at 6:12 PM, Nikita Popov wrote: > On Thu, Nov 17, 2016 at 6:18 PM, Joe Watkins > wrote: > >> Afternoon internals, >> >> This has been discussed before in various RFC threads, there does seem to >> be some consensu

Re: [PHP-DEV] Re: [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Rowan Collins
On 17/11/2016 18:03, Joe Watkins wrote: Afternoon Chrisoph, The minimum number of votes is going to be the subject of another RFC, let's leave that aside for now. I'm not sure splitting this into lots of micro-decisions is wise: why not discuss a general reform of the voting system, and have

Re: [PHP-DEV] [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Joe Watkins
Afternoon Kalle, We have to start with the assumption that everyone that votes, does so with good intentions. I'm sympathetic to the view that active contributors should somehow carry more weight with their words, or vote. But, I shy away from actually saying that we should only listen to those p

Re: [PHP-DEV] Re: [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Joe Watkins
Afternoon Rowan, The sum of their parts amounts to a substantial change in the way we conduct development here. If we are going to make changes, we should not draw out the process, but nor should we have too much haste in making these decisions. Having a one week discussion period is some kind o

Re: [PHP-DEV] [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Niklas Keller
2016-11-17 18:18 GMT+01:00 Joe Watkins : > Afternoon internals, > > This has been discussed before in various RFC threads, there does seem to > be some consensus that 50%+1 votes could be harmful. > > To what degree, I am not sure. > > I raise for discussion the topic of abolishing 50%+1 votes, an

Re: [PHP-DEV] [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Kalle Sommer Nielsen
2016-11-17 19:22 GMT+01:00 Joe Watkins : > Afternoon Kalle, > > We have to start with the assumption that everyone that votes, does so with > good intentions. Ofcourse, but I just don't think it is fair that someone who made an RFC and never contributed anything else to the project, can have an im

Re: [PHP-DEV] [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Joe Watkins
Afternoon Niklas, I made an off-by-one error in an RFC. Thanks for captioning my pain. Cheers Joe On Thu, Nov 17, 2016 at 6:43 PM, Niklas Keller wrote: > 2016-11-17 18:18 GMT+01:00 Joe Watkins : > >> Afternoon internals, >> >> This has been discussed before in various RFC threads, there does

Re: [PHP-DEV] Re: [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Andrea Faulds
Hi Rowan, Rowan Collins wrote: On 17/11/2016 18:03, Joe Watkins wrote: Afternoon Chrisoph, The minimum number of votes is going to be the subject of another RFC, let's leave that aside for now. I'm not sure splitting this into lots of micro-decisions is wise: why not discuss a general reform

Re: [PHP-DEV] Re: [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Joe Watkins
Afternoon Andrea, Intention was to just update the voting page, and any other related docs that might exist (maybe rfc template). Cheers Joe On Thu, Nov 17, 2016 at 6:55 PM, Andrea Faulds wrote: > Hi Rowan, > > Rowan Collins wrote: > >> On 17/11/2016 18:03, Joe Watkins wrote: >> >>> Afternoon

Re: [PHP-DEV] [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Marcio Almada
2016-11-17 13:18 GMT-04:00 Joe Watkins : > Afternoon internals, > > This has been discussed before in various RFC threads, there does seem to > be some consensus that 50%+1 votes could be harmful. > > To what degree, I am not sure. > > I raise for discussion the topic of abolishing 50%+1 votes, an

Re: [PHP-DEV] Re: [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Andrea Faulds
Hi Joe, Joe Watkins wrote: Afternoon Andrea, Intention was to just update the voting page, and any other related docs that might exist (maybe rfc template). Okay, that's fine. Make sure to mention on the voting RFC that it was amended, then. :) -- Andrea Faulds https://ajf.me/ -- PHP Int

Re: [PHP-DEV] Re: [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Michael Morris
The study of voting systems is a hobby of mine and I've encoding vote gathering algorithms implementing them before, so this gives me a bit of insight into the discussion at hand that I would like to share. The goal of any voting system is to reach a consensus, and while majority rule (regardless

Re: [PHP-DEV] Re: [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Andrea Faulds
Hi, Michael Morris wrote: I'm putting this forward because I worry the group might paint themselves into a corner by requiring all issues require a super majority, because that's going to fall apart when there are three or more possibilities. The methods can be combined, using ranked choice to

[PHP-DEV] [RFC] Debugging PDO Prepared Statement Emulation v2

2016-11-17 Thread Adam Baratz
Hi, Based on my second thoughts on my initial approach, I created an RFC to supplant it: https://wiki.php.net/rfc/debugging_pdo_prepared_statement_emulation_v2 I believe this better addresses the negative feedback from the original RFC[1] and is a better solution to the problem. Thanks, Adam --

Re: [PHP-DEV] Re: [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Adam Baratz
> > The minimum number of votes is going to be the subject of another RFC, >> let's leave that aside for now. >> > > I'm not sure splitting this into lots of micro-decisions is wise: why not > discuss a general reform of the voting system, and have a single RFC which > can then document the agreed

Re: [PHP-DEV] Re: [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Michael Morris
On Thu, Nov 17, 2016 at 5:33 PM, Adam Baratz wrote: > > > I agree with this. We could end up with a different system if we look at > this holistically. Also, I'm not sure what the urgency in making this > change is. I'd rather be thoughtful about a substantive change like this. > > It might help

Re: [PHP-DEV] [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Levi Morrison
On Thu, Nov 17, 2016 at 10:18 AM, Joe Watkins wrote: > Afternoon internals, > > This has been discussed before in various RFC threads, there does seem to > be some consensus that 50%+1 votes could be harmful. > > To what degree, I am not sure. > > I raise for discussion the topic of abolishing 50%

Re: [PHP-DEV] Re: [RFC] Abolish 50%+1 Votes

2016-11-17 Thread Joe Watkins
Morning Micheal, In general, we don't have RFC's that have many choices, nor do we for this RFC. We are only choosing between requiring 2/3's all the time, and not requiring 2/3 all the time. While it has been suggested that we raise the bar higher than our current standards raise it, we won't b

[PHP-DEV] [RFC][Accepted] Security Issue Classification

2016-11-17 Thread Joe Watkins
Morning internals, Pleased to announce that the vote for security issue classification is closed, and passed unanimously. For your bookmarks: RFC: https://wiki.php.net/rfc/security-classification Security Issue Classification Scheme: https://wiki.php.net/security Thanks to everyone who took par