com php-src: RFC: Deprecate png2wbmp() and jpegwbmp(): ext/gd/gd.c ext/gd/tests/jpeg2wbmp_error1.phpt ext/gd/tests/jpeg 2wbmp_error2-mb.phpt
ext/gd/tests/jpeg2wbmp_error 2.phpt ext/gd/tests/jpeg2wbmp_error3.phpt ext/g d/tests/png2wbmp_error1-mb.phpt ext/gd/tests/png2wb mp_error1.phpt
ext/gd/tests/png2wbmp_error2.php t ext/gd/tests/png2wbmp_error3.phpt
| From: | Christoph Michael Becker | Date: | Sat, 15 Oct 2016 14:16:34 +0000 |
| Subject: | com php-src: RFC: Deprecate png2wbmp() and jpegwbmp(): ext/gd/gd.c ext/gd/tests/jpeg2wbmp_error1.phpt ext/gd/tests/jpeg 2wbmp_error2-mb.phpt ext/gd/tests/jpeg2wbmp_error 2.phpt ext/gd/tests/jpeg2wbmp_error3.phpt ext/g d/tests/png2wbmp_error1-mb.phpt ext/gd/tests/png2wb mp_error1.phpt ext/gd/tests/png2wbmp_error2.php t ext/gd/tests/png2wbmp_error3.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95760@lists.php.net to get a copy of this message | ||
Commit: 1490446ce0e7b428f2ed05f00966baca1238c486
Author: Christoph M. Becker <cmbecker69@gmx.de> Sat, 15 Oct 2016 16:16:34 +0200
Parents: 2bd34885da3ccbab5b0007870b4f1e2a93052702
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1490446ce0e7b428f2ed05f00966baca1238c486
Log:
RFC: Deprecate png2wbmp() and jpegwbmp()
See <https://wiki.php.net/rfc/deprecate-png-jpeg-2wbmp>.
Changed paths:
M ext/gd/gd.c
M ext/gd/tests/jpeg2wbmp_error1.phpt
M ext/gd/tests/jpeg2wbmp_error2-mb.phpt
M ext/gd/tests/jpeg2wbmp_error2.phpt
M ext/gd/tests/jpeg2wbmp_error3.phpt
M ext/gd/tests/png2wbmp_error1-mb.phpt
M ext/gd/tests/png2wbmp_error1.phpt
M ext/gd/tests/png2wbmp_error2.phpt
M ext/gd/tests/png2wbmp_error3.phpt
Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index a1486c0..6aff593 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -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;
}
diff --git a/ext/gd/tests/jpeg2wbmp_error1.phpt b/ext/gd/tests/jpeg2wbmp_error1.phpt
index d0496cc..9cb1d14 100644
--- a/ext/gd/tests/jpeg2wbmp_error1.phpt
+++ b/ext/gd/tests/jpeg2wbmp_error1.phpt
@@ -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
diff --git a/ext/gd/tests/jpeg2wbmp_error2-mb.phpt b/ext/gd/tests/jpeg2wbmp_error2-mb.phpt
index a1c91b1..db17bbb 100644
--- a/ext/gd/tests/jpeg2wbmp_error2-mb.phpt
+++ b/ext/gd/tests/jpeg2wbmp_error2-mb.phpt
@@ -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
diff --git a/ext/gd/tests/jpeg2wbmp_error2.phpt b/ext/gd/tests/jpeg2wbmp_error2.phpt
index 692dcb8..ffac9cd 100644
--- a/ext/gd/tests/jpeg2wbmp_error2.phpt
+++ b/ext/gd/tests/jpeg2wbmp_error2.phpt
@@ -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
diff --git a/ext/gd/tests/jpeg2wbmp_error3.phpt b/ext/gd/tests/jpeg2wbmp_error3.phpt
index df436c8..8e36b04 100644
--- a/ext/gd/tests/jpeg2wbmp_error3.phpt
+++ b/ext/gd/tests/jpeg2wbmp_error3.phpt
@@ -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
diff --git a/ext/gd/tests/png2wbmp_error1-mb.phpt b/ext/gd/tests/png2wbmp_error1-mb.phpt
index a19cf5e..00d526c 100644
--- a/ext/gd/tests/png2wbmp_error1-mb.phpt
+++ b/ext/gd/tests/png2wbmp_error1-mb.phpt
@@ -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
diff --git a/ext/gd/tests/png2wbmp_error1.phpt b/ext/gd/tests/png2wbmp_error1.phpt
index 1e9d717..0a4ade7 100644
--- a/ext/gd/tests/png2wbmp_error1.phpt
+++ b/ext/gd/tests/png2wbmp_error1.phpt
@@ -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
diff --git a/ext/gd/tests/png2wbmp_error2.phpt b/ext/gd/tests/png2wbmp_error2.phpt
index ba8e43e..19ab018 100644
--- a/ext/gd/tests/png2wbmp_error2.phpt
+++ b/ext/gd/tests/png2wbmp_error2.phpt
@@ -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
diff --git a/ext/gd/tests/png2wbmp_error3.phpt b/ext/gd/tests/png2wbmp_error3.phpt
index 1e33f59...063e023 100644
--- a/ext/gd/tests/png2wbmp_error3.phpt
+++ b/ext/gd/tests/png2wbmp_error3.phpt
@@ -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