rfc:deprecate-png-jpeg-2wbmp

Differences

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

Link to this comparison view

Next revision
Previous revision
rfc:deprecate-png-jpeg-2wbmp [2016/10/15 12:03] – created cmbrfc:deprecate-png-jpeg-2wbmp [2019/01/28 13:52] (current) – Document removal commit cmb
Line 1: Line 1:
 ====== PHP RFC: Deprecate png2wbmp() and jpeg2wbmp() ====== ====== PHP RFC: Deprecate png2wbmp() and jpeg2wbmp() ======
-  * Version: 0.9+  * Version: 1.1
   * Date: 2016-10-15   * Date: 2016-10-15
   * Author: Christoph M. Becker, cmb@php.net   * Author: Christoph M. Becker, cmb@php.net
-  * Status: Draft+  * Status: Implemented (PHP 7.2)
   * First Published at: http://wiki.php.net/rfc/deprecate-png-jpeg-2wbmp   * First Published at: http://wiki.php.net/rfc/deprecate-png-jpeg-2wbmp
  
 ===== Introduction ===== ===== Introduction =====
  
-''png2wbmp()'' and ''jpeg2wbmp()'' are the only direct image format conversion functions available in ext/gd what makes them rather special, particularly as libgd doesn't offer any such functions ((instead they are defined in the libgd binding using libgd's image reading and writing functions)). Furthermore WBMP ((Wireless Application Protocol Bitmap Format)) has been invented to support WAP ((Wireless Application Protocol)), which appears to be mostly obsolete nowadays.+''png2wbmp()'' and ''jpeg2wbmp()'' are the only direct image format conversion functions available in ext/gd which makes them rather special, particularly as libgd doesn't offer any such functions ((instead they are defined in the libgd binding using libgd's image reading and writing functions)). Furthermore WBMP ((Wireless Application Protocol Bitmap Format)) has been invented to support WAP ((Wireless Application Protocol)), which appears to be mostly obsolete nowadays.
  
 ===== Proposal ===== ===== Proposal =====
  
-Therefore I propose to deprecate the ''png2wbmp()'' and ''jpeg2wbmp()'' functions as of PHP 7.2, and to remove them as of PHP 8.0.+Therefore I propose to deprecate the ''png2wbmp()'' and ''jpeg2wbmp()'' functions as of PHP 7.2, and to remove them as of PHP 8.0. During the deprecation phase calling either function should emit an E_DEPRECATED error.
  
 The main benefit in doing so would be easier maintainance of the libgd bindings ([[https://github.com/php/php-src/blob/PHP-7.0.12/ext/gd/gd.c#L4018-L4215|_php_image_convert()]] alone accounts for rougly 200 lines). An additional benefit would be to have a slightly cleaner and less confusing API (Why are there no other conversion functions? Why don't these functions follow the general "image" prefix rule?) The main benefit in doing so would be easier maintainance of the libgd bindings ([[https://github.com/php/php-src/blob/PHP-7.0.12/ext/gd/gd.c#L4018-L4215|_php_image_convert()]] alone accounts for rougly 200 lines). An additional benefit would be to have a slightly cleaner and less confusing API (Why are there no other conversion functions? Why don't these functions follow the general "image" prefix rule?)
Line 18: Line 18:
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
  
-Obviously, code still using png2wbmp() or jpeg2wbmp() would break. However, fallback functions could easily [[http://news.php.net/php.internals/96366|implemented in userland]].+Obviously, code still using png2wbmp() or jpeg2wbmp() would break. However, fallback functions could easily [[http://news.php.net/php.internals/96366|implemented in userland]]. The supposedly long deprecation period should give users ample time to cater to the removal.
  
 ===== Proposed PHP Version(s) ===== ===== Proposed PHP Version(s) =====
  
   * Deprecation as of next PHP 7.x   * Deprecation as of next PHP 7.x
-  * Removal  +  * Removal as of next major (supposedly PHP 8.0)
-List the proposed PHP versions that the feature will be included in.  Use relative versions such as "next PHP 7.x" or "next PHP 7.x.y".+
  
-===== RFC Impact ===== +===== Open Issues =====
-==== To SAPIs ==== +
-Describe the impact to CLI, Development web server, embedded PHP etc.+
  
-==== To Existing Extensions ==== +Currently none.
-Will existing extensions be affected?+
  
-==== To Opcache ==== +===== Unaffected PHP Functionality =====
-It is necessary to develop RFC's with opcache in mind, since opcache is a core extension distributed with PHP.+
  
-Please explain how you have verified your RFC's compatibility with opcache.+''imagewbmp()'' and ''image2wbmp()'' are not subject of this RFC, and as such their functionality will remain unmodified.
  
-==== New Constants ==== +===== Proposed Voting Choices =====
-Describe any new constants so they can be accurately and comprehensively explained in the PHP documentation.+
  
-==== php.ini Defaults ==== +Deprecate and remove the functionsyes or no.
-If there are any php.ini settings then list: +
-  * hardcoded default values +
-  * php.ini-development values +
-  * php.ini-production values+
  
-===== Open Issues ===== +This RFC requires a 50%+1 majority.
-Make sure there are no open issues when the vote starts!+
  
-===== Unaffected PHP Functionality ===== +Voting ends on 2016-11-13, 22:00 UTC.
-List existing areas/features of PHP that will not be changed by the RFC.+
  
-This helps avoid any ambiguity, shows that you have thought deeply about the RFC's impact, and helps reduces mail list noise.+<doodle title="Deprecate png2wbmp() and jpeg2wbmp()" auth="cmb" voteType="single" closed="true"> 
 +   * Yes 
 +   * No 
 +</doodle>
  
-===== Future Scope ===== +===== Patches and Tests =====
-This sections details areas where the feature might be improved in future, but that are not currently proposed in this RFC.+
  
-===== Proposed Voting Choices ===== +PR implementing the deprecation: https://github.com/php/php-src/pull/2164.
-Include these so readers know where you are heading and can discuss the proposed voting options.+
  
-State whether this project requires a 2/3 or 50%+1 majority (see [[voting]])+===== Implementation =====
  
-===== Patches and Tests ===== +  - PR #2164 has been merged into master (what is supposed to become PHP-7.2) with https://github.com/php/php-src/commit/189bbb58 
-Links to any external patches and tests go here.+  - The deprecation and removal has been documented with http://svn.php.net/viewvc?view=revision&revision=341003 
 +  - [[http://git.php.net/?p=php-src.git;a=commit;h=e9736638828f3037b1b04fc02718d8d04351f9e0|Removed for PHP 8]] 
 +  - The language specification is not affected by this RFC
  
-If there is no patch, make it clear who will create a patch, or whether a volunteer to help with implementation is needed.+===== References =====
  
-Make it clear if the patch is intended to be the final patch, or is just a prototype.+  * Proposal discussion: http://marc.info/?l=php-internals&m=147637821405185&w=2 
 +  * RFC discussion: http://marc.info/?l=php-internals&m=147654153010696&w=2
  
-===== Implementation ===== 
-After the project is implemented, this section should contain  
-  - the version(s) it was merged to 
-  - a link to the git commit(s) 
-  - a link to the PHP manual entry for the feature 
- 
-===== References ===== 
-Links to external references, discussions or RFCs 
  
-===== Rejected Features ===== 
-Keep this updated with features that were discussed on the mail lists. 
rfc/deprecate-png-jpeg-2wbmp.1476532989.txt.gz · Last modified: 2017/09/22 13:28 (external edit)