From dfa6c2046a8d7b66c4be52e46888f0fefccbcfd4 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 28 Jan 2019 14:29:06 +0100 Subject: [PATCH] Remove deprecated image2wbmp() Cf. . --- NEWS | 3 +++ UPGRADING | 4 ++++ ext/gd/gd.c | 16 ---------------- ext/gd/gd_ctx.c | 3 +-- ext/gd/php_gd.h | 1 - ext/gd/tests/image2wbmp_error.phpt | 20 -------------------- 6 files changed, 8 insertions(+), 39 deletions(-) delete mode 100644 ext/gd/tests/image2wbmp_error.phpt diff --git a/NEWS b/NEWS index 687584aea5..cfa0abc578 100644 --- a/NEWS +++ b/NEWS @@ -5,4 +5,7 @@ PHP NEWS - Core: . Fixed bug #NNNNN (Summary). (Author) +- GD: + . Removed deprecated image2wbmp(). (cmb) + <<< NOTE: Insert NEWS from last stable release here prior to actual release! >>> diff --git a/UPGRADING b/UPGRADING index 7563dfdfb0..87cd96a6d7 100644 --- a/UPGRADING +++ b/UPGRADING @@ -23,6 +23,10 @@ PHP 8.0 UPGRADE NOTES - Core: . TBD +- GD: + . The deprecated function image2wbmp() has been removed. + RFC: https://wiki.php.net/rfc/image2wbmp + ======================================== 2. New Features ======================================== diff --git a/ext/gd/gd.c b/ext/gd/gd.c index d4e4db1be6..4455d8b8d4 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -758,12 +758,6 @@ ZEND_BEGIN_ARG_INFO(arginfo_imagettftext, 0) ZEND_END_ARG_INFO() #endif -ZEND_BEGIN_ARG_INFO_EX(arginfo_image2wbmp, 0, 0, 1) - ZEND_ARG_INFO(0, im) - ZEND_ARG_INFO(0, filename) - ZEND_ARG_INFO(0, foreground) -ZEND_END_ARG_INFO() - #if defined(HAVE_GD_JPG) ZEND_BEGIN_ARG_INFO(arginfo_jpeg2wbmp, 0) ZEND_ARG_INFO(0, f_org) @@ -997,7 +991,6 @@ static const zend_function_entry gd_functions[] = { #if defined(HAVE_GD_PNG) PHP_DEP_FE(png2wbmp, arginfo_png2wbmp) #endif - PHP_DEP_FE(image2wbmp, arginfo_image2wbmp) PHP_FE(imagelayereffect, arginfo_imagelayereffect) PHP_FE(imagexbm, arginfo_imagexbm) @@ -2594,7 +2587,6 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char int argc = ZEND_NUM_ARGS(); int q = -1, i, t = 1; - /* The quality parameter for Wbmp stands for the foreground when called from image2wbmp() */ /* When called from imagewbmp() the quality parameter stands for the foreground color. Default: black. */ /* The quality parameter for gd2 stands for chunk size */ @@ -4067,14 +4059,6 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int /* }}} */ #endif /* ENABLE_GD_TTF */ -/* {{{ proto bool image2wbmp(resource im [, string filename [, int foreground]]) - Output WBMP image to browser or file */ -PHP_FUNCTION(image2wbmp) -{ - _php_image_output(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_CONVERT_WBM, "WBMP", NULL); -} -/* }}} */ - #if defined(HAVE_GD_JPG) /* {{{ proto bool jpeg2wbmp(string f_org, string f_dest, int d_height, int d_width, int threshold) Convert JPEG image to WBMP image */ diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c index d1c3771f23..eae3aef255 100644 --- a/ext/gd/gd_ctx.c +++ b/ext/gd/gd_ctx.c @@ -93,8 +93,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type, php_stream *stream; int close_stream = 1; - /* The third (quality) parameter for Wbmp stands for the foreground when called from image2wbmp(). - * The third (quality) parameter for Wbmp and Xbm stands for the foreground color index when called + /* The third (quality) parameter for Wbmp and Xbm stands for the foreground color index when called * from imagey(). */ switch (image_type) { diff --git a/ext/gd/php_gd.h b/ext/gd/php_gd.h index 171c71191d..5c8aeb6e76 100644 --- a/ext/gd/php_gd.h +++ b/ext/gd/php_gd.h @@ -206,7 +206,6 @@ PHP_FUNCTION(imagettftext); PHP_FUNCTION(jpeg2wbmp); PHP_FUNCTION(png2wbmp); -PHP_FUNCTION(image2wbmp); PHP_FUNCTION(imagecolormatch); diff --git a/ext/gd/tests/image2wbmp_error.phpt b/ext/gd/tests/image2wbmp_error.phpt deleted file mode 100644 index 8d8d836ef7..0000000000 --- a/ext/gd/tests/image2wbmp_error.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -image2wbmp() is deprecated ---SKIPIF-- - ---FILE-- - -===DONE=== ---CLEAN-- - ---EXPECTF-- -Deprecated: Function image2wbmp() is deprecated in %s on line %d -===DONE=== -- 2.50.1