Skip to content

deprecation warnings with php 8.5 #24

@julianschelker

Description

@julianschelker

I've got these deprecation warnings. Probably since we upgraded our project recently to php 8.5.

Deprecated: Non-canonical cast (double) is deprecated, use the (float) cast instead in vendor/lupecode/php-trader-native/source/TALib/Core/StatisticFunctions.php on line 142
15:38:14  NOTICE E_DEPRECATED: Non-canonical cast (double) is deprecated, use the (float) cast instead
PHP Deprecated:  Non-canonical cast (double) is deprecated, use the (float) cast instead in vendor/lupecode/php-trader-native/source/TALib/Core/StatisticFunctions.php on line 291

Is there anyone maintaining this library or someone who could merge a PR if I have a closer look at that code?

Just saw we already have a patch in our project to fix a secondary warning of the library to fix nullable parameter warnings:

--- ./source/TALib/Classes/CandleSetting.php
+++ ./source/TALib/Classes/CandleSetting.php
@@ -59,2 +59,2 @@
-    public function __construct(int $settingType, int $rangeType = null, int $avgPeriod = null, float $factor = null)
+    public function __construct(int $settingType, ?int $rangeType = null, ?int $avgPeriod = null, ?float $factor = null)
     {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions