Skip to content

Commit

Permalink
Merge branch '5.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 10, 2017
2 parents 64ff115 + 26f1679 commit 8d74c68
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/Illuminate/Database/Connectors/SqlServerConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ protected function getSqlSrvDsn(array $config)
$arguments['TransactionIsolation'] = $config['transaction_isolation'];
}

if (isset($config['multi_subnet_failover'])) {
$arguments['MultiSubnetFailover'] = $config['multi_subnet_failover'];
}

return $this->buildConnectString('sqlsrv', $arguments);
}

Expand Down
23 changes: 22 additions & 1 deletion src/Illuminate/Filesystem/FilesystemAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,15 @@ public function url($path)
*/
protected function getAwsUrl($adapter, $path)
{
$config = $this->driver->getConfig();

// If an explicit base URL has been set on the disk configuration then we will use
// it as the base URL instead of the default path. This allows the developer to
// have full control over the base path for this filesystem's generated URLs.
if (! is_null($url = $config->get('url'))) {
return $this->concatPathToUrl($url, $path);
}

return $adapter->getClient()->getObjectUrl(
$adapter->getBucket(), $adapter->getPathPrefix().$path
);
Expand Down Expand Up @@ -381,7 +390,7 @@ protected function getLocalUrl($path)
// it as the base URL instead of the default path. This allows the developer to
// have full control over the base path for this filesystem's generated URLs.
if ($config->has('url')) {
return rtrim($config->get('url'), '/').'/'.ltrim($path, '/');
return $this->concatPathToUrl($config->get('url'), $path);
}

$path = '/storage/'.$path;
Expand Down Expand Up @@ -460,6 +469,18 @@ public function getRackspaceTemporaryUrl($adapter, $path, $expiration, $options)
);
}

/**
* Concatenate a path to a URL.
*
* @param string $url
* @param string $path
* @return string
*/
protected function concatPathToUrl($url, $path)
{
return rtrim($url, '/').'/'.ltrim($path, '/');
}

/**
* Get an array of all files in a directory.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function doesntExpectEvents($events)
*/
protected function withoutEvents()
{
$mock = Mockery::mock(EventsDispatcherContract::class);
$mock = Mockery::mock(EventsDispatcherContract::class)->shouldIgnoreMissing();

$mock->shouldReceive('fire', 'dispatch')->andReturnUsing(function ($called) {
$this->firedEvents[] = $called;
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Routing/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ public function callAction($method, $parameters)
*/
public function __call($method, $parameters)
{
throw new BadMethodCallException("Method [{$method}] does not exist.");
throw new BadMethodCallException("Method [{$method}] does not exist on [".get_class($this).'].');
}
}
6 changes: 4 additions & 2 deletions src/Illuminate/Support/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,11 @@ public function crossJoin(...$lists)
*
* @return void
*/
public function dd()
public function dd(...$args)
{
dd($this->all());
call_user_func_array([$this, 'dump'], $args);

die(1);
}

/**
Expand Down

0 comments on commit 8d74c68

Please sign in to comment.