You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that by default the variable $_environment in Configuration.php should be set to "production", not null.
I feel like if someone specifically wants no SSL, then he can use Trolley\Configuration::environment("localhost"); and if you're doing development on the library, then you can use development , but by default SSL should be enabled and the https://api.trolley.com API_SERVER should be used, like set in production 😃
Do you agree ?
Fix proposed
You could set private $_environment = "production"
OR
You could modify the code to allow a null $_environment everywhere in it
Ex: I noticed an issue in the sslOn() function that throws an error when the string is empty because the 1st param of substr() function (Configuration.php line 473 ) cannot be null :
substr(): Passing null to parameter #1 ($string) of type string is deprecated
in vendor\/trolley\/core\/lib\/Trolley\/Configuration.php
OR
(not really a fix but it would have saved me half an hour)
You could document that users have to use Trolley\Configuration::environment("production"); in the readme
Or maybe you have another idea, or there's a reason for that specific setup due to concerns I haven't already met...
Thank you !
The text was updated successfully, but these errors were encountered:
Problem
I think that by default the variable
$_environment
inConfiguration.php
should be set to"production"
, not null.I feel like if someone specifically wants no SSL, then he can use
Trolley\Configuration::environment("localhost");
and if you're doing development on the library, then you can usedevelopment
, but by default SSL should be enabled and the https://api.trolley.com API_SERVER should be used, like set inproduction
😃Do you agree ?
Fix proposed
You could set
private $_environment = "production"
OR
You could modify the code to allow a null
$_environment
everywhere in itEx: I noticed an issue in the
sslOn()
function that throws an error when the string is empty because the 1st param ofsubstr()
function (Configuration.php line 473 ) cannot be null :OR
(not really a fix but it would have saved me half an hour)
You could document that users have to use
Trolley\Configuration::environment("production");
in the readmeOr maybe you have another idea, or there's a reason for that specific setup due to concerns I haven't already met...
Thank you !
The text was updated successfully, but these errors were encountered: