Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions amp_conf/htdocs/admin/helpers/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -1577,11 +1577,6 @@ private function _send_with_sendmail()

$status = pclose($fp);

if (version_compare(PHP_VERSION, '4.2.3') == -1)
{
$status = $status >> 8 & 0xFF;
}

if ($status != 0)
{
$this->_set_error_message('email_exit_status', $status);
Expand Down
2 changes: 1 addition & 1 deletion amp_conf/htdocs/admin/libraries/Composer/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
},
"config": {
"platform": {
"php": "8.1.0"
"php": "8.2.29"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing composer may affect other dependent packages to get update as well. May be revert this fix and we can merge other fixes.
We can fix composer and dependent packages in next major release.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kguptasangoma, thank you for taking the time to review this.

While it's true that updating composer.json, especially the dependencies, can cause packages to be upgraded, I still believe this is an issue.

The config.platform.php file is unique because it sets the PHP version to be used rather than having it determined at runtime. From all the docs I have read, I believe the supported version of PHP is 8.2. This will correctly constrain versions of the packages.

I know this is somewhat of an edge case, only affecting developers, but with the composer.lock file stacking the same and all the vendor code being committed into the repository, I believe this to have minimal impact.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this to have minimal impact.

I can understand by seeing code , this looks minimal impact but v17 is quite GA now and without testing we can not push any such changes into production. I still feel changing such 3rd party core library level changes should publish to major Freepbx release.

Keeping this Pr open to consider for Freepbx v18.

Regards,
Kapil

},
"autoloader-suffix": "pbxframework",
"optimize-autoloader": true
Expand Down
4 changes: 2 additions & 2 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<?php
namespace FreePBX\Install;

if (version_compare(PHP_VERSION, '7.4', '<')) {
echo "FreePBX Requires PHP Version 7.4 or Higher, you have: ".PHP_VERSION."\n";
if (version_compare(PHP_VERSION, '8.2', '<')) {
echo "FreePBX Requires PHP Version 8.2 or Higher, you have: ".PHP_VERSION."\n";
return false;
}

Expand Down
4 changes: 2 additions & 2 deletions install.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
if (!defined('FREEPBX_IS_AUTH')) { die('No direct script access allowed'); }

if (version_compare(PHP_VERSION, '7.4', '<')) {
out(sprintf(_("FreePBX Requires PHP Version 7.4 or Higher, you have: %s"),PHP_VERSION));
if (version_compare(PHP_VERSION, '8.2', '<')) {
out(sprintf(_("FreePBX Requires PHP Version 8.2 or Higher, you have: %s"),PHP_VERSION));
return false;
}
if(\FreePBX::Modules()->checkStatus("sysadmin")) {
Expand Down