Remove hard requirement on posix

This commit is contained in:
Lance Pioch 2024-04-11 20:18:57 -04:00
parent f3085afcbc
commit ef1bd0098b
3 changed files with 3 additions and 5 deletions

View File

@ -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 <fg=blue>[{$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 <fg=blue>[{$group}]:</> is this correct?", true)) {

View File

@ -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",

3
composer.lock generated
View File

@ -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": [],