Problem/Motivation

Deprecation notices such as the following:

Deprecated function: Creation of dynamic property hostingService_remote_import_hostmaster::$remote_user is deprecated in hostingService_remote_import_hostmaster->load() (line 41 of profiles/hostmaster/modules/aegir/hosting_remote_import/hosting_remote_import.service.inc).

Deprecated function: Creation of dynamic property hostingService_http_apache::$port is deprecated in hostingService->setValues() (line 71 of profiles/hostmaster/modules/aegir/hosting/server/hosting_server.service.inc).

Steps to reproduce

Check the logs after browsing your Aegir site on PHP 8.2.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork hosting-3399263

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jacob.embree created an issue. See original summary.

steven jones’s picture

Status: Needs review » Needs work

Thanks for the bug report, and the patch. Here's some feedback:

  1. +++ b/db_server/hosting_db_server.service.inc
    @@ -18,6 +18,8 @@ class hostingService_db_mysql extends hostingService_db {
    +  public $db_user;
    +  public $db_passwd;
    

    I wonder if it's worth defaulting these to empty strings, rather than NULLs?

  2. +++ b/server/hosting_server.service.inc
    @@ -24,7 +24,9 @@ class hostingService {
    +  public $restart_cmd;
    

    I think this could/should be protected rather than public.

  3. +++ b/server/hosting_server.service.inc
    @@ -24,7 +24,9 @@ class hostingService {
    +  public $port;
    

    I think this could/should be protected rather than public.

Mohd Sahzad made their first commit to this issue’s fork.

mohd sahzad’s picture

Status: Needs work » Needs review
socialnicheguru’s picture

Status: Needs review » Needs work

The protected value in MR does not work:

mysite.com/node/25074/goto_site|https://mysite.com|1||Deprecated function: Creation of dynamic property hostingService_http_https_nginx::$https_enabled is deprecated in hostingService_https->load() (line 12 of /aegir/hosting_https/hosting_https.service.inc).

Mar 26 08:37:33 dev dev.cciplatform.com: mysite.com/node/25074/goto_site|https://mysite.com/hosting/c/mysite.com|1||Error: Cannot access protected property hostingService_http_https_nginx::$port in _hosting_site_url() (line 249 of /aegir/profiles/hostmaster/modules/aegir/hosting/site/hosting_site.module).

i am on ubuntu22.04lts php 8.2 and drupal 7.100

socialnicheguru’s picture

Status: Needs work » Needs review
StatusFileSize
new1.81 KB

Updated by adding getPort method which deals with the error I received:

Error: Cannot access protected property hostingService_http_https_nginx::$port

socialnicheguru’s picture

StatusFileSize
new1.94 KB

added $https_enabled

socialnicheguru’s picture

StatusFileSize
new1.96 KB