cyjoelchen / php-sweph

PHP Extension for Swiss Ephemeris
Other
63 stars 29 forks source link

PHP 8.1 deprecation warnings break tests #85

Closed nosilentesdblog closed 2 years ago

nosilentesdblog commented 2 years ago

Describe the bug The PHP 8.1 depcrecation warnings of Passing null to non-nullable internal function parameter is breaking the two tests swe_get_library_path and swe_set_ephe_path. The reason for this is that the deprecation warnings are treated as strings when calling the functions and thus are part of the test assertions.

To Reproduce Steps to reproduce the behavior:

  1. Call make test
  2. See error

Expected behavior Passing tests and not treating PHP deprecation warnings as part of input/output in assertions.

Environment:

kevindecapite commented 2 years ago

Thank you for posting this. I should have time to fix this later today. It looks like swe_set_ephe_path() should support null as an input parameter. So the extension will need to be updated accordingly.

https://github.com/cyjoelchen/php-sweph/blob/master/sweph/src/sweph.c#L1373

kevindecapite commented 2 years ago

This issue has been fixed and released here: