php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #63790 intl spoofchecking dependencies aren't check/documented
Submitted: 2012-12-17 15:31 UTC Modified: 2017-05-18 00:28 UTC
From: lior dot k at zend dot com Assigned: pollita (profile)
Status: Closed Package: intl (PECL)
PHP Version: 5.4.9 OS:
Private report: No CVE-ID: None
 [2012-12-17 15:31 UTC] lior dot k at zend dot com
Description:
------------
I'm building PHP 5.4.9 with ICU 3.x and while running the PHP tests, I get a failure on class not found.

The spoof checker class (part on intl extension) depends on ICU >= 4.2. This fact isn't mentioned in the documentation (http://il1.php.net/manual/en/class.spoofchecker.php and http://il1.php.net/manual/en/intro.intl.php). Also it isn't checked in the tests (ext/intl/tests/bug62915-2.phpt).

Reference commits:
http://git.php.net/?p=php-src.git;a=commitdiff;h=71f5af6c70e93b35dfcade404166bda6629fb8ce

http://git.php.net/?p=php-src.git;a=commitdiff;h=72c807ad67f07ec391017f90771c2e9beb5dbed7

Test script:
---------------
ext/intl/tests/bug62915-2.phpt

Actual result:
--------------
PHP Fatal error:  Class 'Spoofchecker' not found

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-12-20 16:07 UTC] cataphract@php.net
The spoopchecker was introduced in ICU 4.2. The check against ICU 3.2 is wrong, and it's specially wrong the way it was done before 72c807ad (since it excluded all the releases in the form x.1.z like 49.1).

Some references to 3.2 were fixed, but the spoofchecker headers includes still seem to be checked against 3.2.
 [2012-12-20 16:07 UTC] cataphract@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: cataphract
 [2012-12-20 16:39 UTC] lior dot k at zend dot com
The current code does the check correctly, and works fine.

The problem I've reported is that ICU >= 4.2 isn't documented and that the php 
tests doesn't check the class exists before using the class.
 [2012-12-26 18:34 UTC] cataphract@php.net
Ah. It's actually correct on ext/intl, but wrong on pecl/intl:

http://lxr.php.net/xref/PHP_TRUNK/ext/intl/php_intl.c?r=5ac35770f45e295cab1ed3c166131d11c27655f6#89
http://lxr.php.net/xref/PECL/intl/php_intl.c?r=ac0e48bbc2436eecd1c934fe0df897d0c0e9f7dc#89

I think I did the cherry picked the commit from ext/intl manually but screwed up in the process.

The rest is a documentation bug.
 [2012-12-26 18:34 UTC] cataphract@php.net
-Status: Assigned +Status: Open -Type: Bug +Type: Documentation Problem -Assigned To: cataphract +Assigned To:
 [2012-12-30 08:27 UTC] lior dot k at zend dot com
Notice bug62915-2.phpt should also be fixed, which isn't a documentation problem.
 [2017-05-18 00:28 UTC] pollita@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: pollita
 [2017-05-18 00:28 UTC] pollita@php.net
Updated the phpt to check for Spoofchecker and it looks like the documentation is good.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Oct 14 04:01:27 2024 UTC