Re: [PHP-DEV] Re: release frequency?

2013-01-06 Thread Peter Lind
As an "outsider" I would say consistency is king. Knowing that I can rely on when new versions come out is much more important than whether they contain 9 or 11 bug fixes. So, pick a schedule that works and stick to it. Just my thoughts. -- WWW: plphp.dk / plind.dk CV: careers.stackoverflow.com

[PHP-DEV] Re: release frequency?

2013-01-06 Thread Pierre Joye
hi Stas, On Wed, Jan 2, 2013 at 7:26 AM, Stas Malyshev wrote: > Hi! > > I see that we do not have a lot of changes in 5.4 since last release. So > I wonder if it may make sense to reduce release frequency now that we > got less bugfixes coming in, say from monthly to 1.5 or 2 months between > rel

Re: [PHP-DEV] [RFC] Reflection annotations reader

2013-01-06 Thread Marco Pivetta
> So > @var String > @param2/param2("bar") > Will be array('var' => 'String', 'param2/param2' => '("bar")' ); > > Let's make this clear immediately: an associative array as output is not useful. That would make it impossible to nest annotations. For example, something like following wouldn't work i

Re: [PHP-DEV] [RFC] Fixing insecure cURL file uploading

2013-01-06 Thread Stas Malyshev
Hi! > Couldn’t CurlFile extend SplFileInfo? Otherwise it looks good. I don't see much reason for that. They are very different classes - CurlFile is not meant to provide information about the file, just keep the name, MIME type, etc. So most of the SplFileInfo API will be useless there. -- Stani

Re: [PHP-DEV] [RFC] Fixing insecure cURL file uploading

2013-01-06 Thread Stas Malyshev
Hi! I've added the pull request for the CURLFile here: https://github.com/php/php-src/pull/255 No procedural API yet, I'm not really sure if we need it, it's not that hard writing "new CurlFile()". But if needed I can add it there. Everybody please take a look and see if you notice any problems o

Re: [PHP-DEV] [RFC] Reflection annotations reader

2013-01-06 Thread Mike van Riel
Dear Yahav, At phpDocumentor we have been working on formalizing the PHPDoc Standard for quite some time now and I would ask you to take a look at that and use it as basis for the parsing of DocBlocks. You can find the document here: https://github.com/phpDocumentor/phpDocumentor2/blob/devel

Re: [PHP-DEV] [RFC] Reflection annotations reader

2013-01-06 Thread Ryan McCue
Yahav Gindi Bar wrote: > Though I agree with you that the main problem is the syntax. > We can extract the entire doc-comment and only isolate between annotations, > so doc-comment like: > /** > * @Route("/") > * @ORM(Key="foo") > * @var string > */ > > Will be : array( 'Route("/")' => "",

Re: [PHP-DEV] [RFC] Fixing insecure cURL file uploading

2013-01-06 Thread Stas Malyshev
Hi! > cURL allow you to upload file from string buffer with CURLFORM_BUFFER > and we should be able to do all the streams stuff with CURLFORM_STREAM > and by modifying our CURLOPT_READFUNCTION. CURLFORM_STREAM has one issue - you can only have one read function, but you could have many uploaded f

Re: [PHP-DEV] [RFC] Reflection annotations reader

2013-01-06 Thread Pierrick Charron
There is already a similar RFC here :) Maybe it could be good to start from this one so that we don't have any duplicated RFC ? https://wiki.php.net/rfc/annotations-in-docblock Pierrick On 6 January 2013 16:58, Yahav Gindi Bar wrote: > Hi internals! > > In one of the discussions (about the "dep

Re: [PHP-DEV] [RFC] Fixing insecure cURL file uploading

2013-01-06 Thread Pierrick Charron
Hi Stas, Everything looks good to me :) Great job. About your optional section : I like the procedural function that you proposed so that you don't have to use an object if you don't want to. cURL allow you to upload file from string buffer with CURLFORM_BUFFER and we should be able to do all t

Re: [PHP-DEV] [RFC] Fixing insecure cURL file uploading

2013-01-06 Thread Levi Morrison
My objection is that we are introducing a class into an otherwise completely procedural API. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Reflection annotations reader

