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

Added check to see if STDOUT is defined #57

Closed
wants to merge 1 commit into from
Closed

Added check to see if STDOUT is defined #57

wants to merge 1 commit into from

Conversation

bkuhl
Copy link

@bkuhl bkuhl commented Jul 12, 2014

@bkuhl
Copy link
Author

bkuhl commented Jul 12, 2014

I have a Laravel package that utilizes this library. When Laravel commands are executed via Artisan::call() (which could be done anywhere, anytime) STDOUT may not defined as the command may not be initialized via CLI.

@danielbachhuber
Copy link
Member

may not defined as the command may not be initialized via CLI.

Just so I'm clear... why is PHP CLI Tools being used in a non-CLI context? Seems like there might be a disconnect?

@bkuhl
Copy link
Author

bkuhl commented Jul 14, 2014

A very valid question. I was injecting it into the constructor as a dependency. Though it would probably resolve the issue if I took it out of the constructor and used Laravel's App::make() within the particular method that uses it.

@danielbachhuber
Copy link
Member

I'd suggest that's a bug in your application logic, not this library.

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