cmark icon indicating copy to clipboard operation
cmark copied to clipboard

PHP 8.0 compatibility

Open anthonyryan1 opened this issue 4 years ago • 6 comments

It compiles against PHP 8.0 but it's failing to allow php-fpm to start.

PHP Fatal error:  Class CommonMark\Node must implement interface Traversable as part of either Iterator or IteratorAggregate

Some of the other modules I interact with have used this release as a chance to switch to stub files (compiled with php-src/build/gen_stub.php) to automatically compile the function headers.

Should we follow suit on that? Or keep things as is as much as possible and only implement Traversable support.

anthonyryan1 avatar Jan 28 '21 20:01 anthonyryan1

same error with 8.1. works well with 7.4.

dseguy avatar Jul 31 '22 15:07 dseguy

I just put in a pull request to get the extension working past 8.0. I’ve tested it on 7.4, 8.0 and 8.1, and they all seem to work.

dwo0 avatar Sep 12 '22 03:09 dwo0

after Installing extension=cmark.so PHP doesn't start:

PHP Fatal error: Class CommonMark\Node must implement interface Traversable as part of either Iterator or IteratorAggregate in Unknown on line 0

PHP 8.1.13 (cli) (built: Nov 26 2022 14:07:36) (NTS)

EvgenyLin avatar Dec 05 '22 19:12 EvgenyLin

@krakjoe @remicollet @weltling

Sorry to highlight all of you, but this extension is effectively dead. The currently released version is not compatible with any supported PHP version at this time.

There are open pull requests to fix compatibility. If one of you could take the time to review them, we can get this extension alive again. Otherwise it's dead without someone forking it.

anthonyryan1 avatar Oct 10 '23 14:10 anthonyryan1

The pull request that I submitted passed all tests with 8.0 and 8.1, but some tests failed with 8.2 and the 8.3 release candidate. I was able to fix most of them with some minor adjustments to the expected output, but one test (./Node/Abstract/027.phpt) is still failing, and fixing it is beyond what I’m capable of. If anyone could look at it, I would appreciate it deeply.

dwo0 avatar Oct 14 '23 01:10 dwo0