Welcome! Log In Create A New Profile

Advanced

[PHP-DEV] [VOTE] Deprecations for PHP 7.3

Posted by Nikita Popov 
Nikita Popov
[PHP-DEV] [VOTE] Deprecations for PHP 7.3
July 09, 2018 10:50AM
Hi,

I would like to start voting on the "Deprecation for PHP 7.3" RFC, which
combines six minor deprecation proposals:

https://wiki.php.net/rfc/deprecations_php_7_3

Each deprecation is voted separately and will require a 2/3 majority
independently of whether it is a language or library change. The votes are
open until 2018-07-16.

You can read up on the discussion for this RFC here:
https://externals.io/message/102394

Regards,
Nikita
Marco Pivetta
Re: [PHP-DEV] [VOTE] Deprecations for PHP 7.3
July 09, 2018 12:00PM
Something unclear to me here: is the removal of `assert()` affecting also
my own`my\assert()` (imported via `use function`)?

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/

On Mon, Jul 9, 2018 at 10:47 AM, Nikita Popov <[email protected]> wrote:

> Hi,
>
> I would like to start voting on the "Deprecation for PHP 7.3" RFC, which
> combines six minor deprecation proposals:
>
> https://wiki.php.net/rfc/deprecations_php_7_3
>
> Each deprecation is voted separately and will require a 2/3 majority
> independently of whether it is a language or library change. The votes are
> open until 2018-07-16.
>
> You can read up on the discussion for this RFC here:
> https://externals.io/message/102394
>
> Regards,
> Nikita
>
Sara Golemon
Re: [PHP-DEV] [VOTE] Deprecations for PHP 7.3
July 09, 2018 04:50PM
On Mon, Jul 9, 2018 at 5:57 AM, Marco Pivetta <[email protected]> wrote:
> Something unclear to me here: is the removal of `assert()` affecting also
> my own`my\assert()` (imported via `use function`)?
>
Yes, but in fairness, your namespaced assert function is already a bit
broken if you're not expecting it to be elided in production
environments.

-Sara

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Marco Pivetta
Re: [PHP-DEV] [VOTE] Deprecations for PHP 7.3
July 09, 2018 05:10PM
Alright, voted "NO" on that one then - namespaced stuff should have
whichever symbol name without colliding with internals

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/

On Mon, Jul 9, 2018 at 4:42 PM, Sara Golemon <[email protected]> wrote:

> On Mon, Jul 9, 2018 at 5:57 AM, Marco Pivetta <[email protected]> wrote:
> > Something unclear to me here: is the removal of `assert()` affecting also
> > my own`my\assert()` (imported via `use function`)?
> >
> Yes, but in fairness, your namespaced assert function is already a bit
> broken if you're not expecting it to be elided in production
> environments.
>
> -Sara
>
Levi Morrison
Re: [PHP-DEV] [VOTE] Deprecations for PHP 7.3
July 09, 2018 05:30PM
On Mon, Jul 9, 2018 at 8:43 AM Sara Golemon <[email protected]> wrote:
>
> On Mon, Jul 9, 2018 at 5:57 AM, Marco Pivetta <[email protected]> wrote:
> > Something unclear to me here: is the removal of `assert()` affecting also
> > my own`my\assert()` (imported via `use function`)?
> >
> Yes, but in fairness, your namespaced assert function is already a bit
> broken if you're not expecting it to be elided in production
> environments.
>
> -Sara
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php

Can you prove this somehow? Based on how `use function my\assert;`
works a call to `assert()` later in that file should appear to engine
as `my\assert`, not `assert`.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Sara Golemon
Re: [PHP-DEV] [VOTE] Deprecations for PHP 7.3
July 09, 2018 05:40PM
On Mon, Jul 9, 2018 at 11:18 AM, Levi Morrison <[email protected]> wrote:
> Can you prove this somehow? Based on how `use function my\assert;`
> works a call to `assert()` later in that file should appear to engine
> as `my\assert`, not `assert`.
>
The vote is on deprecating (and ultimately blocking) the *declaration*
of the assert function in any namespace. How the call looks is
immaterial to that.

Unless you're asking about the elision, in which case... you're right,
that appears to not happen anyway, so I'll doubly stand by my vote
against deprecating this based on implementation details.

-Sara

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Niklas Keller
Re: [PHP-DEV] [VOTE] Deprecations for PHP 7.3
July 10, 2018 07:00PM
I put that item onto the list.

The author of https://github.com/mikey179/bovigo-assert originally had
the issue that a function named `assert` behaves really weird.
`assert()` in namespaced code might refer to the namespaced `assert()`
function, but might also fall back to the global `assert()`. Whether
the function is jumped around or not depends on `zend.assertions`,
which is highly surprising, because it also jumps around `assert()` in
namespaced code even if an `assert()` function exists in that
namespace. Requiring an explicit `use function` is really weird.

See https://3v4l.org/8EKdA for an example. The behavior in PHP 7.0+ is
by-design and mentioned in the original assertions RFC.

Regards, Niklas
Am Mo., 9. Juli 2018 um 17:18 Uhr schrieb Levi Morrison <[email protected]>:
>
> On Mon, Jul 9, 2018 at 8:43 AM Sara Golemon <[email protected]> wrote:
> >
> > On Mon, Jul 9, 2018 at 5:57 AM, Marco Pivetta <[email protected]> wrote:
> > > Something unclear to me here: is the removal of `assert()` affecting also
> > > my own`my\assert()` (imported via `use function`)?
> > >
> > Yes, but in fairness, your namespaced assert function is already a bit
> > broken if you're not expecting it to be elided in production
> > environments.
> >
> > -Sara
> >
> > --
> > PHP Internals - PHP Runtime Development Mailing List
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
> Can you prove this somehow? Based on how `use function my\assert;`
> works a call to `assert()` later in that file should appear to engine
> as `my\assert`, not `assert`.
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Nikita Popov
[PHP-DEV] Re: [VOTE] Deprecations for PHP 7.3
July 16, 2018 07:10PM
On Mon, Jul 9, 2018 at 10:47 AM, Nikita Popov <[email protected]> wrote:

> Hi,
>
> I would like to start voting on the "Deprecation for PHP 7.3" RFC, which
> combines six minor deprecation proposals:
>
> https://wiki.php.net/rfc/deprecations_php_7_3
>
> Each deprecation is voted separately and will require a 2/3 majority
> independently of whether it is a language or library change. The votes are
> open until 2018-07-16.
>
> You can read up on the discussion for this RFC here:
> https://externals.io/message/102394
>
> Regards,
> Nikita
>

I'm happy to announce that all parts of this RFC have been accepted, with
the following voting breakdown:

* mbstring aliases: 37 in favor, 1 against
* non-string needles: 32 in favor, 1 against
* fgetss and co: 20 in favor, 4 against
* assert redeclaration: 20 in favor, 7 against
* FILTER_FLAG_(SCHEME|HOST)_REQUIRED: 31 in favor, 1 against
* pdo_odbc.db2_instance_name: 29 in favor, 0 against

Nikita
Sorry, only registered users may post in this forum.

Click here to login