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

PHP 7.3 Warnings #1822

Closed
PHPGangsta opened this issue Oct 27, 2018 · 7 comments
Closed

PHP 7.3 Warnings #1822

PHPGangsta opened this issue Oct 27, 2018 · 7 comments
Milestone

Comments

@PHPGangsta
Copy link
Contributor

Running the unit tests with PHP 7.3.0 RC4 fails:

$ /tmp/php-7.3.0RC4/sapi/cli/php vendor/phpunit/phpunit/phpunit
PHPUnit 4.8.36 by Sebastian Bergmann and contributors.

EEE.E....

Time: 38 ms, Memory: 8.00MB

There were 4 errors:

1) Dompdf\Tests\AutoloaderTest::testAutoload
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

/tmp/dompdf/src/Dompdf.php:610
/tmp/dompdf/src/Autoloader.php:38
/tmp/dompdf/src/Autoloader.php:38
/tmp/dompdf/tests/Dompdf/Tests/AutoloaderTest.php:17

2) Dompdf\Tests\DompdfTest::testConstructor
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

/tmp/dompdf/lib/Cpdf.php:467
/tmp/dompdf/src/Adapter/CPDF.php:198
/tmp/dompdf/src/CanvasFactory.php:57
/tmp/dompdf/src/Dompdf.php:294
/tmp/dompdf/tests/Dompdf/Tests/DompdfTest.php:15

3) Dompdf\Tests\DompdfTest::testSetters
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

/tmp/dompdf/src/Css/Stylesheet.php:1364
/tmp/dompdf/src/Dompdf.php:296
/tmp/dompdf/tests/Dompdf/Tests/DompdfTest.php:31

4) Dompdf\Tests\DompdfTest::testRender
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

/tmp/dompdf/src/Renderer/Text.php:141
/tmp/dompdf/src/Renderer.php:263
/tmp/dompdf/src/Renderer.php:106
/tmp/dompdf/src/Renderer.php:194
/tmp/dompdf/src/Renderer.php:194
/tmp/dompdf/src/FrameReflower/Page.php:148
/tmp/dompdf/src/FrameDecorator/AbstractFrameDecorator.php:894
/tmp/dompdf/src/Dompdf.php:848
/tmp/dompdf/tests/Dompdf/Tests/DompdfTest.php:65

FAILURES!
Tests: 9, Assertions: 56, Errors: 4.

While using DomPDF, I found a few more Warnings in other places:

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /tmp/dompdf/src/Dompdf.php on line 631

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /tmp/dompdf/lib/Cpdf.php on line 474

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /tmp/dompdf/lib/Cpdf.php on line 481

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /tmp/dompdf/lib/Cpdf.php on line 488

I guess there are some more problems like these, which are not covered by unit tests yet.

PHP 7.3 will be released in 6 weeks (December 6, 2018). It improves performance of DomPDF a lot, see #1813 (comment)

Would be nice if DomPDF is compatible from day 1.

@EllanTseyeth
Copy link

EllanTseyeth commented Oct 27, 2018

Hello!

I also have these warnings when running our test plateform using the same PHP version!

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in application/vendor/dompdf/dompdf/src/Dompdf.php on line 610

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in application/vendor/dompdf/dompdf/src/Dompdf.php on line 631

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in application/vendor/dompdf/dompdf/lib/Cpdf.php on line 467

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in application/vendor/dompdf/dompdf/lib/Cpdf.php on line 474

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in application/vendor/dompdf/dompdf/lib/Cpdf.php on line 481

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in application/vendor/dompdf/dompdf/lib/Cpdf.php on line 488

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in application/vendor/dompdf/dompdf/src/Css/Stylesheet.php on line 1360

PHPGangsta added a commit to PHPGangsta/dompdf that referenced this issue Oct 28, 2018
@bsweeney bsweeney added this to the 0.8.3 milestone Nov 12, 2018
@Spreeuw
Copy link
Contributor

Spreeuw commented Dec 10, 2018

@bsweeney is there a target/tentative release date set for 0.8.3?

@neoteknic
Copy link
Contributor

Same problem on PHP7.3, update asap. PHP 7.3 is released in final version.

@bsweeney
Copy link
Member

@javierpr0 if you've found additional issues with Dompdf please submit a pull request or provide a diff of your changes. It looks like you are working off of version 0.8.2. 0.8.3 has been released with additional fixes for this issue.

@gadget00
Copy link

because of this error now I cannot either remove or update my dompdf installation. What can I do?

@petidesoftwares
Copy link

i am using version 0.8.2 yet still having same error report. previously it was not but i update me server and the error start popping up

@bsweeney
Copy link
Member

bsweeney commented Feb 5, 2020

@petidesoftwares please update to the latest version of Dompdf (0.8.4) to address any errors/warning related to PHP 7.3 or 7.4.

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

No branches or pull requests

7 participants