Skip to content

Commit

Permalink
fixed the order of arguments for trigger_error
Browse files Browse the repository at this point in the history
  • Loading branch information
stof committed May 25, 2013
1 parent 1d4ffd8 commit 063ed8a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Document/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ abstract class Group extends BaseGroup
{
public function __construct($name, $roles = array())
{
trigger_error(E_USER_DEPRECATED, sprintf('%s is deprecated. Extend FOS\UserBundle\Model\Group directly.', __CLASS__));
trigger_error(sprintf('%s is deprecated. Extend FOS\UserBundle\Model\Group directly.', __CLASS__), E_USER_DEPRECATED);
parent::__construct($name, $roles);
}
}
2 changes: 1 addition & 1 deletion Document/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ abstract class User extends AbstractUser
{
public function __construct()
{
trigger_error(E_USER_DEPRECATED, sprintf('%s is deprecated. Extend FOS\UserBundle\Model\User directly.', __CLASS__));
trigger_error(sprintf('%s is deprecated. Extend FOS\UserBundle\Model\User directly.', __CLASS__), E_USER_DEPRECATED);
parent::__construct();
}
}
2 changes: 1 addition & 1 deletion Entity/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Group extends BaseGroup
{
public function __construct($name, $roles = array())
{
trigger_error(E_USER_DEPRECATED, sprintf('%s is deprecated. Extend FOS\UserBundle\Model\Group directly.', __CLASS__));
trigger_error(sprintf('%s is deprecated. Extend FOS\UserBundle\Model\Group directly.', __CLASS__), E_USER_DEPRECATED);
parent::__construct($name, $roles);
}
}
2 changes: 1 addition & 1 deletion Entity/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ abstract class User extends AbstractUser
{
public function __construct()
{
trigger_error(E_USER_DEPRECATED, sprintf('%s is deprecated. Extend FOS\UserBundle\Model\User directly.', __CLASS__));
trigger_error(sprintf('%s is deprecated. Extend FOS\UserBundle\Model\User directly.', __CLASS__), E_USER_DEPRECATED);
parent::__construct();
}
}
6 changes: 3 additions & 3 deletions Model/UserManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function findUserByConfirmationToken($token)
*/
public function refreshUser(SecurityUserInterface $user)
{
trigger_error(E_USER_DEPRECATED, 'Using the UserManager as user provider is deprecated. Use FOS\UserBundle\Security\UserProvider instead.');
trigger_error('Using the UserManager as user provider is deprecated. Use FOS\UserBundle\Security\UserProvider instead.', E_USER_DEPRECATED);

$class = $this->getClass();
if (!$user instanceof $class) {
Expand Down Expand Up @@ -154,7 +154,7 @@ public function refreshUser(SecurityUserInterface $user)
*/
public function loadUserByUsername($username)
{
trigger_error(E_USER_DEPRECATED, 'Using the UserManager as user provider is deprecated. Use FOS\UserBundle\Security\UserProvider instead.');
trigger_error('Using the UserManager as user provider is deprecated. Use FOS\UserBundle\Security\UserProvider instead.', E_USER_DEPRECATED);

$user = $this->findUserByUsername($username);

Expand Down Expand Up @@ -220,7 +220,7 @@ protected function getEncoder(UserInterface $user)
*/
public function supportsClass($class)
{
trigger_error(E_USER_DEPRECATED, 'Using the UserManager as user provider is deprecated. Use FOS\UserBundle\Security\UserProvider instead.');
trigger_error('Using the UserManager as user provider is deprecated. Use FOS\UserBundle\Security\UserProvider instead.', E_USER_DEPRECATED);

return $class === $this->getClass();
}
Expand Down

0 comments on commit 063ed8a

Please sign in to comment.