Skip to content

Commit 09ee522

Browse files
committed
Tweaked previous merge
1 parent 33271c9 commit 09ee522

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

DependencyInjection/Compiler/RegisterMappingsPass.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the FOSUserBundle package.
5+
*
6+
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace FOS\UserBundle\DependencyInjection\Compiler;
413

514
use Symfony\Component\DependencyInjection\ContainerBuilder;

Document/Group.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ abstract class Group extends BaseGroup
2020
{
2121
public function __construct($name, $roles = array())
2222
{
23-
// you should extend the class in the Model namespace directly
24-
trigger_error(E_USER_DEPRECATED);
23+
trigger_error(E_USER_DEPRECATED, sprintf('%s is deprecated. Extend FOS\UserBundle\Model\Group directly.', __CLASS__));
2524
parent::__construct($name, $roles);
2625
}
2726
}

Document/User.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ abstract class User extends AbstractUser
2020
{
2121
public function __construct()
2222
{
23-
// you should extend the class in the Model namespace directly
24-
trigger_error(E_USER_DEPRECATED);
23+
trigger_error(E_USER_DEPRECATED, sprintf('%s is deprecated. Extend FOS\UserBundle\Model\User directly.', __CLASS__));
2524
parent::__construct();
2625
}
2726
}

Entity/Group.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ class Group extends BaseGroup
2020
{
2121
public function __construct($name, $roles = array())
2222
{
23-
// you should extend the class in the Model namespace directly
24-
trigger_error(E_USER_DEPRECATED);
23+
trigger_error(E_USER_DEPRECATED, sprintf('%s is deprecated. Extend FOS\UserBundle\Model\Group directly.', __CLASS__));
2524
parent::__construct($name, $roles);
2625
}
2726
}

Entity/User.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ abstract class User extends AbstractUser
2020
{
2121
public function __construct()
2222
{
23-
// you should extend the class in the Model namespace directly
24-
trigger_error(E_USER_DEPRECATED);
23+
trigger_error(E_USER_DEPRECATED, sprintf('%s is deprecated. Extend FOS\UserBundle\Model\User directly.', __CLASS__));
2524
parent::__construct();
2625
}
2726
}

0 commit comments

Comments
 (0)