Re: [PHP-DEV] Suggestion Method Constant

2017-10-12 Thread Sara Golemon
On Thu, Oct 12, 2017 at 2:33 PM, Michael Döhler wrote: > I am open for any approach, but maybe we have to differentiate between class > constants and method references? > Given the discussion we had around the namespace separator (and why we DIDN'T go with ::), there may

Re: [PHP-DEV] Suggestion Method Constant

2017-10-12 Thread Michael Döhler
Hi, I am open for any approach, but maybe we have to differentiate between class constants and method references? Michael > Am 12.10.2017 um 20:28 schrieb Mathias Grimm : > > The only problem with the @ symbol is the lack of consistency with the other > constants

Re: [PHP-DEV] Suggestion Method Constant

2017-10-12 Thread Michael Döhler
Hi, Same i have in mind, for example: MyClass@myMethod To make also some method call routing easier, e.g. in userland routers. Transform the current approach: $app->get("/foo", [MyClass::class, "myMethod"]); To: $app->get("/foo", MyClass@myMethod); This will ease a lot, e.g. for

Re: [PHP-DEV] Suggestion Method Constant

2017-10-12 Thread Mathias Grimm
The only problem with the @ symbol is the lack of consistency with the other constants class constants are also MyClass::MY_CONST, or MyClass::class, so I think it makes sense to also be MyClass::myMethod::method On 12 October 2017 at 20:24, Michael Döhler wrote: > Hi, >

[PHP-DEV] Suggestion Method Constant

2017-10-12 Thread Mathias Grimm
I would like to suggest a method constant that could be used the same way we use the ::class one I don't have a strong personal preference but it could be something like: MyController::myActionMethod::method, no sure about the internals but it would be consistent with the one for the class.

[PHP-DEV] Enchant 2

2017-10-12 Thread Christoph M. Becker
Hi! I've noticed the other day that Enchant 2.0.0 has been released in August[1]. ext/enchant does not support Enchant 2 yet, however. Only a few fixes are necessary to make it compile[2], but there is an issue regarding the PHP functions enchant_broker_set_dict_path() and

Re: [PHP-DEV] Mysql result data types

2017-10-12 Thread li...@rhsoft.net
Am 12.10.2017 um 17:16 schrieb Johannes Schlüter: On Do, 2017-10-12 at 14:55 +0300, Reinis Rozitis wrote: Hello, is there a reason (technical or historical) why the data coming from MySQL is always strings? I've found only one case where the data type is "honored" - PDO+mysqlnd+emulation off

[PHP-DEV] Re: Fix for unserialise() "vulnerabilities"

2017-10-12 Thread Dmitry Stogov
On Oct 12, 2017 6:01 PM, Nikita Popov wrote: On Thu, Oct 12, 2017 at 4:38 PM, Dmitry Stogov > wrote: Hi, I've found, that at least half of unserialise() security problems, occurs because of non-symmetric serialize/unserialize

Re: [PHP-DEV] [RFC] [VOTE] Implement missing SQLite feature "openBlob" in PDO

2017-10-12 Thread Matteo Beccati
Hi Dan, On 12/10/2017 14:06, Dan Ackroyd wrote: > If we add more magic methods to PDO, that are only present when the > connection was made to an SQLite DB, then there will be more mess to > cleanup, and more people are likely to complain about BC breaks, > if/when we refactor the features to not

Re: [PHP-DEV] Mysql result data types

2017-10-12 Thread Johannes Schlüter
On Do, 2017-10-12 at 14:55 +0300, Reinis Rozitis wrote: > Hello, > is there a reason (technical or historical) why the data coming from > MySQL is always strings? > I've found only one case where the data type is "honored" - > PDO+mysqlnd+emulation off [1] The reason for this is that this is the

[PHP-DEV] Re: Fix for unserialise() "vulnerabilities"

2017-10-12 Thread Nikita Popov
On Thu, Oct 12, 2017 at 4:38 PM, Dmitry Stogov wrote: > Hi, > > > I've found, that at least half of unserialise() security problems, occurs > because of non-symmetric serialize/unserialize assumption, regarding > references encoded with "r". > > > serialize() assumes it's an

[PHP-DEV] Fix for unserialise() "vulnerabilities"

2017-10-12 Thread Dmitry Stogov
Hi, I've found, that at least half of unserialise() security problems, occurs because of non-symmetric serialize/unserialize assumption, regarding references encoded with "r". serialize() assumes it's an object. https://github.com/php/php-src/blob/master/ext/standard/var.c#L828

RE: [PHP-DEV] Mysql result data types

2017-10-12 Thread Reinis Rozitis
> who forces you to ext/mysql? It's out of topic but obviously the code/software and products on the servers. For me as a system administrator I have choice either to never upgrade (for example https://w3techs.com/technologies/details/pl-php/all/all one can see the rough rate of php version

Re: [PHP-DEV] Mysql result data types

2017-10-12 Thread li...@rhsoft.net
Am 12.10.2017 um 14:34 schrieb Reinis Rozitis: no idea what the state of PDO is http://blog.ulf-wendel.de/2008/php-new-network-traffic-cpu-and-memory- savings-with-mysqlnd/ if(mysqli_options($this->conn, MYSQLI_OPT_INT_AND_FLOAT_NATIVE, Thanks, as we still partly (forced to) live in

RE: [PHP-DEV] Mysql result data types

2017-10-12 Thread Reinis Rozitis
> no idea what the state of PDO is > > > http://blog.ulf-wendel.de/2008/php-new-network-traffic-cpu-and-memory- > savings-with-mysqlnd/ > >if(mysqli_options($this->conn, MYSQLI_OPT_INT_AND_FLOAT_NATIVE, Thanks, as we still partly (forced to) live in the "deprecated or moved to pecl"

Re: [PHP-DEV] Session extension cannot be used in a loop/CLI since 7.2

2017-10-12 Thread Björn Larsson
Den 2017-10-09 kl. 13:20, skrev Nicolas Grekas: Hello, I'm having a hard time fixing Symfony's tests suite to 7.2 because of the added warnings+ini_set-rejections in the Session module. Testing the session on the CLI is not possible anymore without starting one PHP process per test case. Why

Re: [PHP-DEV] [RFC] [VOTE] Implement missing SQLite feature "openBlob" in PDO

2017-10-12 Thread Dan Ackroyd
On 12 October 2017 at 00:11, BohwaZ/PHP wrote: > I don't really understand that logic. Yeah the existing behaviour is not > optimal. But there is no other solution right now. "First, do no harm", "given an existing problem, it may be better not to do something, or even to do

Re: [PHP-DEV] Mysql result data types

2017-10-12 Thread li...@rhsoft.net
Am 12.10.2017 um 13:55 schrieb Reinis Rozitis: is there a reason (technical or historical) why the data coming from MySQL is always strings? I've found only one case where the data type is "honored" - PDO+mysqlnd+emulation off [1] not entirely true, our database-layer acts directly with

[PHP-DEV] PHP 7.0.25RC1 is available for testing

2017-10-12 Thread Anatol Belski
Hi, PHP 7.0.25 RC1 was just released and can be downloaded from: https://downloads.php.net/~ab/ The Windows binaries are available at http://windows.php.net/qa/ This release contains a number of bugfixes. For the list of bugfixes that you can target in your testing, please refer to

[PHP-DEV] Mysql result data types

2017-10-12 Thread Reinis Rozitis
Hello, is there a reason (technical or historical) why the data coming from MySQL is always strings? I've found only one case where the data type is "honored" - PDO+mysqlnd+emulation off [1] We made a fairly simple patch to 'mysqlnd' which enables (configurable via ini) data to be returned

[PHP-DEV] PHP 7.2.0 RC4 released

2017-10-12 Thread Remi Collet
The fourth release candidate for 7.2.0 was just released and can be downloaded from: https://downloads.php.net/~remi/ Or using the git tag: php-7.2.0RC4 The Windows binaries are available at: http://windows.php.net/qa/ Please test it carefully, and report any bugs in the bug system.

Re: [PHP-DEV] [RFC] [VOTE] Implement missing SQLite feature "openBlob" in PDO

2017-10-12 Thread Lester Caine
On 12/10/17 00:11, BohwaZ/PHP wrote: >> I think people were reasonably clear during the discussion. >> >> Having certain methods only available on an object depending on how it >> was initialized is just not a good idea. > > As far as I know, no one volunteered to rewrite PDO to change that? > >