File tree Expand file tree Collapse file tree 6 files changed +35
-13
lines changed
Expand file tree Collapse file tree 6 files changed +35
-13
lines changed Original file line number Diff line number Diff line change 1414use FOS \UserBundle \Model \Group as BaseGroup ;
1515
1616/**
17- * @deprecated directly extend the model classes
17+ * @deprecated directly extend the classes in the Model namespace
1818 */
1919abstract class Group extends BaseGroup
2020{
21+ public function __construct ($ name , $ roles = array ())
22+ {
23+ // you should extend the class in the Model namespace directly
24+ trigger_error (E_USER_DEPRECATED );
25+ parent ::__construct ($ name , $ roles );
26+ }
2127}
Original file line number Diff line number Diff line change 1414use FOS \UserBundle \Model \User as AbstractUser ;
1515
1616/**
17- * @deprecated directly extend the model classes
17+ * @deprecated directly extend the classes in the Model namespace
1818 */
1919abstract class User extends AbstractUser
2020{
21+ public function __construct ()
22+ {
23+ // you should extend the class in the Model namespace directly
24+ trigger_error (E_USER_DEPRECATED );
25+ parent ::__construct ();
26+ }
2127}
Original file line number Diff line number Diff line change 1414use FOS \UserBundle \Model \Group as BaseGroup ;
1515
1616/**
17- * @deprecated directly extend the model classes
17+ * @deprecated directly extend the classes in the Model namespace
1818 */
1919class Group extends BaseGroup
2020{
21+ public function __construct ($ name , $ roles = array ())
22+ {
23+ // you should extend the class in the Model namespace directly
24+ trigger_error (E_USER_DEPRECATED );
25+ parent ::__construct ($ name , $ roles );
26+ }
2127}
Original file line number Diff line number Diff line change 1414use FOS \UserBundle \Model \User as AbstractUser ;
1515
1616/**
17- * @deprecated directly extend the model classes
17+ * @deprecated directly extend the classes in the Model namespace
1818 */
1919abstract class User extends AbstractUser
2020{
21+ public function __construct ()
22+ {
23+ // you should extend the class in the Model namespace directly
24+ trigger_error (E_USER_DEPRECATED );
25+ parent ::__construct ();
26+ }
2127}
Original file line number Diff line number Diff line change 2525 */
2626class FOSUserBundle extends Bundle
2727{
28-
2928 public function build (ContainerBuilder $ container )
3029 {
3130 parent ::build ($ container );
Original file line number Diff line number Diff line change @@ -4,17 +4,16 @@ Upgrade instruction
44This document describes the changes needed when upgrading because of a BC
55break. For the full list of changes, please look at the Changelog file.
66
7- ## 1.3.1 to 1.3.2
7+ ## 1.3 to 2.0
88
99### User and Group class
1010
11- This bundle now registers mappings for the classes in Model directly, instead
12- of having empty extending classes. The Entity/User and Document/User and Group
13- classes are deprecated, you should update your User and Group classes to extend
14- the classes found in Model directly.
15- The old classes will stay around for a while and continue to work, but will be
16- dropped for version 2.0.
17-
11+ This bundle now (registers mappings)[ http://symfony.com/doc/master/cookbook/doctrine/mapping_model_classes.html ]
12+ for the classes in the Model namespace directly, instead
13+ of having empty extending classes. The User and Group classes in the Entity and
14+ Document namespaces are deprecated, you should update your User and Group
15+ classes to extend the classes found in ` Model ` .
16+ The old classes will stay until 2.0 is released stable, but throw deprecated warnings.
1817
1918## 1.2 to 1.3
2019
You can’t perform that action at this time.
0 commit comments