Skip to content
Merged
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
3 changes: 3 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
includes:
- phar://phpstan.phar/conf/bleedingEdge.neon

parameters:
level: 8
paths:
Expand Down
1 change: 1 addition & 0 deletions src/Console/Command/AbstractCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ private function isInteractiveTerminal(OutputInterface $output): bool
}

// Check if TTY is available
// phpcs:ignore Magento2.Security.InsecureFunction.Found -- shell_exec required for TTY detection
$sttyOutput = shell_exec('stty -g 2>/dev/null');
return !empty($sttyOutput);
}
Expand Down
1 change: 1 addition & 0 deletions src/Console/Command/Hyva/CompatibilityCheckCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ private function isInteractiveTerminal(OutputInterface $output): bool
}

// Additional check: try to detect if running in a proper TTY
// phpcs:ignore Magento2.Security.InsecureFunction.Found -- shell_exec required for TTY detection
$sttyOutput = shell_exec('stty -g 2>/dev/null');
return !empty($sttyOutput);
}
Expand Down
7 changes: 6 additions & 1 deletion src/Console/Command/System/CheckCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ protected function executeCommand(InputInterface $input, OutputInterface $output
*/
private function getNodeVersion(): string
{
// phpcs:ignore Magento2.Security.InsecureFunction.Found -- exec required to check external tool version
exec('node -v 2>/dev/null', $output, $returnCode);
return $returnCode === 0 && !empty($output) ? trim($output[0], 'v') : 'Not installed';
}
Expand Down Expand Up @@ -201,6 +202,7 @@ private function getMysqlVersionViaMagento(): ?string
*/
private function getMysqlVersionViaClient(): ?string
{
// phpcs:ignore Magento2.Security.InsecureFunction.Found -- exec required to check external tool version
exec('mysql --version 2>/dev/null', $output, $returnCode);
if ($returnCode === 0 && !empty($output)) {
$versionString = $output[0];
Expand Down Expand Up @@ -299,6 +301,7 @@ private function getShortOsInfo(): string
*/
private function getComposerVersion(): string
{
// phpcs:ignore Magento2.Security.InsecureFunction.Found -- exec required to check external tool version
exec('composer --version 2>/dev/null', $output, $returnCode);
if ($returnCode !== 0 || empty($output)) {
return 'Not installed';
Expand All @@ -315,6 +318,7 @@ private function getComposerVersion(): string
*/
private function getNpmVersion(): string
{
// phpcs:ignore Magento2.Security.InsecureFunction.Found -- exec required to check external tool version
exec('npm --version 2>/dev/null', $output, $returnCode);
return $returnCode === 0 && !empty($output) ? trim($output[0]) : 'Not installed';
}
Expand All @@ -326,6 +330,7 @@ private function getNpmVersion(): string
*/
private function getGitVersion(): string
{
// phpcs:ignore Magento2.Security.InsecureFunction.Found -- exec required to check external tool version
exec('git --version 2>/dev/null', $output, $returnCode);
if ($returnCode !== 0 || empty($output)) {
return 'Not installed';
Expand Down Expand Up @@ -554,7 +559,7 @@ private function formatSearchEngineVersion(array $info): string

return 'Search Engine Available';
}

/**
* Test Elasticsearch connection and return version info
*
Expand Down
1 change: 1 addition & 0 deletions src/Console/Command/Theme/BuildCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@ private function isInteractiveTerminal(OutputInterface $output): bool

// Additional check: try to detect if running in a proper TTY
// This is a safer alternative to posix_isatty()
// phpcs:ignore Magento2.Security.InsecureFunction.Found -- shell_exec required for TTY detection
$sttyOutput = shell_exec('stty -g 2>/dev/null');
return !empty($sttyOutput);
}
Expand Down
1 change: 1 addition & 0 deletions src/Console/Command/Theme/CleanCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ private function isInteractiveTerminal(OutputInterface $output): bool
}

// Additional check: try to detect if running in a proper TTY
// phpcs:ignore Magento2.Security.InsecureFunction.Found -- shell_exec required for TTY detection
$sttyOutput = shell_exec('stty -g 2>/dev/null');
return !empty($sttyOutput);
}
Expand Down
1 change: 1 addition & 0 deletions src/Service/ThemeBuilder/HyvaThemes/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ public function watch(string $themeCode, string $themePath, SymfonyStyle $io, Ou

chdir($tailwindPath);
$exitCode = 0;
// phpcs:ignore Magento2.Security.InsecureFunction.Found -- passthru required for interactive watch mode
passthru('npm run watch', $exitCode);

// Check if the command failed
Expand Down
1 change: 1 addition & 0 deletions src/Service/ThemeBuilder/MagentoStandard/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ public function watch(string $themeCode, string $themePath, SymfonyStyle $io, Ou
}

$exitCode = 0;
// phpcs:ignore Magento2.Security.InsecureFunction.Found -- passthru required for interactive watch mode
passthru('node_modules/.bin/grunt watch', $exitCode);

// Check if the command failed
Expand Down
1 change: 1 addition & 0 deletions src/Service/ThemeBuilder/TailwindCSS/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ public function watch(string $themeCode, string $themePath, SymfonyStyle $io, Ou

chdir($tailwindPath);
$exitCode = 0;
// phpcs:ignore Magento2.Security.InsecureFunction.Found -- passthru required for interactive watch mode
passthru('npm run watch', $exitCode);

// Check if the command failed
Expand Down
Loading