diff --git a/www/nginx/Makefile b/www/nginx/Makefile index fb7fab07a..df5c3e49e 100644 --- a/www/nginx/Makefile +++ b/www/nginx/Makefile @@ -1,5 +1,5 @@ PLUGIN_NAME= nginx -PLUGIN_VERSION= 1.22 +PLUGIN_VERSION= 1.23 PLUGIN_COMMENT= Nginx HTTP server and reverse proxy PLUGIN_DEPENDS= nginx PLUGIN_MAINTAINER= franz.fabian.94@gmail.com diff --git a/www/nginx/pkg-descr b/www/nginx/pkg-descr index 47c9a2a02..729721ed5 100644 --- a/www/nginx/pkg-descr +++ b/www/nginx/pkg-descr @@ -10,6 +10,10 @@ WWW: https://nginx.org/ Plugin Changelog ================ +1.23 + +* Migration for PHP Phalcon 4 (non breaking change for UI/API) + 1.22 * Add X-Forwarded-Port and X-Forwarded-Host headers (contributed by Carlos Cesario) diff --git a/www/nginx/src/opnsense/mvc/app/controllers/OPNsense/Nginx/Api/SettingsController.php b/www/nginx/src/opnsense/mvc/app/controllers/OPNsense/Nginx/Api/SettingsController.php index ccb2cb6d9..443946ffc 100644 --- a/www/nginx/src/opnsense/mvc/app/controllers/OPNsense/Nginx/Api/SettingsController.php +++ b/www/nginx/src/opnsense/mvc/app/controllers/OPNsense/Nginx/Api/SettingsController.php @@ -615,7 +615,6 @@ class SettingsController extends ApiMutableModelControllerBase /** * @param null $uuid the uuid which should get cleared before * @throws \ReflectionException if the model was not found - * @throws \Phalcon\Validation\Exception on validation errors */ private function regenerate_hostname_map($uuid = null) { @@ -644,7 +643,6 @@ class SettingsController extends ApiMutableModelControllerBase /** * @param null $uuid the uuid which should get cleared before * @throws \ReflectionException if the model was not found - * @throws \Phalcon\Validation\Exception on validation errors */ private function regenerate_ipacl($uuid = null) { @@ -673,7 +671,6 @@ class SettingsController extends ApiMutableModelControllerBase /** * @param $uuids array list of UUIDs * @param $path string the model prefix from the element to delete - * @throws \Phalcon\Validation\Exception */ private function delete_uuids($uuids, $path): void { diff --git a/www/nginx/src/opnsense/mvc/app/models/OPNsense/Base/Constraints/NaxsiIdentifierConstraint.php b/www/nginx/src/opnsense/mvc/app/models/OPNsense/Base/Constraints/NaxsiIdentifierConstraint.php index 2373aae52..43b4abf1e 100644 --- a/www/nginx/src/opnsense/mvc/app/models/OPNsense/Base/Constraints/NaxsiIdentifierConstraint.php +++ b/www/nginx/src/opnsense/mvc/app/models/OPNsense/Base/Constraints/NaxsiIdentifierConstraint.php @@ -28,7 +28,7 @@ namespace OPNsense\Base\Constraints; -use Phalcon\Validation\Message; +use Phalcon\Messages\Message; /** * a very specific nginx check for Naxsi rule IDs - not reusable @@ -38,7 +38,7 @@ use Phalcon\Validation\Message; */ class NaxsiIdentifierConstraint extends BaseConstraint { - public function validate(\Phalcon\Validation $validator, $attribute) + public function validate(\Phalcon\Validation $validator, $attribute) : bool { $node = $this->getOption('node'); if ($node) { diff --git a/www/nginx/src/opnsense/mvc/app/models/OPNsense/Base/Constraints/NgxBusyBufferConstraint.php b/www/nginx/src/opnsense/mvc/app/models/OPNsense/Base/Constraints/NgxBusyBufferConstraint.php index ba7d7944f..bbf2c5ac8 100644 --- a/www/nginx/src/opnsense/mvc/app/models/OPNsense/Base/Constraints/NgxBusyBufferConstraint.php +++ b/www/nginx/src/opnsense/mvc/app/models/OPNsense/Base/Constraints/NgxBusyBufferConstraint.php @@ -28,7 +28,7 @@ namespace OPNsense\Base\Constraints; -use Phalcon\Validation\Message; +use Phalcon\Messages\Message; /** * a very specific nginx check - not reusable @@ -38,7 +38,7 @@ use Phalcon\Validation\Message; */ class NgxBusyBufferConstraint extends BaseConstraint { - public function validate(\Phalcon\Validation $validator, $attribute) + public function validate(\Phalcon\Validation $validator, $attribute) : bool { $node = $this->getOption('node'); if ($node) { @@ -64,26 +64,22 @@ class NgxBusyBufferConstraint extends BaseConstraint $proxy_buffer_size_int = intval((string) $proxy_buffer_size_node); } - if ( - isset($proxy_buffers_total_minus1_size) && isset($proxy_busy_buffers_size) && + if (isset($proxy_buffers_total_minus1_size) && isset($proxy_busy_buffers_size) && $proxy_buffers_total_minus1_size < $proxy_busy_buffers_size ) { $validator->appendMessage(new Message( gettext("Proxy Buffer Size must be less than the size of all Proxy Buffers minus one buffer."), - $attribute, - $this->getOption('name') + $attribute )); } // nginx: [emerg] "proxy_busy_buffers_size" must be equal to or greater than the maximum of the value of "proxy_buffer_size" and one of the "proxy_buffers" - if ( - isset($proxy_busy_buffers_size) && isset($proxy_buffers_size_int) && + if (isset($proxy_busy_buffers_size) && isset($proxy_buffers_size_int) && $proxy_busy_buffers_size < $proxy_buffers_size_int ) { $validator->appendMessage(new Message( gettext("Proxy Busy Buffers Size must be equal to or greater than the maximum of one of the Proxy Buffers."), - $attribute, - $this->getOption('name') + $attribute )); } @@ -94,8 +90,7 @@ class NgxBusyBufferConstraint extends BaseConstraint ) { $validator->appendMessage(new Message( gettext("Proxy Busy Buffers Size must be equal to or greater than the maximum of the value of Proxy Buffer Size."), - $attribute, - $this->getOption('name') + $attribute )); } }