Skip to content

Commit ab39193

Browse files
Support L5.2 new auth provider, fixes #114
1 parent 67ebad3 commit ab39193

File tree

5 files changed

+21
-22
lines changed

5 files changed

+21
-22
lines changed

composer.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,24 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=5.5.0",
19+
"php": ">=5.5.9",
2020
"doctrine/orm": "2.5.*",
21-
"illuminate/auth": "~5.1",
22-
"illuminate/console": "~5.1",
23-
"illuminate/container": "~5.1",
24-
"illuminate/contracts": "~5.1",
25-
"illuminate/pagination": "~5.1",
26-
"illuminate/support": "~5.1",
27-
"illuminate/validation": "~5.1",
28-
"illuminate/view": "~5.1",
21+
"illuminate/auth": "5.2.*",
22+
"illuminate/console": "5.2.*",
23+
"illuminate/container": "5.2.*",
24+
"illuminate/contracts": "5.2.*",
25+
"illuminate/pagination": "5.2.*",
26+
"illuminate/support": "5.2.*",
27+
"illuminate/validation": "5.2.*",
28+
"illuminate/view": "5.2.*",
2929
"symfony/serializer": "^2.7"
3030
},
3131
"require-dev": {
3232
"phpunit/phpunit": "~4.0",
3333
"mockery/mockery": "~0.9",
3434
"barryvdh/laravel-debugbar": "~2.0",
3535
"itsgoingd/clockwork": "~1.9",
36-
"illuminate/log": "~5.1"
36+
"illuminate/log": "5.2.*"
3737
},
3838
"autoload": {
3939
"psr-4": {

config/doctrine.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,16 @@
5555
|--------------------------------------------------------------------------
5656
| Doctrine mapping types
5757
|--------------------------------------------------------------------------
58-
|
58+
|
5959
| Link a Database Type to a Local Doctrine Type
60-
|
60+
|
6161
| Using 'enum' => 'string' is the same of:
6262
| $doctrineManager->extendAll(function (\Doctrine\ORM\Configuration $configuration,
6363
| \Doctrine\DBAL\Connection $connection,
6464
| \Doctrine\Common\EventManager $eventManager) {
6565
| $connection->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');
6666
| });
67-
|
67+
|
6868
| References:
6969
| http://doctrine-orm.readthedocs.org/en/latest/cookbook/custom-mapping-types.html
7070
| http://doctrine-dbal.readthedocs.org/en/latest/reference/types.html#custom-mapping-types
@@ -105,7 +105,7 @@
105105
|--------------------------------------------------------------------------
106106
| Doctrine custom types
107107
|--------------------------------------------------------------------------
108-
|
108+
|
109109
| Create a custom or override a Doctrine Type
110110
|--------------------------------------------------------------------------
111111
*/

src/Contracts/Auth/Authenticatable.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44

55
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
66

7+
/**
8+
* @deprecated since 1.1
9+
*/
710
interface Authenticatable extends AuthenticatableContract
811
{
9-
/**
10-
* Get the column name for the primary key
11-
* @return string
12-
*/
13-
public function getAuthIdentifierName();
1412
}

src/DoctrineServiceProvider.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,9 @@ protected function registerCustomTypes()
209209
*/
210210
protected function extendAuthManager()
211211
{
212-
$this->app->make('auth')->extend('doctrine', function ($app) {
213-
$entity = $app->make('config')->get('auth.model');
212+
$this->app->make('auth')->provider('doctrine', function ($app, $config) {
213+
214+
$entity = $config['model'];
214215

215216
$em = $app['registry']->getManagerForClass($entity);
216217

src/EntityManagerFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ protected function getConnectionDriver(array $settings = [])
378378
/**
379379
* @param $settings
380380
* @param EntityManagerInterface $manager
381-
*
381+
*
382382
* @throws \Doctrine\DBAL\DBALException If Database Type or Doctrine Type is not found.
383383
*/
384384
protected function registerMappingTypes(array $settings = [], EntityManagerInterface $manager)

0 commit comments

Comments
 (0)