Laravel 5.6 updates
Travis config update Removed HHVM script as Laravel no longer support HHVM after releasing 5.3
This commit is contained in:
@@ -152,6 +152,10 @@ class BoundMethod
|
||||
$dependencies[] = $parameters[$parameter->name];
|
||||
|
||||
unset($parameters[$parameter->name]);
|
||||
} elseif ($parameter->getClass() && array_key_exists($parameter->getClass()->name, $parameters)) {
|
||||
$dependencies[] = $parameters[$parameter->getClass()->name];
|
||||
|
||||
unset($parameters[$parameter->getClass()->name]);
|
||||
} elseif ($parameter->getClass()) {
|
||||
$dependencies[] = $container->make($parameter->getClass()->name);
|
||||
} elseif ($parameter->isDefaultValueAvailable()) {
|
||||
|
||||
@@ -271,13 +271,28 @@ class Container implements ArrayAccess, ContainerContract
|
||||
/**
|
||||
* Bind a callback to resolve with Container::call.
|
||||
*
|
||||
* @param string $method
|
||||
* @param array|string $method
|
||||
* @param \Closure $callback
|
||||
* @return void
|
||||
*/
|
||||
public function bindMethod($method, $callback)
|
||||
{
|
||||
$this->methodBindings[$method] = $callback;
|
||||
$this->methodBindings[$this->parseBindMethod($method)] = $callback;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the method to be bound in class@method format.
|
||||
*
|
||||
* @param array|string $method
|
||||
* @return string
|
||||
*/
|
||||
protected function parseBindMethod($method)
|
||||
{
|
||||
if (is_array($method)) {
|
||||
return $method[0].'@'.$method[1];
|
||||
}
|
||||
|
||||
return $method;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1166,7 +1181,7 @@ class Container implements ArrayAccess, ContainerContract
|
||||
* Set the shared instance of the container.
|
||||
*
|
||||
* @param \Illuminate\Contracts\Container\Container|null $container
|
||||
* @return static
|
||||
* @return \Illuminate\Contracts\Container\Container|static
|
||||
*/
|
||||
public static function setInstance(ContainerContract $container = null)
|
||||
{
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.0",
|
||||
"illuminate/contracts": "5.5.*",
|
||||
"php": "^7.1.3",
|
||||
"illuminate/contracts": "5.6.*",
|
||||
"psr/container": "~1.0"
|
||||
},
|
||||
"autoload": {
|
||||
@@ -25,7 +25,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.5-dev"
|
||||
"dev-master": "5.6-dev"
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
|
||||
Reference in New Issue
Block a user