-
-
Notifications
You must be signed in to change notification settings - Fork 19
Check if the function is declared before declaring it. #23
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
Conversation
|
@clue Can you take a look ASAP? Big thanks! |
|
@Niko9911 That's interesting, thank you. Can you gist the problem you're seeing so we can reproduce this? We've addressed similar problems in @reactphp a longer time ago via reactphp/promise#25 and it looks like Composer fixed this for the most common use cases via composer/composer#4186 in the meantime. If we can still reproduce this problem, I would vote for a more local work around via an additional What do you think? 👍 |
|
I can take a look into this problem again, but pretty sure this cannot be fixed in level of code. About the reproducing, I can take a look. Kinda deeply in the code already. Also you will need ZTS compiled PHP with pthreads. Ofc, could show remotely the problem, but cannot share the code as that's not my decision to share it. 😞 The problem occurs only in the new child-thread as some of the classes are loaded there and some are not. That means I need to call autoloader once more. Also if I need instance of autoloader for use via require later on this will happen also. In any case. The best solution would be just to add these checks. If possible? I will be updating this PR to be exactly same as that other. I'm gonna work tomorrow on gist to reproduce this. |
|
Also asking, what you mean by local? Add these checks into the project? You suggest in that to fork this and all other modules required and it doesn't sound good. Thanks but, no thanks. |
|
Related issue: reactphp/promise-timer#36 |
|
Confirmed still the issue. |
|
I think you're aware of reactphp/promise-timer#36 I updated also the PR to work with requested login. What you think? Could it be possible to merge this? |
|
Status? |
|
@Niko9911 Changes LGTM, can you squash this into a single commit like in reactphp/promise-timer#36? |
|
This is also ready to merge. Thank you. 🏅 |
|
Thanks for the quick update, now let's get this in! |
|
Don't forget to tag 😉 |
|
@clue Could you tag this as 1.4.1? |
It seems likely that clue/stream-filter#23 is the fix for #13
In case you use pthreads or something else related to threading you might encounter this issue. It happens only with functions and is fixable only by adding these checks. Another way to avoid this is to wrap functions as static into classes.