2013-01-06 Thread Yahav Gindi Bar
This is attributes. I saw proposal for attributes that was declined. I think that the language should contain attributes, but because the lack of them the Annotations, which's currently used by some FW can be a great addition. To tell the troth, even if attributes was implemented in PHP, since the

Re: [PHP-DEV] [RFC] Reflection annotations reader

2013-01-06 Thread Yahav Gindi Bar
On Mon, Jan 7, 2013 at 1:11 AM, Sebastian Krebs wrote: > 2013/1/6 Yahav Gindi Bar > > > On Mon, Jan 7, 2013 at 12:41 AM, Marco Pivetta > wrote: > > > > > > > > I think that our work is to isolate each annotation so it'll be easy to > > >> access, then, it'll be easy enough to write the code tha

Re: [PHP-DEV] [RFC] Reflection annotations reader

2013-01-06 Thread Clint Priest
Just a thought on this, some other languages support attributes which is similar but could also allow the engine to use them for things. As a quick example (roughly based on what I've seen in c#) but applied to PHP use case: class a { [$date(Nullable)] public function foo(DateTime $date)

Re: [PHP-DEV] [RFC] Reflection annotations reader

2013-01-06 Thread Clint Priest
-Clint On Jan 6, 2013, at 5:11 PM, Sebastian Krebs wrote: > 2013/1/6 Yahav Gindi Bar > >> On Mon, Jan 7, 2013 at 12:41 AM, Marco Pivetta wrote: >> >>> >>> I think that our work is to isolate each annotation so it'll be easy to access, then, it'll be easy enough to write the code that

Re: [PHP-DEV] [RFC] Reflection annotations reader

2013-01-06 Thread Sebastian Krebs
2013/1/6 Yahav Gindi Bar > On Mon, Jan 7, 2013 at 12:41 AM, Marco Pivetta wrote: > > > > > I think that our work is to isolate each annotation so it'll be easy to > >> access, then, it'll be easy enough to write the code that creates > "complex > >> annotations", such as constructors and so on,

Re: [PHP-DEV] [RFC] Reflection annotations reader

2013-01-06 Thread Yahav Gindi Bar
On Mon, Jan 7, 2013 at 12:41 AM, Marco Pivetta wrote: > > I think that our work is to isolate each annotation so it'll be easy to >> access, then, it'll be easy enough to write the code that creates "complex >> annotations", such as constructors and so on, in userland. >> > > In fact, there's pro

Re: [PHP-DEV] [RFC] Reflection annotations reader

2013-01-06 Thread Marco Pivetta
> I think that our work is to isolate each annotation so it'll be easy to > access, then, it'll be easy enough to write the code that creates "complex > annotations", such as constructors and so on, in userland. > In fact, there's probably no need (now) to go on and build a full annotation reader

Re: [PHP-DEV] [RFC] Reflection annotations reader

2013-01-06 Thread Yahav Gindi Bar
On Mon, Jan 7, 2013 at 12:24 AM, Lars Strojny wrote: > Hi Yahav, > > Am 06.01.2013 um 22:58 schrieb Yahav Gindi Bar : > [...] > > In one of the discussions (about the "deprecated" keyword, to be > specific), > > it was been said that adding ability to read doc-comment annotation could > > be hand

Re: [PHP-DEV] [RFC] Reflection annotations reader

2013-01-06 Thread Lars Strojny
Hi Yahav, Am 06.01.2013 um 22:58 schrieb Yahav Gindi Bar : [...] > In one of the discussions (about the "deprecated" keyword, to be specific), > it was been said that adding ability to read doc-comment annotation could > be handy. Personally, I really think it can be great. > > So, I've created a

Re: [PHP-DEV] [RFC] Reflection annotations reader

2013-01-06 Thread Marco Pivetta
Hi there, It would be great to have such a feature in reflection itself, since it would speed up parsing by a huge lot. Anyway, I noticed that the proposed syntax is quite different from the one adopted by Doctrine\Common (therefore by Drupal, Symfony, Typo3, ZF, etc.), which would probably make i

[PHP-DEV] [RFC] Reflection annotations reader

2013-01-06 Thread Yahav Gindi Bar
Hi internals! In one of the discussions (about the "deprecated" keyword, to be specific), it was been said that adding ability to read doc-comment annotation could be handy. Personally, I really think it can be great. So, I've created an RFC that propose to improve the Reflection extension by add

Re: [PHP-DEV] Providing improved functionality for escaping html (and other) output.

2013-01-06 Thread Adam Jon Richardson
On Sun, Jan 6, 2013 at 6:13 AM, Stas Malyshev wrote: > What is supposed to be in $allowed_html? If those are simple fixed > strings and such, why can't you just do preg_split with > PREG_SPLIT_DELIM_CAPTURE and encode each other element of the result, or > PREG_SPLIT_OFFSET_CAPTURE if you need som

Re: [PHP-DEV] [RFC] Property Accessors v1.2 : isset / unset "failable"

2013-01-06 Thread Clint Priest
Bringing up this old issue a bit. Nothing was ever said of unset? Should unset be benign? Since unset() is intended to take an action (rather than check on state) shouldn't an invalid unset (one with a guarded property that doesn't have a setter) emit a warning? On 10/30/2012 10:37 PM, Clin

