Commit Graph

293 Commits

Author SHA1 Message Date
Anatoliy Belsky
7e2d550e88 Merge branch 'PHP-5.4'
* PHP-5.4:
  Added the intl tests extracted from Symfony. These are making the intl ext crash with ICU at least 4.6, but probably with earlier versions too.
2012-08-06 14:13:25 +02:00
Anatoliy Belsky
55b82abe00 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Added the intl tests extracted from Symfony. These are making the intl ext crash with ICU at least 4.6, but probably with earlier versions too.
2012-08-06 14:12:04 +02:00
Matt Ficken
ed793b2a3f Added the intl tests extracted from Symfony. These are making the intl ext crash with ICU at least 4.6, but probably with earlier versions too. 2012-08-06 14:07:42 +02:00
Xinchen Hui
c1a7369a40 Merge branch 'PHP-5.4' 2012-08-02 19:33:58 +08:00
Xinchen Hui
cbf1db38f7 Merge branch 'PHP-5.3' into PHP-5.4 2012-08-02 19:33:27 +08:00
Xinchen Hui
2b6ac9e1a0 Fix test, wrong exepct rule used 2012-08-02 19:31:34 +08:00
Gustavo André dos Santos Lopes
06e06f026d Merge branch '5.4'
* 5.4:
  Fix test title and limit it to ICU >= 4.8
  Remove executable bit from files
  Limit test to ICU 49
  Remove executable bit from files
2012-07-30 11:04:48 +02:00
Gustavo André dos Santos Lopes
86ca788cc7 Fix test title and limit it to ICU >= 4.8 2012-07-30 11:04:10 +02:00
Gustavo André dos Santos Lopes
f8e693248f Remove executable bit from files 2012-07-30 10:32:27 +02:00
Gustavo André dos Santos Lopes
dec7bad635 Merge branch '5.3' into 5.4
* 5.3:
  Limit test to ICU 49
  Remove executable bit from files
2012-07-30 10:31:10 +02:00
Gustavo André dos Santos Lopes
7e3e1837c8 Limit test to ICU 49 2012-07-30 10:27:41 +02:00
Gustavo André dos Santos Lopes
9762609cec Remove executable bit from files 2012-07-30 10:25:17 +02:00
Gustavo André dos Santos Lopes
f356be68c2 ini intl.explicit_cleanup -> INTL_EXPLICIT_CLEANUP
Added an environment variable and removed the ini setting
intl.explicit_cleanup for calling u_cleanup()
2012-07-24 15:13:02 +02:00
Gustavo Lopes
ae3a827bf9 Leak caused by wrong and unreachable cleanup 2012-07-23 17:00:52 +02:00
Gustavo Lopes
01004c6abb Fixed leak in RuleBasedBreakIterator constructor
The leak occurred in case of error.
2012-07-23 16:51:28 +02:00
Gustavo Lopes
d8d5f9a9f5 Fixed function name 2012-07-23 16:46:28 +02:00
Gustavo Lopes
c052b9c99a Do not fetch default locale once on minit or rinit
The default locale is now requested to ICU when it's needed by using
intl_get_default_locale().
2012-07-23 16:38:27 +02:00
Gustavo Lopes
0dfcc3e798 Add ini setting intl.explicit_cleanup
This is to help with looking for leaks. If set to true, this ini
setting forces a call to u_cleanup() on module shutdown.
2012-07-23 16:36:24 +02:00
Gustavo André dos Santos Lopes
f3f824823d Duplicate test for ICU 49
The output in ICU < 49 actually seems wrong here; ICU 49 seems to
fix the data.
2012-07-23 02:08:12 +02:00
Gustavo André dos Santos Lopes
99e48d3a57 Merge branch 'datefmt_tz_cal_interop'
* datefmt_tz_cal_interop:
  Readded accidentally removed line
  Added IntlDateFormatter::formatObject(). Refactor
  Refactored internal_get_timestamp()
  Unified zval -> UDate conversions
