lstrojny/php-cld — Issue #5: PHP 5.4 only?
Author: diegomontoya
Created: 2011-11-22 07:06:43+00:00
State: open

Is the CLD extension only for php 5.4+?

Tested this with latest stable 5.3.8 on Scientific Linux 6.1 (RHEL6/CENTOS6) and got the following.

=====================================================================
PHP_SAPI : cli
PHP_VERSION : 5.3.8
ZEND_VERSION: 2.3.0
PHP_OS : Linux - Linux toast.com 2.6.32-131.17.1.el6.x86_64 #1 SMP Wed Oct 5 17:19:54 CDT 2011 x86_64
INI actual : /root/php-cld/tmp-php.ini
More .INIs :
CWD : /root/php-cld
Extra dirs :
VALGRIND : Not used
=====================================================================
TIME START 2011-11-22 07:02:37
=====================================================================
PASS CLD\Language and CLD\Encoding [tests/cld-classes.phpt]
FAIL CLD\detect() basic behavior [tests/cld-detect_basic.phpt]
PASS CLD\detect() error behavior [tests/cld-detect_error.phpt]
FAIL CLD\detect() basic behavior [tests/cld-detect_variant1.phpt]
FAIL array CLD\Detector::detectLanguage(string text, bool isPlainText = true) [tests/cld-detector-detectLanguage.phpt]
PASS void CLD\Detector::setEncodingHint(int encodingHint) / int CLD\Detector::getEncodingHint() [tests/cld-detector-encodingHint.phpt]
PASS void CLD\Detector::setIncludeExtendedLanguages(bool true) / bool CLD\Detector::getIncludeExtendedLanguages() [tests/cld-detector-includeExtendedLanguages.phpt]
PASS void CLD\Detector::setLanguageHint(string language) / string CLD\Detector::getLanguageHint() [tests/cld-detector-languageHint.phpt]
PASS Test subclasses CLD\Detector [tests/cld-detector-subclass.phpt]
PASS void CLD\Detector::setTopLevelDomainHint(string tld) / string CLD\Detector::getTopLevelDomainHint() [tests/cld-detector-topLevelDomainHint.phpt]
PASS Test correct library invokation [tests/cld-invokation.phpt]
PASS ReflectionExtension::getName() for CLD\detect() [tests/cld-reflection-01.phpt]
XFAIL ReflectionExtension::getFunctions() for CLD\detect() [tests/cld-reflection-02.phpt] XFAIL REASON: Namespaced functions cause ReflectionExtension to fail in PHP 5.3

PASS ReflectionFunction for CLD\detect() [tests/cld-reflection-03.phpt]
PASS ReflectionClass for CLD\Language and CLD\Encoding [tests/cld-reflection-04.phpt]
PASS Reflection for CLD\Detector [tests/cld-reflection-05.phpt]
PASS Exception reflection [tests/cld-reflection-06.phpt]
=====================================================================
TIME END 2011-11-22 07:02:37

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 0
Exts tested : 36
---------------------------------------------------------------------

Number of tests : 17 17
Tests skipped : 0 ( 0.0%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 3 ( 17.6%) ( 17.6%)
Expected fail : 1 ( 5.9%) ( 5.9%)
Tests passed : 13 ( 76.5%) ( 76.5%)
---------------------------------------------------------------------
Time taken : 0 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
CLD\detect() basic behavior [tests/cld-detect_basic.phpt]
CLD\detect() basic behavior [tests/cld-detect_variant1.phpt]
array CLD\Detector::detectLanguage(string text, bool isPlainText = true) [tests/cld-detector-detectLanguage.phpt]
=====================================================================

=====================================================================
EXPECTED FAILED TEST SUMMARY
---------------------------------------------------------------------
ReflectionExtension::getFunctions() for CLD\detect() [tests/cld-reflection-02.phpt] XFAIL REASON: Namespaced functions cause ReflectionExtension to fail in PHP 5.3

=====================================================================