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

Fix issue #272: PHP 8+ warnings, "undefined array key", margins #275

Closed
wants to merge 1 commit into from
Closed

Fix issue #272: PHP 8+ warnings, "undefined array key", margins #275

wants to merge 1 commit into from

Conversation

nerun
Copy link
Contributor

@nerun nerun commented Nov 28, 2023

An alternative fix for issue #272, since PR #274 Fix ODT exporting tables do not pass the tests. Crossing fingers...

I am using this fix since 22 sep 2023 and no issues.

@nerun
Copy link
Contributor Author

nerun commented Nov 28, 2023

Failed in the exactly same tests than #274.

@eduardomozart
Copy link
Contributor

eduardomozart commented Nov 28, 2023

The ending results will be exactly as PR #274 because the margin values will be override to "0cm" since line 709 ( https://github.com/selfthinker/dokuwiki_plugin_wrap/blob/master/helper.php#L709 ) check's if float is null and set the margin values to '0cm'. Let's wait Klap-in (I'll not mark him as he is occupied) review our code changes and he chooses the one that will be commited to the code. Thank you for your code contribution.

@nerun
Copy link
Contributor Author

nerun commented Nov 28, 2023

Thanks for trying friend!

@eduardomozart
Copy link
Contributor

The ODT XML specification requires to specify the unit ('cm', etc.). Try avoid focusing in those auto PHP tests. I believe they are broken, maybe some required file is missing for them.

@Klap-in
Copy link
Collaborator

Klap-in commented Nov 28, 2023

Hi, thanks for the proposals. I have not the time dive in the odt part, so may I ask you both to conclude on this topic what is the best. If following the odt specification is better then #274 is the way, otherwise #275?
If it is tested, I can merge the preferred PR.

If unit tests are incorrect, is it possible to fix them?

@eduardomozart
Copy link
Contributor

Hello @Klap-in,
My PR seems to be less disruptive because it keeps the defaults value (0cm) for margin as expected from ODT XHTML specs, and I already worked on ODT plugin to migrate it to PHP 8, but both commit are good and will have the same results.
About the tests: it seems broken on Master because @splitbrain replaced the legacy PHPUnit tests on the master branch at Sep 18, 2023 (https://github.com/dokuwiki/dokuwiki/commits/master/_test) to use composer (actually, the Wrap plugin still require the file "fetchphpunit" file):

), but I'm not sure how to migrate Wrap tests to use it.

@Klap-in
Copy link
Collaborator

Klap-in commented Nov 28, 2023

I will see if I can add the new test setup with the dev plugin.

@nerun
Copy link
Contributor Author

nerun commented Nov 28, 2023

#275 was tested for one month without issues, but I DO BELIEVE #274 will work the same way. It's up to you.

@nerun nerun closed this by deleting the head repository Dec 5, 2023
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.

3 participants