2012-07-22 04:22:48 +02:00
Gustavo André dos Santos Lopes
2498c90c71 Readded accidentally removed line 2012-07-22 04:22:23 +02:00
Gustavo André dos Santos Lopes
2f0775b999 Added IntlDateFormatter::formatObject(). Refactor
To better support IntlCalendar, added this function:

string IntlDateFormatter::formatObject(IntlCalendar|DateTime $obj [,
	array|int|string $format = null [, string $locale = null).

$format is either of the constants IntlDateFormatter::FULL, etc., in
which case this format applies to both the date and the time, an array
in the form array($dateFormat, $timeFormat), or a string with the
SimpleDateFormat pattern.

This uses both the Calendar type and the timezone of the passed object
to configure the formatter (a GregorianCalendar is forced for
DateTime).

Some stuff was moved around and slighlt modified to allow for more code
reuse.
2012-07-22 04:22:23 +02:00
Felipe Pena
f94051ea11 - Fix conflict 2012-07-14 12:23:24 -03:00
Felipe Pena
0bff7cfadd - Fixed bug #62565 (Crashes due non-initialized internal properties_table) 2012-07-14 12:16:16 -03:00
Felipe Pena
44cdcb7fdb Merge branch 'PHP-5.4'
* PHP-5.4:
  - Fixed bug #62564 (Extending MessageFormatter and adding property causes crash)
2012-07-14 11:37:20 -03:00
Felipe Pena
8b093dee21 - Fixed bug #62564 (Extending MessageFormatter and adding property causes crash) 2012-07-14 11:37:08 -03:00
Gustavo André dos Santos Lopes
46629e35ff Refactored internal_get_timestamp()
Added bounds checking for 32-bit ints.

Do not fetch array elements that ::parse() generates but that
::format() does not actually care about.y
2012-07-02 00:26:38 +02:00
Gustavo André dos Santos Lopes
2416719fb1 Unified zval -> UDate conversions
Now IntlDateFormatter::format() also accepts IntlCalendar objects.
Code is shared in MessageFormatter and IntlDateFormatter.
2012-07-02 00:24:54 +02:00
Stanislav Malyshev
a3322f8927 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed the common misspelling of the word occurred (occured -> occurred)
2012-06-30 17:00:25 -07:00
Marc Easen
896ac689c9 Fixed the common misspelling of the word occurred (occured -> occurred) 2012-06-30 16:54:03 -07:00
Felipe Pena
8d264dba93 - Fixed build 2012-06-27 09:01:02 -03:00
Gustavo André dos Santos Lopes
75964450ed Merge branch 'break_iterator'
* break_iterator:
  Fix typo in error message
  BreakIterator: fix compat with old ICU versions
  Fix build error one ext/intl
  BreakIterator::getPartsIterator: new optional arg
  Added IntlCodePointBreakIterator.
  Add Intl prefix to BreakIterator/RuleBasedBI
  Remove trailing space
  Replaced zend_parse_method_params with plain zpp
  BreakIter: Removed getAvailableLocales/getHashCode
  Change in BreakIterator::getPartsIterator()
  BreakIterator: add rules status constants
  Tests for (RuleBased)BreakIterator.
  BreakIterator and RuleBasedBreakiterator added
2012-06-25 12:11:49 +02:00
Gustavo André dos Santos Lopes
0df73a85e1 Fix typo in error message 2012-06-25 12:06:31 +02:00
Gustavo André dos Santos Lopes
d8b067e66f BreakIterator: fix compat with old ICU versions 2012-06-25 12:05:13 +02:00
Gustavo André dos Santos Lopes
5a9dca458a Fix build error one ext/intl 2012-06-25 11:53:20 +02:00
Gustavo André dos Santos Lopes
715e59ad82 Duplicate test for ICU 49
The output in ICU < 49 actually seems wrong here; ICU 49 seems to
fix the data.
2012-06-25 11:13:23 +02:00
Gustavo André dos Santos Lopes
9c5074a484 Fix undeclared intl_locale_get_default()
This was causing segfaults at least in the resourcebundle
constructor.

Also moved intl_locale_get_default() to a more central location
and fixed a constness warning in resourcebundle_ctor().
2012-06-25 10:59:58 +02:00
Gustavo André dos Santos Lopes
77daa3482d BreakIterator::getPartsIterator: new optional arg
Can take one of:
* IntlPartsIterator::KEY_SEQUENTIAL (keys are 0, 1, ...)
* IntlPartsIterator::KEY_LEFT (keys are left boundaries)
* IntlPartsIterator::KEY_LEFT (keys are right boundaries)

The default is IntlPartsIterator::KEY_SEQUENTIAL (the previous behavior).
2012-06-22 18:52:06 +02:00
Gustavo André dos Santos Lopes
0a7ae87e91 Added IntlCodePointBreakIterator.
Objects of this class can be instantiated with

IntlBreakIterator::createCodePointInstance()

The method does not take a locale, as it would not make sense in this
context.

This class has one additional method:

long IntlCodePointIterator::getLastCodePoint()

which returns either -1 or the last code point we moved over, if any
(and discounting any movement before the last call to
IntlBreakIterator::first() or IntlBreakIterator::last()).
2012-06-22 18:19:54 +02:00
Gustavo André dos Santos Lopes
cee31091a9 Add Intl prefix to BreakIterator/RuleBasedBI 2012-06-10 22:42:38 +02:00
Gustavo André dos Santos Lopes
87dd0269ba Remove trailing space 2012-06-10 13:26:28 +02:00
Gustavo André dos Santos Lopes
a4925fae9b Replaced zend_parse_method_params with plain zpp 2012-06-10 00:23:09 +02:00
Gustavo André dos Santos Lopes
afed66bb9e BreakIter: Removed getAvailableLocales/getHashCode 2012-06-10 00:05:00 +02:00
Gustavo André dos Santos Lopes
4ec75539db Change in BreakIterator::getPartsIterator()
BreakIterator::getPartsIterator() now returns an IntlIterator subclass
with a special method, getBreakIterator(), that returns the
associated BreakIterator.

Any call to getRuleStatus() is forwarded to the BreakIterator.
2012-06-10 00:04:53 +02:00
Xinchen Hui
07d0eab204 Merge branch 'PHP-5.4'
By Gustavo André dos Santos Lopes (4) and others
via Felipe Pena (2) and Xinchen Hui (2)
* PHP-5.4:
  Remove unused codes
  based on microsoft's description,the direct convert from FILETIME struct to __int64 is unsafe.
  merge 5.3 entries
  restore NEWS
  Fix ext/intl build on ICU < 4.8
  Optimization in ext/intl/msgformat
  Fixed tests in ext/intl
  Changed XFAILed collator_get_sort_key.phpt
2012-06-07 14:42:35 +08:00
Xinchen Hui
83542dcf3b Merge branch 'PHP-5.3' into PHP-5.4
By Gustavo André dos Santos Lopes (4) and others
via Felipe Pena (1) and Xinchen Hui (1)
* PHP-5.3:
  Remove unused codes
  based on microsoft's description,the direct convert from FILETIME struct to __int64 is unsafe.
  Fix ext/intl build on ICU < 4.8
  Optimization in ext/intl/msgformat
  Fixed tests in ext/intl
  Changed XFAILed collator_get_sort_key.phpt
2012-06-07 14:32:47 +08:00
Gustavo André dos Santos Lopes
c1ac325228 Fix ext/intl build on ICU < 4.8 2012-06-06 12:10:00 +02:00
Gustavo André dos Santos Lopes
52d541a314 Optimization in ext/intl/msgformat
Don't transform the string to make it apostrophe friendly in ICU 4.8+
as that it is now the default.
2012-06-06 11:36:00 +02:00
Gustavo André dos Santos Lopes
45b3fa4dee Fixed tests in ext/intl
21 is not a valid value for UNUM_PADDING_POSITION. Changed the test to
use 2 instead.

Remove ICU 4.2- test. No one cares.
2012-06-05 16:47:00 +02:00
Gustavo André dos Santos Lopes
c6593a0e9b BreakIterator: add rules status constants 2012-06-04 23:09:10 +02:00