Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
etcinit committed Nov 6, 2014
2 parents 31a07b7 + b6d1e7e commit 20c508f
Show file tree
Hide file tree
Showing 77 changed files with 251 additions and 183 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Auth/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function register()
*/
protected function registerAuthenticator()
{
$this->app->bindShared('auth', function($app)
$this->app->singleton('auth', function($app)
{
// Once the authentication service has actually been requested by the developer
// we will set a variable in the application indicating such. This helps us
Expand All @@ -35,7 +35,7 @@ protected function registerAuthenticator()
return new AuthManager($app);
});

$this->app->bindShared('auth.driver', function($app)
$this->app->singleton('auth.driver', function($app)
{
return $app['auth']->driver();
});
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Auth/GeneratorServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function register()
*/
protected function registerClearRemindersCommand()
{
$this->app->bindShared('command.auth.reminders.clear', function()
$this->app->singleton('command.auth.reminders.clear', function()
{
return new ClearRemindersCommand;
});
Expand Down
16 changes: 8 additions & 8 deletions src/Illuminate/Auth/Guard.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

use Illuminate\Contracts\Events\Dispatcher;
use Symfony\Component\HttpFoundation\Request;
use Illuminate\Session\Store as SessionStore;
use Symfony\Component\HttpFoundation\Response;
use Illuminate\Contracts\Auth\User as UserContract;
use Illuminate\Contracts\Auth\Guard as GuardContract;
use Illuminate\Contracts\Cookie\QueueingFactory as CookieJar;
use Symfony\Component\HttpFoundation\Session\SessionInterface;

class Guard implements GuardContract {

Expand Down Expand Up @@ -39,9 +39,9 @@ class Guard implements GuardContract {
protected $provider;

/**
* The session store used by the guard.
* The session used by the guard.
*
* @var \Illuminate\Session\Store
* @var \Symfony\Component\HttpFoundation\Session\SessionInterface
*/
protected $session;

Expand Down Expand Up @@ -84,12 +84,12 @@ class Guard implements GuardContract {
* Create a new authentication guard.
*
* @param \Illuminate\Auth\UserProviderInterface $provider
* @param \Illuminate\Session\Store $session
* @param \Symfony\Component\HttpFoundation\Session\SessionInterface $session
* @param \Symfony\Component\HttpFoundation\Request $request
* @return void
*/
public function __construct(UserProviderInterface $provider,
SessionStore $session,
SessionInterface $session,
Request $request = null)
{
$this->session = $session;
Expand Down Expand Up @@ -439,7 +439,7 @@ public function login(UserContract $user, $remember = false)
*/
protected function updateSession($id)
{
$this->session->put($this->getName(), $id);
$this->session->set($this->getName(), $id);

$this->session->migrate(true);
}
Expand All @@ -453,7 +453,7 @@ protected function updateSession($id)
*/
public function loginUsingId($id, $remember = false)
{
$this->session->put($this->getName(), $id);
$this->session->set($this->getName(), $id);

$this->login($user = $this->provider->retrieveById($id), $remember);

Expand Down Expand Up @@ -536,7 +536,7 @@ public function logout()
*/
protected function clearUserDataFromStorage()
{
$this->session->forget($this->getName());
$this->session->remove($this->getName());

$recaller = $this->getRecallerName();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function register()
*/
protected function registerPasswordBroker()
{
$this->app->bindShared('auth.password', function($app)
$this->app->singleton('auth.password', function($app)
{
// The password token repository is responsible for storing the email addresses
// and password reset tokens. It will be used to verify the tokens are valid
Expand All @@ -58,7 +58,7 @@ protected function registerPasswordBroker()
*/
protected function registerTokenRepository()
{
$this->app->bindShared('auth.password.tokens', function($app)
$this->app->singleton('auth.password.tokens', function($app)
{
$connection = $app['db']->connection();

Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Auth/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "illuminate/auth",
"description": "The Illuminate Auth package.",
"license": "MIT",
"authors": [
{
Expand Down
10 changes: 5 additions & 5 deletions src/Illuminate/Cache/CacheServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ class CacheServiceProvider extends ServiceProvider {
*/
public function register()
{
$this->app->bindShared('cache', function($app)
$this->app->singleton('cache', function($app)
{
return new CacheManager($app);
});

$this->app->bindShared('cache.store', function($app)
$this->app->singleton('cache.store', function($app)
{
return $app['cache']->driver();
});

$this->app->bindShared('memcached.connector', function()
$this->app->singleton('memcached.connector', function()
{
return new MemcachedConnector;
});
Expand All @@ -43,12 +43,12 @@ public function register()
*/
public function registerCommands()
{
$this->app->bindShared('command.cache.clear', function($app)
$this->app->singleton('command.cache.clear', function($app)
{
return new Console\ClearCommand($app['cache'], $app['files']);
});

$this->app->bindShared('command.cache.table', function($app)
$this->app->singleton('command.cache.table', function($app)
{
return new Console\CacheTableCommand($app['files']);
});
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Cache/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "illuminate/cache",
"description": "The Illuminate Cache package.",
"license": "MIT",
"authors": [
{
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Config/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "illuminate/config",
"description": "The Illuminate Config package.",
"license": "MIT",
"authors": [
{
Expand Down
3 changes: 2 additions & 1 deletion src/Illuminate/Console/AppNamespaceDetectorTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ trait AppNamespaceDetectorTrait {
/**
* Get the application namespace from the Composer file.
*
* @param string $namespacePath
* @return string
*
* @throws \RuntimeException
*/
protected function getAppNamespace()
{
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Console/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "illuminate/console",
"description": "The Illuminate Console package.",
"license": "MIT",
"authors": [
{
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Container/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "illuminate/container",
"description": "The Illuminate Container package.",
"license": "MIT",
"authors": [
{
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Contracts/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "illuminate/contracts",
"description": "The Illuminate Contracts package.",
"license": "MIT",
"authors": [
{
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Cookie/CookieServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CookieServiceProvider extends ServiceProvider {
*/
public function register()
{
$this->app->bindShared('cookie', function($app)
$this->app->singleton('cookie', function($app)
{
$config = $app['config']['session'];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use Closure;
use Illuminate\Contracts\Routing\Middleware;
use Symfony\Component\HttpFoundation\Request;
use Illuminate\Contracts\Cookie\QueueingFactory as CookieJar;

class AddQueuedCookiesToRequest implements Middleware {
Expand Down Expand Up @@ -37,7 +36,9 @@ public function handle($request, Closure $next)
$response = $next($request);

foreach ($this->cookies->getQueuedCookies() as $cookie)
{
$response->headers->setCookie($cookie);
}

return $response;
}
Expand Down
7 changes: 5 additions & 2 deletions src/Illuminate/Cookie/Middleware/EncryptCookies.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@ protected function decrypt(Request $request)
{
foreach ($request->cookies as $key => $c)
{
try {
try
{
$request->cookies->set($key, $this->decryptCookie($c));
} catch (DecryptException $e) {
}
catch (DecryptException $e)
{
$request->cookies->set($key, null);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Cookie/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "illuminate/cookie",
"description": "The Illuminate Cookie package.",
"license": "MIT",
"authors": [
{
Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Database/Connectors/ConnectionFactory.php
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<?php namespace Illuminate\Database\Connectors;

use PDO;
use Illuminate\Container\Container;
use Illuminate\Database\MySqlConnection;
use Illuminate\Database\SQLiteConnection;
use Illuminate\Database\PostgresConnection;
use Illuminate\Database\SqlServerConnection;
use Illuminate\Contracts\Container\Container;

class ConnectionFactory {

/**
* The IoC container instance.
*
* @var \Illuminate\Container\Container
* @var \Illuminate\Contracts\Container\Container
*/
protected $container;

/**
* Create a new connection factory instance.
*
* @param \Illuminate\Container\Container $container
* @param \Illuminate\Contracts\Container\Container $container
* @return void
*/
public function __construct(Container $container)
Expand Down
3 changes: 0 additions & 3 deletions src/Illuminate/Database/DatabaseManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,6 @@ protected function prepare(Connection $connection)
$connection->setEventDispatcher($this->app['events']);
}

$app = $this->app;


// Here we'll set a reconnector callback. This reconnector can be any callable
// so we will set a Closure to reconnect from this manager with the name of
// the connection, which will allow us to reconnect from the connections.
Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Database/DatabaseServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ public function register()
// The connection factory is used to create the actual connection instances on
// the database. We will inject the factory into the manager so that it may
// make the connections while they are actually needed and not of before.
$this->app->bindShared('db.factory', function($app)
$this->app->singleton('db.factory', function($app)
{
return new ConnectionFactory($app);
});

// The database manager is used to resolve various connections, since multiple
// connections might be managed. It also implements the connection resolver
// interface which may be used by other components requiring connections.
$this->app->bindShared('db', function($app)
$this->app->singleton('db', function($app)
{
return new DatabaseManager($app, $app['db.factory']);
});
Expand All @@ -51,7 +51,7 @@ public function register()
*/
protected function registerQueueableEntityResolver()
{
$this->app->bindShared('Illuminate\Contracts\Queue\EntityResolver', function()
$this->app->singleton('Illuminate\Contracts\Queue\EntityResolver', function()
{
return new Eloquent\QueueEntityResolver;
});
Expand Down
Loading

0 comments on commit 20c508f

Please sign in to comment.