Skip to content

Commit cf0ffa8

Browse files
committedApr 1, 2015
Remove datefmt_set_timezone_id and OO variant
1 parent acfc31c commit cf0ffa8

11 files changed

+15
-56
lines changed
 

‎NEWS

+4
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@
9898
. Fixed bug #65933 (Cannot specify config lines longer than 1024 bytes). (Chris Wright)
9999
. Implement request #67106 (Split main fpm config). (Elan Ruusamäe, Remi)
100100

101+
- Intl:
102+
. Removed deprecated aliases datefmt_set_timezone_id() and
103+
IntlDateFormatter::setTimeZoneID(). (Nikita)
104+
101105
- JSON
102106
. Replace non-free JSON parser with a parser from Jsond extension, fixes #63520
103107
(JSON extension includes a problematic license statement). (Jakub Zelenka)

‎UPGRADING

+5
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,11 @@ Other
432432
. gmp_setbit() and gmp_clrbit() now return FALSE for negative indices, making
433433
them consistent with other GMP functions.
434434

435+
- Intl:
436+
. Removed deprecated aliases datefmt_set_timezone_id() and
437+
IntlDateFormatter::setTimeZoneID(). Use datefmt_set_timezone() and
438+
IntlDateFormatter::setTimeZone() instead.
439+
435440
- Mcrypt
436441
. Removed deprecated mcrypt_generic_end() alias in favor of
437442
mcrypt_generic_deinit().

‎ext/intl/dateformat/dateformat_attrcpp.cpp

+1-13
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,8 @@ U_CFUNC PHP_FUNCTION(datefmt_get_timezone)
9898
timezone_object_construct(tz_clone, return_value, 1);
9999
}
100100

