Skip to content

Commit

Permalink
Merge pull request #681 from lucatume/v4-3.5-fixes
Browse files Browse the repository at this point in the history
v3.5 automated build fixes
  • Loading branch information
lucatume authored Dec 14, 2023
2 parents 4edec26 + ff87df6 commit 3ef32f8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
18 changes: 18 additions & 0 deletions src/Adapters/Symfony/Component/Process/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,22 @@ public function createNewConsole(): void
$options['bypass_shell'] = true;
$optionsReflectionProperty->setValue($this, $options);
}

/**
* @param array<mixed> $arguments
*/
public static function __callStatic(string $name, array $arguments):mixed
{
if ($name === 'fromShellCommandline') {
$command = array_shift($arguments);
$process = new self([], ...$arguments); // @phpstan-ignore-line
$processCommandLineProperty = new \ReflectionProperty(SymfonyProcess::class, 'commandline');
$processCommandLineProperty->setAccessible(true);
$processCommandLineProperty->setValue($process, $command);

return $process;
}

return null;
}
}
6 changes: 0 additions & 6 deletions tests/Issue/BlogArchiveCest.php

This file was deleted.

4 changes: 4 additions & 0 deletions tests/wploadersuite/AjaxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ public function testAjaxCallbackWillFailIfNumberNotOnlyOnceIsInvalid(): void
{
$response = null;
try {
global $wpdb;
$wpdb->suppress_errors = true; // Due to a WooCommerce activation issue in older versions.
$this->_handleAjax('test_ajax_action');
} catch (\WPAjaxDieContinueException) {
$response = json_decode($this->_last_response);
}

$wpdb->suppress_errors = false;

$this->assertNotNull($response);
$this->assertFalse($response->success);
$this->assertEquals('Number not only once is invalid', $response->data);
Expand Down

0 comments on commit 3ef32f8

Please sign in to comment.