Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use full function namespaces to avoid clashes with serialization
`Promise.php` contains function calls that expect the current namespace. However if you serialize & then later unserialize a Promise, this namespace is lost, and the function calls clash with other defined global functions. E.g. if using Laravel, you serialize a `\React\Promise\Promise` instance, and then later unserialize & attempt to resolve it - the call to `resolve` on line 232 clashes with Laravel's global `resolve` function - causing it to throw an exception. By using the full namespace on the function call this eliminates this possible problem. Also makes the code an easier read IMO making it obvious that these are namespaced functions.
- Loading branch information