101-
U_CFUNC PHP_FUNCTION(datefmt_set_timezone_id)
102-
{
103-
php_error_docref0(NULL, E_DEPRECATED,
104-
"Use datefmt_set_timezone() instead, which also accepts a plain "
105-
"time zone identifier and for which this function is now an "
106-
"alias");
107-
PHP_FN(datefmt_set_timezone)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
108-
}
109-
110101
/* {{{ proto boolean IntlDateFormatter::setTimeZone(mixed $timezone)
111-
* Set formatter's timezone. }}} */
112-
/* {{{ proto boolean datefmt_set_timezone_id(IntlDateFormatter $mf, $timezone_id)
113-
* Set formatter timezone_id.
114-
*/
102+
* Set formatter's timezone. */
115103
U_CFUNC PHP_FUNCTION(datefmt_set_timezone)
116104
{
117105
zval *timezone_zv;

‎ext/intl/dateformat/dateformat_attrcpp.h

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919

2020
PHP_FUNCTION(datefmt_get_timezone_id);
2121

22-
PHP_FUNCTION(datefmt_set_timezone_id);
23-
2422
PHP_FUNCTION(datefmt_get_timezone);
2523

2624
PHP_FUNCTION(datefmt_set_timezone);

‎ext/intl/dateformat/dateformat_class.c

-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ static zend_function_entry IntlDateFormatter_class_functions[] = {
167167
PHP_NAMED_FE( getCalendarObject, ZEND_FN( datefmt_get_calendar_object ), arginfo_intldateformatter_getdatetype )
168168
PHP_NAMED_FE( setCalendar, ZEND_FN( datefmt_set_calendar ), arginfo_intldateformatter_setcalendar )
169169
PHP_NAMED_FE( getTimeZoneId, ZEND_FN( datefmt_get_timezone_id ), arginfo_intldateformatter_getdatetype )
170-
PHP_NAMED_FE( setTimeZoneId, ZEND_FN( datefmt_set_timezone_id ), arginfo_intldateformatter_settimezoneid )
171170
PHP_NAMED_FE( getTimeZone, ZEND_FN( datefmt_get_timezone ), arginfo_intldateformatter_getdatetype )
172171
PHP_NAMED_FE( setTimeZone, ZEND_FN( datefmt_set_timezone ), arginfo_intldateformatter_settimezoneid )
173172
PHP_NAMED_FE( setPattern, ZEND_FN( datefmt_set_pattern ), arginfo_intldateformatter_setpattern )

‎ext/intl/doc/datefmt_api.php

-12
Original file line numberDiff line numberDiff line change
@@ -365,18 +365,6 @@ function datefmt_get_locale($fmt , $type = ULOC_ACTUAL_LOCALE) {}
365365
function datefmt_get_timezone_id($fmt) {}
366366

367367

368-
/**
369-
* Sets the time zone to use
370-
* @param DateFormatter $fmt The date formatter resource
371-
* @param string $zone zone ID string of the time zone to use.
372-
* if null or the empty string, the default time zone for
373-
* the runtime is used.
374-
* @return boolean 'true' on successful setting of the time zone, 'false'
375-
* if an error occurred (such as the time zone wasn't recognized).
376-
*/
377-
function datefmt_set_timezone_id($fmt , $zone) {}
378-
379-
380368
/**
381369
* Sets the calendar used to the appropriate calendar, which must be
382370
* one of the constants defined above. Some examples include:

‎ext/intl/php_intl.c

-1
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,6 @@ zend_function_entry intl_functions[] = {
715715
PHP_FE( datefmt_set_calendar, arginfo_datefmt_set_calendar )
716716
PHP_FE( datefmt_get_locale, arginfo_msgfmt_get_locale )
717717
PHP_FE( datefmt_get_timezone_id, arginfo_msgfmt_get_locale )
718-
PHP_FE( datefmt_set_timezone_id, arginfo_datefmt_set_timezone )
719718
PHP_FE( datefmt_get_timezone, arginfo_msgfmt_get_locale )
720719
PHP_FE( datefmt_set_timezone, arginfo_datefmt_set_timezone )
721720
PHP_FE( datefmt_get_pattern, arginfo_msgfmt_get_locale )

‎ext/intl/tests/dateformat_setTimeZoneID_deprecation.phpt

-22
This file was deleted.

‎ext/intl/tests/dateformat_set_timezone_id2.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ ut_run();
6060
?>
6161
--EXPECTF--
6262

63-
Warning: IntlDateFormatter::setTimeZoneId(): datefmt_set_timezone: no such time zone: 'CN' in %s on line %d
63+
Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: no such time zone: 'CN' in %s on line %d
6464

65-
Warning: datefmt_set_timezone_id(): datefmt_set_timezone: no such time zone: 'CN' in %s on line %d
65+
Warning: datefmt_set_timezone(): datefmt_set_timezone: no such time zone: 'CN' in %s on line %d
6666

6767
After creation of the dateformatter : timezone_id= US/Pacific
6868
-----------

‎ext/intl/tests/dateformat_set_timezone_id3.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ include_once( 'ut_common.inc' );
5858
ut_run();
5959
?>
6060
--EXPECTF--
61-
Warning: IntlDateFormatter::setTimeZoneId(): datefmt_set_timezone: no such time zone: 'CN' in %sut_common.inc on line %d
61+
Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: no such time zone: 'CN' in %sut_common.inc on line %d
6262

63-
Warning: datefmt_set_timezone_id(): datefmt_set_timezone: no such time zone: 'CN' in %sut_common.inc on line %d
63+
Warning: datefmt_set_timezone(): datefmt_set_timezone: no such time zone: 'CN' in %sut_common.inc on line %d
6464

6565
After creation of the dateformatter : timezone_id= US/Pacific
6666
-----------

‎ext/intl/tests/ut_common.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ function ut_datefmt_get_timezone_id( $fmt )
363363
}
364364
function ut_datefmt_set_timezone_id( $fmt ,$timezone_id )
365365
{
366-
return $GLOBALS['oo-mode'] ? $fmt->setTimeZoneId( $timezone_id ) : datefmt_set_timezone_id( $fmt ,$timezone_id);
366+
return $GLOBALS['oo-mode'] ? $fmt->setTimeZone( $timezone_id ) : datefmt_set_timezone( $fmt ,$timezone_id);
367367
}
368368
function ut_datefmt_get_pattern( $fmt )
369369
{

0 commit comments

Comments
 (0)
Please sign in to comment.