Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

Thread::globally in PHP7 is missing #622

Closed
dekker-m opened this issue Sep 9, 2016 · 1 comment
Closed

Thread::globally in PHP7 is missing #622

dekker-m opened this issue Sep 9, 2016 · 1 comment

Comments

@dekker-m
Copy link

dekker-m commented Sep 9, 2016

Environment

  • PHP: PHP 7.0.6RC1 (cli) (built: Apr 14 2016 10:54:04) ( ZTS )
  • pthreads: 3.1.6
  • OS: Windows 10 64-bit, Intel(R) Xeon(R) CPU E3-1535M v5

Summary

The Thread::globally() method does not exist anymore in v3. However, the change is not documented. The examples/stub.php file still includes this method (I use the stub.php for autocompletion).

Will the globally() method be implemented again or is it permanently removed? If so, is there a work around which achieve the same? I got some trouble with a log class. The log class should be able to log errors/exceptions/shutdown errors from all the different threads. I'm trying to write to an error file and to the console (if a console is detected). Both of the actual writers are implemented using Zend\Log.

krakjoe added a commit that referenced this issue Sep 29, 2016
@krakjoe
Copy link
Owner

krakjoe commented Sep 29, 2016

I just updated the stub.

It was removed permanently.

The documentation is out of date a little, it's a thing I plan to fix.

I'm closing the bug, but that doesn't end the conversation; If you want to show me some code (I'm not familiar with Zend\Log or \Zend) I'll be happy to suggest a better way :)

@krakjoe krakjoe closed this as completed Sep 29, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants