diff --git a/app/Console/Commands/UpgradeCommand.php b/app/Console/Commands/UpgradeCommand.php index 45c127767..e04d1a50c 100644 --- a/app/Console/Commands/UpgradeCommand.php +++ b/app/Console/Commands/UpgradeCommand.php @@ -51,7 +51,7 @@ class UpgradeCommand extends Command } if (is_null($this->option('user'))) { - $userDetails = posix_getpwuid(fileowner('public')); + $userDetails = function_exists('posix_getpwuid') ? posix_getpwuid(fileowner('public')) : []; $user = $userDetails['name'] ?? 'www-data'; if (!$this->confirm("Your webserver user has been detected as [{$user}]: is this correct?", true)) { @@ -67,7 +67,7 @@ class UpgradeCommand extends Command } if (is_null($this->option('group'))) { - $groupDetails = posix_getgrgid(filegroup('public')); + $groupDetails = function_exists('posix_getgrgid') ? posix_getgrgid(filegroup('public')) : []; $group = $groupDetails['name'] ?? 'www-data'; if (!$this->confirm("Your webserver group has been detected as [{$group}]: is this correct?", true)) { diff --git a/composer.json b/composer.json index 829ec4d72..612d70119 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,6 @@ "ext-mbstring": "*", "ext-pdo": "*", "ext-pdo_mysql": "*", - "ext-posix": "*", "ext-zip": "*", "aws/aws-sdk-php": "~3.288.1", "doctrine/dbal": "~3.6.0", diff --git a/composer.lock b/composer.lock index 30fdecfd0..72bdbf5ff 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d7166d309ca3cb996fe990be81644539", + "content-hash": "413a3ca00228de8de6f6d74ab817b5d6", "packages": [ { "name": "aws/aws-crt-php", @@ -11037,7 +11037,6 @@ "ext-mbstring": "*", "ext-pdo": "*", "ext-pdo_mysql": "*", - "ext-posix": "*", "ext-zip": "*" }, "platform-dev": [],