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
Something unclear to me here: is the removal of assert()
affecting also
my ownmy\assert()
(imported via use function
)?
Marco Pivetta
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/102394Regards,
Nikita
Something unclear to me here: is the removal of
assert()
affecting also
my ownmy\assert()
(imported viause 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
Alright, voted "NO" on that one then - namespaced stuff should have
whichever symbol name without colliding with internals
Marco Pivetta
Something unclear to me here: is the removal of
assert()
affecting also
my ownmy\assert()
(imported viause 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
Something unclear to me here: is the removal of
assert()
affecting also
my ownmy\assert()
(imported viause 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
--
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
.
Can you prove this somehow? Based on how
use function my\assert;
works a call toassert()
later in that file should appear to engine
asmy\assert
, notassert
.
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
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 levim@php.net:
Something unclear to me here: is the removal of
assert()
affecting also
my ownmy\assert()
(imported viause 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
--
Can you prove this somehow? Based on how
use function my\assert;
works a call toassert()
later in that file should appear to engine
asmy\assert
, notassert
.
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/102394Regards,
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