Skip to content

Commit b2e6a4d

Browse files
authored
Merge pull request #2953 from XWB/deprecate-group
Deprecate Groups
2 parents 157b53b + 0cc80ad commit b2e6a4d

File tree

15 files changed

+163
-14
lines changed

15 files changed

+163
-14
lines changed

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Changelog
33

44
### 2.2.0 (2020-01-xx)
55

6+
* Deprecated the Groups feature.
67
* Marked all controllers final.
78
* Added Mongolian translation.
89
* Added an email provider.

Controller/GroupController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace FOS\UserBundle\Controller;
1313

14+
@trigger_error('Using Groups is deprecated since version 2.2 and will be removed in 3.0.', E_USER_DEPRECATED);
15+
1416
use FOS\UserBundle\Event\FilterGroupResponseEvent;
1517
use FOS\UserBundle\Event\FormEvent;
1618
use FOS\UserBundle\Event\GetResponseGroupEvent;
@@ -32,7 +34,7 @@
3234
* @author Thibault Duplessis <thibault.duplessis@gmail.com>
3335
* @author Christophe Coevoet <stof@notk.org>
3436
*
35-
* @final
37+
* @deprecated
3638
*/
3739
class GroupController extends Controller
3840
{

DependencyInjection/FOSUserExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ public function load(array $configs, ContainerBuilder $container)
126126
}
127127

128128
if (!empty($config['group'])) {
129+
@trigger_error('Using Groups is deprecated since version 2.2 and will be removed in 3.0.', E_USER_DEPRECATED);
130+
129131
$this->loadGroups($config['group'], $container, $loader, $config['db_driver']);
130132
}
131133

Doctrine/GroupManager.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,16 @@
1111

1212
namespace FOS\UserBundle\Doctrine;
1313

14+
@trigger_error('Using Groups is deprecated since version 2.2 and will be removed in 3.0.', E_USER_DEPRECATED);
15+
1416
use Doctrine\Common\Persistence\ObjectManager;
1517
use Doctrine\Common\Persistence\ObjectRepository;
1618
use FOS\UserBundle\Model\GroupInterface;
1719
use FOS\UserBundle\Model\GroupManager as BaseGroupManager;
1820

21+
/**
22+
* @deprecated
23+
*/
1924
class GroupManager extends BaseGroupManager
2025
{
2126
/**

Event/GroupEvent.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,15 @@
1111

1212
namespace FOS\UserBundle\Event;
1313

14+
@trigger_error('Using Groups is deprecated since version 2.2 and will be removed in 3.0.', E_USER_DEPRECATED);
15+
1416
use FOS\UserBundle\Model\GroupInterface;
1517
use Symfony\Component\EventDispatcher\Event;
1618
use Symfony\Component\HttpFoundation\Request;
1719

20+
/**
21+
* @deprecated
22+
*/
1823
class GroupEvent extends Event
1924
{
2025
/**

Form/Type/GroupFormType.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,15 @@
1111

1212
namespace FOS\UserBundle\Form\Type;
1313

14+
@trigger_error('Using Groups is deprecated since version 2.2 and will be removed in 3.0.', E_USER_DEPRECATED);
15+
1416
use Symfony\Component\Form\AbstractType;
1517
use Symfony\Component\Form\FormBuilderInterface;
1618
use Symfony\Component\OptionsResolver\OptionsResolver;
1719

20+
/**
21+
* @deprecated
22+
*/
1823
class GroupFormType extends AbstractType
1924
{
2025
/**

Model/Group.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@
1111

1212
namespace FOS\UserBundle\Model;
1313

14+
@trigger_error('Using Groups is deprecated since version 2.2 and will be removed in 3.0.', E_USER_DEPRECATED);
15+
1416
/**
1517
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
18+
*
19+
* @deprecated
1620
*/
1721
abstract class Group implements GroupInterface
1822
{

Model/GroupInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@
1111

1212
namespace FOS\UserBundle\Model;
1313

14+
@trigger_error('Using Groups is deprecated since version 2.2 and will be removed in 3.0.', E_USER_DEPRECATED);
15+
1416
/**
1517
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
1618
* @author Christophe Coevoet <stof@notk.org>
19+
*
20+
* @deprecated
1721
*/
1822
interface GroupInterface
1923
{

Model/GroupManager.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@
1111

1212
namespace FOS\UserBundle\Model;
1313

14+
@trigger_error('Using Groups is deprecated since version 2.2 and will be removed in 3.0.', E_USER_DEPRECATED);
15+
1416
/**
1517
* Abstract Group Manager implementation which can be used as base class for your
1618
* concrete manager.
1719
*
1820
* @author Christophe Coevoet <stof@notk.org>
21+
*
22+
* @deprecated
1923
*/
2024
abstract class GroupManager implements GroupManagerInterface
2125
{

Model/GroupManagerInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@
1111

1212
namespace FOS\UserBundle\Model;
1313

14+
@trigger_error('Using Groups is deprecated since version 2.2 and will be removed in 3.0.', E_USER_DEPRECATED);
15+
1416
/**
1517
* Interface to be implemented by group managers. This adds an additional level
1618
* of abstraction between your application, and the actual repository.
1719
*
1820
* All changes to groups should happen through this interface.
1921
*
2022
* @author Christophe Coevoet <stof@notk.org>
23+
*
24+
* @deprecated
2125
*/
2226
interface GroupManagerInterface
2327
{

0 commit comments

Comments
 (0)