Re: [PHP-DEV] [RFC] Fixing insecure cURL file uploading

2013-01-06 Thread Lars Strojny
Hi Stas, Am 06.01.2013 um 06:38 schrieb Stas Malyshev : [...] > Following the recent discussion on the list, I've drafted an RFC > describing the CurlFile solution for it here: > > https://wiki.php.net/rfc/curl-file-upload > > Please review and comment. If there's a general positive feedback, I'

Re: [PHP-DEV] [RFC] Alternative typehinting syntax for accessors

2013-01-06 Thread Nikita Popov
On Sun, Jan 6, 2013 at 2:59 AM, Stas Malyshev wrote: > This is pretty bad by itself. But the fact that everybody would be using > this feature in this way - since they would think "I don't need null > default, null is always the default and I'd initialize it in the ctor > anyway", not realizing th

Re: [PHP-DEV] [RFC] Alternative typehinting syntax for accessors

2013-01-06 Thread Nikita Popov
On Sun, Jan 6, 2013 at 10:05 AM, Patrick Schaaf wrote: > Was it considered to augment type hinting syntax - both in parameter lists > and for the hinted property RFC - to permit giving multiple types at once? > > public DateTime|DateTimeImmutable $refdate; > public Foo|NULL $object; // the issue

Re: [PHP-DEV] Providing improved functionality for escaping html (and other) output.

2013-01-06 Thread Stas Malyshev
Hi! >if ($allowed_html) { > // cycle through the whitelisted sequences > foreach($allowed_html as $sequence) { What is supposed to be in $allowed_html? If those are simple fixed strings and such, why can't you just do preg_split with PREG_SPLIT_DELIM_CAPTURE and encode each other

Re: [PHP-DEV] Providing improved functionality for escaping html (and other) output.

2013-01-06 Thread Adam Jon Richardson
On Sat, Jan 5, 2013 at 6:26 PM, Stas Malyshev wrote: > Hi! > >> It's important to escape output according to context. PHP provides >> functions such as htmlspecialchars() to escape output when the context >> is HTML. However, one often desires to allow some subset of HTML >> through without escapi

Re: [PHP-DEV] [RFC] Fixing insecure cURL file uploading

2013-01-06 Thread Martin Jansen
On 06.01.13 06:38, Stas Malyshev wrote: > https://wiki.php.net/rfc/curl-file-upload > > Please review and comment. If there's a general positive feedback, I'll > try to implement a patch for it pretty soon. Looks solid to me. One thing though: The manual spells the extension "cURL" and so does h

Re: [PHP-DEV] [RFC] Fixing insecure cURL file uploading

2013-01-06 Thread Alexey Zakhlestin
On 06.01.2013, at 6:38, Stas Malyshev wrote: > Following the recent discussion on the list, I've drafted an RFC > describing the CurlFile solution for it here: > > https://wiki.php.net/rfc/curl-file-upload > > Please review and comment. If there's a general positive feedback, I'll > try to imp

Re: [PHP-DEV] [RFC] Alternative typehinting syntax for accessors

2013-01-06 Thread Patrick Schaaf
Was it considered to augment type hinting syntax - both in parameter lists and for the hinted property RFC - to permit giving multiple types at once? public DateTime|DateTimeImmutable $refdate; public Foo|NULL $object; // the issue discussed in the previous msgs function bar(array|string $arg) ...