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

When running php-openapi command in script, output should not be printed #220

Closed
SOHELAHMED7 opened this issue Jan 10, 2025 · 2 comments
Closed

Comments

@SOHELAHMED7
Copy link
Contributor

I have a PHPUnit test case containing following line:

exec('echo Hiii...', $output, $code);

when I run the test case in CLI, "Hiii..." is not printed in CLI. This is expected.

In the same way if my script (PHPUnit test) has

exec('bin/php-openapi validate tests/data/issue/165/spec.yml', $output, $code);

the output of $ bin/php-openapi should not be printed in CLI but in reality it is printed

@SOHELAHMED7
Copy link
Contributor Author

This issue was observed while fixing #165

@SOHELAHMED7
Copy link
Contributor Author

This is a behaviour of exec(). See "User Contributed Notes" section on that page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant