-
Notifications
You must be signed in to change notification settings - Fork 13
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
Support stream_select() #8
Conversation
This doesn't work :( |
I need to write tests and find something that does. |
Interesting, what was your idea and approach on using |
I read the comments at https://www.drupal.org/project/drupal/issues/3026560 but failed to see how Phar archives might be involved in |
Is this one still required? If yes, what would the scenario look like that shall be solved? Thx in advance for feedback! |
Drupal users using drush have definitely experienced the error thrown by this method so we do have a way of causing it. However somewhat annyoingly I've never managed to reproduce it. Drush (Drupal's shell tool) has functionality to connect to remote servers and run commands there. I suspect that this is occurring when it is being used to do that but I've not managed to prove that. |
Just for the record:
|
Thus, having something in source code does not feel correct in general (most probably that's triggered by Drush, caches, whatever)
The following replacement for
|
In https://www.drupal.org/project/drupal/issues/3026560#comment-12931921 I found pointers to So... I still cannot reproduce this locally... |
@ohader this resolved a lot of problems for me with DRD Agent module on PHP 5.6. Mostly this error caused on sites that run on PHP 5.6 and before you say: there is currently no way to switch from that version for us in those specific cases. Most of our sites run on PHP 7.1 but there are older sites that we need to support but we don't have resource for upgrade them in terms of PHP (abandoned contrib modules causes this moslty). Please run your tests against PHP 5.6 and since Drupal 8.x still support this PHP version please provide some solution for this specific exception. Something, like checking phpversion() and returning with STDIN, would work. |
@hron84 I was playing around with different old PHP 5.6 versions ( https://www.drupal.org/project/drd_agent/issues/3039384 mentions
In case removing the whole Side note on
|
I could be fine with it. I did not figured out what conditions trigger Drupal / DRD to use stream_cast but almost all our PHP 5.6 sites were affected in this issue. I had to manually hack them regardless if they're on Drupal 6, Drupal 7 or Drupal 8. If you say removing the method can help - I will absolute love this solution. As I said, I am not a PHP developer rather a sysadmin, from my aspect if the error will not came back then I can collect my profit. |
Alright & thx for your feedback. I'm going to raise my question later in the DRD issue tracker as well... |
Closed since it could not be directly reproduced with various PHP 5.6 Docker containers... |
Don't error on stream_select() - we can return the original resource.