RubixML / Tensor

A library and extension that provides objects for scientific computing in PHP.
https://rubixml.com
MIT License
223 stars 27 forks source link

Ext compilation errors and warning - PHP 8.1 #35

Closed FxNion closed 9 months ago

FxNion commented 1 year ago

Compiling the powerfull ext using phpize, configure and make throw several warnings, concerning zend ptrs.

Nevertheless the lib seems to works, but throws this warning at each php bootstraps

PHP Deprecated:  Return type of Tensor\Vector::offsetGet($index) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0

PHP Deprecated:  Return type of Tensor\Vector::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0

PHP Deprecated:  Return type of Tensor\Matrix::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in Unknown on line 0

Compiled on a Mac Mini, 10.15.7, all needed libs installed with Brew, php 8.1.10

Regards 🙂

myfluxi commented 1 year ago

See: https://github.com/RubixML/Tensor/pull/36