ext-decimal icon indicating copy to clipboard operation
ext-decimal copied to clipboard

PHP 8 support

Open rybakit opened this issue 5 years ago • 7 comments

I get these errors when trying to build this extension with PHP 8.0.0-dev: https://travis-ci.org/github/tarantool-php/client/jobs/691042435#L661

rybakit avatar May 25 '20 18:05 rybakit

Trying to build with PHP 8.0 fails the same way

/tmp/pear/temp/decimal/php_decimal.h:191:60: error: initializer element is not constant
         {(const char*)(zend_uintptr_t)(required_num_args), ZEND_TYPE_ENCODE_CLASS_CONST(PHP_DECIMAL_FQCN, 0), 0, 0},
                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

andypost avatar Dec 08 '20 03:12 andypost

@andypost You must change it with ZEND_TYPE_INIT_CLASS_CONST. There are a couple of another fixes for the 1.x branch.

And... I am working on PHP8 Support for decimal 1.x. I think I will have completed at next weekend.

zlodes avatar Dec 08 '20 08:12 zlodes

@zlodes thanks for idea, I'm digging a state of extensions and gonna help as I can. Is there any WIP repo?

andypost avatar Dec 08 '20 12:12 andypost

@andypost created draft PR: https://github.com/php-decimal/ext-decimal/pull/53

It works completely... But now only on php8. I need to add some if-s for checking the language version to fix previous versions support.

zlodes avatar Dec 08 '20 12:12 zlodes

@rtheunissen will you be merging @zlodes PR to support 1.x and/or 2.x on PHP8 soon?

ICJR avatar Dec 21 '20 07:12 ICJR

@ICJR This PR has trouble with reflection test. It prints that null is allowed for some methods.

I don't know how to fix it...

zlodes avatar Dec 21 '20 08:12 zlodes

1.x now has support, but I will leave this open until 2.x is also done.

rtheunissen avatar Feb 17 '21 18:02 rtheunissen