Skip to content

Conversation

oleibman
Copy link
Contributor

@oleibman oleibman commented Feb 6, 2024

All my unimplemented changes. Not intended for install.

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Fixes # (issue)

Checklist:

  • I have run composer run-script check --timeout=0 and no errors were reported
  • The new code is covered by unit tests (check build/coverage for coverage report)
  • I have updated the documentation to describe the changes

All my unimplemented changes. Not intended for install.
@oleibman oleibman marked this pull request as draft February 6, 2024 23:25
@coveralls
Copy link

coveralls commented Feb 6, 2024

Coverage Status

coverage: 98.459% (+1.7%) from 96.757%
when pulling ca6d2f0 on oleibman:wordunimplemented2
into 0ab0b49 on PHPOffice:master.

Better from a technical standpoint.

Pre-processing much simplified.

Some post-processing added because loadHTML preserveWhiteSpace=false does not work well.

Not-UTF8 html can now be loaded.

No need to surround snippets with body tag.
It's debatable, but allow unescaped ampersand and unknown charset.
Because we still have to support Php 7.1 :-(

The reason Php 7.1 has succeeded in its unit tests till now is because symfony/polyfill-php72 is added during its Composer install step. This undocumented dependency should not be relied on.
It will only be loaded for Php7.1 which we still support.
Should be my last change here for a while.
Corresponding to Php7.* and Php8.0. Did not seem to recognize runInSeparateProcess for test method.
Not sure why this should be needed for Phpunit 9 but not 10. No harm specifying it in 10.
Writer/Html/FontTest was already bad, testing for the wrong default font values because a prior test had overlaid those; a full unit test would succeed, but just testing the Writer/Html directory would not. Better test planning eliminates that possibility, without the need to resort to resource-intensive separate processes.
PhpWordTest tries to save as if it were a browser even though that is not the case. This causes a problem for Phpunit 9 (Php 7.* or 8.0) if not run in separate process. So let it run separate. No harm for Php8.1+, except for a slight performance penalty.
Removed from Element and Reader tests. Style and Writer remain for now.
All call getRemoteGifImageUrl. Try setting those methods to separate process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants