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

upgrade to phpunit 8+ #109

Open
simevo opened this issue Feb 19, 2020 · 0 comments
Open

upgrade to phpunit 8+ #109

simevo opened this issue Feb 19, 2020 · 0 comments
Labels
dependencies Pull requests that update a dependency file

Comments

@simevo
Copy link
Collaborator

simevo commented Feb 19, 2020

I tried, it just requires this small fix:

--- a/tests/SpTest.php
+++ b/tests/SpTest.php
@@ -479,7 +479,7 @@ final class SpTest extends PHPUnit\Framework\TestCase
         }
     }
 
-    public static function tearDownAfterClass()
+    public static function tearDownAfterClass() : void
     {
         unlink(self::$settings['sp_key_file']);
         unlink(self::$settings['sp_cert_file']);

but I got many warnings similar to:

 ⚠ Can load from valid x m l
   │
   │ assertAttributeNotEmpty() is deprecated and will be removed in PHPUnit 9.
   │ readAttribute() is deprecated and will be removed in PHPUnit 9.
   │ getObjectAttribute() is deprecated and will be removed in PHPUnit 9.

these are related to: sebastianbergmann/phpunit#3338

rationale:

A test should not depend on private implementation details. It was a bad idea to make a bad testing practice this convenient.

upgrade path suggested by the creator of PHPUnit:

The upgrade path is to refactor your (test) code to not require the assertions in question.

@lussoluca lussoluca added the dependencies Pull requests that update a dependency file label Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants