Re: [PHP-DEV] add php.ini entry to set default user_agent for curl

2021-04-12 Thread Michael Maroszek
Hi Nikita, sure! We are embedding PHP through SAPI to allow our users interaction through PHP scripts. That allows them to automate a lot of things and one of them is doing web requests. For our new version we wanted to set the user-agent, to properly recognize/categorize requests on our

[PHP-DEV] [8.1] Release Manager Voting Opens

2021-04-12 Thread Sara Golemon
As stated last week, the vote for your PHP 8.1 Release Managers opens today. Now, if fact. Please take your newly reset authentication credentials over to https://wiki.php.net/todo/php81 and place your ranked votes. A few reminders: 1/ Joe Watkins, as the only "veteran" volunteer has a

[PHP-DEV] Re: Update on git.php.net incident

2021-04-12 Thread Jan Ehrhardt
"Christoph M. Becker" in php.internals (Mon, 12 Apr 2021 14:23:33 +0200): >On 12.04.2021 at 13:51, Jan Ehrhardt wrote: > >> Nikita Popov in php.internals (Tue, 6 Apr 2021 20:28:03 +0200): >>> * Existing passwords were reset (use main.php.net/forgot.php to generate a >>> new one). >> >> The Wiki

[PHP-DEV] Using timelib functions shipped with headers

2021-04-12 Thread Marco Sirabella
Hello, I am writing an extension that creates a DateTime object where I have the unix timestamp and a UTC offset in minutes. ``` timelib_set_timezone_from_offset(ret->time, gt.offset); timelib_unixtime2local(ret->time, gt.time); ``` Unfortunately, even though I can pull in the headers with

Re: [PHP-DEV] Allow commit() without transaction?

2021-04-12 Thread David Gebler
Good example of why commit() should throw an exception, I think - it's just alerted the developer that executing their previous statement has caused an implicit commit. Imagine if they had a complex sequence of queries and didn't realise they'd added one which ended the transaction, thinking they

Re: [PHP-DEV] Allow commit() without transaction?

2021-04-12 Thread Matteo Beccati
Hi Nikita, On 12/04/2021 14:07, Nikita Popov wrote: $pdo->beginTransaction() $pdo->exec('DROP TABLE foobar'); // Implicitly commits transaction $pdo->exec('DROP TABLE barfoo'); // Transaction not active anymore $pdo->commit(); // Throws because no transaction active now throws an exception,

Re: [PHP-DEV] Allow commit() without transaction?

2021-04-12 Thread Benjamin Morel
> > > I think it is really nice that commit() throws for inactive > transactions. Code paths that mess up your transactions will not go > unnoticed that easily. > +1. I've always found this behaviour in MySQL very surprising and error prone (BEGIN; BEGIN; COMMIT; COMMIT; => no errors), and I'm

Re: [PHP-DEV] add php.ini entry to set default user_agent for curl

2021-04-12 Thread Nikita Popov
On Thu, Apr 8, 2021 at 2:41 PM Michael Maroszek wrote: > Dear Internals, > I'd like to suggest a new enhancement for 8.1 as outlined in the title. > > The initial pull request is here: > https://github.com/php/php-src/pull/6834/files > > --- Details: > Since quite a while PHP offers a dedicated

Re: [PHP-DEV] [RFC] Deprecations for PHP 8.1

2021-04-12 Thread Nikita Popov
On Mon, Apr 12, 2021 at 3:15 PM Máté Kocsis wrote: > Hi Nikita and Stanislav, > > > > get_class(), get_parent_class() and get_called_class() without >> argument >> > >> > I'm not sure why. I mean if we want to make them return the same as >> > self::class etc. - up to the point of actually

Re: [PHP-DEV] [RFC] Deprecations for PHP 8.1

2021-04-12 Thread Máté Kocsis
Hi Nikita and Stanislav, > > get_class(), get_parent_class() and get_called_class() without argument > > > > I'm not sure why. I mean if we want to make them return the same as > > self::class etc. - up to the point of actually compiling them as such - > > no problem, but I don't see why they

[PHP-DEV] Re: [RFC] Deprecations for PHP 8.1

2021-04-12 Thread Nikita Popov
On Fri, Mar 26, 2021 at 3:41 PM Christoph M. Becker wrote: > On 22.03.2021 at 10:24, Nikita Popov wrote: > > > It's time for another deprecation RFC: > > https://wiki.php.net/rfc/deprecations_php_8_1 > > > > As we're still early in the release cycle, it's still possible to add > > additional

