Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests - adjusted for php 7.3 and portability, component compatibility fixes (php, autoloader), fixed zend-locale issues (currency, math, measure) #4

Merged
merged 38 commits into from
May 20, 2019

Conversation

falkenhawk
Copy link
Member

@falkenhawk falkenhawk commented May 18, 2019

Adjustments and fixes for original test suite to run on php 5.3-7.3.
Additionally includes a lot of fixes to original components, listed below.

  • travis config

  • tests bootstrapping

  • tests - ignore temp files

  • tests compatibility fixes

    • php compatibility fixes
    • composer autoloader and zend loader compatibility fixes
    • adjustments for changed folders structure of framework packages
  • tests adjustments

    • Zend_DebugTest fixes backported from diablomedia/zf1@ba8cf7a#diff-187c3c3644f1fbbe71be9a261283f95a
    • fix restoring initial locale properties and HTTP_ACCEPT_LANGUAGE in Zend_LocaleTest
    • silence 'tempnam(): file created in the system's temporary directory' errors in zend-config writer tests
    • fix property exists assertion in zend-amf test
    • skip 'resources' tests - those i18n resources were failing / unfinished on original repo
    • skip tests using mcrypt (deprecated since php 7.1)
    • Zend_VersionTest fix
    • fix doctype inconsistencies when testing rendered html in Zend_Form_Decorator_ViewHelperTest
    • fixed tests sensitive to line endings in test files (expected CRLF)
    • BC Zend_Amf_RequestTest fix from diablomedia/zf1@ba8cf7a#diff-68d7be0100c43bc2df55377c9d27cd05 (thanks!)
    • tell git do not touch line-endings in zend-http-response test files - tests rely on mixed line-endings in raw responses
  • tests - portability adjustments

    • mainly for windows & winux (wsl)
  • commit test files for Zend_Filter_Compress for deterministic results

  • [zend-cloud] fix lettercase of loaded class Zend_Service_Amazon_Ec2_Availabilityzones

  • [zend-codegenerator] fix output of Zend_CodeGenerator_Php_File

    • restore commented require_once
  • [zend-config] fix regression in reading yaml config

  • [zend-config] xml: restore error handler in case of exception

  • [zend-date] borrowed a few fixes fixes for zend-date tests from diablomedia/zf1-date (thanks!)

  • [zend-feed] php 7.2 compatibility fixes

  • [zend-filter] fix auto-loading compress adapters

  • [zend-gdata] fix constructing GData-Version header

  • [zend-loader] zend-loader and autoloader overhaul

    • ensure full compatibility with composer autoloader
    • lazy instantiate Zend_Loader_Autoloader in Zend_Application (only if necessary)
    • add Zend_Loader_Autoloader::setDisabled() method for turning it off when necessary (to resolve conflicting cases with composer autoloader)
    • fixes regression in Zend_Loader_ClassMapAutoloader
    • fix for portability of Zend_Loader_ClassMapAutoloader::realPharPath (now works on windows as well)
    • Zend_Loader_PluginLoader::useComposerAutoloader() for further sorting conflicting cases
    • autoload cache frontends and backends in Zend_Cache::factory by default
    • do not instantiate autoloader in Zend_Tool_Framework_Client
    • fixed loading zend-translate adapters, validators, encrypt filter adapters
    • fixes remaining loader & class_exists calls
  • [zend-loader] restore ZendX_ namespace in Zend_Loader_Autoloader

    • to be removed again properly later
  • [zend-locale] format+math+phpmath overhaul

  • [zend-locale] iconv_substr php 7.0.11+ compatibility fixes

  • [zend-mail] php 7.2 compatibility fixes

  • [zend-measure] php 7.3 compatibility fixes

  • [zend-oauth] php 7.2 compatibility fixes

  • [zend-openid] do not throw error on failed symlink creation

    • fix incorrect usage of time() function
  • [zend-pdf] php 7.3 compatibility fixes

  • [zend-reflection] php7.3 compatibility fixes

  • [zend-session] do not ini_set options if unitTestEnabled

    • overhaul of session handling in tests - solve conflicting cases
  • [zend-test] php 7.3 compatibility fixes

    • test case fixes
    • portability fixes for loading xml files in tests
  • [zend-timesync] fix microtime() usage

  • [zend-tool] php 7.2 compatibility fixes

  • [zend-validate] idn_to_ascii: use INTL_IDNA_VARIANT_UTS46 contant, if available

    • file size calculation fixed for php 7.x
    • file upload validator compatibilty fix
  • [zend-view] php 7.2 compatibility fix for PartialLoop helper

  • [zend-xmlrpc] fix regression in loading values

