Skip to content

Commit

Permalink
Merge pull request #23 from laravel/fix/stream-protocol-name
Browse files Browse the repository at this point in the history
[1.x] Updates stream protocol name to avoid collision with `opis/closure`
  • Loading branch information
taylorotwell authored Oct 7, 2021
2 parents ebafb8d + 8b3dd23 commit f416699
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Support/ClosureStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ClosureStream
/**
* The stream protocol.
*/
const STREAM_PROTO = 'closure';
const STREAM_PROTO = 'laravel-serializable-closure';

/**
* Checks if this stream is registered.
Expand Down Expand Up @@ -171,7 +171,7 @@ public function stream_tell()
*/
public static function register()
{
if (! static::$isRegistered && ! in_array(static::STREAM_PROTO, stream_get_wrappers())) {
if (! static::$isRegistered) {
static::$isRegistered = stream_wrapper_register(static::STREAM_PROTO, __CLASS__);
}
}
Expand Down

0 comments on commit f416699

Please sign in to comment.