Even thought I enclose my code in try/catch block I could not handle rising Laravel exception:
In Connection.php line 40:
Tighten\SolanaPhpSdk\Connection::getConfirmedTransaction(): Return value must be of type array, null returned
So after I changed PHPDoc section and signatures for getConfirmedTransaction() and getTransaction() calls it start working properly.
Maybe I encounter very Laravel-specific case, but I still thing it's better to have nullable return-types as it one of the possible return value for mentioned calls.
I was trying to implement some logic in Laravel(Lumen) project to get confirmed transactions, however if
tx
not confirmed yet it may return null value according to documentation: https://docs.solana.com/ru/developing/clients/jsonrpc-api#gettransactionEven thought I enclose my code in try/catch block I could not handle rising Laravel exception:
So after I changed PHPDoc section and signatures for
getConfirmedTransaction()
andgetTransaction()
calls it start working properly.Maybe I encounter very Laravel-specific case, but I still thing it's better to have nullable return-types as it one of the possible return value for mentioned calls.