falkenhawk added 30 commits May 18, 2019 08:50
- php compatibility fixes
- composer autoloader and zend loader compatibility fixes
- adjustments for changed folders structure of framework packages
- Zend_DebugTest fixes backported from diablomedia/zf1@ba8cf7a#diff-187c3c3644f1fbbe71be9a261283f95a
- fix restoring initial locale properties and HTTP_ACCEPT_LANGUAGE in Zend_LocaleTest
- Zend_VersionTest fix
…ate (thanks!)

- Fixing DateTest on servers with more recent timezone files diablomedia/zf1-date@ef47f4f
- sunrise/sunset calculation differences in php >= 7.2 diablomedia/zf1-date@f69acaf
- ensure full compatibility with composer autoloader
- lazy instantiate Zend_Loader_Autoloader in Zend_Application (only if necessary)
- add Zend_Loader_Autoloader::setDisabled() method for turning it off when necessary (to resolve conflicting cases with composer autoloader)
- fixes regression in Zend_Loader_ClassMapAutoloader
- fix for portability of Zend_Loader_ClassMapAutoloader::realPharPath (now works on windows as well)
- Zend_Loader_PluginLoader::useComposerAutoloader() for further sorting conflicting cases
- autoload cache frontends and backends in Zend_Cache::factory by default
- do not instantiate autoloader in Zend_Tool_Framework_Client
- fixed loading zend-translate adapters, validators, encrypt filter adapters
- fixes remaining loader & class_exists calls
- to be removed again properly later
+ fix incorrect usage of time() function
+ test case fixes
+ portability fixes for loading xml files in tests
… available

+ file size calculation fixed for php 7.x
+ file upload validator compatibilty fix
+ overhaul of session handling in tests - solve conflicting cases
+ restore php 5.3 compatibility
+ regression introduced in 1.12.21 zf1s/zend-xmlrpc@ea5a622
- silence 'tempnam(): file created in the system's temporary directory' errors in zend-config writer tests
- fix property exists assertion in zend-amf test
- skip 'resources' tests - those i18n resources were failing / unfinished on original repo
- skip tests using mcrypt (deprecated since php 7.1)
- mainly for windows & winux (wsl)
- untangled normalization - removed when value is expected in already normalized form
- fix for issues with locales where e.g. thousand separator is a dot (e.g. german), i.a. zendframework/zf1#706
- apart from zend-currency, it will also have a big impact on zend-measure package (fixing calculations)
@falkenhawk falkenhawk changed the title Feature/tests Tests - adjusted for php 7.3 and portability, component compatibility fixes (php, autoloader), fixed zend-locale issues (currency, math, measure) May 18, 2019
@falkenhawk
Copy link
Member Author

falkenhawk commented May 18, 2019

I may need some help now fixing remaining "Failures: 6, Errors: 2"...
edit: most of them were caused by line-ending (tests expected CRLF)

- fixed tests sensitive to line endings in test files (expected CRLF)
- BC Zend_Amf_RequestTest fix from diablomedia/zf1@ba8cf7a#diff-68d7be0100c43bc2df55377c9d27cd05
- tests rely on mixed line-endings in raw responses
@falkenhawk
Copy link
Member Author

falkenhawk commented May 20, 2019

woohoo! green for 5.3-7.3! https://travis-ci.com/zf1s/zf1/builds/112454097
(well php 7.4 segfaults, but who cares ¯\_(ツ)_/¯ )

