{"id":1345,"date":"2018-04-23T10:19:52","date_gmt":"2018-04-23T20:19:52","guid":{"rendered":"http:\/\/mymonkeydo.com\/?p=1327"},"modified":"2018-04-23T10:19:52","modified_gmt":"2018-04-23T20:19:52","slug":"phpunit-and-php-7-problems","status":"publish","type":"post","link":"https:\/\/mymonkeydo.com\/phpunit-and-php-7-problems\/","title":{"rendered":"PHPUnit and PHP 7 problems"},"content":{"rendered":"
I’m using PHPUnit 5.5, upgraded my PHP version to 7.2.\u00a0 Two problems actually occur.\u00a0 First there’s this weird error:<\/p>\n
Fatal error: Declaration of SebastianBergmann\\Comparator\\DOMNodeComparator::assertEquals…<\/span><\/p>\n Then figuring PHPUnit needs to be upgraded, I ran<\/p>\n phpunit –self-upgrade<\/p>\n And that failed with the same error.\u00a0 Changing my PHP version back down to 5.6 and running then causes this error:<\/p>\n internal corruption of phar “…phpunit-temp.phar” (truncated entry)<\/span><\/p>\n <\/p>\n Unfortunately PHPUnit 5.5 only supports up to version 7.1 and any old version of PHPUnit that has an “old” certificate needs to be downloaded\/updated manually.<\/p>\n https:\/\/github.com\/sebastianbergmann\/phpunit\/issues\/1688<\/p>\n <\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[2,7],"tags":[],"yoast_head":"\nSolution<\/h2>\n