Re: [PHP-DEV] [RFC] Deprecations for PHP 8.1

2021-04-12 Thread Nikita Popov
On Tue, Mar 23, 2021 at 10:44 PM Kalle Sommer Nielsen wrote: > Hi > > Den man. 22. mar. 2021 kl. 11.25 skrev Nikita Popov >: > > > > Hi internals, > > > > It's time for another deprecation RFC: > > https://wiki.php.net/rfc/deprecations_php_8_1 > > I'd like to suggest adding `nl_langinfo()` to

[PHP-DEV] Re: [RFC] Deprecations for PHP 8.1

2021-04-12 Thread Nikita Popov
On Mon, Mar 22, 2021 at 10:24 AM Nikita Popov wrote: > Hi internals, > > It's time for another deprecation RFC: > https://wiki.php.net/rfc/deprecations_php_8_1 > I have updated the RFC to include two more items: * The filter.default ini setting, aka "magic quotes but even worse". *

Re: [PHP-DEV] [RFC] Deprecations for PHP 8.1

2021-04-12 Thread Nikita Popov
On Tue, Mar 23, 2021 at 6:05 AM Stanislav Malyshev wrote: > Hi! > > > date_sunrise() and date_sunset() > > Do we have any information on usage? I am generally not a fan of > deprecating functions that work - even if they are odd and have quirky > APIs - but if the usage is essentially zero than

Re: [PHP-DEV] Allow commit() without transaction?

2021-04-12 Thread Kamil Tekiela
What would be a benefit of a commit function that can be executed without an active transaction?

Re: [PHP-DEV] Allow commit() without transaction?

2021-04-12 Thread Dik Takken
On 12-04-2021 14:07, Nikita Popov wrote: > I believe this behavior is correct, but I could see an argument made in > favor of always allowing commit() calls (but not rollBack() calls) even if > there is no active transaction. That would change the meaning of commit() > from "commit an active

[PHP-DEV] Re: Update on git.php.net incident

2021-04-12 Thread Christoph M. Becker
On 12.04.2021 at 13:51, Jan Ehrhardt wrote: > Nikita Popov in php.internals (Tue, 6 Apr 2021 20:28:03 +0200): >> * Existing passwords were reset (use main.php.net/forgot.php to generate a >> new one). > > The Wiki has another password reset link: > https://wiki.php.net/start?do=resendpwd > > It

[PHP-DEV] Allow commit() without transaction?

2021-04-12 Thread Nikita Popov
Hi internals, Since PHP 8.0, PDO fully supports MySQL transactions -- this means that inTransaction() will report the actual connection transaction state, as opposed to an emulated (incorrect) transaction state tracked by PDO itself. This has two primary effects: PDO is aware of transactions

[PHP-DEV] Re: Update on git.php.net incident

2021-04-12 Thread Jan Ehrhardt
Nikita Popov in php.internals (Tue, 6 Apr 2021 20:28:03 +0200): > * Existing passwords were reset (use main.php.net/forgot.php to generate a >new one). The Wiki has another password reset link: https://wiki.php.net/start?do=resendpwd It sends a new password (in plain text), but that password

Re: [PHP-DEV] Use MySQL syntax only for parsing MySQL statements in PDO

2021-04-12 Thread Matteo Beccati
Sergei, On 11/04/2021 19:48, Sergei Morozov wrote: This is great to see this effort happening! As I understand, you also implement an API for platform-specific parsers but via a much better extensible API. > I'm curious if instead of keeping the MySQL syntax in the default parser and creating

Re: [PHP-DEV] Required parameter after optional one

2021-04-12 Thread Nikita Popov
On Fri, Apr 9, 2021 at 9:24 AM Benjamin Morel wrote: > Hi internals, > > I'm wondering why PHP 8 started warning about required parameters declared > after optional ones, when this version is the one that also introduced > named parameters, which can take advantage of this: > > ``` > function

Re: [PHP-DEV] [8.1] Release Manager Election

2021-04-12 Thread Patrick ALLAERT
Le mar. 6 avr. 2021 à 00:00, Sara Golemon a écrit : > Happy Monday, everyone (unless it's Tuesday, in which case: Happy > Tuesday!); > > We've had an INCREDIBLE turn-out for PHP 8.1 Release Manager selection this > year. > > In the role of "Veteran" release manager, Joe Watkins[0] has kindly