Open lordofweb opened 4 months ago
This pull request addresses the issue of using a global variable for the Brevo PHP package version, which can cause conflicts and is deprecated in recent PHP versions.
$GLOBALS['version'] = '2.0.0';
VERSION
constant to the Configuration
classclass Configuration
{
/**
* Version of the package
*/
const VERSION = "2.0.0";
// ...
public function __construct()
{
$this->tempFolderPath = sys_get_temp_dir();
$this->userAgent = 'brevo_clientAPI/v' . self::VERSION . '/php';
}
}
Related issue: https://github.com/getbrevo/brevo-php/issues/31
Please review this change and let me know if any further modifications are needed.
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Rename global 'version' variable to 'version-brevo'
This pull request addresses a potential naming conflict by renaming the global 'version' variable to 'version-brevo' in the Brevo PHP package.
Changes:
This change aims to prevent conflicts with other packages or user code that might use a similar global variable name.
Related issue: https://github.com/getbrevo/brevo-php/issues/31