]> granicus.if.org Git - php/commitdiff
RFC: Deprecate png2wbmp() and jpegwbmp()
authorChristoph M. Becker <cmbecker69@gmx.de>
Sat, 15 Oct 2016 14:16:34 +0000 (16:16 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Sat, 15 Oct 2016 14:16:34 +0000 (16:16 +0200)
See <https://wiki.php.net/rfc/deprecate-png-jpeg-2wbmp>.

ext/gd/gd.c
ext/gd/tests/jpeg2wbmp_error1.phpt
ext/gd/tests/jpeg2wbmp_error2-mb.phpt
ext/gd/tests/jpeg2wbmp_error2.phpt
ext/gd/tests/jpeg2wbmp_error3.phpt
ext/gd/tests/png2wbmp_error1-mb.phpt
ext/gd/tests/png2wbmp_error1.phpt
ext/gd/tests/png2wbmp_error2.phpt
ext/gd/tests/png2wbmp_error3.phpt

index a1486c005b8a15d5fe2421eea36bf191f0bcbccf..6aff593a9e18fbbb80063fae8cf07e28e5b2e1c3 100644 (file)
@@ -4085,6 +4085,8 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type )
     zend_long ignore_warning;
 #endif
 
+       php_error_docref(NULL, E_DEPRECATED, "This function is deprecated");
+
        if (zend_parse_parameters(ZEND_NUM_ARGS(), "pplll", &f_org, &f_org_len, &f_dest, &f_dest_len, &height, &width, &threshold) == FAILURE) {
                return;
        }
index d0496cc82bd6be6de5b21959be3847ec09793164..9cb1d14d7e3161d40d972dacf2a4cb7eddc32955 100644 (file)
@@ -32,8 +32,12 @@ jpeg2wbmp($file, $file2, 20, 120, 9);
 jpeg2wbmp($file, $file2, 20, 120, -1);
 ?>
 --EXPECTF--
+Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
+
 Warning: jpeg2wbmp(): Invalid threshold value '9' in %s on line %d
 
+Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
+
 Warning: jpeg2wbmp(): Invalid threshold value '-1' in %s on line %d
 --CLEAN--
 <?php
index a1c91b139717a5cd7ea86ef34ce21865a482bc3e..db17bbb6c6b0845984b87156b31cfd45e7e042ed 100644 (file)
@@ -20,10 +20,16 @@ jpeg2wbmp(null, $file, 20, 120, 8);
 jpeg2wbmp(false, $file, 20, 120, 8);
 ?>
 --EXPECTF--
+Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
+
 Warning: jpeg2wbmp(): Unable to open '' for reading in %s on line %d
 
+Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
+
 Warning: jpeg2wbmp(): Unable to open '' for reading in %s on line %d
 
+Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
+
 Warning: jpeg2wbmp(): Unable to open '' for reading in %s on line %d
 --CLEAN--
 <?php
index 692dcb842d9c5b7eb2d26bb61b1a0069db75119d..ffac9cd1df9b98d9e657486fb0fcb05a0450a990 100644 (file)
@@ -20,10 +20,16 @@ jpeg2wbmp(null, $file, 20, 120, 8);
 jpeg2wbmp(false, $file, 20, 120, 8);
 ?>
 --EXPECTF--
+Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
+
 Warning: jpeg2wbmp(): Unable to open '' for reading in %s on line %d
 
+Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
+
 Warning: jpeg2wbmp(): Unable to open '' for reading in %s on line %d
 
+Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
+
 Warning: jpeg2wbmp(): Unable to open '' for reading in %s on line %d
 --CLEAN--
 <?php
index df436c8cc3d96d062b485afe982ea0cf2b64dc56..8e36b0407272181f7d2854fa463aae911a5234d4 100644 (file)
@@ -32,10 +32,16 @@ jpeg2wbmp($file, null, 20, 120, 8);
 jpeg2wbmp($file, false, 20, 120, 8);
 ?>
 --EXPECTF--
+Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
+
 Warning: jpeg2wbmp(): Unable to open '' for writing in %s on line %d
 
+Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
+
 Warning: jpeg2wbmp(): Unable to open '' for writing in %s on line %d
 
+Deprecated: jpeg2wbmp(): This function is deprecated in %s on line %d
+
 Warning: jpeg2wbmp(): Unable to open '' for writing in %s on line %d
 --CLEAN--
 <?php
index a19cf5e0178f877979a983eeb89ff434e1e04148..00d526cbe6813dfb32f3b8d95c1d74e49e59a4f6 100644 (file)
@@ -32,8 +32,12 @@ png2wbmp($file, $file2, 20, 120, 9);
 png2wbmp($file, $file2, 20, 120, -1);
 ?>
 --EXPECTF--
+Deprecated: png2wbmp(): This function is deprecated in %s on line %d
+
 Warning: png2wbmp(): Invalid threshold value '9' in %s on line %d
 
+Deprecated: png2wbmp(): This function is deprecated in %s on line %d
+
 Warning: png2wbmp(): Invalid threshold value '-1' in %s on line %d
 --CLEAN--
 <?php
index 1e9d717d94e2be62cb54fa1a39617e62d37c604c..0a4ade70e9cf7bd1c9aab8b71686c38deaa6eef6 100644 (file)
@@ -32,8 +32,12 @@ png2wbmp($file, $file2, 20, 120, 9);
 png2wbmp($file, $file2, 20, 120, -1);
 ?>
 --EXPECTF--
+Deprecated: png2wbmp(): This function is deprecated in %s on line %d
+
 Warning: png2wbmp(): Invalid threshold value '9' in %s on line %d
 
+Deprecated: png2wbmp(): This function is deprecated in %s on line %d
+
 Warning: png2wbmp(): Invalid threshold value '-1' in %s on line %d
 --CLEAN--
 <?php
index ba8e43e7f0e28f8c1b551f5ef7930d46920ee9d7..19ab01860e00fc109df7dd32f386a16cab34b28f 100644 (file)
@@ -20,10 +20,16 @@ png2wbmp(null, $file, 20, 120, 8);
 png2wbmp(false, $file, 20, 120, 8);
 ?>
 --EXPECTF--
+Deprecated: png2wbmp(): This function is deprecated in %s on line %d
+
 Warning: png2wbmp(): Unable to open '' for reading in %s on line %d
 
+Deprecated: png2wbmp(): This function is deprecated in %s on line %d
+
 Warning: png2wbmp(): Unable to open '' for reading in %s on line %d
 
+Deprecated: png2wbmp(): This function is deprecated in %s on line %d
+
 Warning: png2wbmp(): Unable to open '' for reading in %s on line %d
 --CLEAN--
 <?php
index 1e33f59b184273bf16aca5487b180fed0f6382b7..063e023d262266c0978bbc0dc3c311145fdc0b93 100644 (file)
@@ -32,10 +32,16 @@ png2wbmp($file, null, 20, 120, 8);
 png2wbmp($file, false, 20, 120, 8);
 ?>
 --EXPECTF--
+Deprecated: png2wbmp(): This function is deprecated in %s on line %d
+
 Warning: png2wbmp(): Unable to open '' for writing in %s on line %d
 
+Deprecated: png2wbmp(): This function is deprecated in %s on line %d
+
 Warning: png2wbmp(): Unable to open '' for writing in %s on line %d
 
+Deprecated: png2wbmp(): This function is deprecated in %s on line %d
+
 Warning: png2wbmp(): Unable to open '' for writing in %s on line %d
 --CLEAN--
 <?php