Skip to content

Commit

Permalink
Fix a deprecation about groups being triggered when loading ORM metadata
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
stof committed Sep 8, 2021
1 parent dcc2ec6 commit be2d262
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

### 2.2.2 (2021-09-08)

* Fixed a deprecation warning about groups being triggered when loading all Doctrine metadata.

### 2.2.1 (2021-09-08)

* Fixed a deprecation warning about groups being triggered when loading the User class of the bundle.
Expand Down
4 changes: 1 addition & 3 deletions Model/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@

namespace FOS\UserBundle\Model;

@trigger_error('Using Groups is deprecated since version 2.2 and will be removed in 3.0.', E_USER_DEPRECATED);

/**
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
*
* @deprecated
* @deprecated Using Groups is deprecated since version 2.2 and will be removed in 3.0.
*/
abstract class Group implements GroupInterface
{
Expand Down

0 comments on commit be2d262

Please sign in to comment.