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

Compatibility Changes for PHP8 and Newer Releases of PhpUnit #35

Closed
wants to merge 2 commits into from
Closed

Conversation

oleibman
Copy link

XMLReader - do not call libxml_disable_entity_loader for PHP8+
XMLWriter - 1. delete temporary files on Windows for PHP7.3+ (there had
been a problem with unlink on Windows before then).
2. Eliminate unneeded writeAttribute (tested against PhpWord
as well as Common without any issues). Current code was
a problem with newer PhpUnit.
DrawingTest - assertIsArray, when available, in lieu of assertInternalType
FileTest - assertIsString, when available, in lieu of assertInternalType
XMLReaderTest - expect exceptions in code, not DocBlock.
XMLWriterTest - 1. PHP8 ignores locale when converting float to string.
This is also a problem for PhpSpreadsheet.
2. Added some tests to improve coverage.

XMLReader - do not call libxml_disable_entity_loader for PHP8+
XMLWriter - 1. delete temporary files on Windows for PHP7.3+ (there had
  been a problem with unlink on Windows before then).
            2. Eliminate unneeded writeAttribute (tested against PhpWord
              as well as Common without any issues). Current code was
              a problem with newer PhpUnit.
DrawingTest - assertIsArray, when available, in lieu of assertInternalType
FileTest - assertIsString, when available, in lieu of assertInternalType
XMLReaderTest - expect exceptions in code, not DocBlock.
XMLWriterTest - 1. PHP8 ignores locale when converting float to string.
                   This is also a problem for PhpSpreadsheet.
                2. Added some tests to improve coverage.
Change new function to camel-case.
@oleibman
Copy link
Author

Travis failures - 5.4/5.5 cannot be loaded, doesn't seem I can do anything about that; same with hvvm.

7.1/7.2/7.3 all need a simple fix for pclzip, but I don't know how to get that changed. I do know what the fix is (remove the non-numeric suffix):
if ($last == 'g') {
//$v_memory_limit = $v_memory_limit102410241024;
$v_memory_limit = substr($v_memory_limit, 0, -1) * 1073741824;
}
if ($last == 'm') {
//$v_memory_limit = $v_memory_limit
1024*1024;
$v_memory_limit = substr($v_memory_limit, 0, -1) * 1048576;
}
if ($last == 'k') {
$v_memory_limit = substr($v_memory_limit, 0, -1) * 1024;
}

@liborm85
Copy link

I'm added compatibility for PHP 8.0 in PR #34, travis fixed for all PHP versions also.

@oleibman
Copy link
Author

Wonderful! Sorry that I didn't notice your change before pushing. Closing my ticket.

@oleibman oleibman closed this Oct 20, 2020
@oleibman oleibman deleted the libxml branch October 20, 2020 14:06
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.

2 participants