composer update
This commit is contained in:
+14
-4
@@ -370,8 +370,6 @@ class SerializableClosure implements Serializable
|
||||
*/
|
||||
public static function wrapClosures(&$data, SplObjectStorage $storage = null)
|
||||
{
|
||||
static::enterContext();
|
||||
|
||||
if($storage === null){
|
||||
$storage = static::$context->scope;
|
||||
}
|
||||
@@ -431,8 +429,6 @@ class SerializableClosure implements Serializable
|
||||
};
|
||||
} while($reflection = $reflection->getParentClass());
|
||||
}
|
||||
|
||||
static::exitContext();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -496,6 +492,20 @@ class SerializableClosure implements Serializable
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new closure from arbitrary code,
|
||||
* emulating create_function, but without using eval
|
||||
*
|
||||
* @param string$args
|
||||
* @param string $code
|
||||
* @return Closure
|
||||
*/
|
||||
public static function createClosure($args, $code)
|
||||
{
|
||||
ClosureStream::register();
|
||||
return include(ClosureStream::STREAM_PROTO . '://function(' . $args. '){' . $code . '};');
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal method used to map closure pointers
|
||||
* @internal
|
||||
|
||||
Reference in New Issue
Block a user