@falkenhawk falkenhawk merged commit fb5389e into master May 20, 2019
@falkenhawk falkenhawk deleted the feature/tests branch May 20, 2019 15:36
falkenhawk added a commit that referenced this pull request Dec 2, 2022
- substr(): Passing null to parameter #1 ($string) of type string is deprecated
- strtolower(): Passing null to parameter #1 ($string) of type string is deprecated
- strlen(): Passing null to parameter #1 ($string) of type string is deprecated
- trim(): Passing null to parameter #1 ($string) of type string is deprecated
- str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated
- strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated
- http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated
- current(): Calling current() on an object is deprecated
- preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
- preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated
- always construct Zend_Exception with string message, avoid null
- Implicit conversion from float-string "x.xyz" to int loses precision
- PDOStatement::fetch(): Passing null to parameter #2 ($cursorOrientation) of type int is deprecated
- ctype_space(): Argument of type null will be interpreted as string in the future
- file_get_contents(): Passing null to parameter #2 ($use_include_path) of type bool is deprecated
etc.
falkenhawk added a commit that referenced this pull request Dec 3, 2022
- imagefilledpolygon(): Using the $num_points parameter is deprecated
- Implicit conversion from float to int loses precision
- PDOStatement::bindParam(): Passing null to parameter #4 ($maxLength) of type int is deprecated
- preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
- ctype_print(): Argument of type int will be interpreted as string in the future
-  trim(): Passing null to parameter #1 ($string) of type string is deprecated
falkenhawk added a commit that referenced this pull request Dec 3, 2022
- imagefilledpolygon(): Using the $num_points parameter is deprecated
- Implicit conversion from float to int loses precision
- PDOStatement::bindParam(): Passing null to parameter #4 ($maxLength) of type int is deprecated
- preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
- ctype_print(): Argument of type int will be interpreted as string in the future
-  trim(): Passing null to parameter #1 ($string) of type string is deprecated
falkenhawk added a commit that referenced this pull request Dec 3, 2022
- imagefilledpolygon(): Using the $num_points parameter is deprecated
- Implicit conversion from float to int loses precision
- PDOStatement::bindParam(): Passing null to parameter #4 ($maxLength) of type int is deprecated
- preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
- ctype_print(): Argument of type int will be interpreted as string in the future
-  trim(): Passing null to parameter #1 ($string) of type string is deprecated
falkenhawk added a commit that referenced this pull request Dec 3, 2022
- imagefilledpolygon(): Using the $num_points parameter is deprecated
- Implicit conversion from float to int loses precision
- PDOStatement::bindParam(): Passing null to parameter #4 ($maxLength) of type int is deprecated
- preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
- ctype_print(): Argument of type int will be interpreted as string in the future
-  trim(): Passing null to parameter #1 ($string) of type string is deprecated
falkenhawk added a commit that referenced this pull request Dec 4, 2022
- substr(): Passing null to parameter #1 ($string) of type string is deprecated
- strtolower(): Passing null to parameter #1 ($string) of type string is deprecated
- strlen(): Passing null to parameter #1 ($string) of type string is deprecated
- trim(): Passing null to parameter #1 ($string) of type string is deprecated
- str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated
- strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated
- http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated
- current(): Calling current() on an object is deprecated
- preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
- preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated
- always construct Zend_Exception with string message, avoid null
- Implicit conversion from float-string "x.xyz" to int loses precision
- PDOStatement::fetch(): Passing null to parameter #2 ($cursorOrientation) of type int is deprecated
- ctype_space(): Argument of type null will be interpreted as string in the future
- file_get_contents(): Passing null to parameter #2 ($use_include_path) of type bool is deprecated
etc.
falkenhawk added a commit that referenced this pull request Dec 4, 2022
- imagefilledpolygon(): Using the $num_points parameter is deprecated
- Implicit conversion from float to int loses precision
- PDOStatement::bindParam(): Passing null to parameter #4 ($maxLength) of type int is deprecated
- preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
- ctype_print(): Argument of type int will be interpreted as string in the future
-  trim(): Passing null to parameter #1 ($string) of type string is deprecated
falkenhawk added a commit that referenced this pull request Dec 4, 2022
- imagefilledpolygon(): Using the $num_points parameter is deprecated
- Implicit conversion from float to int loses precision
- PDOStatement::bindParam(): Passing null to parameter #4 ($maxLength) of type int is deprecated
- preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
- ctype_print(): Argument of type int will be interpreted as string in the future
-  trim(): Passing null to parameter #1 ($string) of type string is deprecated
falkenhawk added a commit that referenced this pull request Dec 6, 2022
- substr(): Passing null to parameter #1 ($string) of type string is deprecated
- strtolower(): Passing null to parameter #1 ($string) of type string is deprecated
- strlen(): Passing null to parameter #1 ($string) of type string is deprecated
- trim(): Passing null to parameter #1 ($string) of type string is deprecated
- str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated
- strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated
- http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated
- current(): Calling current() on an object is deprecated
- preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
- preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated
- always construct Zend_Exception with string message, avoid null
- Implicit conversion from float-string "x.xyz" to int loses precision
- PDOStatement::fetch(): Passing null to parameter #2 ($cursorOrientation) of type int is deprecated
- ctype_space(): Argument of type null will be interpreted as string in the future
- file_get_contents(): Passing null to parameter #2 ($use_include_path) of type bool is deprecated
- imagefilledpolygon(): Using the $num_points parameter is deprecated
- Implicit conversion from float to int loses precision
- PDOStatement::bindParam(): Passing null to parameter #4 ($maxLength) of type int is deprecated
- preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
- ctype_print(): Argument of type int will be interpreted as string in the future
- trim(): Passing null to parameter #1 ($string) of type string is deprecated
etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant