Skip to content

Commit be2d262

Browse files
committed
Fix a deprecation about groups being triggered when loading ORM metadata
When using the `getAllMetadata` API of the Doctrine ORM, it will load the abstract Group class due to being a MappedSuperClass in the mapping. This was triggering the deprecation warning about using groups, even though they were not actually used. Given that this class is abstract, the only way to actually use it involves extending it, which gets a deprecation warning triggered by the DebugClassLoader.
1 parent dcc2ec6 commit be2d262

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Changelog
22
=========
33

4+
### 2.2.2 (2021-09-08)
5+
6+
* Fixed a deprecation warning about groups being triggered when loading all Doctrine metadata.
7+
48
### 2.2.1 (2021-09-08)
59

610
* Fixed a deprecation warning about groups being triggered when loading the User class of the bundle.

Model/Group.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@
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-
1614
/**
1715
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
1816
*
19-
* @deprecated
17+
* @deprecated Using Groups is deprecated since version 2.2 and will be removed in 3.0.
2018
*/
2119
abstract class Group implements GroupInterface
2220
{

0 commit comments

Comments
 (0)