Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix undefined class Process in ExampleTest.php #83

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

LunashaGit
Copy link
Contributor

Process was undefined because it was not imported.

    try {
        retry(12, function () {
            // Wait until port 8100 is open
            dump('Waiting for port 8100 to open...');
            $fp = @fsockopen('localhost', 8100, $errno, $errstr, 1);
            if ($fp === false) {
                throw new Exception('Port 8100 is not open yet');
            }
        }, 5000);
    } catch (Exception $e) {
        Process::run('pkill -9 -P '.$process->id()); //Undefined
        throw $e;
    }
    Process::run('pkill -9 -P '.$process->id()); //Undefined

But used here :

    $process = \Illuminate\Support\Facades\Process::path(base_path())

Copy link
Member

@simonhamp simonhamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@simonhamp simonhamp merged commit cd6c940 into NativePHP:main Apr 2, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants