File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed
Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change 1313 * @ORM\Entity(repositoryClass="App\Repository\UserRepository")
1414 * @ORM\Table(name="users")
1515 */
16- class User implements UserInterface, \Serializable, JsonSerializable
16+ class User implements UserInterface, JsonSerializable
1717{
1818 /**
1919 * @ORM\Id()
@@ -225,24 +225,18 @@ public function setLastLogin(\DateTimeInterface $lastLogin): self
225225 return $ this ;
226226 }
227227
228- /** @see \Serializable::serialize() */
229- public function serialize ()
228+ public function __serialize (): array
230229 {
231- return serialize ( array (
230+ return [
232231 $ this ->id ,
233232 $ this ->username ,
234233 $ this ->lmsUserId
235- )) ;
234+ ] ;
236235 }
237236
238- /** @see \Serializable::unserialize() */
239- public function unserialize ($ serialized )
237+ public function __unserialize (array $ data ): void
240238 {
241- list (
242- $ this ->id ,
243- $ this ->username ,
244- $ this ->lmsUserId
245- ) = unserialize ($ serialized );
239+ [$ this ->id , $ this ->username , $ this ->lmsUserId ] = $ data ;
246240 }
247241
248242 public function jsonSerialize (): array
You can’t perform that action at this time.
0 commit comments