rfc:partially-supported-callables-expand-deprecation-notices

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:partially-supported-callables-expand-deprecation-notices [2022/05/29 19:30] – Added discussion section about noisiness of deprecation notices jrfrfc:partially-supported-callables-expand-deprecation-notices [2022/07/15 16:07] (current) – Changed status to implemented jrf
Line 3: Line 3:
   * Date: 2022-05-12   * Date: 2022-05-12
   * Author: Juliette Reinders Folmer, <php.net_nospam@adviesenzo.nl>   * Author: Juliette Reinders Folmer, <php.net_nospam@adviesenzo.nl>
-  * Status: Under Discussion+  * Status: Implemented 
 +  * Target version: 8.2 
 +  * Implementation: https://github.com/php/php-src/pull/8823
   * First Published at: https://wiki.php.net/rfc/partially-supported-callables-expand-deprecation-notices   * First Published at: https://wiki.php.net/rfc/partially-supported-callables-expand-deprecation-notices
  
Line 158: Line 160:
 While for ''is_callable()'', the deprecation notices can be silenced by using the ''@'' operator, this is not the case for the notices coming from deprecated callables being used in places using the ''callable'' type. While for ''is_callable()'', the deprecation notices can be silenced by using the ''@'' operator, this is not the case for the notices coming from deprecated callables being used in places using the ''callable'' type.
  
-While it is expected that callables using the syntaxes now deprecated are only small subsection of the callables used in code bases, this can still be annoying.+While it is expected that callables using the syntaxes now deprecated are only small subsection of the callables used in code bases, this can still be annoying.
  
 For codebases which either don't intend to upgrade to PHP 9.0, or want to delay addressing these deprecation notices, there are three options: For codebases which either don't intend to upgrade to PHP 9.0, or want to delay addressing these deprecation notices, there are three options:
Line 176: Line 178:
 This change will allow more deprecated partially supported callables to be discovered and fixed prior to PHP 9.0. This change will allow more deprecated partially supported callables to be discovered and fixed prior to PHP 9.0.
  
-While in some cases, this means that two deprecation notices will now be thrown instead of one, in those cases, the same fix which was originally needed anyway, will remove both deprecation notices in one go.+While in some cases, this means that multiple deprecation notices will now be thrown instead of one, in those cases, the same fix which was originally needed anyway, will remove all deprecation notices related to it in one go.
  
 As all deprecated partially supported callables have an equivalent which is supported PHP cross-version - see the [[https://wiki.php.net/rfc/deprecate_partially_supported_callables#backward_incompatible_changes|conversion table in the original RFC]] - these additional deprecation notices should not lead to any "unfixable" situations. As all deprecated partially supported callables have an equivalent which is supported PHP cross-version - see the [[https://wiki.php.net/rfc/deprecate_partially_supported_callables#backward_incompatible_changes|conversion table in the original RFC]] - these additional deprecation notices should not lead to any "unfixable" situations.
Line 186: Line 188:
 The behaviour of the ''is_callable()'' function and the ''callable'' type when receiving anything other than a deprecated callable syntax will also remain unchanged and will not yield a deprecation notice. The behaviour of the ''is_callable()'' function and the ''callable'' type when receiving anything other than a deprecated callable syntax will also remain unchanged and will not yield a deprecation notice.
  
-===== Proposed Voting Choices =====+===== Vote =====
  
-As per the voting RFC a yes/no vote with a 2/3 majority is needed for this proposal to be accepted. +As per the voting RFC a yes/no vote with a 2/3 majority is needed for this proposal to be accepted.
  
-**Add deprecation notices to ''is_callable()'' and the ''callable'' type when one of the deprecated partially supported callables is passed to them: yes/no**+Voting started on 2022-05-31 10:30 UTC and ended on 2022-06-14 10:30 UTC.  
 + 
 +<doodle title="Throw a deprecation notice when is_callable() receives one of the deprecated partially supported callables ?" auth="jrf" voteType="single" closed="true"> 
 +   * Yes 
 +   * No 
 +</doodle> 
 + 
 +----- 
 + 
 +<doodle title="Throw a deprecation notice when type verification on the callable type detects one of the deprecated partially supported callables ?" auth="jrf" voteType="single" closed="true"> 
 +   Yes 
 +   No 
 +</doodle>
  
  
Line 196: Line 210:
  
 [[https://people.php.net/imsop|Rowan Tommins]] has kindly [[https://externals.io/message/117342#117670|offered to prepare a patch to implement this proposal]]. [[https://people.php.net/imsop|Rowan Tommins]] has kindly [[https://externals.io/message/117342#117670|offered to prepare a patch to implement this proposal]].
 +
 +PR: https://github.com/php/php-src/pull/8823
  
  
 ===== Implementation ===== ===== Implementation =====
-Not available yet. 
  
-After the project is implemented, this section should contain  +  Version 8.2.0 
-  the version(s) it was merged into +  - Commit: https://github.com/php/php-src/commit/af15923bc340ccc8cca2e6e3411386e88ee5f2ff
-  - a link to the git commit(s) +
-  - a link to the PHP manual entry for the feature +
-  - a link to the language specification section (if any)+
  
  
Line 211: Line 223:
   * [[https://wiki.php.net/rfc/deprecate_partially_supported_callables|RFC: Deprecate partially supported callables]]   * [[https://wiki.php.net/rfc/deprecate_partially_supported_callables|RFC: Deprecate partially supported callables]]
   * [[https://externals.io/message/117342|Prior discussion on the internals mailinglist which led to this RFC]]   * [[https://externals.io/message/117342|Prior discussion on the internals mailinglist which led to this RFC]]
 +  * [[https://externals.io/message/117720|RFC discussion thread]]
  
rfc/partially-supported-callables-expand-deprecation-notices.1653852659.txt.gz · Last modified: 2022/05/29 19:30 by jrf